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
2aa0dce4
Commit
2aa0dce4
authored
Jun 30, 2022
by
dcy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
f08cfb47
9f220cec
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
661 additions
and
154 deletions
+661
-154
customer.js
src/api/ecw/customer.js
+10
-1
offer.js
src/api/ecw/offer.js
+9
-0
region.js
src/api/ecw/region.js
+1
-1
index.vue
src/components/CustomerSelector/index.vue
+67
-0
index.vue
src/components/CustomersSelector/index.vue
+21
-3
index.vue
src/components/Selector/index.vue
+5
-4
dict.js
src/utils/dict.js
+5
-0
edit.vue
src/views/ecw/coupon/edit.vue
+2
-2
edit.vue
src/views/ecw/offer/edit.vue
+441
-142
result.vue
src/views/ecw/offer/result.vue
+99
-0
edit.vue
src/views/ecw/productPrice/edit.vue
+1
-1
No files found.
src/api/ecw/customer.js
View file @
2aa0dce4
...
...
@@ -43,7 +43,7 @@ export function getCustomerPage(query) {
})
}
// 获得客户下
来
// 获得客户下
拉
export
function
getCustomerSelect
(
query
)
{
return
request
({
url
:
'
/ecw/customer/select
'
,
...
...
@@ -52,6 +52,15 @@ export function getCustomerSelect(query) {
})
}
// 根据客户id集合获得客户详情列表
export
function
getCustomerList
(
query
)
{
return
request
({
url
:
'
/ecw/customer/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出客户 Excel
export
function
exportCustomerExcel
(
query
)
{
return
request
({
...
...
src/api/ecw/offer.js
View file @
2aa0dce4
...
...
@@ -52,3 +52,12 @@ export function exportOfferExcel(query) {
responseType
:
'
blob
'
})
}
// 更新报价单结果
export
function
updateOfferResult
(
data
)
{
return
request
({
url
:
'
/ecw/offer/update/result
'
,
method
:
'
put
'
,
data
:
data
})
}
\ No newline at end of file
src/api/ecw/region.js
View file @
2aa0dce4
...
...
@@ -93,7 +93,7 @@ export function getCityList(query) {
// 获得进出口城市
export
function
getTradeCityList
(
query
)
{
return
request
({
url
:
'
/ecw/region/getCityList
'
,
url
:
'
/ecw/region/get
Trade
CityList
'
,
method
:
'
get
'
,
params
:
query
})
...
...
src/components/CustomerSelector/index.vue
0 → 100644
View file @
2aa0dce4
<
template
>
<el-select
v-model=
"index"
filterable
clearable
remote
reserve-keyword
placeholder=
"请输入关键词"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<el-option
v-for=
"(item, index) in list"
:key=
"item.id"
:label=
"`$
{item.name}(${item.number})`"
:value="index">
</el-option>
</el-select>
</
template
>
<
script
>
import
{
getCustomerSelect
,
getCustomer
}
from
'
@/api/ecw/customer
'
export
default
{
props
:{
productType
:
[
String
,
Number
],
value
:
[
String
,
Number
]
},
data
(){
return
{
index
:
{},
list
:[],
loading
:
false
}
},
watch
:{
index
(
val
){
this
.
$emit
(
'
input
'
,
val
!==
null
?
this
.
list
[
val
].
id
:
null
)
this
.
$emit
(
'
change
'
,
val
!==
null
?
this
.
list
[
val
]
:
null
)
},
value
(
val
){
this
.
init
()
}
},
created
(){
this
.
init
()
},
methods
:{
init
(){
if
(
!
this
.
value
)
return
null
let
index
=
this
.
list
.
findIndex
(
item
=>
item
.
id
==
this
.
value
)
if
(
index
<
0
){
getCustomer
(
this
.
value
).
then
(
res
=>
{
this
.
list
.
unshift
(
res
.
data
)
this
.
index
=
0
})
}
},
remoteMethod
(
keyword
){
let
params
=
{}
params
.
searchKey
=
keyword
this
.
loading
=
true
getCustomerSelect
(
params
)
.
then
(
res
=>
this
.
list
=
res
.
data
)
.
finally
(()
=>
this
.
loading
=
false
)
}
}
}
</
script
>
\ No newline at end of file
src/components/CustomersSelector/index.vue
View file @
2aa0dce4
...
...
@@ -31,13 +31,14 @@
</el-row>
</
template
>
<
script
>
import
{
getCustomerSelect
}
from
'
@/api/ecw/customer
'
import
{
getCustomerSelect
,
getCustomerList
}
from
'
@/api/ecw/customer
'
export
default
{
props
:{
value
:
[
Array
]
},
data
(){
return
{
list
:[],
/* page: 1,
pages: 1, */
queryParams
:{
page
:
1
,
name
:
null
,
...
...
@@ -58,12 +59,29 @@ export default {
watch
:{
customerIds
(
val
){
this
.
$emit
(
'
input
'
,
val
)
},
value
(
val
,
old
){
if
(
val
.
sort
().
join
(
'
,
'
)
!=
old
.
sort
().
join
(
'
,
'
)){
this
.
getChoosedList
()
}
}
},
created
(){
if
(
this
.
value
&&
this
.
value
.
length
){
this
.
getChoosedList
()
}
this
.
reLoad
()
},
methods
:{
getChoosedList
(){
if
(
!
this
.
value
||
!
this
.
value
.
length
){
return
}
getCustomerList
({
ids
:
this
.
value
.
join
(
'
,
'
)})
.
then
(
res
=>
{
this
.
$set
(
this
,
'
choosedList
'
,
res
.
data
)
})
},
reLoad
(){
this
.
queryParams
.
page
=
1
this
.
list
=
[]
...
...
src/components/Selector/index.vue
View file @
2aa0dce4
<
template
>
<el-select
v-model=
"valueSync"
:multiple=
"multiple"
>
<el-select
v-model=
"valueSync"
:multiple=
"multiple"
:disabled=
"disabled"
>
<el-option
v-for=
"item in optionsFormated"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
...
...
@@ -14,7 +14,7 @@ export default {
options
:
Array
,
value
:
[
String
,
Number
,
Boolean
,
Object
],
labelField
:
{
type
:
String
,
type
:
[
String
,
Function
]
,
default
:
'
label
'
},
valueField
:
{
...
...
@@ -24,13 +24,14 @@ export default {
multiple
:
Boolean
,
clearable
:
Boolean
,
defaultable
:
Boolean
,
// 没有值的时候是否选择第一项
disabled
:
Boolean
},
computed
:{
optionsFormated
(){
let
arr
=
[]
this
.
options
.
forEach
(
item
=>
{
this
.
options
.
forEach
(
(
item
,
index
)
=>
{
arr
.
push
({
label
:
item
[
this
.
labelField
]
,
label
:
typeof
this
.
labelField
==
'
string
'
?
item
[
this
.
labelField
]
:
(
this
.
labelField
)(
item
,
index
)
,
value
:
item
[
this
.
valueField
]
})
})
...
...
src/utils/dict.js
View file @
2aa0dce4
...
...
@@ -86,6 +86,11 @@ export const DICT_TYPE = {
ECW_COOPERATION_TYPE
:
'
cooperation_type
'
,
// 合作类型
ECW_SHIPPING_DECLARATION_TYPE
:
'
shipping_declaration_type
'
,
// 出货报关方式(与订单报关方式相同)
ECW_CUSTOMS_TYPE
:
'
customs_type
'
,
// 订单报关方式(非出货报关),优惠券中的单证报关
ECW_PACKAGE_TYPE
:
'
packageType
'
,
// 包装单位
ECW_DOUBLE_CLEAR
:
'
double_clear
'
,
// 是否双清
ECW_TRADE_TYPE
:
'
trade_type
'
,
// 交货放肆
ECW_OFFER_RESULT
:
'
offer_result
'
,
// 报单结果 赢单 输单
ECW_WAREHOUSING_TYPE
:
'
warehousing_type
'
,
// 入仓类型
//--------ecw---------
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_SOURCE
:
'
customer_source
'
,
...
...
src/views/ecw/coupon/edit.vue
View file @
2aa0dce4
...
...
@@ -56,7 +56,7 @@
<div
class=
"fee-item"
v-for=
"(item, index) in fee[1]"
:key=
"index"
>
<template
v-if=
"[1,2,3,4,5].indexOf(form.type) > -1"
>
满
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
:rules=
'[costType == 1 ?
{required: true, message: "请选择类型"} : null]'
/>
<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>
-->
...
...
@@ -432,7 +432,7 @@ export default {
// status必填
data
.
status
=
0
data
.
couponIds
=
this
.
couponIds
.
join
(
'
,
'
)
// 费用类型 1 运输费 2 清关费 3 总费用(优惠卷专用)
if
(
this
.
form
.
type
==
1
){
data
.
costType
=
3
...
...
src/views/ecw/offer/edit.vue
View file @
2aa0dce4
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
8
0px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
12
0px"
>
<el-card>
<div
slot=
"header"
class=
"card-title"
>
新建报价单
</div>
<el-form-item
label=
"所属人"
prop=
"number"
>
<el-radio-group
v-model=
"form.
type
"
>
<el-form-item
label=
"所属人"
>
<el-radio-group
v-model=
"form.
relation
"
>
<el-radio
label=
"1"
>
发件人
</el-radio>
<el-radio
label=
"
1
"
>
收件人
</el-radio>
<el-radio
label=
"
2
"
>
收件人
</el-radio>
</el-radio-group>
</el-form-item>
<el-descriptions
:column=
"3"
:size=
"size"
border
>
<el-descriptions
:column=
"3"
border
>
<el-descriptions-item
label=
"发货人"
>
<el-input
v-model=
"form.a"
placeholder=
""
></el-input>
<customer-selector
v-model=
"form.consignorId"
@
change=
"consignor = $event"
/>
<!--
<el-input
v-model=
"form.consignorId"
placeholder=
""
></el-input>
-->
</el-descriptions-item>
<el-descriptions-item
label=
"发货人"
>
李东升
{{
consignor
.
name
||
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"手机号"
>
13800138000
{{
consignor
.
defaultContactPhone
||
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"发货人公司"
>
13800138000
{{
consignor
.
company
||
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"客户来源"
>
谷歌
{{
consignor
.
source
||
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"社交软件"
>
facebook
暂缺字段数据
</el-descriptions-item>
<el-descriptions-item
label=
"联系地址"
>
facebook
{{
consignor
.
address
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"3"
:size=
"size"
border
>
<el-descriptions
:column=
"3"
border
>
<el-descriptions-item
label=
"收货人"
>
<el-input
v-model=
"form.a"
placeholder=
""
></el-input>
<customer-selector
v-model=
"form.consigneeId"
@
change=
"consignee = $event"
/>
<!--
<el-input
v-model=
"form.consignorId"
placeholder=
""
></el-input>
-->
</el-descriptions-item>
<el-descriptions-item
label=
"收货人"
>
李东升
{{
consignee
.
name
||
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"手机号"
>
13800138000
{{
consignee
.
defaultContactPhone
||
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"收货人公司"
>
13800138000
{{
consignee
.
company
||
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"客户来源"
>
谷歌
{{
consignee
.
source
||
'
无
'
}}
</el-descriptions-item>
<el-descriptions-item
label=
"社交软件"
>
facebook
暂缺字段数据
</el-descriptions-item>
<el-descriptions-item
label=
"联系地址"
>
facebook
{{
consignee
.
address
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:column=
"3"
:size=
"size"
border
>
<el-descriptions
:column=
"3"
border
>
<el-descriptions-item
label=
"始发城市"
>
<el-input
v-model=
"form.a"
placeholder=
""
></el-input>
<el-select
v-model=
"form.departureId"
placeholder=
"请选择始发地"
>
<el-option
v-for=
"item in expoerCityList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item
label=
"目的城市"
>
<el-input
v-model=
"form.a"
placeholder=
""
></el-input>
<el-select
v-model=
"form.objectiveId"
placeholder=
"请选择始发地"
>
<el-option
v-for=
"item in importCityList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</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>
<el-button
type=
"primary"
size=
"mini"
icon=
"el-icon-plus"
@
click=
"productList.push(
{
prodAttrArr:[]
})">
</el-button>
</div>
<el-table
:data=
"productList"
border
>
<el-table-column
label=
"序号"
>
<el-table-column
label=
"序号"
width=
"60px"
fixed
>
<template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"中文名"
width=
"160px"
>
<
template
slot-scope=
"{row}"
>
<product-selector
v-model=
"row.prodtId"
@
change=
"row.goodsType = $event.typeId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"英文名"
width=
"160px"
>
<
template
slot-scope=
"{row}"
>
<product-selector
v-model=
"row.prodtId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"商品类型"
width=
"160px"
>
<
template
slot-scope=
"{row}"
>
<!--
<el-select
v-model=
"row.type"
placeholder=
"请选择类型"
>
</el-select>
-->
<selector
disabled
v-model=
"row.goodsType"
:options=
"productAttrList"
label-field=
"attrName"
value-field=
"id"
></selector>
</
template
>
</el-table-column>
<el-table-column
label=
"品牌"
width=
"100px"
>
<
template
slot-scope=
"{row}"
>
<el-select
v-model=
"row.brand"
placeholder=
"请选择"
>
<el-option
label=
"有"
:value=
"true"
></el-option>
<el-option
label=
"无"
:value=
"false"
></el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"件数"
width=
"90px"
>
<
template
slot-scope=
"{row}"
>
<el-input
v-model.number=
"row.num"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"包装单位"
>
<
template
slot-scope=
"{row}"
>
<dict-selector
v-model=
"row.unit"
:type=
"DICT_TYPE.ECW_PACKAGE_TYPE"
defaultable
/>
</
template
>
</el-table-column>
<el-table-column
label=
"箱规(m)"
width=
"120px"
>
<
template
slot-scope=
"{row}"
>
<el-input
v-model=
"row.boxGauge"
@
input=
"calcVolume(row)"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"总体积(m³)"
width=
"100px"
>
<
template
slot-scope=
"{row}"
>
<el-input
v-model=
"row.volume"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"总重量(kg)"
width=
"100px"
>
<
template
slot-scope=
"{row}"
>
<el-input
v-model=
"row.weight"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"货值(RMB)"
width=
"100px"
>
<
template
slot-scope=
"{row}"
>
<el-input
v-model=
"row.worth"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"商品特性"
width=
"250px"
>
<
template
slot-scope=
"{row}"
>
<el-checkbox-group
v-model=
"row.prodAttrArr"
>
<el-checkbox
v-for=
"item in productAttrList"
:label=
"item.id"
:key=
"item.id"
>
{{
item
.
attrName
}}
</el-checkbox>
</el-checkbox-group>
</
template
>
</el-table-column>
<el-table-column
label=
"运输方式"
width=
"150px"
>
<
template
slot-scope=
"{row}"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"row.transportId"
@
input=
"if(getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, $event).cssClass != 'channel') row.channelId = null"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"出货渠道"
width=
"150px"
>
<
template
slot-scope=
"{row}"
>
<selector
:disabled=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, row.transportId).cssClass != 'channel'"
v-model=
"row.channelId"
:options=
"channelList"
value-field=
"channelId"
label-field=
"nameZh"
></selector>
</
template
>
</el-table-column>
<el-table-column
label=
"线路"
width=
"200px"
>
<
template
slot-scope=
"{row}"
>
<selector
v-model=
"row.lineId"
:options=
"routerList"
:label-field=
"(item, index) => item.startTitleZh + ' >> ' + item.destTitleZh"
value-field=
"id"
></selector>
</
template
>
</el-table-column>
<el-table-column
label=
"运费"
>
<
template
slot-scope=
"{row}"
>
<el-input
v-model=
"row.type"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"180px"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"delProduct(scope.$index)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"showMorePrice($index)"
>
更多报价
</el-button>
</
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-card class="mt-10"> -->
<div
class=
"card-title"
style=
"padding:20px 0;"
>
费用小计
</div>
<el-descriptions
:column=
"4"
border
>
<el-descriptions-item
label=
"总件数"
>
</el-descriptions-item>
<el-descriptions-item
label=
"总体积"
>
</el-descriptions-item>
<el-descriptions-item
label=
"总重量"
>
</el-descriptions-item>
<el-descriptions-item
label=
"总货值"
>
</el-descriptions-item>
<el-descriptions-item
label=
"保价费"
>
</el-descriptions-item>
<el-descriptions-item
label=
"总运费"
>
</el-descriptions-item>
<el-descriptions-item
label=
"总清关费"
>
</el-descriptions-item>
<el-descriptions-item
label=
"预计费用"
>
</el-descriptions-item>
</el-descriptions>
</el-card>
<
template
v-for=
"(item, index) in enbedTransports"
>
<el-card
class=
"mt-10"
:key=
"index"
v-if=
"!item._disabled"
>
<div
class=
"card-title"
slot=
"header"
>
{{
item
.
label
}}
</div>
<el-form-item
v-for=
"(router, routerIndex) in item.routers"
:key=
"routerIndex"
:label=
"item.label.substr(0, 2) + '线路' + (routerIndex + 1)"
>
<el-col
:span=
"12"
>
{{
getRouterNameById
(
router
.
lineId
)
}}
</el-col>
<el-col
:span=
"12"
v-if=
"router.channelId"
>
出货渠道
{{
routerIndex
+
1
}}
:
{{
getChannelNameById
(
router
.
channelId
)
}}
</el-col>
</el-form-item>
<!--
<el-form-item
label=
"空运线路1"
>
<el-col
:span=
"12"
>
义务 > Alaba
</el-col>
<el-col
:span=
"12"
>
出货渠道1: 你猜
</el-col>
</el-form-item>
-->
<!--1海运拼柜 2海运整柜 3专线空运 4海空联运-->
<el-form-item
label=
"是否双清"
v-if=
"[2,3,4].indexOf(+item.transportId) > -1"
>
<dict-selector
v-model=
"item.doubleClear"
form-type=
"radio"
:type=
"DICT_TYPE.ECW_DOUBLE_CLEAR"
/>
</el-form-item>
<el-form-item
label=
"航空公司"
v-if=
"[3,4].indexOf(+item.transportId) > -1"
>
<el-select
placeholder=
""
v-model=
"item.airlineCompany"
>
</el-select>
</el-form-item>
<el-form-item
label=
"船公司"
v-if=
"[2].indexOf(+item.transportId) > -1"
>
<el-select
placeholder=
""
v-model=
"item.airlineCompany"
>
</el-select>
</el-form-item>
<el-form-item
label=
"清关证书"
v-if=
"[2,3,4].indexOf(+item.transportId) > -1"
>
<dict-selector
v-model=
"item.customsClearCert"
form-type=
"radio"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
/>
</el-form-item>
<el-form-item
label=
"清关证书备注"
v-if=
"[2,3,4].indexOf(+item.transportId) > -1"
>
<el-input
v-model=
"item.remarks"
></el-input>
</el-form-item>
<el-form-item
label=
"是否拆包"
v-if=
"[3,4].indexOf(+item.transportId) > -1"
>
<dict-selector
v-model=
"item.isUnpack"
form-type=
"radio"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
/>
</el-form-item>
<el-form-item
label=
"单票立刻转运"
v-if=
"[3,4].indexOf(+item.transportId) > -1"
>
<dict-selector
v-model=
"item.isSingleTicketTransport"
form-type=
"radio"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
/>
<span
style=
"margin-left:10px"
>
注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”
</span>
</el-form-item>
<el-form-item
label=
"包装类型"
v-if=
"[3,4].indexOf(+item.transportId) > -1"
>
<dict-selector
v-model=
"item.packageType"
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_PACKAGE_TYPE"
multiple
/>
</el-form-item>
<el-form-item
label=
"包装要求备注"
v-if=
"[3,4].indexOf(+item.transportId) > -1"
>
<el-input
v-model=
"item.packageRemarks"
></el-input>
</el-form-item>
</el-card>
</
template
>
<el-card
class=
"mt-10"
>
<div
class=
"card-title"
slot=
"header"
>
通用
</div>
<el-descriptions
:column=
"2"
border
>
<el-descriptions-item
label=
"唛头"
>
<el-input
v-model=
"form.marks"
placeholder=
""
></el-input>
</el-descriptions-item>
<el-descriptions-item
label=
"报关方式"
>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.customsType"
form-type=
"radio"
/>
</el-descriptions-item>
<el-descriptions-item
label=
"预计结束时间"
>
<el-date-picker
v-model=
"form.stopTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-descriptions-item>
<el-descriptions-item
label=
"是否控货"
>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
v-model=
"form.control"
form-type=
"radio"
/>
</el-descriptions-item>
<el-descriptions-item
label=
"竞争对手"
>
<el-input
v-model=
"form.competitor"
placeholder=
""
></el-input>
</el-descriptions-item>
<el-descriptions-item
label=
"重要程度"
>
<el-rate
v-model=
"form.importance"
></el-rate>
</el-descriptions-item>
<el-descriptions-item
label=
"价格有效时间"
>
<el-date-picker
v-model=
"form.startTime"
placeholder=
""
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
-
<el-date-picker
v-model=
"form.endTime"
placeholder=
""
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-descriptions-item>
<el-descriptions-item
label=
"交货方式"
>
<!--
接口要求数据为整数,所以增加trade_type类型的字典,用1234代码以下不同类型
FOB(离岸价),CIF(到岸价),CNF(成本加运费),EXW(出厂价)
-->
<dict-selector
:type=
"DICT_TYPE.ECW_TRADE_TYPE"
fomtter=
"number"
v-model=
"form.tradeType"
/>
<el-input
v-model=
"form.tradeAdress"
placeholder=
""
></el-input>
</el-descriptions-item>
<el-descriptions-item
label=
"总运费"
:span=
"2"
>
</el-descriptions-item>
<el-descriptions-item
label=
"总清关费"
:span=
"2"
>
</el-descriptions-item>
<el-descriptions-item
label=
"总价格"
:span=
"2"
>
</el-descriptions-item>
<el-descriptions-item
label=
"佣金类型"
:span=
"2"
>
<dict-selector
:type=
"DICT_TYPE.COMMISSION_TYPE"
form-type=
"radio"
fomtter=
"number"
v-model=
"form.commissionType"
defaultable
/>
</el-descriptions-item>
<el-descriptions-item
label=
"备注"
:span=
"2"
>
<el-input
v-model=
"form.remarks"
type=
"textarea"
placeholder=
""
></el-input>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-form-item
label=
""
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel
"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"$router.back()
"
>
取 消
</el-button>
</el-form-item>
</el-form>
</div>
...
...
@@ -194,10 +331,18 @@
<
script
>
import
{
createOffer
,
updateOffer
,
deleteOffer
,
getOffer
,
getOfferPage
,
exportOfferExcel
}
from
"
@/api/ecw/offer
"
;
import
ProductSelector
from
'
@/components/ProductSelector
'
import
{
getProductAttrList
}
from
'
@/api/ecw/productAttr
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
Selector
from
'
@/components/Selector
'
import
CustomerSelector
from
'
@/components/CustomerSelector
'
import
{
openedRouterList
as
getOpenedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
getDictData
}
from
'
@/utils/dict
'
export
default
{
name
:
"
OfferEdit
"
,
components
:
{
ProductSelector
,
Selector
,
CustomerSelector
},
data
()
{
return
{
...
...
@@ -208,23 +353,170 @@ export default {
dateRangeStartTime: [],
dateRangeEndTime: [],
dateRangeCreateTime: [], */
productList
:[],
// 商品信息
productList
:[{
prodAttrArr
:[]}],
// 商品信息
productAttrList
:[],
// 商品属性
channelList
:
[],
// 出货取到
routerList
:
[],
tradeCityList
:
[],
consignor
:
{},
// 发货人
consignee
:{},
// 收货人
transportList
:
[],
// 表单参数
form
:
{},
form
:
{
sendstatus
:
0
},
// 表单校验
rules
:
{
number
:
[{
required
:
true
,
message
:
"
报价单号不能为空
"
,
trigger
:
"
blur
"
}],
/*
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
"
}],
sendstatus: [{ required: true, message: "站内信状态,0未发送,1已发送不能为空", trigger: "blur" }],
*/
}
};
},
created
()
{
computed
:{
expoerCityList
(){
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
)
},
importCityList
(){
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
},
getDictData
(){
return
(
type
,
value
)
=>
getDictData
(
type
,
value
)
||
{}
},
// 被启用的货运方式
enbedTransports
(){
let
transports
=
[]
this
.
transportList
.
forEach
(
item
=>
{
let
disabled
=
true
let
lineIds
=
[]
let
channelIds
=
[]
let
routers
=
[]
this
.
productList
.
forEach
(
prod
=>
{
if
(
prod
.
offerTransportId
==
item
.
transportId
){
disabled
=
false
routers
.
push
({
lineId
:
prod
.
lineId
,
channelId
:
prod
.
channelId
})
if
(
prod
.
lineId
)
lineIds
.
push
(
prod
.
lineId
)
if
(
prod
.
channelId
)
channelIds
.
push
(
prod
.
channelId
)
}
})
if
(
!
disabled
){
item
.
_disabled
=
disabled
item
.
routers
=
routers
item
.
lineIds
=
lineIds
.
join
(
'
,
'
)
item
.
channelIds
=
channelIds
.
join
(
'
,
'
)
transports
.
push
(
item
)
}
})
return
transports
},
// 根据线路id显示线路名称
getRouterNameById
(){
return
routerId
=>
{
let
router
=
this
.
routerList
.
find
(
item
=>
item
.
id
==
routerId
)
console
.
log
({
router
})
if
(
router
){
return
router
.
startTitleZh
+
'
>
'
+
router
.
destTitleZh
}
return
'
-
'
}
},
// 根据渠道id显示渠道名
getChannelNameById
(){
return
channelId
=>
{
return
this
.
channelList
.
find
(
item
=>
item
.
channelId
==
channelId
)
?.
nameZh
}
}
},
watch
:{
// 始发地
'
form.departureId
'
(){
this
.
getOpenedRouterList
()
},
// 目的地
'
form.objectiveId
'
(){
this
.
getOpenedRouterList
()
},
// 产品有变动则需要更新运输方式
productList
(
val
){
console
.
log
(
'
productList
'
,
val
)
let
transports
=
{}
this
.
productList
.
forEach
(
item
=>
{
/* if(!transports[item.offerTransportId]){
transports[item.offerTransportId] = {
offerTransportId: item.offerTransportId,
routers: {}
}
}
if(transports[item.offerTransportId].routers[item.routerId]){
// transports[item.offerTransportId].routers[item.routerId] = item.
} */
})
},
// 所有选择的路线
selectedRouterList
(){
let
routes
=
[]
this
.
productList
.
forEach
(
item
=>
{
routes
.
push
({
router
:
item
.
router
,
channel
:
item
.
channel
})
})
return
routes
},
},
created
()
{
getProductAttrList
().
then
(
res
=>
this
.
productAttrList
=
res
.
data
)
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
getTradeCityList
().
then
(
res
=>
this
.
tradeCityList
=
res
.
data
)
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
).
forEach
(
res
=>
{
this
.
transportList
.
push
({
transportId
:
res
.
value
,
label
:
res
.
label
,
_disabled
:
true
// 默认禁用
})
})
},
methods
:
{
// 获取路线
getOpenedRouterList
(){
let
params
=
{}
if
(
this
.
form
.
departureId
){
params
.
startCityId
=
this
.
form
.
departureId
}
if
(
this
.
form
.
objectiveId
){
params
.
destCityId
=
this
.
form
.
objectiveId
}
getOpenedRouterList
(
params
).
then
(
res
=>
this
.
routerList
=
res
.
data
)
},
// 计算体积
calcVolume
(
row
){
if
(
!
row
.
boxGauge
||
!
row
.
num
)
return
false
try
{
row
.
volume
=
(
eval
(
row
.
boxGauge
)
*
row
.
num
).
toFixed
(
2
)
}
catch
(
e
){
row
.
volume
=
''
}
},
// 删除一条产品
delProduct
(
index
){
this
.
$confirm
(
'
确定删除此条内容么?
'
)
.
then
(
res
=>
{
this
.
productList
.
splice
(
index
,
1
)
})
},
// 显示更多报价
showMorePrice
(
index
){
console
.
log
(
'
显示更多报价
'
,
index
)
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
...
...
@@ -268,9 +560,16 @@ export default {
if
(
!
valid
)
{
return
;
}
let
data
=
Object
.
assign
({},
this
.
form
,
{
transportCreateReqVOList
:
this
.
enbedTransports
,
prodCreateReqVOList
:
this
.
productList
})
data
.
prodCreateReqVOList
.
map
(
item
=>
{
item
.
prodAttrIds
=
item
.
prodAttrArr
.
join
(
'
,
'
)
})
// 修改的提交
if
(
this
.
form
.
offerId
!=
null
)
{
updateOffer
(
this
.
form
).
then
(
response
=>
{
if
(
data
.
offerId
!=
null
)
{
updateOffer
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
...
...
@@ -278,7 +577,7 @@ export default {
return
;
}
// 添加的提交
createOffer
(
this
.
form
).
then
(
response
=>
{
createOffer
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
...
...
src/views/ecw/offer/result.vue
0 → 100644
View file @
2aa0dce4
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"报价单号"
prop=
"offerId"
>
<div>
{{
form
.
offerId
}}
</div>
</el-form-item>
<el-form-item
label=
"结果"
prop=
"result"
>
<dict-selector
form-type=
"radio"
:type=
"DICT_TYPE.ECW_OFFER_RESULT"
v-model=
"form.result"
/>
</el-form-item>
<template
v-if=
"form.result==1"
>
<el-form-item
label=
"入仓类型"
prop=
"warehousingType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_WAREHOUSING_TYPE"
v-model=
"form.warehousingType"
/>
</el-form-item>
<el-form-item
label=
"关联订单"
prop=
"orderIds"
>
<el-input
v-model=
"form.orderIds"
style=
"width: 206px;"
></el-input>
</el-form-item>
</
template
>
<
template
v-else
>
<el-form-item
label=
"原因"
prop=
"reason"
>
<el-input
style=
"width: 500px;"
type=
"textarea"
placeholder=
""
v-model=
"form.reason"
></el-input>
</el-form-item>
</
template
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{form.result==1?"确定并新增草稿订单":"提交"}}
</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
{
updateOfferResult
}
from
'
@/api/ecw/offer
'
;
import
CustomersSelector
from
'
@/components/CustomersSelector
'
import
RoutersSelector
from
'
@/components/RoutersSelector
'
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
Editor
from
'
@/components/Editor
'
import
Selector
from
'
@/components/Selector/index
'
export
default
{
name
:
"
AttrEdit
"
,
components
:
{
CustomersSelector
,
RoutersSelector
,
ProductsSelector
,
Editor
,
Selector
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 表单参数
form
:
{
"
offerId
"
:
undefined
,
"
orderIds
"
:
undefined
,
"
reason
"
:
undefined
,
"
result
"
:
1
,
"
warehousingType
"
:
undefined
},
// 表单校验
rules
:
{}
};
},
computed
:
{
},
watch
:
{
},
created
()
{
this
.
reset
()
},
methods
:
{
/** 表单重置 */
reset
()
{
this
.
form
=
{
"
offerId
"
:
undefined
,
"
orderIds
"
:
undefined
,
"
reason
"
:
undefined
,
"
result
"
:
1
,
"
warehousingType
"
:
undefined
};
this
.
resetForm
(
"
form
"
);
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
;
}
let
data
=
Object
.
assign
({},
this
.
form
)
updateOfferResult
(
data
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$router
.
back
();
});
});
},
},
};
</
script
>
\ No newline at end of file
src/views/ecw/productPrice/edit.vue
View file @
2aa0dce4
...
...
@@ -302,7 +302,7 @@ export default {
}
// 添加的提交
data
.
productId
=
this
.
product
.
id
;
data
.
lineChannelList
=
this
.
lineChannelList
data
.
lineChannelList
=
this
.
selectedRoutes
createProductPrice
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
请求成功
"
);
this
.
$router
.
replace
(
'
/product/product-price
'
)
...
...
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