Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 07c40161
authored
Apr 17, 2026
by
Jaxon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(商品上架): 修复商品选择弹窗中禁用逻辑使用错误ID的问题
1 parent
73a5f4a2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
8 deletions
src/views/goods/components/selectGoodsDialog.vue
src/views/goods/shelfManage/components/productShelving/components/combo/components/modify/index.vue
src/views/goods/shelfManage/components/productShelving/components/product/components/modify/index.vue
src/views/goods/components/selectGoodsDialog.vue
View file @
07c4016
...
...
@@ -77,7 +77,7 @@
@
setTableFinishFun=
"setTableFinishFun"
>
<
template
#
select_btn=
"scope"
>
<el-radio
v-model=
"selectedRowId"
:disabled=
"packageSelectIds && packageSelectIds.includes(scope.scope.
id
)"
:disabled=
"packageSelectIds && packageSelectIds.includes(scope.scope.
commodityCode
)"
:label=
"scope.scope.id"
>
{{
''
}}
</el-radio>
...
...
src/views/goods/shelfManage/components/productShelving/components/combo/components/modify/index.vue
View file @
07c4016
...
...
@@ -172,6 +172,7 @@
<Product
:ref=
"`productForm$
{goodsForm.id}`"
:product="goodsForm"
:mode="VIEW_MODE.EDIT"
:disabled-ids="packageSelectedGoodsCommodityCode"
:scene-type="packageForm.sceneType"
:show-gift-cost="false"
:show-business-line="false"
...
...
@@ -243,9 +244,12 @@ export default {
goodsList
:
[],
};
},
computed
:
{},
computed
:
{
// 返回已选的商品id
packageSelectedGoodsCommodityCode
()
{
return
this
.
goodsList
?.
map
(
item
=>
item
.
upgradeCommodityCode
)
||
[];
},
},
watch
:
{
packages
:
{
handler
(
val
)
{
...
...
src/views/goods/shelfManage/components/productShelving/components/product/components/modify/index.vue
View file @
07c4016
...
...
@@ -23,7 +23,7 @@
</div>
<div
v-if=
"formData.upgradeGoodsId"
class=
"info-div"
>
<Descriptions
class=
"sub-desc-wrapper"
:data=
"formD
ata
"
:data=
"formD
etail
"
:schema=
"productShelvingProductDetailSubFormItems"
/>
</div>
</el-form-item>
...
...
@@ -207,6 +207,7 @@
<SelectGoodsDialog
v-if=
"dialog.selectGoods.show"
append-to-body
:scene-type=
"sceneType"
:package-select-ids=
"disabledIds"
:filter-params=
"dialog.selectGoods.filterParams"
:select-goods-visible=
"dialog.selectGoods.show"
:upgrade-goods-id=
"formData.upgradeGoodsId"
...
...
@@ -273,6 +274,11 @@ export default {
type
:
Boolean
,
default
:
false
,
},
// 在选择商品的弹窗里 禁用的id
disabledIds
:
{
type
:
Array
,
default
:
()
=>
[],
},
},
data
()
{
return
{
...
...
@@ -288,6 +294,7 @@ export default {
},
},
formRules
:
productFromRules
,
formDetail
:
{},
formData
:
{
upgradeGoodsId
:
""
,
goodsAlias
:
""
,
...
...
@@ -325,10 +332,12 @@ export default {
console
.
log
(
"this.val"
,
val
);
if
(
!
isEmpty
(
val
))
{
this
.
$set
(
this
,
"formData"
,
handleCoverProductForm
(
cloneDeep
(
val
)));
this
.
$set
(
this
,
"formDetail"
,
cloneDeep
(
val
));
}
},
immediate
:
true
,
},
},
async
mounted
()
{
...
...
@@ -361,8 +370,7 @@ export default {
handleSelectGoodsConfirm
(
selectedData
)
{
console
.
log
(
"selectedData"
,
selectedData
);
console
.
log
(
"selectedData.goodsInfo.goodsName"
,
selectedData
.
goodsInfo
.
goodsName
);
this
.
$set
(
this
.
formData
,
"upgradeGoods"
,
{
const
selectedForm
=
{
...
selectedData
,
goodsName
:
selectedData
.
goodsInfo
.
goodsName
,
tempGoodsTypeName
:
getGoodsTypes
(
selectedData
?.
goodsInfo
),
...
...
@@ -371,9 +379,13 @@ export default {
djCost
:
selectedData
?.
djCost
||
0
,
carTypeConfigName
:
selectedData
?.
carTypeConfigList
?.
map
(
item
=>
item
.
seriesName
).
join
(
"/"
),
commodityCode
:
selectedData
?.
commodityCode
,
});
};
this
.
$set
(
this
.
formDetail
,
"upgradeGoods"
,
cloneDeep
(
selectedData
));
this
.
$set
(
this
.
formData
,
"upgradeGoods"
,
selectedForm
);
this
.
formData
.
upgradeGoodsId
=
selectedData
.
id
;
this
.
formData
.
goodsType
=
selectedData
?.
goodsInfo
?.
goodsType
;
this
.
formData
.
position
=
undefined
;
// 太阳膜
if
(
selectedData
?.
goodsInfo
?.
goodsType
===
1
)
{
this
.
$set
(
this
.
formData
.
upgradeGoods
,
"positionList"
,
selectedData
.
position
?.
split
(
","
)?.
map
(
item
=>
Number
(
item
.
trim
()))
||
[]);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment