Commit a379853a by 王志慧

commit

1 parent 325b20d9
...@@ -81,11 +81,16 @@ export default { ...@@ -81,11 +81,16 @@ export default {
isNum: true isNum: true
}, },
{ {
label: '库存预警', label: '库存下限预警',
name: 'warningValue', name: 'warningValue',
isNum: true isNum: true
}, },
{ {
label: '库存预警上限',
name: 'warningValueMax',
isNum: true
},
{
label: '质保年限', label: '质保年限',
name: 'warrantyPeriod', name: 'warrantyPeriod',
isNum: true isNum: true
...@@ -103,7 +108,7 @@ export default { ...@@ -103,7 +108,7 @@ export default {
prop: 'merchantId' prop: 'merchantId'
} }
] ]
}, }
} }
}, },
...@@ -141,16 +146,16 @@ export default { ...@@ -141,16 +146,16 @@ export default {
this.detailForm.baseProductFlag == 'Y' ? list.push('基础产品') : '' this.detailForm.baseProductFlag == 'Y' ? list.push('基础产品') : ''
this.detailForm.upgradeProductFlag == 'Y' ? list.push('升级产品') : '' this.detailForm.upgradeProductFlag == 'Y' ? list.push('升级产品') : ''
this.detailForm.typeTxt = list.join(',') this.detailForm.typeTxt = list.join(',')
if(list.length != 2 && this.detailForm.baseProductFlag == 'Y'){ if (list.length != 2 && this.detailForm.baseProductFlag == 'Y') {
this.detailForm.sellPrice = '-'; this.detailForm.sellPrice = '-'
this.detailForm.minSellPrice = '-' this.detailForm.minSellPrice = '-'
this.detailForm.productCost = '-' this.detailForm.productCost = '-'
} }
if(this.detailForm.goodsCodeName != '太阳膜') { if (this.detailForm.goodsCodeName != '太阳膜') {
this.detailForm.warrantyPeriod = '-' this.detailForm.warrantyPeriod = '-'
} else { } else {
this.detailForm.warrantyPeriod = (this.detailForm.warrantyPeriod || 0) + '年' this.detailForm.warrantyPeriod = (this.detailForm.warrantyPeriod || 0) + '年'
} }
}) })
}, },
handleCancel() { handleCancel() {
......
...@@ -51,7 +51,8 @@ const editCommodityObj = { ...@@ -51,7 +51,8 @@ const editCommodityObj = {
minSellPrice: [{ required: true, message: '请输入最低售价', trigger: 'change' }], minSellPrice: [{ required: true, message: '请输入最低售价', trigger: 'change' }],
giftCost: [{ required: true, message: '请输入赠送成本', trigger: 'change' }], giftCost: [{ required: true, message: '请输入赠送成本', trigger: 'change' }],
productCost: [{ required: true, message: '请输入产品成本', trigger: 'change' }], productCost: [{ required: true, message: '请输入产品成本', trigger: 'change' }],
warningValue: [{ required: true, message: '请输入库存预警', trigger: 'change' }], warningValue: [{ required: true, message: '请输入库存预警下限', trigger: 'change' }],
warningValueMax: [{ required: true, message: '请输入库存预警上限', trigger: 'change' }],
merchantList: [{ required: true, message: '请选择门店', trigger: 'change' }], merchantList: [{ required: true, message: '请选择门店', trigger: 'change' }],
warrantyPeriod: [{ required: true, message: '请输入质保年限', trigger: 'change' }] warrantyPeriod: [{ required: true, message: '请输入质保年限', trigger: 'change' }]
}, },
...@@ -121,11 +122,16 @@ const editCommodityObj = { ...@@ -121,11 +122,16 @@ const editCommodityObj = {
isHide: true isHide: true
}, },
{ {
label: '库存预警', label: '库存下限预警/件',
name: 'warningValue', name: 'warningValue',
type: 'input' type: 'input'
}, },
{ {
label: '库存预警上限/件',
name: 'warningValueMax',
type: 'input'
},
{
label: '质保年限', label: '质保年限',
name: 'warrantyPeriod', name: 'warrantyPeriod',
type: 'input', type: 'input',
......
...@@ -123,10 +123,14 @@ export default { ...@@ -123,10 +123,14 @@ export default {
'editForm.productCost'(newValue, oldValue) { 'editForm.productCost'(newValue, oldValue) {
this.editForm.productCost = limitPrice(newValue, oldValue, 6, 2) this.editForm.productCost = limitPrice(newValue, oldValue, 6, 2)
}, },
// 库存预警 // 库存下限预警
'editForm.warningValue'(newValue, oldValue) { 'editForm.warningValue'(newValue, oldValue) {
this.editForm.warningValue = limitPrice(newValue, oldValue, 6, 2) this.editForm.warningValue = limitPrice(newValue, oldValue, 6, 2)
}, },
// 库存预警上限
'editForm.warningValueMax'(newValue, oldValue) {
this.editForm.warningValueMax = limitPrice(newValue, oldValue, 6, 2)
},
// 年限 // 年限
'editForm.warrantyPeriod'(newValue, oldValue) { 'editForm.warrantyPeriod'(newValue, oldValue) {
this.editForm.warrantyPeriod = limitPrice(newValue, oldValue, 2, 0) this.editForm.warrantyPeriod = limitPrice(newValue, oldValue, 2, 0)
...@@ -211,13 +215,12 @@ export default { ...@@ -211,13 +215,12 @@ export default {
minSellPrice: '', minSellPrice: '',
productCost: '', productCost: '',
warningValue: '', warningValue: '',
warningValueMax:'',
giftCost: '', giftCost: '',
warrantyPeriod: '' warrantyPeriod: ''
} }
}, },
changeFormAttr(formName, attrName, labelList, attrValue) { changeFormAttr(formName, attrName, labelList, attrValue) {
console.log(formName, attrName, labelList, attrValue)
console.log(this[formName])
labelList.forEach(item => { labelList.forEach(item => {
console.log(item) console.log(item)
let idx = this[formName]?.findIndex(k => { let idx = this[formName]?.findIndex(k => {
......
...@@ -78,7 +78,8 @@ export default { ...@@ -78,7 +78,8 @@ export default {
}, },
{ {
label: '最低售价/元', label: '最低售价/元',
prop: 'minSellPrice' prop: 'minSellPrice',
width: 120,
}, },
{ {
label: '赠送成本', label: '赠送成本',
...@@ -88,6 +89,11 @@ export default { ...@@ -88,6 +89,11 @@ export default {
label: '产品成本', label: '产品成本',
prop: 'productCost' prop: 'productCost'
}, },
{
label: '质保年限/年',
prop: 'warrantyPeriod',
width: 120,
},
{ {
label: '使用门店', label: '使用门店',
prop: '', prop: '',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!