Commit aaadcf6e by chenwq

商品编辑

1 parent e87c51f0
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
</div> </div>
</div> </div>
</template> </template>
<template slot="proSpecsBtn"> <template slot="proSpecsBtn" slot-scope="scope">
<el-button :disabled="isDisabled" type="default" @click="handleSpecsEdit(1)">+添加规格项目</el-button> <el-button :disabled="scope.scope.isDisabled || isDisabled" type="default" @click="handleSpecsEdit(1)">+添加规格项目</el-button>
</template> </template>
<div slot="proSpecs" :style="{ 'margin-left': labelWidth }"> <div slot="proSpecs" :style="{ 'margin-left': labelWidth }">
<div class="sepce-box" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex"> <div class="sepce-box" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">
...@@ -666,7 +666,8 @@ export default { ...@@ -666,7 +666,8 @@ export default {
editFormData: [ editFormData: [
{ {
label: '商品规格', label: '商品规格',
name: '', name: 'proSpecsBtn',
isDisabled: false,
addHtml: 'proSpecsBtn' addHtml: 'proSpecsBtn'
}, },
{ {
...@@ -854,6 +855,10 @@ export default { ...@@ -854,6 +855,10 @@ export default {
}, },
deep: true deep: true
}, },
// 规格
specificationDetailList(newValue, oldValue) {
console.log(newValue, '规格--')
},
// 零售价 // 零售价
'editForm.retailPrice'(newValue, oldValue) { 'editForm.retailPrice'(newValue, oldValue) {
this.editForm.retailPrice = limitPrice(newValue, oldValue, 5, 2) this.editForm.retailPrice = limitPrice(newValue, oldValue, 5, 2)
...@@ -882,23 +887,23 @@ export default { ...@@ -882,23 +887,23 @@ export default {
'editForm.expressFee'(newValue, oldValue) { 'editForm.expressFee'(newValue, oldValue) {
this.editForm.expressFee = limitPrice(newValue, oldValue, 5, 2, 0, 100000) this.editForm.expressFee = limitPrice(newValue, oldValue, 5, 2, 0, 100000)
}, },
// 关联优惠券radio,判断配送发货状态 // 关联优惠券radio,判断配送发货状态,商品规格
'editForm.relatedCouponId'(newValue, oldValue) { 'editForm.relatedCouponId'(newValue, oldValue) {
let inx = this.externalFormList[2].editFormData.findIndex(val => val.name == 'deliveryType')
this.externalFormList[2].editFormData[inx].optionList.find(k => k.confId == 2).isDisabled = !!newValue
// console.log(this.associationList)
if (newValue) { if (newValue) {
let inx = this.externalFormList[2].editFormData.findIndex(val => val.name == 'deliveryType')
this.externalFormList[2].editFormData[inx].optionList.map(val => {
if (val.confId == 2) return (val.isDisabled = true)
})
this.editForm.deliveryType = 1 this.editForm.deliveryType = 1
this.handleTypeChange(this.editForm.deliveryType) this.editForm.goodsStock = this.associationList[0].residueAmount + ''
} else {
let inx = this.externalFormList[2].editFormData.findIndex(val => val.name == 'deliveryType')
this.externalFormList[2].editFormData[inx].optionList.map(val => {
if (val.confId == 2) return (val.isDisabled = false)
})
this.handleTypeChange(this.editForm.deliveryType)
} }
this.handleTypeChange(this.editForm.deliveryType)
this.associationRadio = newValue this.associationRadio = newValue
// 商品规格
let specsIdx = this.externalFormList[1].editFormData.findIndex(val => val.name == 'proSpecsBtn')
this.externalFormList[1].editFormData[specsIdx].isDisabled = !!newValue
// 库存
let goodsStockIdx = this.externalFormList[1].editFormData.findIndex(val => val.name == 'goodsStock')
this.externalFormList[1].editFormData[goodsStockIdx].isDisabled = !!newValue
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!