Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-pay
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 654e0679
authored
Dec 04, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
订单管理
1 parent
39f19c11
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
235 additions
and
20 deletions
src/api/modules/orderManage.js
src/api/modules/orderShare.js
src/assets/css/public.scss
src/assets/icon-info.png
src/views/orderManage/index.vue
src/api/modules/orderManage.js
0 → 100644
View file @
654e067
import
{
http
}
from
'@/main'
const
defaultPath
=
'scrm.api.shopmall.'
const
getListApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
order.page`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
getCountApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
order.count`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getListApi
,
getCountApi
}
\ No newline at end of file
src/api/modules/orderShare.js
View file @
654e067
...
...
@@ -66,4 +66,4 @@ const updateShareRecordApi = params => {
})
}
export
default
{
getListApi
,
getShareRecordInfoApi
,
deleteShareRecordApi
,
revokeShareRecordApi
,
addShareRecordApi
,
updateShareRecordApi
}
export
default
{
getListApi
,
getShareRecordInfoApi
,
deleteShareRecordApi
,
revokeShareRecordApi
,
addShareRecordApi
,
updateShareRecordApi
}
\ No newline at end of file
src/assets/css/public.scss
View file @
654e067
...
...
@@ -56,6 +56,27 @@ html {
background
:
linear-gradient
(
to
right
,
transparent
,
#fff
55%
);
}
.marketing
.list-tips
{
font-size
:
14px
;
color
:
rgba
(
0
,
0
,
0
,
0
.65
);
padding
:
10px
16px
;
height
:
20px
;
line-height
:
20px
;
background-color
:
#E6E9FF
;
border
:
1px
solid
#5850FF
;
margin-bottom
:
20px
;
border-radius
:
4px
;
}
.marketing
.list-tips
.tips-img
{
vertical-align
:
middle
;
margin
:
-2px
8px
0
0
;
}
.marketing
.list-tips
.red-txt
{
color
:
#EB4E4E
;
}
.marketing
.wechat-container
{
width
:
375px
;
margin-right
:
45px
;
...
...
src/assets/icon-info.png
0 → 100644
View file @
654e067
433 Bytes
src/views/orderManage/index.vue
View file @
654e067
<!-- 订单管理 -->
<
template
>
<div
class=
"marketing"
>
<div
class=
"m-b-20"
>
<
!--
<
div
class=
"m-b-20"
>
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
@
click=
"handleEdit(1)"
>
新增分类
</el-button>
</div>
</div>
-->
<div
class=
"container"
>
<div
class=
"list-tips"
>
<img
class=
"tips-img"
src=
"@/assets/icon-info.png"
/>
<span>
已生成有效订单
<span
class=
"red-txt"
>
{{
statisticsInfo
.
orderCount
||
0
}}
</span>
项 累计订单总额:
<span
class=
"red-txt"
>
{{
statisticsInfo
.
payPriceTotal
||
0
}}
</span>
元
</span>
</div>
<div>
<glsx-combi-form
ref=
"showSearch"
labelWidth=
"90px"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<glsx-combi-form
ref=
"showSearch"
labelWidth=
"90px"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleReset"
>
重置
</el-button>
...
...
@@ -15,7 +28,14 @@
</div>
<!-- 表格区域 开始 -->
<GLTable
ref=
"classifyRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<GLTable
ref=
"classifyRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleEdit(2, scope.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
...
...
@@ -34,62 +54,171 @@ export default {
data
()
{
return
{
size
:
'small'
,
oldVal
:
{
orderStatuses
:
[]
},
searchForm
:
{
classifyName
:
''
,
createDate
:
[]
orderCode
:
''
,
orderStatuses
:
[],
merchantName
:
''
,
customerName
:
''
,
createDate
:
[],
orderSource
:
''
,
deliveryType
:
''
},
tableSearchForm
:
{},
statisticsInfo
:
{},
// 搜索
searchFormData
:
[
{
label
:
'
分类名称
'
,
name
:
'
classifyNam
e'
,
label
:
'
订单编号
'
,
name
:
'
orderCod
e'
,
type
:
'input'
,
maxlength
:
20
},
{
label
:
'创建日期'
,
label
:
'订单状态'
,
name
:
'orderStatuses'
,
type
:
'select'
,
multiple
:
true
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'orderStatusList'
,
changeAttr
:
(
value
,
targetItem
)
=>
{
var
isAdd
=
value
.
length
>
this
.
oldVal
.
orderStatuses
.
length
var
targetVal
=
value
[
value
.
length
-
1
]
if
(
!
isAdd
)
{
for
(
var
i
=
0
;
i
<
this
.
oldVal
.
orderStatuses
.
length
;
i
++
)
{
if
(
!
value
.
includes
(
this
.
oldVal
.
orderStatuses
[
i
]))
{
targetVal
=
this
.
oldVal
.
orderStatuses
[
i
]
break
}
}
}
!
targetVal
&&
(
this
.
searchForm
.
orderStatuses
=
isAdd
?
this
.
searchFormData
[
1
].
optionList
.
map
(
item
=>
item
.
confId
)
:
[])
if
(
targetVal
)
{
var
idx
=
value
.
findIndex
(
item
=>
item
==
''
)
if
(
idx
!=
-
1
&&
this
.
searchForm
.
orderStatuses
.
length
<
this
.
searchFormData
[
1
].
optionList
.
length
)
{
this
.
searchForm
.
orderStatuses
.
splice
(
idx
,
1
)
}
else
if
(
idx
==
-
1
&&
this
.
searchForm
.
orderStatuses
.
length
==
(
this
.
searchFormData
[
1
].
optionList
.
length
-
1
))
{
this
.
searchForm
.
orderStatuses
.
push
(
''
)
}
}
this
.
oldVal
.
orderStatuses
=
this
.
$common
.
utils
.
deepClone
(
this
.
searchForm
.
orderStatuses
)
}
},
{
label
:
'门店'
,
name
:
'merchantName'
,
type
:
'input'
},
{
label
:
'客户姓名'
,
name
:
'customerName'
,
type
:
'input'
},
{
label
:
'订单日期'
,
name
:
'createDate'
,
type
:
'datePicker'
,
isClear
:
true
,
pickerOptions
:
'beforeRangePickerOptions'
},
{
label
:
'订单类型'
,
name
:
'orderSource'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'orderSourceList'
},
{
label
:
'结算方式'
,
name
:
'deliveryType'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'deliveryTypeList'
}
],
// 表格
getListApi
:
this
.
$apis
.
classifyList
.
getListApi
,
getListApi
:
this
.
$apis
.
orderManage
.
getListApi
,
tableParams
:
{
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[
{
label
:
'
专区名称
'
,
prop
:
'
classifyNam
e'
label
:
'
订单编号
'
,
prop
:
'
orderCod
e'
},
{
label
:
'
创建日期
'
,
label
:
'
订单时间
'
,
prop
:
'createdDate'
,
formatter
:
cellValue
=>
{
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
},
{
label
:
'客户信息'
,
prop
:
'customerName'
},
{
label
:
'订单状态'
,
prop
:
'orderStatus'
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
}
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
},
// 基本数据
baseData
:
{
orderStatusList
:
[
{
confId
:
'1'
,
confName
:
'未支付'
},
// { id: '2', confName: '已支付' },
{
confId
:
'3'
,
confName
:
'已失效'
},
{
confId
:
'4'
,
confName
:
'已发货'
},
{
confId
:
'5'
,
confName
:
'已收货'
},
{
confId
:
'6'
,
confName
:
'待审核'
},
{
confId
:
'7'
,
confName
:
'审核成功'
},
{
confId
:
'8'
,
confName
:
'审核失败'
},
{
confId
:
'9'
,
confName
:
'待确认'
},
{
confId
:
'10'
,
confName
:
'退款中'
},
{
confId
:
'11'
,
confName
:
'已退款'
},
{
confId
:
'12'
,
confName
:
'退款失败'
},
{
confId
:
'13'
,
confName
:
'待发货'
},
{
confId
:
'14'
,
confName
:
'已安装'
}
],
orderSourceList
:
[
{
confId
:
'1'
,
confName
:
'商城订单'
},
{
confId
:
'2'
,
confName
:
'直播订单'
},
{
confId
:
'3'
,
confName
:
'活动订单'
}
],
deliveryTypeList
:
[
{
confId
:
'1'
,
confName
:
'到店核销'
},
{
confId
:
'2'
,
confName
:
'快递到家'
}
]
}
}
},
mounted
()
{},
mounted
()
{
this
.
getCount
()
this
.
getOptionsList
(
'searchFormData'
)
},
methods
:
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchForm
.
createDate
.
length
)
{
params
.
startTime
=
new
Date
(
this
.
searchForm
.
createDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
endTime
=
new
Date
(
this
.
searchForm
.
createDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
params
.
createdStartDateStr
=
new
Date
(
this
.
searchForm
.
createDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
createdEndDateStr
=
new
Date
(
this
.
searchForm
.
createDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
delete
params
.
createDate
return
params
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
this
.
getParams
()
...
...
@@ -98,6 +227,32 @@ export default {
})
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
var
index
=
this
[
formName
].
findIndex
(
k
=>
k
.
name
==
refreshSigle
)
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
else
{
this
[
formName
].
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
&&
this
.
baseData
[
item
.
optionsName
].
length
)
{
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
})
}
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -119,6 +274,15 @@ export default {
}
})
},
getCount
()
{
var
params
=
this
.
getParams
()
delete
params
.
createDate
this
.
$apis
.
orderManage
.
getCountApi
(
params
).
then
(
res
=>
{
this
.
statisticsInfo
=
res
||
{}
})
},
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
addOrEdit
==
1
?
this
.
$router
.
push
(
'/classifyList/editClassify/'
+
addOrEdit
)
:
this
.
$router
.
push
(
'/classifyList/editClassify/'
+
addOrEdit
+
'/'
+
row
.
id
)
...
...
@@ -138,8 +302,13 @@ export default {
handleReset
()
{
this
.
searchForm
=
{
classifyName
:
''
,
createDate
:
[]
orderCode
:
''
,
orderStatuses
:
[],
merchantName
:
''
,
customerName
:
''
,
createDate
:
[],
orderSource
:
''
,
deliveryType
:
''
}
this
.
handleSearch
()
}
...
...
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