Commit 708fe950 by cwq0219

编辑商品

1 parent efbda333
...@@ -159,6 +159,7 @@ ...@@ -159,6 +159,7 @@
placeholder="零售价" placeholder="零售价"
v-model="subItem.retailPrice" v-model="subItem.retailPrice"
@input.native="e => handleRetailPriceInput(e, subIndex)" @input.native="e => handleRetailPriceInput(e, subIndex)"
@blur="handleRetailPriceBlur"
> >
<el-popover <el-popover
v-show="(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted" v-show="(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted"
...@@ -179,6 +180,7 @@ ...@@ -179,6 +180,7 @@
placeholder="零售价" placeholder="零售价"
v-model="subItem.retailPrice" v-model="subItem.retailPrice"
@input.native="e => handleRetailPriceInput(e, subIndex)" @input.native="e => handleRetailPriceInput(e, subIndex)"
@blur="handleRetailPriceBlur"
></el-input> ></el-input>
</td> </td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
...@@ -824,7 +826,6 @@ export default { ...@@ -824,7 +826,6 @@ export default {
this.getWechatImgList() this.getWechatImgList()
}, },
handleTypeChange(val) { handleTypeChange(val) {
// this.externalFormList[2].editRule.expressFee[0].required = val == 2
var idx = this.externalFormList[2].editFormData.findIndex(item => item.name == 'expressFee') var idx = this.externalFormList[2].editFormData.findIndex(item => item.name == 'expressFee')
this.externalFormList[2].editFormData[idx].isHide = val != 2 this.externalFormList[2].editFormData[idx].isHide = val != 2
}, },
...@@ -861,13 +862,11 @@ export default { ...@@ -861,13 +862,11 @@ export default {
var otherList = ['specificationDetailList', 'specsDetail'] var otherList = ['specificationDetailList', 'specsDetail']
var idx = '' var idx = ''
list.forEach(item => { list.forEach(item => {
// this.externalFormList[1].editRule[item][0].required = !this.specificationDetailList.length
idx = this.externalFormList[1].editFormData.findIndex(subItem => subItem.name == item) idx = this.externalFormList[1].editFormData.findIndex(subItem => subItem.name == item)
this.externalFormList[1].editFormData[idx].isHide = !!this.specificationDetailList.length this.externalFormList[1].editFormData[idx].isHide = !!this.specificationDetailList.length
}) })
otherList.forEach(item => { otherList.forEach(item => {
idx = this.externalFormList[1].editFormData.findIndex(subItem => subItem.name == item) idx = this.externalFormList[1].editFormData.findIndex(subItem => subItem.name == item)
console.log(this.externalFormList[1].editFormData[idx])
this.externalFormList[1].editFormData[idx].isHide = !this.specificationDetailList.length this.externalFormList[1].editFormData[idx].isHide = !this.specificationDetailList.length
}) })
}, },
...@@ -882,6 +881,9 @@ export default { ...@@ -882,6 +881,9 @@ export default {
} }
this.nameToValSpecsList[idx].retailPrice = limitPrice(newValue, oldValue, 5, 2) this.nameToValSpecsList[idx].retailPrice = limitPrice(newValue, oldValue, 5, 2)
}, },
handleRetailPriceBlur() {
this.findSpeceMin()
},
handleStockInput(e, idx) { handleStockInput(e, idx) {
var newValue = e.target.value var newValue = e.target.value
if (!this.reg.priceReg.test(newValue)) { if (!this.reg.priceReg.test(newValue)) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!