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 0c637ea9
authored
Jul 09, 2026
by
Jaxon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 业务开发
1 parent
fce7a71a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
155 additions
and
15 deletions
src/libs/file.js
src/router/modules/903_productManagement.js
src/views/goods/shelfProduct/components/formProvider/index.vue
src/views/goods/shelfProduct/components/shelfProductConfirm/components/combo/components/detail/index.vue
src/views/goods/shelfProduct/components/shelfProductConfirm/components/combo/components/modify/index.vue
src/views/goods/shelfProduct/components/shelfProductConfirm/components/product/components/modify/index.vue
src/views/goods/shelfProduct/components/shelfProductConfirm/index.vue
src/views/goods/shelfProduct/constant/index.js
src/views/goods/shelfProduct/view/normalModify/index.vue
src/views/goods/shelfProduct/view/table/index.vue
src/views/goods/shelfProduct/view/table/table.data.js
src/libs/file.js
View file @
0c637ea
...
...
@@ -19,8 +19,9 @@ const IMAGE_EXTENSIONS = ["jpg", "jpeg", "png", "gif", "webp", "bmp", "svg", "ic
* @returns {boolean}
*/
export
function
isImageFile
(
fileName
)
{
if
(
!
fileName
||
typeof
fileName
!==
"string"
)
if
(
!
fileName
||
typeof
fileName
!==
"string"
)
{
return
false
;
}
const
ext
=
fileName
.
split
(
"."
).
pop
()?.
toLowerCase
();
return
IMAGE_EXTENSIONS
.
includes
(
ext
);
}
src/router/modules/903_productManagement.js
View file @
0c637ea
...
...
@@ -681,16 +681,31 @@ export const routerName = {
},
auth
:
[
{
authId
:
"9031810"
,
parentId
:
"90318"
,
label
:
"常规上架"
,
category
:
"Button"
,
type
:
"primary"
,
handle
:
"handleNormalModify"
,
addRoutePath
:
[
{
authId
:
"90318101"
,
name
:
"常规上架"
,
parentId
:
"90318"
,
},
],
},
{
authId
:
"9031801"
,
parentId
:
"90318"
,
label
:
"
新增
商品上架"
,
label
:
"
特殊
商品上架"
,
category
:
"Button"
,
type
:
"primary"
,
handle
:
"handleModify"
,
addRoutePath
:
[
{
authId
:
"9031802"
,
name
:
"
新增
商品上架"
,
name
:
"
特殊
商品上架"
,
parentId
:
"90318"
,
},
],
...
...
@@ -736,11 +751,25 @@ export const routerName = {
],
component
:
_import
(
"goods/shelfProduct/view/table/index"
),
},
90318101
:
{
path
:
"/goods-shelf/normal-modify"
,
name
:
"goodsShelfNormalCreate"
,
meta
:
{
title
:
"常规上架"
,
authId
:
"90318101"
,
parentId
:
"90318"
,
sideHidden
:
true
,
activePath
:
"/goods-shelf"
,
},
component
:
_import
(
"goods/shelfProduct/view/normalModify/index"
),
},
9031802
:
{
path
:
"/goods-shelf/modify"
,
name
:
"goodsShelfCreate"
,
meta
:
{
title
:
"
新增
商品上架"
,
title
:
"
特殊
商品上架"
,
authId
:
"9031802"
,
parentId
:
"90318"
,
sideHidden
:
true
,
...
...
src/views/goods/shelfProduct/components/formProvider/index.vue
View file @
0c637ea
...
...
@@ -270,7 +270,11 @@ export default {
throw
new
Error
(
"正在保存,请稍后"
);
}
const
step
=
this
.
steps
[
this
.
currentStep
];
await
this
.
validate
(
step
.
name
);
try
{
await
this
.
validate
(
step
.
name
);
}
catch
(
err
)
{
console
.
log
(
"校验失败"
,
err
);
}
await
this
.
submitStep
(
step
.
name
);
if
(
next
)
{
this
.
$emit
(
"stepChange"
,
this
.
currentStep
+
1
);
...
...
src/views/goods/shelfProduct/components/shelfProductConfirm/components/combo/components/detail/index.vue
View file @
0c637ea
...
...
@@ -10,6 +10,7 @@
:edit-state=
"VIEW_MODE.VIEW"
:merchant-id-list=
"merchantIdList"
:product=
"productData"
:shelf-type=
"shelfType"
:show-business-line=
"false"
:show-gift-cost=
"false"
:show-penetration-rate=
"false"
...
...
@@ -38,6 +39,10 @@ export default {
type
:
Array
,
default
:
()
=>
[],
},
shelfType
:
{
type
:
Number
,
default
:
1
,
},
packages
:
{
type
:
Object
,
default
:
()
=>
({
}),
...
...
src/views/goods/shelfProduct/components/shelfProductConfirm/components/combo/components/modify/index.vue
View file @
0c637ea
...
...
@@ -150,6 +150,7 @@
:edit-state=
"VIEW_MODE.EDIT"
:merchant-id-list=
"merchantIdList"
:product
.
sync=
"goodsForm"
:shelf-type=
"shelfType"
:show-gift-cost=
"false"
:show-sales-proportion-percent=
"false"
:show-settlement-type=
"false"
...
...
@@ -196,6 +197,10 @@ export default {
type
:
Object
,
default
:
()
=>
({
}),
},
shelfType
:
{
type
:
Number
,
default
:
1
,
},
},
data
()
{
return
{
...
...
src/views/goods/shelfProduct/components/shelfProductConfirm/components/product/components/modify/index.vue
View file @
0c637ea
...
...
@@ -48,6 +48,38 @@
</el-form-item>
</el-col>
<!-- TODO: 改字段名 -->
<el-col
v-if=
"isSingleShopMode(shelfType)"
:span=
"24"
>
<el-form-item
label=
"上架类型:"
prop=
"detailList[0].position"
:rules=
"[{ required: true, message: '请选择上架部位', trigger: 'change' }]"
>
<el-radio-group
v-model=
"product.detailList[0].position"
>
<
template
v-for=
"item in options.shelfClassOptions"
>
<el-radio
:key=
"item.value"
:label=
"item.value"
>
{{
item
.
label
}}
</el-radio>
</
template
>
</el-radio-group>
</el-form-item>
</el-col>
<!-- TODO: 且上架类型的值 为 修改 才显示 -->
<el-col
v-if=
"isSingleShopMode(shelfType) "
:span=
"24"
>
<el-form-item
label=
"原上架ID:"
prop=
"detailList[0].position"
:rules=
"[{ required: true, message: '请选择上架部位', trigger: 'change' }]"
>
<el-radio-group
v-model=
"product.detailList[0].position"
>
<
template
v-for=
"item in options.shelfClassOptions"
>
<el-radio
:key=
"item.value"
:label=
"item.value"
>
{{
item
.
label
}}
</el-radio>
</
template
>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"商品别名:"
prop=
"detailList[0].goodsAlias"
>
<el-input
v-model=
"product.detailList[0].goodsAlias"
...
...
@@ -57,6 +89,21 @@
</el-form-item>
</el-col>
<!-- 仅膜类产品存在 -->
<!-- TODO: 改字段名, options需要获取 -->
<el-col
v-if=
"isSolarFilm(product.detailList[0].upgradeGoods.goodsInfo.goodsType)"
:span=
"12"
>
<el-form-item
label=
"服务项目:"
prop=
"settlementType"
>
<el-select
v-model=
"product.settlementType"
placeholder=
"请选择"
>
<el-option
v-for=
"item in options.settlementType"
:key=
"item.confId"
:label=
"item.confValue"
:value=
"item.confId"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
v-if=
"showSettlementType"
:span=
"12"
>
<el-form-item
label=
"结算方式:"
prop=
"settlementType"
>
<el-select
v-model=
"product.settlementType"
...
...
@@ -129,6 +176,7 @@
</el-form-item>
</el-col>
<!-- TODO: 为空默认为0 , 这里需要前端修改还是后端直接改为0 ? -->
<el-col
v-if=
"isMemberRightsUpgrade(baseSceneCode)"
:span=
"12"
>
<el-form-item
label=
"嘀加成本/件:"
prop=
"djCost"
>
...
...
@@ -140,6 +188,7 @@
</div>
</el-form-item>
</el-col>
<!-- TODO: 需要字段动态判断是否可编辑, 值的获取路径 -->
<el-col
v-if=
"isMemberRightsUpgrade(baseSceneCode)"
:span=
"12"
>
<el-form-item
label=
"第三方成本/件:"
prop=
"detailList[0].thirdPartyCost"
...
...
@@ -222,8 +271,8 @@ import Descriptions from "@/components/descriptions/index.vue";
import
VenusNumberInput
from
"@/components/venusNumberInput/index.vue"
;
import
SelectGoodsDialog
from
"@/views/goods/shelfProduct/components/shelfProductConfirm/components/selectGoods/index.vue"
;
import
{
getProductDetailUpgradeGoodsDescriptionSchema
}
from
"@/views/goods/shelfProduct/components/shelfProductConfirm/shelfProductConfirm.data.js"
;
import
{
inventoryTypeOption
}
from
"@/views/goods/shelfProduct/constant/index.js"
;
import
{
isMemberRightsUpgrade
,
isQualityUpgrade
,
isSolarFilm
}
from
"@/views/goods/shelfProduct/utils/status.js"
;
import
{
inventoryTypeOption
,
shelfClassOptions
}
from
"@/views/goods/shelfProduct/constant/index.js"
;
import
{
isMemberRightsUpgrade
,
isQualityUpgrade
,
isS
ingleShopMode
,
isS
olarFilm
}
from
"@/views/goods/shelfProduct/utils/status.js"
;
import
{
productFromRules
}
from
"../../product.data.js"
;
export
default
{
...
...
@@ -241,6 +290,11 @@ export default {
type
:
String
,
required
:
true
,
},
// 上架类型
shelfType
:
{
type
:
Number
,
default
:
1
,
},
merchantIdList
:
{
type
:
Array
,
required
:
true
,
...
...
@@ -275,6 +329,7 @@ export default {
options
:
{
settlementType
:
settlementTypeOpt
,
inventoryType
:
inventoryTypeOption
,
shelfClassOptions
,
position
:
[],
},
dialog
:
{
...
...
@@ -312,6 +367,7 @@ export default {
isMemberRightsUpgrade
,
isQualityUpgrade
,
isSolarFilm
,
isSingleShopMode
,
showPositionItem
(
position
)
{
return
this
.
product
?.
detailList
[
0
]?.
upgradeGoods
?.
positionList
?.
includes
(
position
);
},
...
...
src/views/goods/shelfProduct/components/shelfProductConfirm/index.vue
View file @
0c637ea
...
...
@@ -12,10 +12,7 @@
:collapse-tags=
"false"
:disabled=
"isEdit()"
:fetch-api=
"getTitleOptions"
:field-name=
"
{
value: 'id',
label: 'productName',
}"
:field-name=
"
{ value: 'id', label: 'productName' }"
:multiple="false"
:options.sync="tabs.list"
:popper-append-to-body="false"
...
...
@@ -89,6 +86,7 @@
:edit-state=
"editState"
:merchant-id-list=
"merchantIdList"
:product=
"productDetail ||
{ detailList: [] }"
:shelf-type="shelfType"
@update:upgradeGoods="handleProductUpdateUpgradeGoods" />
<Combo
v-if=
"productDetail.productType === 2"
:key=
"tabsActive"
...
...
src/views/goods/shelfProduct/constant/index.js
View file @
0c637ea
...
...
@@ -37,6 +37,18 @@ export const realityShopLevelOptions = [
{
realityShopLevel
:
2
,
realityShopLevelName
:
"上级流量方"
},
];
// 上架模式
export
const
shelfModelOptions
=
[
{
value
:
1
,
label
:
"特殊商品上架"
},
{
value
:
2
,
label
:
"常规商品上架"
},
];
// 上架类型
export
const
shelfClassOptions
=
[
{
value
:
1
,
label
:
"新增"
},
{
value
:
2
,
label
:
"修改"
},
];
// 运营周期
export
const
settleTimeOptions
=
[
{
value
:
1
,
label
:
"1"
},
...
...
src/views/goods/shelfProduct/view/normalModify/index.vue
0 → 100644
View file @
0c637ea
This diff is collapsed.
Click to expand it.
src/views/goods/shelfProduct/view/table/index.vue
View file @
0c637ea
...
...
@@ -22,8 +22,12 @@
</
template
>
<div
class=
"d2-container-content"
>
<d2-table-header>
<!-- 新增商品上架 handleModify -->
<span
style=
" display: inline-block; margin-right: 10px"
>
<span
style=
" display:flex; gap:8px; "
>
<!-- 常规上架 handleModify -->
<auth-button
category=
"Button"
:data=
"{ operate: 'create' }"
:show-btn-ids=
"['9031810']"
/>
<!-- 特殊商品上架 handleModify -->
<auth-button
category=
"Button"
:data=
"{ operate: 'create' }"
:show-btn-ids=
"['9031801']"
/>
...
...
@@ -98,6 +102,7 @@ export default {
merchantName
:
""
,
shelfType
:
""
,
sceneType
:
""
,
shelfModel
:
""
,
},
// 表格参数
tableParams
:
{
...
...
@@ -155,6 +160,15 @@ export default {
},
});
},
// 常规上架
handleNormalModify
({
operate
,
record
})
{
console
.
log
(
"????"
);
if
(
operate
===
"create"
)
{
this
.
$router
.
push
({
name
:
"goodsShelfNormalCreate"
,
});
}
},
handleRefreshTable
()
{
this
.
$refs
.
tableRef
.
refreshTable
();
},
...
...
@@ -176,7 +190,6 @@ export default {
},
// 新增 或 修改
handleModify
({
operate
,
record
})
{
console
.
log
(
"record"
,
record
);
if
(
operate
===
"create"
)
{
this
.
$router
.
push
({
name
:
"goodsShelfCreate"
,
...
...
src/views/goods/shelfProduct/view/table/table.data.js
View file @
0c637ea
import
{
cloneDeep
}
from
"lodash-es"
;
import
{
shelfTypeOpt
}
from
"@/common/constants"
;
import
{
Util
}
from
"@/common/util"
;
import
{
sceneTypeOptions
,
statusOptions
}
from
"../../constant/index"
;
import
{
sceneTypeOptions
,
s
helfModelOptions
,
s
tatusOptions
}
from
"../../constant/index"
;
export
const
shelfProductTableFormSchema
=
[
{
...
...
@@ -31,6 +31,15 @@ export const shelfProductTableFormSchema = [
optionLabel
:
"label"
,
},
{
label
:
"上架模式"
,
name
:
"shelfModel"
,
type
:
"select"
,
isClear
:
true
,
optionList
:
cloneDeep
(
shelfModelOptions
),
optionId
:
"value"
,
optionLabel
:
"label"
,
},
{
label
:
"上架类型"
,
name
:
"shelfType"
,
type
:
"select"
,
...
...
@@ -58,6 +67,14 @@ export const shelfProductTableColumn = [
width
:
"180px"
,
},
{
label
:
"上架模式"
,
prop
:
"shelfModel"
,
width
:
"180px"
,
formatter
:
(
row
)
=>
{
return
shelfModelOptions
.
find
(
item
=>
item
.
value
===
row
.
shelfModel
)?.
label
||
"特殊商品上架"
;
},
},
{
label
:
"上架类型"
,
prop
:
"shelfType"
,
width
:
"150px"
,
...
...
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