分单保存

szh_zidingyibiaoti
lilu 2 years ago
parent af28ed2f5f
commit ec296bb426

@ -370,12 +370,15 @@ export default {
},
hasTableRules: false,
inSave: false,
sedOrderList: JSON.parse(JSON.stringify(this.parSedOrderList)) || []
sedOrderList: JSON.parse(JSON.stringify(this.parSedOrderList)) || [],
// inLoading: false
}
},
watch: {
parSedOrderList: {
handler(nval, oval) {
// this.inLoading = true
this.inSecLoad = true
const _data = JSON.parse(JSON.stringify(nval))
if (_data.length > 0) {
if (!_data[this.editIndex].bookingEDIExt) {
@ -387,12 +390,14 @@ export default {
}
}
this.editDetails = _data[this.editIndex]
this.inSecLoad = true
setTimeout(() => {
this.inSecLoad = false
}, 200)
}, 1500)
} else {
this.editDetails = null
setTimeout(() => {
this.inSecLoad = false
}, 1500)
}
},
deep: true
@ -426,7 +431,7 @@ export default {
},
editDetails: {
handler(nval, oval) {
if (!this.inSave) {
if (!this.inSave && !this.inSecLoad) {
this.$emit('changeHB', this.sedOrderList)
}
// if (nval !== oval) {
@ -441,6 +446,7 @@ export default {
immediate: true,
handler(nD, oD) {
this.id = this.$route.query.id
this.init()
if (this.$refs.basicInfo) {
this.$refs.basicInfo.$refs.basicFrom.clearValidate()
this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
@ -455,6 +461,16 @@ export default {
}
},
created() {
this.init()
},
mounted() {
this.checkFromInit()
// setTimeout(() => {
// this.$message.destroy()
// }, 1500)
},
methods: {
init() {
if (this.parSedOrderList.length > 0) {
this.sedOrderList = JSON.parse(JSON.stringify(this.parSedOrderList))
this.sedOrderList.map((item, index) => {
@ -480,13 +496,6 @@ export default {
}, 200)
}
},
mounted() {
this.checkFromInit()
// setTimeout(() => {
// this.$message.destroy()
// }, 1500)
},
methods: {
checkFromInit() {
Object.keys(this.basicRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
@ -612,10 +621,13 @@ export default {
},
FnBookingOrderGet() {
BookingOrderGet({
id: this.id
id: this.editDetails.id
}).then(res => {
this.sedOrderList = { ...res.data.hbList }
this.editDetails = { ...res.data.hbList[this.editIndex] }
this.sedOrderList.splice(this.editIndex, 1, res.data)
// console.log(this.sedOrderList)
this.editDetails = res.data
this.$emit('changeHB', this.sedOrderList)
console.log('== 测试点1调用更新 ==', this.editDetails)
this.$forceUpdate()
})
},
@ -704,6 +716,7 @@ export default {
this.$set(this.sedOrderList[this.editIndex], 'isNoSave', false)
this.$set(this.editDetails, 'isNoSave', false)
this.$emit('changeHB', this.sedOrderList)
console.log('== 测试点3调用更新 ==', this.sedOrderList)
// console.log(`2. == , id ==${res.data} , ${this.sedOrderList[this.editIndex].isNoSave}`)
setTimeout(() => {
this.inSave = false

@ -167,6 +167,7 @@
</a-col>
<a-col :span="6" style="padding-left:8px;">
<rightContent
ref="rightContent"
:id="id"
:details="bookingDetails"
:excuteRules="excuteRules"
@ -671,7 +672,6 @@ export default {
// )
this.inChildLoading = true
const newId = this.$route.query.id
if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') {
this.id = this.$route.query.id
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
@ -1380,6 +1380,7 @@ export default {
//
refreshPage() {
this.init()
this.$refs.rightContent.init()
},
saveFun() {
if (this.id) {
@ -1483,12 +1484,13 @@ export default {
this.Showtabs = true
},
changeHBFun(data) {
const arr = data.map((item, index) => {
return item.isNoSave
const arr = []
data.map((item, index) => {
arr.push(item.isNoSave)
})
// console.log('3. === ===', arr, arr.includes(true))
if (arr.includes(true)) {
// console.log('4. == ==')
this.$set(this.bookingDetails, 'hbList', data)
this.checkSaveFun({ type: 'hbList', hasChange: true })
} else {
// console.log('4. == ==')

@ -33,9 +33,11 @@
show-search
:dropdownMatchSelectWidth="false"
:filter-option="filterOption"
optionLabelProp="label"
>
<a-select-option v-for="(customer, cindex) in customerData" :key="cindex" :value="cindex + ''">
{{ customer.shortName }}
<a-select-option v-for="(customer, cindex) in customerData" :key="cindex" :value="cindex + ''" :label="customer.shortName">
{{ customer.shortName }} / ({{ customer.codeName }})
<!-- {{ customer.shortName }} / <span style="font-size:12px;color:#999;">({{ customer.codeName }})</span> -->
</a-select-option>
</a-select>
<span
@ -1020,9 +1022,11 @@ export default {
immediate: true,
handler(nD, oD) {
this.id = this.$route.query.id
if (this.$route.name === 'BookingDetail') {
this.init()
}
}
}
},
created() {
this.init()

@ -438,9 +438,11 @@ export default {
immediate: true,
handler(nD, oD) {
this.id = this.$route.query.id
if (this.$route.name === 'BookingDetail') {
this.init()
}
}
}
},
computed: {
issuetypeDataArr() {

@ -963,7 +963,7 @@ export default {
detail: nval,
type: 'goodsTable'
})
if (this.pType === 'secOrder' && !this.inTableLoad) {
if (this.pType === 'secOrder' && !this.inTableLoad && this.$route.name === 'BookingDetail') {
this.init()
}
}

@ -167,11 +167,13 @@
</div>
<div class="more-detail" v-if="log.details.length > 0 && log.showMore">
<div class="detail-single" v-for="(child, cindex) in log.details" :key="cindex">
<template v-if="log.type != 'Trace'">
<div class="old">
<span class="o-title">{{ child.field || '字段' }} :</span>
<span class="content">{{ child.oldValue }}</span>
</div>
<div class="line">改为</div>
</template>
<div class="new">
<span class="o-title">{{ child.field || '字段' }}:</span
><span class="content">{{ child.newValue }}</span>
@ -313,7 +315,7 @@ export default {
this.fileList = []
this.remarkList = []
this.logList = []
} else {
} else if (nD.id && this.$route.name === 'BookingDetail') {
this.init()
}
}

@ -471,7 +471,6 @@ import {
BookingOrderBachUpdate,
GetCarrierlist,
DjyCustomerSuggest,
getVesselInfoService,
GetYardlist,
GetSysUserPage,
DjyCustomerpage,
@ -1024,6 +1023,7 @@ export default {
formChange(data) {
const { form, value } = data
console.log('== 表单 - 搜索更新 ==', form, value)
if (form.type === 'input') {
this.formRes[form.label] = value
} else if (form.type === 'date') {

@ -159,6 +159,10 @@ export default {
})
},
completeChange (value) {
this.$emit('change', {
form: this.labelData,
value: value || ''
})
console.log(value, this.value)
this.$emit('getCompleteList', {
form: this.labelData,

@ -63,7 +63,7 @@ export default {
{ field: 'lanename', label: 'LANENAME', width: 160, title: '航线', showHeaderOverflow: true, sortable: true },
{ field: 'servicecontractno', label: 'SERVICECONTRACTNO', width: 160, title: '客户合同号', showHeaderOverflow: true, sortable: true }, // 没有设置该字段的地方
{ field: 'bsstatusname', label: 'BSSTATUSNAME', width: 160, title: '业务状态', showHeaderOverflow: true, sortable: true },
{ field: 'bsno', label: 'BSNO', width: 160, title: '业务编号', showHeaderOverflow: true, sortable: true },
{ field: 'bookingno', label: 'BOOKINGNO', width: 160, title: '业务编号', showHeaderOverflow: true, sortable: true },
{ field: 'agentid', label: 'AGENTID', width: 160, title: '国外代理', showHeaderOverflow: true, sortable: true },
{ field: 'trucker', label: 'TRUCKER', width: 160, title: '车队', showHeaderOverflow: true, sortable: true },
{ field: 'tempset', label: 'TEMPSET', width: 160, title: '设置温度', showHeaderOverflow: true, sortable: true },
@ -120,7 +120,7 @@ export default {
{ title: '单证员', align: 'center', width: 120, label: 'DOC', type: 'complete', showLabel: 'name' },
{ title: '报关行', align: 'center', width: 120, label: 'CUSTOMSER', type: 'complete', showLabel: 'shortName' },
{ title: '订舱编号', align: 'center', width: 120, label: 'CUSTNO', type: 'input' },
{ title: '业务编号', align: 'center', width: 120, label: 'BSNO', type: 'input' },
{ title: '业务编号', align: 'center', width: 120, label: 'BOOKINGNO', type: 'input' },
{ title: '业务状态', align: 'center', width: 120, label: 'BSSTATUS', type: 'input' },
{ title: '客户合同号', align: 'center', width: 120, label: 'SERVICECONTRACTNO', type: 'input' },
{ title: '航线代码', align: 'center', width: 120, label: 'LANECODE', type: 'input' },

Loading…
Cancel
Save