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
84b09b47
Commit
84b09b47
authored
Jun 24, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化优惠券,布局创建报价单
parent
70af7de0
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1033 additions
and
228 deletions
+1033
-228
.env.development
.env.development
+1
-1
jsconfig.json
jsconfig.json
+14
-0
coupon.js
src/api/ecw/coupon.js
+12
-3
offer.js
src/api/ecw/offer.js
+54
-0
index.vue
src/components/DictSelector/index.vue
+62
-15
index.vue
src/components/RoutersSelector/index.vue
+13
-3
dict.js
src/utils/dict.js
+1
-1
edit.vue
src/views/ecw/coupon/edit.vue
+130
-180
index.vue
src/views/ecw/coupon/index.vue
+8
-25
edit.vue
src/views/ecw/offer/edit.vue
+303
-0
index.vue
src/views/ecw/offer/index.vue
+435
-0
No files found.
.env.development
View file @
84b09b47
...
@@ -5,7 +5,7 @@ ENV = 'development'
...
@@ -5,7 +5,7 @@ ENV = 'development'
VUE_APP_TITLE = 捷道管理系统
VUE_APP_TITLE = 捷道管理系统
# 捷道管理系统/开发环境
# 捷道管理系统/开发环境
VUE_APP_BASE_API = 'http://
localhost:48080
'
VUE_APP_BASE_API = 'http://
jd.admtest.jdshangmen.com
'
# VUE_APP_BASE_API = '/api'
# VUE_APP_BASE_API = '/api'
# 路由懒加载
# 路由懒加载
...
...
jsconfig.json
0 → 100644
View file @
84b09b47
{
"compilerOptions"
:
{
"target"
:
"ES6"
,
"module"
:
"commonjs"
,
"allowSyntheticDefaultImports"
:
true
,
"baseUrl"
:
"./"
,
"paths"
:
{
"@/*"
:
[
"src/*"
]
}
},
"exclude"
:
[
"node_modules"
]
}
\ No newline at end of file
src/api/ecw/coupon.js
View file @
84b09b47
...
@@ -12,8 +12,8 @@ export function createCoupon(data) {
...
@@ -12,8 +12,8 @@ export function createCoupon(data) {
// 更新优惠券信息
// 更新优惠券信息
export
function
updateCoupon
(
data
)
{
export
function
updateCoupon
(
data
)
{
return
request
({
return
request
({
url
:
'
/ecw/coupon/
createOrU
pdate
'
,
url
:
'
/ecw/coupon/
u
pdate
'
,
method
:
'
p
os
t
'
,
method
:
'
p
u
t
'
,
data
:
data
data
:
data
})
})
}
}
...
@@ -29,7 +29,7 @@ export function deleteCoupon(id) {
...
@@ -29,7 +29,7 @@ export function deleteCoupon(id) {
// 获得优惠券信息
// 获得优惠券信息
export
function
getCoupon
(
id
)
{
export
function
getCoupon
(
id
)
{
return
request
({
return
request
({
url
:
'
/ecw/coupon/get?
i
d=
'
+
id
,
url
:
'
/ecw/coupon/get?
couponI
d=
'
+
id
,
method
:
'
get
'
method
:
'
get
'
})
})
}
}
...
@@ -43,6 +43,15 @@ export function getCouponPage(query) {
...
@@ -43,6 +43,15 @@ export function getCouponPage(query) {
})
})
}
}
// 获得优惠券下拉
export
function
getCouponSelect
(
query
)
{
return
request
({
url
:
'
/ecw/coupon/select
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出优惠券信息 Excel
// 导出优惠券信息 Excel
export
function
exportCouponExcel
(
query
)
{
export
function
exportCouponExcel
(
query
)
{
return
request
({
return
request
({
...
...
src/api/ecw/offer.js
0 → 100644
View file @
84b09b47
import
request
from
'
@/utils/request
'
// 创建报价单管理
export
function
createOffer
(
data
)
{
return
request
({
url
:
'
/ecw/offer/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新报价单管理
export
function
updateOffer
(
data
)
{
return
request
({
url
:
'
/ecw/offer/update
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除报价单管理
export
function
deleteOffer
(
id
)
{
return
request
({
url
:
'
/ecw/offer/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
// 获得报价单管理
export
function
getOffer
(
id
)
{
return
request
({
url
:
'
/ecw/offer/get?id=
'
+
id
,
method
:
'
get
'
})
}
// 获得报价单管理分页
export
function
getOfferPage
(
query
)
{
return
request
({
url
:
'
/ecw/offer/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出报价单管理 Excel
export
function
exportOfferExcel
(
query
)
{
return
request
({
url
:
'
/ecw/offer/export-excel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
src/components/DictSelector/index.vue
View file @
84b09b47
<
template
>
<
template
>
<div
class=
"dict-selector"
>
<div
class=
"dict-selector"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
:disabled=
"disabled"
>
<el-option
v-for=
"dict in
dict
List"
<el-option
v-for=
"dict in
formatted
List"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-select>
<el-radio-group
v-if=
"formType == 'radio'"
v-model=
"valueSync"
>
<el-radio-group
v-if=
"formType == 'radio'"
v-model=
"valueSync"
:disabled=
"disabled"
>
<el-radio
v-for=
"dict in
dictList"
:label=
"
dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-radio>
<el-radio
v-for=
"dict in
formattedList"
:label=
"dict.value"
:checked=
"valueSync ===
dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-radio>
</el-radio-group>
</el-radio-group>
<el-checkbox-group
v-if=
"formType == 'checkbox'"
v-model=
"valueSync"
>
<el-checkbox-group
v-if=
"formType == 'checkbox'"
v-model=
"valueSync"
:disabled=
"disabled"
>
<el-checkbox
v-for=
"dict in
dict
List"
:label=
"dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-checkbox>
<el-checkbox
v-for=
"dict in
formatted
List"
:label=
"dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
const
FORMATTERS
=
{
"
string
"
:
String
,
"
bool
"
:
function
(
val
){
return
[
false
,
'
false
'
,
0
,
"
0
"
].
indexOf
(
val
)
<
0
},
'
number
'
:
Number
,
'
array
'
:
function
(
val
){
return
typeof
val
==
'
string
'
?
val
.
split
(
'
,
'
).
filter
(
item
=>
item
&&
item
!==
''
)
:
val
}
}
export
default
{
export
default
{
props
:{
props
:{
placeholder
:
{
placeholder
:
{
...
@@ -20,17 +30,22 @@ export default {
...
@@ -20,17 +30,22 @@ export default {
default
:
'
请选择
'
default
:
'
请选择
'
},
},
type
:
String
,
type
:
String
,
value
:
[
String
,
Number
,
Array
],
value
:
[
String
,
Number
,
Array
,
Boolean
],
multiple
:
Boolean
,
multiple
:
Boolean
,
formType
:{
formType
:{
type
:
String
,
type
:
String
,
default
:
'
select
'
default
:
'
select
'
},
},
forceString
:
{
formatter
:
{
type
:
[
Function
,
String
],
default
:
String
},
/* forceString: {
type: Boolean,
type: Boolean,
default: true
default: true
},
},
*/
defaultable
:
Boolean
,
// 是否默认选择第一个
defaultable
:
Boolean
,
// 是否默认选择第一个
disabled
:
Boolean
},
},
data
(){
data
(){
return
{
return
{
...
@@ -40,11 +55,24 @@ export default {
...
@@ -40,11 +55,24 @@ export default {
computed
:{
computed
:{
dictList
(){
dictList
(){
return
this
.
getList
(
this
.
type
)
return
this
.
getList
(
this
.
type
)
},
formattedList
(){
let
arr
=
[]
this
.
dictList
.
forEach
(
item
=>
{
arr
.
push
({
label
:
item
.
label
,
value
:
this
.
format
(
item
.
value
),
cssClass
:
item
.
cssClass
,
colorType
:
item
.
colorType
})
})
return
arr
}
}
},
},
watch
:{
watch
:{
valueSync
(){
valueSync
(
val
){
this
.
$emit
(
'
input
'
,
this
.
forceString
?
String
(
this
.
valueSync
)
:
this
.
valueSync
)
//this.$emit('input', this.forceString ? String(this.valueSync) : this.valueSync)
this
.
$emit
(
'
input
'
,
this
.
format
(
val
))
},
},
value
(
val
){
value
(
val
){
this
.
setValueSync
()
this
.
setValueSync
()
...
@@ -58,11 +86,30 @@ export default {
...
@@ -58,11 +86,30 @@ export default {
this
.
setDefault
()
this
.
setDefault
()
},
},
methods
:{
methods
:{
format
(
val
){
if
(
val
===
null
||
val
==
undefined
)
return
val
let
formatter
=
typeof
this
.
formatter
==
'
function
'
?
this
.
formatter
:
FORMATTERS
[
this
.
formatter
]
if
(
!
formatter
){
console
.
warn
(
'
格式器无效
'
,
this
.
formatter
)
return
val
}
return
formatter
(
val
)
},
setValueSync
(){
setValueSync
(){
if
(
!
this
.
value
||
this
.
value
==
''
)
return
if
(
this
.
value
===
null
||
this
.
value
===
undefined
||
this
.
value
===
''
)
return
if
(
this
.
forceString
&&
this
.
multiple
){
if
(
this
.
multiple
){
let
value
=
[]
if
(
typeof
this
.
value
==
'
string
'
){
value
=
this
.
value
.
split
(
'
,
'
).
filter
(
item
=>
item
&&
item
!=
''
)
}
this
.
valueSync
=
value
.
map
(
item
=>
this
.
format
(
item
))
}
else
{
this
.
valueSync
=
this
.
format
(
this
.
value
)
}
/* if(this.forceString && this.multiple){
this.valueSync = this.value.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
this
.
getDictDatas
(
this
.
type
)
return
this
.
getDictDatas
(
this
.
type
)
...
@@ -70,7 +117,7 @@ export default {
...
@@ -70,7 +117,7 @@ export default {
setDefault
(){
setDefault
(){
if
(
!
this
.
defaultable
)
return
if
(
!
this
.
defaultable
)
return
if
(
this
.
dictList
.
length
&&
(
this
.
valueSync
===
null
||
this
.
valueSync
==
''
)){
if
(
this
.
dictList
.
length
&&
(
this
.
valueSync
===
null
||
this
.
valueSync
==
''
)){
this
.
valueSync
=
this
.
dict
List
[
0
].
value
this
.
valueSync
=
this
.
multiple
?
[]
:
this
.
formatted
List
[
0
].
value
}
}
}
}
}
}
...
...
src/components/RoutersSelector/index.vue
View file @
84b09b47
...
@@ -59,6 +59,11 @@ import {getChannelList} from '@/api/ecw/channel'
...
@@ -59,6 +59,11 @@ import {getChannelList} from '@/api/ecw/channel'
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
openedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
openedRouterList
}
from
'
@/api/ecw/warehouse
'
export
default
{
export
default
{
props
:{
value
:
{
type
:
Array
}
},
data
(){
data
(){
return
{
return
{
transportTypeDicts
:
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
transportTypeDicts
:
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
...
@@ -72,6 +77,7 @@ export default {
...
@@ -72,6 +77,7 @@ export default {
selectedRoutes
:
[],
// 勾选的路线渠道
selectedRoutes
:
[],
// 勾选的路线渠道
hideMap
:
{},
// 折叠状态
hideMap
:
{},
// 折叠状态
checkAll
:
null
,
checkAll
:
null
,
}
}
},
},
computed
:{
computed
:{
...
@@ -96,7 +102,7 @@ export default {
...
@@ -96,7 +102,7 @@ export default {
if
(
router
.
transportType
==
item
.
value
){
if
(
router
.
transportType
==
item
.
value
){
routerList
.
push
(
Object
.
assign
({
routerList
.
push
(
Object
.
assign
({
_merge
:
item
.
cssClass
==
'
channel
'
?
this
.
availChannelList
.
length
||
1
:
1
,
_merge
:
item
.
cssClass
==
'
channel
'
?
this
.
availChannelList
.
length
||
1
:
1
,
channel
:
item
.
cssClass
==
'
channel
'
?
this
.
availChannelList
[
0
]
||
{
}
:
{
},
channel
:
item
.
cssClass
==
'
channel
'
?
this
.
availChannelList
[
0
]
||
{
channelId
:
0
}
:
{
channelId
:
0
},
},
router
)
},
router
)
)
)
// 字典的cssClass =channel则表示渠道相关(空运,海空联运)
// 字典的cssClass =channel则表示渠道相关(空运,海空联运)
...
@@ -160,6 +166,10 @@ export default {
...
@@ -160,6 +166,10 @@ export default {
this
.
tradeCityList
=
res
.
data
this
.
tradeCityList
=
res
.
data
})
})
this
.
getOpenedRouterList
()
this
.
getOpenedRouterList
()
if
(
this
.
value
&&
this
.
value
.
length
){
this
.
selectedRoutes
=
this
.
value
}
},
},
methods
:{
methods
:{
...
@@ -187,7 +197,7 @@ export default {
...
@@ -187,7 +197,7 @@ export default {
if
(
selected
){
if
(
selected
){
this
.
selectedRoutes
.
push
({
this
.
selectedRoutes
.
push
({
lineId
:
router
.
id
,
lineId
:
router
.
id
,
shippingC
hannelId
:
router
.
channel
.
channelId
c
hannelId
:
router
.
channel
.
channelId
})
})
}
else
{
}
else
{
let
index
=
this
.
getSelectedIndex
(
router
)
let
index
=
this
.
getSelectedIndex
(
router
)
...
@@ -199,7 +209,7 @@ export default {
...
@@ -199,7 +209,7 @@ export default {
},
},
getSelectedIndex
(
router
){
getSelectedIndex
(
router
){
return
this
.
selectedRoutes
.
findIndex
(
item
=>
{
return
this
.
selectedRoutes
.
findIndex
(
item
=>
{
return
item
.
lineId
==
router
.
id
&&
item
.
shippingC
hannelId
==
router
.
channel
.
channelId
return
item
.
lineId
==
router
.
id
&&
item
.
c
hannelId
==
router
.
channel
.
channelId
})
})
/* let index = null
/* let index = null
...
...
src/utils/dict.js
View file @
84b09b47
...
@@ -102,7 +102,7 @@ export const DICT_TYPE = {
...
@@ -102,7 +102,7 @@ export const DICT_TYPE = {
IS_DEFAULT
:
'
is_default
'
,
// 默认联系人
IS_DEFAULT
:
'
is_default
'
,
// 默认联系人
CUSTOMER_FOLLOW_TYPE
:
'
customer_follow_type
'
,
// 跟进类型
CUSTOMER_FOLLOW_TYPE
:
'
customer_follow_type
'
,
// 跟进类型
CUSTOMER_FOLLOW_METHOD
:
'
customer_follow_method
'
,
// 跟进方式
CUSTOMER_FOLLOW_METHOD
:
'
customer_follow_method
'
,
// 跟进方式
COMMISSION_PRODUCT_APPROVAL
:
'
commission_product_approval
'
,
//佣金备案
COMMISSION_PRODUCT_APPROVAL
:
'
commission_product_approval
'
,
//佣金备案
SHIPPING_DECLARATION_TYPE
:
'
shipping_declaration_type
'
,
//出货报关方式(与订单报关方式相同)
SHIPPING_DECLARATION_TYPE
:
'
shipping_declaration_type
'
,
//出货报关方式(与订单报关方式相同)
COMMISSION_TYPE
:
'
commission_type
'
,
//佣金类型
COMMISSION_TYPE
:
'
commission_type
'
,
//佣金类型
COMMISSION_DARK_TYPE
:
'
commission_dark_type
'
,
//暗涌类型
COMMISSION_DARK_TYPE
:
'
commission_dark_type
'
,
//暗涌类型
...
...
src/views/ecw/coupon/edit.vue
View file @
84b09b47
...
@@ -6,13 +6,13 @@
...
@@ -6,13 +6,13 @@
:type=
"DICT_TYPE.ECW_COUPON_TYPE"
:type=
"DICT_TYPE.ECW_COUPON_TYPE"
v-model.number=
"form.type"
v-model.number=
"form.type"
placeholder=
"请选择类型"
placeholder=
"请选择类型"
:disabled=
"!!form.couponId"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"标题中文"
prop=
"titleZh"
:rules=
'[
{required: true, message: "不能为空"}]'>
<el-form-item
label=
"标题中文"
prop=
"titleZh"
:rules=
'[
{required: true, message: "不能为空"}]'>
<el-input
<el-input
v-model=
"form.titleZh"
v-model=
"form.titleZh"
placeholder=
"请输入标题-中文"
placeholder=
"请输入标题-中文"
type=
"number"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"标题英文"
prop=
"titleEn"
:rules=
'[
{required: true, message: "不能为空"}]'>
<el-form-item
label=
"标题英文"
prop=
"titleEn"
:rules=
'[
{required: true, message: "不能为空"}]'>
...
@@ -44,25 +44,24 @@
...
@@ -44,25 +44,24 @@
<el-form-item
label=
"优惠券金额"
v-if=
"form.type == 1"
>
<el-form-item
label=
"优惠券金额"
v-if=
"form.type == 1"
>
<div
class=
"fee-item"
>
<div
class=
"fee-item"
>
<el-input
v-model=
"form.reduceAmount"
style=
"width:100px"
/>
<el-input
v-model=
"form.reduceAmount"
style=
"width:100px"
/>
<
S
elector
v-model=
"form.reduceCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-model=
"form.reduceCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span>
满
</span>
<span>
满
</span>
<el-input
type=
"number"
v-model=
"form.cashCondition"
style=
"width:100px"
/>
<el-input
type=
"number"
v-model=
"form.cashCondition"
style=
"width:100px"
/>
<span>
使用
</span>
<span>
使用
</span>
<span
style=
"color:red"
>
注意:留空则表示不受满金额限制
</span>
<span
style=
"color:red"
>
注意:留空则表示不受满金额限制
</span>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"*运费"
v-if=
"[2,3,4,5,6,7].indexOf(form.type) > -1"
>
<el-form-item
label=
"*运费"
v-if=
"[2,3,4,5,6,7].indexOf(form.type) > -1"
>
<div
class=
"fee-item"
v-for=
"(item, index) in f
reightFeeList
"
:key=
"index"
>
<div
class=
"fee-item"
v-for=
"(item, index) in f
ee[1]
"
:key=
"index"
>
<template
v-if=
"[1,2,3,4,5].indexOf(form.type) > -1"
>
<template
v-if=
"[1,2,3,4,5].indexOf(form.type) > -1"
>
满
满
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
:rules=
'[costType == 1 ?
{required: true, message: "请选择类型"} : null]'
/>
<!--
<el-select
v-model=
"item.fullCurrencyId"
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-option
v-for=
"item in currencyList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
-->
</el-select>
-->
<
S
elector
v-if=
"[2,4,5].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-if=
"[2,4,5].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
S
elector
v-if=
"form.type == 3"
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-if=
"form.type == 3"
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span
v-if=
"[2].indexOf(form.type) > -1"
>
减
</span>
<span
v-if=
"[2].indexOf(form.type) > -1"
>
减
</span>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
折扣率
</span>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
折扣率
</span>
...
@@ -71,37 +70,37 @@
...
@@ -71,37 +70,37 @@
<el-input
v-if=
"[2,3,4].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<el-input
v-if=
"[2,3,4].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<
Selector
v-if=
"[2,3].indexOf(form.type) > -1"
v-model=
"item.full
CurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
selector
v-if=
"[2,3].indexOf(form.type) > -1"
v-model=
"item.reduce
CurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
%
</span>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
%
</span>
</
template
>
</
template
>
<
template
v-if=
"form.type==7"
>
<
template
v-if=
"form.type==7"
>
>
<el-input
v-model=
"item.startAmount"
style=
"width:100px"
/>
>
<el-input
v-model=
"item.startAmount"
style=
"width:100px"
/>
≤
<el-input
v-model=
"item.endAmount"
style=
"width:100px"
/>
≤
<el-input
v-model=
"item.endAmount"
style=
"width:100px"
/>
<
S
elector
v-model=
"item.startAndEndCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-model=
"item.startAndEndCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
价格
价格
</
template
>
</
template
>
<el-input
v-if=
"[5,6,7].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.netReceiptsAmount"
style=
"width:100px"
/>
<el-input
v-if=
"[5,6,7].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.netReceiptsAmount"
style=
"width:100px"
/>
<
S
elector
v-if=
"[5,6,7].indexOf(form.type) > -1"
v-model=
"item.netReceiptsCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-if=
"[5,6,7].indexOf(form.type) > -1"
v-model=
"item.netReceiptsCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
template
v-if=
"form.type == 6"
>
<
template
v-if=
"form.type == 6"
>
/
/
<
S
elector
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
</
template
>
</
template
>
<el-button
class=
"el-icon-plus"
size=
"mini"
type=
"primary"
@
click=
"f
reightFeeList
.push({})"
/>
<el-button
class=
"el-icon-plus"
size=
"mini"
type=
"primary"
@
click=
"f
ee[1]
.push({})"
/>
<el-button
v-if=
"f
reightFeeList.length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"freightFeeList
.splice(index,1)"
/>
<el-button
v-if=
"f
ee[1].length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"fee[1]
.splice(index,1)"
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"清关费"
v-if=
"[2,3,4,5,6,7].indexOf(form.type) > -1"
>
<el-form-item
label=
"清关费"
v-if=
"[2,3,4,5,6,7].indexOf(form.type) > -1"
>
<div
class=
"fee-item"
v-for=
"(item, index) in
clearanceFeeList
"
:key=
"index"
>
<div
class=
"fee-item"
v-for=
"(item, index) in
fee[2]
"
:key=
"index"
>
<
template
v-if=
"[1,2,3,4,5].indexOf(form.type) > -1"
>
<
template
v-if=
"[1,2,3,4,5].indexOf(form.type) > -1"
>
满
满
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<
S
elector
v-if=
"[2,4,5].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-if=
"[2,4,5].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
S
elector
v-if=
"form.type == 3"
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-if=
"form.type == 3"
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span
v-if=
"[2].indexOf(form.type) > -1"
>
减
</span>
<span
v-if=
"[2].indexOf(form.type) > -1"
>
减
</span>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
折扣率
</span>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
折扣率
</span>
...
@@ -110,7 +109,7 @@
...
@@ -110,7 +109,7 @@
<el-input
v-if=
"[2,3,4].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<el-input
v-if=
"[2,3,4].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<
Selector
v-if=
"[2,3].indexOf(form.type) > -1"
v-model=
"item.full
CurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
selector
v-if=
"[2,3].indexOf(form.type) > -1"
v-model=
"item.reduce
CurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
%
</span>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
%
</span>
</
template
>
</
template
>
<
template
v-if=
"form.type==7"
>
<
template
v-if=
"form.type==7"
>
...
@@ -121,85 +120,33 @@
...
@@ -121,85 +120,33 @@
</
template
>
</
template
>
<el-input
v-if=
"[5,6,7].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.netReceiptsAmount"
style=
"width:100px"
/>
<el-input
v-if=
"[5,6,7].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.netReceiptsAmount"
style=
"width:100px"
/>
<
S
elector
v-if=
"[5,6,7].indexOf(form.type) > -1"
v-model=
"item.netReceiptsCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-if=
"[5,6,7].indexOf(form.type) > -1"
v-model=
"item.netReceiptsCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
template
v-if=
"form.type == 6"
>
<
template
v-if=
"form.type == 6"
>
/
/
<
S
elector
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
s
elector
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
</
template
>
</
template
>
<el-button
class=
"el-icon-plus"
size=
"mini"
type=
"primary"
@
click=
"f
reightFeeList
.push({})"
/>
<el-button
class=
"el-icon-plus"
size=
"mini"
type=
"primary"
@
click=
"f
ee[2]
.push({})"
/>
<el-button
v-if=
"f
reightFeeList.length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"freightFeeList
.splice(index,1)"
/>
<el-button
v-if=
"f
ee[2].length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"fee[2]
.splice(index,1)"
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"叠加优惠"
prop=
"discountDetailed"
>
<div
class=
"coupon-list"
>
<el-checkbox-group
v-model=
"couponIds"
>
<!-- <el-form-item label="使用条件(优惠卷专用)" prop="cashCondition">
<div
class=
"coupon-item"
v-for=
"item in availCouponList"
:key=
"item.couponId"
>
<el-input
<el-checkbox
:label=
"item.couponId"
>
{{item.titleZh}}
</el-checkbox>
v-model="form.cashCondition"
</div>
placeholder="请输入使用条件(优惠卷专用)"
</el-checkbox-group>
/>
<div
v-if=
"!availCouponList.length"
style=
"padding:50px"
>
</el-form-item>
暂无可用优惠券
<el-form-item label="减免金额(优惠卷专用)" prop="reduceAmount">
</div>
<el-input
</div>
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>
<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
<el-form-item
label=
"同类叠加"
label=
"同类
优惠不
叠加"
prop=
"isSimilarSuperposition"
prop=
"isSimilarSuperposition"
v-if=
"form.type != 1"
v-if=
"form.type != 1"
>
>
...
@@ -207,16 +154,17 @@
...
@@ -207,16 +154,17 @@
form-type=
"radio"
form-type=
"radio"
:type=
"DICT_TYPE.ECW_YESNO"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isSimilarSuperposition"
v-model=
"form.isSimilarSuperposition"
formatter=
"bool"
placeholder=
"请选择类型"
placeholder=
"请选择类型"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"可叠加优惠劵列表"
prop=
"couponIds"
v-if=
"form.type != 1"
>
<
!-- <
el-form-item label="可叠加优惠劵列表" prop="couponIds" v-if="form.type != 1">
<el-input
<el-input
v-model="form.couponIds"
v-model="form.couponIds"
placeholder="请输入可叠加优惠劵列表"
placeholder="请输入可叠加优惠劵列表"
/>
/>
</el-form-item>
</el-form-item>
-->
<el-form-item
<el-form-item
label=
"适用用户"
label=
"适用用户"
...
@@ -249,7 +197,7 @@
...
@@ -249,7 +197,7 @@
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_ORDER_ATTR"
v-model=
"form.orderAttr"
multiple
/>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_ORDER_ATTR"
v-model=
"form.orderAttr"
multiple
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否发送站内信"
prop=
"isSiteContent"
>
<el-form-item
label=
"是否发送站内信"
prop=
"isSiteContent"
>
<dict-selector
form
-type=
"radio"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isSiteContent
"
/>
<dict-selector
form
atter=
"bool"
form-type=
"radio"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isSiteContent"
:formater=
"Boolean
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"中文内容"
prop=
"contentZh"
:rules=
'[{required: true, message: "不能为空"}]'
>
<el-form-item
label=
"中文内容"
prop=
"contentZh"
:rules=
'[{required: true, message: "不能为空"}]'
>
<editor
v-model=
"form.contentZh"
:min-height=
"192"
/>
<editor
v-model=
"form.contentZh"
:min-height=
"192"
/>
...
@@ -278,62 +226,7 @@
...
@@ -278,62 +226,7 @@
>
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.documentDeclaration"
multiple
/>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.documentDeclaration"
multiple
/>
</el-form-item>
</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-form-item>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"$router.back()"
>
返 回
</el-button>
<el-button
@
click=
"$router.back()"
>
返 回
</el-button>
...
@@ -352,14 +245,14 @@ import {
...
@@ -352,14 +245,14 @@ import {
getCoupon
,
getCoupon
,
getCouponPage
,
getCouponPage
,
exportCouponExcel
,
exportCouponExcel
,
getCouponSelect
}
from
"
@/api/ecw/coupon
"
;
}
from
"
@/api/ecw/coupon
"
;
import
CustomersSelector
from
'
@/components/CustomersSelector
'
import
CustomersSelector
from
'
@/components/CustomersSelector
'
import
{
getDictData
}
from
'
@/utils/dict
'
import
{
getDictData
}
from
'
@/utils/dict
'
import
RoutersSelector
from
'
@/components/RoutersSelector
'
import
RoutersSelector
from
'
@/components/RoutersSelector
'
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
Editor
from
'
@/components/Editor
'
import
Editor
from
'
@/components/Editor
'
import
Selector
from
'
@/components/Selector
'
import
Selector
from
'
@/components/Selector/index
'
export
default
{
export
default
{
name
:
"
CouponEdit
"
,
name
:
"
CouponEdit
"
,
components
:
{
CustomersSelector
,
RoutersSelector
,
ProductsSelector
,
Editor
,
Selector
},
components
:
{
CustomersSelector
,
RoutersSelector
,
ProductsSelector
,
Editor
,
Selector
},
...
@@ -374,10 +267,17 @@ export default {
...
@@ -374,10 +267,17 @@ export default {
// 表单校验
// 表单校验
rules
:
{},
rules
:
{},
currencyList
:[],
currencyList
:[],
clearanceFeeList
:[{},{}],
/*
clearanceFeeList:[{},{}],
freightFeeList:[{},{}],
freightFeeList:[{},{}],
discountList
:[{}],
// 优惠券固定一条
discountList:[{}], // 优惠券固定一条 */
unitList
:[]
unitList
:[],
couponList
:
[],
// 优惠券列表
couponIds
:[],
fee
:{
1
:
[{},{}],
// 运费
2
:
[{},{}],
// 清关费
3
:
[{}]
// 优惠券专用
}
};
};
},
},
computed
:{
computed
:{
...
@@ -396,35 +296,26 @@ export default {
...
@@ -396,35 +296,26 @@ export default {
let
dict
=
getDictData
(
this
.
DICT_TYPE
.
ECW_SUITABLE_PROD_TYPE
,
this
.
form
.
suitableProdType
)
let
dict
=
getDictData
(
this
.
DICT_TYPE
.
ECW_SUITABLE_PROD_TYPE
,
this
.
form
.
suitableProdType
)
return
dict
&&
dict
.
cssClass
==
'
show-selector
'
return
dict
&&
dict
.
cssClass
==
'
show-selector
'
},
},
discountDetailedVOs
(){
availCouponList
(){
let
activeField
=
null
return
this
.
couponList
.
filter
(
item
=>
!
this
.
form
.
isSimilarSuperposition
||
item
.
type
!=
this
.
form
.
type
)
let
fields
=
[
'
clearanceFeeList
'
,
'
freightFeeList
'
]
},
fields
.
forEach
(
field
=>
{
costType
(){
this
[
field
].
forEach
(
feeItem
=>
{
// 优惠券
if
(
feeItem
.
reduceAmount
){
if
(
this
.
form
.
type
==
1
){
activeField
=
field
return
3
}
let
costType
=
null
for
(
let
type
in
this
.
fee
){
let
feeList
=
this
.
fee
[
type
]
feeList
.
forEach
(
item
=>
{
if
(
item
.
reduceAmount
){
costType
=
type
return
false
}
}
})
})
})
}
let
discountedList
=
activeField
?
this
[
activeField
]
:
[]
return
costType
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
}
},
},
watch
:{
watch
:{
'
form.type
'
(
val
){
'
form.type
'
(
val
){
...
@@ -432,18 +323,61 @@ export default {
...
@@ -432,18 +323,61 @@ export default {
if
((
val
==
3
||
val
==
6
)
&&
!
this
.
unitList
.
length
){
if
((
val
==
3
||
val
==
6
)
&&
!
this
.
unitList
.
length
){
this
.
getUnitList
()
this
.
getUnitList
()
}
}
}
// 非优惠券则查询优惠券列表
if
(
val
&&
val
!=
1
){
this
.
getCouponSelect
()
}
},
'
form.isSimilarSuperposition
'
(
val
){
if
(
val
){
let
keepIds
=
[]
this
.
couponIds
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
availCouponList
.
findIndex
(
coupon
=>
coupon
.
couponId
==
item
)
>
-
1
){
keepIds
.
push
(
item
)
}
})
this
.
couponIds
=
keepIds
}
}
},
},
created
()
{
created
()
{
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
getCoupon
(
this
.
$route
.
query
.
id
).
then
(
getCoupon
(
this
.
$route
.
query
.
id
).
then
((
res
)
=>
{
(
res
)
=>
(
this
.
form
=
res
.
data
)
this
.
form
=
res
.
data
if
(
this
.
form
.
couponIds
){
let
couponIds
=
this
.
form
.
couponIds
.
split
(
'
,
'
).
filter
(
item
=>
item
&&
item
!=
''
)
console
.
log
({
couponIds
})
this
.
$nextTick
(
res
=>
{
this
.
couponIds
=
couponIds
.
map
(
item
=>
parseInt
(
item
))
})
}
/* this.costType = this.form.costType */
if
(
this
.
form
.
discountDetailedVOs
){
/* this[['clearanceFeeList', 'freightFeeList', 'discountList'][]] */
this
.
fee
[
this
.
form
.
costType
]
=
this
.
form
.
discountDetailedVOs
}
if
(
this
.
costType
!=
this
.
form
.
costType
){
console
.
error
(
`费用类型冲突,计算出来的类型为
${
this
.
costType
}
,接口费用类型为
${
res
.
data
.
costType
}
,类型为
${
res
.
data
.
type
}
`
)
this
.
$alert
(
'
费用类型冲突
'
)
}
// 非优惠券需要查询出优惠券作为叠加备选
if
(
this
.
form
.
type
!=
1
){
this
.
getCouponSelect
()
}
}
);
);
}
}
this
.
reset
()
this
.
reset
()
},
},
methods
:
{
methods
:
{
getCouponSelect
(){
getCouponSelect
().
then
(
res
=>
{
this
.
couponList
=
res
.
data
})
},
getUnitList
(){
getUnitList
(){
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
},
},
...
@@ -489,11 +423,21 @@ export default {
...
@@ -489,11 +423,21 @@ export default {
if
(
!
valid
)
{
if
(
!
valid
)
{
return
;
return
;
}
}
let
data
=
Object
.
assign
({},
this
.
form
,
{
discountDetailedVOs
:
this
.
discountDetailedVOs
})
if
(
!
this
.
costType
){
return
this
.
$message
(
'
暂无费用设置
'
)
}
let
data
=
Object
.
assign
({},
this
.
form
,
{
discountDetailedVOs
:
this
.
fee
[
this
.
costType
]})
// 开始时间必填
// 开始时间必填
if
(
!
data
.
startTime
)
data
.
startTime
=
'
2022-01-01 00:00:00
'
if
(
!
data
.
startTime
)
data
.
startTime
=
'
2022-01-01 00:00:00
'
// status必填
// status必填
data
.
status
=
0
data
.
status
=
0
data
.
couponIds
=
this
.
couponIds
.
join
(
'
,
'
)
// 费用类型 1 运输费 2 清关费 3 总费用(优惠卷专用)
if
(
this
.
form
.
type
==
1
){
data
.
costType
=
3
}
// 修改的提交
// 修改的提交
if
(
data
.
couponId
!=
null
)
{
if
(
data
.
couponId
!=
null
)
{
updateCoupon
(
data
).
then
((
response
)
=>
{
updateCoupon
(
data
).
then
((
response
)
=>
{
...
@@ -519,4 +463,10 @@ export default {
...
@@ -519,4 +463,10 @@ export default {
margin-right
:
5px
;
margin-right
:
5px
;
}
}
}
}
.coupon-list
{
max-height
:
200px
;
border
:
1px
solid
#ccc
;
padding
:
10px
;
overflow-y
:
auto
;
}
</
style
>
</
style
>
\ No newline at end of file
src/views/ecw/coupon/index.vue
View file @
84b09b47
...
@@ -128,44 +128,27 @@
...
@@ -128,44 +128,27 @@
<el-table-column
label=
"优惠券ID"
align=
"center"
prop=
"couponId"
/>
<el-table-column
label=
"优惠券ID"
align=
"center"
prop=
"couponId"
/>
<el-table-column
label=
"类型"
align=
"center"
prop=
"type"
>
<el-table-column
label=
"类型"
align=
"center"
prop=
"type"
>
<template
slot-scope=
"
{row}">
<template
slot-scope=
"
{row}">
<dict-tag
:type=
"DICT_TYPE.COUPON_TYPE"
:value=
"row.type"
/>
<dict-tag
:type=
"DICT_TYPE.
ECW_
COUPON_TYPE"
:value=
"row.type"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<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=
"startTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-table-column
label=
"使用条件(优惠卷专用)"
align=
"center"
prop=
"cashCondition"
/>
<div>
{{
scope
.
row
.
creatorName
}}
</div>
<el-table-column
label=
"减免金额(优惠卷专用)"
align=
"center"
prop=
"reduceAmount"
/>
<div>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</div>
<el-table-column
label=
"条件货币ID"
align=
"center"
prop=
"conditionCurrencyId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"开始时间"
align=
"center"
prop=
"startTime"
width=
"180"
>
<el-table-column
label=
"开始时间"
align=
"center"
prop=
"startTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
startTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
startTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"减免货币ID"
align=
"center"
prop=
"reduceCurrencyId"
/>
<el-table-column
label=
"结束时间"
align=
"center"
prop=
"endTime"
width=
"180"
>
<el-table-column
label=
"结束时间"
align=
"center"
prop=
"endTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
endTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
endTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</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"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
...
...
src/views/ecw/offer/edit.vue
0 → 100644
View file @
84b09b47
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-card>
<div
slot=
"header"
class=
"card-title"
>
新建报价单
</div>
<el-form-item
label=
"所属人"
prop=
"number"
>
<el-radio-group
v-model=
"form.type"
>
<el-radio
label=
"1"
>
发件人
</el-radio>
<el-radio
label=
"1"
>
收件人
</el-radio>
</el-radio-group>
</el-form-item>
<el-descriptions
:column=
"3"
:size=
"size"
border
>
<el-descriptions-item
label=
"发货人"
>
<el-input
v-model=
"form.a"
placeholder=
""
></el-input>
</el-descriptions-item>
<el-descriptions-item
label=
"发货人"
>
李东升
</el-descriptions-item>
<el-descriptions-item
label=
"手机号"
>
13800138000
</el-descriptions-item>
<el-descriptions-item
label=
"发货人公司"
>
13800138000
</el-descriptions-item>
<el-descriptions-item
label=
"客户来源"
>
谷歌
</el-descriptions-item>
<el-descriptions-item
label=
"社交软件"
>
facebook
</el-descriptions-item>
<el-descriptions-item
label=
"联系地址"
>
facebook
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"3"
:size=
"size"
border
>
<el-descriptions-item
label=
"收货人"
>
<el-input
v-model=
"form.a"
placeholder=
""
></el-input>
</el-descriptions-item>
<el-descriptions-item
label=
"收货人"
>
李东升
</el-descriptions-item>
<el-descriptions-item
label=
"手机号"
>
13800138000
</el-descriptions-item>
<el-descriptions-item
label=
"收货人公司"
>
13800138000
</el-descriptions-item>
<el-descriptions-item
label=
"客户来源"
>
谷歌
</el-descriptions-item>
<el-descriptions-item
label=
"社交软件"
>
facebook
</el-descriptions-item>
<el-descriptions-item
label=
"联系地址"
>
facebook
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"3"
:size=
"size"
border
>
<el-descriptions-item
label=
"始发城市"
>
<el-input
v-model=
"form.a"
placeholder=
""
></el-input>
</el-descriptions-item>
<el-descriptions-item
label=
"目的城市"
>
<el-input
v-model=
"form.a"
placeholder=
""
></el-input>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card
class=
"mt-10"
>
<div
slot=
"header"
class=
"card-title"
>
<div
class=
"card-name"
>
商品信息
</div>
<el-button
type=
"primary"
size=
"mini"
icon=
"el-icon-plus"
@
click=
"productList.push(
{})">
</el-button>
</div>
<el-table
:data=
"productList"
border
>
<el-table-column
label=
"序号"
>
<template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
</el-table>
</el-card>
<el-form-item
label=
"报价单号"
prop=
"number"
>
<el-input
v-model=
"form.number"
placeholder=
"请输入报价单号"
/>
</el-form-item>
<el-form-item
label=
"订单ids"
prop=
"orderIds"
>
<el-input
v-model=
"form.orderIds"
placeholder=
"请输入订单ids"
/>
</el-form-item>
<el-form-item
label=
"订单编号"
prop=
"orderNo"
>
<el-input
v-model=
"form.orderNo"
placeholder=
"请输入订单编号"
/>
</el-form-item>
<el-form-item
label=
"客户id,发货人"
prop=
"consignorId"
>
<el-input
v-model=
"form.consignorId"
placeholder=
"请输入客户id,发货人"
/>
</el-form-item>
<el-form-item
label=
"收货人id"
prop=
"consigneeId"
>
<el-input
v-model=
"form.consigneeId"
placeholder=
"请输入收货人id"
/>
</el-form-item>
<el-form-item
label=
"唛头"
prop=
"marks"
>
<el-input
v-model=
"form.marks"
placeholder=
"请输入唛头"
/>
</el-form-item>
<el-form-item
label=
"报关类别:我司全代:1,自单代报:2,混合报关:3"
prop=
"customsType"
>
<el-select
v-model=
"form.customsType"
placeholder=
"请选择报关类别:我司全代:1,自单代报:2,混合报关:3"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"departureId"
>
<el-input
v-model=
"form.departureId"
placeholder=
"请输入始发地"
/>
</el-form-item>
<el-form-item
label=
"始发地信息"
prop=
"departure"
>
<el-input
v-model=
"form.departure"
placeholder=
"请输入始发地信息"
/>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"objectiveId"
>
<el-input
v-model=
"form.objectiveId"
placeholder=
"请输入目的地"
/>
</el-form-item>
<el-form-item
label=
"目的地信息"
prop=
"objective"
>
<el-input
v-model=
"form.objective"
placeholder=
"请输入目的地信息"
/>
</el-form-item>
<el-form-item
label=
"预计结束时间"
prop=
"stopTime"
>
<el-date-picker
clearable
v-model=
"form.stopTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择预计结束时间"
/>
</el-form-item>
<el-form-item
label=
"控货"
prop=
"control"
>
<el-radio-group
v-model=
"form.control"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"竞争对手"
prop=
"competitor"
>
<el-input
v-model=
"form.competitor"
placeholder=
"请输入竞争对手"
/>
</el-form-item>
<el-form-item
label=
"重要程度"
prop=
"importance"
>
<el-input
v-model=
"form.importance"
placeholder=
"请输入重要程度"
/>
</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=
"价格有效期结束"
prop=
"endTime"
>
<el-date-picker
clearable
v-model=
"form.endTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择价格有效期结束"
/>
</el-form-item>
<el-form-item
label=
"交货方式:FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)"
prop=
"tradeType"
>
<el-select
v-model=
"form.tradeType"
placeholder=
"请选择交货方式:FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"交货港口、地点"
prop=
"tradeAdress"
>
<el-input
v-model=
"form.tradeAdress"
placeholder=
"请输入交货港口、地点"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-form-item>
<el-form-item
label=
"状态:取消报价:0,特价审批中:1,需求确认:2跟进中:3,赢单:4,输单:5,报价完成:6"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"取消报价前状态"
prop=
"oldStatus"
>
<el-radio-group
v-model=
"form.oldStatus"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"报价关联客户,发货人:1,收货人:2"
prop=
"relation"
>
<el-input
v-model=
"form.relation"
placeholder=
"请输入报价关联客户,发货人:1,收货人:2"
/>
</el-form-item>
<el-form-item
label=
"报价关联客户id"
prop=
"relationId"
>
<el-input
v-model=
"form.relationId"
placeholder=
"请输入报价关联客户id"
/>
</el-form-item>
<el-form-item
label=
"佣金类型:0 无 1 明佣 2 暗佣 3 明+暗 "
prop=
"commissionType"
>
<el-select
v-model=
"form.commissionType"
placeholder=
"请选择佣金类型:0 无 1 明佣 2 暗佣 3 明+暗 "
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"入仓类型类型"
prop=
"warehousingType"
>
<el-select
v-model=
"form.warehousingType"
placeholder=
"请选择入仓类型类型"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"原因"
prop=
"reason"
>
<el-input
v-model=
"form.reason"
placeholder=
"请输入原因"
/>
</el-form-item>
<el-form-item
label=
"预计费用清单"
prop=
"estCost"
>
<el-input
v-model=
"form.estCost"
placeholder=
"请输入预计费用清单"
/>
</el-form-item>
<el-form-item
label=
"站内信状态,0未发送,1已发送"
prop=
"sendstatus"
>
<el-radio-group
v-model=
"form.sendstatus"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</el-form-item>
</el-form>
</div>
</template>
<
script
>
import
{
createOffer
,
updateOffer
,
deleteOffer
,
getOffer
,
getOfferPage
,
exportOfferExcel
}
from
"
@/api/ecw/offer
"
;
export
default
{
name
:
"
OfferEdit
"
,
components
:
{
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 是否显示弹出层
/* dateRangeStopTime: [],
dateRangeStartTime: [],
dateRangeEndTime: [],
dateRangeCreateTime: [], */
productList
:[],
// 商品信息
// 表单参数
form
:
{},
// 表单校验
rules
:
{
number
:
[{
required
:
true
,
message
:
"
报价单号不能为空
"
,
trigger
:
"
blur
"
}],
consignorId
:
[{
required
:
true
,
message
:
"
客户id,发货人不能为空
"
,
trigger
:
"
blur
"
}],
consigneeId
:
[{
required
:
true
,
message
:
"
收货人id不能为空
"
,
trigger
:
"
blur
"
}],
sendstatus
:
[{
required
:
true
,
message
:
"
站内信状态,0未发送,1已发送不能为空
"
,
trigger
:
"
blur
"
}],
}
};
},
created
()
{
},
methods
:
{
/** 表单重置 */
reset
()
{
this
.
form
=
{
offerId
:
undefined
,
number
:
undefined
,
orderIds
:
undefined
,
orderNo
:
undefined
,
consignorId
:
undefined
,
consigneeId
:
undefined
,
marks
:
undefined
,
customsType
:
undefined
,
departureId
:
undefined
,
departure
:
undefined
,
objectiveId
:
undefined
,
objective
:
undefined
,
stopTime
:
undefined
,
control
:
undefined
,
competitor
:
undefined
,
importance
:
undefined
,
startTime
:
undefined
,
endTime
:
undefined
,
tradeType
:
undefined
,
tradeAdress
:
undefined
,
remarks
:
undefined
,
status
:
undefined
,
oldStatus
:
undefined
,
relation
:
undefined
,
relationId
:
undefined
,
commissionType
:
undefined
,
warehousingType
:
undefined
,
reason
:
undefined
,
estCost
:
undefined
,
sendstatus
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
offerId
!=
null
)
{
updateOffer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createOffer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.card-title
{
font-size
:
18px
;
display
:
flex
;
.card-name
{
flex
:
1
;
}
}
.mt-10
{
margin-top
:
10px
;
}
</
style
>
\ No newline at end of file
src/views/ecw/offer/index.vue
0 → 100644
View file @
84b09b47
<
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=
"number"
>
<el-input
v-model=
"queryParams.number"
placeholder=
"请输入报价单号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"订单编号"
prop=
"orderNo"
>
<el-input
v-model=
"queryParams.orderNo"
placeholder=
"请输入订单编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</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:offer: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:offer: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=
"offerId"
/>
-->
<el-table-column
label=
"报价单号"
align=
"center"
prop=
"number"
/>
<!--
<el-table-column
label=
"订单ids"
align=
"center"
prop=
"orderIds"
/>
-->
<el-table-column
label=
"订单编号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"consignorId"
/>
<!--
<el-table-column
label=
"收货人id"
align=
"center"
prop=
"consigneeId"
/>
<el-table-column
label=
"唛头"
align=
"center"
prop=
"marks"
/>
<el-table-column
label=
"报关类别:我司全代:1,自单代报:2,混合报关:3"
align=
"center"
prop=
"customsType"
/>
<el-table-column
label=
"始发地"
align=
"center"
prop=
"departureId"
/>
<el-table-column
label=
"始发地信息"
align=
"center"
prop=
"departure"
/>
-->
<el-table-column
label=
"目的地"
align=
"center"
prop=
"objectiveId"
/>
<!--
<el-table-column
label=
"目的地信息"
align=
"center"
prop=
"objective"
/>
-->
<el-table-column
label=
"预计结束时间"
align=
"center"
prop=
"stopTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
stopTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"运输方式"
align=
"center"
prop=
"stopTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
stopTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"业务员"
align=
"center"
prop=
"stopTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
stopTime
)
}}
</span>
</
template
>
</el-table-column>
<!-- <el-table-column label="控货" align="center" prop="control" />
<el-table-column label="竞争对手" align="center" prop="competitor" />
<el-table-column label="重要程度" align="center" prop="importance" />
<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="价格有效期结束" align="center" prop="endTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime) }}</span>
</template>
</el-table-column>
<el-table-column label="交货方式:FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)" align="center" prop="tradeType" />
<el-table-column label="交货港口、地点" align="center" prop="tradeAdress" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="状态:取消报价:0,特价审批中:1,需求确认:2跟进中:3,赢单:4,输单:5,报价完成:6" align="center" prop="status" />
<el-table-column label="取消报价前状态" align="center" prop="oldStatus" />
<el-table-column label="报价关联客户,发货人:1,收货人:2" align="center" prop="relation" />
<el-table-column label="报价关联客户id" align="center" prop="relationId" />
<el-table-column label="佣金类型:0 无 1 明佣 2 暗佣 3 明+暗 " align="center" prop="commissionType" />
<el-table-column label="入仓类型类型" align="center" prop="warehousingType" />
<el-table-column label="原因" align="center" prop="reason" /> -->
<el-table-column
label=
"预计销售额"
align=
"center"
prop=
"estCost"
/>
<!-- <el-table-column label="站内信状态,0未发送,1已发送" align="center" prop="sendstatus" />
<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:offer:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:offer: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=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"报价单号"
prop=
"number"
>
<el-input
v-model=
"form.number"
placeholder=
"请输入报价单号"
/>
</el-form-item>
<el-form-item
label=
"订单ids"
prop=
"orderIds"
>
<el-input
v-model=
"form.orderIds"
placeholder=
"请输入订单ids"
/>
</el-form-item>
<el-form-item
label=
"订单编号"
prop=
"orderNo"
>
<el-input
v-model=
"form.orderNo"
placeholder=
"请输入订单编号"
/>
</el-form-item>
<el-form-item
label=
"客户id,发货人"
prop=
"consignorId"
>
<el-input
v-model=
"form.consignorId"
placeholder=
"请输入客户id,发货人"
/>
</el-form-item>
<el-form-item
label=
"收货人id"
prop=
"consigneeId"
>
<el-input
v-model=
"form.consigneeId"
placeholder=
"请输入收货人id"
/>
</el-form-item>
<el-form-item
label=
"唛头"
prop=
"marks"
>
<el-input
v-model=
"form.marks"
placeholder=
"请输入唛头"
/>
</el-form-item>
<el-form-item
label=
"报关类别:我司全代:1,自单代报:2,混合报关:3"
prop=
"customsType"
>
<el-select
v-model=
"form.customsType"
placeholder=
"请选择报关类别:我司全代:1,自单代报:2,混合报关:3"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"departureId"
>
<el-input
v-model=
"form.departureId"
placeholder=
"请输入始发地"
/>
</el-form-item>
<el-form-item
label=
"始发地信息"
prop=
"departure"
>
<el-input
v-model=
"form.departure"
placeholder=
"请输入始发地信息"
/>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"objectiveId"
>
<el-input
v-model=
"form.objectiveId"
placeholder=
"请输入目的地"
/>
</el-form-item>
<el-form-item
label=
"目的地信息"
prop=
"objective"
>
<el-input
v-model=
"form.objective"
placeholder=
"请输入目的地信息"
/>
</el-form-item>
<el-form-item
label=
"预计结束时间"
prop=
"stopTime"
>
<el-date-picker
clearable
v-model=
"form.stopTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择预计结束时间"
/>
</el-form-item>
<el-form-item
label=
"控货"
prop=
"control"
>
<el-radio-group
v-model=
"form.control"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"竞争对手"
prop=
"competitor"
>
<el-input
v-model=
"form.competitor"
placeholder=
"请输入竞争对手"
/>
</el-form-item>
<el-form-item
label=
"重要程度"
prop=
"importance"
>
<el-input
v-model=
"form.importance"
placeholder=
"请输入重要程度"
/>
</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=
"价格有效期结束"
prop=
"endTime"
>
<el-date-picker
clearable
v-model=
"form.endTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择价格有效期结束"
/>
</el-form-item>
<el-form-item
label=
"交货方式:FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)"
prop=
"tradeType"
>
<el-select
v-model=
"form.tradeType"
placeholder=
"请选择交货方式:FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"交货港口、地点"
prop=
"tradeAdress"
>
<el-input
v-model=
"form.tradeAdress"
placeholder=
"请输入交货港口、地点"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-form-item>
<el-form-item
label=
"状态:取消报价:0,特价审批中:1,需求确认:2跟进中:3,赢单:4,输单:5,报价完成:6"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"取消报价前状态"
prop=
"oldStatus"
>
<el-radio-group
v-model=
"form.oldStatus"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"报价关联客户,发货人:1,收货人:2"
prop=
"relation"
>
<el-input
v-model=
"form.relation"
placeholder=
"请输入报价关联客户,发货人:1,收货人:2"
/>
</el-form-item>
<el-form-item
label=
"报价关联客户id"
prop=
"relationId"
>
<el-input
v-model=
"form.relationId"
placeholder=
"请输入报价关联客户id"
/>
</el-form-item>
<el-form-item
label=
"佣金类型:0 无 1 明佣 2 暗佣 3 明+暗 "
prop=
"commissionType"
>
<el-select
v-model=
"form.commissionType"
placeholder=
"请选择佣金类型:0 无 1 明佣 2 暗佣 3 明+暗 "
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"入仓类型类型"
prop=
"warehousingType"
>
<el-select
v-model=
"form.warehousingType"
placeholder=
"请选择入仓类型类型"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"原因"
prop=
"reason"
>
<el-input
v-model=
"form.reason"
placeholder=
"请输入原因"
/>
</el-form-item>
<el-form-item
label=
"预计费用清单"
prop=
"estCost"
>
<el-input
v-model=
"form.estCost"
placeholder=
"请输入预计费用清单"
/>
</el-form-item>
<el-form-item
label=
"站内信状态,0未发送,1已发送"
prop=
"sendstatus"
>
<el-radio-group
v-model=
"form.sendstatus"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</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
{
createOffer
,
updateOffer
,
deleteOffer
,
getOffer
,
getOfferPage
,
exportOfferExcel
}
from
"
@/api/ecw/offer
"
;
export
default
{
name
:
"
Offer
"
,
components
:
{
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 报价单管理列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeStopTime
:
[],
dateRangeStartTime
:
[],
dateRangeEndTime
:
[],
dateRangeCreateTime
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
number
:
null
,
orderIds
:
null
,
orderNo
:
null
,
consignorId
:
null
,
consigneeId
:
null
,
marks
:
null
,
customsType
:
null
,
departureId
:
null
,
departure
:
null
,
objectiveId
:
null
,
objective
:
null
,
control
:
null
,
competitor
:
null
,
importance
:
null
,
tradeType
:
null
,
tradeAdress
:
null
,
remarks
:
null
,
status
:
null
,
oldStatus
:
null
,
relation
:
null
,
relationId
:
null
,
commissionType
:
null
,
warehousingType
:
null
,
reason
:
null
,
estCost
:
null
,
sendstatus
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
number
:
[{
required
:
true
,
message
:
"
报价单号不能为空
"
,
trigger
:
"
blur
"
}],
consignorId
:
[{
required
:
true
,
message
:
"
客户id,发货人不能为空
"
,
trigger
:
"
blur
"
}],
consigneeId
:
[{
required
:
true
,
message
:
"
收货人id不能为空
"
,
trigger
:
"
blur
"
}],
sendstatus
:
[{
required
:
true
,
message
:
"
站内信状态,0未发送,1已发送不能为空
"
,
trigger
:
"
blur
"
}],
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeStopTime
,
'
stopTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeStartTime
,
'
startTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeEndTime
,
'
endTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行查询
getOfferPage
(
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
=
{
offerId
:
undefined
,
number
:
undefined
,
orderIds
:
undefined
,
orderNo
:
undefined
,
consignorId
:
undefined
,
consigneeId
:
undefined
,
marks
:
undefined
,
customsType
:
undefined
,
departureId
:
undefined
,
departure
:
undefined
,
objectiveId
:
undefined
,
objective
:
undefined
,
stopTime
:
undefined
,
control
:
undefined
,
competitor
:
undefined
,
importance
:
undefined
,
startTime
:
undefined
,
endTime
:
undefined
,
tradeType
:
undefined
,
tradeAdress
:
undefined
,
remarks
:
undefined
,
status
:
undefined
,
oldStatus
:
undefined
,
relation
:
undefined
,
relationId
:
undefined
,
commissionType
:
undefined
,
warehousingType
:
undefined
,
reason
:
undefined
,
estCost
:
undefined
,
sendstatus
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeStopTime
=
[];
this
.
dateRangeStartTime
=
[];
this
.
dateRangeEndTime
=
[];
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
return
this
.
$router
.
push
(
'
edit
'
)
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加报价单管理
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
offerId
=
row
.
offerId
;
getOffer
(
offerId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改报价单管理
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
offerId
!=
null
)
{
updateOffer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createOffer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
offerId
=
row
.
offerId
;
this
.
$modal
.
confirm
(
'
是否确认删除报价单管理编号为"
'
+
offerId
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteOffer
(
offerId
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeStopTime
,
'
stopTime
'
);
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
exportOfferExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
\ No newline at end of file
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