Commit 32d14854 by chenwq

复制

1 parent 19da8a13
......@@ -1472,7 +1472,7 @@ export default {
this.editForm = this.$common.utils.deepClone(res)
this.activityInfo = info
this.$set(this.editForm, 'activityTime', [info.startTime, info.endTime])
this.getGoodInfo(info.goodsId)
this.routeInfo.addOrEdit == 'edit' && this.getGoodInfo(info.goodsId)
if (info.activityPrice != null && info.goodsStock != null) {
this.editForm.activityPrice = (info.activityPrice / 100).toFixed(2)
this.editForm.goodsStock = info.goodsStock + ''
......@@ -1542,7 +1542,7 @@ export default {
}
// 复制
if (this.routeInfo.addOrEdit == 'copy') {
let resetArr = [{ name: 'id' }, { name: 'activityTime', type: 'array' }, { name: 'liveBroadcastRoomId' }, { name: 'groupQrCode' }, { name: 'floatingMaskDiagram' }]
let resetArr = [{ name: 'id' }, { name: 'activityTime', type: 'array' }, { name: 'liveBroadcastRoomId' }, { name: 'groupQrCode' }, { name: 'floatingMaskDiagram' }, { name: 'selectedProInfo', type: 'Object' }, { name: 'goodsId' }, { name: 'activityPrice' }, { name: 'goodsStock' }]
this.copyReset(resetArr)
}
this.$nextTick(() => {
......@@ -1555,14 +1555,13 @@ export default {
},
copyReset(arr) {
let val = {
array: [],
Object: {},
'': ''
}[arr.type || '']
arr.forEach(item => {
switch (item.type) {
case 'array':
this.editForm[item.name] = []
break
default:
this.editForm[item.name] = ''
}
this.editForm[item.name] = val
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!