|
@@ -20,7 +20,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 查询配件列表 -->
|
|
<!-- 查询配件列表 -->
|
|
- <queryPart ref="partQuery" :buyerSn="detailData&&detailData.buyerSn" :newLoading="isInster" @add="insterProduct"></queryPart>
|
|
|
|
|
|
+ <queryPart ref="partQuery" :newLoading="isInster" @add="insterProduct"></queryPart>
|
|
</a-card>
|
|
</a-card>
|
|
<a-card size="small" :bordered="false" class="salesEdit-cont">
|
|
<a-card size="small" :bordered="false" class="salesEdit-cont">
|
|
<div slot="title">
|
|
<div slot="title">
|
|
@@ -117,7 +117,7 @@
|
|
</div>
|
|
</div>
|
|
</a-alert>
|
|
</a-alert>
|
|
<!-- 已选促销品列表 -->
|
|
<!-- 已选促销品列表 -->
|
|
- <queryPromotable ref="promotable" :salesBillSn="$route.params.sn" :delLoading="delLoading" @onCellBlur="onCellBlur" @del="handleDel"></queryPromotable>
|
|
|
|
|
|
+ <queryPromotable ref="promotable" :delLoading="delLoading" @onCellBlur="onCellBlur" @del="handleDel"></queryPromotable>
|
|
</a-card>
|
|
</a-card>
|
|
</a-spin>
|
|
</a-spin>
|
|
<div class="affix-cont">
|
|
<div class="affix-cont">
|
|
@@ -133,8 +133,6 @@
|
|
<!-- 添加产品 -->
|
|
<!-- 添加产品 -->
|
|
<ChooseActive
|
|
<ChooseActive
|
|
ref="activeProduct"
|
|
ref="activeProduct"
|
|
- :buyerSn="detailData&&detailData.buyerSn"
|
|
|
|
- :nowData="nowData"
|
|
|
|
:openModal="newActive"
|
|
:openModal="newActive"
|
|
@ok="addNewActive"
|
|
@ok="addNewActive"
|
|
:newLoading="isInster"
|
|
:newLoading="isInster"
|
|
@@ -192,6 +190,7 @@ export default {
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
this.dataSource = data.list
|
|
this.dataSource = data.list
|
|
|
|
+ this.$refs.promotable.getData(this.salesBillSn)
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -224,11 +223,7 @@ export default {
|
|
resetSearchForm (flag) {
|
|
resetSearchForm (flag) {
|
|
this.$refs.table.refresh(!!flag)
|
|
this.$refs.table.refresh(!!flag)
|
|
this.getPromoacActiveList()
|
|
this.getPromoacActiveList()
|
|
- this.getOrderDetail()
|
|
|
|
- },
|
|
|
|
- // 重置列表
|
|
|
|
- resetForm () {
|
|
|
|
- this.$refs.table.refresh()
|
|
|
|
|
|
+ this.getOrderDetail(false)
|
|
},
|
|
},
|
|
// 返回
|
|
// 返回
|
|
handleBack () {
|
|
handleBack () {
|
|
@@ -321,12 +316,13 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 销售单详情
|
|
// 销售单详情
|
|
- getOrderDetail () {
|
|
|
|
|
|
+ getOrderDetail (flag) {
|
|
salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => {
|
|
salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => {
|
|
- console.log('getOrderDetail')
|
|
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.detailData = res.data
|
|
this.detailData = res.data
|
|
- console.log(this.detailData)
|
|
|
|
|
|
+ if (flag) {
|
|
|
|
+ this.$refs.partQuery.pageInit(this.detailData && this.detailData.buyerSn || '')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -358,9 +354,9 @@ export default {
|
|
},
|
|
},
|
|
// 选择促销品
|
|
// 选择促销品
|
|
handleSelCx (row) {
|
|
handleSelCx (row) {
|
|
- this.nowData = row
|
|
|
|
|
|
+ // this.nowData = row
|
|
this.newActive = true
|
|
this.newActive = true
|
|
- // this.$refs.activeProduct.getData(row)
|
|
|
|
|
|
+ this.$refs.activeProduct.getData(row, this.detailData && this.detailData.buyerSn || '')
|
|
},
|
|
},
|
|
// 批量添加促销品
|
|
// 批量添加促销品
|
|
addNewActive (list) {
|
|
addNewActive (list) {
|
|
@@ -377,8 +373,8 @@ export default {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
addPromoGoods(temp).then(res => {
|
|
addPromoGoods(temp).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.$refs.promotable.getData()
|
|
|
|
- this.getOrderDetail()
|
|
|
|
|
|
+ this.$refs.promotable.getData(this.salesBillSn)
|
|
|
|
+ this.getOrderDetail(false)
|
|
this.newActive = false
|
|
this.newActive = false
|
|
this.isInster == false
|
|
this.isInster == false
|
|
this.spinning = false
|
|
this.spinning = false
|
|
@@ -392,10 +388,10 @@ export default {
|
|
this.newActive = false
|
|
this.newActive = false
|
|
},
|
|
},
|
|
pageInit () {
|
|
pageInit () {
|
|
- this.getOrderDetail()
|
|
|
|
- this.$refs.partQuery.resetSearchForm()
|
|
|
|
- this.$refs.promotable.getData()
|
|
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ if (!this.disabled) {
|
|
|
|
+ this.getOrderDetail(true)
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
@@ -406,9 +402,7 @@ export default {
|
|
vm.salesBillSn = vm.$route.params.sn
|
|
vm.salesBillSn = vm.$route.params.sn
|
|
// 获取促销活动
|
|
// 获取促销活动
|
|
vm.getPromoacActiveList()
|
|
vm.getPromoacActiveList()
|
|
- if (!vm.disabled) {
|
|
|
|
- vm.pageInit()
|
|
|
|
- }
|
|
|
|
|
|
+ vm.pageInit()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|