Commit 54e12ab5 by chenwq

查看单位

1 parent 99d24539
......@@ -70,35 +70,40 @@ export default {
},
{
label: '比例换算',
name: 'convertedValue'
name: 'convertedValueTxt'
},
{
label: '扣减标准',
name: 'deductionStandard'
name: 'deductionStandard',
suffix: '米/车'
},
{
label: '产品类型',
name: 'typeTxt'
},
{
label: '售价/元',
label: '售价',
name: 'sellPrice',
isNum: true
isNum: true,
suffix: '元/件'
},
{
label: '最低售价/元',
label: '最低售价',
name: 'minSellPrice',
isNum: true
isNum: true,
suffix: '元/件'
},
{
label: '赠送成本/元',
label: '赠送成本',
name: 'giftCost',
isNum: true
isNum: true,
suffix: '米/车'
},
{
label: '产品成本/元',
name: 'productCost',
isNum: true
isNum: true,
suffix: '元/件'
},
{
label: '质保年限/年',
......@@ -108,12 +113,14 @@ export default {
{
label: '库存下限预警',
name: 'warningValue',
isNum: true
isNum: true,
suffix: '米'
},
{
label: '库存预警上限',
name: 'warningValueMax',
isNum: true
isNum: true,
suffix: '米'
}
],
// 门店表格
......@@ -166,24 +173,39 @@ export default {
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() {
this.$apis.commodity.getGoodsDetail({ upgradeGoodsId: this.routeInfo.info.upgradeGoodsId }).then(res => {
this.detailForm = res
let list = []
let baseLabelList = ['售价', '最低售价', '产品成本']
let unitLabelList = ['库存下限预警', '库存上限预警']
this.detailForm.baseProductFlag == 'Y' ? list.push('基础产品') : ''
this.detailForm.upgradeProductFlag == 'Y' ? list.push('升级产品') : ''
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') {
this.detailForm.sellPrice = '-'
this.detailForm.minSellPrice = '-'
this.detailForm.productCost = '-'
}
if (this.detailForm.goodsCodeName != '太阳膜') {
this.detailForm.warrantyPeriod = '-'
this.detailForm.giftCost = '-'
} else {
this.detailForm.warrantyPeriod = (this.detailForm.warrantyPeriod || 0) + '年'
}
// if (this.detailForm.goodsCodeName != '太阳膜') {
// this.detailForm.warrantyPeriod = '-'
// this.detailForm.giftCost = '-'
// } else {
this.detailForm.warrantyPeriod = (this.detailForm.warrantyPeriod || 0) + '年'
// }
this.getGoodsPosList()
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!