Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-mall
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 2aaec9fc
authored
Aug 17, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商品类型单级可选处理、对兑换价、批量改价处理、售后订单详情、商品订单详情用积分字段做判断
1 parent
aff7e6eb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
37 deletions
src/views/goodsOrder/detail.vue
src/views/pointProducts/detail.vue
src/views/pointProducts/index.vue
src/views/pointProducts/setPriceDialog.vue
src/views/pointProducts/wDetail.vue
src/views/pointProducts/warehouse.vue
src/views/saleOrder/detail.vue
src/views/goodsOrder/detail.vue
View file @
2aaec9f
...
...
@@ -117,7 +117,7 @@ export default {
label
:
'单价 (元)'
,
prop
:
'salePrice'
,
formatter
:
cell
=>
{
return
cell
.
businessType
==
1
?
cell
.
redeemPoints
+
'积分'
+
cell
.
salePrice
+
'元'
:
cell
.
salePrice
return
cell
.
redeemPoints
?
cell
.
redeemPoints
+
'积分'
+
cell
.
salePrice
+
'元'
:
cell
.
salePrice
+
'元'
}
},
{
...
...
@@ -134,7 +134,7 @@ export default {
label
:
'实收金额 (元)'
,
prop
:
'orderAmount'
,
formatter
:
cell
=>
{
return
cell
.
businessType
==
1
?
cell
.
redeemPoints
+
'积分'
+
cell
.
salePrice
+
'元'
:
(
cell
.
salePrice
*
cell
.
sellQty
).
toFixed
(
2
)
return
cell
.
redeemPoints
?
cell
.
redeemPoints
+
'积分'
+
cell
.
salePrice
+
'元'
:
(
cell
.
salePrice
*
cell
.
sellQty
).
toFixed
(
2
)
+
'元'
}
}
]
...
...
src/views/pointProducts/detail.vue
View file @
2aaec9f
...
...
@@ -27,7 +27,7 @@
<div
v-if=
"!editing"
class=
"edit"
>
<span
class=
"price"
>
{{
redeemPoints
||
'--'
}}
积分
</span>
+
<span
class=
"price"
>
{{
salePrice
||
'--'
}}
元
</span>
<span
class=
"price"
>
{{
salePrice
||
0
}}
元
</span>
<img
:src=
"require('@/assets/images/edit.png')"
alt=
""
@
click=
"editPrice"
>
</div>
<!--
<el-input
v-else
v-focus
clearable
v-model=
"salePrice"
onkeyup=
"value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d
{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')-->
...
...
@@ -192,17 +192,17 @@ export default {
// return (this.redeemPoints == this.goodsInfo.redeemPoints) && (this.salePrice == this.goodsInfo.salePrice)
// },
setPriceFn
(
e
)
{
if
(
!
this
.
salePrice
||
!
this
.
redeemPoints
)
{
if
(
!
this
.
redeemPoints
)
{
this
.
salePrice
=
this
.
goodsInfo
.
salePrice
this
.
redeemPoints
=
this
.
goodsInfo
.
redeemPoints
this
.
$message
.
error
(
!
this
.
salePrice
?
'请输入大于0的金额'
:
'请输入大于0的积分'
)
this
.
$message
.
error
(
'请输入大于0的积分'
)
return
}
let
params
=
{
businessType
:
1
,
modifyPriceRequestList
:
[{
id
:
this
.
goodsInfo
.
id
,
salePrice
:
this
.
salePrice
,
salePrice
:
this
.
salePrice
||
0
,
redeemPoints
:
Number
(
this
.
redeemPoints
),
}],
}
...
...
src/views/pointProducts/index.vue
View file @
2aaec9f
...
...
@@ -43,7 +43,7 @@
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"3"
></GLTableButton>
</div>
</GLTable>
<setPriceDialog
v-if=
"isVisible"
:isConversionRate=
"isConversionRate"
:visible=
"isVisible"
<setPriceDialog
v-if=
"isVisible"
:echoParams=
"echoParams"
:isConversionRate=
"isConversionRate"
:visible=
"isVisible"
@
handleClose=
"handleClose"
@
confirm=
"confirmPriceChange"
>
</setPriceDialog>
</div>
...
...
@@ -67,6 +67,7 @@ export default {
batchCount
:
''
,
searchForm
:
{},
editParams
:
{},
echoParams
:{},
isConversionRate
:
false
,
goodsFormObj
:
{
goodsPosition
:
2
,
...
...
@@ -140,7 +141,7 @@ export default {
}
},
{
label
:
'
设置销售价(元)
'
,
label
:
'
兑换价
'
,
width
:
180
,
addHtml
:
'setPriceSlot'
,
prop
:
'salePrice'
,
...
...
@@ -156,12 +157,12 @@ export default {
width
:
150
,
prop
:
'marketPrice'
},
{
label
:
'真实销量'
,
width
:
150
,
prop
:
'saleAmount'
,
sortable
:
'custom'
,
},
//
{
//
label: '真实销量',
//
width: 150,
//
prop: 'saleAmount',
//
sortable: 'custom',
//
},
{
label
:
'库存'
,
width
:
150
,
...
...
@@ -186,7 +187,7 @@ export default {
buttonList
:
[
{
type
:
'el-button'
,
name
:
'
商品
详情'
,
name
:
'详情'
,
attrs
:
{
type
:
'text'
,
fn
:
'商品详情'
...
...
@@ -197,7 +198,7 @@ export default {
},
{
type
:
'el-button'
,
name
:
'下架
至仓库
'
,
name
:
'下架'
,
attrs
:
{
type
:
'text'
,
fn
:
'下架至仓库'
...
...
@@ -232,6 +233,10 @@ export default {
id
:
scope
.
id
,
sellPrice
:
scope
.
sellPrice
}
this
.
echoParams
=
{
redeemPoints
:
scope
.
redeemPoints
,
salePrice
:
scope
.
salePrice
}
this
.
isConversionRate
=
true
this
.
isVisible
=
true
},
...
...
@@ -342,8 +347,8 @@ export default {
params
=
{
modifyPriceRequestList
:
[{
id
:
this
.
editParams
.
id
,
redeemPoints
:
Number
((
(
+
Math
.
ceil
(
this
.
editParams
.
sellPrice
))
+
(
+
this
.
batchCount
)
).
toFixed
(
2
)),
salePrice
:
this
.
batchPrice
redeemPoints
:
Number
((
+
this
.
batchCount
).
toFixed
(
2
)),
salePrice
:
this
.
batchPrice
||
0
}],
}
}
...
...
@@ -378,7 +383,16 @@ export default {
const
{
categoryCode
}
=
this
.
searchForm
this
.
searchForm
.
businessType
=
1
this
.
searchForm
.
categoryCode
=
categoryCode
&&
categoryCode
.
length
?
categoryCode
.
pop
()
:
''
// 商品类型单级可选处理
if
(
0
<
this
.
searchForm
.
categoryCode
.
length
&&
this
.
searchForm
.
categoryCode
.
length
<
6
)
{
let
name
=
this
.
searchForm
.
categoryCode
.
length
==
2
?
'categoryCode1'
:
'categoryCode2'
this
.
searchForm
[
name
]
=
this
.
searchForm
.
categoryCode
delete
this
.
searchForm
.
categoryCode
}
resolve
()
})
},
...
...
src/views/pointProducts/setPriceDialog.vue
View file @
2aaec9f
...
...
@@ -6,7 +6,13 @@
<span>
{{
isConversionRate
?
'兑换价 = '
:
'兑换价 = 供货价1:1积分 +'
}}
</span>
<el-input
size=
"small"
type=
"text"
onkeyup=
"value=value.replace(/[^\d]/g,'').replace(/^[0]+[0-9]*$/gi,'')"
<el-input
v-if=
"isConversionRate"
size=
"small"
type=
"text"
onkeyup=
"value = value.replace(/[^\d]/g,'').replace(/^[0]+[0-9]*$/gi,'')"
v-model=
"batchCount"
placeholder=
"请输入积分"
>
<span
slot=
"append"
>
积分
</span>
</el-input>
<el-input
v-else
size=
"small"
type=
"text"
onkeyup=
"value = value.replace(/[^\d]/g,'').replace(/^0\d/g, '0')"
v-model=
"batchCount"
placeholder=
"请输入积分"
>
<span
slot=
"append"
>
积分
</span>
</el-input>
...
...
@@ -31,23 +37,28 @@ export default {
visible
:
{
type
:
Boolean
,
default
:
false
},
echoParams
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
data
()
{
return
{
batchCount
:
''
,
batchPrice
:
''
batchCount
:
this
.
isConversionRate
?
this
.
echoParams
.
redeemPoints
:
''
,
batchPrice
:
this
.
isConversionRate
?
this
.
echoParams
.
salePrice
:
''
,
}
},
methods
:
{
confirmPriceChange
()
{
const
batchParams
=
{
batchPrice
:
this
.
batchPrice
,
batchCount
:
this
.
batchCount
const
batchParams
=
{
batchPrice
:
this
.
batchPrice
,
batchCount
:
this
.
batchCount
}
this
.
$emit
(
'confirm'
,
batchParams
)
this
.
$emit
(
'confirm'
,
batchParams
)
},
handleClose
()
{
this
.
$emit
(
'handleClose'
)
...
...
src/views/pointProducts/wDetail.vue
View file @
2aaec9f
...
...
@@ -27,7 +27,7 @@
<div
v-if=
"!editing"
class=
"edit"
>
<span
class=
"price"
>
{{
redeemPoints
||
'--'
}}
积分
</span>
<span>
+
</span>
<span
class=
"price"
>
{{
salePrice
||
'--'
}}
元
</span>
<span
class=
"price"
>
{{
salePrice
||
0
}}
元
</span>
<img
:src=
"require('@/assets/images/edit.png')"
alt=
""
@
click=
"editPrice"
>
</div>
...
...
@@ -188,10 +188,10 @@ export default {
return
(
this
.
redeemPoints
==
this
.
goodsInfo
.
redeemPoints
)
&&
(
this
.
salePrice
==
this
.
goodsInfo
.
salePrice
)
},
setPriceFn
(
type
,
e
)
{
if
(
!
this
.
salePrice
||
!
this
.
redeemPoints
)
{
if
(
!
this
.
redeemPoints
)
{
this
.
salePrice
=
this
.
goodsInfo
.
salePrice
this
.
redeemPoints
=
this
.
goodsInfo
.
redeemPoints
this
.
$message
.
error
(
!
this
.
salePrice
?
'请输入大于0的金额'
:
'请输入大于0的积分'
)
this
.
$message
.
error
(
'请输入大于0的积分'
)
return
}
...
...
@@ -199,7 +199,7 @@ export default {
businessType
:
1
,
modifyPriceRequestList
:
[{
id
:
this
.
goodsInfo
.
id
,
salePrice
:
this
.
salePrice
,
salePrice
:
this
.
salePrice
||
0
,
redeemPoints
:
Number
(
this
.
redeemPoints
),
}],
}
...
...
src/views/pointProducts/warehouse.vue
View file @
2aaec9f
...
...
@@ -48,7 +48,7 @@
<span>
{{
scope
.
scope
.
shelvesStatus
==
1001
?
'可上架'
:
'已下架'
}}
</span>
</div>
</GLTable>
<setPriceDialog
v-if=
"isVisible
"
:isConversionRate=
"isConversionRate"
:visible=
"isVisible"
<setPriceDialog
v-if=
"isVisible"
:echoParams=
"echoParams
"
:isConversionRate=
"isConversionRate"
:visible=
"isVisible"
@
handleClose=
"handleClose"
@
confirm=
"confirmPriceChange"
>
</setPriceDialog>
</div>
...
...
@@ -69,6 +69,7 @@ export default {
batchPrice
:
''
,
batchCount
:
''
,
editParams
:
{},
echoParams
:{},
isConversionRate
:
false
,
goodsFormObj
:
{
goodsPosition
:
1
,
...
...
@@ -172,7 +173,7 @@ export default {
buttonList
:
[
{
type
:
'el-button'
,
name
:
'
商品
详情'
,
name
:
'详情'
,
attrs
:
{
type
:
'text'
,
fn
:
'商品详情'
...
...
@@ -197,7 +198,7 @@ export default {
},
{
type
:
'el-button'
,
name
:
'移出
仓库
'
,
name
:
'移出'
,
attrs
:
{
type
:
'text'
,
fn
:
'移出仓库'
...
...
@@ -225,6 +226,11 @@ export default {
id
:
scope
.
id
,
sellPrice
:
scope
.
sellPrice
}
// const this.pr
this
.
echoParams
=
{
redeemPoints
:
scope
.
redeemPoints
,
salePrice
:
scope
.
salePrice
}
this
.
isConversionRate
=
true
this
.
isVisible
=
true
},
...
...
@@ -257,7 +263,7 @@ export default {
},
// 取消批量改价弹框
handleClose
()
{
this
.
batchPrice
=
''
//
this.batchPrice = ''
this
.
isVisible
=
false
},
// 点击批量改价打开弹框
...
...
@@ -293,8 +299,8 @@ export default {
params
=
{
modifyPriceRequestList
:
[{
id
:
this
.
editParams
.
id
,
redeemPoints
:
Number
((
(
+
Math
.
ceil
(
this
.
editParams
.
sellPrice
))
+
(
+
this
.
batchCount
)
).
toFixed
(
2
)),
salePrice
:
this
.
batchPrice
redeemPoints
:
Number
((
+
this
.
batchCount
).
toFixed
(
2
)),
salePrice
:
this
.
batchPrice
||
0
}],
}
}
...
...
@@ -336,7 +342,7 @@ export default {
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
if
(
operate
==
'上架销售'
&&
(
!
isAll
&&
(
!
item
.
redeemPoints
||
!
item
.
salePrice
)
)
||
(
isAll
&&
!
conversionRateAll
))
{
if
(
operate
==
'上架销售'
&&
(
!
isAll
&&
(
!
item
.
redeemPoints
||
!
item
.
salePrice
))
||
(
isAll
&&
!
conversionRateAll
))
{
this
.
$message
.
error
(
'请先输入兑换价'
)
return
}
...
...
@@ -372,6 +378,14 @@ export default {
this
.
searchForm
.
businessType
=
1
const
{
categoryCode
}
=
this
.
searchForm
this
.
searchForm
.
categoryCode
=
categoryCode
&&
categoryCode
.
length
?
categoryCode
.
pop
()
:
''
// 商品类型单级可选处理
if
(
0
<
this
.
searchForm
.
categoryCode
.
length
&&
this
.
searchForm
.
categoryCode
.
length
<
6
)
{
let
name
=
this
.
searchForm
.
categoryCode
.
length
==
2
?
'categoryCode1'
:
'categoryCode2'
this
.
searchForm
[
name
]
=
this
.
searchForm
.
categoryCode
delete
this
.
searchForm
.
categoryCode
}
resolve
()
})
},
...
...
src/views/saleOrder/detail.vue
View file @
2aaec9f
...
...
@@ -95,7 +95,7 @@ export default {
label
:
'申请金额 (元)'
,
prop
:
'refundPrice'
,
formatter
:
cell
=>
{
return
cell
.
businessType
==
1
?
cell
.
redeemPoints
+
'积分'
+
cell
.
refundPrice
+
'元'
:
cell
.
refundPrice
+
'元'
return
cell
.
redeemPoints
?
cell
.
redeemPoints
+
'积分'
+
cell
.
refundPrice
+
'元'
:
cell
.
refundPrice
+
'元'
}
},
{
...
...
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