Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
陈婉清
/
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 e0f1c306
authored
Apr 20, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调90%
1 parent
88c42399
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
405 additions
and
129 deletions
src/api/modules/platformGoods.js
src/assets/css/public.scss
src/util/util.js
src/views/goodsOrder/detail.vue
src/views/goodsOrder/index.vue
src/views/goodsWarehouse/detail.vue
src/views/goodsWarehouse/index.vue
src/views/goodsWarehouse/warehouse.vue
src/views/saleOrder/detail.vue
src/views/saleOrder/index.vue
src/api/modules/platformGoods.js
View file @
e0f1c30
...
@@ -57,6 +57,15 @@ const batchSaleApi = params => {
...
@@ -57,6 +57,15 @@ const batchSaleApi = params => {
sign
:
true
sign
:
true
})
})
}
}
// 平台商品批量下架
const
batchOffApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
goods.stockroom.batch.off`
return
http
({
url
,
data
:
params
,
sign
:
true
})
}
// 商品详情
// 商品详情
const
goodsDetailApi
=
params
=>
{
const
goodsDetailApi
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.stockroom.goods.detail`
params
.
method
=
`scrm.api.shopmall.stockroom.goods.detail`
...
@@ -85,6 +94,35 @@ const getOrderList = params => {
...
@@ -85,6 +94,35 @@ const getOrderList = params => {
sign
:
true
sign
:
true
})
})
}
}
// 订单详情
const
getOrderDetail
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
order.detail`
return
http
({
url
,
data
:
params
,
sign
:
true
})
}
// 售后列表
const
getSaleOrderList
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
after.sales.order.page`
return
http
({
url
,
data
:
params
,
sign
:
true
})
}
// 订单详情
const
getSaleOrderDetail
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
after.sales.order.detail`
return
http
({
url
,
data
:
params
,
sign
:
true
})
}
export
default
{
export
default
{
getCategoryListApi
,
getCategoryListApi
,
...
@@ -93,7 +131,11 @@ export default {
...
@@ -93,7 +131,11 @@ export default {
getListApi
,
getListApi
,
batchRemoveApi
,
batchRemoveApi
,
batchSaleApi
,
batchSaleApi
,
batchOffApi
,
goodsDetailApi
,
goodsDetailApi
,
modifyPriceApi
,
modifyPriceApi
,
getOrderList
getOrderList
,
getOrderDetail
,
getSaleOrderList
,
getSaleOrderDetail
}
}
src/assets/css/public.scss
View file @
e0f1c30
...
@@ -420,3 +420,13 @@
...
@@ -420,3 +420,13 @@
border-bottom
:
1px
solid
#fff
;
border-bottom
:
1px
solid
#fff
;
}
}
}
}
.circle
{
display
:
inline-block
;
vertical-align
:
middle
;
margin-right
:
8px
;
width
:
6px
;
height
:
6px
;
border-radius
:
50%
;
background-color
:
#999
;
}
\ No newline at end of file
\ No newline at end of file
src/util/util.js
View file @
e0f1c30
...
@@ -69,4 +69,19 @@ util.getExplorer = function() {
...
@@ -69,4 +69,19 @@ util.getExplorer = function() {
}
}
return
browserType
return
browserType
}
}
util
.
transfStatus
=
function
(
key
)
{
let
arr1
=
[
1002
,
1006
,
1007
,
1008
]
let
arr2
=
[
1003
,
1004
,
1005
,
1012
]
if
(
arr1
.
includes
(
+
key
)){
return
{
name
:
'待收货'
,
color
:
'#5850FF'
}
}
else
if
(
arr2
.
includes
(
+
key
)){
return
{
name
:
'已关闭'
,
color
:
'#999999'
}
}
else
if
(
key
==
1009
){
return
{
name
:
'已完成'
,
color
:
'#2CCA74'
}
}
else
if
(
key
==
1010
){
return
{
name
:
'售后/退款'
,
color
:
'#EB4E4E'
}
}
else
{
return
{
name
:
'待支付'
,
color
:
'#FDB757'
}
}
}
export
default
util
export
default
util
\ No newline at end of file
\ No newline at end of file
src/views/goodsOrder/detail.vue
View file @
e0f1c30
...
@@ -3,20 +3,19 @@
...
@@ -3,20 +3,19 @@
<div
class=
"ctnr"
>
<div
class=
"ctnr"
>
<div
class=
"stutas-wrap"
>
<div
class=
"stutas-wrap"
>
<span>
订单状态:
</span>
<span>
订单状态:
</span>
<span
class=
"stutas-circle"
></span>
<span
class=
"stutas-circle"
:style=
"
{backgroundColor: transfStatus(orderInfo.orderStatus).color}"
>
</span>
<span>
待收货
</span>
<span>
{{
transfStatus
(
orderInfo
.
orderStatus
).
name
}}
</span>
</div>
</div>
<div
class=
"info-wrap order-info"
>
<div
class=
"info-wrap order-info"
>
<div
class=
"title"
>
订单信息
</div>
<div
class=
"title"
>
订单信息
</div>
<div
class=
"detail"
>
<div
class=
"detail"
>
<glsxCombiForm
ref=
"editFormRef"
labelWidth=
"154px"
defaultWidth=
"214px"
:formObj=
"
editForm
"
:formData=
"editFormData"
></glsxCombiForm>
<glsxCombiForm
ref=
"editFormRef"
labelWidth=
"154px"
defaultWidth=
"214px"
:formObj=
"
orderInfo
"
:formData=
"editFormData"
></glsxCombiForm>
</div>
</div>
</div>
</div>
<div
class=
"info-wrap"
>
<div
class=
"info-wrap"
>
<div
class=
"title"
>
商品信息
</div>
<div
class=
"title"
>
商品信息
</div>
<div
class=
"detail"
>
<div
class=
"detail"
>
<GLTable
ref=
"goodsTableRef"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
>
<GLTable
:hasPage=
"false"
ref=
"goodsTableRef"
:tableParams=
"tableParams"
:tableData=
"orderInfo.subOrderGoodsList"
>
</GLTable>
</GLTable>
</div>
</div>
</div>
</div>
...
@@ -33,6 +32,7 @@
...
@@ -33,6 +32,7 @@
<
script
>
<
script
>
import
glsxCombiForm
from
'@/components/glsx-combi-form'
import
glsxCombiForm
from
'@/components/glsx-combi-form'
import
util
from
'@/util/util'
export
default
{
export
default
{
name
:
'goodsOrderDetail'
,
name
:
'goodsOrderDetail'
,
data
()
{
data
()
{
...
@@ -40,6 +40,7 @@ export default {
...
@@ -40,6 +40,7 @@ export default {
editForm
:
{
editForm
:
{
name
:
123
name
:
123
},
},
orderInfo
:{},
shipmentsParams
:
{
shipmentsParams
:
{
listName
:
'shipments'
,
listName
:
'shipments'
,
tableOption
:
false
,
tableOption
:
false
,
...
@@ -74,42 +75,45 @@ export default {
...
@@ -74,42 +75,45 @@ export default {
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'商品名称'
,
label
:
'商品名称'
,
prop
:
'goodsName'
prop
:
'goodsName'
,
formatter
:
cell
=>
{
return
cell
.
brandName
+
cell
.
goodsSkuName
}
},
},
{
{
label
:
'单价 (元)'
,
label
:
'单价 (元)'
,
prop
:
'
p
rice'
prop
:
'
sellP
rice'
},
},
{
{
label
:
'数量'
,
label
:
'数量'
,
formatter
:
cell
=>
{
prop
:
'sellQty'
return
cell
.
denomination
?
Number
((
Number
(
cell
.
denomination
)
/
100
).
toFixed
(
2
))
:
0
}
},
},
{
{
label
:
'小计 (元)'
,
label
:
'小计 (元)'
,
prop
:
'effectiveDays'
formatter
:
cell
=>
{
return
cell
.
sellPrice
*
cell
.
sellQty
}
},
},
{
{
label
:
'实收金额 (元)'
,
label
:
'实收金额 (元)'
,
prop
:
'
effectiveDays
'
prop
:
'
orderAmount
'
}
}
]
]
},
},
editFormData
:
[
editFormData
:
[
{
{
label
:
'第三方订单编号'
,
label
:
'第三方订单编号'
,
name
:
'
nam
e'
,
name
:
'
thirdSubOrderCod
e'
,
type
:
'showTxt'
type
:
'showTxt'
},
},
{
{
label
:
'平台订单编号'
,
label
:
'平台订单编号'
,
name
:
'
remarkNam
e'
,
name
:
'
subOrderCod
e'
,
type
:
'showTxt'
type
:
'showTxt'
},
},
{
{
label
:
'下单时间'
,
label
:
'下单时间'
,
name
:
'
nam
e'
,
name
:
'
orderCreatedDat
e'
,
type
:
'showTxt'
type
:
'showTxt'
},
},
{
{
...
@@ -119,32 +123,32 @@ export default {
...
@@ -119,32 +123,32 @@ export default {
},
},
{
{
label
:
'支付时间'
,
label
:
'支付时间'
,
name
:
'
stock
'
,
name
:
'
payDate
'
,
type
:
'showTxt'
type
:
'showTxt'
},
},
{
{
label
:
'商户订单号'
,
label
:
'商户订单号'
,
name
:
'
name
'
,
name
:
'
outTradeNo
'
,
type
:
'showTxt'
type
:
'showTxt'
},
},
{
{
label
:
'用户名称'
,
label
:
'用户名称'
,
name
:
'
stock
'
,
name
:
'
accountName
'
,
type
:
'showTxt'
type
:
'showTxt'
},
},
{
{
label
:
'用户手机号'
,
label
:
'用户手机号'
,
name
:
'
nam
e'
,
name
:
'
customerPhon
e'
,
type
:
'showTxt'
type
:
'showTxt'
},
},
{
{
label
:
'用户备注'
,
label
:
'用户备注'
,
name
:
'
stock
'
,
name
:
'
buyerMsg
'
,
type
:
'showTxt'
type
:
'showTxt'
},
},
{
{
label
:
'收货人信息'
,
label
:
'收货人信息'
,
name
:
'
name
'
,
name
:
'
addInfo
'
,
type
:
'showTxt'
type
:
'showTxt'
}
}
]
]
...
@@ -154,11 +158,27 @@ export default {
...
@@ -154,11 +158,27 @@ export default {
components
:
{
components
:
{
glsxCombiForm
glsxCombiForm
},
},
created
()
{
this
.
getDetailById
()
},
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
transfStatus
:
util
.
transfStatus
,
getDetailById
(){
const
{
id
}
=
this
.
$route
.
params
this
.
$apis
.
platformGoods
.
getOrderDetail
({
subOrderCode
:
id
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
?.
id
){
const
{
receiveName
,
receiveMobile
,
provinceName
,
cityName
,
townName
,
address
}
=
res
?.
receiveAddress
||
{}
res
.
addInfo
=
`
${
receiveName
}
${
receiveMobile
}
${
provinceName
}${
cityName
}${
townName
}${
address
}
`
res
.
addInfo
=
res
.
addInfo
.
replaceAll
(
'null'
,
''
)
res
.
subOrderGoodsList
=
res
?.
subOrderGoodsList
?.
length
?
res
?.
subOrderGoodsList
:
[]
this
.
orderInfo
=
res
}
})
},
}
}
}
}
</
script
>
</
script
>
...
...
src/views/goodsOrder/index.vue
View file @
e0f1c30
...
@@ -5,10 +5,25 @@
...
@@ -5,10 +5,25 @@
</GLCombiForm>
</GLCombiForm>
<div
class=
"main-wrap"
>
<div
class=
"main-wrap"
>
<div
class=
"global-title-wrap"
>
<div
class=
"global-title-wrap"
>
<span
v-for=
"
(item,index) in titleList"
:key=
"item"
:class=
"['title',
{'curTitleCla': curTitleIdx==index}]" @click="changeTable(index)">
{{
item
}}
</span>
<span
v-for=
"
item in titleList"
:key=
"item.id"
:class=
"['title',
{'curTitleCla': orderFormObj.requestType==item.id}]" @click="changeTable(item.id)">
{{
item
.
name
}}
</span>
</div>
</div>
<div
class=
"table-wrap"
>
<div
class=
"table-wrap"
>
<GLTable
ref=
"tableRef"
:pageConf=
"pageConf"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
>
<GLTable
ref=
"tableRef"
:pageConf=
"pageConf"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
>
<div
slot=
"goodsNameSlot"
class=
"goodsNameSlot"
slot-scope=
"scope"
>
<img
:src=
"scope.scope.goodsImageUrl"
alt=
""
>
{{
scope
.
scope
.
goodsSkuName
}}
</div>
<div
slot=
"userInfoSlot"
class=
"userInfoSlot"
slot-scope=
"scope"
>
<p
class=
"name"
>
{{
scope
.
scope
.
accountName
||
'--'
}}
</p>
<p
class=
"phone"
>
{{
scope
.
scope
.
customerPhone
}}
</p>
</div>
<div
slot=
"orderStatusSlot"
slot-scope=
"scope"
>
<span
class=
"circle"
:style=
"
{backgroundColor: transfStatus(scope.scope.orderStatus).color}">
</span>
<span>
{{
transfStatus
(
scope
.
scope
.
orderStatus
).
name
}}
</span>
</div>
<div
slot=
"orderNoSlot"
class=
"userInfoSlot"
slot-scope=
"scope"
>
<p
class=
"name"
>
第三方:
{{
scope
.
scope
.
thirdSubOrderCode
||
'--'
}}
</p>
<p
class=
"name"
>
平台:
{{
scope
.
scope
.
orderCode
||
'--'
}}
</p>
</div>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"3"
></GLTableButton>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"3"
></GLTableButton>
</div>
</div>
...
@@ -20,13 +35,39 @@
...
@@ -20,13 +35,39 @@
<
script
>
<
script
>
import
{
utils
}
from
'glsx-common'
import
{
utils
}
from
'glsx-common'
import
util
from
'@/util/util'
const
titleList
=
[
{
id
:
0
,
name
:
'全部'
},
{
id
:
2
,
name
:
'待支付'
},
{
id
:
1
,
name
:
'待收货'
},
{
id
:
4
,
name
:
'已完成'
},
{
id
:
3
,
name
:
'退款/售后'
},
{
id
:
5
,
name
:
'已关闭'
},
]
export
default
{
export
default
{
name
:
'goodsOrderIndex'
,
name
:
'goodsOrderIndex'
,
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
size
:
'small'
,
titleList
:
[
'全部'
,
'待支付'
,
'待收货'
,
'已完成'
,
'退款/售后'
,
'已关闭'
],
titleList
,
curTitleIdx
:
0
,
buttonList
:
[
buttonList
:
[
{
{
type
:
'el-button'
,
type
:
'el-button'
,
...
@@ -84,43 +125,42 @@ export default {
...
@@ -84,43 +125,42 @@ export default {
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'商品名称'
,
label
:
'商品名称'
,
prop
:
'goodsName
'
addHtml
:
'goodsNameSlot
'
},
},
{
{
label
:
'单价 (元)'
,
label
:
'单价 (元)'
,
prop
:
'
p
rice'
prop
:
'
sellP
rice'
},
},
{
{
label
:
'数量'
,
label
:
'数量'
,
width
:
110
,
prop
:
'sellQty'
formatter
:
cell
=>
{
return
cell
.
denomination
?
Number
((
Number
(
cell
.
denomination
)
/
100
).
toFixed
(
2
))
:
0
}
},
},
{
{
label
:
'实收金额 (元)'
,
label
:
'实收金额 (元)'
,
width
:
1
1
0
,
width
:
1
3
0
,
prop
:
'
effectiveDays
'
prop
:
'
orderAmount
'
},
},
{
{
label
:
'用户信息'
,
label
:
'用户信息'
,
width
:
1
1
0
,
width
:
1
5
0
,
prop
:
'effectiveDays
'
addHtml
:
'userInfoSlot
'
},
},
{
{
label
:
'订单状态'
,
label
:
'订单状态'
,
width
:
110
,
width
:
110
,
prop
:
'effectiveDays
'
addHtml
:
'orderStatusSlot
'
},
},
{
{
label
:
'订单编号'
,
label
:
'订单编号'
,
width
:
11
0
,
width
:
25
0
,
prop
:
'effectiveDays
'
addHtml
:
'orderNoSlot
'
},
},
{
{
label
:
'下单时间'
,
label
:
'下单时间'
,
width
:
110
,
width
:
200
,
prop
:
'effectiveDays'
formatter
:
cellValue
=>
{
return
cellValue
.
orderCreatedDate
?
util
.
dateFormat
(
cellValue
.
orderCreatedDate
,
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
}
}
]
]
}
}
...
@@ -134,11 +174,20 @@ export default {
...
@@ -134,11 +174,20 @@ export default {
},
},
methods
:
{
methods
:
{
changeTable
(
idx
){
transfStatus
:
util
.
transfStatus
,
this
.
curTitleIdx
=
idx
changeTable
(
id
){
this
.
orderFormObj
.
requestType
=
id
this
.
handleReset
()
},
},
handleReset
(){
handleReset
(){
this
.
orderFormObj
=
{
customerInfo
:
''
,
searchOrderCode
:
''
,
goodsInfo
:
''
,
requestType
:
this
.
orderFormObj
.
requestType
,
time
:
''
}
this
.
handleSearch
()
},
},
handleSearch
(){
handleSearch
(){
this
.
$refs
.
tableRef
.
refreshTable
()
this
.
$refs
.
tableRef
.
refreshTable
()
...
@@ -158,9 +207,9 @@ export default {
...
@@ -158,9 +207,9 @@ export default {
resolve
()
resolve
()
})
})
},
},
goOrderDetaillPage
(){
goOrderDetaillPage
(
item
){
this
.
$router
.
push
({
path
:
'/goodsOrder/detail'
})
this
.
$router
.
push
({
path
:
`/goodsOrder/detail/
${
item
.
subOrderCode
}
`
})
}
,
}
}
}
}
}
</
script
>
</
script
>
...
@@ -176,6 +225,24 @@ export default {
...
@@ -176,6 +225,24 @@ export default {
margin-top
:
16px
;
margin-top
:
16px
;
.table-wrap{
.table-wrap{
padding
:
20px
;
padding
:
20px
;
.goodsNameSlot{
img{
width
:
36px
;
height
:
36px
;
vertical-align
:
middle
;
margin-right
:
8px
;
}
}
.userInfoSlot
{
.name{
font-size
:
14px
;
color
:
#666666
;
}
.phone
{
font-size
:
10px
;
color
:
#999999
;
}
}
}
}
}
}
}
}
...
...
src/views/goodsWarehouse/detail.vue
View file @
e0f1c30
...
@@ -27,15 +27,15 @@
...
@@ -27,15 +27,15 @@
<span
class=
"attr-label"
>
{{
item
.
label
}}
</span>
<span
class=
"attr-label"
>
{{
item
.
label
}}
</span>
<span
class=
"attr-key"
>
{{
goodsInfo
[
item
.
key
]
||
'--'
}}
</span>
<span
class=
"attr-key"
>
{{
goodsInfo
[
item
.
key
]
||
'--'
}}
</span>
</li>
</li>
<li>
<
!--
<
li>
<span
class=
"attr-label"
>
规格名称
</span>
<span
class=
"attr-label"
>
规格名称
</span>
<span
class=
"attr-key"
>
{{
goodsInfo
?.
specificationResponses
?.
specName
||
'--'
}}
</span>
<span
class=
"attr-key"
>
{{
goodsInfo
?.
specificationResponses
?.
specName
||
'--'
}}
</span>
</li>
</li>
-->
</ul>
</ul>
<div
class=
"operate-btn"
>
<div
class=
"operate-btn"
>
<el-button
type=
"primary"
@
click=
"handleSale"
>
上架销售
</el-button>
<el-button
type=
"primary"
v-if=
"goodsInfo.goodsPosition==1"
@
click=
"handleSale"
>
上架销售
</el-button>
<el-button
type=
"primary"
plain
>
下架至仓库
</el-button>
<el-button
type=
"primary"
v-if=
"goodsInfo.goodsPosition==2"
plain
@
click=
"handleOff"
>
下架至仓库
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleRemove"
>
移出仓库
</el-button>
<el-button
type=
"primary"
v-if=
"goodsInfo.goodsPosition==1"
plain
@
click=
"handleRemove"
>
移出仓库
</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -115,12 +115,13 @@ export default {
...
@@ -115,12 +115,13 @@ export default {
})
})
},
},
handleSale
(){
handleSale
(){
const
api
=
this
.
$apis
.
platformGoods
.
batchSaleApi
this
.
operateFn
(
'batchSaleApi'
,
'上架销售'
)
this
.
batchFn
(
api
,
'上架销售'
)
},
handleOff
(){
this
.
operateFn
(
'batchOffApi'
,
'下架至仓库'
)
},
},
handleRemove
(){
handleRemove
(){
const
api
=
this
.
$apis
.
platformGoods
.
batchRemoveApi
this
.
operateFn
(
'batchRemoveApi'
,
'移出仓库'
)
this
.
batchFn
(
'batchRemoveApi'
,
'移出仓库'
)
},
},
operateFn
(
Api
,
operate
){
operateFn
(
Api
,
operate
){
let
tip
=
`确定把该商品
${
operate
}
吗?`
let
tip
=
`确定把该商品
${
operate
}
吗?`
...
@@ -128,9 +129,13 @@ export default {
...
@@ -128,9 +129,13 @@ export default {
type
:
'warning'
,
type
:
'warning'
,
callback
:
action
=>
{
callback
:
action
=>
{
if
(
action
==
'confirm'
){
if
(
action
==
'confirm'
){
Api
({
id
:
[
this
.
goodsInfo
.
id
]}).
then
(
res
=>
{
this
.
$apis
.
platformGoods
[
Api
]({
ids
:
[
this
.
goodsInfo
.
id
]}).
then
(
res
=>
{
if
(
res
){
if
(
res
){
this
.
$message
.
success
(
'操作成功'
)
this
.
$message
.
success
(
`
${
operate
}
成功`
)
if
(
Api
==
'batchRemoveApi'
)
{
this
.
$router
.
push
({
path
:
`/goodsWarehouse/warehouse`
})
return
}
this
.
getDetailById
()
this
.
getDetailById
()
}
}
})
})
...
@@ -194,7 +199,6 @@ export default {
...
@@ -194,7 +199,6 @@ export default {
padding
:
10px
0
10px
20px
;
padding
:
10px
0
10px
20px
;
flex
:
1
;
flex
:
1
;
.info-title{
.info-title{
height
:
28px
;
line-height
:
28px
;
line-height
:
28px
;
font-family
:
PingFangSC-Medium
;
font-family
:
PingFangSC-Medium
;
font-weight
:
600
;
font-weight
:
600
;
...
@@ -270,9 +274,9 @@ export default {
...
@@ -270,9 +274,9 @@ export default {
padding
:
20px
;
padding
:
20px
;
/deep/
.rich-text{
/deep/
.rich-text{
img{
img{
width
:
362px
;
//
width
:
362px
;
height
:
362px
;
//
height
:
362px
;
object-fit
:
contain
;
//
object-fit
:
contain
;
}
}
}
}
.grid
{
.grid
{
...
...
src/views/goodsWarehouse/index.vue
View file @
e0f1c30
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
class=
"operate-wrap"
>
<div
class=
"operate-wrap"
>
<span
class=
"table-title"
>
销售中商品列表
</span>
<span
class=
"table-title"
>
销售中商品列表
</span>
<div
class=
"operate-btn"
>
<div
class=
"operate-btn"
>
<el-button
:size=
"size"
type=
"primary"
plain
@
click=
"handleShelf"
>
批量下架
</el-button>
<el-button
:size=
"size"
type=
"primary"
plain
@
click=
"handleShelf
(
{}, true)
">批量下架
</el-button>
<el-button
:size=
"size"
type=
"primary"
plain
@
click=
"batchPriceChange"
>
批量改价
</el-button>
<el-button
:size=
"size"
type=
"primary"
plain
@
click=
"batchPriceChange"
>
批量改价
</el-button>
</div>
</div>
</div>
</div>
...
@@ -57,7 +57,6 @@ export default {
...
@@ -57,7 +57,6 @@ export default {
goodsPosition
:
2
,
goodsPosition
:
2
,
info
:
''
,
info
:
''
,
categoryCode
:
[],
categoryCode
:
[],
saleFlag
:
''
,
startSellPrice
:
''
,
startSellPrice
:
''
,
endSellPrice
:
''
,
endSellPrice
:
''
,
startDiffPrice
:
''
,
startDiffPrice
:
''
,
...
@@ -76,23 +75,23 @@ export default {
...
@@ -76,23 +75,23 @@ export default {
label
:
'商品类型'
,
label
:
'商品类型'
,
addHtml
:
'categorySlot'
addHtml
:
'categorySlot'
},
},
{
//
{
label
:
'销售状态'
,
//
label: '销售状态',
name
:
'saleFlag'
,
//
name: 'saleFlag',
type
:
'select'
,
//
type: 'select',
optionList
:
[{
//
optionList: [{
id
:
''
,
//
id: '',
label
:
'全部'
//
label: '全部'
},{
//
},{
id
:
'1'
,
//
id: '1',
label
:
'开放销售'
//
label: '开放销售'
},{
//
},{
id
:
'2'
,
//
id: '2',
label
:
'关闭销售'
//
label: '关闭销售'
}],
//
}],
optionId
:
'id'
,
//
optionId: 'id',
optionLabel
:
'label'
,
//
optionLabel: 'label',
},
//
},
{
{
label
:
'供货价'
,
label
:
'供货价'
,
addHtml
:
'supplyPriceSlot'
addHtml
:
'supplyPriceSlot'
...
@@ -124,7 +123,9 @@ export default {
...
@@ -124,7 +123,9 @@ export default {
},
},
{
{
label
:
'设置销售价'
,
label
:
'设置销售价'
,
addHtml
:
'setPriceSlot'
addHtml
:
'setPriceSlot'
,
prop
:
'salePrice'
,
sortable
:
true
,
},
},
{
{
label
:
'供货价(元)'
,
label
:
'供货价(元)'
,
...
@@ -136,19 +137,20 @@ export default {
...
@@ -136,19 +137,20 @@ export default {
},
},
{
{
label
:
'真实销量'
,
label
:
'真实销量'
,
prop
:
'effectiveDays'
prop
:
'saleAmount'
,
sortable
:
true
,
},
},
{
{
label
:
'库存'
,
label
:
'库存'
,
prop
:
'goodsStock'
prop
:
'goodsStock'
},
},
{
//
{
label
:
'销售状态'
,
//
label: '销售状态',
prop
:
'shelvesStatus'
,
//
prop: 'shelvesStatus',
formatter
:
cellValue
=>
{
//
formatter: cellValue => {
return
cellValue
.
shelvesStatus
==
1001
?
'上架'
:
'下架'
//
return cellValue.shelvesStatus== 1001 ? '上架': '下架'
}
//
}
}
//
}
]
]
},
},
buttonList
:
[
buttonList
:
[
...
@@ -171,7 +173,7 @@ export default {
...
@@ -171,7 +173,7 @@ export default {
fn
:
'下架至仓库'
fn
:
'下架至仓库'
},
},
listeners
:
{
listeners
:
{
click
:
row
=>
this
.
delCoupon
(
row
.
scope
)
click
:
row
=>
this
.
handleShelf
(
row
.
scope
)
}
}
}
}
],
],
...
@@ -215,6 +217,35 @@ export default {
...
@@ -215,6 +217,35 @@ export default {
this
.
isVisible
=
true
this
.
isVisible
=
true
console
.
log
(
this
.
isVisible
)
console
.
log
(
this
.
isVisible
)
},
},
handleShelf
(
item
,
isAll
){
const
api
=
this
.
$apis
.
platformGoods
.
batchOffApi
this
.
batchFn
(
api
,
'下架至仓库'
,
item
,
isAll
)
},
batchFn
(
Api
,
operate
,
item
,
isAll
){
let
params
=
{
ids
:
[
item
.
id
],
}
let
tip
=
`确定把
${
item
.
goodsSkuName
}
${
operate
}
?`
if
(
isAll
){
const
list
=
this
.
getAllData
()
if
(
!
list
?.
length
)
return
this
.
$message
.
error
(
`请选择要
${
operate
}
的商品`
)
params
.
ids
=
list
.
map
(
item
=>
item
.
id
)
tip
=
`确定把已选的
${
list
.
length
}
个商品全部
${
operate
}
?`
}
this
.
$confirm
(
tip
,
'提示'
,
{
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
){
Api
(
params
).
then
(
res
=>
{
if
(
res
){
this
.
$message
.
success
(
'操作成功'
)
this
.
handleReset
()
}
})
}
}
})
},
setPriceFn
(
e
,
item
,
isAll
){
setPriceFn
(
e
,
item
,
isAll
){
let
params
=
{}
let
params
=
{}
if
(
isAll
){
if
(
isAll
){
...
@@ -238,15 +269,11 @@ export default {
...
@@ -238,15 +269,11 @@ export default {
}
}
})
})
},
},
handleShelf
(){
this
.
getAllData
()
},
handleReset
(){
handleReset
(){
this
.
goodsFormObj
=
{
this
.
goodsFormObj
=
{
goodsPosition
:
2
,
goodsPosition
:
2
,
info
:
''
,
info
:
''
,
categoryCode
:
[],
categoryCode
:
[],
saleFlag
:
''
,
startSellPrice
:
''
,
startSellPrice
:
''
,
endSellPrice
:
''
,
endSellPrice
:
''
,
startDiffPrice
:
''
,
startDiffPrice
:
''
,
...
...
src/views/goodsWarehouse/warehouse.vue
View file @
e0f1c30
...
@@ -136,7 +136,8 @@ export default {
...
@@ -136,7 +136,8 @@ export default {
},
},
{
{
label
:
'库存'
,
label
:
'库存'
,
prop
:
'goodsStock'
prop
:
'goodsStock'
,
sortable
:
true
,
},
},
{
{
label
:
'商品状态'
,
label
:
'商品状态'
,
...
...
src/views/saleOrder/detail.vue
View file @
e0f1c30
...
@@ -142,11 +142,26 @@ export default {
...
@@ -142,11 +142,26 @@ export default {
components
:
{
components
:
{
glsxCombiForm
glsxCombiForm
},
},
created
()
{
this
.
getDetailById
()
},
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
getDetailById
(){
const
{
id
}
=
this
.
$route
.
params
this
.
$apis
.
platformGoods
.
getSaleOrderDetail
({
afterSalesOrderCode
:
id
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
?.
id
){
const
{
receiveName
,
receiveMobile
,
provinceName
,
cityName
,
townName
,
address
}
=
res
?.
receiveAddress
||
{}
res
.
addInfo
=
`
${
receiveName
}
${
receiveMobile
}
${
provinceName
}${
cityName
}${
townName
}${
address
}
`
res
.
addInfo
=
res
.
addInfo
.
replaceAll
(
'null'
,
''
)
res
.
subOrderGoodsList
=
res
?.
subOrderGoodsList
?.
length
?
res
?.
subOrderGoodsList
:
[]
this
.
orderInfo
=
res
}
})
},
}
}
}
}
</
script
>
</
script
>
...
...
src/views/saleOrder/index.vue
View file @
e0f1c30
...
@@ -5,10 +5,25 @@
...
@@ -5,10 +5,25 @@
</GLCombiForm>
</GLCombiForm>
<div
class=
"main-wrap"
>
<div
class=
"main-wrap"
>
<div
class=
"global-title-wrap"
>
<div
class=
"global-title-wrap"
>
<span
v-for=
"
(item,index) in titleList"
:key=
"item"
:class=
"['title',
{'curTitleCla': curTitleIdx==index}]" @click="changeTable(index)">
{{
item
}}
</span>
<span
v-for=
"
item in titleList"
:key=
"item.id"
:class=
"['title',
{'curTitleCla': orderFormObj.requestType==item.id}]" @click="changeTable(item.id)">
{{
item
.
name
}}
</span>
</div>
</div>
<div
class=
"table-wrap"
>
<div
class=
"table-wrap"
>
<GLTable
ref=
"tableRef"
:pageConf=
"pageConf"
:searchForm=
"orderFormObj"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
>
<GLTable
ref=
"tableRef"
:pageConf=
"pageConf"
:searchForm=
"orderFormObj"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
>
<div
slot=
"goodsNameSlot"
class=
"goodsNameSlot"
slot-scope=
"scope"
>
<img
:src=
"scope.scope.goodsImageUrl"
alt=
""
>
{{
scope
.
scope
.
goodsSkuName
}}
</div>
<div
slot=
"userInfoSlot"
class=
"userInfoSlot"
slot-scope=
"scope"
>
<p
class=
"name"
>
{{
scope
.
scope
.
receiveName
||
'--'
}}
</p>
<p
class=
"phone"
>
{{
scope
.
scope
.
receiveMobile
}}
</p>
</div>
<div
slot=
"orderStatusSlot"
slot-scope=
"scope"
>
<span
class=
"circle"
:style=
"
{backgroundColor: scope.scope.refundStatus==1006 ? '#2CCA74': '#5850FF'}">
</span>
<span>
{{
scope
.
scope
.
refundStatus
==
1006
?
'售后完成'
:
'售后中'
}}
</span>
</div>
<div
slot=
"orderNoSlot"
class=
"userInfoSlot"
slot-scope=
"scope"
>
<p
class=
"name"
>
第三方:
{{
scope
.
scope
.
thirdSubOrderCode
||
'--'
}}
</p>
<p
class=
"name"
>
平台:
{{
scope
.
scope
.
orderCode
||
'--'
}}
</p>
</div>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"3"
></GLTableButton>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"3"
></GLTableButton>
</div>
</div>
...
@@ -19,13 +34,28 @@
...
@@ -19,13 +34,28 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
import
{
utils
}
from
'glsx-common'
import
util
from
'@/util/util'
const
titleList
=
[
{
id
:
0
,
name
:
'全部'
},
{
id
:
1
,
name
:
'售后中'
},
{
id
:
2
,
name
:
'售后完成'
}
]
export
default
{
name
:
'goodsOrderIndex'
,
name
:
'goodsOrderIndex'
,
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
size
:
'small'
,
titleList
:
[
'全部'
,
'售后中'
,
'售后完成'
],
titleList
,
curTitleIdx
:
0
,
buttonList
:
[
buttonList
:
[
{
{
type
:
'el-button'
,
type
:
'el-button'
,
...
@@ -40,15 +70,17 @@
...
@@ -40,15 +70,17 @@
}
}
],
],
orderFormObj
:
{
orderFormObj
:
{
info
:
''
,
requestType
:
'0'
,
customerInfo
:
''
,
goodsInfo
:
''
,
goodsInfo
:
''
,
orderNo
:
''
,
searchOrderCode
:
''
,
successDate
:
''
afterSalesType
:
''
,
time
:
''
},
},
orderFormData
:
[
orderFormData
:
[
{
{
label
:
'用户信息'
,
label
:
'用户信息'
,
name
:
'
i
nfo'
,
name
:
'
customerI
nfo'
,
placeholder
:
'请输入姓名或手机号'
,
placeholder
:
'请输入姓名或手机号'
,
type
:
'input'
,
type
:
'input'
,
isClear
:
true
isClear
:
true
...
@@ -61,30 +93,30 @@
...
@@ -61,30 +93,30 @@
},
},
{
{
label
:
'售后编号'
,
label
:
'售后编号'
,
name
:
'
orderNo
'
,
name
:
'
searchOrderCode
'
,
type
:
'input'
,
type
:
'input'
,
isClear
:
true
isClear
:
true
},
},
{
{
label
:
'售后类型'
,
label
:
'售后类型'
,
name
:
'
classify
'
,
name
:
'
afterSalesType
'
,
type
:
'select'
,
type
:
'select'
,
optionList
:
[
optionList
:
[
{
{
label
:
'全部'
,
label
:
'全部'
,
value
:
''
value
:
'
1000
'
},
},
{
{
label
:
'退货退款'
,
label
:
'退货退款'
,
value
:
'1'
value
:
'1
001
'
},
},
{
{
label
:
'仅退款'
,
label
:
'仅退款'
,
value
:
'2'
value
:
'
100
2'
},
},
{
{
label
:
'退货换货'
,
label
:
'退货换货'
,
value
:
'3'
value
:
'
100
3'
},
},
],
],
optionId
:
'value'
,
optionId
:
'value'
,
...
@@ -98,47 +130,53 @@
...
@@ -98,47 +130,53 @@
pickerOptions
:
'beforeRangePickerOptions'
pickerOptions
:
'beforeRangePickerOptions'
}
}
],
],
getListApi
:
this
.
$apis
.
platformGoods
.
get
Coupons
List
,
getListApi
:
this
.
$apis
.
platformGoods
.
get
SaleOrder
List
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'
pageNum
'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'
currentPage
'
,
totalCount
:
'total'
},
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableOption
:
true
,
tableOption
:
true
,
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'商品名称'
,
label
:
'商品名称'
,
prop
:
'goodsName
'
addHtml
:
'goodsNameSlot
'
},
},
{
{
label
:
'申请数量'
,
label
:
'申请数量'
,
prop
:
'
price
'
prop
:
'
applyQty
'
},
},
{
{
label
:
'申请金额 (元)'
,
label
:
'申请金额 (元)'
,
prop
:
'
p
rice'
prop
:
'
refundP
rice'
},
},
{
{
label
:
'售后类型'
,
label
:
'售后类型'
,
prop
:
'effectiveDays'
prop
:
'returnType'
,
formatter
:
cell
=>
{
let
obj
=
{
1001
:
'退货退款'
,
1002
:
'仅退款'
,
1003
:
'退货换货'
}
return
obj
[
cell
.
returnType
]
||
'--'
}
},
},
{
{
label
:
'用户信息'
,
label
:
'用户信息'
,
width
:
110
,
width
:
110
,
prop
:
'effectiveDays
'
addHtml
:
'userInfoSlot
'
},
},
{
{
label
:
'售后状态'
,
label
:
'售后状态'
,
width
:
110
,
width
:
110
,
prop
:
'effectiveDays
'
addHtml
:
'orderStatusSlot
'
},
},
{
{
label
:
'售后编号'
,
label
:
'售后编号'
,
width
:
11
0
,
width
:
25
0
,
prop
:
'effectiveDays
'
addHtml
:
'orderNoSlot
'
},
},
{
{
label
:
'申请时间'
,
label
:
'申请时间'
,
width
:
110
,
width
:
200
,
prop
:
'effectiveDays'
formatter
:
cellValue
=>
{
return
cellValue
.
createdDate
?
util
.
dateFormat
(
cellValue
.
createdDate
,
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
}
}
]
]
}
}
...
@@ -152,22 +190,41 @@
...
@@ -152,22 +190,41 @@
},
},
methods
:
{
methods
:
{
changeTable
(
idx
){
changeTable
(
id
){
this
.
curTitleIdx
=
idx
this
.
orderFormObj
.
requestType
=
id
this
.
handleReset
()
},
},
handleReset
(){
handleReset
(){
this
.
orderFormObj
=
{
requestType
:
this
.
orderFormObj
.
requestType
,
customerInfo
:
''
,
goodsInfo
:
''
,
searchOrderCode
:
''
,
afterSalesType
:
''
,
time
:
''
}
this
.
handleSearch
()
},
},
handleSearch
(){
handleSearch
(){
this
.
$refs
.
tableRef
.
refreshTable
()
},
getParams
(){
let
params
=
utils
.
deepClone
(
this
.
orderFormObj
)
if
(
params
?.
time
?.
length
){
params
.
createdStartTime
=
new
Date
(
params
.
time
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
createdEndTime
=
new
Date
(
params
.
time
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
delete
params
.
time
return
params
},
},
beforeSearchFn
(){
beforeSearchFn
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchForm
=
this
.
getParams
()
resolve
()
resolve
()
})
})
},
},
goOrderDetaillPage
(){
goOrderDetaillPage
(
item
){
this
.
$router
.
push
({
path
:
'/saleOrder/detail'
})
this
.
$router
.
push
({
path
:
`/saleOrder/detail/
${
item
.
subOrderCode
}
`
})
},
},
}
}
}
}
...
@@ -184,6 +241,24 @@
...
@@ -184,6 +241,24 @@
margin-top
:
16px
;
margin-top
:
16px
;
.table-wrap{
.table-wrap{
padding
:
20px
;
padding
:
20px
;
.goodsNameSlot{
img{
width
:
36px
;
height
:
36px
;
vertical-align
:
middle
;
margin-right
:
8px
;
}
}
.userInfoSlot
{
.name{
font-size
:
14px
;
color
:
#666666
;
}
.phone
{
font-size
:
10px
;
color
:
#999999
;
}
}
}
}
}
}
}
}
...
...
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