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

订单编辑优化

parent e3659190
......@@ -1003,6 +1003,7 @@ export default {
},
activated(){
if(this.$route.query.id != this.form.id){
console.log("activated 加载订单数据")
this.getOrder()
}
let transportType = undefined
......@@ -1017,7 +1018,6 @@ export default {
this.updateChannel = this.$route.query.updateChannel == 1
},
async created() {
this.productAttrList = (await getProductAttrList()).data
this.channelList = (await getChannelList()).data
this.tradeCityList = (await getTradeCityList()).data
......@@ -1039,6 +1039,7 @@ export default {
this.updateChannel = true
}
if(this.$route.query.id){
console.log('created 加载订单数据')
this.getOrder()
}else{
this.addProduct()
......@@ -1053,6 +1054,10 @@ export default {
// console.warn('onTableMounted', e)
},
getOrder(){
if(this.form.orderId == this.$route.query.id){
console.log('加载中或者已加载此订单数据,不重复加载', this.initing, this.form.orderId, this.$route.query.id)
return
}
this.initing = true
getUpdateInfo(this.$route.query.id).then(res => {
this.form = Object.assign({}, {...res.data}, {orderItemVOList: []})
......@@ -1113,6 +1118,7 @@ export default {
this.form.orderItemVOList.push({...item})
})
// 已入仓后,必填字段修改则需要显示审批流
if(this.inWarehouse){
Object.keys(this.rules).forEach(field => {
console.log("watch", field)
......@@ -1129,6 +1135,9 @@ export default {
if(res.data.portDestCustomsClear){
this.$set(this.form, 'portDestCustomsClear', res.data.portDestCustomsClear)
}
if(res.data.deliveryWay){
this.$set(this.form, 'deliveryWay', res.data.deliveryWay)
}
}, 100)
this.initing = false
})
......
......@@ -30,7 +30,8 @@
disabled/>
</el-form-item>-->
<!--多条路线批量修改-->
<el-form-item :label="$t('路线')" prop="lineChannelList" v-if="lineList.length">
<template v-if="lineList.length">
<el-form-item :label="$t('路线')" prop="lineChannelList">
<template v-if="lineList.length == 1">
<el-input
v-for="(item, index) in lineList"
......@@ -63,7 +64,7 @@
<el-form-item v-if="channel" :label="$t('出货渠道')">
{{$l(channel, 'name')}}
</el-form-item>
</template>
<!--有路线则不显示路线选择器-->
<routers-selector v-else v-model="selectedRoutes" :option="routerOption" :type="type" />
......
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