Commit a379853a by 王志慧

commit

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