Commit beacbc6c authored by dragondean@qq.com's avatar dragondean@qq.com

修复有时候自定义付款人回显异常

parent 5bef42ff
...@@ -1075,12 +1075,7 @@ export default { ...@@ -1075,12 +1075,7 @@ export default {
this.updateChannel = this.$route.query.updateChannel == 1 this.updateChannel = this.$route.query.updateChannel == 1
}, },
async created() { async created() {
this.productAttrList = (await getProductAttrList()).data // 初始化自定义付款人需要在前面,否则先执行activated里的getOrder,会被覆盖
this.channelList = (await getChannelList()).data
this.tradeCityList = (await getTradeCityList()).data
this.currencyList = (await getCurrencyList()).data
this.unitList = (await getUnitList()).data
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
this.getDictDatas(this.DICT_TYPE.ECW_CUSTOM_DRAWEE).forEach(item => { this.getDictDatas(this.DICT_TYPE.ECW_CUSTOM_DRAWEE).forEach(item => {
this.customDraweeList.push({ this.customDraweeList.push({
label: item.label, // 显示文字 label: item.label, // 显示文字
...@@ -1088,6 +1083,14 @@ export default { ...@@ -1088,6 +1083,14 @@ export default {
value: 2 // 1 发货人,2收货人,默认收货人,可修改 value: 2 // 1 发货人,2收货人,默认收货人,可修改
}) })
}) })
this.productAttrList = (await getProductAttrList()).data
this.channelList = (await getChannelList()).data
this.tradeCityList = (await getTradeCityList()).data
this.currencyList = (await getCurrencyList()).data
this.unitList = (await getUnitList()).data
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
if(this.$route.query.transportType){ if(this.$route.query.transportType){
this.$set(this.form, 'transportId', +this.$route.query.transportType) this.$set(this.form, 'transportId', +this.$route.query.transportType)
} }
...@@ -1110,11 +1113,12 @@ export default { ...@@ -1110,11 +1113,12 @@ export default {
onTableMounted(e){ onTableMounted(e){
// console.warn('onTableMounted', e) // console.warn('onTableMounted', e)
}, },
getOrder(){ async getOrder(){
if(this.form.orderId == this.$route.query.id){ if(this.form.orderId == this.$route.query.id){
console.log('加载中或者已加载此订单数据,不重复加载', this.initing, this.form.orderId, this.$route.query.id) console.log('加载中或者已加载此订单数据,不重复加载', this.initing, this.form.orderId, this.$route.query.id)
return return
} }
this.$nextTick()
this.initing = true this.initing = true
getUpdateInfo(this.$route.query.id).then(res => { getUpdateInfo(this.$route.query.id).then(res => {
this.form = Object.assign({}, {...res.data}, {orderItemVOList: []}) this.form = Object.assign({}, {...res.data}, {orderItemVOList: []})
...@@ -1168,9 +1172,12 @@ export default { ...@@ -1168,9 +1172,12 @@ export default {
// 如果是自定义付款人,则需要同步具体发货人信息 // 如果是自定义付款人,则需要同步具体发货人信息
if(this.form.drawee == 3){ if(this.form.drawee == 3){
console.log('同步自定义付款人信息', JSON.stringify(this.customDraweeList))
this.customDraweeList.forEach(item => { this.customDraweeList.forEach(item => {
console.log(item.name, this.form.customDraweeVOList.find(it => it.name == item.name)?.value , item.value)
item.value = this.form.customDraweeVOList.find(it => it.name == item.name)?.value || item.value item.value = this.form.customDraweeVOList.find(it => it.name == item.name)?.value || item.value
}) })
console.log('同步自定义付款人信息', this.customDraweeList, this.form.customDraweeVOList)
} }
// 如果已完成入仓,则需要监听必填内容,发生更改后需要填写审批表单 // 如果已完成入仓,则需要监听必填内容,发生更改后需要填写审批表单
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment