Commit 34904a8e by zhangxw

修改

1 parent 13877386
......@@ -26,7 +26,7 @@
</div>
<div slot="goodsInfo">
<div class="goodsInfo-box">
<div class="item" v-for="(subItem, subIndex) in goodsDetailForm" :key="subIndex">
<div class="item" v-for="(subItem, subIndex) in copyGoodsDetailForm" :key="subIndex">
<div v-if="subItem.addHtml" class="item_box">
<div class="label">{{ (membraneTypeList.includes(selectedGoodsInfo['goodsType']) ? subItem.label + `(元)/卷` : (subItem.label + '(元)/件')) }}:</div>
<div class="value">{{ priceFilter(selectedGoodsInfo[subItem.value]) }}</div>
......@@ -59,8 +59,8 @@
<GLFooter>
<el-button @click="handleCancel" size="medium">取消</el-button>
<!-- 新增/草稿显示 -->
<el-button v-if="editType == 'add' || editForm.status == 0" type="primary" @click="handleConfirm(true)" plain size="medium" :loading="loading">存草稿</el-button>
<el-button type="primary" @click="handleConfirm(false)" size="medium" :loading="loading">提交</el-button>
<el-button v-if="editType == 'add' || editForm.status == 0" type="primary" @click="handleConfirm(true)" plain size="medium" :loading="loading">草稿</el-button>
<el-button type="primary" @click="handleConfirm(false)" size="medium" :loading="loading">保存上架</el-button>
</GLFooter>
<!-- 门店弹窗 -->
<relate-store-dialog v-if="relateStoreVisible" ref="relateStore" :relateStoreVisible="relateStoreVisible" :storeApi="storeApi" :storeSearchForm="storeSearchForm" :storeSelected="selectedList" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
......@@ -223,14 +223,6 @@ export default {
addHtml: 'goodsInfo'
})
}
if (val) {
let index = this.editFormData.findIndex(val => val.name == 'shopPurchasePrice')
if (this.membraneTypeList.includes(this.selectedGoodsInfo?.goodsType)) { // 所选商品是膜类 门店采购价单位修改
if(index > -1) this.editFormData[index].label = '门店采购价(元)/卷'
} else {
if(index > -1) this.editFormData[index].label = '门店采购价(元)/件'
}
}
},
deep: true
},
......@@ -243,6 +235,23 @@ export default {
}
},
deep: true
},
selectedGoodsInfo: {
handler(val) {
this.setUnit() // 修改采购价单位
// 嘀加采购价字段
let copyGoodsDetailForm = this.$common.utils.deepClone(this.goodsDetailForm)
if (this.editForm?.goodsSource == 1) { // 自营
let index = copyGoodsDetailForm.findIndex(val => val.value == 'purchasePrice')
if (index > -1) {
copyGoodsDetailForm.splice(index, 1)
this.copyGoodsDetailForm = copyGoodsDetailForm
}
} else if (this.editForm?.goodsSource == 0) { // 嘀加
this.copyGoodsDetailForm = copyGoodsDetailForm
}
},
deep: true
}
},
......@@ -281,6 +290,14 @@ export default {
return true
}
},
setUnit() {
let index = this.editFormData.findIndex(val => val.name == 'shopPurchasePrice')
if (this.membraneTypeList.includes(this.selectedGoodsInfo?.goodsType)) { // 所选商品是膜类 门店采购价单位修改
if(index > -1) this.editFormData[index].label = '门店采购价(元)/卷'
} else {
if(index > -1) this.editFormData[index].label = '门店采购价(元)/件'
}
},
// 获取上架数据
remoteMethod(query) {
this.goodsNameKeyword = query
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!