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 92c91fb1
authored
Jan 22, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商品编辑-零售价格+阳光激励费;到店价<升级价
1 parent
6747a13e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
63 deletions
src/components/d2-form/index.vue
src/components/d2-form/relateProDialog.vue
src/views/goods/editCommodity.vue
src/components/d2-form/index.vue
View file @
92c91fb
This diff is collapsed.
Click to expand it.
src/components/d2-form/relateProDialog.vue
View file @
92c91fb
...
@@ -138,6 +138,22 @@
...
@@ -138,6 +138,22 @@
</el-input>
</el-input>
</el-form-item>
</el-form-item>
</div>
</div>
<div
class=
"w-50"
>
<el-form-item
label=
"零售价格"
>
<el-input
v-model=
"proInfo.retailPrice"
placeholder=
"请输入零售价格"
clearable
class=
"dis-in-block"
@
input=
"handleRetailPrice"
>
<i
slot=
"suffix"
class=
"input-suffix"
>
元
</i>
</el-input>
</el-form-item>
</div>
</el-form>
</el-form>
</div>
</div>
<div
class=
"relateProDialog flex"
>
<div
class=
"relateProDialog flex"
>
...
@@ -195,6 +211,23 @@
...
@@ -195,6 +211,23 @@
style=
"width: calc(100% - 180px)"
style=
"width: calc(100% - 180px)"
>
>
<div
class=
"w-50"
>
<div
class=
"w-50"
>
<el-form-item
label=
"阳光激励费"
title=
"每笔订单分配给合作商的金额结算比例。"
prop=
"incentiveCost"
>
<el-input
v-model=
"proInfo.incentiveCost"
@
input=
"handleIncentiveCost"
placeholder=
"请输入阳光激励费"
class=
"dis-in-block"
>
<i
slot=
"suffix"
class=
"input-suffix"
>
元
</i>
</el-input>
</el-form-item>
</div>
</div>
<div
class=
"w-50"
>
<div
class=
"w-50"
>
<el-form-item
<el-form-item
...
@@ -250,7 +283,14 @@ export default {
...
@@ -250,7 +283,14 @@ export default {
rules
:
{
rules
:
{
goodsCode
:
[{
required
:
true
,
message
:
'请选择关联升级商品'
,
trigger
:
'change'
}],
goodsCode
:
[{
required
:
true
,
message
:
'请选择关联升级商品'
,
trigger
:
'change'
}],
upgradePrice
:
[{
required
:
true
,
message
:
'请输入建议升级价'
,
trigger
:
'blur'
}],
upgradePrice
:
[{
required
:
true
,
message
:
'请输入建议升级价'
,
trigger
:
'blur'
}],
shopPrice
:
[{
required
:
true
,
message
:
'请输入到店价'
,
trigger
:
'blur'
}],
shopPrice
:
[
{
required
:
true
,
message
:
'请输入到店价'
,
trigger
:
'blur'
},
{
trigger
:
'blur'
,
validator
:
(
rule
,
value
,
callback
)
=>
{
(
+
value
>
+
this
.
proInfo
.
upgradePrice
)
?
callback
(
new
Error
(
'到店价需小于建议升级价格'
))
:
callback
()
}
}
],
profitType
:
[{
required
:
true
,
message
:
'请输入分润规则'
,
trigger
:
'change'
}],
profitType
:
[{
required
:
true
,
message
:
'请输入分润规则'
,
trigger
:
'change'
}],
profitValue
:
[{
required
:
true
,
message
:
'请输入分润比例'
,
trigger
:
'blur'
}],
profitValue
:
[{
required
:
true
,
message
:
'请输入分润比例'
,
trigger
:
'blur'
}],
partnerProfitPer
:
[{
required
:
true
,
message
:
'请输入分润比例'
,
trigger
:
'blur'
}]
partnerProfitPer
:
[{
required
:
true
,
message
:
'请输入分润比例'
,
trigger
:
'blur'
}]
...
@@ -301,7 +341,6 @@ export default {
...
@@ -301,7 +341,6 @@ export default {
// console.log(value)
// console.log(value)
},
},
handleRelateProConfirm
()
{
handleRelateProConfirm
()
{
console
.
log
(
this
.
proInfo
)
this
.
$refs
.
proRuleForm1
.
validate
(
valid1
=>
{
this
.
$refs
.
proRuleForm1
.
validate
(
valid1
=>
{
this
.
$refs
.
proRuleForm2
.
validate
(
valid2
=>
{
this
.
$refs
.
proRuleForm2
.
validate
(
valid2
=>
{
this
.
$refs
.
proRuleForm3
.
validate
(
valid3
=>
{
this
.
$refs
.
proRuleForm3
.
validate
(
valid3
=>
{
...
@@ -338,6 +377,14 @@ export default {
...
@@ -338,6 +377,14 @@ export default {
handleExtraCost
(
newVal
)
{
handleExtraCost
(
newVal
)
{
this
.
proInfo
.
extraCost
=
limitPrice
(
newVal
,
this
.
oldVal
.
extraCost
,
8
,
2
)
this
.
proInfo
.
extraCost
=
limitPrice
(
newVal
,
this
.
oldVal
.
extraCost
,
8
,
2
)
this
.
oldVal
.
extraCost
=
this
.
proInfo
.
extraCost
this
.
oldVal
.
extraCost
=
this
.
proInfo
.
extraCost
},
handleRetailPrice
(
newVal
)
{
this
.
proInfo
.
retailPrice
=
limitPrice
(
newVal
,
this
.
oldVal
.
retailPrice
,
6
,
2
)
this
.
oldVal
.
retailPrice
=
this
.
proInfo
.
retailPrice
},
handleIncentiveCost
(
newVal
)
{
this
.
proInfo
.
incentiveCost
=
limitPrice
(
newVal
,
this
.
oldVal
.
incentiveCost
,
6
,
2
)
this
.
oldVal
.
incentiveCost
=
this
.
proInfo
.
incentiveCost
}
}
}
}
}
}
...
...
src/views/goods/editCommodity.vue
View file @
92c91fb
...
@@ -50,32 +50,18 @@ export default {
...
@@ -50,32 +50,18 @@ export default {
rules
:
{
rules
:
{
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择园区店'
,
trigger
:
'change'
}],
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择园区店'
,
trigger
:
'change'
}],
goodsCode
:
[{
required
:
true
,
message
:
'请选择产品名称'
,
trigger
:
'change'
}],
goodsCode
:
[{
required
:
true
,
message
:
'请选择产品名称'
,
trigger
:
'change'
}],
shopPrice
:
[{
required
:
true
,
message
:
'请输入到店价'
,
trigger
:
'blur'
}],
shopPrice
:
[
{
required
:
true
,
message
:
'请输入到店价'
,
trigger
:
'blur'
},
{
trigger
:
'blur'
,
validator
:
(
rule
,
value
,
callback
)
=>
{
(
+
value
>
+
this
.
markOldVal
.
retailPrice
)
?
callback
(
new
Error
(
'到店价需小于建议升级价'
))
:
callback
()
}
}
],
linkMerchantIds
:
[{
required
:
true
,
message
:
'请选择关联门店'
,
trigger
:
'change'
}]
linkMerchantIds
:
[{
required
:
true
,
message
:
'请选择关联门店'
,
trigger
:
'change'
}]
},
},
// headImg: {
// isHas: true,
// attr: 'thumbUrl'
// },
comFormRef
:
'com'
,
comFormRef
:
'com'
,
editForm
:
[
editForm
:
[{
// {
// title: '',
// formBlock: [{
// name: 'yqMerchantId',
// label: '园区店',
// isRequired: true,
// type: 'select',
// isHide: true,
// // tips: '选择基础商品',
// isClear: false,
// optionList: [],
// isDisabled: true,
// optionId: 'merchantId',
// optionLabel: 'merchantName'
// }]
// },
{
title
:
'基础商品信息'
,
title
:
'基础商品信息'
,
width
:
'50%'
,
width
:
'50%'
,
headImg
:
{
headImg
:
{
...
@@ -127,41 +113,7 @@ export default {
...
@@ -127,41 +113,7 @@ export default {
this
.
markOldVal
.
retailPrice
=
this
.
$refs
.
d2Form
.
formData
.
retailPrice
this
.
markOldVal
.
retailPrice
=
this
.
$refs
.
d2Form
.
formData
.
retailPrice
}
}
}]
}]
},
},
{
// {
// title: '价格信息',
// formBlock: [{
// name: 'retailPrice',
// label: '商品零售价',
// type: 'input',
// unit: '元',
// tips: '(前端展示给车主)',
// handleInput: (newVal) => {
// this.$refs.d2Form.formData.retailPrice = limitPrice(newVal, this.markOldVal.retailPrice, 6, 2)
// this.markOldVal.retailPrice = this.$refs.d2Form.formData.retailPrice
// }
// }, {
// name: 'shopPrice',
// label: '到店价',
// type: 'input',
// unit: '元',
// tips: '(商品最终交易价格)',
// handleInput: (newVal) => {
// this.$refs.d2Form.formData.shopPrice = limitPrice(newVal, this.markOldVal.shopPrice, 6, 2)
// this.markOldVal.shopPrice = this.$refs.d2Form.formData.shopPrice
// }
// }, {
// name: 'maxRetailDiscount',
// label: '到店零售折扣',
// type: 'input',
// unit: '折',
// handleInput: (newVal) => {
// this.$refs.d2Form.formData.maxRetailDiscount = limitPrice(newVal, this.markOldVal.maxRetailDiscount, 1, 1, 1)
// this.markOldVal.maxRetailDiscount = this.$refs.d2Form.formData.maxRetailDiscount
// }
// }]
// },
{
title
:
'绑定升级商品'
,
title
:
'绑定升级商品'
,
formBlock
:
[{
formBlock
:
[{
name
:
'upgradeGoods'
,
name
:
'upgradeGoods'
,
...
@@ -192,7 +144,7 @@ export default {
...
@@ -192,7 +144,7 @@ export default {
this
.
addOrEdit
=
this
.
$route
.
params
.
addOrEdit
this
.
addOrEdit
=
this
.
$route
.
params
.
addOrEdit
// !this.userInfo.beSuper && (this.editForm.splice(0, 1)) && this.getGoodsList(this.userInfo.detail.merchantId)
// !this.userInfo.beSuper && (this.editForm.splice(0, 1)) && this.getGoodsList(this.userInfo.detail.merchantId)
!
this
.
userInfo
.
beSuper
&&
this
.
getGoodsList
(
this
.
userInfo
.
detail
.
merchantId
)
!
this
.
userInfo
.
beSuper
&&
this
.
getGoodsList
(
this
.
userInfo
.
detail
.
merchantId
)
console
.
log
(
this
.
editForm
)
//
console.log(this.editForm)
if
(
this
.
addOrEdit
===
'edit'
)
{
if
(
this
.
addOrEdit
===
'edit'
)
{
getGoodsInfoById
({
id
:
this
.
$route
.
params
.
row
.
id
}).
then
(
res
=>
{
getGoodsInfoById
({
id
:
this
.
$route
.
params
.
row
.
id
}).
then
(
res
=>
{
// console.log(res)
// console.log(res)
...
@@ -220,7 +172,7 @@ export default {
...
@@ -220,7 +172,7 @@ export default {
}),
}),
linkMerchantIds
:
res
.
merchantRefList
?
res
.
merchantRefList
.
map
(
item
=>
Object
.
assign
(
item
,
item
.
merchantInfo
))
:
[]
linkMerchantIds
:
res
.
merchantRefList
?
res
.
merchantRefList
.
map
(
item
=>
Object
.
assign
(
item
,
item
.
merchantInfo
))
:
[]
}
}
console
.
log
(
this
.
editData
)
//
console.log(this.editData)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
show
=
true
this
.
show
=
true
})
})
...
@@ -251,7 +203,7 @@ export default {
...
@@ -251,7 +203,7 @@ export default {
},
},
handleAddConfirm
(
data
)
{
handleAddConfirm
(
data
)
{
// console.log(data)
// console.log(data)
var
upgradeGoodsAttr
=
[
'goodsCode'
,
'shopPrice'
,
'maxUpgradeDiscount'
,
'
upgradePrice'
,
'profitType'
,
'profitValue'
,
'extra
Cost'
,
'partnerProfitPer'
]
var
upgradeGoodsAttr
=
[
'goodsCode'
,
'shopPrice'
,
'maxUpgradeDiscount'
,
'
retailPrice'
,
'upgradePrice'
,
'profitType'
,
'profitValue'
,
'extraCost'
,
'incentive
Cost'
,
'partnerProfitPer'
]
var
params
=
{
var
params
=
{
yqMerchantId
:
this
.
userInfo
.
beSuper
?
data
.
yqMerchantId
:
this
.
userInfo
.
detail
.
merchantId
,
yqMerchantId
:
this
.
userInfo
.
beSuper
?
data
.
yqMerchantId
:
this
.
userInfo
.
detail
.
merchantId
,
goodsCode
:
data
.
goodsCode
,
goodsCode
:
data
.
goodsCode
,
...
...
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