Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
b5358ce3
Commit
b5358ce3
authored
Jun 20, 2022
by
dcy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
3d905e4f
c24bb6cf
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
3052 additions
and
97 deletions
+3052
-97
bannerPop.js
src/api/ecw/bannerPop.js
+54
-0
coupon.js
src/api/ecw/coupon.js
+54
-0
customer.js
src/api/ecw/customer.js
+9
-0
product.js
src/api/ecw/product.js
+8
-0
index.vue
src/components/CustomersSelector/index.vue
+108
-0
index.vue
src/components/DictSelector/index.vue
+42
-15
index.vue
src/components/Editor/index.vue
+16
-2
index.vue
src/components/ProductsSelector/index.vue
+142
-0
index.vue
src/components/RoutersSelector/index.vue
+0
-0
index.vue
src/components/Selector/index.vue
+66
-0
index.js
src/router/index.js
+38
-16
dict.js
src/utils/dict.js
+16
-1
index.vue
src/views/ecw/bannerPop/index.vue
+375
-0
edit.vue
src/views/ecw/coupon/edit.vue
+434
-0
index.vue
src/views/ecw/coupon/index.vue
+386
-0
edit.vue
src/views/ecw/customer/edit.vue
+49
-17
index.vue
src/views/ecw/customer/index.vue
+6
-0
query.vue
src/views/ecw/customer/query.vue
+342
-0
view.vue
src/views/ecw/customer/view.vue
+0
-34
index.vue
src/views/ecw/dock/index.vue
+30
-1
index.vue
src/views/ecw/product/index.vue
+2
-1
blacklist.vue
src/views/ecw/productPrice/blacklist.vue
+824
-0
edit.vue
src/views/ecw/productPrice/edit.vue
+3
-3
index.vue
src/views/ecw/productPrice/index.vue
+14
-2
index.vue
src/views/ecw/supplier/index.vue
+3
-3
index.vue
src/views/infra/codegen/index.vue
+31
-2
No files found.
src/api/ecw/bannerPop.js
0 → 100644
View file @
b5358ce3
import
request
from
'
@/utils/request
'
// 创建广告弹窗
export
function
createBannerPop
(
data
)
{
return
request
({
url
:
'
/ecw/banner-pop/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新广告弹窗
export
function
updateBannerPop
(
data
)
{
return
request
({
url
:
'
/ecw/banner-pop/update
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除广告弹窗
export
function
deleteBannerPop
(
id
)
{
return
request
({
url
:
'
/ecw/banner-pop/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
// 获得广告弹窗
export
function
getBannerPop
(
id
)
{
return
request
({
url
:
'
/ecw/banner-pop/get?id=
'
+
id
,
method
:
'
get
'
})
}
// 获得广告弹窗分页
export
function
getBannerPopPage
(
query
)
{
return
request
({
url
:
'
/ecw/banner-pop/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出广告弹窗 Excel
export
function
exportBannerPopExcel
(
query
)
{
return
request
({
url
:
'
/ecw/banner-pop/export-excel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
src/api/ecw/coupon.js
0 → 100644
View file @
b5358ce3
import
request
from
'
@/utils/request
'
// 创建优惠券信息
export
function
createCoupon
(
data
)
{
return
request
({
url
:
'
/ecw/coupon/createOrUpdate
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新优惠券信息
export
function
updateCoupon
(
data
)
{
return
request
({
url
:
'
/ecw/coupon/createOrUpdate
'
,
method
:
'
post
'
,
data
:
data
})
}
// 删除优惠券信息
export
function
deleteCoupon
(
id
)
{
return
request
({
url
:
'
/ecw/coupon/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
// 获得优惠券信息
export
function
getCoupon
(
id
)
{
return
request
({
url
:
'
/ecw/coupon/get?id=
'
+
id
,
method
:
'
get
'
})
}
// 获得优惠券信息分页
export
function
getCouponPage
(
query
)
{
return
request
({
url
:
'
/ecw/coupon/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出优惠券信息 Excel
export
function
exportCouponExcel
(
query
)
{
return
request
({
url
:
'
/ecw/coupon/export-excel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
src/api/ecw/customer.js
View file @
b5358ce3
...
@@ -43,6 +43,15 @@ export function getCustomerPage(query) {
...
@@ -43,6 +43,15 @@ export function getCustomerPage(query) {
})
})
}
}
// 获得客户下来
export
function
getCustomerSelect
(
query
)
{
return
request
({
url
:
'
/ecw/customer/select
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出客户 Excel
// 导出客户 Excel
export
function
exportCustomerExcel
(
query
)
{
export
function
exportCustomerExcel
(
query
)
{
return
request
({
return
request
({
...
...
src/api/ecw/product.js
View file @
b5358ce3
...
@@ -34,6 +34,14 @@ export function getProduct(id) {
...
@@ -34,6 +34,14 @@ export function getProduct(id) {
})
})
}
}
// 获得产品列表
export
function
getProductList
()
{
return
request
({
url
:
'
/ecw/product/list
'
,
method
:
'
get
'
})
}
// 获得产品分页
// 获得产品分页
export
function
getProductPage
(
query
)
{
export
function
getProductPage
(
query
)
{
return
request
({
return
request
({
...
...
src/components/CustomersSelector/index.vue
0 → 100644
View file @
b5358ce3
<
template
>
<el-row
class=
""
:gutter=
"10"
>
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
<el-input
v-model=
"queryParams.searchKey"
placeholder=
"用户名/手机/邮箱"
style=
"width:200px"
/>
<dict-selector
:type=
"DICT_TYPE.USER_TYPE"
v-model=
"queryParams.customerType"
style=
"width:100px"
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
搜搜1
</el-button>
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
<el-link
class=
"el-icon-plus"
@
click=
"choose(item)"
:disabled=
"customerIds.indexOf(item.id) > -1"
/>
{{
item
.
name
}}
(
{{
item
.
defaultContactName
}}
)
</div>
</div>
</el-card>
</el-col>
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
已选客户
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in choosedList"
:key=
"item.id"
>
<el-link
class=
"el-icon-delete"
@
click=
"remove(item)"
/>
{{
item
.
name
}}
(
{{
item
.
defaultContactName
}}
)
</div>
</div>
</el-card>
</el-col>
</el-row>
</
template
>
<
script
>
import
{
getCustomerSelect
}
from
'
@/api/ecw/customer
'
export
default
{
data
(){
return
{
list
:[],
/* page: 1,
pages: 1, */
queryParams
:{
page
:
1
,
name
:
null
,
level
:
null
},
choosedList
:[]
}
},
computed
:{
customerIds
(){
let
arr
=
[]
this
.
choosedList
.
forEach
(
item
=>
{
arr
.
push
(
item
.
id
)
})
return
arr
}
},
watch
:{
customerIds
(
val
){
this
.
$emit
(
'
input
'
,
val
)
}
},
created
(){
this
.
reLoad
()
},
methods
:{
reLoad
(){
this
.
queryParams
.
page
=
1
this
.
list
=
[]
this
.
getList
()
},
loadNextPage
(){
if
(
this
.
page
>=
this
.
pages
){
return
this
.
$message
.
error
(
'
已加载全部
'
)
}
this
.
queryParams
.
page
++
this
.
getList
()
},
getList
(){
getCustomerSelect
(
this
.
queryParams
).
then
(
res
=>
{
this
.
list
=
res
.
data
})
},
choose
(
customer
){
this
.
choosedList
.
push
(
customer
)
},
remove
(
customer
){
this
.
choosedList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
id
==
customer
.
id
)
this
.
choosedList
.
splice
(
index
,
1
)
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.header
{
>
div
{
margin-right
:
5px
;
}
}
.list
{
height
:
200px
;
border
:
1px
solid
#ccc
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
padding
:
0
10px
;
}
</
style
>
\ No newline at end of file
src/components/DictSelector/index.vue
View file @
b5358ce3
<
template
>
<
template
>
<el-select
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
>
<div
class=
"dict-selector"
>
<el-option
v-for=
"dict in getList(type)"
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
<el-option
v-for=
"dict in dictList"
</el-select>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
<el-radio-group
v-if=
"formType == 'radio'"
v-model=
"valueSync"
>
<el-radio
v-for=
"dict in dictList"
:label=
"dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-radio>
</el-radio-group>
<el-checkbox-group
v-if=
"formType == 'checkbox'"
v-model=
"valueSync"
>
<el-checkbox
v-for=
"dict in dictList"
:label=
"dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-checkbox>
</el-checkbox-group>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
const
selfDefinedDict
=
{
_yesno
:
[
{
label
:
'
是
'
,
value
:
'
1
'
},
{
label
:
'
否
'
,
value
:
'
0
'
}
]
}
export
default
{
export
default
{
props
:{
props
:{
placeholder
:
{
placeholder
:
{
...
@@ -20,14 +22,24 @@ export default {
...
@@ -20,14 +22,24 @@ export default {
type
:
String
,
type
:
String
,
value
:
[
String
,
Number
,
Array
],
value
:
[
String
,
Number
,
Array
],
multiple
:
Boolean
,
multiple
:
Boolean
,
formType
:{
type
:
String
,
default
:
'
select
'
},
forceString
:
{
forceString
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
}
},
defaultable
:
Boolean
,
// 是否默认选择第一个
},
},
data
(){
data
(){
return
{
return
{
valueSync
:
null
valueSync
:
this
.
multiple
?
[]
:
null
}
},
computed
:{
dictList
(){
return
this
.
getList
(
this
.
type
)
}
}
},
},
watch
:{
watch
:{
...
@@ -36,21 +48,36 @@ export default {
...
@@ -36,21 +48,36 @@ export default {
},
},
value
(
val
){
value
(
val
){
this
.
setValueSync
()
this
.
setValueSync
()
},
dictList
(){
this
.
setDefault
()
}
}
},
},
created
(){
created
(){
this
.
setValueSync
()
this
.
setValueSync
()
this
.
setDefault
()
},
},
methods
:{
methods
:{
setValueSync
(){
setValueSync
(){
if
(
!
this
.
value
||
this
.
value
==
''
)
return
if
(
!
this
.
value
||
this
.
value
==
''
)
return
if
(
this
.
forceString
&&
this
.
multiple
){
if
(
this
.
forceString
&&
this
.
multiple
){
this
.
valueSync
=
val
.
split
(
'
,
'
)
this
.
valueSync
=
this
.
value
.
split
(
'
,
'
)
}
else
this
.
valueSync
=
this
.
forceString
?
String
(
this
.
value
)
:
this
.
value
}
else
this
.
valueSync
=
this
.
forceString
?
String
(
this
.
value
)
:
this
.
value
},
},
getList
(){
getList
(){
return
selfDefinedDict
[
this
.
type
]
||
this
.
getDictDatas
(
this
.
type
)
return
this
.
getDictDatas
(
this
.
type
)
},
setDefault
(){
if
(
!
this
.
defaultable
)
return
if
(
this
.
dictList
.
length
&&
(
this
.
valueSync
===
null
||
this
.
valueSync
==
''
)){
this
.
valueSync
=
this
.
dictList
[
0
].
value
}
}
}
}
}
}
}
</
script
>
</
script
>
\ No newline at end of file
<
style
scoped
>
.dict-selector
{
display
:
inline-block
;
}
</
style
>
\ No newline at end of file
src/components/Editor/index.vue
View file @
b5358ce3
...
@@ -172,11 +172,11 @@ export default {
...
@@ -172,11 +172,11 @@ export default {
// 获取富文本组件实例
// 获取富文本组件实例
let
quill
=
this
.
Quill
;
let
quill
=
this
.
Quill
;
// 如果上传成功
// 如果上传成功
if
(
res
.
code
==
20
0
)
{
if
(
res
.
code
==
0
)
{
// 获取光标所在位置
// 获取光标所在位置
let
length
=
quill
.
getSelection
().
index
;
let
length
=
quill
.
getSelection
().
index
;
// 插入图片 res.url为服务器返回的图片地址
// 插入图片 res.url为服务器返回的图片地址
quill
.
insertEmbed
(
length
,
"
image
"
,
process
.
env
.
VUE_APP_BASE_API
+
res
.
fileName
);
quill
.
insertEmbed
(
length
,
"
image
"
,
res
.
data
);
// 调整光标到最后
// 调整光标到最后
quill
.
setSelection
(
length
+
1
);
quill
.
setSelection
(
length
+
1
);
}
else
{
}
else
{
...
@@ -186,6 +186,20 @@ export default {
...
@@ -186,6 +186,20 @@ export default {
handleUploadError
()
{
handleUploadError
()
{
this
.
$message
.
error
(
"
图片插入失败
"
);
this
.
$message
.
error
(
"
图片插入失败
"
);
},
},
uuid
()
{
var
s
=
[];
var
hexDigits
=
"
0123456789abcdef
"
;
for
(
var
i
=
0
;
i
<
36
;
i
++
)
{
s
[
i
]
=
hexDigits
.
substr
(
Math
.
floor
(
Math
.
random
()
*
0x10
),
1
);
}
s
[
14
]
=
"
4
"
;
// bits 12-15 of the time_hi_and_version field to 0010
s
[
19
]
=
hexDigits
.
substr
((
s
[
19
]
&
0x3
)
|
0x8
,
1
);
// bits 6-7 of the clock_seq_hi_and_reserved to 01
s
[
8
]
=
s
[
13
]
=
s
[
18
]
=
s
[
23
]
=
"
-
"
;
var
uuid
=
s
.
join
(
""
);
return
uuid
;
},
},
},
};
};
</
script
>
</
script
>
...
...
src/components/ProductsSelector/index.vue
0 → 100644
View file @
b5358ce3
<
template
>
<el-row
class=
""
:gutter=
"10"
>
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
<el-select
v-model=
"queryParams.typeId"
placeholder=
"选择类型"
style=
"width:120px"
clearable
>
<el-option
v-for=
"item in typeList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择属性"
style=
"width:120px"
clearable
>
<el-option
v-for=
"item in attrList"
:key=
"item.id"
:label=
"item.attrName"
:value=
"item.id"
/>
</el-select>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"产品关键字"
style=
"width:120px"
clearable
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
搜搜
</el-button>
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
<el-checkbox
@
change=
"toggleCheck(item, $event)"
:value=
"ids.indexOf(item.id) > -1"
/>
{{
item
.
titleZh
}}
<div>
{{
item
.
titleEn
}}
</div>
</div>
</div>
</el-card>
</el-col>
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
已选产品
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"(choosed) in choosedList"
:key=
"choosed.id"
:data-data=
"JSON.stringify(choosed)"
>
<el-link
class=
"el-icon-delete"
@
click=
"remove(choosed)"
/>
{{
choosed
.
titleZh
}}
<div>
{{
choosed
.
titleEn
}}
</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
</
template
>
<
script
>
import
{
getProductPage
}
from
'
@/api/ecw/product
'
import
{
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getProductAttrList
}
from
'
@/api/ecw/productAttr
'
export
default
{
data
(){
return
{
list
:[],
page
:
1
,
pages
:
1
,
queryParams
:{
page
:
1
,
attrId
:
null
,
titleZh
:
null
,
typeId
:
null
},
choosedList
:[],
typeList
:[],
attrList
:[]
}
},
computed
:{
ids
(){
let
arr
=
[]
this
.
choosedList
.
forEach
(
item
=>
{
arr
.
push
(
item
.
id
)
})
return
arr
}
},
watch
:{
ids
(
val
){
this
.
$emit
(
'
input
'
,
val
)
}
},
created
(){
getProductTypeList
().
then
(
res
=>
this
.
typeList
=
res
.
data
)
getProductAttrList
().
then
(
res
=>
this
.
attrList
=
res
.
data
)
this
.
reLoad
()
},
methods
:{
reLoad
(){
this
.
queryParams
.
page
=
1
this
.
list
=
[]
this
.
getList
()
},
loadNextPage
(){
if
(
this
.
page
>=
this
.
pages
){
return
this
.
$message
.
error
(
'
已加载全部
'
)
}
this
.
queryParams
.
page
++
this
.
getList
()
},
getList
(){
getProductPage
(
this
.
queryParams
).
then
(
res
=>
{
this
.
list
=
res
.
data
.
list
//.concat(res.data.list || [])
this
.
page
=
res
.
data
.
page
this
.
pages
=
res
.
data
.
pages
})
},
toggleCheck
(
item
,
checked
){
if
(
checked
){
this
.
choose
(
item
)
}
else
{
this
.
remove
(
item
)
}
},
choose
(
item
){
this
.
choosedList
.
push
(
item
)
},
remove
(
item
){
this
.
choosedList
.
forEach
((
choosed
,
index
)
=>
{
if
(
choosed
.
id
==
item
.
id
)
this
.
choosedList
.
splice
(
index
,
1
)
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.header
{
>
div
{
margin-right
:
5px
;
}
}
.list
{
height
:
200px
;
border
:
1px
solid
#ccc
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
padding
:
0
10px
;
display
:
flex
;
flex-wrap
:
wrap
;
.item
{
width
:
50%
;
line-height
:
20px
;
height
:
50px
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
</
style
>
\ No newline at end of file
src/components/RouterSelector/index.vue
→
src/components/Router
s
Selector/index.vue
View file @
b5358ce3
File moved
src/components/Selector/index.vue
0 → 100644
View file @
b5358ce3
<
template
>
<el-select
v-model=
"valueSync"
:multiple=
"multiple"
>
<el-option
v-for=
"item in optionsFormated"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
<
script
>
export
default
{
data
(){
return
{
valueSync
:
null
}
},
props
:{
options
:
Array
,
value
:
[
String
,
Number
,
Boolean
,
Object
],
labelField
:
{
type
:
String
,
default
:
'
label
'
},
valueField
:
{
type
:
String
,
default
:
'
value
'
},
multiple
:
Boolean
,
clearable
:
Boolean
,
defaultable
:
Boolean
,
// 没有值的时候是否选择第一项
},
computed
:{
optionsFormated
(){
let
arr
=
[]
this
.
options
.
forEach
(
item
=>
{
arr
.
push
({
label
:
item
[
this
.
labelField
],
value
:
item
[
this
.
valueField
]
})
})
return
arr
}
},
watch
:{
valueSync
(
val
){
this
.
$emit
(
'
input
'
,
val
)
},
value
(
value
){
this
.
valueSync
=
value
},
optionsFormated
(){
this
.
setDefault
()
}
},
created
(){
this
.
valueSync
=
this
.
value
this
.
setDefault
()
},
methods
:{
setDefault
(){
if
(
!
this
.
defaultable
){
return
false
}
if
(
this
.
optionsFormated
.
length
&&
(
this
.
valueSync
==
null
||
this
.
valueSync
==
''
)){
this
.
valueSync
=
this
.
optionsFormated
[
0
].
value
}
}
}
}
</
script
>
\ No newline at end of file
src/router/index.js
View file @
b5358ce3
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
import
Router
from
'
vue-router
'
import
Router
from
'
vue-router
'
/* Layout */
/* Layout */
import
Layout
from
'
@/layout
'
import
Layout
from
'
@/layout
'
import
query
from
'
@/views/ecw/customer/query
'
Vue
.
use
(
Router
)
Vue
.
use
(
Router
)
...
@@ -91,16 +92,6 @@ export const constantRoutes = [
...
@@ -91,16 +92,6 @@ export const constantRoutes = [
meta
:
{
title
:
'
字典数据
'
,
icon
:
''
,
activeMenu
:
'
/system/dict
'
}
meta
:
{
title
:
'
字典数据
'
,
icon
:
''
,
activeMenu
:
'
/system/dict
'
}
}
}
]
]
},
{
path
:
'
/c
'
,
component
:
Layout
,
hidden
:
true
,
children
:
[{
path
:
'
ecw/customer/edit/:customerId(
\\
d+)
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/ecw/customer/edit
'
],
resolve
),
name
:
'
Data
'
,
meta
:
{
title
:
'
字典数据
'
,
icon
:
''
,
activeMenu
:
'
/system/dict
'
}
}]
},
{
},
{
path
:
'
/job
'
,
path
:
'
/job
'
,
component
:
Layout
,
component
:
Layout
,
...
@@ -214,6 +205,21 @@ export const constantRoutes = [
...
@@ -214,6 +205,21 @@ export const constantRoutes = [
]
]
},
},
// {
// path: '/product',
// component: Layout,
// hidden: true,
// redirect: 'noredirect',
// children: [{
// path: 'product-black',
// component: (resolve) => require(['@/views/ecw/productPrice/index'], resolve),
// name: 'ProductPrice',
// meta: {title: '黑名单产品列表', activeMenu: '/product/product-black'}
// }
// ]
// },
{
{
path
:
'
/shelf
'
,
path
:
'
/shelf
'
,
component
:
Layout
,
component
:
Layout
,
...
@@ -232,12 +238,28 @@ export const constantRoutes = [
...
@@ -232,12 +238,28 @@ export const constantRoutes = [
component
:
Layout
,
component
:
Layout
,
hidden
:
true
,
hidden
:
true
,
redirect
:
'
noredirect
'
,
redirect
:
'
noredirect
'
,
children
:
[{
children
:
[
path
:
'
/customerCommissionInfo/:dictId(
\\
d+)
'
,
{
component
:
(
resolve
)
=>
require
([
'
@/views/ecw/customerCommissionInfo/index
'
],
resolve
),
path
:
'
/customerCommissionInfo/:dictId(
\\
d+)
'
,
name
:
'
customerCommissionInfo
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/ecw/customerCommissionInfo/index
'
],
resolve
),
meta
:
{
title
:
'
佣金详情
'
,
icon
:
''
,
activeMenu
:
'
/customer/customerCommissionInfo
'
}
name
:
'
customerCommissionInfo
'
,
}]
meta
:
{
title
:
'
佣金详情
'
,
icon
:
''
,
activeMenu
:
'
/customer/customerCommissionInfo
'
}
},
{
path
:
'
edit/:customerId(
\\
d+)
'
,
component
:
(
resolve
)
=>
import
(
'
@/views/ecw/customer/edit
'
),
props
:
true
,
name
:
'
customerEdit
'
,
meta
:
{
title
:
'
编辑客户
'
,
icon
:
''
,
activeMenu
:
'
/customer/customer
'
}
},
{
path
:
'
query/:customerId(
\\
d+)
'
,
component
:
(
resolve
)
=>
import
(
'
@/views/ecw/customer/query
'
),
props
:
true
,
name
:
'
customerQuery
'
,
meta
:
{
title
:
'
客户详情
'
,
icon
:
''
,
activeMenu
:
'
/customer/customer
'
}
}
]
},
},
]
]
...
...
src/utils/dict.js
View file @
b5358ce3
...
@@ -68,6 +68,20 @@ export const DICT_TYPE = {
...
@@ -68,6 +68,20 @@ export const DICT_TYPE = {
ECW_PACKAGING_TYPE
:
'
packaging_type
'
,
//包装要求
ECW_PACKAGING_TYPE
:
'
packaging_type
'
,
//包装要求
ECW_CONTAINER_LOCATION
:
'
container_location
'
,
//默认货柜位置
ECW_CONTAINER_LOCATION
:
'
container_location
'
,
//默认货柜位置
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
:
'
special_req_for_line_products
'
,
// 特殊需求
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
:
'
special_req_for_line_products
'
,
// 特殊需求
ECW_COUPON_TYPE
:
'
coupon_type
'
,
// 优惠券类型
ECW_COUPON_STATUS
:
'
coupon_status
'
,
// 优惠券状态
ECW_COUPON_COST_TYPE
:
'
coupon_cost_type
'
,
// 优惠券费用类型
ECW_COUPON_OVERDUE_STATUS
:
'
coupon_overdue_status
'
,
// 优惠券状态
ECW_COUPON_PUTON_STATUS
:
'
coupon_puton_status
'
,
ECW_SUITABLE_USER_TYPE
:
'
suitable_user_type
'
,
// 适用用户类型
ECW_SUITABLE_LINE_TYPE
:
'
suitable_line_type
'
,
// 适用线路类型
ECW_SUITABLE_PROD_TYPE
:
'
suitable_prod_type
'
,
// 适用产品类型
ECW_ORDER_ATTR
:
'
order_attr
'
,
// 订单属性
ECW_YESNO
:
'
yesno
'
,
// 是否 1,0
ECW_COMPANY_TYPE
:
'
company_type
'
,
// 供应商类别
ECW_COOPERATION_TYPE
:
'
cooperation_type
'
,
// 合作类型
ECW_SHIPPING_DECLARATION_TYPE
:
'
shipping_declaration_type
'
,
// 出货报关方式(与订单报关方式相同)
ECW_CUSTOMS_TYPE
:
'
customs_type
'
,
// 订单报关方式(非出货报关),优惠券中的单证报关
//--------ecw---------
//--------ecw---------
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_SOURCE
:
'
customer_source
'
,
CUSTOMER_SOURCE
:
'
customer_source
'
,
...
@@ -91,7 +105,8 @@ export const DICT_TYPE = {
...
@@ -91,7 +105,8 @@ export const DICT_TYPE = {
COMMISSION_TYPE
:
'
commission_type
'
,
//佣金类型
COMMISSION_TYPE
:
'
commission_type
'
,
//佣金类型
COMMISSION_DARK_TYPE
:
'
commission_dark_type
'
,
//暗涌类型
COMMISSION_DARK_TYPE
:
'
commission_dark_type
'
,
//暗涌类型
COMMISSION_CURRENCY_TYPE
:
'
commission_currency_type
'
,
//佣金货币类型
COMMISSION_CURRENCY_TYPE
:
'
commission_currency_type
'
,
//佣金货币类型
COMMISSION_UNIT
:
'
commission_unit
'
//佣金货物单位
COMMISSION_UNIT
:
'
commission_unit
'
,
//佣金货物单位
ECW_PORT_TYPE
:
'
port_type
'
,
//港口类型
}
}
...
...
src/views/ecw/bannerPop/index.vue
0 → 100644
View file @
b5358ce3
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<!--
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"中文标题"
prop=
"titleZh"
>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入中文标题"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"英文标题"
prop=
"titleEn"
>
<el-input
v-model=
"queryParams.titleEn"
placeholder=
"请输入英文标题"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"有效期开始时间"
prop=
"validateStart"
>
<el-input
v-model=
"queryParams.validateStart"
placeholder=
"请输入有效期开始时间"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"有效期结束时间"
prop=
"validateEnd"
>
<el-input
v-model=
"queryParams.validateEnd"
placeholder=
"请输入有效期结束时间"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"web网页中文"
prop=
"htmlWebZh"
>
<el-input
v-model=
"queryParams.htmlWebZh"
placeholder=
"请输入web网页中文"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"web网页英文"
prop=
"htmlWebEn"
>
<el-input
v-model=
"queryParams.htmlWebEn"
placeholder=
"请输入web网页英文"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"app网页中文"
prop=
"htmlAppZh"
>
<el-input
v-model=
"queryParams.htmlAppZh"
placeholder=
"请输入app网页中文"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"0显示 1不显示"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择0显示 1不显示"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
v-model=
"dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
-->
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:banner-pop:create']"
>
新增
</el-button>
</el-col>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:banner-pop:export']"
>
导出
</el-button>
</el-col>
-->
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
""
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"弹窗标题"
align=
"center"
prop=
"titleZh"
/>
<el-table-column
label=
"弹窗时间"
align=
"center"
prop=
"validateDate"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
formatTime
(
scope
.
row
.
validateStart
)
}}
~
{{
formatTime
(
scope
.
row
.
validateEnd
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<span>
{{
statusName
(
scope
.
row
.
status
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:banner-pop:update']"
>
修改
</el-button>
-->
<el-button
size=
"mini"
type=
"text"
@
click=
"handleStatus(scope.row)"
v-hasPermi=
"['ecw:banner-pop:update']"
>
{{
scope
.
row
.
status
==
CommonStatusEnum
.
ENABLE
?
'
禁用
'
:
'
启用
'
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:banner-pop:delete']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"标题(中文)"
prop=
"titleZh"
>
<el-input
v-model=
"form.titleZh"
placeholder=
"请输入中文标题"
/>
</el-form-item>
<el-form-item
label=
"标题(英文)"
prop=
"titleEn"
>
<el-input
v-model=
"form.titleEn"
placeholder=
"请输入英文标题"
/>
</el-form-item>
<el-form-item
label=
"有效期"
prop=
"validateStart"
>
<el-date-picker
v-model=
"form.validateStart"
@
change=
"startChange"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
~
<el-date-picker
v-model=
"form.validateEnd"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
<span
style=
"color:red;font-size:14px;"
>
注意:留空则表示永久有效
</span>
</el-form-item>
<el-form-item
label=
"网页中文"
prop=
"htmlWebZh"
>
<editor
v-model=
"form.htmlWebZh"
:min-height=
"150"
/>
</el-form-item>
<el-form-item
label=
"网页英文"
prop=
"htmlWebEn"
>
<editor
v-model=
"form.htmlWebEn"
:min-height=
"150"
/>
</el-form-item>
<el-form-item
label=
"APP中文"
prop=
"htmlAppZh"
>
<editor
v-model=
"form.htmlAppZh"
:min-height=
"150"
/>
</el-form-item>
<el-form-item
label=
"APP英文"
prop=
"htmlAppEn"
>
<editor
v-model=
"form.htmlAppEn"
:min-height=
"150"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
createBannerPop
,
updateBannerPop
,
deleteBannerPop
,
getBannerPop
,
getBannerPopPage
,
exportBannerPopExcel
}
from
"
@/api/ecw/bannerPop
"
;
import
Editor
from
'
@/components/Editor
'
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
{
CommonStatusEnum
}
from
'
@/utils/constants
'
export
default
{
name
:
"
BannerPop
"
,
components
:
{
Editor
,
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 广告弹窗列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeCreateTime
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
titleZh
:
null
,
titleEn
:
null
,
validateStart
:
null
,
validateEnd
:
null
,
htmlWebZh
:
null
,
htmlWebEn
:
null
,
htmlAppZh
:
null
,
status
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
titleZh
:
[{
required
:
true
,
message
:
"
中文标题不能为空
"
,
trigger
:
"
blur
"
}],
titleEn
:
[{
required
:
true
,
message
:
"
英文标题不能为空
"
,
trigger
:
"
blur
"
}],
validateStart
:
[{
required
:
true
,
message
:
"
有效期开始时间不能为空
"
,
trigger
:
"
blur
"
}]
},
CommonStatusEnum
:
CommonStatusEnum
,
statusDictDatas
:
getDictDatas
(
DICT_TYPE
.
COMMON_STATUS
),
};
},
watch
:
{
'
form.validateStart
'
(
newV
,
oldV
)
{
if
(
this
.
form
.
validateStart
&&
this
.
form
.
validateEnd
)
{
let
startDate
=
new
Date
(
this
.
form
.
validateStart
)
let
endDate
=
new
Date
(
this
.
form
.
validateEnd
)
if
(
startDate
.
getTime
()
>
endDate
.
getTime
()){
this
.
$message
.
error
(
'
开始时间不能大于结束时间
'
);
if
(
oldV
)
{
this
.
form
.
validateStart
=
oldV
;
}
else
{
this
.
form
.
validateStart
=
""
}
}
}
},
'
form.validateEnd
'
(
newV
,
oldV
)
{
if
(
this
.
form
.
validateStart
&&
this
.
form
.
validateEnd
)
{
let
startDate
=
new
Date
(
this
.
form
.
validateStart
)
let
endDate
=
new
Date
(
this
.
form
.
validateEnd
)
if
(
startDate
.
getTime
()
>
endDate
.
getTime
()){
this
.
$message
.
error
(
'
结束时间不能小于开始时间
'
);
if
(
oldV
)
{
this
.
form
.
validateEnd
=
oldV
;
}
else
{
this
.
form
.
validateEnd
=
""
}
}
}
},
},
computed
:
{
formatTime
()
{
return
millisecond
=>
{
if
(
millisecond
)
{
return
new
Date
(
millisecond
).
format
(
'
yyyy-MM-dd
'
);
}
return
''
;
}
},
statusName
()
{
return
value
=>
{
for
(
let
index
in
this
.
statusDictDatas
)
{
let
dictItem
=
this
.
statusDictDatas
[
index
];
if
(
dictItem
.
value
==
value
)
{
return
dictItem
.
value
==
CommonStatusEnum
.
ENABLE
+
''
?
'
正常
'
:
'
禁用
'
;
}
}
}
},
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行查询
getBannerPopPage
(
params
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
titleZh
:
undefined
,
titleEn
:
undefined
,
validateStart
:
undefined
,
validateEnd
:
undefined
,
htmlWebZh
:
undefined
,
htmlWebEn
:
undefined
,
htmlAppZh
:
undefined
,
status
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/**修改状态 */
handleStatus
(
row
)
{
row
.
status
=
row
.
status
===
CommonStatusEnum
.
ENABLE
?
CommonStatusEnum
.
DISABLE
:
CommonStatusEnum
.
ENABLE
;
updateBannerPop
(
row
).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
}).
catch
(
function
()
{
row
.
status
=
row
.
status
===
CommonStatusEnum
.
ENABLE
?
CommonStatusEnum
.
DISABLE
:
CommonStatusEnum
.
ENABLE
;
});
},
/**开始日期变了 */
startChange
(
val
)
{
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加广告弹窗
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
;
getBannerPop
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改广告弹窗
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateBannerPop
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createBannerPop
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除广告弹窗编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteBannerPop
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有广告弹窗数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportBannerPopExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
src/views/ecw/coupon/edit.vue
0 → 100644
View file @
b5358ce3
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"类型"
prop=
"type"
:rules=
'[
{required: true, message: "请选择类型"}]'>
<dict-selector
:type=
"DICT_TYPE.ECW_COUPON_TYPE"
v-model.number=
"form.type"
placeholder=
"请选择类型"
/>
</el-form-item>
<el-form-item
label=
"标题中文"
prop=
"titleZh"
:rules=
'[
{required: true, message: "不能为空"}]'>
<el-input
v-model=
"form.titleZh"
placeholder=
"请输入标题-中文"
type=
"number"
/>
</el-form-item>
<el-form-item
label=
"标题英文"
prop=
"titleEn"
:rules=
'[
{required: true, message: "不能为空"}]'>
<el-input
v-model=
"form.titleEn"
placeholder=
"请输入标题-英文"
/>
</el-form-item>
<el-form-item
label=
"有效期"
prop=
"titleEn"
>
<el-date-picker
clearable
v-model=
"form.startTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择开始时间"
/>
~
<el-date-picker
clearable
v-model=
"form.endTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择结束时间"
/>
注意:留空则表示永久有效
</el-form-item>
<el-form-item
label=
"*运费"
>
<div
class=
"fee-item"
v-for=
"(item, index) in freightFeeList"
:key=
"index"
>
满
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<!--
<el-select
v-model=
"item.fullCurrencyId"
style=
"width:100px"
>
<el-option
v-for=
"item in currencyList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
-->
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
减
<el-input
type=
"number"
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<!--
<el-select
v-model=
"item.reduceCurrencyId"
style=
"width:100px"
>
<el-option
v-for=
"item in currencyList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
-->
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<el-button
class=
"el-icon-plus"
size=
"mini"
type=
"primary"
@
click=
"freightFeeList.push(
{})" />
<el-button
v-if=
"freightFeeList.length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"freightFeeList.splice(index,1)"
/>
</div>
</el-form-item>
<el-form-item
label=
"清关费"
>
<div
class=
"fee-item"
v-for=
"(item, index) in clearanceFeeList"
:key=
"index"
>
满
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
减
<el-input
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<el-button
class=
"el-icon-plus"
size=
"mini"
type=
"primary"
@
click=
"clearanceFeeList.push(
{})" />
<el-button
v-if=
"clearanceFeeList.length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"clearanceFeeList.splice(index,1)"
/>
</div>
</el-form-item>
<!--
<el-form-item
label=
"使用条件(优惠卷专用)"
prop=
"cashCondition"
>
<el-input
v-model=
"form.cashCondition"
placeholder=
"请输入使用条件(优惠卷专用)"
/>
</el-form-item>
<el-form-item
label=
"减免金额(优惠卷专用)"
prop=
"reduceAmount"
>
<el-input
v-model=
"form.reduceAmount"
placeholder=
"请输入减免金额(优惠卷专用)"
/>
</el-form-item>
<el-form-item
label=
"条件货币ID"
prop=
"conditionCurrencyId"
>
<el-input
v-model=
"form.conditionCurrencyId"
placeholder=
"请输入条件货币ID"
/>
</el-form-item>
<el-form-item
label=
"开始时间"
prop=
"startTime"
>
<el-date-picker
clearable
v-model=
"form.startTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择开始时间"
/>
</el-form-item>
<el-form-item
label=
"减免货币ID"
prop=
"reduceCurrencyId"
>
<el-input
v-model=
"form.reduceCurrencyId"
placeholder=
"请输入减免货币ID"
/>
</el-form-item>
<el-form-item
label=
"结束时间"
prop=
"endTime"
>
</el-form-item>
<el-form-item
label=
"领券后X天起生效"
prop=
"afterReceiveDays"
>
<el-input
v-model=
"form.afterReceiveDays"
placeholder=
"请输入领券后X天起生效"
/>
</el-form-item>
<el-form-item
label=
"有效天数"
prop=
"validDays"
>
<el-input
v-model=
"form.validDays"
placeholder=
"请输入有效天数"
/>
</el-form-item>
<el-form-item
label=
"费用类型"
prop=
"costType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_COUPON_COST_TYPE"
v-model=
"form.costType"
/>
</el-form-item>
-->
<!--
<el-form-item
label=
"优惠清单"
prop=
"discountDetailed"
>
<el-input
v-model=
"form.discountDetailed"
placeholder=
"请输入优惠清单"
/>
</el-form-item>
-->
<el-form-item
label=
"同类叠加"
prop=
"isSimilarSuperposition"
>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model=
"form.isSimilarSuperposition"
placeholder=
"请选择类型"
/>
</el-form-item>
<el-form-item
label=
"可叠加优惠劵列表"
prop=
"couponIds"
>
<el-input
v-model=
"form.couponIds"
placeholder=
"请输入可叠加优惠劵列表"
/>
</el-form-item>
<el-form-item
label=
"适用用户"
prop=
"suitableUserType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_SUITABLE_USER_TYPE"
v-model=
"form.suitableUserType"
defaultable
/>
<customers-selector
v-if=
"showCustomerSelector"
v-model=
"form.customerIds"
style=
"margin-top:5px"
/>
</el-form-item>
<el-form-item
label=
"适用线路类型"
prop=
"suitableLineType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_SUITABLE_LINE_TYPE"
v-model=
"form.suitableLineType"
/>
<routers-selector
v-if=
"showRouterSelector"
v-model=
"form.lineIds"
style=
"margin-top:5px"
/>
</el-form-item>
<el-form-item
label=
"适用商品"
prop=
"prodIds"
>
<!--
<dict-selector
:type=
"DICT_TYPE.ECW_SUITABLE_PROD_TYPE"
v-model=
"form.suitableProdType"
/>
-->
<products-selector
v-model=
"form.prodIds"
/>
</el-form-item>
<el-form-item
label=
"订单属性"
prop=
"orderAttr"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_ORDER_ATTR"
v-model=
"form.orderAttr"
multiple
/>
</el-form-item>
<el-form-item
label=
"是否发送站内信"
prop=
"isSiteContent"
>
<dict-selector
form-type=
"radio"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isSiteContent"
/>
</el-form-item>
<el-form-item
label=
"*中文内容"
prop=
"contentZh"
:rules=
'[
{required: true, message: "不能为空"}]'>
<editor
v-model=
"form.contentZh"
:min-height=
"192"
/>
</el-form-item>
<el-form-item
label=
"*英文内容"
prop=
"contentEn"
:rules=
'[
{required: true, message: "不能为空"}]'>
<editor
v-model=
"form.contentEn"
:min-height=
"192"
/>
</el-form-item>
<el-form-item
label=
"品牌"
prop=
"brand"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.BRAND_REG_TYPE"
v-model=
"form.brand"
multiple
/>
</el-form-item>
<el-form-item
label=
"是否控货"
prop=
"isCargoControl"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isCargoControl"
multiple
/>
</el-form-item>
<el-form-item
label=
"单证报关"
prop=
"documentDeclaration"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.documentDeclaration"
multiple
/>
</el-form-item>
<!--el-form-item
label="每个用户领券上限,如不填则默认为1"
prop="limitNum"
>
<el-input
v-model=
"form.limitNum"
placeholder=
"请输入每个用户领券上限,如不填则默认为1"
/>
</el-form-item>
<el-form-item
label=
"优惠券过期状态 0:过期 1:未过期"
prop=
"overdueStatus"
>
<el-radio-group
v-model=
"form.overdueStatus"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"优惠券投放状态(-1:取消投放 0:等待投放 1:投放 2:违规下架 3:等待审核)"
prop=
"putonStatus"
>
<el-radio-group
v-model=
"form.putonStatus"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"获取方式 0=客户领取 1=平台发放"
prop=
"getWay"
>
<el-input
v-model=
"form.getWay"
placeholder=
"请输入获取方式 0=客户领取 1=平台发放"
/>
</el-form-item>
<el-form-item
label=
"是否控货(可多选) 0否 1是"
prop=
"isCargoControl"
>
<el-input
v-model=
"form.isCargoControl"
placeholder=
"请输入是否控货(可多选) 0否 1是"
/>
</el-form-item>
<el-form-item
label=
"单证报关(可多选) 1 我司全代 2自单代报 3混合报关"
prop=
"documentDeclaration"
>
<el-input
v-model=
"form.documentDeclaration"
placeholder=
"请输入单证报关(可多选) 1 我司全代 2自单代报 3混合报关"
/>
</el-form-item>
<el-form-item
label=
"优惠券状态(0:草稿 1:发布)"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item-->
<el-form-item>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"$router.back()"
>
返 回
</el-button>
<el-button
type=
"default"
@
click=
"reset"
>
重 置
</el-button>
</el-form-item>
</el-form>
</div>
</
template
>
<
script
>
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
createCoupon
,
updateCoupon
,
deleteCoupon
,
getCoupon
,
getCouponPage
,
exportCouponExcel
,
}
from
"
@/api/ecw/coupon
"
;
import
CustomersSelector
from
'
@/components/CustomersSelector
'
import
{
getDictData
}
from
'
@/utils/dict
'
import
RoutersSelector
from
'
@/components/RoutersSelector
'
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
Editor
from
'
@/components/Editor
'
import
Selector
from
'
@/components/Selector
'
export
default
{
name
:
"
CouponEdit
"
,
components
:
{
CustomersSelector
,
RoutersSelector
,
ProductsSelector
,
Editor
,
Selector
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 表单参数
form
:
{
status
:
1
,
},
// 表单校验
rules
:
{},
currencyList
:[],
clearanceFeeList
:[{},{}],
freightFeeList
:[{},{}]
};
},
computed
:{
// 是否显示客户选择器
showCustomerSelector
(){
let
dict
=
getDictData
(
this
.
DICT_TYPE
.
ECW_SUITABLE_USER_TYPE
,
this
.
form
.
suitableUserType
)
return
dict
&&
dict
.
cssClass
==
'
show-selector
'
},
// 是否显示路线选择器
showRouterSelector
(){
let
dict
=
getDictData
(
this
.
DICT_TYPE
.
ECW_SUITABLE_LINE_TYPE
,
this
.
form
.
suitableLineType
)
return
dict
&&
dict
.
cssClass
==
'
show-selector
'
},
// 显示显示产品选择器
showProductsSelector
(){
let
dict
=
getDictData
(
this
.
DICT_TYPE
.
ECW_SUITABLE_PROD_TYPE
,
this
.
form
.
suitableProdType
)
return
dict
&&
dict
.
cssClass
==
'
show-selector
'
},
discountDetailedVOs
(){
let
activeField
=
null
let
fields
=
[
'
clearanceFeeList
'
,
'
freightFeeList
'
]
fields
.
forEach
(
field
=>
{
this
[
field
].
forEach
(
feeItem
=>
{
if
(
feeItem
.
reduceAmount
){
activeField
=
field
}
})
})
let
discountedList
=
activeField
?
this
[
activeField
]
:
[]
discountedList
.
forEach
(
item
=>
{
[
'
endAmount
'
,
'
fullAmount
'
,
'
fullCurrencyId
'
,
'
netReceiptsAmount
'
,
'
netReceiptsCurrencyId
'
,
'
prodUnit
'
,
'
reduceAmount
'
,
'
reduceCurrencyId
'
,
'
startAmount
'
,
'
startAndEndCurrencyId
'
].
forEach
(
field
=>
{
if
(
item
[
field
])
item
[
field
]
=
parseFloat
(
item
[
field
])
})
})
return
discountedList
}
},
created
()
{
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
if
(
this
.
$route
.
query
.
id
)
{
getCoupon
(
this
.
$route
.
query
.
id
).
then
(
(
res
)
=>
(
this
.
form
=
res
.
data
)
);
}
this
.
reset
()
},
methods
:
{
/** 表单重置 */
reset
()
{
this
.
form
=
{
couponId
:
undefined
,
titleZh
:
undefined
,
titleEn
:
undefined
,
type
:
undefined
,
cashCondition
:
undefined
,
reduceAmount
:
undefined
,
conditionCurrencyId
:
undefined
,
startTime
:
undefined
,
reduceCurrencyId
:
undefined
,
endTime
:
undefined
,
afterReceiveDays
:
undefined
,
validDays
:
undefined
,
costType
:
undefined
,
discountDetailed
:
undefined
,
isSimilarSuperposition
:
undefined
,
couponIds
:
undefined
,
suitableUserType
:
undefined
,
suitableLineType
:
undefined
,
suitableProdType
:
undefined
,
limitNum
:
undefined
,
overdueStatus
:
undefined
,
putonStatus
:
undefined
,
getWay
:
undefined
,
orderAttr
:
undefined
,
isSiteContent
:
undefined
,
isCargoControl
:
undefined
,
documentDeclaration
:
undefined
,
status
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
;
}
let
data
=
Object
.
assign
({},
this
.
form
,
{
discountDetailedVOs
:
this
.
discountDetailedVOs
})
// 开始时间必填
if
(
!
data
.
startTime
)
data
.
startTime
=
'
2022-01-01 00:00:00
'
// status必填
data
.
status
=
0
// 修改的提交
if
(
data
.
couponId
!=
null
)
{
updateCoupon
(
data
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$router
.
back
();
});
return
;
}
// 添加的提交
createCoupon
(
data
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
$router
.
back
();
});
});
},
},
};
</
script
>
<
style
scoped
lang=
"scss"
>
.fee-item
{
padding
:
5px
0
;
>
div
{
margin-right
:
5px
;
}
}
</
style
>
\ No newline at end of file
src/views/ecw/coupon/index.vue
0 → 100644
View file @
b5358ce3
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"标题"
prop=
"titleZh"
>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入标题"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<!--
<el-form-item
label=
"标题"
prop=
"titleEn"
>
<el-input
v-model=
"queryParams.titleEn"
placeholder=
"请输入标题"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"类型"
prop=
"type"
>
<!-- 1:优惠卷 2:金额-满减 3:方数-满减 4 折扣 5优惠 6 特价 7区间价-->
<!--
<el-select
v-model=
"queryParams.type"
placeholder=
"请选择类型 1:优惠卷 2:金额-满减 3:方数-满减 4 折扣 5优惠 6 特价 7区间价"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
-->
<dict-selector
:type=
'DICT_TYPE.ECW_COUPON_TYPE'
v-model=
"queryParams.type"
/>
</el-form-item>
<!--
<el-form-item
label=
"使用条件(优惠卷专用)"
prop=
"cashCondition"
>
<el-input
v-model=
"queryParams.cashCondition"
placeholder=
"请输入使用条件(优惠卷专用)"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"减免金额(优惠卷专用)"
prop=
"reduceAmount"
>
<el-input
v-model=
"queryParams.reduceAmount"
placeholder=
"请输入减免金额(优惠卷专用)"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"条件货币ID"
prop=
"conditionCurrencyId"
>
<el-input
v-model=
"queryParams.conditionCurrencyId"
placeholder=
"请输入条件货币ID"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"开始时间"
>
<el-date-picker
v-model=
"dateRangeStartTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
<!--
<el-form-item
label=
"减免货币ID"
prop=
"reduceCurrencyId"
>
<el-input
v-model=
"queryParams.reduceCurrencyId"
placeholder=
"请输入减免货币ID"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"结束时间"
>
<el-date-picker
v-model=
"dateRangeEndTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
<!--
<el-form-item
label=
"领券后X天起生效"
prop=
"afterReceiveDays"
>
<el-input
v-model=
"queryParams.afterReceiveDays"
placeholder=
"请输入领券后X天起生效"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"有效天数"
prop=
"validDays"
>
<el-input
v-model=
"queryParams.validDays"
placeholder=
"请输入有效天数"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"费用类型"
prop=
"costType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_COUPON_COST_TYPE"
v-model=
"queryParams.costType"
/>
</el-form-item>
<!--
<el-form-item
label=
"优惠清单"
prop=
"discountDetailed"
>
<el-input
v-model=
"queryParams.discountDetailed"
placeholder=
"请输入优惠清单"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"同类优惠劵是否可以叠加 0否 1是"
prop=
"isSimilarSuperposition"
>
<el-select
v-model=
"queryParams.isSimilarSuperposition"
placeholder=
"请选择同类优惠劵是否可以叠加 0否 1是"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"可叠加优惠劵列表"
prop=
"couponIds"
>
<el-input
v-model=
"queryParams.couponIds"
placeholder=
"请输入可叠加优惠劵列表"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"适用用户类型 0全部用户 1部分用户 2指定用户不参与"
prop=
"suitableUserType"
>
<el-select
v-model=
"queryParams.suitableUserType"
placeholder=
"请选择适用用户类型 0全部用户 1部分用户 2指定用户不参与"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"适用线路类型 0全部线路参与 1指定线路参与 2指定线路不参与"
prop=
"suitableLineType"
>
<el-select
v-model=
"queryParams.suitableLineType"
placeholder=
"请选择适用线路类型 0全部线路参与 1指定线路参与 2指定线路不参与"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"适用产品类型 0全部产品参与 1指定产品参与 2指定产品不参与"
prop=
"suitableProdType"
>
<el-select
v-model=
"queryParams.suitableProdType"
placeholder=
"请选择适用产品类型 0全部产品参与 1指定产品参与 2指定产品不参与"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"每个用户领券上限,如不填则默认为1"
prop=
"limitNum"
>
<el-input
v-model=
"queryParams.limitNum"
placeholder=
"请输入每个用户领券上限,如不填则默认为1"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"过期状态"
prop=
"overdueStatus"
>
<dict-selector
:type=
"DICT_TYPE.ECW_COUPON_OVERDUE_STATUS"
v-model=
"queryParams.overdueStatus"
/>
</el-form-item>
<el-form-item
label=
"投放状态"
prop=
"putonStatus"
>
<dict-selector
:type=
"DICT_TYPE.ECW_COUPON_PUTON_STATUS"
v-model=
"queryParams.putonStatus"
/>
</el-form-item>
<!--
<el-form-item
label=
"获取方式 0=客户领取 1=平台发放"
prop=
"getWay"
>
<el-input
v-model=
"queryParams.getWay"
placeholder=
"请输入获取方式 0=客户领取 1=平台发放"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"订单属性(可多选) 1 普货 2重货 3泡货"
prop=
"orderAttr"
>
<el-input
v-model=
"queryParams.orderAttr"
placeholder=
"请输入订单属性(可多选) 1 普货 2重货 3泡货"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"是否发送站内信 0否 1是"
prop=
"isSiteContent"
>
<el-select
v-model=
"queryParams.isSiteContent"
placeholder=
"请选择是否发送站内信 0否 1是"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"是否控货(可多选) 0否 1是"
prop=
"isCargoControl"
>
<el-input
v-model=
"queryParams.isCargoControl"
placeholder=
"请输入是否控货(可多选) 0否 1是"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"单证报关(可多选) 1 我司全代 2自单代报 3混合报关"
prop=
"documentDeclaration"
>
<el-input
v-model=
"queryParams.documentDeclaration"
placeholder=
"请输入单证报关(可多选) 1 我司全代 2自单代报 3混合报关"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"状态"
prop=
"status"
>
<dict-selector
:type=
"DICT_TYPE.ECW_COUPON_STATUS"
v-model=
"queryParams.status"
/>
</el-form-item>
<!--
<el-form-item
label=
"创建时间"
>
<el-date-picker
v-model=
"dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
-->
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:coupon:create']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:coupon:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"优惠券ID"
align=
"center"
prop=
"couponId"
/>
<el-table-column
label=
"类型"
align=
"center"
prop=
"type"
>
<template
slot-scope=
"
{row}">
<dict-tag
:type=
"DICT_TYPE.COUPON_TYPE"
:value=
"row.type"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"标题"
align=
"center"
prop=
"titleZh"
/>
<!-- <el-table-column label="标题-英文" align="center" prop="titleEn" /> -->
<el-table-column
label=
"使用条件(优惠卷专用)"
align=
"center"
prop=
"cashCondition"
/>
<el-table-column
label=
"减免金额(优惠卷专用)"
align=
"center"
prop=
"reduceAmount"
/>
<el-table-column
label=
"条件货币ID"
align=
"center"
prop=
"conditionCurrencyId"
/>
<el-table-column
label=
"开始时间"
align=
"center"
prop=
"startTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
startTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"减免货币ID"
align=
"center"
prop=
"reduceCurrencyId"
/>
<el-table-column
label=
"结束时间"
align=
"center"
prop=
"endTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
endTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"领券后X天起生效"
align=
"center"
prop=
"afterReceiveDays"
/>
<el-table-column
label=
"有效天数"
align=
"center"
prop=
"validDays"
/>
<el-table-column
label=
"费用类型:1 运输费 2 清关费 3 总费用(优惠卷专用)"
align=
"center"
prop=
"costType"
/>
<el-table-column
label=
"优惠清单"
align=
"center"
prop=
"discountDetailed"
/>
<el-table-column
label=
"同类优惠劵是否可以叠加 0否 1是"
align=
"center"
prop=
"isSimilarSuperposition"
/>
<el-table-column
label=
"可叠加优惠劵列表"
align=
"center"
prop=
"couponIds"
/>
<el-table-column
label=
"适用用户类型 0全部用户 1部分用户 2指定用户不参与"
align=
"center"
prop=
"suitableUserType"
/>
<el-table-column
label=
"适用线路类型 0全部线路参与 1指定线路参与 2指定线路不参与"
align=
"center"
prop=
"suitableLineType"
/>
<el-table-column
label=
"适用产品类型 0全部产品参与 1指定产品参与 2指定产品不参与"
align=
"center"
prop=
"suitableProdType"
/>
<el-table-column
label=
"每个用户领券上限,如不填则默认为1"
align=
"center"
prop=
"limitNum"
/>
<el-table-column
label=
"优惠券过期状态 0:过期 1:未过期"
align=
"center"
prop=
"overdueStatus"
/>
<el-table-column
label=
"优惠券投放状态(-1:取消投放 0:等待投放 1:投放 2:违规下架 3:等待审核)"
align=
"center"
prop=
"putonStatus"
/>
<el-table-column
label=
"获取方式 0=客户领取 1=平台发放"
align=
"center"
prop=
"getWay"
/>
<el-table-column
label=
"订单属性(可多选) 1 普货 2重货 3泡货"
align=
"center"
prop=
"orderAttr"
/>
<el-table-column
label=
"是否发送站内信 0否 1是"
align=
"center"
prop=
"isSiteContent"
/>
<el-table-column
label=
"是否控货(可多选) 0否 1是"
align=
"center"
prop=
"isCargoControl"
/>
<el-table-column
label=
"单证报关(可多选) 1 我司全代 2自单代报 3混合报关"
align=
"center"
prop=
"documentDeclaration"
/>
<el-table-column
label=
"优惠券状态(0:草稿 1:发布)"
align=
"center"
prop=
"status"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:coupon:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:coupon:delete']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
{
createCoupon
,
updateCoupon
,
deleteCoupon
,
getCoupon
,
getCouponPage
,
exportCouponExcel
}
from
"
@/api/ecw/coupon
"
;
export
default
{
name
:
"
Coupon
"
,
components
:
{
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 优惠券信息列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeStartTime
:
[],
dateRangeEndTime
:
[],
dateRangeCreateTime
:
null
,
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
titleZh
:
null
,
titleEn
:
null
,
type
:
null
,
cashCondition
:
null
,
reduceAmount
:
null
,
conditionCurrencyId
:
null
,
reduceCurrencyId
:
null
,
afterReceiveDays
:
null
,
validDays
:
null
,
costType
:
null
,
discountDetailed
:
null
,
isSimilarSuperposition
:
null
,
couponIds
:
null
,
suitableUserType
:
null
,
suitableLineType
:
null
,
suitableProdType
:
null
,
limitNum
:
null
,
overdueStatus
:
null
,
putonStatus
:
null
,
getWay
:
null
,
orderAttr
:
null
,
isSiteContent
:
null
,
isCargoControl
:
null
,
documentDeclaration
:
null
,
status
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeStartTime
,
'
startTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeEndTime
,
'
endTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行查询
getCouponPage
(
params
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
couponId
:
undefined
,
titleZh
:
undefined
,
titleEn
:
undefined
,
type
:
undefined
,
cashCondition
:
undefined
,
reduceAmount
:
undefined
,
conditionCurrencyId
:
undefined
,
startTime
:
undefined
,
reduceCurrencyId
:
undefined
,
endTime
:
undefined
,
afterReceiveDays
:
undefined
,
validDays
:
undefined
,
costType
:
undefined
,
discountDetailed
:
undefined
,
isSimilarSuperposition
:
undefined
,
couponIds
:
undefined
,
suitableUserType
:
undefined
,
suitableLineType
:
undefined
,
suitableProdType
:
undefined
,
limitNum
:
undefined
,
overdueStatus
:
undefined
,
putonStatus
:
undefined
,
getWay
:
undefined
,
orderAttr
:
undefined
,
isSiteContent
:
undefined
,
isCargoControl
:
undefined
,
documentDeclaration
:
undefined
,
status
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeStartTime
=
[];
this
.
dateRangeEndTime
=
[];
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
return
this
.
$router
.
push
(
'
edit
'
)
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
const
couponId
=
row
.
couponId
;
return
this
.
$router
.
push
(
'
edit?id=
'
+
couponId
)
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
couponId
!=
null
)
{
updateCoupon
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createCoupon
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
couponId
=
row
.
couponId
;
this
.
$modal
.
confirm
(
'
是否确认删除优惠券信息编号为"
'
+
couponId
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteCoupon
(
couponId
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeStartTime
,
'
startTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeEndTime
,
'
endTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有优惠券信息数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportCouponExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
\ No newline at end of file
src/views/ecw/customer/edit.vue
View file @
b5358ce3
...
@@ -74,16 +74,16 @@
...
@@ -74,16 +74,16 @@
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"主营类别"
prop=
"productType"
>
<el-form-item
label=
"主营类别"
prop=
"productType"
>
<el-cascader
:options=
"productTypeList"
:props=
"
{label: 'titleZh', value: 'id', lazy: true, lazyLoad}">
</el-cascader
>
<!--
<el-cascader
:options=
"productTypeList"
:props=
"
{label: 'titleZh', value: 'id', lazy: true, lazyLoad}">
</el-cascader>
--
>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-select
v-model=
"form.productType"
placeholder=
"请选择产品类别"
>
<el-select
v-model=
"form.productType"
placeholder=
"请选择产品类别"
@
change=
"form.productId = ''"
>
<
!--
<el-option
label=
"请选择字典生成"
value=
""
/>
--
>
<
el-option
:label=
"item.titleZh"
:value=
"item.id"
v-for=
"(item) in productTypeList"
:key=
"item.id"
/
>
</el-select>
</el-select>
</el-col>
</el-col>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-select
v-model=
"form.product
Type"
placeholder=
"请选择主营类别
"
>
<el-select
v-model=
"form.product
Id"
placeholder=
"请选择
"
>
<
!--
<el-option
label=
"请选择字典生成"
value=
""
/>
--
>
<
el-option
:label=
"item.titleZh"
:value=
"parseInt(item.id)"
v-for=
"(item) in productListFilter"
:key=
"item.id"
/
>
</el-select>
</el-select>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -168,15 +168,26 @@
...
@@ -168,15 +168,26 @@
<el-table
<el-table
v-show=
"showLine"
v-show=
"showLine"
border
border
:data=
"
form.customerLines
"
:data=
"
warehouseList
"
style=
"width: 500px"
>
style=
"width: 500px"
>
<el-table-column
<el-table-column
prop=
"departureId"
prop=
"departureId"
label=
"始发地"
>
label=
"始发地"
>
<template
v-slot=
"
{row}">
<el-checkbox>
{{
row
.
titleZh
}}
</el-checkbox>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"objectiveId"
prop=
"objectiveId"
label=
"目的地"
>
label=
"目的地"
>
<el-select
multiple
placeholder=
"请选择"
>
<el-option
v-for=
"item in importCityList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
>
</el-option>
</el-select>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</el-form-item>
</el-form-item>
...
@@ -359,29 +370,41 @@ import upload from '@/components/ImageUpload'
...
@@ -359,29 +370,41 @@ import upload from '@/components/ImageUpload'
import
{
createCustomer
,
getCustomer
,
updateCustomer
}
from
'
@/api/ecw/customer
'
import
{
createCustomer
,
getCustomer
,
updateCustomer
}
from
'
@/api/ecw/customer
'
import
{
getNodeList
}
from
"
@/api/ecw/node
"
import
{
getNodeList
}
from
"
@/api/ecw/node
"
import
{
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getProductList
}
from
'
@/api/ecw/product
'
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
export
default
{
export
default
{
name
:
"
edit
"
,
name
:
"
edit
"
,
props
:
{
customerId
:
String
},
components
:
{
components
:
{
upload
upload
},
},
created
()
{
created
()
{
this
.
customerId
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
customerId
;
this
.
reset
()
console
.
log
(
this
.
customerId
)
if
(
this
.
customerId
!==
'
0
'
)
if
(
!!
this
.
customerId
)
this
.
getCustomer
(
this
.
customerId
)
this
.
getCustomer
(
this
.
customerId
)
getNodeList
().
then
(
r
=>
{
getNodeList
().
then
(
r
=>
{
this
.
nodeList
=
r
.
data
this
.
nodeList
=
r
.
data
})
})
getProductTypeList
().
then
(
r
=>
{
getProductTypeList
().
then
(
r
=>
{
this
.
productTypeList
=
r
.
data
this
.
productTypeList
=
r
.
data
})
})
getProductList
().
then
(
r
=>
{
this
.
productList
=
r
.
data
})
getTradeCityList
({
type
:
1
}).
then
(
r
=>
{
this
.
importCityList
=
r
.
data
.
filter
(
item
=>
item
.
type
===
'
1
'
)
})
getWarehouseList
().
then
(
r
=>
{
this
.
warehouseList
=
r
.
data
})
},
},
data
(){
data
(){
return
{
return
{
customerId
:
undefined
,
getDictDatas
,
getDictDatas
,
DICT_TYPE
,
DICT_TYPE
,
...
@@ -402,12 +425,17 @@ export default {
...
@@ -402,12 +425,17 @@ export default {
// 网点
// 网点
nodeList
:
[],
nodeList
:
[],
productTypeList
:
[],
productTypeList
:
[],
showLine
:
false
productList
:
[],
showLine
:
false
,
warehouseList
:
[],
importCityList
:
[]
}
}
},
},
methods
:
{
methods
:
{
lazyLoad
(
node
,
resolve
)
{
lazyLoad
(
node
,
resolve
)
{
const
r
=
this
.
productList
.
filter
((
p
)
=>
p
.
typeId
===
node
.
value
)
console
.
log
(
r
)
resolve
(
r
)
},
},
/** 取消按钮 */
/** 取消按钮 */
cancel
()
{
cancel
()
{
...
@@ -418,7 +446,7 @@ export default {
...
@@ -418,7 +446,7 @@ export default {
submitForm
()
{
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
if
(
!
valid
)
{
//
return;
return
;
}
}
// 修改的提交
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
...
@@ -475,18 +503,22 @@ export default {
...
@@ -475,18 +503,22 @@ export default {
remarks
:
undefined
,
remarks
:
undefined
,
arrivalConfirm
:
undefined
,
arrivalConfirm
:
undefined
,
weightUnit
:
undefined
,
weightUnit
:
undefined
,
createTime
:
undefined
};
};
this
.
resetForm
(
"
form
"
);
this
.
resetForm
(
"
form
"
);
},
},
getCustomer
(
id
)
{
getCustomer
(
id
)
{
this
.
reset
();
getCustomer
(
id
).
then
(
response
=>
{
getCustomer
(
id
).
then
(
response
=>
{
this
.
form
=
{
...
this
.
form
,
...
response
.
data
};
this
.
form
=
{
...
this
.
form
,
...
response
.
data
};
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
修改客户
"
;
this
.
title
=
"
修改客户
"
;
});
});
},
}
},
computed
:
{
productListFilter
(){
return
this
.
productList
.
filter
((
p
)
=>
p
.
typeId
===
this
.
form
.
productType
)
}
}
}
}
}
</
script
>
</
script
>
...
...
src/views/ecw/customer/index.vue
View file @
b5358ce3
...
@@ -91,6 +91,8 @@
...
@@ -91,6 +91,8 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['ecw:customer:query']"
>
查看
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:customer:update']"
>
修改
</el-button>
v-hasPermi=
"['ecw:customer:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
...
@@ -600,6 +602,10 @@ export default {
...
@@ -600,6 +602,10 @@ export default {
// this.open = true;
// this.open = true;
// this.title = "添加客户";
// this.title = "添加客户";
},
},
/** 查看按钮操作 */
handleView
(
row
)
{
this
.
$router
.
push
(
'
/customer/query/
'
+
row
.
id
)
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
$router
.
push
(
'
/customer/edit/
'
+
row
.
id
)
this
.
$router
.
push
(
'
/customer/edit/
'
+
row
.
id
)
...
...
src/views/ecw/customer/query.vue
0 → 100644
View file @
b5358ce3
<
template
>
<div>
<el-row
type=
"flex"
style=
"margin-top: 15px;margin-bottom: 15px"
justify=
"center"
>
<el-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"20"
:xl=
"16"
>
<div
style=
"display: flex;justify-content: space-between;align-items: flex-end;"
>
<h2>
查看
</h2>
<div>
<el-button
type=
"primary"
size=
"small"
>
添加优惠
</el-button>
<el-button
type=
"primary"
size=
"small"
>
编辑
</el-button>
<el-button
type=
"primary"
size=
"small"
>
报价
</el-button>
<el-button
type=
"primary"
size=
"small"
>
跟进
</el-button>
<el-button
type=
"primary"
size=
"small"
>
客诉
</el-button>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
</div>
</div>
<el-card
style=
"margin-top: 15px;"
>
<el-descriptions
:column=
"4"
border
>
<el-descriptions-item
label=
"客户编号"
>
{{
customer
.
number
}}
</el-descriptions-item>
<el-descriptions-item
label=
"客户名称"
>
{{
customer
.
name
}}
</el-descriptions-item>
<el-descriptions-item
label=
"结算方式"
>
{{
customer
.
balance
}}
</el-descriptions-item>
<el-descriptions-item
label=
"客户生日"
>
{{
customer
.
birthday
}}
</el-descriptions-item>
<el-descriptions-item
label=
"客户等级"
>
{{
customer
.
level
}}
</el-descriptions-item>
<el-descriptions-item
label=
"国家"
>
{{
customer
.
country
}}
</el-descriptions-item>
<!--
<el-descriptions-item
label=
"业务员"
>
{{
customer
}}
</el-descriptions-item>
-->
<el-descriptions-item
label=
"客户来源"
>
{{
customer
.
source
}}
</el-descriptions-item>
<el-descriptions-item
label=
"客户类别"
>
{{
customer
.
type
}}
</el-descriptions-item>
<!--
<el-descriptions-item
label=
"联系方式"
>
{{
customer
}}
</el-descriptions-item>
-->
<el-descriptions-item
label=
"推介人"
>
{{
customer
.
promoter
}}
</el-descriptions-item>
<el-descriptions-item
label=
"跟进客服"
>
{{
customer
.
customerService
}}
</el-descriptions-item>
<el-descriptions-item
label=
"公司名称"
>
{{
customer
.
company
}}
</el-descriptions-item>
<el-descriptions-item
label=
"联系地址"
>
{{
customer
.
address
}}
</el-descriptions-item>
<el-descriptions-item
label=
"创建时间"
>
{{
customer
.
createTime
}}
</el-descriptions-item>
<el-descriptions-item
label=
"状态"
>
{{
customer
.
status
}}
</el-descriptions-item>
<el-descriptions-item
label=
"主营类别"
>
{{
customer
.
productType
}}
</el-descriptions-item>
<el-descriptions-item
label=
"常提货网点"
>
{{
customer
.
pickupPoint
}}
</el-descriptions-item>
<el-descriptions-item
label=
"图片"
>
{{
customer
.
picture
}}
</el-descriptions-item>
<el-descriptions-item
label=
"备注"
>
{{
customer
.
remarks
}}
</el-descriptions-item>
<!--
<el-descriptions-item
label=
"信用等级"
>
{{
customer
}}
</el-descriptions-item>
-->
</el-descriptions>
</el-card>
<el-card
style=
"margin-top: 15px"
>
<h3>
联系人
</h3>
<el-table
:data=
"customer.customerContacts"
style=
"width: 100%"
border
>
<el-table-column
prop=
"department"
label=
"部门"
>
</el-table-column>
<el-table-column
prop=
"position"
label=
"职位"
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"联系人"
>
</el-table-column>
<el-table-column
prop=
"phoneNew"
label=
"联系方式"
>
</el-table-column>
<el-table-column
prop=
"username"
label=
"关联账号"
>
</el-table-column>
<el-table-column
prop=
"social"
label=
"社交软件"
>
</el-table-column>
<el-table-column
prop=
"socialNumber"
label=
"社交软件号码"
>
</el-table-column>
<el-table-column
prop=
"email"
label=
"邮箱"
>
</el-table-column>
</el-table>
</el-card>
<el-tabs
style=
"margin-top: 15px"
type=
"border-card"
>
<el-tab-pane
label=
"订单"
>
</el-tab-pane>
<el-tab-pane
label=
"报价"
>
<el-table
:data=
"[]"
style=
"width: 100%"
>
<el-table-column
prop=
""
label=
"序号"
>
</el-table-column>
<el-table-column
prop=
""
label=
"报价单号"
>
</el-table-column>
<el-table-column
prop=
""
label=
"订单号"
>
</el-table-column>
<el-table-column
prop=
""
label=
"客户名称"
>
</el-table-column>
<el-table-column
prop=
""
label=
"目的地"
>
</el-table-column>
<el-table-column
prop=
""
label=
"销售阶段"
>
</el-table-column>
<el-table-column
prop=
""
label=
"预计结束时间"
>
</el-table-column>
<el-table-column
prop=
""
label=
"负责人"
>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"跟进"
>
<el-table
:data=
"[]"
style=
"width: 100%"
>
<el-table-column
prop=
""
label=
"#"
>
</el-table-column>
<el-table-column
prop=
""
label=
"跟进类型"
>
</el-table-column>
<el-table-column
prop=
""
label=
"联系人"
>
</el-table-column>
<el-table-column
prop=
""
label=
"跟进方式"
>
</el-table-column>
<el-table-column
prop=
""
label=
"跟进时间"
>
</el-table-column>
<el-table-column
prop=
""
label=
"客户反馈"
>
</el-table-column>
<el-table-column
prop=
""
label=
"处理结果"
>
</el-table-column>
<el-table-column
prop=
""
label=
"跟进业务"
>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"客户投诉"
>
<el-table
:data=
"[]"
style=
"width: 100%"
>
<el-table-column
prop=
""
label=
"序号"
>
</el-table-column>
<el-table-column
prop=
""
label=
"投诉编号"
>
</el-table-column>
<el-table-column
prop=
""
label=
"投诉类型"
>
</el-table-column>
<el-table-column
prop=
""
label=
"投诉时间"
>
</el-table-column>
<el-table-column
prop=
""
label=
"投诉内容"
>
</el-table-column>
<el-table-column
prop=
""
label=
"登记客服"
>
</el-table-column>
<el-table-column
prop=
""
label=
"提单号"
>
</el-table-column>
<el-table-column
prop=
""
label=
"状态"
>
</el-table-column>
<el-table-column
prop=
""
label=
"查明原因"
>
</el-table-column>
<el-table-column
prop=
""
label=
"处理时间"
>
</el-table-column>
<el-table-column
prop=
""
label=
"处理结果"
>
</el-table-column>
<el-table-column
prop=
""
label=
"赔偿金额"
>
</el-table-column>
<el-table-column
prop=
""
label=
"操作"
>
<template
v-slot=
"
{row}">
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
""
v-hasPermi=
"['ecw:customer:query']"
>
编辑
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane
label=
"账单"
>
</el-tab-pane>
<el-tab-pane
label=
"数据"
>
</el-tab-pane>
<el-tab-pane
label=
"品牌授权"
>
</el-tab-pane>
<el-tab-pane
label=
"信用日志"
>
</el-tab-pane>
<el-tab-pane
label=
"等级日志"
>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</div>
</template>
<
script
>
export
default
{
name
:
'
query
'
,
props
:
{
customerId
:
String
},
data
()
{
return
{
customer
:
{
id
:
undefined
,
number
:
undefined
,
name
:
undefined
,
level
:
undefined
,
country
:
undefined
,
type
:
undefined
,
agentId
:
undefined
,
company
:
undefined
,
address
:
undefined
,
productType
:
undefined
,
productId
:
undefined
,
pickupPoint
:
undefined
,
memberId
:
undefined
,
birthday
:
undefined
,
balance
:
undefined
,
source
:
undefined
,
picture
:
undefined
,
customerService
:
undefined
,
customerContacts
:
[],
customerLines
:
[],
promoter
:
undefined
,
status
:
undefined
,
founder
:
undefined
,
department
:
undefined
,
invoiceTitle
:
undefined
,
licenseNumber
:
undefined
,
bank
:
undefined
,
bankNumber
:
undefined
,
project
:
undefined
,
billingAddress
:
undefined
,
billingTell
:
undefined
,
taxRate
:
undefined
,
remarks
:
undefined
,
arrivalConfirm
:
undefined
,
weightUnit
:
undefined
,
createTime
:
undefined
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/customer/view.vue
deleted
100644 → 0
View file @
3d905e4f
<
template
>
<view>
<el-row
type=
"flex"
style=
"margin-top: 15px;margin-bottom: 15px"
justify=
"center"
>
<el-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"20"
:xl=
"16"
>
<h2></h2>
<el-row
:gutter=
"10"
>
<el-col>
<h2>
查看
</h2>
</el-col>
<el-col>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"danger"
>
危险按钮
</el-button>
</el-col>
</el-row>
</el-col>
</el-row>
</view>
</
template
>
<
script
>
export
default
{
name
:
'
view
'
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/dock/index.vue
View file @
b5358ce3
...
@@ -20,6 +20,15 @@
...
@@ -20,6 +20,15 @@
<el-table-column
label=
"中文名称"
align=
"center"
prop=
"titleZh"
/>
<el-table-column
label=
"中文名称"
align=
"center"
prop=
"titleZh"
/>
<el-table-column
label=
"英文名称"
align=
"center"
prop=
"titleEn"
/>
<el-table-column
label=
"英文名称"
align=
"center"
prop=
"titleEn"
/>
<el-table-column
prop=
"portType"
label=
"港口类型"
align=
"center"
>
<template
slot-scope=
"scope"
>
<div>
{{
portTypeName
(
scope
.
row
.
portType
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"国家"
align=
"center"
prop=
"countryZh"
/>
<el-table-column
label=
"国家"
align=
"center"
prop=
"countryZh"
/>
<el-table-column
label=
"省"
align=
"center"
prop=
"provinceZh"
/>
<el-table-column
label=
"省"
align=
"center"
prop=
"provinceZh"
/>
<el-table-column
label=
"城市"
align=
"center"
prop=
"cityZh"
/>
<el-table-column
label=
"城市"
align=
"center"
prop=
"cityZh"
/>
...
@@ -88,6 +97,11 @@
...
@@ -88,6 +97,11 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"港口类型"
prop=
"portType"
>
<el-select
v-model=
"form.portType"
placeholder=
"请选择"
>
<el-option
v-for=
"dict in portTypeDatas"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"码头编号"
prop=
"number"
>
<el-form-item
label=
"码头编号"
prop=
"number"
>
<el-input
v-model=
"form.number"
placeholder=
"请输入码头编号"
/>
<el-input
v-model=
"form.number"
placeholder=
"请输入码头编号"
/>
...
@@ -107,6 +121,7 @@
...
@@ -107,6 +121,7 @@
<
script
>
<
script
>
import
{
createDock
,
updateDock
,
deleteDock
,
getDock
,
getDockPage
,
exportDockExcel
}
from
"
@/api/ecw/dock
"
;
import
{
createDock
,
updateDock
,
deleteDock
,
getDock
,
getDockPage
,
exportDockExcel
}
from
"
@/api/ecw/dock
"
;
import
{
getListTree
}
from
"
@/api/ecw/region
"
;
import
{
getListTree
}
from
"
@/api/ecw/region
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
export
default
{
export
default
{
name
:
"
Dock
"
,
name
:
"
Dock
"
,
...
@@ -163,10 +178,24 @@ export default {
...
@@ -163,10 +178,24 @@ export default {
titleZh
:
[{
required
:
true
,
message
:
"
中文名称不能为空
"
,
trigger
:
"
blur
"
}],
titleZh
:
[{
required
:
true
,
message
:
"
中文名称不能为空
"
,
trigger
:
"
blur
"
}],
titleEn
:
[{
required
:
true
,
message
:
"
英文名称不能为空
"
,
trigger
:
"
blur
"
}],
titleEn
:
[{
required
:
true
,
message
:
"
英文名称不能为空
"
,
trigger
:
"
blur
"
}],
sort
:
[{
required
:
true
,
message
:
"
排序不能为空
"
,
trigger
:
"
blur
"
}]
sort
:
[{
required
:
true
,
message
:
"
排序不能为空
"
,
trigger
:
"
blur
"
}]
}
},
portTypeDatas
:
getDictDatas
(
DICT_TYPE
.
ECW_PORT_TYPE
)
};
};
},
},
computed
:
{
portTypeName
()
{
return
portType
=>
{
for
(
let
index
in
this
.
portTypeDatas
)
{
let
portTypeItem
=
this
.
portTypeDatas
[
index
];
if
(
portTypeItem
.
value
==
portType
)
{
return
portTypeItem
.
label
;
}
}
}
},
},
watch
:
{
watch
:
{
'
form.countryId
'
(
newV
,
oldV
)
{
'
form.countryId
'
(
newV
,
oldV
)
{
if
(
oldV
&&
oldV
!=
newV
)
{
if
(
oldV
&&
oldV
!=
newV
)
{
...
...
src/views/ecw/product/index.vue
View file @
b5358ce3
...
@@ -338,7 +338,8 @@ export default {
...
@@ -338,7 +338,8 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'
ProductPrice
'
,
name
:
'
ProductPrice
'
,
query
:
{
query
:
{
product_id
:
row
.
id
product_id
:
row
.
id
,
product_type
:
row
.
typeId
}
}
})
})
},
},
...
...
src/views/ecw/productPrice/blacklist.vue
0 → 100644
View file @
b5358ce3
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"商品编码"
prop=
"productCode"
>
<el-input
v-model=
"queryParams.productCode"
placeholder=
"请输入商品编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"海关编码"
prop=
"customsCode"
>
<el-input
v-model=
"queryParams.customsCode"
placeholder=
"请输入海关编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入商品名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"商品类型"
prop=
"typeId"
>
<el-select
v-model=
"queryParams.typeId"
placeholder=
"选择商品类型"
clearable
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"商品特性"
prop=
"attrId"
>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择商品特性"
clearable
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"startCityId"
>
<el-select
v-model=
"queryParams.startCityId"
clearable
>
<el-option
v-for=
"city in startCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"destCityId"
>
<el-select
v-model=
"queryParams.destCityId"
clearable
>
<el-option
v-for=
"city in destCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"空运渠道"
prop=
"shippingChannelId"
>
<el-select
v-model=
"queryParams.shippingChannelId"
clearable
>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"item.nameZh"
:value=
"item.channelId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
""
prop=
"blacklist"
v-if=
"false"
>
<el-checkbox
v-model=
"queryParams.blacklist"
:true-label=
"1"
:false-label=
"0"
>
黑名单
</el-checkbox>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:product-price:create']"
>
新增
</el-button>
</el-col>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:product-price:export']"
>
导出
</el-button>
</el-col>
-->
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"序号"
prop=
"id"
width=
"50"
/>
<el-table-column
label=
"商品编码"
align=
"center"
prop=
"productCode"
>
<template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
productDO
.
productCode
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"海关编码"
align=
"center"
prop=
"customsCode"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
productDO
.
customsCode
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"商品类型"
align=
"center"
prop=
"typeId"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getTypeName
(
scope
.
row
.
productDO
.
typeId
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"productName"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
productDO
.
titleZh
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"tansportType"
label=
"运输方式"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<div>
{{
transportName
(
scope
.
row
.
warehouseLineDO
.
transportType
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"tansportType"
label=
"出货渠道"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"{row}"
>
<div>
{{
channelName
(
row
.
shippingChannelId
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"startDestTitle"
label=
"始发地/目的地"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
warehouseLineDO
.
startTitleZh
}}
<br
/>
{{
scope
.
row
.
warehouseLineDO
.
destTitleZh
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"price"
label=
"价格"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div>
海运费:
{{
getCurrencySymbol
(
scope
.
row
.
transportPriceUnit
)
+
scope
.
row
.
transportPrice
}}
{{
getCurrencyTitle
(
scope
.
row
.
transportPriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
transportVolumeUnit
)
}}
<br
/>
清关费:
{{
getCurrencySymbol
(
scope
.
row
.
clearancePriceUnit
)
+
scope
.
row
.
clearancePrice
}}
{{
getCurrencyTitle
(
scope
.
row
.
clearancePriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
clearanceVolumeUnit
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"auditStatus"
align=
"center"
label=
"状态"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<div>
{{
statusName
(
scope
.
row
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"advanceStatus"
label=
"预付"
align=
"center"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<div>
{{
getAdvanceStatuTitle
(
scope
.
row
.
advanceStatus
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"140"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:product-price:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'blacklist')"
v-hasPermi=
"['ecw:product-price:update']"
>
{{
scope
.
row
.
blacklist
==
0
?
'
加入黑名单
'
:
'
移除黑名单
'
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'auditStatus')"
v-hasPermi=
"['ecw:product-price:update']"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
'
下架
'
:
'
上架
'
}}
</el-button>
<!--
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:product-price:delete']"
>
删除
</el-button>
-->
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"110px"
>
<el-form-item
label=
"商品类型"
prop=
"typeId"
>
<el-select
v-model=
"form.typeId"
placeholder=
"选择产品类型"
disabled
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
>
<el-input
v-model=
"form.titleZh"
disabled
/>
</el-form-item>
<el-form-item
label=
"英文名称"
prop=
"titleEn"
>
<el-input
v-model=
"form.titleEn"
disabled
/>
</el-form-item>
<el-row
:gutter=
"20"
v-if=
"!form.id"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"运输方式"
prop=
"transportType"
>
<el-select
v-model=
"form.transportType"
clearable
@
change=
"transportTypeChange"
>
<el-option
v-for=
"dict in transportDatas"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"始发地"
prop=
"startCityId"
>
<el-select
v-model=
"form.startCityId"
clearable
@
change=
"startCityChange"
>
<el-option
v-for=
"city in startCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"目的地"
prop=
"destCityId"
>
<el-select
v-model=
"form.destCityId"
clearable
@
change=
"destCityChange"
>
<el-option
v-for=
"city in destCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-table
ref=
"routeTable"
:data=
"routedList"
tooltip-effect=
"dark"
max-height=
"250"
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
:selectable=
"checkSelectable"
width=
"55"
>
</el-table-column>
<el-table-column
label=
"线路"
width=
"800"
>
<
template
slot-scope=
"scope"
>
{{
transportName
(
scope
.
row
.
transportType
)
+
'
从【
'
+
scope
.
row
.
startTitleZh
+
'
】发往【
'
+
scope
.
row
.
destTitleZh
+
'
】
'
}}
</
template
>
</el-table-column>
</el-table>
<br
/>
<el-form-item
label=
"海运费"
prop=
"transportPrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.transportPriceUnit"
>
<el-option
v-for=
"currency in currecyList"
:key=
"currency.id"
:label=
"currency.titleZh"
:value=
"currency.id"
/>
</el-select>
</el-col>
<el-col
:span=
"6"
>
<el-input
v-model.number=
"form.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.transportVolumeUnit"
>
<el-option
v-for=
"unit in unitList"
:key=
"unit.id"
:label=
"unit.titleZh"
:value=
"unit.id"
/>
</el-select>
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"清关费"
prop=
"clearancePrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.clearancePriceUnit"
>
<el-option
v-for=
"currency in currecyList"
:key=
"currency.id"
:label=
"currency.titleZh"
:value=
"currency.id"
/>
</el-select>
</el-col>
<el-col
:span=
"6"
>
<el-input
v-model.number=
"form.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.clearanceVolumeUnit"
>
<el-option
v-for=
"unit in unitList"
:key=
"unit.id"
:label=
"unit.titleZh"
:value=
"unit.id"
/>
</el-select>
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"是否预付"
prop=
"advanceStatus"
>
<el-radio-group
v-model=
"form.advanceStatus"
>
<el-radio
v-for=
"advanceDict in advanceStatusDictDatas"
:key=
"advanceDict.value"
:label=
"parseInt(advanceDict.value)"
>
{{advanceDict.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<div
style=
"font-size:20px;"
>
基础信息
</div>
<el-form-item
label=
"需要预约入仓"
prop=
"needBook"
>
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-form-item
label=
"每日入仓上限"
prop=
"dayLimit"
>
<el-input
v-model.number=
"form.dayLimit"
type=
"number"
>
<
template
slot=
"append"
>
立方米
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"货柜位置"
prop=
"containerLocation"
>
<el-select
v-model=
"form.containerLocation"
placeholder=
"选择货柜位置"
clearable
>
<el-option
v-for=
"locationItem in locationList"
:key=
"locationItem.value"
:label=
"locationItem.label"
:value=
"locationItem.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"方数要求"
prop=
"square"
>
<el-input
v-model.number=
"form.square"
type=
"number"
>
<!-- <template slot="append">立方米</template> -->
</el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
openedRouterList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getCityList
}
from
"
@/api/ecw/region
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
{
AuditStatusEnum
}
from
'
@/utils/constants
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
DictTag
from
'
@/components/DictTag
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
export
default
{
name
:
"
ProductPrice
"
,
components
:
{
DictTag
},
data
()
{
return
{
//特性列表
attrList
:[],
typeList
:
[],
product
:
null
,
startCityList
:
[],
//始发地城市
destCityList
:
[],
//目的地城市
routedList
:
[],
//已开头路线列表
currecyList
:
[],
//货币列表
unitList
:
[],
//单位列表
channelList
:[]
,
// 渠道
routeParams
:{},
//路线搜索条件
isUpdate
:
false
,
//更新操作
//货柜位置
locationList
:[],
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 产品价格列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeCreateTime
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
productId
:
null
,
warehouseLineId
:
null
,
transportType
:
null
,
transportPrice
:
null
,
transportPriceUnit
:
null
,
transportVolumeUnit
:
null
,
clearancePrice
:
null
,
clearancePriceUnit
:
null
,
clearanceVolumeUnit
:
null
,
shippingChannelId
:
null
,
status
:
null
,
},
// 表单参数
form
:
{
typeId
:
null
,
titleZh
:
null
},
// 表单校验
rules
:
{
typeId
:
[{
required
:
true
,
message
:
"
产品类型不能为空
"
,
trigger
:
"
blur
"
}],
titleZh
:
[{
required
:
true
,
message
:
"
产品名称不能为空
"
,
trigger
:
"
blur
"
}],
titleEn
:
[{
required
:
true
,
message
:
"
英文名称不能为空
"
,
trigger
:
"
blur
"
}],
transportPrice
:
[{
required
:
true
,
message
:
"
海运费不能为空
"
,
trigger
:
"
blur
"
}],
clearancePrice
:
[{
required
:
true
,
message
:
"
清关费不能为空
"
,
trigger
:
"
blur
"
}],
advanceStatus
:
[{
required
:
true
,
message
:
"
是否预付不能为空
"
,
trigger
:
"
blur
"
}],
containerLocation
:[{
required
:
true
,
message
:
"
货柜位置不能为空
"
,
trigger
:
"
blur
"
}],
square
:[{
required
:
true
,
message
:
"
方数不能为空
"
,
trigger
:
"
blur
"
}],
needBook
:[{
required
:
true
,
message
:
"
预约入仓不能为空
"
,
trigger
:
"
blur
"
}],
},
lineList
:
[],
transportDatas
:
getDictDatas
(
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
advanceStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
ADVANCE_STATUS
),
AuditStatusEnum
:
AuditStatusEnum
,
locationList
:
getDictDatas
(
DICT_TYPE
.
ECW_CONTAINER_LOCATION
),
};
},
computed
:
{
keyedChannel
(){
return
arrryToKeyedObjectBy
(
this
.
channelList
,
'
channelId
'
)
},
channelName
(){
return
id
=>
{
return
this
.
keyedChannel
[
id
]
?
this
.
keyedChannel
[
id
].
nameZh
:
null
}
},
getTypeName
()
{
return
typeId
=>
{
for
(
let
index
in
this
.
typeList
)
{
let
typeItem
=
this
.
typeList
[
index
];
if
(
typeItem
.
id
==
typeId
)
{
return
typeItem
.
titleZh
;
}
}
}
},
statusName
()
{
return
row
=>
{
if
(
row
.
blacklist
)
return
'
黑名单
'
;
if
(
row
.
auditStatus
===
AuditStatusEnum
.
PASS
)
return
'
已审核
'
;
return
'
已下架
'
;
}
},
transportName
()
{
return
transportType
=>
{
return
this
.
getDictDataLabel
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
,
transportType
)
/* for(let index in this.transportDatas) {
let transportItem = this.transportDatas[index];
if(transportItem.value == transportType) {
return transportItem.label;
}
} */
}
},
getCurrencySymbol
()
{
return
currencyId
=>
{
for
(
let
index
in
this
.
currecyList
)
{
let
currecyItem
=
this
.
currecyList
[
index
];
if
(
currecyItem
.
id
==
currencyId
)
{
return
currecyItem
.
fuhao
;
}
}
}
},
getCurrencyTitle
()
{
return
currencyId
=>
{
for
(
let
index
in
this
.
currecyList
)
{
let
currecyItem
=
this
.
currecyList
[
index
];
if
(
currecyItem
.
id
==
currencyId
)
{
return
currecyItem
.
titleZh
;
}
}
}
},
getUnitTitle
()
{
return
unitId
=>
{
for
(
let
index
in
this
.
unitList
)
{
let
unitItem
=
this
.
unitList
[
index
];
if
(
unitItem
.
id
==
unitId
)
{
return
unitItem
.
titleZh
;
}
}
}
},
getAdvanceStatuTitle
()
{
return
value
=>
{
for
(
let
index
in
this
.
advanceStatusDictDatas
)
{
let
dictItem
=
this
.
advanceStatusDictDatas
[
index
];
if
(
dictItem
.
value
===
''
+
value
)
{
return
dictItem
.
label
;
}
}
}
}
},
created
()
{
this
.
queryParams
.
blacklist
=
1
;
// this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE);
// console.log(this.transportDatas);
let
productJson
=
localStorage
.
getItem
(
'
product
'
);
// console.log(productJson);
this
.
product
=
eval
(
'
(
'
+
productJson
+
'
)
'
);
let
typeListJson
=
localStorage
.
getItem
(
'
typeList
'
);
if
(
typeListJson
)
{
this
.
typeList
=
eval
(
'
(
'
+
typeListJson
+
'
)
'
);
}
else
{
this
.
getTypeList
();
}
this
.
getChannelList
()
this
.
getAttrList
();
this
.
getList
();
//获取城市列表
this
.
getAllCityList
();
//获取货币列表
this
.
requestCurrencyList
();
//获取单位列表
this
.
requestUnitList
();
},
methods
:
{
getChannelList
(){
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
},
/** 获取产品属性列表 */
getAttrList
()
{
getProductAttrList
().
then
(
response
=>
{
this
.
attrList
=
response
.
data
;
})
},
/** 获取产品类型列表 */
getTypeList
()
{
getProductTypeList
().
then
(
response
=>
{
this
.
typeList
=
response
.
data
;
})
},
/**获取所有城市列表 */
getAllCityList
()
{
getCityList
({}).
then
(
response
=>
{
let
cityList
=
response
.
data
;
for
(
let
index
in
cityList
)
{
let
city
=
cityList
[
index
];
if
(
city
.
type
==
'
1
'
)
{
//进口,目的地
this
.
destCityList
.
push
(
city
);
}
else
if
(
city
.
type
==
'
2
'
)
{
//出口,始发地
this
.
startCityList
.
push
(
city
);
}
else
if
(
city
.
type
==
'
3
'
)
{
//进出口
this
.
destCityList
.
push
(
city
);
this
.
startCityList
.
push
(
city
);
}
}
})
},
/**获取已开通路线列表 */
getOpenedRouterList
()
{
openedRouterList
(
this
.
routeParams
).
then
(
response
=>
{
this
.
routedList
=
response
.
data
;
this
.
setDefaultSelect
();
})
},
/**获取所有货币列表 */
requestCurrencyList
()
{
getCurrencyList
().
then
(
response
=>
{
this
.
currecyList
=
response
.
data
;
})
},
/**获取所有单位列表 */
requestUnitList
()
{
getUnitList
().
then
(
response
=>
{
this
.
unitList
=
response
.
data
;
})
},
handleSelectionChange
(
val
)
{
this
.
lineList
=
val
;
},
/**运输线路改变 */
transportTypeChange
(
newVal
)
{
this
.
routeParams
.
transportType
=
this
.
form
.
transportType
;
this
.
getOpenedRouterList
();
},
/**始发地改变 */
startCityChange
(
newVal
)
{
this
.
routeParams
.
startCityId
=
this
.
form
.
startCityId
;
this
.
getOpenedRouterList
();
},
/**目的地改变 */
destCityChange
(
newVal
)
{
this
.
routeParams
.
destCityId
=
this
.
form
.
destCityId
;
this
.
getOpenedRouterList
();
},
handleStatusChange
(
row
)
{
updateProductPrice
(
row
).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
}).
catch
(
function
()
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
});
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行查询
getProductPricePage
(
params
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
productId
:
undefined
,
warehouseLineId
:
undefined
,
transportPrice
:
undefined
,
transportPriceUnit
:
undefined
,
transportVolumeUnit
:
undefined
,
clearancePrice
:
undefined
,
clearancePriceUnit
:
undefined
,
clearanceVolumeUnit
:
undefined
,
status
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
return
this
.
$router
.
push
(
'
product-price/edit?
'
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
())
this
.
reset
();
this
.
routeParams
=
{};
this
.
getOpenedRouterList
();
this
.
form
.
typeId
=
this
.
product
.
typeId
;
this
.
form
.
titleZh
=
this
.
product
.
titleZh
;
this
.
form
.
titleEn
=
this
.
product
.
titleEn
;
this
.
form
.
needBook
=
this
.
product
.
needBook
;
this
.
form
.
dayLimit
=
this
.
product
.
dayLimit
;
this
.
form
.
containerLocation
=
this
.
product
.
containerLocation
;
this
.
form
.
square
=
this
.
product
.
square
;
if
(
this
.
currecyList
)
{
let
priceUnitId
=
this
.
currecyList
[
0
].
id
;
this
.
form
.
transportPriceUnit
=
priceUnitId
;
this
.
form
.
clearancePriceUnit
=
priceUnitId
;
}
if
(
this
.
unitList
)
{
let
volumeUnitId
=
this
.
unitList
[
0
].
id
;
this
.
form
.
transportVolumeUnit
=
volumeUnitId
;
this
.
form
.
clearanceVolumeUnit
=
volumeUnitId
;
}
this
.
isUpdate
=
false
;
this
.
open
=
true
;
this
.
title
=
"
添加路线价格
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
return
this
.
$router
.
push
(
'
product-price/edit?id=
'
+
row
.
id
)
this
.
reset
();
const
id
=
row
.
id
;
let
lineId
=
row
.
warehouseLineId
;
this
.
routeParams
=
{
lineId
:
lineId
};
this
.
getOpenedRouterList
();
getProductPrice
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
.
typeId
=
this
.
product
.
typeId
;
this
.
form
.
titleZh
=
this
.
product
.
titleZh
;
this
.
form
.
titleEn
=
this
.
product
.
titleEn
;
this
.
isUpdate
=
true
;
// console.log(this.form);
this
.
open
=
true
;
this
.
title
=
"
修改路线价格
"
;
});
},
updateStatus
(
row
,
type
)
{
if
(
type
==
'
blacklist
'
)
{
row
.
blacklist
=
row
.
blacklist
==
0
?
1
:
0
;
}
else
if
(
type
==
'
auditStatus
'
)
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
}
updateProductPrice
(
row
).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
}).
catch
(
function
()
{
if
(
statusType
==
'
blacklist
'
)
{
row
.
blacklist
=
row
.
blacklist
===
1
?
0
:
1
;
}
else
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
}
});
},
checkSelectable
()
{
return
!
this
.
isUpdate
;
},
setDefaultSelect
()
{
let
vm
=
this
;
setTimeout
(()
=>
{
// 修改线路价格,选中已经选择的
if
(
vm
.
isUpdate
&&
vm
.
routedList
&&
vm
.
routedList
.
length
)
{
vm
.
$refs
.
routeTable
.
toggleRowSelection
(
vm
.
routedList
[
0
]);
}
},
300
);
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
if
(
!
this
.
lineList
||
!
this
.
lineList
.
length
)
{
this
.
$message
.
error
(
'
请选择线路
'
);
return
;
}
let
lineChannelList
=
[];
//TODO ,lineChannelList实体空运的时候需要传出货渠道ID--shippingChannelId
this
.
lineList
.
map
((
item
)
=>
{
lineChannelList
.
push
({
lineId
:
item
.
id
});
return
item
;
});
this
.
form
.
lineChannelList
=
lineChannelList
;
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateProductPrice
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
this
.
form
.
productId
=
this
.
product
.
id
;
createProductPrice
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
请求成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除产品价格编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteProductPrice
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有产品价格数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportProductPriceExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
src/views/ecw/productPrice/edit.vue
View file @
b5358ce3
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<el-form-item
label=
"路线"
v-if=
"form.warehouseLineDO"
>
<el-form-item
label=
"路线"
v-if=
"form.warehouseLineDO"
>
<el-input
:value=
"'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, form.warehouseLineDO.transportType) + '】从【'+form.warehouseLineDO.startTitleZh+'】发往【'+form.warehouseLineDO.destTitleZh+'】'"
disabled
/>
<el-input
:value=
"'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, form.warehouseLineDO.transportType) + '】从【'+form.warehouseLineDO.startTitleZh+'】发往【'+form.warehouseLineDO.destTitleZh+'】'"
disabled
/>
</el-form-item>
</el-form-item>
<router-selector
v-if=
"!form.id"
v-model=
"selectedRoutes"
/>
<router
s
-selector
v-if=
"!form.id"
v-model=
"selectedRoutes"
/>
<el-card
style=
"margin-bottom: 10px"
>
<el-card
style=
"margin-bottom: 10px"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
价格设置
价格设置
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Router
Selector
from
'
@/components/Router
Selector
'
import
Router
sSelector
from
'
@/components/Routers
Selector
'
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
getProduct
}
from
'
@/api/ecw/product
'
import
{
getProduct
}
from
'
@/api/ecw/product
'
import
{
getProductType
,
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getProductType
,
getProductTypeList
}
from
'
@/api/ecw/productType
'
...
@@ -164,7 +164,7 @@ import { getUnitList } from '@/api/ecw/unit';
...
@@ -164,7 +164,7 @@ import { getUnitList } from '@/api/ecw/unit';
import
ProductSelector
from
'
@/components/ProductSelector
'
import
ProductSelector
from
'
@/components/ProductSelector
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
export
default
{
export
default
{
components
:
{
RouterSelector
,
ProductSelector
},
components
:
{
Router
s
Selector
,
ProductSelector
},
data
(){
data
(){
return
{
return
{
selectedRoutes
:
[],
// 勾选的路线渠道
selectedRoutes
:
[],
// 勾选的路线渠道
...
...
src/views/ecw/productPrice/index.vue
View file @
b5358ce3
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
""
prop=
"blacklist"
>
<el-form-item
label=
""
prop=
"blacklist"
v-if=
"false"
>
<el-checkbox
v-model=
"queryParams.blacklist"
<el-checkbox
v-model=
"queryParams.blacklist"
:true-label=
"1"
:false-label=
"0"
>
黑名单
</el-checkbox>
:true-label=
"1"
:false-label=
"0"
>
黑名单
</el-checkbox>
</el-form-item>
</el-form-item>
...
@@ -506,12 +506,24 @@ export default {
...
@@ -506,12 +506,24 @@ export default {
}
}
},
},
created
()
{
activated
()
{
let
typeId
=
this
.
$route
.
query
.
product_type
;
if
(
typeId
)
{
if
(
!
this
.
queryParams
.
typeId
||
this
.
queryParams
.
typeId
!=
typeId
)
this
.
$set
(
this
.
queryParams
,
'
typeId
'
,
typeId
);
// this.queryParams.typeId = typeId;
this
.
getList
();
}
},
created
()
{
// this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE);
// this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE);
// console.log(this.transportDatas);
// console.log(this.transportDatas);
let
productJson
=
localStorage
.
getItem
(
'
product
'
);
let
productJson
=
localStorage
.
getItem
(
'
product
'
);
// console.log(productJson);
// console.log(productJson);
this
.
product
=
eval
(
'
(
'
+
productJson
+
'
)
'
);
this
.
product
=
eval
(
'
(
'
+
productJson
+
'
)
'
);
let
typeListJson
=
localStorage
.
getItem
(
'
typeList
'
);
let
typeListJson
=
localStorage
.
getItem
(
'
typeList
'
);
if
(
typeListJson
)
{
if
(
typeListJson
)
{
...
...
src/views/ecw/supplier/index.vue
View file @
b5358ce3
...
@@ -44,10 +44,10 @@
...
@@ -44,10 +44,10 @@
<el-option
v-for=
"dict in this.getDictDatas('company_type')"
<el-option
v-for=
"dict in this.getDictDatas('company_type')"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select-->
</el-select-->
<dict-selector
type=
"company_type
"
v-model=
"queryParams.companyType"
/>
<dict-selector
:type=
"DICT_TYPE.COMPANY_TYPE
"
v-model=
"queryParams.companyType"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"合作类型"
prop=
"cooperationType"
>
<el-form-item
label=
"合作类型"
prop=
"cooperationType"
>
<dict-selector
type=
"cooperation_type
"
v-model=
"queryParams.cooperationType"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_COOPERATION_TYPE
"
v-model=
"queryParams.cooperationType"
/>
<!--el-select v-model="queryParams.cooperationType" placeholder="请选择合作类型" clearable size="small">
<!--el-select v-model="queryParams.cooperationType" placeholder="请选择合作类型" clearable size="small">
<el-option
label=
"请选择字典生成"
value=
""
/>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select-->
</el-select-->
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<!--
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择是否展示 默认为展示"
clearable
size=
"small"
>
<!--
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择是否展示 默认为展示"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
-->
</el-select>
-->
<dict-selector
type=
"_yesno
"
v-model=
"queryParams.status"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_YES_NO
"
v-model=
"queryParams.status"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-form-item
label=
"创建时间"
>
<el-date-picker
v-model=
"dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
<el-date-picker
v-model=
"dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
...
...
src/views/infra/codegen/index.vue
View file @
b5358ce3
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['infra:codegen:delete']"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['infra:codegen:delete']"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-refresh"
@
click=
"handleSynchDb(scope.row)"
v-hasPermi=
"['infra:codegen:update']"
>
同步
</el-button>
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-refresh"
@
click=
"handleSynchDb(scope.row)"
v-hasPermi=
"['infra:codegen:update']"
>
同步
</el-button>
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-download"
@
click=
"handleGenTable(scope.row)"
v-hasPermi=
"['infra:codegen:download']"
>
生成代码
</el-button>
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-download"
@
click=
"handleGenTable(scope.row)"
v-hasPermi=
"['infra:codegen:download']"
>
生成代码
</el-button>
<el-button
type=
"text"
size=
"small"
icon=
"el-icon-download"
@
click=
"generateValidateCode(scope.row)"
>
生成验证配置
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -101,7 +102,7 @@
...
@@ -101,7 +102,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
getCodegenTablePage
,
previewCodegen
,
downloadCodegen
,
deleteCodegen
,
import
{
getCodegenDetail
,
getCodegenTablePage
,
previewCodegen
,
downloadCodegen
,
deleteCodegen
,
syncCodegenFromDB
,
syncCodegenFromSQL
,
createCodegenListFromSQL
}
from
"
@/api/infra/codegen
"
;
syncCodegenFromDB
,
syncCodegenFromSQL
,
createCodegenListFromSQL
}
from
"
@/api/infra/codegen
"
;
import
importTable
from
"
./importTable
"
;
import
importTable
from
"
./importTable
"
;
...
@@ -371,7 +372,35 @@ export default {
...
@@ -371,7 +372,35 @@ export default {
this
.
getList
();
this
.
getList
();
});
});
});
});
}
},
generateValidateCode
(
row
){
let
l
=
this
.
$loading
()
getCodegenDetail
(
row
.
id
).
then
(
res
=>
{
let
rules
=
{}
res
.
data
.
columns
.
forEach
(
item
=>
{
let
rule
=
{
trigger
:
'
blur
'
}
if
(
!
item
.
nullable
){
rule
.
required
=
true
rule
.
message
=
'
不能为空
'
}
if
([
'
int
'
,
'
tinyint
'
,
'
bigint
'
].
indexOf
(
item
.
columnType
)){
rule
.
type
=
'
integer
'
}
if
(
item
.
columnType
.
indexOf
(
'
decimal
'
)
===
0
){
rule
.
type
=
'
decimal
'
}
if
(
item
.
columnType
==
'
datetime
'
){
rule
.
type
=
'
date
'
}
rules
[
item
.
javaField
]
=
[
rule
]
})
console
.
log
(
row
.
tableComment
+
'
校验规则
'
,
JSON
.
stringify
(
rules
))
this
.
$message
(
'
规则已生成,打开控制台查看
'
)
})
.
finally
(
res
=>
{
l
.
close
()
})
},
}
}
};
};
</
script
>
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment