分单保存

szh_zidingyibiaoti
lilu 2 years ago
parent af28ed2f5f
commit ec296bb426

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

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

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

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

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

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

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

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

@ -63,7 +63,7 @@ export default {
{ field: 'lanename', label: 'LANENAME', width: 160, title: '航线', showHeaderOverflow: true, sortable: true }, { field: 'lanename', label: 'LANENAME', width: 160, title: '航线', showHeaderOverflow: true, sortable: true },
{ field: 'servicecontractno', label: 'SERVICECONTRACTNO', 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: '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: 'agentid', label: 'AGENTID', width: 160, title: '国外代理', showHeaderOverflow: true, sortable: true },
{ field: 'trucker', label: 'TRUCKER', 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 }, { 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: 'DOC', type: 'complete', showLabel: 'name' },
{ title: '报关行', align: 'center', width: 120, label: 'CUSTOMSER', type: 'complete', showLabel: 'shortName' }, { 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: '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: 'BSSTATUS', type: 'input' },
{ title: '客户合同号', align: 'center', width: 120, label: 'SERVICECONTRACTNO', type: 'input' }, { title: '客户合同号', align: 'center', width: 120, label: 'SERVICECONTRACTNO', type: 'input' },
{ title: '航线代码', align: 'center', width: 120, label: 'LANECODE', type: 'input' }, { title: '航线代码', align: 'center', width: 120, label: 'LANECODE', type: 'input' },

Loading…
Cancel
Save