Commit 3d9b9c11 by chenwq

商品编辑

1 parent aaadcf6e
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</div> </div>
</div> </div>
<template slot="association"> <template slot="association">
<el-button type="default" @click="dialogTableVisible = true" v-if="routeInfo.addOrEdit !== 3">+选择</el-button> <el-button type="default" :disabled="specificationDetailList.length" @click="dialogTableVisible = true" v-if="routeInfo.addOrEdit !== 3">+选择</el-button>
<glsx-dialog title="选择优惠券" :isVisible.sync="dialogTableVisible" width="50%" @confirmDialog="associationConfirm" @closeDialog="associationCancel"> <glsx-dialog title="选择优惠券" :isVisible.sync="dialogTableVisible" width="50%" @confirmDialog="associationConfirm" @closeDialog="associationCancel">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
</div> </div>
</div> </div>
</template> </template>
<template slot="proSpecsBtn" slot-scope="scope"> <template slot="proSpecsBtn">
<el-button :disabled="scope.scope.isDisabled || isDisabled" type="default" @click="handleSpecsEdit(1)">+添加规格项目</el-button> <el-button :disabled="editForm.relatedCouponId || 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">
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<tr style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;" v-for="(subItem, subIndex) in nameToValSpecsList" :key="subIndex"> <tr style="border-bottom: 1px solid rgb(235, 235, 235); height: 54px; line-height: 54px;" v-for="(subItem, subIndex) in nameToValSpecsList" :key="subIndex">
<td :style="{ width: specsWidth }" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td> <td :style="{ width: specsWidth }" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<div v-if="routeInfo.groupOrStore == 1"> <div v-if="routeInfo.groupOrStore == 1 && editForm.takeGoodMode == 2">
<el-input :disabled="isDisabled" :class="{ 'border-red': (!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted }" placeholder="零售价" v-model="subItem.retailPrice" @input.native="e => handleRetailPriceInput(e, subIndex)" @blur="handleRetailPriceBlur"> <el-input :disabled="isDisabled" :class="{ 'border-red': (!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted }" placeholder="零售价" v-model="subItem.retailPrice" @input.native="e => handleRetailPriceInput(e, subIndex)" @blur="handleRetailPriceBlur">
<el-popover v-show="(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted" slot="suffix" placement="top" title width="90" trigger="hover" :content="!(subItem.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'"> <el-popover v-show="(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted" slot="suffix" placement="top" title width="90" trigger="hover" :content="!(subItem.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'">
<i class="el-icon-warning color-red" slot="reference"></i> <i class="el-icon-warning color-red" slot="reference"></i>
...@@ -667,7 +667,6 @@ export default { ...@@ -667,7 +667,6 @@ export default {
{ {
label: '商品规格', label: '商品规格',
name: 'proSpecsBtn', name: 'proSpecsBtn',
isDisabled: false,
addHtml: 'proSpecsBtn' addHtml: 'proSpecsBtn'
}, },
{ {
...@@ -898,9 +897,6 @@ export default { ...@@ -898,9 +897,6 @@ export default {
} }
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') let goodsStockIdx = this.externalFormList[1].editFormData.findIndex(val => val.name == 'goodsStock')
this.externalFormList[1].editFormData[goodsStockIdx].isDisabled = !!newValue this.externalFormList[1].editFormData[goodsStockIdx].isDisabled = !!newValue
...@@ -1447,7 +1443,7 @@ export default { ...@@ -1447,7 +1443,7 @@ export default {
isJump = true isJump = true
break break
} }
if (this.routeInfo.groupOrStore == 1 && +item.retailPrice < +this.editForm.supplyPrice) { if (this.routeInfo.groupOrStore == 1 && this.editForm.takeGoodMode == 2 && +item.retailPrice < +this.editForm.supplyPrice) {
this.whereToGo('specificationDetailList') this.whereToGo('specificationDetailList')
isJump = true isJump = true
break break
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!