Commit ff23d729 by 张立顺

字段取值修复

1 parent 9ff51c21
......@@ -2,18 +2,10 @@
<template>
<d2-container class="edit-commodity" v-loading="!show">
<div class="" v-if="show">
<grounding-form
ref="d2GroundingForm"
:add-or-edit="addOrEdit"
:form-ref="proFormRef"
:origin-data="editData"
:form-list="editForm"
:secondGoodsList="secondGoodsList"
@handleAddConfirm="handleAddConfirm"
@visibleChange="visibleChange"
@interestsLoadmore="interestsLoadmore"
@remoteMethod="remoteMethod"
@handleClose="handleAddClose"></grounding-form>
<grounding-form ref="d2GroundingForm" :add-or-edit="addOrEdit" :form-ref="proFormRef" :origin-data="editData"
:form-list="editForm" :secondGoodsList="secondGoodsList" @handleAddConfirm="handleAddConfirm"
@visibleChange="visibleChange" @interestsLoadmore="interestsLoadmore" @remoteMethod="remoteMethod"
@handleClose="handleAddClose"></grounding-form>
</div>
</d2-container>
</template>
......@@ -259,7 +251,7 @@ export default {
resArr.push({
confId: v.id,
confNameValue: v?.upgradeGoodsName,
confTypeNameValue: `(${val?.goodsInfo?.goodsTypeName} / ${val?.goodsInfo?.goodsName} / ${v?.commodityCode})`,
confTypeNameValue: `(${val?.goodsInfo?.goodsTypeName} / ${val?.goodsInfo?.goodsName} / ${val?.commodityCode})`,
valueObj: {
upgradeGoodsName: v?.upgradeGoodsName,
goodsName: val?.goodsInfo?.goodsName,
......@@ -268,7 +260,7 @@ export default {
type: v?.type,
goodsType: val?.goodsInfo?.goodsType,
position: v?.position,
serviceItemNames: v?.upgradeGoodsServiceItemsList?.map(item => {return item.serviceName})?.join(',')
serviceItemNames: v?.upgradeGoodsServiceItemsList?.map(item => { return item.serviceName })?.join(',')
}
})
})
......@@ -279,15 +271,15 @@ export default {
this.$nextTick(() => {
this.show = true
})
}).catch(() => {
}).catch(() => {
this.$nextTick(() => {
this.show = true
})
})
},
unique(arr){
const res= new Map()
return arr.filter((a)=> !res.has(a.confId) && res.set(a.confId,1))
unique(arr) {
const res = new Map()
return arr.filter((a) => !res.has(a.confId) && res.set(a.confId, 1))
},
getBaseData() {
this.editForm.forEach(item => {
......@@ -318,7 +310,7 @@ export default {
confNameValue: res?.upgradeGoodsName,
confTypeNameValue: `(${res?.goodsTypeName} / ${res?.goodsName} / ${v?.commodityCode})`,
}]
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => {return v.serviceName})?.join(',')
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return v.serviceName })?.join(',')
this.editData = res || {}
this.getSelectingList(defaultSelect)
})
......@@ -378,9 +370,9 @@ export default {
var param = {}
if (obj === null || obj === undefined || obj === "") return param
for (var key in obj) {
if (obj[key] !== null && obj[key] !== undefined && obj[key] !== "") {
param[key] = obj[key];
}
if (obj[key] !== null && obj[key] !== undefined && obj[key] !== "") {
param[key] = obj[key];
}
}
return param
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!