修改bug

master
sunzehua 6 months ago
parent 8374150b80
commit 676690e298

@ -7,12 +7,12 @@ VUE_APP_TYPE = 'hechuan'
# 打包部署的三个端 客户端customer 和川端hechuan 运营端djy # 打包部署的三个端 客户端customer 和川端hechuan 运营端djy
# 和川大简云正式 # 和川大简云正式
VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api # VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api
VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345 # VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345
# 和川大简云测试 # 和川大简云测试
# VUE_APP_API_BASE_URL=http://60.209.125.238:35100 VUE_APP_API_BASE_URL=http://60.209.125.238:35100
# VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100 VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100
# 客户端测试 # 客户端测试
# VUE_APP_API_BASE_URL=http://60.209.125.238:30813 # VUE_APP_API_BASE_URL=http://60.209.125.238:30813

@ -78,9 +78,8 @@ export function BookingSlotDetail(parameter) {
export function BookingSlotDelete(parameter) { export function BookingSlotDelete(parameter) {
return axios({ return axios({
url: '/BookingSlot/delete', url: '/BookingSlot/delete?ids=' + parameter,
method: 'post', method: 'post'
params: parameter
}) })
} }
@ -185,3 +184,19 @@ export function BookingLabelBind(parameter) {
data: parameter data: parameter
}) })
} }
export function SaveDataInList(parameter) {
return axios({
url: 'BookingSlot/SaveDataInList',
method: 'post',
data: parameter
})
}
export function PrintOrder(parameter) {
return axios({
url: 'BookingSlot/PrintOrder',
method: 'post',
data: parameter
})
}

@ -147,14 +147,14 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="卖价" :label-col="formItemLayout.labelCol2" :wrapper-col="formItemLayout.wrapperCol2"> <a-form-item label="卖价" :label-col="formItemLayout.labelCol2" :wrapper-col="formItemLayout.wrapperCol2">
<a-input-number style="width: 100%;" :precision="2" v-model="CreateData.GOODSNAME"></a-input-number> <a-input-number style="width: 100%;" :precision="2" v-model="CreateData.sellinG_PRICE"></a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row v-if="type==='B'"> <a-row v-if="type==='B'">
<a-col :span="8"> <a-col :span="8">
<a-form-item label="销售日期" :label-col="formItemLayout.labelCol2" :wrapper-col="formItemLayout.wrapperCol2"> <a-form-item label="销售日期" :label-col="formItemLayout.labelCol2" :wrapper-col="formItemLayout.wrapperCol2">
<a-date-picker style="width: 100%;" v-model="CreateData.SALE_TIME" /> <a-date-picker style="width: 100%;" v-model="CreateData.SALE_TIME" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -253,6 +253,22 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row v-if="type==='B'">
<a-col :span="16">
<a-form-item label="可用箱信息" :label-col="formItemLayout.labelCol3" :wrapper-col="formItemLayout.wrapperCol3">
<div class="tear-list">
<div class="item" v-for="item in CreateData.CtnList" :key="item.gid">
<span class="item-left">{{ item.ctnall }}</span>
<a-input-number style="width:50px;" :max="item.maxnum" v-model="item.ctnnum" :min="0"> </a-input-number>
</div>
</div>
<div style="line-height: 15px">
<span style="color:rgb(114, 184, 9);">已选箱型{{ boxTotal }}</span>
剩余箱型{{ boxRemaining }}
</div>
</a-form-item>
</a-col>
</a-row>
</a-form> </a-form>
</a-spin> </a-spin>
</a-modal> </a-modal>
@ -272,9 +288,43 @@ export default {
render: (h, ctx) => ctx.props.vnodes render: (h, ctx) => ctx.props.vnodes
} }
}, },
watch: {
'CreateData.CtnList': {
handler(nval, oval) {
if (nval && nval.length > 0) {
let str = ''
let str1 = ''
nval.forEach(item => {
if (item.ctnnum > 0) {
str += item.ctnall + '*' + ' ' + item.ctnnum + ' '
}
})
this.ctnListCopy.forEach(ite => {
nval.forEach(item => {
if (item.ctnall === ite.ctnall) {
if (item.ctnnum < ite.ctnnum) {
const num = ite.ctnnum - item.ctnnum
str1 += item.ctnall + '*' + ' ' + num + ' '
}
}
})
})
this.boxTotal = str
this.boxRemaining = str1
} else {
this.boxTotal = ''
this.boxRemaining = ''
}
},
deep: true
}
},
data() { data() {
return { return {
SlotVisible: false, SlotVisible: false,
boxTotal: '',
boxRemaining: '',
ctnListCopy: [],
formItemLayout: { formItemLayout: {
labelCol1: { span: 6 }, labelCol1: { span: 6 },
wrapperCol1: { span: 18 }, wrapperCol1: { span: 18 },
@ -293,7 +343,8 @@ export default {
saleId: '', saleId: '',
opId: '', opId: '',
docId: '', docId: '',
custserviceId: '' custserviceId: '',
CtnList: []
}, },
CustomerList: [], CustomerList: [],
UserList: [], UserList: [],
@ -347,6 +398,21 @@ export default {
projectList.push(item.serviceProjectCode) projectList.push(item.serviceProjectCode)
} }
}) })
if (this.CreateData.CtnList.length > 0) {
const arr = []
this.CreateData.CtnList.forEach(item => {
if (item.ctnnum > 0) {
arr.push(1)
}
})
if (arr.length === 0) {
this.$message.error('至少选择1个箱子')
return false
}
} else {
this.$message.error('至少选择1个箱子')
return false
}
const ApiData = { const ApiData = {
slotId: this.slotEdit.id, slotId: this.slotEdit.id,
projectList, projectList,
@ -396,6 +462,17 @@ export default {
getAvailableCtnsBySlot({ slotId: row.id }).then(res => { getAvailableCtnsBySlot({ slotId: row.id }).then(res => {
if (res.success) { if (res.success) {
this.slotEdit = row this.slotEdit = row
if (res.data.length > 0) {
res.data.forEach(item => {
item.maxnum = item.ctnnum
})
this.$set(this.CreateData, 'CtnList', res.data)
this.ctnListCopy = JSON.parse(JSON.stringify(res.data))
} else {
this.$message.error('可用箱子为空,请选择其它舱位生成订舱')
this.$set(this.CreateData, 'CtnList', [])
}
this.$forceUpdate()
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }
@ -654,4 +731,26 @@ export default {
/deep/ .ant-form-item { /deep/ .ant-form-item {
margin-bottom: 0px !important; margin-bottom: 0px !important;
} }
.tear-list {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
.item {
margin-right: 20px;
margin-bottom: 10px;
display: flex;
align-items: flex-start;
.item-left {
background: #f59a23;
color: white;
text-align: center;
height: 31px;
line-height: 31px;
display: inline-block;
padding: 0 5px;
}
}
}
</style> </style>

@ -305,7 +305,7 @@ const userAccount = [
pid: 0, pid: 0,
id: 183191, id: 183191,
meta: { meta: {
title: 'rollingNomination', title: 'RollingNomination',
show: false show: false
}, },
component: 'rollingNomination' component: 'rollingNomination'

@ -523,7 +523,11 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive hisData.secActive = secActive
} }
this.$set(this.historyData, `copy-${this.id}`, hisData) if (!this.$route.query.copyId) {
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else {
this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData)
}
} else if (this.$route.query.addNum) { } else if (this.$route.query.addNum) {
const hisData = { const hisData = {
bookingDetails: this.bookingDetails, bookingDetails: this.bookingDetails,
@ -748,8 +752,7 @@ export default {
getRouterHis() { getRouterHis() {
this.inChildLoading = true this.inChildLoading = true
const newId = this.$route.query.id ? this.$route.query.id.toString() : '' const newId = this.$route.query.id ? this.$route.query.id.toString() : ''
if ((Object.keys(this.historyData).includes(`copy-${newId}`) || Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) && if ((Object.keys(this.historyData).includes(`copy-${newId}`)) && this.$route.query.isCopy === 'true' && !this.$route.query.copyId) {
this.$route.query.isCopy === 'true') {
if (!this.$route.query.copyId) { if (!this.$route.query.copyId) {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`])) const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
this.bookingDetails = $data.bookingDetails this.bookingDetails = $data.bookingDetails
@ -759,15 +762,6 @@ export default {
this.isAdd = $data.isAdd this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey this.mainOrderActiveKey = $data.mainOrderActiveKey
} else {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
} }
this.id = this.$route.query.id this.id = this.$route.query.id
this.isCopy = this.$route.query.isCopy this.isCopy = this.$route.query.isCopy
@ -802,6 +796,48 @@ export default {
this.isLockBooking = false this.isLockBooking = false
this.getFilter() this.getFilter()
this.$forceUpdate() this.$forceUpdate()
} else if (this.$route.query.isCopy === 'true' && this.$route.query.copyId && Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
this.id = this.$route.query.id
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
setTimeout(() => {
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init(this.bookingDetails.hbList)
}
} else {
this.Showtabs = false
if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init([])
}
}
if (Object.keys(this.$refs).includes('goodsTable')) {
this.$refs.goodsTable.init()
}
}, 200)
setTimeout(() => {
const key = this.$route.fullPath
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
this.inChildLoading = false
}, 500)
this.isLockBooking = false
this.getFilter()
this.$forceUpdate()
} else if ( } else if (
Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) && Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) &&
this.$route.query.addNum this.$route.query.addNum
@ -956,6 +992,7 @@ export default {
this.$refs.basicInfo.$refs.basicFrom.clearValidate() this.$refs.basicInfo.$refs.basicFrom.clearValidate()
this.$refs.mailingInfo.$refs.mailingFrom.clearValidate() this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
this.$refs.cargoInfo.$refs.cargoFrom.clearValidate() this.$refs.cargoInfo.$refs.cargoFrom.clearValidate()
console.log(this.historyData)
}, },
init() { init() {
this.bookingDetails = JSON.parse(JSON.stringify(initDetail)) this.bookingDetails = JSON.parse(JSON.stringify(initDetail))

@ -341,11 +341,14 @@
type="vesselGangjie" type="vesselGangjie"
:disabled="BookingLockOrder['vessel'] && isLockBooking" :disabled="BookingLockOrder['vessel'] && isLockBooking"
:defaultVal="details.vessel" :defaultVal="details.vessel"
searchApi="GetVessellist" searchApi="getVesselInfoService"
:searchQuery="{ :searchQuery="{
KeyWord: '', KeyWord: '',
PortDischargeId: this.details.portdischargeid || '',
CarrierID: this.details.carrierid || 'CMA',
ETD: this.details.etd || ''
}" }"
:showLabel="['name']" :showLabel="['vessel']"
v-if="!vesselFrom" v-if="!vesselFrom"
:openSearch="true" :openSearch="true"
@change="getSelectViewRes"></selectView> @change="getSelectViewRes"></selectView>

@ -2430,14 +2430,6 @@ export default {
const moreData = [] const moreData = []
arr.map((item, index) => { arr.map((item, index) => {
this.formAllData.map((fitem, findex) => { this.formAllData.map((fitem, findex) => {
if (fitem.label === 'VESSEL') {
if (this.vesselFrom) {
fitem.type = 'select'
} else {
fitem.type = 'complete'
fitem.showLabel = 'name'
}
}
if (fitem.label === item) { if (fitem.label === item) {
nowData.push(fitem) nowData.push(fitem)
} }
@ -2463,6 +2455,14 @@ export default {
this.formMoreData = moreData this.formMoreData = moreData
} }
this.formData.map((item, index) => { this.formData.map((item, index) => {
if (item.label === 'VESSEL') {
if (this.vesselFrom) {
item.type = 'select'
} else {
item.type = 'complete'
item.showLabel = 'name'
}
}
this.$set(this.formRes, item.label, this.formRes[item.label] || '') this.$set(this.formRes, item.label, this.formRes[item.label] || '')
// select // select
if (item.type === 'select') { if (item.type === 'select') {

@ -524,11 +524,7 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive hisData.secActive = secActive
} }
if (!this.$route.query.copyId) { this.$set(this.historyData, `copy-${this.id}`, hisData)
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else {
this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData)
}
} else if (this.$route.query.addNum) { } else if (this.$route.query.addNum) {
const hisData = { const hisData = {
bookingDetails: this.bookingDetails, bookingDetails: this.bookingDetails,
@ -602,7 +598,7 @@ export default {
this.$set(this.historyData, `copy-${this.id}`, hisData) this.$set(this.historyData, `copy-${this.id}`, hisData)
} else { } else {
this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData) this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData)
console.log(this.historyData,this.$route.query.copyId) console.log(this.historyData, this.$route.query.copyId)
} }
} else if (this.$route.query.addNum) { } else if (this.$route.query.addNum) {
const hisData = { const hisData = {
@ -751,7 +747,8 @@ export default {
getRouterHis() { getRouterHis() {
this.inChildLoading = true this.inChildLoading = true
const newId = this.$route.query.id ? this.$route.query.id.toString() : '' const newId = this.$route.query.id ? this.$route.query.id.toString() : ''
if ((Object.keys(this.historyData).includes(`copy-${newId}`)) && this.$route.query.isCopy === 'true' && !this.$route.query.copyId) { if ((Object.keys(this.historyData).includes(`copy-${newId}`) || Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) &&
this.$route.query.isCopy === 'true') {
if (!this.$route.query.copyId) { if (!this.$route.query.copyId) {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`])) const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
this.bookingDetails = $data.bookingDetails this.bookingDetails = $data.bookingDetails
@ -761,6 +758,15 @@ export default {
this.isAdd = $data.isAdd this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey this.mainOrderActiveKey = $data.mainOrderActiveKey
} else {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
} }
this.id = this.$route.query.id this.id = this.$route.query.id
this.isCopy = this.$route.query.isCopy this.isCopy = this.$route.query.isCopy
@ -795,48 +801,6 @@ export default {
this.isLockBooking = false this.isLockBooking = false
this.getFilter() this.getFilter()
this.$forceUpdate() this.$forceUpdate()
} else if (this.$route.query.isCopy === 'true' && this.$route.query.copyId && Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
this.id = this.$route.query.id
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
setTimeout(() => {
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init(this.bookingDetails.hbList)
}
} else {
this.Showtabs = false
if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init([])
}
}
if (Object.keys(this.$refs).includes('goodsTable')) {
this.$refs.goodsTable.init()
}
}, 200)
setTimeout(() => {
const key = this.$route.fullPath
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
this.inChildLoading = false
}, 500)
this.isLockBooking = false
this.getFilter()
this.$forceUpdate()
} else if ( } else if (
Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) && Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) &&
this.$route.query.addNum this.$route.query.addNum
@ -991,7 +955,6 @@ export default {
this.$refs.basicInfo.$refs.basicFrom.clearValidate() this.$refs.basicInfo.$refs.basicFrom.clearValidate()
this.$refs.mailingInfo.$refs.mailingFrom.clearValidate() this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
this.$refs.cargoInfo.$refs.cargoFrom.clearValidate() this.$refs.cargoInfo.$refs.cargoFrom.clearValidate()
console.log(this.historyData)
}, },
init() { init() {
this.bookingDetails = JSON.parse(JSON.stringify(initDetail)) this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
@ -1513,6 +1476,15 @@ export default {
this.bookingDetails.etd = slots[0].etd this.bookingDetails.etd = slots[0].etd
this.bookingDetails.cntrtotal = slots[0].ctN_STAT this.bookingDetails.cntrtotal = slots[0].ctN_STAT
this.bookingDetails.startETA = slots[0].eta this.bookingDetails.startETA = slots[0].eta
this.bookingDetails.contractno = slots[0].contracT_NO
this.bookingDetails.closingdate = slots[0].cY_CUT_DATE
this.bookingDetails.closedocdate = slots[0].manifesT_CUT_DATE
this.bookingDetails.closevgmdate = slots[0].vgM_SUBMISSION_CUT_DATE
this.bookingDetails.portloadid = slots[0].portloadid
this.bookingDetails.portload = slots[0].portload
this.bookingDetails.portdischargeid = slots[0].portdischargeid
this.bookingDetails.portdischarge = slots[0].portdischarge
this.$forceUpdate() this.$forceUpdate()
this.$refs.goodsTable.refsh() this.$refs.goodsTable.refsh()
}, },

@ -558,25 +558,6 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="10"> <a-row :gutter="10">
<a-col :xs="24" :sm="9" :md="9" :lg="9" :xl="4">
<a-form-model-item
class="from-label"
label="分单操作"
:labelCol="{span:8}"
:wrapperCol="{span:16}"
has-feedback
prop="subOp">
<selectView
type="subOp"
:defaultVal="details.subOp"
searchApi="GetSysUserPage"
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes">
</selectView>
</a-form-model-item>
</a-col>
<a-col :xs="24" :sm="9" :md="9" :lg="9" :xl="7"> <a-col :xs="24" :sm="9" :md="9" :lg="9" :xl="7">
<a-form-model-item <a-form-model-item
class="from-label" class="from-label"
@ -622,6 +603,25 @@
@getInputChange="inputChange" /> @getInputChange="inputChange" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="24" :sm="9" :md="9" :lg="9" :xl="4">
<a-form-model-item
class="from-label"
label="分单操作"
:labelCol="{span:8}"
:wrapperCol="{span:16}"
has-feedback
prop="subOp">
<selectView
type="subOp"
:defaultVal="details.subOp"
searchApi="GetSysUserPage"
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes">
</selectView>
</a-form-model-item>
</a-col>
</a-row> </a-row>
</div> </div>
</a-form-model> </a-form-model>

@ -2246,7 +2246,6 @@ export default {
} }
}); });
} }
this.cabinSpaceFlag = false this.cabinSpaceFlag = false
}, },
handlePushBC() { handlePushBC() {

@ -26,18 +26,7 @@
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
<a-form-item label="装货港"> <a-form-item label="装货港">
<a-select <a-input v-model="form.PORTLOAD" allow-clear placeholder="请输入装货港" />
v-model="form.PORTLOADID"
show-search
:filter-option="false"
style="width: 100%"
@focus="getSelectFirst"
placeholder="请选择装货港"
@search="handleSearch">
<a-spin v-if="fetching" slot="notFoundContent" size="small" />
<a-select-option v-for="(item, index) in portloadidInitList" :key="index" :value="item.ediCode">{{
item.enName }}</a-select-option>
</a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
@ -54,8 +43,8 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
<a-form-item label="箱型箱量"> <a-form-item label="箱型">
<a-select mode="multiple" v-model="form.ctN_STAT" style="width: 100%" placeholder="请选择箱型箱量"> <a-select mode="multiple" v-model="form.ctN_STAT" style="width: 100%" placeholder="请选择箱型">
<a-select-option v-for="(item, index) in ctnallList" :key="index" :value="item.code">{{ item.name <a-select-option v-for="(item, index) in ctnallList" :key="index" :value="item.code">{{ item.name
}}</a-select-option> }}</a-select-option>
</a-select> </a-select>
@ -73,19 +62,7 @@
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
<a-form-item label="卸货港"> <a-form-item label="卸货港">
<a-select <a-input v-model="form.PORTDISCHARGE" allow-clear placeholder="请输入卸货港" />
v-model="form.PORTDISCHARGEID"
show-search
:filter-option="false"
:not-found-content="fetching ? undefined : null"
style="width: 100%"
@focus="getSelectFirst"
placeholder="请选择卸货港"
@search="handleSearch1">
<a-spin v-if="fetching" slot="notFoundContent" size="small" />
<a-select-option v-for="(item, index) in portdischargeidInitList" :key="index" :value="item.ediCode">{{
item.enName }}</a-select-option>
</a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
@ -260,19 +237,19 @@ export default {
title: '交货地', title: '交货地',
align: 'center', align: 'center',
width: '100', width: '100',
field: 'portload' field: 'placedelivery'
}, },
{ {
title: '装货港', title: '装货港',
align: 'center', align: 'center',
width: '100', width: '100',
field: 'portdischarge' field: 'portload'
}, },
{ {
title: '卸货港', title: '卸货港',
align: 'center', align: 'center',
width: '100', width: '100',
field: 'placedelivery' field: 'portdischarge'
}, },
{ {
title: '卸货港国家', title: '卸货港国家',
@ -280,12 +257,6 @@ export default {
width: '100', width: '100',
field: 'portdischargE_COUNTRY' field: 'portdischargE_COUNTRY'
}, },
{
title: 'WEEK',
align: 'center',
width: '150',
field: 'weeK_AT'
},
{ {
title: '航线', title: '航线',
align: 'center', align: 'center',
@ -388,19 +359,19 @@ export default {
title: '交货地', title: '交货地',
align: 'center', align: 'center',
width: '100', width: '100',
field: 'portload' field: 'placedelivery'
}, },
{ {
title: '装货港', title: '装货港',
align: 'center', align: 'center',
width: '100', width: '100',
field: 'portdischarge' field: 'portload'
}, },
{ {
title: '卸货港', title: '卸货港',
align: 'center', align: 'center',
width: '100', width: '100',
field: 'placedelivery' field: 'portdischarge'
}, },
{ {
title: '卸货港国家', title: '卸货港国家',
@ -408,12 +379,6 @@ export default {
width: '100', width: '100',
field: 'portdischargE_COUNTRY' field: 'portdischargE_COUNTRY'
}, },
{
title: 'WEEK',
align: 'center',
width: '150',
field: 'weeK_AT'
},
{ {
title: '航线', title: '航线',
align: 'center', align: 'center',

@ -12,7 +12,7 @@
</a-popconfirm> </a-popconfirm>
</div> </div>
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol">
<div class="title" v-if="type === 'Edit' && form.bookingSlotSaleInfoList.length > 0"></div> <div class="title" v-if="type === 'Edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0"></div>
<div v-if="type === 'Edit'"> <div v-if="type === 'Edit'">
<div <div
:class="{ 'line-bootm': index != form.bookingSlotSaleInfoList.length - 1 }" :class="{ 'line-bootm': index != form.bookingSlotSaleInfoList.length - 1 }"
@ -94,7 +94,7 @@
</a-col> </a-col>
<a-col :span="6"> <a-col :span="6">
<a-form-model-item label="卖价"> <a-form-model-item label="卖价">
<a-input-number :precision="2" v-model="item.sellinG_PRICE" size="small" /> <a-input-number style="width: 90%" :precision="2" v-model="item.sellinG_PRICE" size="small" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="6"> <a-col :span="6">
@ -260,7 +260,7 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="6"> <a-col :span="6">
<a-form-model-item label="weeKAT"> <a-form-model-item label="WEEK">
<a-input-number style="width: 100%;" :precision="0" v-model="form.weeK_AT" /> <a-input-number style="width: 100%;" :precision="0" v-model="form.weeK_AT" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@ -275,6 +275,43 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="装货港">
<a-select
v-model="form.PORTLOADID"
show-search
:filter-option="false"
style="width: 100%"
@focus="getSelectFirst"
placeholder="请选择装货港"
@change="handleChange1"
@search="handleSearch">
<a-spin v-if="fetching" slot="notFoundContent" size="small" />
<a-select-option v-for="(item, index) in portloadidInitList" :key="index" :value="item.ediCode">{{
item.enName }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="卸货港">
<a-select
v-model="form.PORTDISCHARGEID"
show-search
:filter-option="false"
:not-found-content="fetching ? undefined : null"
style="width: 100%"
@change="handleChange2"
@focus="getSelectFirst"
placeholder="请选择卸货港"
@search="handleSearch1">
<a-spin v-if="fetching" slot="notFoundContent" size="small" />
<a-select-option v-for="(item, index) in portdischargeidInitList" :key="index" :value="item.ediCode">{{
item.enName }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<div class="title">截止时间</div> <div class="title">截止时间</div>
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
@ -395,28 +432,27 @@
</div> </div>
</div> </div>
</a-card> </a-card>
<a-collapse class="collapse-box" :bordered="false" expandIconPosition="right" v-model="showKey"> <a-collapse class="collapse-box" :bordered="false" expandIconPosition="right" v-model="showKey">
<a-collapse-panel key="1"> <a-collapse-panel key="1">
<template slot="header"> <template slot="header">
<div class="title"><i class="iconfont icon-rizhi" style="margin-right: 10px;"></i><span>日志</span></div> <div class="title"><i class="iconfont icon-rizhi"></i><span>日志</span></div>
</template> </template>
<div class="cargo-info"> <div class="cargo-info">
<div class="info-header"> <div class="info-header">
<span>修改人</span> <span style="width: 40%; display: inline-block">修改人</span>
<span>修改时间</span> <span style="width: 60%; display: inline-block">修改时间</span>
</div> </div>
<div v-for="(log, lindex) in form.logList" :key="lindex"> <div v-for="(log, lindex) in form.logList" :key="lindex">
<div class="list"> <div class="list">
<span class="btn">{{ log.createdUserName }}</span> <span class="btn" style="width: 40%">{{ log.createdUserName }}</span>
<span class="btn"> <span class="btn" style="width: 60%; text-align: left" :title="log.createdTime">
{{ log.createdTime }} {{ log.createdTime }}
<!-- <span class="more"> -->
<i <i
class="iconfont icon-xia more" class="iconfont icon-xia more"
v-if="log.details.length > 0" v-if="log.details.length > 0"
:class="!log.showMore ? 'hide' : 'show'" :class="!log.showMore ? 'hide' : 'show'"
@click="showLogMore(lindex)"></i> @click="showLogMore(lindex)"></i>
<!-- </span> -->
</span> </span>
</div> </div>
<div class="more-detail" v-if="log.details.length > 0 && log.showMore"> <div class="more-detail" v-if="log.details.length > 0 && log.showMore">
@ -465,7 +501,7 @@ import { mapGetters } from 'vuex'
import events from '@/components/MultiTab/events' import events from '@/components/MultiTab/events'
import { AutoComplete } from 'ant-design-vue' import { AutoComplete } from 'ant-design-vue'
import { import {
getVesselInfoService, BookingOrderDownload, DjyCustomerSuggest, GetSysUserPage getVesselInfoService, BookingOrderDownload, DjyCustomerSuggest, GetSysUserPage, GetPortloadlist, GetPortlist
} from '@/api/modular/main/BookingLedger' } from '@/api/modular/main/BookingLedger'
import { import {
BookingSlotSave, BookingSlotDetail, BookingSlotDelete, BookingSlotGetFile BookingSlotSave, BookingSlotDetail, BookingSlotDelete, BookingSlotGetFile
@ -503,6 +539,7 @@ export default {
boxList: [], boxList: [],
CustomerList: [], CustomerList: [],
type: '', type: '',
fetching: false,
UserList1: [], UserList1: [],
UserList: [], UserList: [],
id: 0, id: 0,
@ -714,6 +751,13 @@ export default {
return '' return ''
} }
}, },
handleSearch(e) {
this.fetching = true
GetPortloadlist({ KeyWord: e }).then(res => {
this.portloadidInitList = res.data
this.fetching = false
})
},
SearchCustomer(e) { SearchCustomer(e) {
DjyCustomerSuggest({ keyword: e }).then(res => { DjyCustomerSuggest({ keyword: e }).then(res => {
this.CustomerList = res.data.rows this.CustomerList = res.data.rows
@ -784,7 +828,7 @@ export default {
}, },
handleDelete() { handleDelete() {
this.loading = true this.loading = true
BookingSlotDelete({ id: this.id }).then(res => { BookingSlotDelete(this.id).then(res => {
if (res.success) { if (res.success) {
this.$router.push({ this.$router.push({
name: 'CabinManagement' name: 'CabinManagement'
@ -796,6 +840,13 @@ export default {
this.loading = false this.loading = false
}) })
}, },
getSelectFirst() {
if (!this.firstFlag) {
this.portloadidInitList = this.bookingInitData.portloadidInitList
this.portdischargeidInitList = this.bookingInitData.portdischargeidInitList
this.firstFlag = true
}
},
ChangeUser(e, Tname, type, index) { ChangeUser(e, Tname, type, index) {
if (e) { if (e) {
if (type === 0) { if (type === 0) {
@ -822,6 +873,20 @@ export default {
} }
this.$forceUpdate() this.$forceUpdate()
}, },
handleChange1(val) {
this.portloadidInitList.forEach(item => {
if (item.ediCode === val) {
this.form.PORTLOAD = item.enName
}
})
},
handleChange2(val) {
this.portdischargeidInitList.forEach(item => {
if (item.ediCode === val) {
this.form.PORTDISCHARGE = item.enName
}
})
},
handleSave() { handleSave() {
if (this.form.bookinG_SLOT_TYPE === 'CONTRACT_ORDER') { if (this.form.bookinG_SLOT_TYPE === 'CONTRACT_ORDER') {
this.form.bookinG_SLOT_TYPE_NAME = '合约订舱' this.form.bookinG_SLOT_TYPE_NAME = '合约订舱'
@ -844,11 +909,13 @@ export default {
} }
this.form.ctN_STAT = this.boxTotal this.form.ctN_STAT = this.boxTotal
this.loading = true this.loading = true
for (let i = 0; i < this.form.bookingSlotSaleInfoList.length; i++) { if (this.form.bookingSlotSaleInfoList && this.form.bookingSlotSaleInfoList.length > 0) {
this.form.bookingSlotSaleInfoList[i].updateFlag = false for (let i = 0; i < this.form.bookingSlotSaleInfoList.length; i++) {
const change = this.compareObjects(this.form.bookingSlotSaleInfoList[i], this.oldBook[i]) this.form.bookingSlotSaleInfoList[i].updateFlag = false
if (Object.keys(change).length > 0) { const change = this.compareObjects(this.form.bookingSlotSaleInfoList[i], this.oldBook[i])
this.form.bookingSlotSaleInfoList[i].updateFlag = true if (Object.keys(change).length > 0) {
this.form.bookingSlotSaleInfoList[i].updateFlag = true
}
} }
} }
BookingSlotSave(this.form).then(res => { BookingSlotSave(this.form).then(res => {
@ -920,6 +987,19 @@ export default {
} }
return differences; return differences;
}, },
handleSearch1(e) {
this.fetching = true
GetPortlist({ KeyWord: e }).then(res => {
const uniqueArray = res.data.reduce((accumulator, currentValue) => {
if (accumulator.findIndex(obj => obj.ediCode === currentValue.ediCode) === -1) {
accumulator.push(currentValue);
}
return accumulator;
}, []);
this.portdischargeidInitList = uniqueArray
this.fetching = false
})
},
getWeek(dateTime) { getWeek(dateTime) {
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
const temp_ms = new Date(dateTime).getTime() const temp_ms = new Date(dateTime).getTime()
@ -1187,121 +1267,170 @@ export default {
} }
.collapse-box { .collapse-box {
background: #fff; background: #fff;
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
border: none;
.title {
border: none; border: none;
} .title {
border: none;
.cargo-info { }
max-height: 800px; .cargo-info {
overflow: scroll; max-height: 1015px;
overflow-x: scroll;
.info-header { .info-header {
display: flex; display: flex;
background: #f4f4f4; background: #f4f4f4;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
text-align: center; text-align: center;
span {
span { display: inline-block;
display: inline-block; border: 1px solid #eee;
border: 1px solid #eee; &:nth-of-type(1) {
flex: 1; border-right: none;
}
&:nth-of-type(1) {
border-right: none;
} }
} }
} .list {
display: flex;
.list { background: #fff;
display: flex; min-height: 30px;
background: #fff; // line-height: 40px;
height: 40px; text-align: center;
line-height: 40px; .btn {
text-align: center; display: inline-block;
// flex: 1;
.btn { border: 1px solid #eee;
display: inline-block; border-top: none;
flex: 1; padding: 0 8px;
border: 1px solid #eee; font-size: 12px;
border-top: none; overflow: hidden;
padding: 0 8px; &:nth-of-type(1) {
overflow: hidden; padding: 0 2px;
border-right: none;
&:nth-of-type(1) { line-height: 30px;
padding: 0 19px; }
border-right: none; &:nth-of-type(2) {
padding-right: 5px;
position: relative;
line-height: 30px;
}
} }
.more {
&:nth-of-type(2) { width: 30px;
padding-right: 30px; text-align: center;
position: relative; transition: 0.5s all;
position: absolute;
top: 0;
right: 4px;
color: #999;
&.show {
transform: rotate(180deg);
}
} }
} }
.more-detail {
.more { border-left: 1px solid #eee;
width: 30px; border-right: 1px solid #eee;
text-align: center; border-bottom: 1px solid #eee;
transition: 0.5s all; background: #f4f4f4;
position: absolute; padding: 0 14px;
top: 0; .detail-single {
right: 4px; border-bottom: 1px dashed #ccc;
color: #999; font-size: 12px;
color: #999;
&.show { padding: 4px 0;
transform: rotate(180deg); &:nth-last-of-type(1) {
border: none;
}
.old {
// height: 26px;
line-height: 26px;
color: #666;
}
.new {
// height: 26px;
line-height: 26px;
color: #f9a629;
}
.o-title {
font-size: 12px;
font-weight: 600;
margin-right: 8px;
}
.line {
height: 26px;
line-height: 26px;
}
} }
} }
} }
}
/*日志加滚动条 */
::-webkit-scrollbar {
width: 5px;
height: 10px;
}
// ::-webkit-scrollbar:hover {
// width: 6px;
// height: 10px;
// }
.more-detail { //
border-left: 1px solid #eee; ::-webkit-scrollbar-button {
border-right: 1px solid #eee; display: none;
border-bottom: 1px solid #eee; background-color: transparent;
background: #f4f4f4; width: 100px;
padding: 0 14px; height: 10px;
}
.detail-single { //
border-bottom: 1px dashed #ccc; ::-webkit-scrollbar-thumb {
font-size: 12px; background: #aaa;
color: #999; border: 0px none #ffffff;
padding: 4px 0; border-radius: 50px;
}
&:nth-last-of-type(1) { // hover
border: none;
}
.old { // ::-webkit-scrollbar-thumb:hover {
// height: 26px; // background: #2b6cb0;
line-height: 26px; // }
color: #666;
}
.new { //
// height: 26px; ::-webkit-scrollbar-thumb:active {
line-height: 26px; background: #aaa;
color: #f9a629; }
}
.o-title { //
font-size: 12px; ::-webkit-scrollbar-track {
font-weight: 600; background: transparent;
margin-right: 8px; border: 0px none #ffffff;
} border-radius: 50px;
}
.line { // ::-webkit-scrollbar-track:hover {
height: 26px; // background: #666666;
line-height: 26px; // }
}
} ::-webkit-scrollbar-track:active {
} background: #fff;
}
// -
::-webkit-scrollbar-track-piece {
background: transparent;
}
//
::-webkit-scrollbar-corner {
background: transparent;
}
//
::-webkit-resizer {
background-color: transparent;
} }
}
.line-bootm { .line-bootm {
border-bottom: 1px dashed #cccbcb; border-bottom: 1px dashed #cccbcb;

@ -155,8 +155,8 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
<a-form-item label="箱型箱量"> <a-form-item label="箱型">
<a-select mode="multiple" allowClear v-model="form.ctN_STAT" style="width: 100%" placeholder="请选择箱型箱量"> <a-select mode="multiple" allowClear v-model="form.ctN_STAT" style="width: 100%" placeholder="请选择箱型">
<a-select-option v-for="(item, index) in ctnallList" :key="index" :value="item.code">{{ item.name <a-select-option v-for="(item, index) in ctnallList" :key="index" :value="item.code">{{ item.name
}}</a-select-option> }}</a-select-option>
</a-select> </a-select>
@ -164,12 +164,7 @@
</a-col> </a-col>
<a-col :span="4"> <a-col :span="4">
<a-form-item label="标签"> <a-form-item label="标签">
<a-select <a-select mode="multiple" style="width: 100%" :filter-option="filterOption" v-model="form.labelIdArray">
mode="multiple"
style="width: 100%"
:filter-option="filterOption"
v-model="form.labelIdArray"
>
<a-select-option v-for="(item, i) in labelList" :key="i" :value="item.id"> <a-select-option v-for="(item, i) in labelList" :key="i" :value="item.id">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
@ -184,16 +179,18 @@
<div style="margin-bottom: 10px;display: flex;justify-content: space-between;"> <div style="margin-bottom: 10px;display: flex;justify-content: space-between;">
<div> <div>
<a-button type="primary" @click="handleAdd"></a-button> <a-button type="primary" @click="handleAdd"></a-button>
<a-button type="danger" @click="handleDeleteAll"></a-button>
<a-button type="primary" style="margin-left: 50px;" @click="handleLabel"></a-button>
<a-upload <a-upload
:customRequest="customRequest" :customRequest="customRequest"
:multiple="false" :multiple="false"
style="margin-left: 50px;"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
:showUploadList="false" :showUploadList="false"
name="file"> name="file">
<a-button type="primary">导入</a-button> <a-button type="primary">导入</a-button>
</a-upload> </a-upload>
<a-button type="danger">作废</a-button> <a-button type="danger" @click="handleSuport" :loading="loadingExport">导出</a-button>
<a-button type="primary" style="margin-left: 100px;" @click="handleLabel"></a-button>
<!-- <a-button type="primary" @click="handleSendAll"></a-button> --> <!-- <a-button type="primary" @click="handleSendAll"></a-button> -->
</div> </div>
<div> <div>
@ -244,6 +241,24 @@
<template #eta="{ row }"> <template #eta="{ row }">
<span>{{ row.eta ? row.eta.substring(0, 10) : '' }}</span> <span>{{ row.eta ? row.eta.substring(0, 10) : '' }}</span>
</template> </template>
<template #remark="{ row }">
<a-spin :spinning="row.dzmarkLoading">
<div style="display: flex; align-items: center">
<a-input
@blur="getBlurMark(row, 'isRemark')"
@focus="getFocusMark(row, 'isRemark')"
style="margin-top: 0px"
v-model="row.remark">
</a-input>
<a-icon
v-show="row.isRemark"
style="cursor: pointer; margin-left: 5px; color: #36cfc9"
@mousedown.native="handleSaveMark(row, 1)"
type="check-circle"
theme="filled" />
</div>
</a-spin>
</template>
<template #iS_CANCELLATION="{ row }"> <template #iS_CANCELLATION="{ row }">
<a-icon <a-icon
type="bulb" type="bulb"
@ -272,12 +287,7 @@
</a-card> </a-card>
<a-modal width="800px" @ok="handleSubmitLabel" v-model="visible" title="分配标签" @cancel="visible = false"> <a-modal width="800px" @ok="handleSubmitLabel" v-model="visible" title="分配标签" @cancel="visible = false">
<a-spin :spinning="labelLoad"> <a-spin :spinning="labelLoad">
<a-select <a-select mode="multiple" style="width: 80%" :filter-option="filterOption" v-model="labelIdArray">
mode="multiple"
style="width: 100%"
:filter-option="filterOption"
v-model="labelIdArray"
>
<a-select-option v-for="(item, i) in labelList" :key="i" :value="item.id"> <a-select-option v-for="(item, i) in labelList" :key="i" :value="item.id">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
@ -295,7 +305,9 @@ import {
CreateBooking0rder, CreateBooking0rder,
slotSendEmail, slotSendEmail,
BookingLabelList, BookingLabelList,
BookingLabelBind BookingLabelBind,
SaveDataInList,
PrintOrder
} from '@/api/modular/main/CompanySiteaccount' } from '@/api/modular/main/CompanySiteaccount'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { import {
@ -327,6 +339,7 @@ export default {
}, },
loading: false, loading: false,
labelList: [], labelList: [],
loadingExport: false,
setVisible: false, setVisible: false,
labelIdArray: [], labelIdArray: [],
CreateData: { CreateData: {
@ -421,7 +434,6 @@ export default {
align: 'center', align: 'center',
width: '100', width: '100',
field: 'etd', field: 'etd',
sortable: true,
slots: { default: 'etd' } slots: { default: 'etd' }
}, },
{ {
@ -429,7 +441,6 @@ export default {
align: 'center', align: 'center',
width: '100', width: '100',
field: 'eta', field: 'eta',
sortable: true,
slots: { default: 'eta' } slots: { default: 'eta' }
}, },
{ {
@ -482,13 +493,13 @@ export default {
field: 'salE_TIME' field: 'salE_TIME'
}, },
{ {
title: '货地', title: '货地',
align: 'center', align: 'center',
width: '180', width: '180',
field: 'placereceipt' field: 'placereceipt'
}, },
{ {
title: '货地', title: '货地',
align: 'center', align: 'center',
width: '180', width: '180',
field: 'placedelivery' field: 'placedelivery'
@ -505,6 +516,12 @@ export default {
width: '180', width: '180',
field: 'portdischarge' field: 'portdischarge'
}, },
{
title: '卸货港国家',
align: 'center',
width: '180',
field: 'portdischargE_COUNTRY'
},
{ {
title: '箱型箱量', title: '箱型箱量',
align: 'center', align: 'center',
@ -521,21 +538,18 @@ export default {
title: '样单截止时间', title: '样单截止时间',
align: 'center', align: 'center',
width: '150', width: '150',
sortable: true,
field: 'sI_CUT_DATE' field: 'sI_CUT_DATE'
}, },
{ {
title: 'VGM截止时间', title: 'VGM截止时间',
align: 'center', align: 'center',
width: '150', width: '150',
sortable: true,
field: 'vgM_SUBMISSION_CUT_DATE' field: 'vgM_SUBMISSION_CUT_DATE'
}, },
{ {
title: '截港时间', title: '截港时间',
align: 'center', align: 'center',
width: '150', width: '150',
sortable: true,
field: 'cY_CUT_DATE' field: 'cY_CUT_DATE'
}, },
{ {
@ -556,17 +570,9 @@ export default {
width: '100', width: '100',
field: 'lanename' field: 'lanename'
}, },
{
title: '重量(KGS)',
align: 'center',
width: '120',
sortable: true,
field: 'WEIGHKGS'
},
{ {
title: '创建日期', title: '创建日期',
align: 'center', align: 'center',
sortable: true,
width: '150', width: '150',
field: 'createdTime' field: 'createdTime'
}, },
@ -580,7 +586,6 @@ export default {
title: '更新日期', title: '更新日期',
align: 'center', align: 'center',
width: '150', width: '150',
sortable: true,
field: 'updatedTime' field: 'updatedTime'
}, },
{ {
@ -653,7 +658,8 @@ export default {
title: '备注', title: '备注',
align: 'center', align: 'center',
width: '100', width: '100',
field: 'remark' field: 'remark',
slots: { default: 'remark' }
}, },
{ {
title: '计费时间', title: '计费时间',
@ -671,7 +677,7 @@ export default {
} }
], ],
columnsAll: [ columnsAll: [
{ {
type: 'checkbox', type: 'checkbox',
width: 60, width: 60,
@ -726,7 +732,6 @@ export default {
align: 'center', align: 'center',
width: '100', width: '100',
field: 'etd', field: 'etd',
sortable: true,
slots: { default: 'etd' } slots: { default: 'etd' }
}, },
{ {
@ -734,7 +739,6 @@ export default {
align: 'center', align: 'center',
width: '100', width: '100',
field: 'eta', field: 'eta',
sortable: true,
slots: { default: 'eta' } slots: { default: 'eta' }
}, },
{ {
@ -787,13 +791,13 @@ export default {
field: 'salE_TIME' field: 'salE_TIME'
}, },
{ {
title: '货地', title: '货地',
align: 'center', align: 'center',
width: '180', width: '180',
field: 'placereceipt' field: 'placereceipt'
}, },
{ {
title: '货地', title: '货地',
align: 'center', align: 'center',
width: '180', width: '180',
field: 'placedelivery' field: 'placedelivery'
@ -810,6 +814,12 @@ export default {
width: '180', width: '180',
field: 'portdischarge' field: 'portdischarge'
}, },
{
title: '卸货港国家',
align: 'center',
width: '180',
field: 'portdischargE_COUNTRY'
},
{ {
title: '箱型箱量', title: '箱型箱量',
align: 'center', align: 'center',
@ -826,21 +836,18 @@ export default {
title: '样单截止时间', title: '样单截止时间',
align: 'center', align: 'center',
width: '150', width: '150',
sortable: true,
field: 'sI_CUT_DATE' field: 'sI_CUT_DATE'
}, },
{ {
title: 'VGM截止时间', title: 'VGM截止时间',
align: 'center', align: 'center',
width: '150', width: '150',
sortable: true,
field: 'vgM_SUBMISSION_CUT_DATE' field: 'vgM_SUBMISSION_CUT_DATE'
}, },
{ {
title: '截港时间', title: '截港时间',
align: 'center', align: 'center',
width: '150', width: '150',
sortable: true,
field: 'cY_CUT_DATE' field: 'cY_CUT_DATE'
}, },
{ {
@ -861,17 +868,9 @@ export default {
width: '100', width: '100',
field: 'lanename' field: 'lanename'
}, },
{
title: '重量(KGS)',
align: 'center',
width: '120',
sortable: true,
field: 'WEIGHKGS'
},
{ {
title: '创建日期', title: '创建日期',
align: 'center', align: 'center',
sortable: true,
width: '150', width: '150',
field: 'createdTime' field: 'createdTime'
}, },
@ -885,7 +884,6 @@ export default {
title: '更新日期', title: '更新日期',
align: 'center', align: 'center',
width: '150', width: '150',
sortable: true,
field: 'updatedTime' field: 'updatedTime'
}, },
{ {
@ -958,7 +956,8 @@ export default {
title: '备注', title: '备注',
align: 'center', align: 'center',
width: '100', width: '100',
field: 'remark' field: 'remark',
slots: { default: 'remark' }
}, },
{ {
title: '计费时间', title: '计费时间',
@ -995,8 +994,8 @@ export default {
mounted() { mounted() {
this.getConfigStart() this.getConfigStart()
BookingLabelList({ scope: 1 }).then(res => { BookingLabelList({ scope: 1 }).then(res => {
this.labelList = res.data this.labelList = res.data
}) })
}, },
methods: { methods: {
FnTurnD(data) { FnTurnD(data) {
@ -1008,6 +1007,23 @@ export default {
}) })
return Rdata return Rdata
}, },
handleSuport() {
if (this.form.ctN_STAT) {
this.form.ctN_STAT = this.form.ctN_STAT.join(',')
}
this.loadingExport = true
PrintOrder(this.form).then(res => {
if (res.success) {
window.open(
` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/downloadPrint?filename=${res.data}`,
'_blank'
)
} else {
this.$message.error(res.message)
}
this.loadingExport = false
})
},
expandVisibleMethod({ row }) { expandVisibleMethod({ row }) {
if (row.bookingSlotSaleInfoList && row.bookingSlotSaleInfoList.length > 0) { if (row.bookingSlotSaleInfoList && row.bookingSlotSaleInfoList.length > 0) {
return true return true
@ -1041,12 +1057,26 @@ export default {
formData.append('file', data.file) formData.append('file', data.file)
this.loading = true this.loading = true
ImportSlotFromFile(formData, (percent) => this.setUploadProcess(percent)).then((res) => { ImportSlotFromFile(formData, (percent) => this.setUploadProcess(percent)).then((res) => {
if (res.data.succ) { this.$notification.open({
this.$message.success('上传成功') message: '批量导入',
description: (
<div>
{res.data.ext.map((item) => {
if (item.isSuccess) {
return <div>{item.slotBookingNo} 成功 </div>
} else {
return (
<div style={{ color: 'red' }} >
{item.slotBookingNo} 失败 {item.failReason}
</div>
)
}
})}
</div>
),
duration: 5
})
this.getList() this.getList()
} else {
this.$message.error('上传失败:' + res.data.msg)
}
}) })
}, },
checkboxChangeEvent() { checkboxChangeEvent() {
@ -1063,7 +1093,7 @@ export default {
const pkIdArr = select.map((item, index) => { const pkIdArr = select.map((item, index) => {
return item.id return item.id
}) })
if (pkIdArr.length == 0) { if (pkIdArr.length === 0) {
this.$message.error('请选择要发送的记录') this.$message.error('请选择要发送的记录')
return false return false
} }
@ -1075,26 +1105,61 @@ export default {
} }
}) })
}, },
handleDeleteAll() {
const select = this.$refs.table.getCheckboxRecords()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length === 0) {
this.$message.error('请选择要删除的记录')
return false
}
BookingSlotDelete(pkIdArr.join(',')).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.message)
}
})
},
spanMethod({ row, _rowIndex, column, visibleData }) { spanMethod({ row, _rowIndex, column, visibleData }) {
const arr = ['salE_TIME', 'sellinG_PRICE', 'goodsname', 'shipper', 'sale', 'custservice', 'customername'] const arr = ['salE_TIME', 'sellinG_PRICE', 'goodsname', 'shipper', 'sale', 'custservice', 'customername']
const fields = [];
const cellValue = row[column.property];
if ((!arr.includes(column.property)) || column.type === 'checkbox' || column.field === 'caozuo') { if ((!arr.includes(column.property)) || column.type === 'checkbox' || column.field === 'caozuo') {
const prevRow = visibleData[_rowIndex - 1]; const prevRow = visibleData[_rowIndex - 1];
let nextRow = visibleData[_rowIndex + 1]; let nextRow = visibleData[_rowIndex + 1];
if (prevRow && prevRow.id === row.id) { if (prevRow && prevRow.id === row.id) {
return { rowspan: 0, colspan: 0 }; return { rowspan: 0, colspan: 0 };
} else { } else {
let countRowspan = 1; let countRowspan = 1;
while (nextRow && nextRow.id === row.id) { while (nextRow && nextRow.id === row.id) {
nextRow = visibleData[++countRowspan + _rowIndex]; nextRow = visibleData[++countRowspan + _rowIndex];
} }
if (countRowspan > 1) { if (countRowspan > 1) {
return { rowspan: countRowspan, colspan: 1 }; return { rowspan: countRowspan, colspan: 1 };
} }
} }
} }
}, },
handleSaveMark(row, type) {
const data = {
slotBase: {
Id: row.id
}
}
if (type === 1) {
row.dzmarkLoading = true
data.slotBase.Remark = row.remark
}
SaveDataInList(data).then((res) => {
if (res.success) {
this.$message.success('修改成功')
} else {
this.$message.error(res.message)
}
row.dzmarkLoading = false
})
},
handleOpenSlot(row) { handleOpenSlot(row) {
this.$refs.generation.init(row) this.$refs.generation.init(row)
}, },
@ -1121,6 +1186,7 @@ export default {
return false return false
} }
this.visible = true this.visible = true
this.labelIdArray = []
this.labelLoad = true this.labelLoad = true
BookingLabelList({ scope: 1 }).then(res => { BookingLabelList({ scope: 1 }).then(res => {
this.labelList = res.data this.labelList = res.data
@ -1168,12 +1234,16 @@ export default {
arr[i].bookingSlotSaleInfoList.forEach(ite => { arr[i].bookingSlotSaleInfoList.forEach(ite => {
const data = JSON.parse(JSON.stringify(arr[i])) const data = JSON.parse(JSON.stringify(arr[i]))
delete data.bookingSlotSaleInfoList delete data.bookingSlotSaleInfoList
data.isRemark = true
data.dzmarkLoading = false
arr.push({ arr.push({
...ite, ...data ...ite, ...data
}) })
}) })
arr.splice(i, 1) arr.splice(i, 1)
} }
arr[i].isRemark = true
arr[i].dzmarkLoading = false
} }
this.loadData = arr this.loadData = arr
console.log(arr) console.log(arr)
@ -1194,7 +1264,7 @@ export default {
this.DjyWebsiteAccountConfigDeleteTenant(data) this.DjyWebsiteAccountConfigDeleteTenant(data)
}, },
DjyWebsiteAccountConfigDeleteTenant(record) { DjyWebsiteAccountConfigDeleteTenant(record) {
BookingSlotDelete(record).then(res => { BookingSlotDelete(record.id).then(res => {
if (res.success) { if (res.success) {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
@ -1210,6 +1280,12 @@ export default {
} }
}) })
}, },
getFocusMark(row, file) {
row[file] = true
},
getBlurMark(row, file) {
row[file] = false
},
handleOk1() { handleOk1() {
const projectList = [] const projectList = []
this.bookingServiceItem.forEach(item => { this.bookingServiceItem.forEach(item => {

@ -55,7 +55,7 @@
</div> </div>
<div class="main-title"> <div class="main-title">
<img src="../../../../assets/icons/u1224.svg" alt="">Rolling Plan <img src="../../../../assets/icons/u1224.svg" alt="">Rolling Plan
<span style="margin-left: 30px;background: yellow;padding: 0 5px;">before {{ confirmDeadLine }}</span> <span style="margin-left: 30px;background: yellow;padding: 0 5px;">Before {{ confirmDeadLine }}</span>
</div> </div>
<div class="plan"> <div class="plan">
<div v-for="(item, index) in rollingPlanList" :key="index" style="margin-bottom: 5px;"> <div v-for="(item, index) in rollingPlanList" :key="index" style="margin-bottom: 5px;">
@ -923,9 +923,11 @@ export default {
Promise.all([request1, request2]) Promise.all([request1, request2])
.then(([res1, res2]) => { .then(([res1, res2]) => {
if (res1.success) { if (res1.success) {
this.tempList = res1.data;
if (res1.data.length > 0) { if (res1.data.length > 0) {
this.templateId = res1.data[0].id; this.templateId = res1.data[0].id;
this.tempList = res1.data;
} else {
this.tempList = []
} }
} else { } else {
this.$message.error(res1.message); this.$message.error(res1.message);
@ -938,12 +940,13 @@ export default {
this.toShipPKId = res2.data.ext[0].toShipList[0].pkId; this.toShipPKId = res2.data.ext[0].toShipList[0].pkId;
} }
} else { } else {
this.sendShip = {}; this.sendShip = { fromShip: {}, toShipList: [] }
} }
} else { } else {
this.$message.error(res2.data.msg); this.$message.error(res2.data.msg);
} }
const data1 = { if (this.templateId && this.sendShip.fromShip.pkId && this.toShipPKId) {
const data1 = {
taskId: this.$route.query.taskPKId, taskId: this.$route.query.taskPKId,
templateId: this.templateId, templateId: this.templateId,
fromShipPKId: this.sendShip.fromShip.pkId, fromShipPKId: this.sendShip.fromShip.pkId,
@ -957,6 +960,9 @@ export default {
this.$message.error(res.data.msg) this.$message.error(res.data.msg)
} }
}) })
} else {
this.sendLoad = false;
}
}) })
.catch(error => { .catch(error => {
console.error('Error fetching data:', error); console.error('Error fetching data:', error);
@ -1305,7 +1311,7 @@ export default {
}) })
}, },
handleRefsh() { handleRefsh() {
RefreshBookingorder({ nominationId: this.$route.query.taskPKId }).then(res => { RefreshBookingorder({ taskPkId: this.$route.query.taskPKId }).then(res => {
if (res.data.succ) { if (res.data.succ) {
this.$message.success('操作成功') this.$message.success('操作成功')
} else { } else {

@ -392,6 +392,8 @@ export default {
portTransitId: record.portTransitId, portTransitId: record.portTransitId,
portDischargeId: record.portDischargeId, portDischargeId: record.portDischargeId,
portTransit: record.portTransit, portTransit: record.portTransit,
portLoadingId: '',
portLoading: '',
portDischarge: record.portDischarge, portDischarge: record.portDischarge,
etd: record.etd, etd: record.etd,
closingDate: record.closingDate, closingDate: record.closingDate,

@ -4,7 +4,6 @@
:width="1100" :width="1100"
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel" @cancel="handleCancel"
> >
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
@ -227,6 +226,11 @@
</a-row> </a-row>
</a-form> </a-form>
</a-spin> </a-spin>
<template slot="footer">
<a-button type="danger" @click="handleCancel"></a-button>
<a-button type="primary" @click="handleCopySave"></a-button>
<a-button type="primary" @click="handleSubmit"></a-button>
</template>
</a-modal> </a-modal>
</template> </template>
@ -304,6 +308,103 @@ export default {
console.log(this.form.getFieldsValue()) console.log(this.form.getFieldsValue())
}, 100) }, 100)
}, },
handleCopySave() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
for (const key in values) {
console.log(key, 1)
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
if (!values.carrier) {
values.carrier = this.data.carrier
}
values.id = this.data.id
if (this.portLoadingData.length) {
this.portLoadingData.forEach(item => {
if (item.code == values.portLoadingId) {
values.portLoading = item.enName
}
})
}
if (this.portTransitData.length) {
this.portTransitData.forEach(item => {
if (item.code == values.portTransitId) {
values.portTransit = item.enName
}
})
}
if (this.portDischargeData.length) {
this.portDischargeData.forEach(item => {
if (item.code == values.portDischargeId) {
values.portDischarge = item.enName
}
})
}
if (this.carrierData.length) {
this.carrierData.forEach(item => {
if (item.code == values.carrierid) {
values.carrier = item.cnName
}
})
}
if (this.yardData.length) {
this.yardData.forEach(item => {
if (item.code == values.yardCode) {
values.yard = item.name
}
})
}
DjyVesselInfoServiceAddOrUpdate(values)
.then(res => {
if (res.success) {
this.$message.success('编辑成功')
this.confirmLoading = false
this.$emit('ok', values)
this.editRow(values)
} else {
this.$message.error(`编辑失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
editRow(record) {
this.data = record
setTimeout(() => {
this.form.setFieldsValue({
vessel: record.vessel,
voyno: record.voyno,
portTransitId: record.portTransitId,
portDischargeId: record.portDischargeId,
portTransit: record.portTransit,
portLoadingId: '',
portLoading: '',
portDischarge: record.portDischarge,
etd: record.etd,
closingDate: record.closingDate,
eta: record.eta,
yard: record.yard,
ygtETD: record.ygtETD,
yardCode: record.yardCode,
atd: record.atd,
carrierid: record.carrierid,
voynoInside: record.voynoInside,
closeDocTime: record.closeDocTime
})
}, 100)
},
// tenantSearch(data) { // tenantSearch(data) {
// SysTenantPage({ Name: data }).then(res => { // SysTenantPage({ Name: data }).then(res => {
// this.tenantData = res.data.rows // this.tenantData = res.data.rows

Loading…
Cancel
Save