Commit 54e12ab5 by chenwq

查看单位

1 parent 99d24539
...@@ -70,35 +70,40 @@ export default { ...@@ -70,35 +70,40 @@ export default {
}, },
{ {
label: '比例换算', label: '比例换算',
name: 'convertedValue' name: 'convertedValueTxt'
}, },
{ {
label: '扣减标准', label: '扣减标准',
name: 'deductionStandard' name: 'deductionStandard',
suffix: '米/车'
}, },
{ {
label: '产品类型', label: '产品类型',
name: 'typeTxt' name: 'typeTxt'
}, },
{ {
label: '售价/元', label: '售价',
name: 'sellPrice', name: 'sellPrice',
isNum: true isNum: true,
suffix: '元/件'
}, },
{ {
label: '最低售价/元', label: '最低售价',
name: 'minSellPrice', name: 'minSellPrice',
isNum: true isNum: true,
suffix: '元/件'
}, },
{ {
label: '赠送成本/元', label: '赠送成本',
name: 'giftCost', name: 'giftCost',
isNum: true isNum: true,
suffix: '米/车'
}, },
{ {
label: '产品成本/元', label: '产品成本/元',
name: 'productCost', name: 'productCost',
isNum: true isNum: true,
suffix: '元/件'
}, },
{ {
label: '质保年限/年', label: '质保年限/年',
...@@ -108,12 +113,14 @@ export default { ...@@ -108,12 +113,14 @@ export default {
{ {
label: '库存下限预警', label: '库存下限预警',
name: 'warningValue', name: 'warningValue',
isNum: true isNum: true,
suffix: '米'
}, },
{ {
label: '库存预警上限', label: '库存预警上限',
name: 'warningValueMax', name: 'warningValueMax',
isNum: true isNum: true,
suffix: '米'
} }
], ],
// 门店表格 // 门店表格
...@@ -166,24 +173,39 @@ export default { ...@@ -166,24 +173,39 @@ export default {
this.detailForm.posTxt = obj ? obj.positionName : '-' this.detailForm.posTxt = obj ? obj.positionName : '-'
}) })
}, },
changeFormAttr(formName, attrName, labelList, attrValue) {
labelList.forEach(item => {
this[formName].forEach(k => {
if (k.label == item) {
k[attrName] = attrValue
}
})
})
},
getInfo() { getInfo() {
this.$apis.commodity.getGoodsDetail({ upgradeGoodsId: this.routeInfo.info.upgradeGoodsId }).then(res => { this.$apis.commodity.getGoodsDetail({ upgradeGoodsId: this.routeInfo.info.upgradeGoodsId }).then(res => {
this.detailForm = res this.detailForm = res
let list = [] let list = []
let baseLabelList = ['售价', '最低售价', '产品成本']
let unitLabelList = ['库存下限预警', '库存上限预警']
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(',')
console.log(this.detailForm, '000')
this.changeFormAttr('detailFormDataRow', 'suffix', baseLabelList, this.detailForm.goodsTypeName == '自建商品-精品' ? '元/件' : '元/车')
this.changeFormAttr('editFdetailFormDataRowormData', 'suffix', unitLabelList, this.detailForm.goodsTypeName == '自建商品-精品' ? '件' : '米')
this.detailForm.convertedValueTxt = this.detailForm.convertedValue ? '1卷=' + this.detailForm.convertedValue + '米' : '-'
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 = '-'
this.detailForm.giftCost = '-' // this.detailForm.giftCost = '-'
} else { // } else {
this.detailForm.warrantyPeriod = (this.detailForm.warrantyPeriod || 0) + '年' this.detailForm.warrantyPeriod = (this.detailForm.warrantyPeriod || 0) + '年'
} // }
this.getGoodsPosList() this.getGoodsPosList()
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!