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 473191f4
authored
Apr 10, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
e78e762b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
155 deletions
src/views/goods/shelfManage/components/common/goodTab.vue
src/views/goods/shelfManage/components/common/packageTab.vue
src/views/goods/shelfManage/components/detailCon/common/goodTab.vue
src/views/goods/shelfManage/components/detailCon/common/packageTab.vue
src/views/goods/shelfManage/components/common/goodTab.vue
View file @
473191f
...
@@ -315,7 +315,13 @@ export default {
...
@@ -315,7 +315,13 @@ export default {
djCost
:
""
,
djCost
:
""
,
thirdPartyCost
:
""
,
thirdPartyCost
:
""
,
businessLine
:
""
,
businessLine
:
""
,
settlementType
:
""
settlementType
:
""
,
createBusinessProduct
:
{
settlementType
:
""
},
upgradeGoods
:
{
djCost
:
""
}
},
},
formRules
:
{
formRules
:
{
upgradeGoodsId
:
[
upgradeGoodsId
:
[
...
@@ -380,10 +386,10 @@ export default {
...
@@ -380,10 +386,10 @@ export default {
filters
:
{
filters
:
{
filterComputedDataPro
(
val
)
{
filterComputedDataPro
(
val
)
{
// console.log(val, "filterComputedDataPro")
// console.log(val, "filterComputedDataPro")
return
[
null
,
""
].
includes
(
val
)
?
val
+
"%"
:
""
return
!
[
null
,
""
].
includes
(
val
)
?
val
+
"%"
:
""
},
},
filterComputedData
(
val
)
{
filterComputedData
(
val
)
{
return
[
null
,
""
].
includes
(
val
)
?
val
+
"元"
:
""
return
!
[
null
,
""
].
includes
(
val
)
?
val
+
"元"
:
""
}
}
},
},
components
:
{
components
:
{
...
...
src/views/goods/shelfManage/components/common/packageTab.vue
View file @
473191f
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"嘀加成本/件:"
prop=
"djCost"
>
<el-form-item
label=
"嘀加成本/件:"
prop=
"djCost"
>
<el-input
<el-input
v-model=
"packageForm.
upgradeGoods.
djCost"
v-model=
"packageForm.djCost"
placeholder=
"根据套餐商品第三方成本自动累加"
placeholder=
"根据套餐商品第三方成本自动累加"
class=
"sortInput"
class=
"sortInput"
disabled
disabled
...
@@ -343,7 +343,7 @@
...
@@ -343,7 +343,7 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"嘀加成本/件:"
prop=
"djCost"
>
<el-form-item
label=
"嘀加成本/件:"
prop=
"djCost"
>
<el-input
<el-input
v-model=
"goodsForm.djCost"
v-model=
"goodsForm.
upgradeGoods.
djCost"
placeholder=
"自动带入产品对应的嘀加成本"
placeholder=
"自动带入产品对应的嘀加成本"
class=
"sortInput"
class=
"sortInput"
disabled
disabled
...
@@ -525,10 +525,10 @@ export default {
...
@@ -525,10 +525,10 @@ export default {
},
},
filters
:
{
filters
:
{
filterComputedDataPro
(
val
)
{
filterComputedDataPro
(
val
)
{
return
[
null
,
""
].
includes
(
val
)
?
val
+
"%"
:
""
return
!
[
null
,
""
].
includes
(
val
)
?
val
+
"%"
:
""
},
},
filterComputedData
(
val
)
{
filterComputedData
(
val
)
{
return
[
null
,
""
].
includes
(
val
)
?
val
+
"元"
:
""
return
!
[
null
,
""
].
includes
(
val
)
?
val
+
"元"
:
""
}
}
},
},
...
...
src/views/goods/shelfManage/components/detailCon/common/goodTab.vue
View file @
473191f
...
@@ -299,12 +299,12 @@ export default {
...
@@ -299,12 +299,12 @@ export default {
loading
:
false
,
loading
:
false
,
formData
:
{
formData
:
{
upgradeGoodsId
:
""
,
upgradeGoodsId
:
""
,
val2
:
""
,
createBusinessProduct
:
{
val3
:
""
,
settlementType
:
""
val4
:
""
,
}
,
val5
:
""
,
upgradeGoods
:
{
val6
:
""
,
djCost
:
""
settlementType
:
""
}
},
},
formRules
:
{
formRules
:
{
upgradeGoodsId
:
[
upgradeGoodsId
:
[
...
@@ -353,10 +353,10 @@ export default {
...
@@ -353,10 +353,10 @@ export default {
filters
:
{
filters
:
{
filterComputedDataPro
(
val
)
{
filterComputedDataPro
(
val
)
{
return
[
null
,
""
].
includes
(
val
)
?
val
+
"%"
:
""
return
!
[
null
,
""
].
includes
(
val
)
?
val
+
"%"
:
""
},
},
filterComputedData
(
val
)
{
filterComputedData
(
val
)
{
return
[
null
,
""
].
includes
(
val
)
?
val
+
"元"
:
""
return
!
[
null
,
""
].
includes
(
val
)
?
val
+
"元"
:
""
},
},
filterData
(
val
)
{
filterData
(
val
)
{
if
(
val
)
{
if
(
val
)
{
...
...
src/views/goods/shelfManage/components/detailCon/common/packageTab.vue
View file @
473191f
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
ref=
"packageFrom"
ref=
"packageFrom"
class=
"packageFrom d2-container-content"
class=
"packageFrom d2-container-content"
:model=
"packageForm"
:model=
"packageForm"
:rules=
"packageFormRules"
label-width=
"130px"
label-width=
"130px"
>
>
<el-row>
<el-row>
...
@@ -57,9 +56,9 @@
...
@@ -57,9 +56,9 @@
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"结算方式:"
prop=
"settlementType"
>
<el-form-item
label=
"结算方式:"
prop=
"settlementType"
>
<el-select
<!--
<el-select
v-model=
"packageForm.createBusinessProduct.settlementType"
disabled
disabled
v-model=
"packageForm.createBusinessProduct.settlementType"
placeholder=
"请选择"
placeholder=
"请选择"
class=
"sortInput"
class=
"sortInput"
>
>
...
@@ -70,7 +69,7 @@
...
@@ -70,7 +69,7 @@
:value=
"item.confId"
:value=
"item.confId"
>
>
</el-option>
</el-option>
</el-select>
</el-select>
-->
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -103,10 +102,9 @@
...
@@ -103,10 +102,9 @@
<el-form-item
label=
"嘀加成本/件:"
prop=
"djCost"
>
<el-form-item
label=
"嘀加成本/件:"
prop=
"djCost"
>
<el-input
<el-input
disabled
disabled
v-model=
"packageForm.
upgradeGoods.
djCost"
v-model=
"packageForm.djCost"
placeholder=
"根据套餐商品第三方成本自动累加"
placeholder=
"根据套餐商品第三方成本自动累加"
class=
"sortInput"
class=
"sortInput"
disabled
/>
元
/>
元
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -330,10 +328,9 @@
...
@@ -330,10 +328,9 @@
<el-form-item
label=
"嘀加成本/件:"
prop=
"djCost"
>
<el-form-item
label=
"嘀加成本/件:"
prop=
"djCost"
>
<el-input
<el-input
disabled
disabled
v-model=
"goodsForm.djCost"
v-model=
"goodsForm.
upgradeGoods.
djCost"
placeholder=
"自动带入产品对应的参考售价"
placeholder=
"自动带入产品对应的参考售价"
class=
"sortInput"
class=
"sortInput"
disabled
/>
元
/>
元
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -389,55 +386,12 @@ export default {
...
@@ -389,55 +386,12 @@ export default {
packageForm
:
{
packageForm
:
{
timeId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
timeId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
goodsId
:
null
,
goodsId
:
null
,
val1
:
""
,
createBusinessProduct
:
{
val2
:
""
,
settlementType
:
""
val3
:
""
,
},
val4
:
""
,
upgradeGoods
:
{
val5
:
""
,
djCost
:
""
val6
:
""
}
},
packageFormRules
:
{
val1
:
[
{
required
:
true
,
message
:
"请输入套餐名称"
,
trigger
:
"blur"
}
],
val3
:
[
{
required
:
true
,
message
:
"请输入售价"
,
trigger
:
"blur"
}
],
val4
:
[
{
required
:
true
,
message
:
"请输入最低售价"
,
trigger
:
"blur"
}
],
val5
:
[
{
required
:
true
,
message
:
"请输入嘀加成本"
,
trigger
:
"blur"
}
],
val6
:
[
{
required
:
true
,
message
:
"请输入第三方成本"
,
trigger
:
"blur"
}
]
},
oldVal
:
{
val3
:
""
,
val4
:
""
,
val5
:
""
,
val6
:
""
},
},
goodsList
:
[],
goodsList
:
[],
businessLineOpt
:
deepClone
(
businessLineOpt
),
businessLineOpt
:
deepClone
(
businessLineOpt
),
...
@@ -447,10 +401,10 @@ export default {
...
@@ -447,10 +401,10 @@ export default {
filters
:
{
filters
:
{
filterComputedDataPro
(
val
)
{
filterComputedDataPro
(
val
)
{
return
[
null
,
""
].
includes
(
val
)
?
val
+
"%"
:
""
return
!
[
null
,
""
].
includes
(
val
)
?
val
+
"%"
:
""
},
},
filterComputedData
(
val
)
{
filterComputedData
(
val
)
{
return
[
null
,
""
].
includes
(
val
)
?
val
+
"元"
:
""
return
!
[
null
,
""
].
includes
(
val
)
?
val
+
"元"
:
""
},
},
filterData
(
val
)
{
filterData
(
val
)
{
if
(
val
)
{
if
(
val
)
{
...
@@ -465,10 +419,9 @@ export default {
...
@@ -465,10 +419,9 @@ export default {
async
mounted
()
{
async
mounted
()
{
if
(
this
.
info
)
{
if
(
this
.
info
)
{
//
console.log("info", this.info)
console
.
log
(
"info"
,
this
.
info
)
this
.
packageForm
=
deepClone
(
this
.
info
)
this
.
packageForm
=
deepClone
(
this
.
info
)
this
.
goodsList
=
deepClone
(
this
.
info
.
merchantGoodsInfoList
)
this
.
goodsList
=
deepClone
(
this
.
info
.
merchantGoodsInfoList
)
this
.
handleData
(
this
.
goodsList
)
}
}
},
},
...
@@ -477,53 +430,6 @@ export default {
...
@@ -477,53 +430,6 @@ export default {
get
:
"d2admin/base/get"
,
get
:
"d2admin/base/get"
,
close
:
"d2admin/page/close"
close
:
"d2admin/page/close"
}),
}),
handleData
(
goodsList
)
{
goodsList
=
goodsList
.
map
((
item
)
=>
{
const
_formData
=
item
const
{
goodsTypeName
,
secondaryGoodsTypeName
,
thirdLevelGoodsTypeName
}
=
_formData
?.
goodsInfo
||
{}
const
types
=
[
goodsTypeName
,
secondaryGoodsTypeName
,
thirdLevelGoodsTypeName
]
const
result
=
types
.
filter
((
type
)
=>
type
).
join
(
"-"
)
_formData
.
upgradeGoods_temporary
=
{
upgradeGoodsName
:
_formData
.
upgradeGoodsName
,
goodsName
:
_formData
.
goodsInfo
?.
goodsName
,
tempGoodsTypeName
:
result
,
serviceItemNames
:
_formData
.
upgradeGoods
?.
upgradeGoodsServiceItemsList
?.
map
((
item
)
=>
{
return
`
${
item
.
serviceName
}
-
${
item
.
serviceGrade
}
/
${
item
.
servicePeriod
}
$
{
item
.
serviceItemId
?
`/
${
convertYuanToWan
(
item
.
minPrice
)}
-
${
convertYuanToWan
(
item
.
maxPrice
)}
万`
:
""
}
`
})
?.join(","), // 服务项目
specificationData: this.filterSpecsStr(_formData.upgradeGoods),
djCost: _formData.upgradeGoods?.djCost,
carTypeConfigName: _formData.upgradeGoods?.carTypeConfigList
?.map((item) => item.seriesName)
.join("/"),
upgradeCommodityCode: _formData.upgradeGoods?.commodityCode,
purchasePrice: _formData.upgradeGoods?.purchasePrice,
upgradePrice: _formData.upgradeGoods?.upgradePrice,
type: _formData.upgradeGoods?.type,
thirdPartyCode: _formData.upgradeGoods?.thirdPartyCode
}
_formData.upgradeGoods = {}
_formData.upgradeGoods = deepClone(_formData.upgradeGoods_temporary)
return _formData
})
},
async
getBaseData
()
{},
async
getBaseData
()
{},
// 处理金额补零
// 处理金额补零
priceFilter
(
num
)
{
priceFilter
(
num
)
{
...
@@ -537,42 +443,10 @@ export default {
...
@@ -537,42 +443,10 @@ export default {
checkName
(
e
)
{
checkName
(
e
)
{
console
.
log
(
"e.target.value"
,
e
.
target
.
value
)
console
.
log
(
"e.target.value"
,
e
.
target
.
value
)
if
(
e
.
target
.
value
)
{
if
(
e
.
target
.
value
)
{
// const obj = {
// name: e.target.value,
// timeId: this.timeId
// }
this
.
returnData
()
this
.
returnData
()
}
}
},
},
addGoodsItem
()
{
this
.
goodsList
.
push
({
val1
:
""
,
val2
:
""
,
val3
:
""
,
val4
:
""
,
val5
:
""
,
val6
:
""
})
},
val3_handleInput
(
newVal
)
{
this
.
form
.
val3
=
limitPrice
(
newVal
,
this
.
oldVal
.
val3
,
6
,
2
,
0
,
999999
)
this
.
oldVal
.
val3
=
this
.
form
.
val3
},
val4_handleInput
(
newVal
)
{
this
.
form
.
val4
=
limitPrice
(
newVal
,
this
.
oldVal
.
val4
,
6
,
2
,
0
,
999999
)
this
.
oldVal
.
val4
=
this
.
form
.
val4
},
val5_handleInput
(
newVal
)
{
this
.
form
.
val5
=
limitPrice
(
newVal
,
this
.
oldVal
.
val5
,
6
,
2
,
0
,
999999
)
this
.
oldVal
.
val5
=
this
.
form
.
val5
},
val6_handleInput
(
newVal
)
{
this
.
form
.
val6
=
limitPrice
(
newVal
,
this
.
oldVal
.
val6
,
6
,
2
,
0
,
999999
)
this
.
oldVal
.
val6
=
this
.
form
.
val6
},
returnData
()
{
returnData
()
{
this
.
$emit
(
"packageEditInfo"
,
{
this
.
$emit
(
"packageEditInfo"
,
{
info
:
this
.
packageForm
,
info
:
this
.
packageForm
,
...
...
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