|
@@ -127,7 +127,9 @@
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-info"
|
|
class="button-info"
|
|
- id="promotionList-edit-btn">+导入产品</a-button>
|
|
|
|
|
|
+ id="promotionList-edit-btn"
|
|
|
|
+ @click="openGuideModal=true"
|
|
|
|
+ >+导入产品</a-button>
|
|
<a-button
|
|
<a-button
|
|
v-show="chooseVal==='d'"
|
|
v-show="chooseVal==='d'"
|
|
style="margin-left:10px;"
|
|
style="margin-left:10px;"
|
|
@@ -153,6 +155,8 @@
|
|
:chooseData="chooseProducts"
|
|
:chooseData="chooseProducts"
|
|
@close="openProductsModal=false"
|
|
@close="openProductsModal=false"
|
|
@ok="handleProductsOk" />
|
|
@ok="handleProductsOk" />
|
|
|
|
+ <!-- 导入产品 -->
|
|
|
|
+ <importGuideModal :openModal="openGuideModal" @close="closeGuideModel" @ok="hanldeOk" />
|
|
</a-modal>
|
|
</a-modal>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -163,10 +167,11 @@ import tableType1 from './tableType1.vue'
|
|
import tableType3 from './tableType3.vue'
|
|
import tableType3 from './tableType3.vue'
|
|
import { promotionSave, getRuleDetail, getNewScopeSn } from '@/api/promotion'
|
|
import { promotionSave, getRuleDetail, getNewScopeSn } from '@/api/promotion'
|
|
import chooseProductsModal from './chooseProductsModal.vue'
|
|
import chooseProductsModal from './chooseProductsModal.vue'
|
|
|
|
+import ImportGuideModal from './importGuideModal.vue'
|
|
export default {
|
|
export default {
|
|
name: 'PromotionListBasicInfoModal',
|
|
name: 'PromotionListBasicInfoModal',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { VSelect, tableType1, tableType3, chooseProductsModal },
|
|
|
|
|
|
+ components: { VSelect, tableType1, tableType3, chooseProductsModal, ImportGuideModal },
|
|
props: {
|
|
props: {
|
|
openModal: { // 弹框显示状态
|
|
openModal: { // 弹框显示状态
|
|
type: Boolean,
|
|
type: Boolean,
|
|
@@ -209,10 +214,15 @@ export default {
|
|
},
|
|
},
|
|
chooseVal: 'a',
|
|
chooseVal: 'a',
|
|
openProductsModal: false,
|
|
openProductsModal: false,
|
|
- chooseProducts: []
|
|
|
|
|
|
+ chooseProducts: [],
|
|
|
|
+ openGuideModal: false// 导入弹窗
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 导入
|
|
|
|
+ closeGuideModel () {
|
|
|
|
+ this.openGuideModal = false
|
|
|
|
+ },
|
|
// 门槛产品
|
|
// 门槛产品
|
|
handleChange (e) {
|
|
handleChange (e) {
|
|
if (e.target.value == '1') {
|
|
if (e.target.value == '1') {
|
|
@@ -371,6 +381,15 @@ export default {
|
|
})
|
|
})
|
|
return list
|
|
return list
|
|
},
|
|
},
|
|
|
|
+ hanldeOk (arr) {
|
|
|
|
+ const resultArr = []
|
|
|
|
+ arr.forEach(item => {
|
|
|
|
+ item = { ...item, ...item.product }
|
|
|
|
+ item.code = item.productCode
|
|
|
|
+ resultArr.push(item)
|
|
|
|
+ })
|
|
|
|
+ this.handleProductsOk(resultArr)
|
|
|
|
+ },
|
|
// +新增产品
|
|
// +新增产品
|
|
handleProductsOk (con) {
|
|
handleProductsOk (con) {
|
|
const chooseProductsList = []
|
|
const chooseProductsList = []
|
|
@@ -391,7 +410,10 @@ export default {
|
|
}],
|
|
}],
|
|
provincePrice: item.provincePrice,
|
|
provincePrice: item.provincePrice,
|
|
cityPrice: item.cityPrice,
|
|
cityPrice: item.cityPrice,
|
|
- specialPrice: item.specialPrice
|
|
|
|
|
|
+ specialPrice: item.specialPrice,
|
|
|
|
+ provinceDiscountPrice: item.provinceDiscountPriceText,
|
|
|
|
+ cityDiscountPrice: item.cityDiscountPriceText,
|
|
|
|
+ specialDiscountPrice: item.specialDiscountPriceText
|
|
}
|
|
}
|
|
const obj = {}
|
|
const obj = {}
|
|
if (item.productTypeSn1) {
|
|
if (item.productTypeSn1) {
|