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
c23f2faf
Commit
c23f2faf
authored
Nov 01, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复复制模板缺少特需价格的时候无法设置
parent
324cd867
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
79 deletions
+80
-79
batchEdit.vue
src/views/ecw/productPrice/batchEdit.vue
+80
-79
No files found.
src/views/ecw/productPrice/batchEdit.vue
View file @
c23f2faf
...
...
@@ -299,34 +299,36 @@ export default {
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
this
.
$nextTick
(
async
()
=>
{
// 如果是空运,阶梯价格默认为1
if
(
this
.
type
==
'
air
'
){
this
.
$set
(
this
.
form
,
'
stepPrice
'
,
1
)
}
await
this
.
$nextTick
()
// 默认单位,空运千克,海运立方米
this
.
setDefaultVolumeUnit
(
this
.
type
==
'
air
'
?
6
:
7
)
await
this
.
$nextTick
()
// 如果是空运,阶梯价格默认为1
if
(
this
.
type
==
'
air
'
){
this
.
$set
(
this
.
form
,
'
stepPrice
'
,
1
)
}
// 如果是复制,则获取数据并填充,先复制,然后填充特需,避免数据的特需不全导致部分不显示
if
(
this
.
$route
.
query
.
templateId
){
await
this
.
getTemplateDetail
(
this
.
$route
.
query
.
templateId
)
}
}
)
// 默认单位,空运千克,海运立方米
this
.
setDefaultVolumeUnit
(
this
.
type
==
'
air
'
?
6
:
7
)
// 如果是复制,则获取数据并填充,先复制,然后填充特需,避免数据的特需不全导致部分不显示
if
(
this
.
$route
.
query
.
templateId
){
await
this
.
getTemplateDetail
(
this
.
$route
.
query
.
templateId
)
}
// 从价格中获取特需的默认单位
const
obj
=
(
this
.
form
.
stepPrice
?
this
.
form
.
priceStepList
[
0
]
:
this
.
form
)
||
{
}
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
).
forEach
(
item
=>
{
// 没有的才push,已有的可能是从复制模板携带过来的数据
if
(
!
this
.
form
.
specialList
.
find
(
special
=>
special
.
specialDictType
==
item
.
value
))
{
console
.
log
(
'
特需push
'
,
item
.
value
)
this
.
form
.
specialList
.
push
({
"
clearancePrice
"
:
null
,
"
clearancePriceUnit
"
:
null
,
"
clearanceVolumeUnit
"
:
null
,
"
clearancePriceUnit
"
:
obj
.
clearancePriceUnit
,
"
clearanceVolumeUnit
"
:
obj
.
clearanceVolumeUnit
,
"
specialDictType
"
:
item
.
value
,
"
transportPrice
"
:
null
,
"
transportPriceUnit
"
:
null
,
"
transportVolumeUnit
"
:
null
,
"
transportPriceUnit
"
:
obj
.
transportPriceUnit
,
"
transportVolumeUnit
"
:
obj
.
transportVolumeUnit
,
}
)
}
}
else
console
.
log
(
'
已存在特需
'
,
item
.
value
)
}
)
...
...
@@ -334,68 +336,67 @@ export default {
methods
:
{
// 获取模板数据(复制的源路线价格信息)
async
getTemplateDetail
(
id
){
await
getProductPrice
(
id
).
then
(
res
=>
{
// 填充商品、线路、价格信息、出货渠道(空运)
// this.form.productIdList = [res.data.productId]
this
.
selectedRoutes
=
[{
"
lineId
"
:
res
.
data
.
warehouseLineId
,
"
channelId
"
:
res
.
data
.
shippingChannelId
,
"
transportId
"
:
res
.
data
.
warehouseLineDO
.
transportType
,
"
shippingChannelId
"
:
res
.
data
.
channelId
}
]
// 要复制过来的字段
const
{
allPrice
,
allPriceUnit
,
allVolumeUnit
,
transportPrice
,
transportPriceUnit
,
transportVolumeUnit
,
clearancePrice
,
clearancePriceUnit
,
clearanceVolumeUnit
,
priceType
,
stepPrice
,
specialList
,
priceStepList
,
minWeight
,
minWeightUnit
,
needOrderInquiry
,
needBook
,
needPay
}
=
res
.
data
const
data
=
{
allPrice
,
allPriceUnit
,
allVolumeUnit
,
transportPrice
,
transportPriceUnit
,
transportVolumeUnit
,
clearancePrice
,
clearancePriceUnit
,
clearanceVolumeUnit
,
priceType
,
stepPrice
,
specialList
,
priceStepList
,
minWeight
,
minWeightUnit
,
needOrderInquiry
,
needBook
,
needPay
}
// 海运需要填充货柜位置和订单方数上限
if
(
this
.
type
==
'
sea
'
){
data
.
containerLocation
=
res
.
data
.
containerLocation
data
.
square
=
res
.
data
.
square
}
this
.
$set
(
this
,
'
form
'
,
Object
.
assign
({
}
,
this
.
form
,
data
))
const
res
=
await
getProductPrice
(
id
)
// 填充商品、线路、价格信息、出货渠道(空运)
// this.form.productIdList = [res.data.productId]
this
.
selectedRoutes
=
[{
"
lineId
"
:
res
.
data
.
warehouseLineId
,
"
channelId
"
:
res
.
data
.
shippingChannelId
,
"
transportId
"
:
res
.
data
.
warehouseLineDO
.
transportType
,
"
shippingChannelId
"
:
res
.
data
.
channelId
}
]
// 要复制过来的字段
const
{
allPrice
,
allPriceUnit
,
allVolumeUnit
,
transportPrice
,
transportPriceUnit
,
transportVolumeUnit
,
clearancePrice
,
clearancePriceUnit
,
clearanceVolumeUnit
,
priceType
,
stepPrice
,
specialList
,
priceStepList
,
minWeight
,
minWeightUnit
,
needOrderInquiry
,
needBook
,
needPay
}
=
res
.
data
const
data
=
{
allPrice
,
allPriceUnit
,
allVolumeUnit
,
transportPrice
,
transportPriceUnit
,
transportVolumeUnit
,
clearancePrice
,
clearancePriceUnit
,
clearanceVolumeUnit
,
priceType
,
stepPrice
,
specialList
,
priceStepList
,
minWeight
,
minWeightUnit
,
needOrderInquiry
,
needBook
,
needPay
}
// 海运需要填充货柜位置和订单方数上限
if
(
this
.
type
==
'
sea
'
){
data
.
containerLocation
=
res
.
data
.
containerLocation
data
.
square
=
res
.
data
.
square
}
this
.
$set
(
this
,
'
form
'
,
Object
.
assign
({
}
,
this
.
form
,
data
))
// 产品选择器默认选择的商品
getProduct
(
res
.
data
.
productId
).
then
(
res
=>
{
this
.
$refs
.
productSelector
.
choose
(
res
.
data
)
}
)
// 产品选择器默认选择的商品
getProduct
(
res
.
data
.
productId
).
then
(
res
=>
{
this
.
$refs
.
productSelector
.
choose
(
res
.
data
)
}
)
}
,
// 同步全部单位
...
...
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