Commit ff23d729 by 张立顺

字段取值修复

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