Commit c4ff3bea authored by chuan.liu's avatar chuan.liu

配额 非配额订单数据回显

parent 9a7007d3
......@@ -49,7 +49,8 @@
</view>
</view>
</view>
<component :style="componentHeight" :is="currentTabComponent" @click="changeComponent" @submit="submit">
<component :style="componentHeight" :is="currentTabComponent" :key="currentTabComponent"
:is-keep-data='isKeepData' @click="changeComponent" @submit="submit">
</component>
</view>
</view>
......@@ -74,7 +75,8 @@
data() {
return {
currentTabComponent: 'quotaOrder',
topHeight: ''
topHeight: '',
isKeepData: false
}
},
computed: {
......@@ -144,7 +146,8 @@
return false
},
methods: {
changeComponent(com) {
changeComponent(com, status = false) {
this.isKeepData = status
this.currentTabComponent = com;
},
submit() {
......
......@@ -191,7 +191,7 @@
// this.$refs.files.upload()
},
preStep() {
this.$emit('click', 'quotaOrder')
this.$emit('click', 'quotaOrder', true)
},
...mapMutations(["$uStore"]),
}
......
......@@ -104,6 +104,12 @@
} from 'vuex'
export default {
props: {
isKeepData: {
type: Boolean,
default: false
}
},
data() {
return {
scrollTop: 0,
......@@ -186,12 +192,29 @@
ITEM
} = res
this.selectedSalesCenterArr = YXDY
if (this.isKeepData) {
const {
INFO,
ITEM: ITEM2,
} = this.noQuotaOrder
this.HEADINFO = {
...HEAD,
...INFO
}
this.planinnerLists = ITEM2
this.salesCenterIndex = YXDY.findIndex((item) => {
return this.HEADINFO.ZZFLD000001 === item.KEY
})
return
}
this.planinnerLists[0] = {
...this.planinnerLists[0],
...ITEM[0]
}
this.HEADINFO = HEAD
this.productInitInfo = ITEM[0]
// this.productInitInfo = ITEM[0]
},
async updateNoQuotaData(productIndex, mode, product) {
console.log('updateNoQuotaData---entry', productIndex, mode, product)
......
......@@ -174,7 +174,7 @@
// this.$refs.files.upload()
},
preStep() {
this.$emit('click', 'quotaOrder')
this.$emit('click', 'quotaOrder', true)
},
...mapMutations(["$uStore"]),
}
......
......@@ -168,6 +168,12 @@
} from 'vuex'
export default {
props: {
isKeepData: {
type: Boolean,
default: false
}
},
data() {
return {
scrollTop: 0,
......@@ -204,6 +210,16 @@
return money
}
},
// watch: {
// 'isKeepData': {
// handler(val) {
// if (val === false) {
// this.initQuotaData()
// }
// },
// immediate: true
// }
// },
created() {
this.initQuotaData()
},
......@@ -276,12 +292,30 @@
ITEM_INNER
} = res
this.selectedSalesCenterArr = YXDY
if (this.isKeepData) {
const {
INFO,
ITEM_INNER: ITEM_INNER2,
ITEM_OUTER
} = this.quotaOrder
this.HEADINFO = {
...HEAD,
...INFO
}
this.planinnerLists = ITEM_INNER2
this.planoutLists = ITEM_OUTER
this.salesCenterIndex = YXDY.findIndex((item) => {
return this.HEADINFO.ZZFLD000001 === item.KEY
})
return
}
this.planinnerLists[0] = {
...this.planinnerLists[0],
...ITEM_INNER[0]
}
this.HEADINFO = HEAD
this.productInitInfo = ITEM_INNER[0]
// this.productInitInfo = ITEM_INNER[0]s
},
// 更新行项目信息
async updateQuotaData(productIndex, mode, product) {
......@@ -413,7 +447,7 @@
},
// 计算小计
calcInnerTotal(e, item, i) {
console.log('sss', item, e)
// console.log('sss', item, e)
let value = 0
if (e.target.value) {
value = e.target.value
......
......@@ -49,7 +49,8 @@
</view>
</view>
</view>
<component :style="componentHeight" :is="currentTabComponent" @click="changeComponent" @submit="submit">
<component :style="componentHeight" :is="currentTabComponent" :key="currentTabComponent"
:is-keep-data='isKeepData' @click="changeComponent" @submit="submit">
</component>
</view>
</view>
......@@ -74,7 +75,8 @@
data() {
return {
currentTabComponent: 'quotaOrder',
topHeight: ''
topHeight: '',
isKeepData: false
}
},
computed: {
......@@ -145,7 +147,8 @@
return false
},
methods: {
changeComponent(com) {
changeComponent(com, status = false) {
this.isKeepData = status
this.currentTabComponent = com;
},
submit() {
......
......@@ -263,7 +263,7 @@
this.getProduct(true)
},
handleChecked(e, item, index) {
console.log('当前索引:', e, index);
// console.log('当前索引:', e, index);
this.lists.forEach((cur) => {
if (cur.PRODUCT_ID === item.PRODUCT_ID) {
cur.checked = !cur.checked
......
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