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 d6eeb4ad
authored
Mar 10, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 三月中旬上架管理新增售价有效期功能开发
1 parent
afe82fab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
12 deletions
src/views/goods/components/selectGoodsDialog.vue
src/views/goods/grounding/components/groundingForm.vue
src/views/goods/grounding/editGrounding.vue
src/views/goods/grounding/groundingDetail.vue
src/views/goods/grounding/index.vue
src/views/goods/components/selectGoodsDialog.vue
View file @
d6eeb4a
...
...
@@ -8,8 +8,10 @@
:clearable="true" :maxlength="50" @input="event => searchInput(event, 'commodityCode')" />
</
template
>
<
template
slot=
"type"
>
<el-input
:style=
"
{ width: '100%' }" placeholder="请输入商品编码" v-model.trim="searchForm['type']" :clearable="true"
:maxlength="50" @input="event => searchInput(event, 'type')" />
<!--
<el-input
:style=
"
{ width: '100%' }" placeholder="请输入商品编码" v-model.trim="searchForm['type']" :clearable="true"
:maxlength="50" @input="event => searchInput(event, 'type')" /> -->
<el-input
:style=
"
{ width: '100%' }" placeholder="请输入商品编码" v-model.trim="searchForm['type']" :clearable="true"
:maxlength="50" />
</
template
>
<
template
slot=
"thirdPartyCode"
>
<el-input
:style=
"
{ width: '100%' }" placeholder="请输入第三方编码" v-model.trim="searchForm['thirdPartyCode']"
...
...
src/views/goods/grounding/components/groundingForm.vue
View file @
d6eeb4a
...
...
@@ -269,7 +269,7 @@
>
{{
subItem
.
label
}}
<
/el-radi
o
>
<
/el-radio-group
>
<
el
-
tooltip
class
=
"item"
effect
=
"dark"
placement
=
"top"
>
<
el
-
tooltip
v
-
if
=
"item.name === 'financeCheckFlag'"
class
=
"item"
effect
=
"dark"
placement
=
"top"
>
<
template
slot
=
"content"
>
<
p
style
=
"width: 260px"
>
<
i
class
=
"el-icon-info"
><
/
i
...
...
@@ -280,6 +280,22 @@
<
/el-tooltip
>
<
/el-form-item
>
<
/div
>
<
div
v
-
if
=
"item.type === 'datePicker' && formData.sellPriceValidType == '2'"
>
<
el
-
form
-
item
:
prop
=
"item.name"
:
label
=
"item.label ? item.label + ':' : ''"
:
id
=
"item.name"
:
label
-
width
=
"item.label ? '180px' : '0px'"
class
=
"dis-in-block"
:
style
=
"
{
'margin-bottom'
:
!
item
.
type
?
'0px'
:
'22px'
}
"
>
<template >
<el-date-picker v-model="
formData
[
item
.
name
]
" type="
daterange
" :style="
{
width
:
item
.
width
||
formItemWidth
}
" range-separator="
至
" format="
yyyy
-
MM
-
dd
" value-format="
yyyy
-
MM
-
dd
" start-placeholder="
开始日期
" end-placeholder="
结束日期
"> </el-date-picker>
</template>
</el-form-item>
</div>
<!-- 按钮 -->
<div v-if="
item
.
type
===
'button'
">
<el-form-item
...
...
@@ -638,7 +654,13 @@ export default {
message
:
"请选择是否开启财务规则校验"
,
trigger
:
"change"
}
]
],
sellPriceValidType
:
[
{
required
:
true
,
message
:
"请选择售价有效期"
,
trigger
:
"change"
}
],
tempValidDate
:
[
{
required
:
true
,
message
:
"请选择有效期"
,
trigger
:
"blur"
}
],
}
,
storeSelected
:
[],
relateStoreVisible
:
false
,
...
...
@@ -1230,7 +1252,14 @@ export default {
handleUp
(
e
)
{
this
.
$refs
[
this
.
formRef
+
"d2FormRuleForm"
].
validate
((
valid
,
options
)
=>
{
if
(
valid
)
{
this
.
$emit
(
"handleAddConfirm"
,
{
...
this
.
formData
,
num
:
e
}
)
const
{
tempValidDate
}
=
this
.
formData
;
let
tempValidStartDate
=
''
;
let
tempValidEndDate
=
''
;
if
(
this
.
formData
.
sellPriceValidType
==
'2'
){
tempValidStartDate
=
tempValidDate
[
0
]
||
''
;
tempValidEndDate
=
tempValidDate
[
1
]
||
''
;
}
this
.
$emit
(
"handleAddConfirm"
,
{
...
this
.
formData
,
tempValidStartDate
,
tempValidEndDate
,
num
:
e
}
)
}
else
{
var
needRuleList
=
Object
.
keys
(
options
)
this
.
jumpScroll
(
needRuleList
[
0
])
...
...
src/views/goods/grounding/editGrounding.vue
View file @
d6eeb4a
...
...
@@ -14,7 +14,7 @@ import { getMerchantGoodsInfo, addOrUpdateAPI, checkGroundingLog } from '@api/gr
import
groundingForm
from
"./components/groundingForm.vue"
import
{
BaseData
,
sceneCodeList
}
from
'@/common/constants.js'
import
{
mapActions
}
from
'vuex'
import
{
deepClone
}
from
'@/common/util'
import
{
deepClone
,
Util
}
from
'@/common/util'
import
{
baseConfig
}
from
'@/main'
import
{
filterSpecsStr
,
convertYuanToWan
}
from
"../filterOption"
export
default
{
...
...
@@ -177,6 +177,23 @@ export default {
width
:
'432px'
,
unit
:
true
,
handleInput
:
true
},{
name
:
'sellPriceValidType'
,
label
:
'售价有效期'
,
type
:
'flagRadio'
,
radioGroupList
:
[{
label
:
'终生有效'
,
value
:
1
},
{
label
:
'临时有效'
,
value
:
2
}]
},
{
name
:
'tempValidDate'
,
label
:
'有效期'
,
type
:
'datePicker'
,
maxlength
:
120
,
width
:
'432px'
},
{
name
:
'financeCheckFlag'
,
label
:
'财务规则校验'
,
...
...
@@ -234,6 +251,8 @@ export default {
voucherList
:
[],
validMinSellPriceFlag
:
true
,
validMinSellPrice
:
'Y'
,
sellPriceValidType
:
1
,
tempValidDate
:
[],
financeCheckFlag
:
'N'
},
secondGoodsList
:
[],
...
...
@@ -303,6 +322,13 @@ export default {
})
res
.
merchantGoodsRefList
=
res
.
merchantGoodsRefList
||
[]
// 上架门店
res
.
voucherList
=
res
.
voucherList
||
[]
// 上架凭证
let
tempValidDate
=
[];
if
(
res
?.
sellPriceValidType
&&
res
?.
sellPriceValidType
==
2
){
if
(
res
?.
tempValidStartDate
&&
res
?.
tempValidEndDate
){
tempValidDate
=
[
Util
.
dateFormate
(
res
?.
tempValidStartDate
,
'YYYY-MM-DD'
),
Util
.
dateFormate
(
res
?.
tempValidEndDate
,
'YYYY-MM-DD'
)]
}
}
res
.
tempValidDate
=
tempValidDate
res
.
upgradeGoods
=
{
...
res
?.
upgradeGoods
,
goodsName
:
res
.
goodsInfo
.
goodsName
,
...
...
@@ -313,7 +339,9 @@ export default {
positionNames
:
positionNamesArr
.
length
?
positionNamesArr
.
map
(
subItem
=>
{
return
subItem
?.
confName
}).
join
(
'/'
)
:
''
,
specificationData
:
this
.
filterSpecsStr
(
res
?.
upgradeGoods
),
carTypeConfigName
:
res
?.
upgradeGoods
?.
carTypeConfigList
?.
map
(
item
=>
item
.
seriesName
).
join
(
'/'
),
upgradeCommodityCode
:
res
?.
upgradeGoods
?.
commodityCode
upgradeCommodityCode
:
res
?.
upgradeGoods
?.
commodityCode
,
sellPriceValidType
:
res
?.
sellPriceValidType
?
res
?.
sellPriceValidType
+
''
:
'1'
,
tempValidDate
:
tempValidDate
,
}
this
.
editData
=
res
||
{}
this
.
$nextTick
(()
=>
{
...
...
@@ -364,14 +392,19 @@ export default {
})
// 整理上传凭证数据
delete
formObj
?.
productType
cons
t
params
=
{
le
t
params
=
{
saveDraft
:
num
===
2
,
// 是否存草稿
id
:
data
.
id
,
...
formObj
,
merchantGoodsRefList
:
arr
,
voucherList
:
fileArr
,
existCheck
,
validMinSellPrice
:
data
?.
validMinSellPrice
validMinSellPrice
:
data
?.
validMinSellPrice
,
tempValidStartDate
:
data
?.
tempValidStartDate
||
''
,
tempValidEndDate
:
data
?.
tempValidEndDate
||
''
,
}
if
(
params
.
tempValidDate
){
delete
params
.
tempValidDate
}
if
(
data
?.
goodsType
==
1
&&
data
?.
sceneType
!=
1
)
return
this
.
$message
.
warning
(
'太阳膜类商品仅支持上架至精品升级场景'
)
if
(
this
.
extendedPosiType
.
includes
(
data
.
goodsType
)
&&
data
?.
sceneType
!=
0
)
return
this
.
$message
.
warning
(
'延保类商品仅支持上架至会员/权益升级场景'
)
...
...
@@ -381,7 +414,12 @@ export default {
upgradeGoodsId
:
formObj
.
upgradeGoodsId
,
position
:
formObj
.
position
||
''
,
sceneType
:
formObj
.
sceneType
,
merchantIdList
:
arr
?.
map
(
val
=>
{
return
val
.
merchantId
})
merchantIdList
:
arr
?.
map
(
val
=>
{
return
val
.
merchantId
}),
tempValidStartDate
:
data
?.
tempValidStartDate
||
''
,
tempValidEndDate
:
data
?.
tempValidEndDate
||
''
,
}
if
(
params
.
tempValidDate
){
delete
params
.
tempValidDate
}
if
((
num
==
1
||
num
==
3
)
&&
!
baseConfig
.
supplierCode
.
includes
(
data
.
supplierCode
))
{
// 第三方商品无需走审核流程不用提示
this
.
$confirm
(
'<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?'
,
'提示'
,
{
...
...
src/views/goods/grounding/groundingDetail.vue
View file @
d6eeb4a
...
...
@@ -3,8 +3,8 @@
<d2-container
class=
"edit-commodity"
>
<div
class=
""
v-if=
"show"
>
<detail
ref=
"d2GroundingDetail"
:rules=
"rules"
form-name=
"grounding"
:origin-data=
"editData"
:form-list=
"editForm"
:product-service-item-list=
"productServiceItemList"
@
handleAddConfirm=
"handleAddConfirm"
@
handleClose=
"handleAddClose"
></detail>
:product-service-item-list=
"productServiceItemList"
@
handleAddConfirm=
"handleAddConfirm"
@
handleClose=
"handleAddClose"
></detail>
</div>
</d2-container>
</
template
>
...
...
@@ -41,6 +41,7 @@ export default {
warrantyTypeStr
:
[{
required
:
true
}],
djCost
:
[{
required
:
true
}],
thirdPartyCost
:
[{
required
:
true
}],
sellPriceValidType
:
[{
required
:
true
}],
financeCheckFlagStr
:
[{
required
:
true
}]
},
editForm
:
[{
...
...
@@ -134,6 +135,9 @@ export default {
label
:
'第三方成本'
,
unit
:
true
},
{
name
:
'sellPriceValidType'
,
label
:
'售价有效期'
,
},
{
name
:
'financeCheckFlagStr'
,
label
:
'财务规则校验'
}]
...
...
@@ -221,6 +225,13 @@ export default {
res
.
positionStr
=
deepClone
(
this
.
positionTypeList
)?.
filter
(
val
=>
res
?.
position
==
val
.
position
)[
0
]?.
confName
||
''
res
.
supplierCode
=
res
?.
goodsInfo
?.
supplierCode
res
.
financeCheckFlagStr
=
res
?.
financeCheckFlag
==
'Y'
?
'开启'
:
res
?.
financeCheckFlag
==
'N'
?
'关闭'
:
'-'
let
sellPriceValidTxt
=
''
if
(
res
?.
sellPriceValidType
==
2
&&
res
?.
tempValidStartDate
&&
res
?.
tempValidEndDate
)
{
sellPriceValidTxt
=
`
${
Util
.
dateFormate
(
res
?.
tempValidStartDate
,
'YYYY-MM-DD'
)}
至
$
{
Util
.
dateFormate
(
res
?.
tempValidEndDate
,
'YYYY-MM-DD'
)}
`
}
res.sellPriceValidType = res?.sellPriceValidType == 1 ? '终生有效' : res?.sellPriceValidType == 2 ? sellPriceValidTxt : '-'
res.upgradeGoods = {
...res.upgradeGoods,
goodsName: res.goodsInfo.goodsName,
...
...
src/views/goods/grounding/index.vue
View file @
d6eeb4a
This diff is collapsed.
Click to expand it.
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