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
b503e130
Commit
b503e130
authored
Jun 17, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-13-5提交
parent
8e1184b4
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2858 additions
and
1114 deletions
+2858
-1114
follow.js
src/api/ecw/follow.js
+63
-0
index.vue
src/views/ecw/customer/index.vue
+1
-4
create.vue
src/views/ecw/follow/create.vue
+159
-0
index.vue
src/views/ecw/follow/index.vue
+500
-0
ChooseOrderProducts.vue
...ews/ecw/order/stocking/components/ChooseOrderProducts.vue
+123
-83
index.vue
src/views/ecw/order/stocking/index.vue
+527
-344
stockingList.vue
src/views/ecw/order/stockingList.vue
+440
-178
edit.vue
src/views/ecw/productPrice/edit.vue
+81
-74
index.vue
src/views/ecw/productPrice/index.vue
+964
-431
No files found.
src/api/ecw/follow.js
0 → 100644
View file @
b503e130
import
request
from
'
@/utils/request
'
// 创建跟进
export
function
createCustomerFollow
(
data
)
{
return
request
({
url
:
'
/ecw/customer-follow/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新跟进
export
function
updateCustomerFollow
(
data
)
{
return
request
({
url
:
'
/ecw/customer-follow/update
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除跟进
export
function
deleteCustomerFollow
(
id
)
{
return
request
({
url
:
'
/ecw/customer-follow/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
// 获得跟进
export
function
getCustomerFollow
(
id
)
{
return
request
({
url
:
'
/ecw/customer-follow/get?id=
'
+
id
,
method
:
'
get
'
})
}
// 获得跟进分页
export
function
getCustomerFollowPage
(
query
)
{
return
request
({
url
:
'
/ecw/customer-follow/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出跟进 Excel
export
function
exportCustomerFollowExcel
(
query
)
{
return
request
({
url
:
'
/ecw/customer-follow/export-excel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
//
export
function
getFollowPage
(
query
)
{
return
request
({
url
:
'
/ecw/customer-follow/followPage
'
,
method
:
'
get
'
,
params
:
query
})
}
\ No newline at end of file
src/views/ecw/customer/index.vue
View file @
b503e130
...
...
@@ -29,7 +29,6 @@
<el-form-item
:label=
"$t('客户等级')"
prop=
"level"
>
<el-select
multiple
clearable
v-model=
"queryParams.level"
:placeholder=
"$t('请选择客户等级')"
clearable
...
...
@@ -66,7 +65,6 @@
clearable
v-model=
"queryParams.customerService"
:placeholder=
"$t('请选择客户经理')"
clearable
size=
"small"
@
change=
"handleQuery"
>
...
...
@@ -113,11 +111,10 @@
</el-form-item>
<el-form-item
:label=
"$t('客户状态')"
prop=
"status"
>
<el-select
multiple
multiple
clearable
v-model=
"queryParams.status"
:placeholder=
"$t('请选择客户状态')"
clearable
size=
"small"
@
change=
"handleQuery"
>
...
...
src/views/ecw/follow/create.vue
0 → 100644
View file @
b503e130
<
template
>
<div
class=
"app-container"
>
<el-card>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
报表跟进
'
)
}}
</div>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
label-position=
"left"
>
<el-form-item
:label=
"$t('编号')"
prop=
"followNo"
>
<el-input
type=
"text"
v-model=
"form.followNo"
:placeholder=
"$t('请输入编号')"
/>
</el-form-item>
<el-form-item
:label=
"$t('类型')"
prop=
"type"
style=
"width: 46%;display: inline-block;margin-left:8%"
>
<!--
<el-radio
v-model=
"form.type"
label=
"2"
>
{{
$t
(
'
商务洽谈
'
)
}}
</el-radio>
-->
<dict-selector
ref=
'dictMethod'
v-model=
"form.followMethod"
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('客户编号')"
prop=
"followNo"
>
<el-input
type=
"text"
v-model=
"form.followNo"
/>
</el-form-item>
<el-form-item
:label=
"$t('报价单号')"
prop=
"number"
style=
"width: 46%;display: inline-block;"
>
<label>
{{
form
.
number
}}
</label>
</el-form-item>
<el-form-item
:label=
"$t('跟进时间')"
prop=
"followUpTime"
style=
"width: 46%;display: inline-block"
>
<el-date-picker
clearable
v-model=
"form.followUpTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
:placeholder=
"$t('选择跟进时间')"
/>
</el-form-item>
<el-form-item
:label=
"$t('客户经理')"
prop=
"followUpSalesmanId"
style=
"width: 46%;display: inline-block;;margin-left:8%"
>
<el-select
v-model=
"form.followUpSalesmanId"
:placeholder=
"$t('请选择跟进业务员')"
clearable
>
<el-option
v-for=
"item in creatorData"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('联系人')"
prop=
"contacts"
style=
"width: 46%;display: inline-block"
>
<el-select
v-model=
"form.contacts"
:placeholder=
"$t('请选择联系人')"
clearable
>
<el-option
v-for=
"item in contactsData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('跟进方式')"
prop=
"followUpMethod"
style=
"width: 46%;display: inline-block;margin-left:8%"
>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
:placeholder=
"$t('请选择跟进方式')"
v-model=
"form.followUpMethod"
form-type=
"select"
:clearable=
"true"
/>
</el-form-item>
<el-form-item
:label=
"$t('目的')"
prop=
"customerFeedback"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"form.customerFeedback"
maxlength=
"500"
:placeholder=
"$t('请输入客户反馈')"
/>
</el-form-item>
<el-form-item
:label=
"$t('情况')"
prop=
"processingResults"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"form.processingResults"
maxlength=
"500"
:placeholder=
"$t('请输入处理结果')"
/>
</el-form-item>
</el-form>
</el-card>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{
$t
(
'
确定
'
)
}}
</el-button>
</div>
</div>
</
template
>
<
script
>
import
{
createOfferLog
}
from
"
@/api/ecw/offerLog
"
import
{
userList
}
from
"
@/api/system/user
"
import
{
getCustomerContactsListByCustomer
}
from
"
@/api/ecw/customerContacts
"
import
{
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getOffer
}
from
'
@/api/ecw/offer
'
import
{
getCustomerContactsSelect
}
from
'
@/api/ecw/customerContacts
'
export
default
{
name
:
"
OfferLog
"
,
components
:
{
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
open
:
false
,
contactsData
:[],
creatorData
:[],
// 表单参数
form
:
{
type
:
'
2
'
,
offerId
:
0
,
number
:
0
,
},
relationId
:
0
,
// 表单校验
rules
:
{
type
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请选择跟进类型
"
),
trigger
:
"
change
"
}],
followUpTime
:
[{
required
:
true
,
message
:
this
.
$t
(
"
跟进时间不能为空
"
),
trigger
:
"
blur
"
}],
followUpSalesmanId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
客户经理不能为空
"
),
trigger
:
"
change
"
}],
contacts
:
[{
required
:
true
,
message
:
this
.
$t
(
"
联系人不能为空
"
),
trigger
:
"
blur
"
}],
followUpMethod
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请选择跟进方式
"
),
trigger
:
"
change
"
}],
customerFeedback
:
[{
required
:
true
,
message
:
this
.
$t
(
"
客户反馈不能为空
"
),
trigger
:
"
blur
"
}],
processingResults
:
[{
required
:
true
,
message
:
this
.
$t
(
"
处理结果不能为空
"
),
trigger
:
"
blur
"
}],
},
list
:[]
};
},
created
()
{
if
(
this
.
$route
.
query
.
offerId
){
this
.
form
.
offerId
=
this
.
$route
.
query
.
offerId
this
.
getList
();
}
if
(
this
.
$route
.
query
.
number
){
this
.
form
.
number
=
this
.
$route
.
query
.
number
}
userList
(
'
customer service
'
).
then
(
res
=>
this
.
creatorData
=
res
.
data
)
},
methods
:
{
getList
()
{
let
that
=
this
// 执行查询
getOffer
(
that
.
form
.
offerId
).
then
(
response
=>
{
that
.
list
=
response
.
data
;
that
.
getContactsData
()
})
},
getContactsData
(){
getCustomerContactsSelect
({
ids
:
[
this
.
list
.
consigneeId
,
this
.
list
.
consignorId
].
join
(
'
,
'
)}).
then
((
res
)
=>
{
if
(
res
.
data
.
list
.
length
>
0
){
this
.
contactsData
.
push
({
name
:
res
.
data
.
list
[
0
].
contactsName
+
'
(
'
+
this
.
$t
(
'
发货人
'
)
+
'
)
'
,
id
:
res
.
data
.
list
[
0
].
customerContactsId
})
this
.
contactsData
.
push
({
name
:
res
.
data
.
list
[
1
].
contactsName
+
'
(
'
+
this
.
$t
(
'
收货人
'
)
+
'
)
'
,
id
:
res
.
data
.
list
[
1
].
customerContactsId
})
}
})
// getCustomerContactsListByCustomer({customerId:this.relationId}).then(response => {
// this.contactsData = response.data
// })
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 添加的提交
this
.
form
.
type
=
parseInt
(
this
.
form
.
type
)
this
.
form
.
followUpMethod
=
parseInt
(
this
.
form
.
followUpMethod
)
createOfferLog
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
));
this
.
$store
.
dispatch
(
'
tagsView/delCurrentView
'
)
});
});
},
}
};
</
script
>
<
style
scoped
>
.dialog-footer
{
padding
:
40px
;
}
</
style
>
src/views/ecw/follow/index.vue
0 → 100644
View file @
b503e130
This diff is collapsed.
Click to expand it.
src/views/ecw/order/stocking/components/ChooseOrderProducts.vue
View file @
b503e130
...
...
@@ -5,169 +5,209 @@
append-to-body
width=
"90vw"
>
<el-table
ref=
"multipleTable"
:data=
"flatList"
@
selection-change=
"handleSelectionChange"
:span-method=
"objectSpanMethod"
class=
"table"
>
<el-table
ref=
"multipleTable"
:data=
"flatList"
@
selection-change=
"handleSelectionChange"
:span-method=
"objectSpanMethod"
class=
"table"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
:label=
"$t('品名')"
prop=
"name"
>
<template
#default
="
{
row}">
{{
$l
(
row
,
"
prodName
"
)
}}
</
template
>
<template
#default
="
{
row }">
{{
$l
(
row
,
"
prodName
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('品牌')"
prop=
"brand"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
brandName
"
)
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
brandName
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('材质')"
prop=
"material"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
materialLabel
"
)
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
materialLabel
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('商品特性')"
prop=
"attr"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
prodAttrNames
"
)
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
prodAttrNames
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('用途')"
prop=
"unit"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
usageNames
"
)
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
usageNames
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('总数量')"
prop=
"quantityAll"
></el-table-column>
<el-table-column
:label=
"$t('总箱数')"
prop=
"cartonsNum"
></el-table-column>
<el-table-column
:label=
"$t('总数量')"
prop=
"quantityAll"
></el-table-column>
<el-table-column
:label=
"$t('总箱数')"
prop=
"cartonsNum"
></el-table-column>
<el-table-column
:label=
"$t('包装类型')"
prop=
"specificationType"
>
<
template
#default
="{
row
}"
>
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value=
"row.specificationType"
></dict-tag>
<
template
#default
="{
row
}"
>
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value=
"row.specificationType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('规格')"
prop=
"boxGauge"
></el-table-column>
<el-table-column
:label=
"$t('总重量')"
prop=
"weight"
></el-table-column>
<el-table-column
:label=
"$t('快递单号')"
prop=
"expressNo"
></el-table-column>
<el-table-column
:label=
"$t('快递单号')"
prop=
"expressNo"
></el-table-column>
<el-table-column
:label=
"$t('影像')"
prop=
"quantityAll"
>
<
template
#default
="{
row
}"
>
<el-button
type=
"text"
@
click=
"curPictrues = row.pictureUrls"
>
{{
$t
(
'
查看影像
'
)
}}
</el-button>
<
template
#default
="{
row
}"
>
<el-button
type=
"text"
@
click=
"curPictrues = row.pictureUrls"
>
{{
$t
(
"
查看影像
"
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"handleClose"
>
{{$t('取消')}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{
$t("确定")
}}
</el-button>
<el-button
@
click=
"handleClose"
>
{{ $t("取消") }}
</el-button>
</div>
<media-dialog
v-if=
"curPictrues"
:value=
"curPictrues"
@
close=
"curPictrues=null"
></media-dialog>
<media-dialog
v-if=
"curPictrues"
:value=
"curPictrues"
@
close=
"curPictrues = null"
></media-dialog>
</el-dialog>
</template>
<
script
>
import
{
getOrderItemCommonAttr
}
from
"
@/api/ecw/order
"
import
{
getOrderItemCommonAttr
}
from
"
@/api/ecw/order
"
;
import
MediaDialog
from
"
@/views/ecw/order/stocking/components/MediaDialog.vue
"
;
export
default
{
components
:
{
MediaDialog
},
components
:
{
MediaDialog
},
props
:
{
orderId
:
{
type
:
Number
,
default
:
undefined
default
:
undefined
,
},
warehouseInId
:
Number
warehouseInId
:
Number
,
},
data
(){
data
()
{
return
{
visible
:
true
,
// 备选的商品明细
orderItemDetails
:
[],
multipleSelection
:[],
curPictrues
:
null
}
multipleSelection
:
[],
curPictrues
:
null
,
}
;
},
watch
:{
visible
(
val
){
watch
:
{
visible
(
val
)
{
if
(
!
val
)
{
this
.
$emit
(
'
close
'
)
this
.
$emit
(
"
close
"
);
}
},
},
computed
:{
flatList
(){
let
arr
=
[]
this
.
orderItemDetails
.
forEach
(
item
=>
{
computed
:
{
flatList
()
{
let
arr
=
[]
;
this
.
orderItemDetails
.
forEach
(
(
item
)
=>
{
item
.
orderWarehouseInCommonAttrVOList
?.
forEach
((
vo
,
index
)
=>
{
arr
.
push
({
...
item
,
...
vo
,
index
,
span
:
index
===
0
?
item
.
orderWarehouseInCommonAttrVOList
?.
length
:
0
,
warehouseInId
:
item
.
id
})
})
})
return
arr
}
span
:
index
===
0
?
item
.
orderWarehouseInCommonAttrVOList
?.
length
:
0
,
warehouseInId
:
item
.
id
,
});
});
});
return
arr
;
},
},
async
created
()
{
getOrderItemCommonAttr
(
this
.
orderId
,
this
.
warehouseInId
||
0
).
then
(
res
=>
{
this
.
orderItemDetails
=
res
.
data
})
getOrderItemCommonAttr
(
this
.
orderId
,
this
.
warehouseInId
||
0
).
then
(
(
res
)
=>
{
this
.
orderItemDetails
=
res
.
data
;
}
);
},
methods
:
{
handleSelectionChange
(
e
){
console
.
log
(
"
handleSelectionChange
"
,
e
)
this
.
multipleSelection
=
e
handleSelectionChange
(
e
)
{
console
.
log
(
"
handleSelectionChange
"
,
e
)
;
this
.
multipleSelection
=
e
;
},
handleSubmit
(){
handleSubmit
()
{
// 品名+品牌+材质+商品特性+用途一致的会合并,数量累加
// https://zentao.test.jdshangmen.com/task-view-3423.html
let
arr
=
[]
this
.
multipleSelection
.
forEach
(
item
=>
{
let
index
=
arr
.
findIndex
(
i
=>
{
return
i
.
prodId
==
item
.
prodId
&&
i
.
brand
==
item
.
brand
&&
i
.
material
==
item
.
material
&&
i
.
prodAttrIds
==
item
.
prodAttrIds
&&
i
.
usageIds
==
item
.
usageIds
})
let
arr
=
[];
this
.
multipleSelection
.
forEach
((
item
)
=>
{
let
index
=
arr
.
findIndex
((
i
)
=>
{
return
(
i
.
prodId
==
item
.
prodId
&&
i
.
brand
==
item
.
brand
&&
i
.
material
==
item
.
material
&&
i
.
prodAttrIds
==
item
.
prodAttrIds
&&
i
.
usageIds
==
item
.
usageIds
);
});
if
(
index
==
-
1
)
{
arr
.
push
({
...
item
})
arr
.
push
({
...
item
});
}
else
{
arr
[
index
].
quantityAll
+=
item
.
quantityAll
arr
[
index
].
quantityAll
+=
item
.
quantityAll
;
}
})
})
;
// 如果某条入仓记录下的箱明细被全部选中了,则需要将他的快递单号和影像带过去
const
expressNos
=
[]
const
pictureUrls
=
[]
const
expressNos
=
[]
;
const
pictureUrls
=
[]
;
this
.
orderItemDetails
.
forEach
((
warehouseIn
,
index
)
=>
{
// 本条入仓记录被选中的明细数
const
selectedCount
=
this
.
multipleSelection
.
filter
(
item
=>
item
.
warehouseInId
==
warehouseIn
.
id
).
length
if
(
selectedCount
==
warehouseIn
.
orderWarehouseInCommonAttrVOList
?.
length
){
if
(
warehouseIn
.
expressNo
){
expressNos
.
push
(
warehouseIn
.
expressNo
)
const
selectedCount
=
this
.
multipleSelection
.
filter
(
(
item
)
=>
item
.
warehouseInId
==
warehouseIn
.
id
).
length
;
if
(
selectedCount
==
warehouseIn
.
orderWarehouseInCommonAttrVOList
?.
length
)
{
if
(
warehouseIn
.
expressNo
)
{
expressNos
.
push
(
warehouseIn
.
expressNo
);
}
if
(
warehouseIn
.
pictureUrls
?.
length
)
{
pictureUrls
.
push
(...
warehouseIn
.
pictureUrls
)
if
(
warehouseIn
.
pictureUrls
?.
length
)
{
pictureUrls
.
push
(...
warehouseIn
.
pictureUrls
)
;
}
}
})
})
;
// 根据warehouseInId 给对应的入仓记录追加快递单号和影像
// 存到全局变量,在调用对应finishPack接口的时候判断追加
window
.
ChooseOrderProductsExpressNos
=
expressNos
window
.
ChooseOrderProductsPictureUrls
=
pictureUrls
window
.
ChooseOrderProductsExpressNos
=
expressNos
;
window
.
ChooseOrderProductsPictureUrls
=
pictureUrls
;
this
.
$emit
(
"
success
"
,
arr
)
this
.
$emit
(
"
success
"
,
arr
)
;
},
handleClose
()
{
this
.
visible
=
false
this
.
visible
=
false
;
},
objectSpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}){
if
(
columnIndex
>
6
)
{
objectSpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
columnIndex
>
6
)
{
return
{
rowspan
:
row
.
span
,
colspan
:
1
}
colspan
:
1
,
}
;
}
return
{
rowspan
:
1
,
colspan
:
1
}
}
}
}
colspan
:
1
,
}
;
}
,
}
,
}
;
</
script
>
<
style
scoped
lang=
"scss"
>
.table
{
::v-deep
{
th
.el-table__cell.is-leaf
,
td
.el-table__cell
{
border-bottom
:
1px
solid
#9b9b9b
;
}
.el-checkbox__inner
{
border
:
2px
solid
#9b9b9b
;
}
.table
{
::v-deep
{
th
.el-table__cell.is-leaf
,
td
.el-table__cell
{
border-bottom
:
1px
solid
#9b9b9b
;
}
.el-checkbox__inner
{
border
:
2px
solid
#9b9b9b
;
}
}
}
</
style
>
src/views/ecw/order/stocking/index.vue
View file @
b503e130
This diff is collapsed.
Click to expand it.
src/views/ecw/order/stockingList.vue
View file @
b503e130
This diff is collapsed.
Click to expand it.
src/views/ecw/productPrice/edit.vue
View file @
b503e130
...
...
@@ -353,6 +353,7 @@
</el-form-item>
</
template
>
<!--是否单询价,lanbm 2024-06-17 添加海运选中单询价不用设置价格信息逻辑 -->
<el-form-item
:label=
"$t('是否单询')"
prop=
"inquiry"
>
<dict-selector
:type=
"DICT_TYPE.NEED_ORDER_INQUIRY"
...
...
@@ -361,6 +362,7 @@
formatter=
"number"
></dict-selector>
</el-form-item>
<!--end 是否单询价,lanbm 2024-06-17 添加海运选中单询价不用设置价格信息逻辑 -->
</el-card>
</el-form>
...
...
@@ -931,12 +933,12 @@ export default {
if
(
!
valid
)
{
return
;
}
// 只有修改单条路线的时候,不需要选择路线
/* if (this.$route.query.action !== 'update' && (!this.selectedRoutes || !this.selectedRoutes.length)) {
this.$message.error('请选择线路');
return;
} */
if
(
!
this
.
lineList
.
length
&&
(
!
this
.
selectedRoutes
||
!
this
.
selectedRoutes
.
length
)
...
...
@@ -949,91 +951,96 @@ export default {
// specialList: this.specialProducts,
isAllProduct
:
0
,
});
// 阶梯价
if
(
this
.
form
.
stepPrice
)
{
let
isValid
=
true
;
for
(
let
stepPrice
of
this
.
$refs
.
stepPrice
)
{
if
(
!
stepPrice
.
validate
())
{
isValid
=
false
;
break
;
}
}
if
(
!
isValid
)
return
;
// 全包价
if
(
this
.
form
.
priceType
==
1
)
{
data
.
fullPriceStepList
=
this
.
getPriceList
(
this
.
form
.
fullPriceStepList
);
delete
data
.
clearancePriceStepList
;
delete
data
.
freightPriceStepList
;
}
else
{
data
.
clearancePriceStepList
=
this
.
getPriceList
(
this
.
form
.
clearancePriceStepList
);
data
.
freightPriceStepList
=
this
.
getPriceList
(
this
.
form
.
freightPriceStepList
);
delete
data
.
fullPriceStepList
;
}
}
//海运非阶梯价校验
else
{
// 有多个组件则表示清关费 + 运费
if
(
this
.
$refs
.
seaPrice
?.
length
)
{
if
(
this
.
form
.
needOrderInquiry
==
0
)
{
//不是单询价才校验价格参数 lanbm 2024-06-17 add
// 阶梯价
if
(
this
.
form
.
stepPrice
)
{
let
isValid
=
true
;
for
(
let
s
eaPrice
of
this
.
$refs
.
sea
Price
)
{
if
(
!
s
ea
Price
.
validate
())
{
for
(
let
s
tepPrice
of
this
.
$refs
.
step
Price
)
{
if
(
!
s
tep
Price
.
validate
())
{
isValid
=
false
;
break
;
}
}
if
(
!
isValid
)
return
;
}
// 只有一个海运费组件,全包价
else
if
(
this
.
$refs
.
seaPrice
&&
!
this
.
$refs
.
seaPrice
.
validate
())
{
return
;
}
// 格式化
if
(
this
.
form
.
priceType
===
1
)
{
data
.
fullPricePackagingList
=
this
.
getPackingPrice
(
data
.
fullPricePackagingList
);
delete
data
.
freightPricePackagingList
;
delete
data
.
clearancePricePackagingList
;
}
else
{
data
.
freightPricePackagingList
=
this
.
getPackingPrice
(
data
.
freightPricePackagingList
);
data
.
clearancePricePackagingList
=
this
.
getPackingPrice
(
data
.
clearancePricePackagingList
);
delete
data
.
fullPricePackagingList
;
// 全包价
if
(
this
.
form
.
priceType
==
1
)
{
data
.
fullPriceStepList
=
this
.
getPriceList
(
this
.
form
.
fullPriceStepList
);
delete
data
.
clearancePriceStepList
;
delete
data
.
freightPriceStepList
;
}
else
{
data
.
clearancePriceStepList
=
this
.
getPriceList
(
this
.
form
.
clearancePriceStepList
);
data
.
freightPriceStepList
=
this
.
getPriceList
(
this
.
form
.
freightPriceStepList
);
delete
data
.
fullPriceStepList
;
}
}
//海运非阶梯价校验
else
{
// 有多个组件则表示清关费 + 运费
if
(
this
.
$refs
.
seaPrice
?.
length
)
{
let
isValid
=
true
;
for
(
let
seaPrice
of
this
.
$refs
.
seaPrice
)
{
if
(
!
seaPrice
.
validate
())
{
isValid
=
false
;
break
;
}
}
if
(
!
isValid
)
return
;
}
// 只有一个海运费组件,全包价
else
if
(
this
.
$refs
.
seaPrice
&&
!
this
.
$refs
.
seaPrice
.
validate
())
{
return
;
}
// 删除阶梯价字段
delete
data
.
freightPriceStepList
;
delete
data
.
fullPriceStepList
;
delete
data
.
clearancePriceStepList
;
}
// 格式化
if
(
this
.
form
.
priceType
===
1
)
{
data
.
fullPricePackagingList
=
this
.
getPackingPrice
(
data
.
fullPricePackagingList
);
delete
data
.
freightPricePackagingList
;
delete
data
.
clearancePricePackagingList
;
}
else
{
data
.
freightPricePackagingList
=
this
.
getPackingPrice
(
data
.
freightPricePackagingList
);
data
.
clearancePricePackagingList
=
this
.
getPackingPrice
(
data
.
clearancePricePackagingList
);
delete
data
.
fullPricePackagingList
;
}
// 设置了有效期,且已过期则给提示
if
(
this
.
form
.
validateEndDate
&&
force
!==
true
)
{
let
validateEndDate
=
new
Date
(
this
.
form
.
validateEndDate
);
if
(
validateEndDate
.
getTime
()
<
Date
.
now
())
{
return
this
.
$confirm
(
"
您设置的线路价格已过期,确定提交吗?
"
,
"
提示
"
,
{
confirmButtonText
:
"
确认提交
"
,
cancelButtonText
:
"
取消提交
"
,
type
:
"
warning
"
,
}
).
then
((
res
)
=>
{
this
.
submitForm
(
true
);
});
// 删除阶梯价字段
delete
data
.
freightPriceStepList
;
delete
data
.
fullPriceStepList
;
delete
data
.
clearancePriceStepList
;
}
// 设置了有效期,且已过期则给提示
if
(
this
.
form
.
validateEndDate
&&
force
!==
true
)
{
let
validateEndDate
=
new
Date
(
this
.
form
.
validateEndDate
);
if
(
validateEndDate
.
getTime
()
<
Date
.
now
())
{
return
this
.
$confirm
(
"
您设置的线路价格已过期,确定提交吗?
"
,
"
提示
"
,
{
confirmButtonText
:
"
确认提交
"
,
cancelButtonText
:
"
取消提交
"
,
type
:
"
warning
"
,
}
).
then
((
res
)
=>
{
this
.
submitForm
(
true
);
});
}
}
}
// 修改单条路线
...
...
src/views/ecw/productPrice/index.vue
View file @
b503e130
This diff is collapsed.
Click to expand it.
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