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
e9ce7afa
Commit
e9ce7afa
authored
Jun 26, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报价单没搞完备份
parent
8b054d4a
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
308 additions
and
43 deletions
+308
-43
customer.js
src/api/ecw/customer.js
+10
-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
+1
-0
edit.vue
src/views/ecw/coupon/edit.vue
+2
-2
edit.vue
src/views/ecw/offer/edit.vue
+202
-33
No files found.
src/api/ecw/customer.js
View file @
e9ce7afa
...
@@ -43,7 +43,7 @@ export function getCustomerPage(query) {
...
@@ -43,7 +43,7 @@ export function getCustomerPage(query) {
})
})
}
}
// 获得客户下
来
// 获得客户下
拉
export
function
getCustomerSelect
(
query
)
{
export
function
getCustomerSelect
(
query
)
{
return
request
({
return
request
({
url
:
'
/ecw/customer/select
'
,
url
:
'
/ecw/customer/select
'
,
...
@@ -52,6 +52,15 @@ export function getCustomerSelect(query) {
...
@@ -52,6 +52,15 @@ export function getCustomerSelect(query) {
})
})
}
}
// 根据客户id集合获得客户详情列表
export
function
getCustomerList
(
query
)
{
return
request
({
url
:
'
/ecw/customer/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出客户 Excel
// 导出客户 Excel
export
function
exportCustomerExcel
(
query
)
{
export
function
exportCustomerExcel
(
query
)
{
return
request
({
return
request
({
...
...
src/components/CustomerSelector/index.vue
0 → 100644
View file @
e9ce7afa
<
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 @
e9ce7afa
...
@@ -31,13 +31,14 @@
...
@@ -31,13 +31,14 @@
</el-row>
</el-row>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getCustomerSelect
}
from
'
@/api/ecw/customer
'
import
{
getCustomerSelect
,
getCustomerList
}
from
'
@/api/ecw/customer
'
export
default
{
export
default
{
props
:{
value
:
[
Array
]
},
data
(){
data
(){
return
{
return
{
list
:[],
list
:[],
/* page: 1,
pages: 1, */
queryParams
:{
queryParams
:{
page
:
1
,
page
:
1
,
name
:
null
,
name
:
null
,
...
@@ -58,12 +59,29 @@ export default {
...
@@ -58,12 +59,29 @@ export default {
watch
:{
watch
:{
customerIds
(
val
){
customerIds
(
val
){
this
.
$emit
(
'
input
'
,
val
)
this
.
$emit
(
'
input
'
,
val
)
},
value
(
val
,
old
){
if
(
val
.
sort
().
join
(
'
,
'
)
!=
old
.
sort
().
join
(
'
,
'
)){
this
.
getChoosedList
()
}
}
}
},
},
created
(){
created
(){
if
(
this
.
value
&&
this
.
value
.
length
){
this
.
getChoosedList
()
}
this
.
reLoad
()
this
.
reLoad
()
},
},
methods
:{
methods
:{
getChoosedList
(){
if
(
!
this
.
value
||
!
this
.
value
.
length
){
return
}
getCustomerList
({
ids
:
this
.
value
.
join
(
'
,
'
)})
.
then
(
res
=>
{
this
.
$set
(
this
,
'
choosedList
'
,
res
.
data
)
})
},
reLoad
(){
reLoad
(){
this
.
queryParams
.
page
=
1
this
.
queryParams
.
page
=
1
this
.
list
=
[]
this
.
list
=
[]
...
...
src/components/Selector/index.vue
View file @
e9ce7afa
<
template
>
<
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-option
v-for=
"item in optionsFormated"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-select>
</
template
>
</
template
>
...
@@ -14,7 +14,7 @@ export default {
...
@@ -14,7 +14,7 @@ export default {
options
:
Array
,
options
:
Array
,
value
:
[
String
,
Number
,
Boolean
,
Object
],
value
:
[
String
,
Number
,
Boolean
,
Object
],
labelField
:
{
labelField
:
{
type
:
String
,
type
:
[
String
,
Function
]
,
default
:
'
label
'
default
:
'
label
'
},
},
valueField
:
{
valueField
:
{
...
@@ -24,13 +24,14 @@ export default {
...
@@ -24,13 +24,14 @@ export default {
multiple
:
Boolean
,
multiple
:
Boolean
,
clearable
:
Boolean
,
clearable
:
Boolean
,
defaultable
:
Boolean
,
// 没有值的时候是否选择第一项
defaultable
:
Boolean
,
// 没有值的时候是否选择第一项
disabled
:
Boolean
},
},
computed
:{
computed
:{
optionsFormated
(){
optionsFormated
(){
let
arr
=
[]
let
arr
=
[]
this
.
options
.
forEach
(
item
=>
{
this
.
options
.
forEach
(
(
item
,
index
)
=>
{
arr
.
push
({
arr
.
push
({
label
:
item
[
this
.
labelField
]
,
label
:
typeof
this
.
labelField
==
'
string
'
?
item
[
this
.
labelField
]
:
(
this
.
labelField
)(
item
,
index
)
,
value
:
item
[
this
.
valueField
]
value
:
item
[
this
.
valueField
]
})
})
})
})
...
...
src/utils/dict.js
View file @
e9ce7afa
...
@@ -82,6 +82,7 @@ export const DICT_TYPE = {
...
@@ -82,6 +82,7 @@ export const DICT_TYPE = {
ECW_COOPERATION_TYPE
:
'
cooperation_type
'
,
// 合作类型
ECW_COOPERATION_TYPE
:
'
cooperation_type
'
,
// 合作类型
ECW_SHIPPING_DECLARATION_TYPE
:
'
shipping_declaration_type
'
,
// 出货报关方式(与订单报关方式相同)
ECW_SHIPPING_DECLARATION_TYPE
:
'
shipping_declaration_type
'
,
// 出货报关方式(与订单报关方式相同)
ECW_CUSTOMS_TYPE
:
'
customs_type
'
,
// 订单报关方式(非出货报关),优惠券中的单证报关
ECW_CUSTOMS_TYPE
:
'
customs_type
'
,
// 订单报关方式(非出货报关),优惠券中的单证报关
ECW_PACKAGE_TYPE
:
'
packageType
'
,
//--------ecw---------
//--------ecw---------
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_SOURCE
:
'
customer_source
'
,
CUSTOMER_SOURCE
:
'
customer_source
'
,
...
...
src/views/ecw/coupon/edit.vue
View file @
e9ce7afa
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<div
class=
"fee-item"
v-for=
"(item, index) in fee[1]"
:key=
"index"
>
<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"
>
<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-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>
-->
...
...
src/views/ecw/offer/edit.vue
View file @
e9ce7afa
...
@@ -5,83 +5,185 @@
...
@@ -5,83 +5,185 @@
<el-card>
<el-card>
<div
slot=
"header"
class=
"card-title"
>
新建报价单
</div>
<div
slot=
"header"
class=
"card-title"
>
新建报价单
</div>
<el-form-item
label=
"所属人"
prop=
"number"
>
<el-form-item
label=
"所属人"
prop=
"number"
>
<el-radio-group
v-model=
"form.
type
"
>
<el-radio-group
v-model=
"form.
relation
"
>
<el-radio
label=
"1"
>
发件人
</el-radio>
<el-radio
label=
"1"
>
发件人
</el-radio>
<el-radio
label=
"
1
"
>
收件人
</el-radio>
<el-radio
label=
"
2
"
>
收件人
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-descriptions
:column=
"3"
:size=
"size"
border
>
<el-descriptions
:column=
"3"
border
>
<el-descriptions-item
label=
"发货人"
>
<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>
<el-descriptions-item
label=
"发货人"
>
<el-descriptions-item
label=
"发货人"
>
李东升
{{
consignor
.
name
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"手机号"
>
<el-descriptions-item
label=
"手机号"
>
13800138000
{{
consignor
.
defaultContactPhone
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"发货人公司"
>
<el-descriptions-item
label=
"发货人公司"
>
13800138000
{{
consignor
.
company
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"客户来源"
>
<el-descriptions-item
label=
"客户来源"
>
谷歌
{{
consignor
.
source
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"社交软件"
>
<el-descriptions-item
label=
"社交软件"
>
facebook
暂缺字段数据
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"联系地址"
>
<el-descriptions-item
label=
"联系地址"
>
facebook
{{
consignor
.
address
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
</el-descriptions>
</el-descriptions>
<el-descriptions
:column=
"3"
:size=
"size"
border
>
<el-descriptions
:column=
"3"
border
>
<el-descriptions-item
label=
"收货人"
>
<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>
<el-descriptions-item
label=
"收货人"
>
<el-descriptions-item
label=
"收货人"
>
李东升
{{
consignee
.
name
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"手机号"
>
<el-descriptions-item
label=
"手机号"
>
13800138000
{{
consignee
.
defaultContactPhone
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"收货人公司"
>
<el-descriptions-item
label=
"收货人公司"
>
13800138000
{{
consignee
.
company
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"客户来源"
>
<el-descriptions-item
label=
"客户来源"
>
谷歌
{{
consignee
.
source
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"社交软件"
>
<el-descriptions-item
label=
"社交软件"
>
facebook
暂缺字段数据
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"联系地址"
>
<el-descriptions-item
label=
"联系地址"
>
facebook
{{
consignee
.
address
||
'
无
'
}}
</el-descriptions-item>
</el-descriptions-item>
</el-descriptions>
</el-descriptions>
<el-descriptions
:column=
"3"
:size=
"size"
border
>
<el-descriptions
:column=
"3"
border
>
<el-descriptions-item
label=
"始发城市"
>
<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>
<el-descriptions-item
label=
"目的城市"
>
<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-item>
</el-descriptions>
</el-descriptions>
</el-card>
</el-card>
<el-card
class=
"mt-10"
>
<el-card
class=
"mt-10"
>
<div
slot=
"header"
class=
"card-title"
>
<div
slot=
"header"
class=
"card-title"
>
<div
class=
"card-name"
>
商品信息
</div>
<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(
{
prodAttrIds:[]
})">
</el-button>
</div>
</div>
<el-table
:data=
"productList"
border
>
<el-table
:data=
"productList"
border
>
<el-table-column
label=
"序号"
>
<el-table-column
label=
"序号"
width=
"60px"
fixed
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
{{
scope
.
$index
+
1
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"中文名"
width=
"160px"
>
<
template
slot-scope=
"{row}"
>
<product-selector
v-model=
"row.productId"
@
change=
"row.goodsType = $event.typeId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"英文名"
width=
"160px"
>
<
template
slot-scope=
"{row}"
>
<product-selector
v-model=
"row.productId"
/>
</
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=
"true"
></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.prodAttrIds"
>
<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.offerTransportId"
@
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.offerTransportId).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=
"200px"
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-table>
</el-card>
</el-card>
<el-form-item
label=
"报价单号"
prop=
"number"
>
<
!-- <
el-form-item label="报价单号" prop="number">
<el-input v-model="form.number" placeholder="请输入报价单号" />
<el-input v-model="form.number" placeholder="请输入报价单号" />
</el-form-item>
</el-form-item>
<el-form-item label="订单ids" prop="orderIds">
<el-form-item label="订单ids" prop="orderIds">
...
@@ -183,10 +285,10 @@
...
@@ -183,10 +285,10 @@
<el-radio-group v-model="form.sendstatus">
<el-radio-group v-model="form.sendstatus">
<el-radio label="1">请选择字典生成</el-radio>
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
""
>
<el-form-item
label=
""
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel
"
>
取 消
</el-button>
<el-button
@
click=
"$router.back()
"
>
取 消
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -194,10 +296,18 @@
...
@@ -194,10 +296,18 @@
<
script
>
<
script
>
import
{
createOffer
,
updateOffer
,
deleteOffer
,
getOffer
,
getOfferPage
,
exportOfferExcel
}
from
"
@/api/ecw/offer
"
;
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
{
export
default
{
name
:
"
OfferEdit
"
,
name
:
"
OfferEdit
"
,
components
:
{
components
:
{
ProductSelector
,
Selector
,
CustomerSelector
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -208,7 +318,13 @@ export default {
...
@@ -208,7 +318,13 @@ export default {
dateRangeStartTime: [],
dateRangeStartTime: [],
dateRangeEndTime: [],
dateRangeEndTime: [],
dateRangeCreateTime: [], */
dateRangeCreateTime: [], */
productList
:[],
// 商品信息
productList
:[{
prodAttrIds
:[]}],
// 商品信息
productAttrList
:[],
// 商品属性
channelList
:
[],
// 出货取到
routerList
:
[],
tradeCityList
:
[],
consignor
:
{},
consignee
:{},
// 表单参数
// 表单参数
form
:
{},
form
:
{},
// 表单校验
// 表单校验
...
@@ -220,11 +336,64 @@ export default {
...
@@ -220,11 +336,64 @@ export default {
}
}
};
};
},
},
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
)
||
{}
}
},
watch
:{
// 始发地
'
form.departureId
'
(){
this
.
getOpenedRouterList
()
},
// 目的地
'
form.objectiveId
'
(){
this
.
getOpenedRouterList
()
}
},
created
()
{
created
()
{
getProductAttrList
().
then
(
res
=>
this
.
productAttrList
=
res
.
data
)
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
getTradeCityList
().
then
(
res
=>
this
.
tradeCityList
=
res
.
data
)
},
},
methods
:
{
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
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
...
...
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