|
@@ -660,8 +660,7 @@ export default {
|
|
dataList.forEach(con => {
|
|
dataList.forEach(con => {
|
|
if (con.productThisList) {
|
|
if (con.productThisList) {
|
|
con.productThisList.forEach((item, i) => {
|
|
con.productThisList.forEach((item, i) => {
|
|
- item.unitTypeInfo = con.unitTypeDictValue + con.unitQty
|
|
|
|
- item.no = i * 1 + 1
|
|
|
|
|
|
+ item.unitTypeInfo = (con.unitType === 'SL' ? '按数量设置' : '按整箱设置') + con.unitQty
|
|
item.productTypeInfo = con.promotionProductType
|
|
item.productTypeInfo = con.promotionProductType
|
|
})
|
|
})
|
|
newList = [ ...newList, ...con.productThisList ]
|
|
newList = [ ...newList, ...con.productThisList ]
|
|
@@ -676,17 +675,28 @@ export default {
|
|
handlePreview () {
|
|
handlePreview () {
|
|
const dataName = this.chooseVal === 'a' ? 'gate' : this.chooseVal === 'b' ? 'regular' : 'gift'
|
|
const dataName = this.chooseVal === 'a' ? 'gate' : this.chooseVal === 'b' ? 'regular' : 'gift'
|
|
const titName = this.chooseVal === 'a' ? '门槛产品' : this.chooseVal === 'b' ? '正价产品' : '促销产品'
|
|
const titName = this.chooseVal === 'a' ? '门槛产品' : this.chooseVal === 'b' ? '正价产品' : '促销产品'
|
|
- const newPreviewList = this.getPreviewList(this.form[dataName + 'ProductList'])
|
|
|
|
- if (newPreviewList && newPreviewList.length === 0) {
|
|
|
|
- this.$message.warning('暂时没有可预览的产品')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- this.previewList = newPreviewList
|
|
|
|
- const resuleObj = {
|
|
|
|
- tit: titName
|
|
|
|
|
|
+ if (!this.itemSn) {
|
|
|
|
+ if (this.chooseVal === 'a') {
|
|
|
|
+ this.form.gateProductList = this.$refs.cillProduct.getResultVal()
|
|
|
|
+ } else if (this.chooseVal === 'b') {
|
|
|
|
+ this.form.regularProductList = this.$refs.normalPriceProduct.getResultVal()
|
|
|
|
+ }else{
|
|
|
|
+ this.form.giftProductList = this.$refs.offerProduct.getResultVal()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- this.$refs.previewModal.pageInit(resuleObj)
|
|
|
|
- this.openProductModal = true
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ const newPreviewList = this.getPreviewList(this.form[dataName + 'ProductList'])
|
|
|
|
+ if (newPreviewList && newPreviewList.length === 0) {
|
|
|
|
+ this.$message.warning('暂时没有可预览的产品')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.previewList = newPreviewList
|
|
|
|
+ const resuleObj = {
|
|
|
|
+ tit: titName
|
|
|
|
+ }
|
|
|
|
+ this.$refs.previewModal.pageInit(resuleObj)
|
|
|
|
+ this.openProductModal = true
|
|
|
|
+ })
|
|
},
|
|
},
|
|
closeProductModal () {
|
|
closeProductModal () {
|
|
this.previewList = []
|
|
this.previewList = []
|