Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 8a7af916
authored
Dec 01, 2022
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商品中心调试
1 parent
f06cadfd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
180 additions
and
36 deletions
linkwe-pc/src/api/commodityCenter/commodityManage.js
linkwe-pc/src/components/Upload.vue
linkwe-pc/src/views/commodityCenter/commodityManage/list.vue
linkwe-pc/src/views/commodityCenter/orderManage/list.vue
linkwe-pc/src/views/commodityCenter/recordManage/index.vue
linkwe-pc/src/api/commodityCenter/commodityManage.js
View file @
8a7af91
...
...
@@ -132,7 +132,8 @@ export function setOrderSync() {
export
function
exportOrder
(
data
)
{
return
request
({
url
:
service
+
'/order/export'
,
params
:
data
params
:
data
,
responseType
:
'blob'
,
})
}
...
...
@@ -157,10 +158,47 @@ export function getGoodsTotal() {
})
}
// 商品分析
// 商品分析
折线图
export
function
getLineChartTotal
(
data
)
{
return
request
({
url
:
service
+
'/analyze/lineChart'
,
method
:
'post'
,
data
})
}
// 商品分析 商品top5
export
function
getGoodsTop5
(
data
)
{
return
request
({
url
:
service
+
'/analyze/top5'
,
method
:
'post'
,
data
})
}
// 商品分析 员工top5
export
function
getMembersTop5
(
data
)
{
return
request
({
url
:
service
+
'/analyze/user/top5'
,
method
:
'post'
,
data
})
}
// 商品分析 数据报表
export
function
getTableTotal
(
data
)
{
return
request
({
url
:
service
+
'/analyze/data/report'
,
params
:
data
})
}
// 商品分析 数据报表 导出
export
function
getTableExport
(
params
)
{
return
request
({
url
:
service
+
'/analyze/data/report/export'
,
method
:
'post'
,
responseType
:
'blob'
,
params
,
})
}
\ No newline at end of file
linkwe-pc/src/components/Upload.vue
View file @
8a7af91
This diff is collapsed.
Click to expand it.
linkwe-pc/src/views/commodityCenter/commodityManage/list.vue
View file @
8a7af91
...
...
@@ -34,16 +34,23 @@
multiple
:
true
,
total
:
0
,
list
:
[],
lastSyncTime
:
0
lastSyncTime
:
0
,
fileList
:
[]
}
},
computed
:
{},
created
()
{
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
<div>快捷创建商品图册,员工一键发送给客户,客户直接购买。</div>
`
)
this
.
getList
()
},
methods
:
{
resetForm
()
{
this
.
query
.
name
=
1
this
.
query
.
name
=
''
this
.
getList
(
1
)
},
getList
(
page
)
{
...
...
@@ -62,12 +69,18 @@
})
},
edit
(
data
)
{
data
?
api
.
getDetail
(
data
.
id
).
then
((
res
)
=>
{
this
.
form
=
res
.
data
this
.
form
.
attachments
=
this
.
form
.
attachments
.
split
(
','
)
this
.
fileList
=
[]
if
(
data
)
{
api
.
getDetail
(
data
.
id
).
then
((
res
)
=>
{
this
.
form
=
res
.
data
let
arr
=
this
.
form
.
attachments
.
split
(
','
)
arr
.
forEach
((
dd
)
=>
{
this
.
fileList
.
push
({
url
:
dd
})
})
:
(
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
defaultForm
)))
})
}
else
{
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
defaultForm
))
}
this
.
dialogVisible
=
true
},
sync
()
{
...
...
@@ -92,7 +105,7 @@
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
let
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
form
.
price
=
form
.
price
.
toFixed
(
2
)
form
.
attachments
=
form
.
attachments
.
join
(
','
)
form
.
attachments
=
this
.
fileList
.
map
((
dd
)
=>
dd
.
url
)
.
join
(
','
)
this
.
submitLoading
=
true
api
[
form
.
id
?
'update'
:
'add'
](
form
,
form
.
id
)
.
then
(()
=>
{
...
...
@@ -136,7 +149,7 @@
}
</
script
>
<
template
>
<div
class=
""
>
<div
class=
"
g-card g-pad20
"
>
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"110px"
class=
"top-search"
>
<el-form-item
label=
"商品名称或描述"
prop=
"name"
>
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
...
...
@@ -157,7 +170,7 @@
<div
slot-scope=
"
{ row }">
<div
style=
"display: flex;"
>
<el-image
style=
"width: 50px; height: 50px; margin-right:
3
px; flex-shrink: 0;"
style=
"width: 50px; height: 50px; margin-right:
5
px; flex-shrink: 0;"
:src=
"row.picture"
></el-image>
<span
class=
"limit_span"
>
{{
row
.
describe
}}
</span>
...
...
@@ -214,7 +227,7 @@
></el-input>
</el-form-item>
<el-form-item
label=
"商品详情"
>
<upload
:file
Urls
.
sync=
"form.attachments
"
:limit=
"8"
type=
"0"
>
<upload
:file
List
.
sync=
"fileList"
:multiple=
"true
"
:limit=
"8"
type=
"0"
>
<div
slot=
"tip"
class=
"tip"
>
最多添加八张详情
</div>
</upload>
</el-form-item>
...
...
@@ -230,12 +243,7 @@
></el-image>
<div
class=
"price"
>
¥{{ form.price }}
</div>
<div
class=
"content"
>
{{ form.describe }}
</div>
<el-image
v-for=
"(item, index) in form.attachments"
class=
"commodity-img"
:src=
"item"
:key=
"index"
></el-image>
<el-image
v-for=
"(item, index) in fileList"
class=
"commodity-img"
:src=
"item.url"
:key=
"index"
></el-image>
</div>
</PhoneTemplate>
</el-col>
...
...
linkwe-pc/src/views/commodityCenter/orderManage/list.vue
View file @
8a7af91
<
template
>
<div
class=
""
>
<div
class=
"
g-card g-pad20
"
>
<el-form
:inline=
"true"
label-width=
"110px"
class=
"top-search"
>
<el-form-item
label=
"商品名称或描述"
prop=
"productName"
>
<el-input
v-model=
"query.productName"
placeholder=
"请输入商品名称或描述"
></el-input>
...
...
@@ -74,6 +74,24 @@
{{
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
row
.
externalType
]
}}
<
/span
>
<
/div
>
<
div
v
-
if
=
"row.address && row.phone"
class
=
"ml10"
style
=
"align-self: baseline;"
>
<
el
-
popover
trigger
=
"hover"
width
=
"400"
>
<
el
-
form
ref
=
"form"
label
-
width
=
"100px"
>
<
el
-
form
-
item
label
=
"联系人:"
>
{{
row
.
contact
}}
<
/el-form-item
>
<
el
-
form
-
item
label
=
"联系地址:"
>
{{
row
.
address
}}
<
/el-form-item
>
<
el
-
form
-
item
label
=
"联系电话:"
>
{{
row
.
phone
}}
<
/el-form-item
>
<
/el-form
>
<
div
style
=
"display: inline;"
slot
=
"reference"
>
<
i
class
=
"el-icon-warning"
><
/i
>
<
/div
>
<
/el-popover
>
<
/div
>
<
/div
>
<
/template
>
<
/el-table-column
>
...
...
@@ -81,8 +99,28 @@
<
el
-
table
-
column
label
=
"付款金额(元)"
align
=
"center"
prop
=
"totalFee"
/>
<
el
-
table
-
column
label
=
"收款员工"
align
=
"center"
prop
=
"weUserName"
/>
<
el
-
table
-
column
label
=
"收款商户"
align
=
"center"
prop
=
"mchName"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"交易状态"
align
=
"center"
prop
=
"orderStateStr"
/>
<
el
-
table
-
column
label
=
"退款状态"
align
=
"center"
prop
=
"refundStateStr"
/>
<
el
-
table
-
column
label
=
"交易状态"
align
=
"center"
prop
=
"orderStateStr"
>
<
template
slot
-
scope
=
"
{
row
}
">
<a
v-if="
row
.
orderStateStr
"
style="
color
:
#
0079
de
;
border
-
bottom
:
1
px
solid
#
0079
de
;
"
@click="
tradingStateFn
(
row
.
orderNo
)
"
>
{{
row
.
orderStateStr
}}
<
/
a
>
<
span
v
-
else
>
-
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"退款状态"
align
=
"center"
prop
=
"refundStateStr"
>
<
template
slot
-
scope
=
"
{
row
}
">
<a
v-if="
row
.
refundStateStr
"
style="
color
:
#
0079
de
;
border
-
bottom
:
1
px
solid
#
0079
de
;
"
@click="
refundStateFn
(
row
.
refundNo
)
"
>
{{
row
.
refundStateStr
}}
<
/
a
>
<
span
v
-
else
>
-
<
/span
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total > 0"
...
...
@@ -97,13 +135,15 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
form
ref
=
"form"
label
-
width
=
"100px"
>
<
el
-
form
-
item
label
=
"交易时间:"
>
<!--
{{
}}
-->
{{
orderState
.
payTime
}}
<
/el-form-item
>
<
el
-
form
-
item
label
=
"交易单号:"
>
<!--
{{
}}
-->
{{
orderState
.
orderNo
}}
<
el
-
button
type
=
"text"
plain
size
=
"mini"
@
click
=
"handleCopy(orderState.orderNo)"
>
复制
<
/el-button
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"商户单号:"
>
<!--
{{
}}
-->
{{
orderState
.
mchNo
}}
<
el
-
button
type
=
"text"
plain
size
=
"mini"
@
click
=
"handleCopy(orderState.mchNo)"
>
复制
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<
/el-col
>
...
...
@@ -117,19 +157,20 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
form
ref
=
"form"
label
-
width
=
"100px"
>
<
el
-
form
-
item
label
=
"退款发起时间:"
>
<!--
{{
}}
-->
{{
refundState
.
refundTime
}}
<
/el-form-item
>
<
el
-
form
-
item
label
=
"退款发起人:"
>
<!--
{{
}}
-->
{{
refundState
.
refundUserName
}}
<
/el-form-item
>
<
el
-
form
-
item
label
=
"退款备注:"
>
<!--
{{
}}
-->
{{
refundState
.
remark
}}
<
/el-form-item
>
<
el
-
form
-
item
label
=
"退款金额(元)"
>
<!--
{{
}}
-->
{{
refundState
.
refundFee
}}
<
/el-form-item
>
<
el
-
form
-
item
label
=
"退款单号:"
>
<!--
{{
}}
-->
{{
refundState
.
refundNo
}}
<
el
-
button
type
=
"text"
plain
size
=
"mini"
@
click
=
"handleCopy(orderState.refundNo)"
>
复制
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<
/el-col
>
...
...
@@ -149,6 +190,8 @@
<
script
>
import
*
as
api
from
'@/api/commodityCenter/commodityManage'
import
{
dateFormat
}
from
'@/utils/index'
export
default
{
components
:
{
}
,
props
:
{
}
,
...
...
@@ -176,19 +219,53 @@
dialogVisibleSelect
:
false
,
dateRange
:
[],
dialogStateVisible
:
false
,
dialogVisible
:
false
dialogVisible
:
false
,
orderState
:
{
payTime
:
''
,
orderNo
:
''
,
mchNo
:
''
}
,
refundState
:
{
refundTime
:
''
,
refundNo
:
''
,
refundUserName
:
''
,
refundFee
:
''
,
remark
:
''
}
}
}
,
computed
:
{
}
,
created
()
{
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
<div>查看商品所有订单及明细记录。</div>
`
)
this
.
getList
()
}
,
methods
:
{
handleCopy
(
text
)
{
const
input
=
document
.
createElement
(
'input'
)
input
.
style
.
cssText
=
'opacity: 0;'
input
.
type
=
'text'
input
.
value
=
text
// 修改文本框的内容
document
.
body
.
appendChild
(
input
)
input
.
select
()
// 选中文本
document
.
execCommand
(
'copy'
)
// 执行浏览器复制命令
this
.
$message
({
message
:
'复制成功'
,
type
:
'success'
}
)
}
,
tradingStateFn
(
id
)
{
api
.
getOrderState
(
id
)
api
.
getOrderState
(
id
).
then
((
res
)
=>
{
this
.
orderState
=
res
.
data
this
.
dialogVisible
=
true
}
)
}
,
refundStateFn
(
orderNo
)
{
api
.
getRefundOrderState
(
orderNo
)
refundStateFn
(
id
)
{
api
.
getRefundOrderState
(
id
).
then
((
res
)
=>
{
this
.
refundState
=
res
.
data
this
.
dialogStateVisible
=
true
}
)
}
,
resetForm
()
{
this
.
query
=
{
...
...
@@ -227,10 +304,31 @@
background
:
'rgba(0, 0, 0, 0.7)'
}
)
api
.
exportOrder
()
.
exportOrder
({
productName
:
this
.
query
.
productName
,
externalName
:
this
.
query
.
externalName
,
weUserId
:
this
.
query
.
weUserId
,
orderState
:
this
.
query
.
orderState
,
refundState
:
this
.
query
.
refundState
,
beginTime
:
this
.
query
.
beginTime
,
endTime
:
this
.
query
.
endTime
}
)
.
then
((
res
)
=>
{
if
(
!
res
)
return
const
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
}
)
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
//兼容IE10
navigator
.
msSaveBlob
(
blob
,
'订单'
)
}
else
{
const
href
=
URL
.
createObjectURL
(
blob
)
const
a
=
document
.
createElement
(
'a'
)
a
.
style
.
display
=
'none'
a
.
href
=
href
a
.
download
=
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
)
+
'_订单.xlsx'
a
.
click
()
//触发下载
URL
.
revokeObjectURL
(
a
.
href
)
//释放URL对象
}
loading
.
close
()
console
.
log
(
res
)
}
)
.
catch
(()
=>
{
loading
.
close
()
...
...
linkwe-pc/src/views/commodityCenter/recordManage/index.vue
View file @
8a7af91
This diff is collapsed.
Click to expand it.
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