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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
244 additions
and
91 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() {
...
@@ -132,7 +132,8 @@ export function setOrderSync() {
export
function
exportOrder
(
data
)
{
export
function
exportOrder
(
data
)
{
return
request
({
return
request
({
url
:
service
+
'/order/export'
,
url
:
service
+
'/order/export'
,
params
:
data
params
:
data
,
responseType
:
'blob'
,
})
})
}
}
...
@@ -157,10 +158,47 @@ export function getGoodsTotal() {
...
@@ -157,10 +158,47 @@ export function getGoodsTotal() {
})
})
}
}
// 商品分析
// 商品分析
折线图
export
function
getLineChartTotal
(
data
)
{
export
function
getLineChartTotal
(
data
)
{
return
request
({
return
request
({
url
:
service
+
'/analyze/lineChart'
,
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
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
\ No newline at end of file
linkwe-pc/src/components/Upload.vue
View file @
8a7af91
<
script
>
<
script
>
import
{
getCosConfig
,
getVideoPic
}
from
'@/api/common'
import
{
getCosConfig
,
getVideoPic
}
from
'@/api/common'
import
{
dateFormat
,
uuid
}
from
'@/utils/index'
import
{
dateFormat
,
uuid
}
from
'@/utils/index'
import
Video
from
'video.js'
import
Video
from
'video.js'
import
Cos
from
'cos-js-sdk-v5'
import
Cos
from
'cos-js-sdk-v5'
import
BenzAMRRecorder
from
'benz-amr-recorder'
import
BenzAMRRecorder
from
'benz-amr-recorder'
import
MP4Box
from
'mp4box'
import
MP4Box
from
'mp4box'
export
default
{
export
default
{
components
:
{},
components
:
{},
props
:
{
props
:
{
// 单文件上传时使用
// 单文件上传时使用
fileUrl
:
{
fileUrl
:
{
type
:
String
,
type
:
String
,
default
:
''
,
default
:
''
},
},
fileName
:
{
fileName
:
{
type
:
String
,
type
:
String
,
default
:
''
,
default
:
''
},
},
// 多文件上传时使用,例如: [{name: 'food.jpg', url: 'https://xxx.cdn.com/xxx.jpg'}]
// 多文件上传时使用,例如: [{name: 'food.jpg', url: 'https://xxx.cdn.com/xxx.jpg'}]
fileList
:
{
fileList
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[],
default
:
()
=>
[]
},
},
// 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file)
// 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file)
...
@@ -32,38 +32,38 @@ export default {
...
@@ -32,38 +32,38 @@ export default {
validator
:
function
(
value
)
{
validator
:
function
(
value
)
{
// 这个值必须匹配下列字符串中的一个
// 这个值必须匹配下列字符串中的一个
return
[
'0'
,
'1'
,
'2'
,
'3'
].
includes
(
value
)
return
[
'0'
,
'1'
,
'2'
,
'3'
].
includes
(
value
)
},
}
},
},
// 上传文件大小不能超过 maxSize MB, 各类型有默认限制 参见: maxSizeDefault
// 上传文件大小不能超过 maxSize MB, 各类型有默认限制 参见: maxSizeDefault
maxSize
:
{
maxSize
:
{
type
:
Number
,
type
:
Number
,
default
:
undefined
,
default
:
undefined
},
},
// 图片的宽高像素限制 [width(number), height(number)],默认null不限制
// 图片的宽高像素限制 [width(number), height(number)],默认null不限制
maxImgPx
:
{
maxImgPx
:
{
type
:
Array
,
type
:
Array
,
default
:
null
,
// () => [100, 100]
default
:
null
// () => [100, 100]
},
},
// 允许上传的文件格式后缀名 eg:["jpg", "png"],['*']为不限制,各类型有默认限制 参见: formatDefault
// 允许上传的文件格式后缀名 eg:["jpg", "png"],['*']为不限制,各类型有默认限制 参见: formatDefault
format
:
{
format
:
{
type
:
Array
,
type
:
Array
,
default
:
undefined
,
default
:
undefined
},
},
// 选择上传文件类型, 用于过滤系统选择文件类型, 默认根据类型自动匹配:见 acceptAuto,
// 选择上传文件类型, 用于过滤系统选择文件类型, 默认根据类型自动匹配:见 acceptAuto,
accept
:
{
accept
:
{
type
:
String
,
type
:
String
,
default
:
''
,
default
:
''
},
},
// 是否能上传多个
// 是否能上传多个
multiple
:
{
multiple
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
},
},
// multiple为true是有效,最多上传几个,默认不限制,最小为1,大于1是自动开启可多选,
// multiple为true是有效,最多上传几个,默认不限制,最小为1,大于1是自动开启可多选,
limit
:
{
limit
:
{
type
:
Number
,
type
:
Number
,
default
:
undefined
,
default
:
undefined
},
}
// onProgress: {
// onProgress: {
// type: Function,
// type: Function,
// default: null,
// default: null,
...
@@ -96,36 +96,41 @@ export default {
...
@@ -96,36 +96,41 @@ export default {
// cos配置信息
// cos配置信息
cosConfig
:
{
bucketName
:
''
,
cosImgUrlPrefix
:
''
,
region
:
''
},
cosConfig
:
{
bucketName
:
''
,
cosImgUrlPrefix
:
''
,
region
:
''
},
cosInstance
:
undefined
,
// cos实例
cosInstance
:
undefined
// cos实例
}
}
},
},
watch
:
{
watch
:
{
fileUrl
:
{
fileUrl
:
{
handler
(
value
)
{
handler
(
value
)
{
this
.
fileUrlWatch
=
value
this
.
fileUrlWatch
=
value
},
}
},
},
fileName
:
{
fileName
:
{
handler
(
value
)
{
handler
(
value
)
{
this
.
fileNameWatch
=
value
this
.
fileNameWatch
=
value
}
},
},
fileList
:
{
handler
(
value
)
{
this
.
fileListWatch
=
value
}
},
},
loading
(
val
)
{
loading
(
val
)
{
this
.
$emit
(
'loadingChange'
,
val
)
this
.
$emit
(
'loadingChange'
,
val
)
},
}
},
},
computed
:
{
computed
:
{
// 识别选择文件类型
// 识别选择文件类型
acceptAuto
()
{
acceptAuto
()
{
return
[
'image/*'
,
'amr/*'
,
'video/*'
][
this
.
type
]
return
[
'image/*'
,
'amr/*'
,
'video/*'
][
this
.
type
]
},
}
},
},
created
()
{
created
()
{
getCosConfig
().
then
((
res
)
=>
{
getCosConfig
().
then
((
res
)
=>
{
this
.
cosConfig
=
res
this
.
cosConfig
=
res
this
.
cosInstance
=
new
Cos
({
this
.
cosInstance
=
new
Cos
({
SecretId
:
res
.
secretId
,
SecretId
:
res
.
secretId
,
SecretKey
:
res
.
secretKey
,
SecretKey
:
res
.
secretKey
})
})
})
})
},
},
...
@@ -178,7 +183,7 @@ export default {
...
@@ -178,7 +183,7 @@ export default {
const
params
=
{
const
params
=
{
Bucket
:
this
.
cosConfig
.
bucketName
/* 填入您自己的存储桶,必须字段 */
,
Bucket
:
this
.
cosConfig
.
bucketName
/* 填入您自己的存储桶,必须字段 */
,
Region
:
this
.
cosConfig
.
region
/* 存储桶所在地域,例如ap-beijing,必须字段 */
,
Region
:
this
.
cosConfig
.
region
/* 存储桶所在地域,例如ap-beijing,必须字段 */
,
Key
:
`/
${
dateFormat
(
date
,
'yyyy-MM-dd'
)}
/t
${
date
.
getTime
()}
-
${
uuid
()}${
format
}
`
,
Key
:
`/
${
dateFormat
(
date
,
'yyyy-MM-dd'
)}
/t
${
date
.
getTime
()}
-
${
uuid
()}${
format
}
`
/* 存储在桶里的对象键(例如1.jpg,a/b/test.txt),必须字段。*/
/* 存储在桶里的对象键(例如1.jpg,a/b/test.txt),必须字段。*/
// 此处使用的格式: /日期/t时间戳-uid-文件后缀名
// 此处使用的格式: /日期/t时间戳-uid-文件后缀名
}
}
...
@@ -197,7 +202,7 @@ export default {
...
@@ -197,7 +202,7 @@ export default {
this
.
percentage
=
progressData
.
percent
*
100
this
.
percentage
=
progressData
.
percent
*
100
this
.
speed
=
(
progressData
.
speed
/
1024
/
1024
).
toFixed
(
2
)
this
.
speed
=
(
progressData
.
speed
/
1024
/
1024
).
toFixed
(
2
)
// this.onProgress && this.onProgress(this.percentage, this.speed)
// this.onProgress && this.onProgress(this.percentage, this.speed)
},
}
},
},
(
err1
,
data
)
=>
{
(
err1
,
data
)
=>
{
this
.
percentage
=
this
.
speed
=
0
this
.
percentage
=
this
.
speed
=
0
...
@@ -229,14 +234,14 @@ export default {
...
@@ -229,14 +234,14 @@ export default {
this
.
$emit
(
'update:fileList'
,
this
.
fileList
.
concat
({
name
,
url
:
location
}))
this
.
$emit
(
'update:fileList'
,
this
.
fileList
.
concat
({
name
,
url
:
location
}))
}
}
}
}
},
}
)
)
},
},
remove
(
i
)
{
remove
(
i
)
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
let
clone
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
fileList
))
let
clone
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
fileList
))
this
.
fileListWatch
.
splice
(
i
,
1
)
this
.
fileListWatch
.
splice
(
i
,
1
)
...
@@ -264,7 +269,7 @@ export default {
...
@@ -264,7 +269,7 @@ export default {
0
:
{
tip
:
'png/jpg'
,
value
:
[
'png'
,
'jpg'
,
'jpeg'
]
},
0
:
{
tip
:
'png/jpg'
,
value
:
[
'png'
,
'jpg'
,
'jpeg'
]
},
1
:
{
value
:
[
'amr'
]
},
1
:
{
value
:
[
'amr'
]
},
2
:
{
value
:
[
'mp4'
]
},
2
:
{
value
:
[
'mp4'
]
},
3
:
{
tip
:
'word/pdf/ppt'
,
value
:
[
'doc'
,
'docx'
,
'pdf'
,
'ppt'
,
'pptx'
,
'pps'
,
'pptsx'
]
},
3
:
{
tip
:
'word/pdf/ppt'
,
value
:
[
'doc'
,
'docx'
,
'pdf'
,
'ppt'
,
'pptx'
,
'pps'
,
'pptsx'
]
}
}
}
format
=
formatDefault
[
this
.
type
].
value
format
=
formatDefault
[
this
.
type
].
value
tip
=
formatDefault
[
this
.
type
].
tip
tip
=
formatDefault
[
this
.
type
].
tip
...
@@ -404,9 +409,9 @@ export default {
...
@@ -404,9 +409,9 @@ export default {
})
})
})
})
// this.$refs.image.$refs.closeViewer();
// this.$refs.image.$refs.closeViewer();
},
}
},
}
}
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -423,7 +428,8 @@ export default {
...
@@ -423,7 +428,8 @@ export default {
:src=
"item.url"
:src=
"item.url"
fit=
"contain"
fit=
"contain"
:preview-src-list=
"fileListWatch.map((e) => e.url)"
:preview-src-list=
"fileListWatch.map((e) => e.url)"
alt=
""
/>
alt=
""
/>
<div
class=
"action-mask"
>
<div
class=
"action-mask"
>
<i
class=
"el-icon-search mr5"
@
click=
"showView(index)"
></i>
<i
class=
"el-icon-search mr5"
@
click=
"showView(index)"
></i>
<!--
<span
v-if=
"action.includes('download')"
@
click=
"download(item)"
>
<!--
<span
v-if=
"action.includes('download')"
@
click=
"download(item)"
>
...
@@ -451,7 +457,8 @@ export default {
...
@@ -451,7 +457,8 @@ export default {
:limit=
"limit"
:limit=
"limit"
:on-error=
"onError"
:on-error=
"onError"
:on-exceed=
"handleExceed"
:on-exceed=
"handleExceed"
:before-upload=
"handleBeforeUpload"
>
:before-upload=
"handleBeforeUpload"
>
<!--
<!--
element-loading-text="正在上传..."
element-loading-text="正在上传..."
:on-success="onSuccess"
:on-success="onSuccess"
...
@@ -469,7 +476,7 @@ export default {
...
@@ -469,7 +476,7 @@ export default {
<circle
cx=
"50"
cy=
"50"
r=
"20"
fill=
"none"
class=
"path"
></circle>
<circle
cx=
"50"
cy=
"50"
r=
"20"
fill=
"none"
class=
"path"
></circle>
</svg>
</svg>
</div>
</div>
<div
class=
"cc"
style=
"margin-top: 35px"
>
<div
class=
"cc"
style=
"margin-top: 35px
;
"
>
{{ speed + 'M/s' }}
{{ speed + 'M/s' }}
</div>
</div>
</div>
</div>
...
@@ -483,7 +490,8 @@ export default {
...
@@ -483,7 +490,8 @@ export default {
:src=
"fileUrlWatch"
:src=
"fileUrlWatch"
class=
"upload-img"
class=
"upload-img"
:preview-src-list=
"[fileUrlWatch]"
:preview-src-list=
"[fileUrlWatch]"
fit=
"contain"
/>
fit=
"contain"
/>
<div
class=
"action-mask"
@
click
.
self
.
stop
>
<div
class=
"action-mask"
@
click
.
self
.
stop
>
<i
class=
"el-icon-search"
@
click
.
prevent
.
stop=
"showView()"
></i>
<i
class=
"el-icon-search"
@
click
.
prevent
.
stop=
"showView()"
></i>
...
@@ -507,10 +515,11 @@ export default {
...
@@ -507,10 +515,11 @@ export default {
playsinline=
"true"
playsinline=
"true"
:autoplay=
"false"
:autoplay=
"false"
:key=
"fileUrlWatch"
:key=
"fileUrlWatch"
preload=
"auto"
>
preload=
"auto"
>
<source
:src=
"fileUrlWatch"
type=
"video/mp4"
/>
<source
:src=
"fileUrlWatch"
type=
"video/mp4"
/>
</video>
</video>
<div
class=
"action-mask"
style=
"height: 50%"
@
click
.
self
.
stop
>
<div
class=
"action-mask"
style=
"height: 50%
;
"
@
click
.
self
.
stop
>
<i
class=
"el-icon-edit"
></i>
<i
class=
"el-icon-edit"
></i>
</div>
</div>
</div>
</div>
...
@@ -519,7 +528,7 @@ export default {
...
@@ -519,7 +528,7 @@ export default {
<i
class=
"el-icon-edit ml10"
></i>
<i
class=
"el-icon-edit ml10"
></i>
<!-- a链接用本地视频打不开,视频地址使用远程地址 -->
<!-- a链接用本地视频打不开,视频地址使用远程地址 -->
<a
@
click
.
stop
:href=
"/\.mp4$/.test(fileNameWatch) ? fileUrl : fileUrlWatch"
target=
"_blank"
>
<a
@
click
.
stop
:href=
"/\.mp4$/.test(fileNameWatch) ? fileUrl : fileUrlWatch"
target=
"_blank"
>
<i
class=
"el-icon-view ml10"
style=
"vertical-align: middle"
></i>
<i
class=
"el-icon-view ml10"
style=
"vertical-align: middle
;
"
></i>
</a>
</a>
</div>
</div>
</
template
>
</
template
>
...
@@ -535,7 +544,7 @@ export default {
...
@@ -535,7 +544,7 @@ export default {
</template>
</template>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
::v-deep
.uploader
{
::v-deep
.uploader
{
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
middle
;
vertical-align
:
middle
;
.el-upload
{
.el-upload
{
...
@@ -544,15 +553,15 @@ export default {
...
@@ -544,15 +553,15 @@ export default {
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
}
}
.upload-action
{
.upload-action
{
width
:
178px
;
width
:
178px
;
height
:
178px
;
height
:
178px
;
position
:
relative
;
position
:
relative
;
text-align
:
center
;
text-align
:
center
;
}
}
.uploader-icon
{
.uploader-icon
{
display
:
block
;
display
:
block
;
font-size
:
28px
;
font-size
:
28px
;
line-height
:
178px
;
line-height
:
178px
;
...
@@ -565,27 +574,27 @@ export default {
...
@@ -565,27 +574,27 @@ export default {
border-color
:
$
blue
;
border-color
:
$
blue
;
color
:
$
blue
;
color
:
$
blue
;
}
}
}
}
.progress
{
.progress
{
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.upload-img
{
.upload-img
{
width
:
178px
;
width
:
178px
;
height
:
178px
;
height
:
178px
;
display
:
block
;
display
:
block
;
}
}
.tip
{
.tip
{
color
:
#aaa
;
color
:
#aaa
;
font-size
:
12px
;
font-size
:
12px
;
}
}
.img-item
{
.img-item
{
position
:
relative
;
position
:
relative
;
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
middle
;
vertical-align
:
middle
;
margin
:
0
10px
10px
0
;
margin
:
0
10px
10px
0
;
transition
:
all
0.3s
;
transition
:
all
0.3s
;
}
}
.action-mask
{
.action-mask
{
position
:
absolute
;
position
:
absolute
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-around
;
justify-content
:
space-around
;
...
@@ -603,8 +612,8 @@ export default {
...
@@ -603,8 +612,8 @@ export default {
transition
:
opacity
0.3s
;
transition
:
opacity
0.3s
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
z-index
:
1
;
z-index
:
1
;
}
}
.action-mask
:hover
{
.action-mask
:hover
{
opacity
:
1
;
opacity
:
1
;
}
}
</
style
>
</
style
>
linkwe-pc/src/views/commodityCenter/commodityManage/list.vue
View file @
8a7af91
...
@@ -34,16 +34,23 @@
...
@@ -34,16 +34,23 @@
multiple
:
true
,
multiple
:
true
,
total
:
0
,
total
:
0
,
list
:
[],
list
:
[],
lastSyncTime
:
0
lastSyncTime
:
0
,
fileList
:
[]
}
}
},
},
computed
:
{},
computed
:
{},
created
()
{
created
()
{
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
<div>快捷创建商品图册,员工一键发送给客户,客户直接购买。</div>
`
)
this
.
getList
()
this
.
getList
()
},
},
methods
:
{
methods
:
{
resetForm
()
{
resetForm
()
{
this
.
query
.
name
=
1
this
.
query
.
name
=
''
this
.
getList
(
1
)
this
.
getList
(
1
)
},
},
getList
(
page
)
{
getList
(
page
)
{
...
@@ -62,12 +69,18 @@
...
@@ -62,12 +69,18 @@
})
})
},
},
edit
(
data
)
{
edit
(
data
)
{
data
this
.
fileList
=
[]
?
api
.
getDetail
(
data
.
id
).
then
((
res
)
=>
{
if
(
data
)
{
api
.
getDetail
(
data
.
id
).
then
((
res
)
=>
{
this
.
form
=
res
.
data
this
.
form
=
res
.
data
this
.
form
.
attachments
=
this
.
form
.
attachments
.
split
(
','
)
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
this
.
dialogVisible
=
true
},
},
sync
()
{
sync
()
{
...
@@ -92,7 +105,7 @@
...
@@ -92,7 +105,7 @@
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
let
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
let
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
form
.
price
=
form
.
price
.
toFixed
(
2
)
form
.
price
=
form
.
price
.
toFixed
(
2
)
form
.
attachments
=
form
.
attachments
.
join
(
','
)
form
.
attachments
=
this
.
fileList
.
map
((
dd
)
=>
dd
.
url
)
.
join
(
','
)
this
.
submitLoading
=
true
this
.
submitLoading
=
true
api
[
form
.
id
?
'update'
:
'add'
](
form
,
form
.
id
)
api
[
form
.
id
?
'update'
:
'add'
](
form
,
form
.
id
)
.
then
(()
=>
{
.
then
(()
=>
{
...
@@ -136,7 +149,7 @@
...
@@ -136,7 +149,7 @@
}
}
</
script
>
</
script
>
<
template
>
<
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
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"110px"
class=
"top-search"
>
<el-form-item
label=
"商品名称或描述"
prop=
"name"
>
<el-form-item
label=
"商品名称或描述"
prop=
"name"
>
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
...
@@ -157,7 +170,7 @@
...
@@ -157,7 +170,7 @@
<div
slot-scope=
"
{ row }">
<div
slot-scope=
"
{ row }">
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<el-image
<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"
:src=
"row.picture"
></el-image>
></el-image>
<span
class=
"limit_span"
>
{{
row
.
describe
}}
</span>
<span
class=
"limit_span"
>
{{
row
.
describe
}}
</span>
...
@@ -214,7 +227,7 @@
...
@@ -214,7 +227,7 @@
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品详情"
>
<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>
<div
slot=
"tip"
class=
"tip"
>
最多添加八张详情
</div>
</upload>
</upload>
</el-form-item>
</el-form-item>
...
@@ -230,12 +243,7 @@
...
@@ -230,12 +243,7 @@
></el-image>
></el-image>
<div
class=
"price"
>
¥{{ form.price }}
</div>
<div
class=
"price"
>
¥{{ form.price }}
</div>
<div
class=
"content"
>
{{ form.describe }}
</div>
<div
class=
"content"
>
{{ form.describe }}
</div>
<el-image
<el-image
v-for=
"(item, index) in fileList"
class=
"commodity-img"
:src=
"item.url"
:key=
"index"
></el-image>
v-for=
"(item, index) in form.attachments"
class=
"commodity-img"
:src=
"item"
:key=
"index"
></el-image>
</div>
</div>
</PhoneTemplate>
</PhoneTemplate>
</el-col>
</el-col>
...
...
linkwe-pc/src/views/commodityCenter/orderManage/list.vue
View file @
8a7af91
<
template
>
<
template
>
<div
class=
""
>
<div
class=
"
g-card g-pad20
"
>
<el-form
:inline=
"true"
label-width=
"110px"
class=
"top-search"
>
<el-form
:inline=
"true"
label-width=
"110px"
class=
"top-search"
>
<el-form-item
label=
"商品名称或描述"
prop=
"productName"
>
<el-form-item
label=
"商品名称或描述"
prop=
"productName"
>
<el-input
v-model=
"query.productName"
placeholder=
"请输入商品名称或描述"
></el-input>
<el-input
v-model=
"query.productName"
placeholder=
"请输入商品名称或描述"
></el-input>
...
@@ -74,6 +74,24 @@
...
@@ -74,6 +74,24 @@
{{
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
row
.
externalType
]
}}
{{
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
row
.
externalType
]
}}
<
/span
>
<
/span
>
<
/div
>
<
/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
>
<
/div
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
...
@@ -81,8 +99,28 @@
...
@@ -81,8 +99,28 @@
<
el
-
table
-
column
label
=
"付款金额(元)"
align
=
"center"
prop
=
"totalFee"
/>
<
el
-
table
-
column
label
=
"付款金额(元)"
align
=
"center"
prop
=
"totalFee"
/>
<
el
-
table
-
column
label
=
"收款员工"
align
=
"center"
prop
=
"weUserName"
/>
<
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
=
"mchName"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"交易状态"
align
=
"center"
prop
=
"orderStateStr"
/>
<
el
-
table
-
column
label
=
"交易状态"
align
=
"center"
prop
=
"orderStateStr"
>
<
el
-
table
-
column
label
=
"退款状态"
align
=
"center"
prop
=
"refundStateStr"
/>
<
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
>
<
/el-table
>
<
pagination
<
pagination
v
-
show
=
"total > 0"
v
-
show
=
"total > 0"
...
@@ -97,13 +135,15 @@
...
@@ -97,13 +135,15 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
ref
=
"form"
label
-
width
=
"100px"
>
<
el
-
form
ref
=
"form"
label
-
width
=
"100px"
>
<
el
-
form
-
item
label
=
"交易时间:"
>
<
el
-
form
-
item
label
=
"交易时间:"
>
<!--
{{
}}
-->
{{
orderState
.
payTime
}}
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"交易单号:"
>
<
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
>
<
el
-
form
-
item
label
=
"商户单号:"
>
<
el
-
form
-
item
label
=
"商户单号:"
>
<!--
{{
}}
-->
{{
orderState
.
mchNo
}}
<
el
-
button
type
=
"text"
plain
size
=
"mini"
@
click
=
"handleCopy(orderState.mchNo)"
>
复制
<
/el-button
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-form
>
<
/el-form
>
<
/el-col
>
<
/el-col
>
...
@@ -117,19 +157,20 @@
...
@@ -117,19 +157,20 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
ref
=
"form"
label
-
width
=
"100px"
>
<
el
-
form
ref
=
"form"
label
-
width
=
"100px"
>
<
el
-
form
-
item
label
=
"退款发起时间:"
>
<
el
-
form
-
item
label
=
"退款发起时间:"
>
<!--
{{
}}
-->
{{
refundState
.
refundTime
}}
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"退款发起人:"
>
<
el
-
form
-
item
label
=
"退款发起人:"
>
<!--
{{
}}
-->
{{
refundState
.
refundUserName
}}
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"退款备注:"
>
<
el
-
form
-
item
label
=
"退款备注:"
>
<!--
{{
}}
-->
{{
refundState
.
remark
}}
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"退款金额(元)"
>
<
el
-
form
-
item
label
=
"退款金额(元)"
>
<!--
{{
}}
-->
{{
refundState
.
refundFee
}}
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"退款单号:"
>
<
el
-
form
-
item
label
=
"退款单号:"
>
<!--
{{
}}
-->
{{
refundState
.
refundNo
}}
<
el
-
button
type
=
"text"
plain
size
=
"mini"
@
click
=
"handleCopy(orderState.refundNo)"
>
复制
<
/el-button
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-form
>
<
/el-form
>
<
/el-col
>
<
/el-col
>
...
@@ -149,6 +190,8 @@
...
@@ -149,6 +190,8 @@
<
script
>
<
script
>
import
*
as
api
from
'@/api/commodityCenter/commodityManage'
import
*
as
api
from
'@/api/commodityCenter/commodityManage'
import
{
dateFormat
}
from
'@/utils/index'
export
default
{
export
default
{
components
:
{
}
,
components
:
{
}
,
props
:
{
}
,
props
:
{
}
,
...
@@ -176,19 +219,53 @@
...
@@ -176,19 +219,53 @@
dialogVisibleSelect
:
false
,
dialogVisibleSelect
:
false
,
dateRange
:
[],
dateRange
:
[],
dialogStateVisible
:
false
,
dialogStateVisible
:
false
,
dialogVisible
:
false
dialogVisible
:
false
,
orderState
:
{
payTime
:
''
,
orderNo
:
''
,
mchNo
:
''
}
,
refundState
:
{
refundTime
:
''
,
refundNo
:
''
,
refundUserName
:
''
,
refundFee
:
''
,
remark
:
''
}
}
}
}
,
}
,
computed
:
{
}
,
computed
:
{
}
,
created
()
{
created
()
{
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
<div>查看商品所有订单及明细记录。</div>
`
)
this
.
getList
()
this
.
getList
()
}
,
}
,
methods
:
{
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
)
{
tradingStateFn
(
id
)
{
api
.
getOrderState
(
id
)
api
.
getOrderState
(
id
).
then
((
res
)
=>
{
this
.
orderState
=
res
.
data
this
.
dialogVisible
=
true
}
)
}
,
}
,
refundStateFn
(
orderNo
)
{
refundStateFn
(
id
)
{
api
.
getRefundOrderState
(
orderNo
)
api
.
getRefundOrderState
(
id
).
then
((
res
)
=>
{
this
.
refundState
=
res
.
data
this
.
dialogStateVisible
=
true
}
)
}
,
}
,
resetForm
()
{
resetForm
()
{
this
.
query
=
{
this
.
query
=
{
...
@@ -227,10 +304,31 @@
...
@@ -227,10 +304,31 @@
background
:
'rgba(0, 0, 0, 0.7)'
background
:
'rgba(0, 0, 0, 0.7)'
}
)
}
)
api
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
)
=>
{
.
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
()
loading
.
close
()
console
.
log
(
res
)
}
)
}
)
.
catch
(()
=>
{
.
catch
(()
=>
{
loading
.
close
()
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