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
87adf6bb
Commit
87adf6bb
authored
Dec 29, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善海运价格
parent
9a9db221
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
650 additions
and
413 deletions
+650
-413
QuickSet.vue
src/views/ecw/productPrice/components/QuickSet.vue
+51
-2
SeaPrice.vue
src/views/ecw/productPrice/components/SeaPrice.vue
+220
-0
SeaStep.vue
src/views/ecw/productPrice/components/SeaStep.vue
+258
-0
edit.vue
src/views/ecw/productPrice/edit.vue
+121
-411
No files found.
src/views/ecw/productPrice/components/QuickSet.vue
View file @
87adf6bb
...
@@ -4,13 +4,18 @@ import Selector from "@/components/Selector/index.vue";
...
@@ -4,13 +4,18 @@ import Selector from "@/components/Selector/index.vue";
export
default
{
export
default
{
name
:
"
QuickSet.vue
"
,
name
:
"
QuickSet.vue
"
,
props
:{
props
:{
type
:
String
,
unitList
:{
unitList
:{
type
:
Array
,
type
:
Array
,
default
:
[]
default
(){
return
[]
}
},
},
currencyList
:{
currencyList
:{
type
:
Array
,
type
:
Array
,
default
:
[]
default
(){
return
[]
}
},
},
value
:{
value
:{
type
:
Object
,
type
:
Object
,
...
@@ -28,6 +33,16 @@ export default {
...
@@ -28,6 +33,16 @@ export default {
computed
:{
computed
:{
getUnit
(){
getUnit
(){
return
(
field
,
unitField
)
=>
{
return
(
field
,
unitField
)
=>
{
if
(
this
.
type
==
'
sea
'
){
if
(
this
.
value
.
stepPrice
&&
!
this
.
value
.
priceStepList
?.
length
){
return
null
}
if
(
this
.
value
.
stepPrice
){
return
this
.
value
.
priceStepList
[
0
][
unitField
]
}
return
this
.
value
[
unitField
]
}
// 后面是空运的
if
(
!
this
.
value
[
field
]?.
length
)
return
null
if
(
!
this
.
value
[
field
]?.
length
)
return
null
return
this
.
value
[
field
][
0
][
unitField
]
return
this
.
value
[
field
][
0
][
unitField
]
}
}
...
@@ -39,6 +54,9 @@ export default {
...
@@ -39,6 +54,9 @@ export default {
if
(
!
amount
){
if
(
!
amount
){
return
this
.
$message
.
error
(
this
.
$t
(
'
请输入加价金额
'
))
return
this
.
$message
.
error
(
this
.
$t
(
'
请输入加价金额
'
))
}
}
if
(
this
.
type
==
'
sea
'
){
return
this
.
batchSetSeaPrice
(
type
,
amount
)
}
if
(
this
.
value
?.
priceType
==
1
){
if
(
this
.
value
?.
priceType
==
1
){
this
.
batchSetPrice
(
"
fullPriceStepList
"
,
'
all
'
,
amount
)
this
.
batchSetPrice
(
"
fullPriceStepList
"
,
'
all
'
,
amount
)
}
else
if
(
type
==
'
transport
'
){
}
else
if
(
type
==
'
transport
'
){
...
@@ -71,6 +89,37 @@ export default {
...
@@ -71,6 +89,37 @@ export default {
})
})
}
}
})
})
},
batchSetSeaPrice
(
type
,
amount
){
console
.
log
(
'
快捷设置海运价格
'
,
type
,
amount
)
if
(
!
this
.
value
.
stepPrice
){
if
(
!
this
.
value
.
priceType
){
this
.
setSeaPrice
(
this
.
value
,
"
transport
"
,
amount
)
this
.
setSeaPrice
(
this
.
value
,
"
clearance
"
,
amount
)
}
else
{
this
.
setSeaPrice
(
this
.
value
,
"
all
"
,
amount
)
}
return
}
this
.
value
.
priceStepList
.
forEach
(
item
=>
{
if
(
!
this
.
value
.
priceType
){
this
.
setSeaPrice
(
item
,
"
transport
"
,
amount
)
this
.
setSeaPrice
(
item
,
"
clearance
"
,
amount
)
}
else
{
this
.
setSeaPrice
(
item
,
"
all
"
,
amount
)
}
})
},
setSeaPrice
(
parent
,
fieldPrefix
,
amount
){
console
.
log
(
parent
[
`
${
fieldPrefix
}
Price`
],
...
arguments
)
parent
[
`
${
fieldPrefix
}
Price`
]
=
(
parent
[
fieldPrefix
+
'
Price
'
]
*
100
+
amount
*
100
)
/
100
if
(
!
parent
.
specialList
?.
length
)
return
parent
.
specialList
.
forEach
(
special
=>
{
console
.
log
(
special
.
specialDictType
,
special
[
fieldPrefix
+
'
Price
'
])
if
(
special
[
fieldPrefix
+
'
Price
'
]){
special
[
fieldPrefix
+
'
Price
'
]
=
(
special
[
fieldPrefix
+
'
Price
'
]
*
100
+
amount
*
100
)
/
100
}
})
}
}
}
}
}
}
...
...
src/views/ecw/productPrice/components/SeaPrice.vue
0 → 100644
View file @
87adf6bb
<
script
>
import
Selector
from
"
@/components/Selector/index.vue
"
;
import
Inputor
from
"
@/components/Inputor/index.vue
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
import
{
DICT_TYPE
,
getDictDatas
}
from
"
@/utils/dict
"
;
export
default
{
name
:
"
SeaPrice
"
,
components
:
{
Template
,
Inputor
,
Selector
},
props
:{
priceType
:
Number
,
// 1全包价,0清关费+运费
unitList
:{
type
:
Array
,
default
:
[]
},
currencyList
:{
type
:
Array
,
default
:
[]
},
readonly
:
Boolean
,
value
:{
type
:
Object
,
default
:
()
=>
{
return
{
}
}
}
},
created
()
{
this
.
initSpecialPrice
()
},
data
(){
return
{
}
},
methods
:{
getDictDatas
,
// 初始化特需加价
initSpecialPrice
(){
if
(
!
this
.
value
.
specialList
){
this
.
$set
(
this
.
value
,
'
specialList
'
,
[])
}
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
).
forEach
(
item
=>
{
if
(
!
this
.
value
.
specialList
.
find
(
special
=>
special
.
specialDictType
==
item
.
value
)){
this
.
value
.
specialList
.
push
({
allPrice
:
undefined
,
// 新建默认给0,否则默认是null
allPriceUnit
:
this
.
value
[
`allPriceUnit`
],
allVolumeUnit
:
this
.
value
[
`allVolumeUnit`
],
transportPrice
:
undefined
,
// 新建默认给0,否则默认是null
transportPriceUnit
:
this
.
value
[
`transportPriceUnit`
],
transportVolumeUnit
:
this
.
value
[
`transportVolumeUnit`
],
clearancePrice
:
undefined
,
clearancePriceUnit
:
this
.
value
[
`clearancePriceUnit`
],
clearanceVolumeUnit
:
this
.
value
[
`clearanceVolumeUnit`
],
specialDictType
:
item
.
value
})
}
})
},
// 校验
validate
(){
let
valid
=
true
// 价格检查
if
(
this
.
priceType
){
if
(
!
this
.
validatePrice
(
this
.
value
[
`allPrice`
])){
valid
=
false
this
.
$message
.
error
(
`请设置全包价`
)
}
}
else
{
if
(
!
this
.
validatePrice
(
this
.
value
[
`transportPrice`
])){
valid
=
false
this
.
$message
.
error
(
`请设置运费`
)
}
if
(
!
this
.
validatePrice
(
this
.
value
[
`clearancePrice`
])){
valid
=
false
this
.
$message
.
error
(
`请设置清关费`
)
}
}
return
valid
},
// 校验价格是否为空,可以是0
validatePrice
(
value
){
if
(
value
===
undefined
||
value
===
null
||
value
===
''
){
return
false
}
return
true
},
}
}
</
script
>
<
template
>
<div>
<el-form-item
:label=
"$t('默认运费')"
v-if=
"!priceType"
>
<el-input-number
v-model=
"value[`transportPrice`]"
:placeholder=
"$t('整数或者两位小数')"
:controls=
"false"
:disabled=
"readonly"
class=
"w-100 mr-10"
/>
<selector
:disabled=
"readonly"
v-model=
"value[`transportPriceUnit`]"
:options=
"currencyList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit',
{
value: $event,
field: `transportPriceUnit`
})"
value-field="id"
class="w-100" />
/
<selector
:disabled=
"readonly"
v-model=
"value[`transportVolumeUnit`]"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit',
{
value: $event,
field: `transportVolumeUnit`
})"
value-field="id"
class="w-100" />
</el-form-item>
<el-form-item
:label=
"$t('默认清关费')"
v-if=
"!priceType"
>
<el-input-number
v-model=
"value[`clearancePrice`]"
:placeholder=
"$t('整数或者两位小数')"
:disabled=
"readonly"
:controls=
"false"
class=
"w-100 mr-10"
/>
<selector
:disabled=
"readonly"
v-model=
"value[`clearancePriceUnit`]"
:options=
"currencyList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit',
{
value: $event,
field: `clearancePriceUnit`
})"
value-field="id"
class="w-100" />
/
<selector
:disabled=
"readonly"
v-model=
"value[`clearanceVolumeUnit`]"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit',
{
value: $event,
field: `clearanceVolumeUnit`
})"
value-field="id"
class="w-100" />
</el-form-item>
<el-form-item
:label=
"$t('默认全包价')"
v-if=
"priceType"
>
<el-input-number
v-model=
"value[`allPrice`]"
:placeholder=
"$t('整数或者两位小数')"
:disabled=
"readonly"
:controls=
"false"
class=
"w-100 mr-10"
/>
<selector
:disabled=
"readonly"
v-model=
"value[`allPriceUnit`]"
:options=
"currencyList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit',
{
value: $event,
field: `allPriceUnit`
})"
value-field="id"
class="w-100" />
/
<selector
:disabled=
"readonly"
v-model=
"value[`allVolumeUnit`]"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit',
{
value: $event,
field: `allVolumeUnit`
})"
value-field="id"
class="w-100" />
</el-form-item>
<!--特性加价-->
<template
v-for=
"(special, specialIndex) in value.specialList"
>
<div
:key=
"specialIndex + 'transport'"
>
<el-form-item
v-if=
"!priceType"
:label=
"getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')"
>
<el-input-number
v-model.number=
"special[`transportPrice`]"
:controls=
"false"
:min=
"0"
:disabled=
"readonly"
:placeholder=
"$t('整数或者两位小数')"
class=
"w-100 mr-10"
/>
<selector
disabled
v-model=
"special[`transportPriceUnit`]"
:options=
"currencyList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100 mr-10"
/>
<span
class=
"mr-10"
>
/
</span>
<selector
disabled
v-model=
"special[`transportVolumeUnit`]"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100"
/>
</el-form-item>
<el-form-item
v-if=
"!priceType"
:label=
"getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')"
>
<el-input-number
v-model.number=
"special[`clearancePrice`]"
:controls=
"false"
:min=
"0"
:disabled=
"readonly"
:placeholder=
"$t('整数或者两位小数')"
class=
"w-100 mr-10"
/>
<selector
disabled
v-model=
"special[`clearancePriceUnit`]"
:options=
"currencyList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100 mr-10"
/>
<span
class=
"mr-10"
>
/
</span>
<selector
disabled
v-model=
"special[`clearanceVolumeUnit`]"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100"
/>
</el-form-item>
<el-form-item
v-if=
"priceType"
:label=
"getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')"
>
<el-input-number
v-model.number=
"special[`allPrice`]"
:controls=
"false"
:min=
"0"
:disabled=
"readonly"
:placeholder=
"$t('整数或者两位小数')"
class=
"w-100 mr-10"
/>
<selector
disabled
v-model=
"special[`allPriceUnit`]"
:options=
"currencyList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100 mr-10"
/>
<span
class=
"mr-10"
>
/
</span>
<selector
disabled
v-model=
"special[`allVolumeUnit`]"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100"
/>
</el-form-item>
</div>
</
template
>
</div>
</template>
<
style
scoped
lang=
"scss"
>
.bold
{
font-weight
:
bold
;
}
.text-lg
{
font-size
:
1
.3rem
;
}
.tips
{
font-size
:
1rem
;
color
:
red
;
}
</
style
>
src/views/ecw/productPrice/components/SeaStep.vue
0 → 100644
View file @
87adf6bb
<
script
>
import
Selector
from
"
@/components/Selector/index.vue
"
;
import
Inputor
from
"
@/components/Inputor/index.vue
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
import
{
DICT_TYPE
,
getDictDatas
}
from
"
@/utils/dict
"
;
export
default
{
name
:
"
SeaStep
"
,
components
:
{
Template
,
Inputor
,
Selector
},
props
:{
index
:
Number
,
priceType
:
Number
,
// 1全包价,0清关费+运费
unitList
:{
type
:
Array
,
default
:
[]
},
currencyList
:{
type
:
Array
,
default
:
[]
},
showAdd
:
Boolean
,
readonly
:
Boolean
,
value
:{
type
:
Object
,
default
:
()
=>
{
return
{
}
}
}
},
created
()
{
this
.
initSpecialPrice
()
},
data
(){
return
{
}
},
methods
:{
getDictDatas
,
// 初始化特需加价
initSpecialPrice
(){
if
(
!
this
.
value
.
specialList
){
this
.
$set
(
this
.
value
,
'
specialList
'
,
[])
}
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
).
forEach
(
item
=>
{
if
(
!
this
.
value
.
specialList
.
find
(
special
=>
special
.
specialDictType
==
item
.
value
)){
this
.
value
.
specialList
.
push
({
allPrice
:
undefined
,
// 新建默认给0,否则默认是null
allPriceUnit
:
this
.
value
[
`allPriceUnit`
],
allVolumeUnit
:
this
.
value
[
`allVolumeUnit`
],
transportPrice
:
undefined
,
// 新建默认给0,否则默认是null
transportPriceUnit
:
this
.
value
[
`transportPriceUnit`
],
transportVolumeUnit
:
this
.
value
[
`transportVolumeUnit`
],
clearancePrice
:
undefined
,
clearancePriceUnit
:
this
.
value
[
`clearancePriceUnit`
],
clearanceVolumeUnit
:
this
.
value
[
`clearanceVolumeUnit`
],
specialDictType
:
item
.
value
})
}
})
},
// 校验
validate
(){
let
valid
=
true
const
index
=
this
.
index
// 区间设置检查
if
(
index
>
0
&&
!
this
.
value
.
startNum
){
valid
=
false
this
.
$message
.
error
(
`请设置第
${
index
+
1
}
阶段的起始值`
)
}
if
(
!
this
.
value
.
endNum
){
valid
=
false
this
.
$message
.
error
(
`请设置第
${
index
+
1
}
阶段的结束值`
)
}
// 价格检查
if
(
this
.
priceType
){
if
(
!
this
.
validatePrice
(
this
.
value
[
`allPrice`
])){
valid
=
false
this
.
$message
.
error
(
`请设置第
${
index
+
1
}
阶段的全包价`
)
}
}
else
{
if
(
!
this
.
validatePrice
(
this
.
value
[
`transportPrice`
])){
valid
=
false
this
.
$message
.
error
(
`请设置第
${
index
+
1
}
阶段的运费`
)
}
if
(
!
this
.
validatePrice
(
this
.
value
[
`clearancePrice`
])){
valid
=
false
this
.
$message
.
error
(
`请设置第
${
index
+
1
}
阶段的清关费`
)
}
}
return
valid
},
// 校验价格是否为空,可以是0
validatePrice
(
value
){
if
(
value
===
undefined
||
value
===
null
||
value
===
''
){
return
false
}
return
true
},
}
}
</
script
>
<
template
>
<div>
<div
style=
"font-size:14px; margin:10px 0"
>
{{
$t
(
'
第{index
}
阶梯定价方案
'
,
{
index
:
index
+
1
}
)
}}
:
<
template
v
-
if
=
"
showAdd
"
>
<
el
-
link
type
=
"
primary
"
@
click
.
native
=
"
$emit('add', fieldPrefix)
"
>
{{
$t
(
'
添加区间
'
)
}}
<
/el-link
>
<
el
-
divider
direction
=
"
vertical
"
><
/el-divider
>
<
el
-
link
type
=
"
danger
"
@
click
.
native
=
"
$emit( 'delete', index)
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-link
>
<
/template
>
<
/div
>
<
el
-
form
-
item
:
label
=
"
$t('第{index
}
阶梯', {index: index+1
}
)
"
>
<
el
-
input
-
number
v
-
model
=
"
value.startNum
"
:
controls
=
"
false
"
class
=
"
w-100
"
><
/el-input-number
>
-
<
el
-
input
-
number
v
-
model
=
"
value.endNum
"
:
controls
=
"
false
"
class
=
"
w-100
"
><
/el-input-number
>
/
<
selector
:
disabled
=
"
index>0
"
v
-
model
=
"
value.weightUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
@
input
=
"
$emit('changeUnit', {
value: $event,
field: 'weightUnit',
type: fieldPrefix
}
)
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
v
-
if
=
"
!priceType
"
>
<
el
-
input
-
number
v
-
model
=
"
value[`transportPrice`]
"
:
placeholder
=
"
$t('整数或者两位小数')
"
:
precision
=
"
2
"
:
controls
=
"
false
"
class
=
"
w-100 mr-10
"
/>
<
selector
:
disabled
=
"
index>0
"
v
-
model
=
"
value[`transportPriceUnit`]
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
@
input
=
"
$emit('changeUnit', {
value: $event,
field: `transportPriceUnit`
}
)
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
/
<
selector
:
disabled
=
"
index>0
"
v
-
model
=
"
value[`transportVolumeUnit`]
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
@
input
=
"
$emit('changeUnit', {
value: $event,
field: `transportVolumeUnit`
}
)
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认清关费')
"
v
-
if
=
"
!priceType
"
>
<
el
-
input
-
number
v
-
model
=
"
value[`clearancePrice`]
"
:
placeholder
=
"
$t('整数或者两位小数')
"
:
precision
=
"
2
"
:
controls
=
"
false
"
class
=
"
w-100 mr-10
"
/>
<
selector
:
disabled
=
"
index>0
"
v
-
model
=
"
value[`clearancePriceUnit`]
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
@
input
=
"
$emit('changeUnit', {
value: $event,
field: `clearancePriceUnit`
}
)
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
/
<
selector
:
disabled
=
"
index>0
"
v
-
model
=
"
value[`clearanceVolumeUnit`]
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
@
input
=
"
$emit('changeUnit', {
value: $event,
field: `clearanceVolumeUnit`
}
)
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
priceType
"
>
<
el
-
input
-
number
v
-
model
=
"
value[`allPrice`]
"
:
placeholder
=
"
$t('整数或者两位小数')
"
:
precision
=
"
2
"
:
controls
=
"
false
"
class
=
"
w-100 mr-10
"
/>
<
selector
:
disabled
=
"
index>0
"
v
-
model
=
"
value[`allPriceUnit`]
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
@
input
=
"
$emit('changeUnit', {
value: $event,
field: `allPriceUnit`
}
)
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
/
<
selector
:
disabled
=
"
index>0
"
v
-
model
=
"
value[`allVolumeUnit`]
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
@
input
=
"
$emit('changeUnit', {
value: $event,
field: `allVolumeUnit`
}
)
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
<
/el-form-item
>
<!--
特性加价
-->
<
template
v
-
for
=
"
(special, specialIndex) in value.specialList
"
>
<
div
:
key
=
"
specialIndex + 'transport'
"
>
<
el
-
form
-
item
v
-
if
=
"
!priceType
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')
"
>
<
el
-
input
-
number
v
-
model
.
number
=
"
special[`transportPrice`]
"
:
controls
=
"
false
"
:
min
=
"
0
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
selector
disabled
v
-
model
=
"
special[`transportPriceUnit`]
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
disabled
v
-
model
=
"
special[`transportVolumeUnit`]
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
v
-
if
=
"
!priceType
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')
"
>
<
el
-
input
-
number
v
-
model
.
number
=
"
special[`clearancePrice`]
"
:
controls
=
"
false
"
:
min
=
"
0
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
selector
disabled
v
-
model
=
"
special[`clearancePriceUnit`]
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
disabled
v
-
model
=
"
special[`clearanceVolumeUnit`]
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
v
-
if
=
"
priceType
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')
"
>
<
el
-
input
-
number
v
-
model
.
number
=
"
special[`allPrice`]
"
:
controls
=
"
false
"
:
min
=
"
0
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
selector
disabled
v
-
model
=
"
special[`allPriceUnit`]
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
disabled
v
-
model
=
"
special[`allVolumeUnit`]
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
/div
>
<
/template
>
<
/div
>
<
/template
>
<
style
scoped
lang
=
"
scss
"
>
.
bold
{
font
-
weight
:
bold
;
}
.
text
-
lg
{
font
-
size
:
1.3
rem
;
}
.
tips
{
font
-
size
:
1
rem
;
color
:
red
;
}
<
/style
>
src/views/ecw/productPrice/edit.vue
View file @
87adf6bb
...
@@ -92,154 +92,50 @@
...
@@ -92,154 +92,50 @@
:label=
"$t('最小起计量')"
:label=
"$t('最小起计量')"
:prop=
"`minWeight`"
:prop=
"`minWeight`"
>
>
<
inputor
default2=
"0"
v-model.number=
"form.minWeight"
type=
"number"
class=
"w-100"
:rules=
"{validator: priceValidator, trigger: 'blur', message: '数量错误'}
"
/>
<
el-input-number
v-model=
"form.minWeight"
type=
"number"
class=
"w-100"
:controls=
"false
"
/>
/
<selector
v-model=
"form.minWeightUnit"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100"
disabled
/>
/
<selector
v-model=
"form.minWeightUnit"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
value-field=
"id"
defaultable2
class=
"w-100"
disabled
/>
</el-form-item>
</el-form-item>
<!--阶梯定价-->
</el-col>
<
template
v-if=
"form.stepPrice==1"
>
<el-col
:span=
"12"
>
<div
v-for=
"(item, index) in form.priceStepList"
:key=
"index"
>
<quick-set
:value=
"form"
type=
"sea"
:unit-list=
"unitList"
:currency-list=
"currencyList"
></quick-set>
<div
style=
"font-size:14px; margin:10px 0"
>
</el-col>
{{
$t
(
'
第{index
}
阶梯定价方案
'
,
{
index
:
index
+
1
}
)
}}
:
</el-row>
<
template
v
-
if
=
"
index == form.priceStepList.length - 1 && !readonly
"
>
<
el
-
link
type
=
"
primary
"
@
click
.
native
=
"
addStepPrice
"
>
{{
$t
(
'
添加区间
'
)
}}
<
/el-link
>
<
el
-
divider
direction
=
"
vertical
"
><
/el-divider
>
<
el
-
link
type
=
"
danger
"
@
click
.
native
=
"
form.priceStepList.splice(index, 1)
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-link
>
<
/template
>
<
/div
>
<
el
-
form
-
item
:
label
=
"
$t('第{index
}
阶梯', {index: index + 1
}
)
"
>
<
el
-
input
v
-
model
=
"
item.startNum
"
type
=
"
number
"
placeholder
=
""
class
=
"
w-100
"
><
/el-input
>
-
<
el
-
input
v
-
model
=
"
item.endNum
"
type
=
"
number
"
placeholder
=
""
class
=
"
w-100
"
><
/el-input
>
/
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.weightUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
v
-
if
=
"
form.priceType != 1
"
:
prop
=
"
`priceStepList.${index
}
.transportPrice`
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.transportVolumeUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" class="w-100" /
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认清关费')
"
v
-
if
=
"
form.priceType != 1 && type != 'air'
"
:
prop
=
"
`priceStepList.${index
}
.transportPrice`
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
/>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.clearancePriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
/ <selector disabled @input="syncAllUnit" v-model="item.clearanceVolumeUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" class="w-100" /
>
<
/el-form-item
>
<
el
-
form
-
item
<!--如果是阶梯价-->
:
label
=
"
$t('默认全包价')
"
<
template
v-if=
"form.stepPrice"
>
v
-
if
=
"
form.priceType == 1
"
<div
v-for=
"(item, index) in form.priceStepList"
:key=
"index"
>
:
prop
=
"
`priceStepList.${index
}
.allPrice`
"
<sea-step
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
ref=
"stepPrice"
>
:index=
"index"
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
:price-type=
"form.priceType"
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
/>
:currency-list=
"currencyList"
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.allVolumeUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" class="w-100" /
>
:unit-list=
"unitList"
<
/el-form-item
>
:show-add=
"index === form.priceStepList.length -1 && !readonly"
:value=
"item"
:readonly=
"readonly"
@
add=
"handleAddPrice($event)"
@
delete=
"handleDeletePrice($event)"
@
changeUnit=
"handleUnitChange(index, $event)"
></sea-step>
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<
el
-
form
-
item
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
prop
=
"
allPrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<sea-price
<
selector
test
=
"
allPriceUnit
"
v
-
model
=
"
form.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100 mr-10 aaa
"
/>
ref=
"seaPrice"
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr10
"
/>
:price-type=
"form.priceType"
<
span
class
=
"
mr-10
"
>
/</
span
>
:currency-list=
"currencyList"
<
selector
v
-
model
=
"
form.allVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
:unit-list=
"unitList"
<
/el-form-item
>
:value=
"form"
<
template
v
-
else
>
:readonly=
"readonly"
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
prop
=
"
transportPrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
@
changeUnit=
"handleFormUniChange($event)"
<
selector
v
-
model
=
"
form.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100 mr-10
"
/>
></sea-price>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
v
-
model
=
"
form.transportVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
v
-
if
=
"
type != 'air'
"
:
label
=
"
$t('默认清关费')
"
prop
=
"
clearancePrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
v
-
model
=
"
form.clearancePriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100 mr-10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
disabled
v
-
model
=
"
form.clearanceVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
<
/el-form-item
>
</
template
>
</
template
>
<
/template
>
<!--
特需
-->
<
template
v
-
if
=
"
form.priceType==1
"
>
<
el
-
form
-
item
v
-
for
=
"
(special, specialIndex) in this.form.specialList
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')
"
:
key
=
"
specialIndex + 'transport'
"
:
prop
=
"
`specialList.${specialIndex
}
`.allPrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
disabled
v
-
model
=
"
special.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
disabled
v
-
model
=
"
special.allVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
/template
>
<
template
v
-
else
v
-
for
=
"
(special, specialIndex) in this.form.specialList
"
>
<
el
-
form
-
item
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')
"
:
key
=
"
specialIndex + 'transport'
"
:
prop
=
"
`specialList.${specialIndex
}
.transportPrice`
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
disabled
v
-
model
=
"
special.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
disabled
v
-
model
=
"
special.transportVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
v
-
if
=
"
type != 'air'
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')
"
:
key
=
"
specialIndex + 'clearance'
"
:
prop
=
"
`specialList.${specialIndex
}
.clearancePrice`
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
disabled
v
-
model
=
"
special.clearancePriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
disabled
v
-
model
=
"
special.clearanceVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
/template
>
<el-form-item
:label=
"$t('价格有效期')"
>
<el-form-item
:label=
"$t('价格有效期')"
>
<el-date-picker
v-model=
"form.validateStartDate"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
<el-date-picker
v-model=
"form.validateStartDate"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
-
-
<el-date-picker
v-model=
"form.validateEndDate"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
<el-date-picker
v-model=
"form.validateEndDate"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
</el-form-item>
<
/el-col
>
<!--
编辑的时候右侧显示快捷设置,查看的时候空运显示商品清关费
-->
<
el
-
col
:
span
=
"
12
"
v
-
if
=
"
!readonly
"
>
<
h2
>
{{
$t
(
'
快捷设置
'
)
}}
<
/h2
>
<
div
class
=
"
flex items-center
"
>
{{
$t
(
'
批量加价
'
)
}}
+
<
el
-
input
v
-
model
=
"
quickForm.plus
"
class
=
"
w-100 ml-10 mr-10
"
:
disabled
=
"
!!quickForm.minus
"
><
/el-input
>
<
selector
disabled
v
-
model
=
"
currencyAndUnit.currency
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
/ <selector disabled v-model="currencyAndUnit.unit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" class="w-100" /
>
<
div
class
=
"
ml-10
"
>
{{
$t
(
'
*针对所有价格加价
'
)
}}
<
/div
>
<
/div
>
<
div
class
=
"
flex items-center mt-10
"
>
{{
$t
(
'
批量减价
'
)
}}
-
<
el
-
input
v
-
model
=
"
quickForm.minus
"
class
=
"
w-100 ml-10 mr-10
"
:
disabled
=
"
!!quickForm.plus
"
><
/el-input
>
<
selector
disabled
v
-
model
=
"
currencyAndUnit.currency
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
class
=
"
w-100
"
/>
/ <selector disabled v-model="currencyAndUnit.unit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" class="w-100" /
>
<
div
class
=
"
ml-10
"
>
{{
$t
(
'
*针对所有价格减价
'
)
}}
<
/div
>
<
/div
>
<
div
class
=
"
mt-10
"
>
<
el
-
button
@
click
=
"
quickSet
"
type
=
"
primary
"
:
disabled
=
"
!quickForm.plus && !quickForm.minus
"
>
{{
$t
(
'
确定
'
)
}}
<
/el-button
>
<
/div
>
<
/el-col
>
<!--
甲方要求不显示清关费
https
:
//zentao.test.jdshangmen.com/bug-view-5298.html
-->
<!--
<
el
-
col
:
span
=
"
12
"
v
-
else
-
if
=
"
readonly && type === 'air'
"
>
&
lt
;
!&
ndash
;
商品清关费
&
ndash
;
&
gt
;
<
h2
>
{{
$t
(
'
商品清关费价格
'
)
}}
<
/h2
>
<
packaging
-
type
v
-
if
=
"
product && product.priceStepClearanceList && product.priceStepClearanceList.length
"
:
value
=
"
product
"
key
-
arr
=
"
priceStepClearanceList
"
readonly
/>
<
div
v
-
else
>
{{
$t
(
'
未设置清关费
'
)
}}
<
/div
>
<
/el-col>--
>
<
/el-row
>
</el-card>
</el-card>
...
@@ -271,6 +167,7 @@
...
@@ -271,6 +167,7 @@
<el-form-item
:label=
"$t('是否单询')"
prop=
"inquiry"
>
<el-form-item
:label=
"$t('是否单询')"
prop=
"inquiry"
>
<dict-selector
:type=
"DICT_TYPE.NEED_ORDER_INQUIRY"
v-model=
"form.needOrderInquiry"
form-type=
"radio"
formatter=
"number"
></dict-selector>
<dict-selector
:type=
"DICT_TYPE.NEED_ORDER_INQUIRY"
v-model=
"form.needOrderInquiry"
form-type=
"radio"
formatter=
"number"
></dict-selector>
</el-form-item>
</el-form-item>
</el-card>
</el-card>
</el-form>
</el-form>
...
@@ -287,86 +184,10 @@
...
@@ -287,86 +184,10 @@
<div
style=
"margin: 20px 0"
>
<div
style=
"margin: 20px 0"
>
<el-button
@
click=
"submitForm"
type=
"primary"
v-if=
"!readonly"
:loading=
"loading"
>
{{$t('确认提交')}}
</el-button>
<el-button
@
click=
"submitForm"
type=
"primary"
v-if=
"!readonly"
:loading=
"loading"
>
{{$t('确认提交')}}
</el-button>
<el-button
type=
"default"
@
click=
"$router.back()"
>
{{$t('返回上一页')}}
</el-button>
<el-button
type=
"default"
@
click=
"$router.back()"
>
{{$t('返回上一页')}}
</el-button>
<
el
-
button
@
click
=
"
showLogsDialog=true
"
type
=
"
primary
"
v
-
if
=
"
readonly
"
>
{{
$t
(
'
查看价格日志
'
)
}}
<
/el-button
>
<el-button
@
click=
"showLogs"
type=
"primary"
v-if=
"readonly"
>
{{$t('查看价格日志')}}
</el-button>
<
/div
>
<
el
-
dialog
:
title
=
"
$t('查看价格日志')
"
:
visible
=
"
showLogsDialog
"
:
before
-
close
=
"
closeLogsDialog
"
width
=
"
1000px
"
>
<
el
-
table
:
data
=
"
logs
"
>
<
el
-
table
-
column
:
label
=
"
$t('序号')
"
type
=
"
index
"
><
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('修改人')
"
prop
=
"
creatorName
"
width
=
"
200px
"
><
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('修改时间')
"
>
<
template
slot
-
scope
=
"
{row
}
"
>
{{
row
.
createTime
|
parseTime
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('修改前')
"
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
div
>
{{
$t
(
'
预付
'
)
}}
:
<
dict
-
tag
:
type
=
"
DICT_TYPE.ECW_PAY_ADVANCE
"
:
value
=
"
row.detail.needPay
"
/><
/div
>
<
div
>
{{
$t
(
'
单价模式
'
)
}}
:
<
dict
-
tag
:
type
=
"
DICT_TYPE.ECW_PRICE_TYPE
"
:
value
=
"
row.detail.priceType
"
/><
/div
>
<
div
v
-
if
=
"
row.detail.minWeight
"
>
{{
$t
(
'
最小起计量
'
)
}}
:
{{
row
.
detail
.
minWeight
}}
{{
unitMap
[
row
.
detail
.
minWeightUnit
]
}}
<
/div
>
<!--
--
阶梯定价
-->
<
template
v
-
if
=
"
row.detail.stepPrice == 1
"
>
<
template
v
-
for
=
"
(item, index) in row.detail.priceStepList
"
>
<
div
class
=
"
mt-10
"
>
第
{{
index
+
1
}}
阶段
{{
item
.
startNum
}}
-
{{
item
.
endNum
}}
{{
unitMap
[
item
.
weightUnit
]
}}
<
/div
>
<
template
v
-
if
=
"
row.detail.priceType != 1
"
>
<
div
:
key
=
"
index + '_freight'
"
class
=
"
pl-10
"
>
运费:
{{
item
.
transportPrice
}}
{{
currencyMap
[
item
.
transportPriceUnit
]
}}
/
{{
unitMap
[
item
.
transportVolumeUnit
]
}}
<
/div
>
<!--
空运没有清关费,
不需要显示
-->
<
div
v
-
if
=
"
type != 'air'
"
:
key
=
"
item.specialDictType + '_clearance'
"
class
=
"
pl-10
"
>
清关费:
{{
item
.
clearancePrice
}}
{{
currencyMap
[
item
.
clearancePriceUnit
]
}}
/
{{
unitMap
[
item
.
clearanceVolumeUnit
]
}}
<
/div
>
<
/template
>
<
div
v
-
else
class
=
"
pl-10
"
>
全包价:
{{
item
.
allPrice
}}
{{
currencyMap
[
item
.
allPriceUnit
]
}}
/
{{
unitMap
[
item
.
allVolumeUnit
]
}}
<
/div
>
<
/template
>
<
/template
>
<
template
v
-
else
>
<
template
v
-
if
=
"
row.detail.priceType != 1
"
>
<
div
>
默认运费:
{{
row
.
detail
.
transportPrice
}}
{{
currencyMap
[
row
.
detail
.
transportPriceUnit
]
}}
/
{{
unitMap
[
row
.
detail
.
transportVolumeUnit
]
}}
<
/div
>
<
div
>
默认清关费:
{{
row
.
detail
.
clearancePrice
}}
{{
currencyMap
[
row
.
detail
.
clearancePriceUnit
]
}}
/
{{
unitMap
[
row
.
detail
.
clearanceVolumeUnit
]
}}
<
/div
>
<
/template
>
<
div
v
-
else
>
全包价:
{{
row
.
detail
.
allPrice
}}
{{
currencyMap
[
row
.
detail
.
allPriceUnit
]
}}
/
{{
unitMap
[
row
.
detail
.
allVolumeUnit
]
}}
</div>
</div>
<
template
v
-
for
=
"
(item, index) in row.detail.specialList
"
>
<logs
ref=
"logs"
></logs>
<
template
v
-
if
=
"
row.detail.priceType != 1
"
>
<
div
:
key
=
"
item.specialDictType + '_freight'
"
>
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
,
item
.
specialDictType
)
}}
运费:
{{
item
.
transportPrice
}}
{{
currencyMap
[
item
.
transportPriceUnit
]
}}
/
{{
unitMap
[
item
.
transportVolumeUnit
]
}}
<
/div
>
<
div
:
key
=
"
item.specialDictType + '_clearance'
"
>
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
,
item
.
specialDictType
)
}}
清关费:
{{
item
.
clearancePrice
}}
{{
currencyMap
[
item
.
clearancePriceUnit
]
}}
/
{{
unitMap
[
item
.
clearanceVolumeUnit
]
}}
<
/div
>
<
/template
>
<
div
v
-
else
>
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
,
item
.
specialDictType
)
}}
全包价:
{{
item
.
allPrice
}}
{{
currencyMap
[
item
.
allPriceUnit
]
}}
/
{{
unitMap
[
item
.
allVolumeUnit
]
}}
<
/div
>
<
/template
>
<
/template
>
<
div
v
-
if
=
"
row.detail.validateStartDate || row.detail.validateStartDate
"
>
有效期
:{{
row
.
detail
.
validateStartDate
|
parseTime
}}
-
{{
row
.
detail
.
validateEndDate
|
parseTime
}}
<
/div
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
/el-dialog
>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -385,8 +206,20 @@ import Decimal from "decimal.js";
...
@@ -385,8 +206,20 @@ import Decimal from "decimal.js";
import
{
getChannel
}
from
"
@/api/ecw/channel
"
;
import
{
getChannel
}
from
"
@/api/ecw/channel
"
;
import
PackagingType
from
"
@/views/ecw/channel/componrnts/packaging-type.vue
"
;
import
PackagingType
from
"
@/views/ecw/channel/componrnts/packaging-type.vue
"
;
import
{
getStatusName
}
from
'
./util
'
import
{
getStatusName
}
from
'
./util
'
import
QuickSet
from
"
./components/QuickSet.vue
"
import
Logs
from
"
@/views/ecw/productPrice/components/Logs.vue
"
;
import
SeaStep
from
"
@/views/ecw/productPrice/components/SeaStep.vue
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
import
SeaPrice
from
"
@/views/ecw/productPrice/components/SeaPrice.vue
"
;
const
DEFAULT_PRICE_UNIT
=
1
const
DEFAULT_VOLUME_UNIT
=
7
const
DEFAULT_WEIGHT_UNIT
=
7
export
default
{
export
default
{
components
:
{
PackagingType
,
RoutersSelector
,
ProductSelector
,
Selector
,
Inputor
}
,
components
:
{
SeaPrice
,
Template
,
Logs
,
QuickSet
,
PackagingType
,
RoutersSelector
,
ProductSelector
,
Selector
,
Inputor
,
SeaStep
},
filters
:
{
parseTime
},
filters
:
{
parseTime
},
data
()
{
data
()
{
return
{
return
{
...
@@ -401,9 +234,6 @@ export default {
...
@@ -401,9 +234,6 @@ export default {
},
},
needPay
:
false
,
// 是否需要预付
needPay
:
false
,
// 是否需要预付
stepPrice
:
false
,
// 是否阶梯订单
stepPrice
:
false
,
// 是否阶梯订单
// specialProducts: [],
// priceStepList: [
{
}
,{
}
],
// 阶梯价格
// specialList:[], // 特殊需求,默认四个
rules
:
{
rules
:
{
transportPrice
:
[{
required
:
true
,
message
:
this
.
$t
(
"
海运费不能为空
"
),
trigger
:
"
blur
"
}],
transportPrice
:
[{
required
:
true
,
message
:
this
.
$t
(
"
海运费不能为空
"
),
trigger
:
"
blur
"
}],
clearancePrice
:
[{
required
:
true
,
message
:
this
.
$t
(
"
清关费不能为空
"
),
trigger
:
"
blur
"
}],
clearancePrice
:
[{
required
:
true
,
message
:
this
.
$t
(
"
清关费不能为空
"
),
trigger
:
"
blur
"
}],
...
@@ -418,10 +248,6 @@ export default {
...
@@ -418,10 +248,6 @@ export default {
readonly
:
false
,
readonly
:
false
,
lineList
:
[],
//路线数组
lineList
:
[],
//路线数组
loading
:
false
,
loading
:
false
,
showLogsDialog
:
false
,
// 显示价格日志弹层
logs
:
[],
// 批量加价/减价
quickForm
:{
}
,
// 快速加价/减价表单
// 渠道信息
// 渠道信息
channel
:
null
channel
:
null
}
}
...
@@ -470,11 +296,6 @@ export default {
...
@@ -470,11 +296,6 @@ export default {
},
},
watch
:
{
watch
:
{
showLogsDialog
(
showLogsDialog
){
if
(
showLogsDialog
){
this
.
laodLogs
()
}
}
,
checkList
()
{
//选择路线
checkList
()
{
//选择路线
if
(
this
.
checkList
.
length
>
0
)
{
if
(
this
.
checkList
.
length
>
0
)
{
this
.
form
.
lineChannelList
=
this
.
checkList
.
map
(
item
=>
{
this
.
form
.
lineChannelList
=
this
.
checkList
.
map
(
item
=>
{
...
@@ -498,58 +319,17 @@ export default {
...
@@ -498,58 +319,17 @@ export default {
}
}
},
},
form
(
val
)
{
if
(
!
val
)
return
// 特殊需求回显
if
(
val
.
specialList
)
{
val
.
specialList
.
forEach
(
item
=>
{
let
index
=
this
.
form
.
specialList
.
findIndex
(
special
=>
special
.
specialDictType
==
item
.
specialDictType
)
if
(
index
>
-
1
)
this
.
form
.
specialList
[
index
]
=
item
}
)
}
}
,
'
form.priceType
'
(
priceType
){
'
form.priceType
'
(
priceType
){
// 切换全包价的时候给默认货币单位,如果是回填则不需要给默认值
if
(
priceType
==
1
&&
!
this
.
form
.
allPrice
){
this
.
$set
(
this
.
form
,
'
allPriceUnit
'
,
1
)
}
this
.
syncAllUnit
(
'
watch:form.priceType
'
)
}
,
'
form.minWeightUnit
'
(
minWeightUnit
){
console
.
log
(
'
最小起计量单位
'
,
minWeightUnit
)
}
,
'
form.transportVolumeUnit
'
(
transportVolumeUnit
){
// 最小其计量
this
.
$set
(
this
.
form
,
'
minWeightUnit
'
,
transportVolumeUnit
)
this
.
syncSpecialUnit
({
transportVolumeUnit
}
)
this
.
form
.
clearanceVolumeUnit
=
transportVolumeUnit
// 清关费体积单位同步运费体积单位
}
,
'
form.clearanceVolumeUnit
'
(
clearanceVolumeUnit
){
this
.
syncSpecialUnit
({
clearanceVolumeUnit
}
)
}
,
'
form.transportPriceUnit
'
(
transportPriceUnit
){
this
.
syncSpecialUnit
({
transportPriceUnit
}
)
}
,
'
form.clearancePriceUnit
'
(
clearancePriceUnit
){
this
.
syncSpecialUnit
({
clearancePriceUnit
}
)
}
,
'
form.allPriceUnit
'
(
allPriceUnit
){
this
.
syncSpecialUnit
({
allPriceUnit
}
)
}
,
'
form.allVolumeUnit
'
(
allVolumeUnit
){
// 最小起计量
this
.
$set
(
this
.
form
,
'
minWeightUnit
'
,
allVolumeUnit
)
this
.
syncSpecialUnit
({
allVolumeUnit
}
)
},
},
'
form.needBook
'
(
val
){
'
form.needBook
'
(
val
){
if
(
val
)
this
.
$set
(
this
.
form
,
'
dayLimit
'
,
10000
)
if
(
val
)
this
.
$set
(
this
.
form
,
'
dayLimit
'
,
10000
)
else
delete
this
.
form
.
dayLimit
else
delete
this
.
form
.
dayLimit
},
},
'
form.stepPrice
'
(
stepPrice
){
'
form.stepPrice
'
(
stepPrice
){
if
(
stepPrice
==
1
&&
(
!
this
.
form
.
priceStepList
||
!
this
.
form
.
priceStepList
.
length
)
){
if
(
stepPrice
==
1
&&
!
this
.
form
.
priceStepList
?.
length
){
this
.
$set
(
this
.
form
,
'
priceStepList
'
,
[{
}
,{
}
]
)
this
.
handleAddPrice
(
"
priceStepList
"
)
}
}
this
.
syncAllUnit
(
'
watch:form.stepPrice
'
)
this
.
stepPrice
=
!!
stepPrice
this
.
stepPrice
=
!!
stepPrice
},
},
needPay
(
val
){
needPay
(
val
){
...
@@ -558,29 +338,15 @@ export default {
...
@@ -558,29 +338,15 @@ export default {
stepPrice
(
val
){
stepPrice
(
val
){
this
.
$set
(
this
.
form
,
'
stepPrice
'
,
val
?
1
:
0
)
this
.
$set
(
this
.
form
,
'
stepPrice
'
,
val
?
1
:
0
)
},
},
selectedRoutes
(
routers
)
{
let
transportIds
=
[]
routers
.
forEach
(
item
=>
{
item
.
shippingChannelId
=
item
.
channelId
transportIds
.
push
(
+
item
.
transportId
)
}
)
// 如果只选择了空运(3),则默认体积单位改成千克
transportIds
=
new
Set
(
transportIds
)
console
.
log
(
transportIds
)
window
.
transportIds
=
transportIds
if
(
transportIds
.
size
==
1
&&
transportIds
.
has
(
3
)){
this
.
setDefaultVolumeUnit
(
6
)
}
else
this
.
setDefaultVolumeUnit
(
7
)
}
},
},
async
created
()
{
async
created
()
{
this
.
currencyList
=
(
await
getCurrencyList
())?.
data
||
[]
this
.
unitList
=
(
await
getUnitList
())?.
data
||
[]
this
.
productTypeList
=
(
await
getProductTypeList
())?.
data
||
[]
if
(
this
.
$route
.
query
.
readonly
){
if
(
this
.
$route
.
query
.
readonly
){
this
.
readonly
=
true
this
.
readonly
=
true
}
}
if
(
this
.
type
==
'
air
'
){
this
.
stepPrice
=
true
}
const
defaultVolumeUnit
=
this
.
type
===
'
air
'
?
6
:
7
const
defaultVolumeUnit
=
this
.
type
===
'
air
'
?
6
:
7
const
defaultPriceUnit
=
1
const
defaultPriceUnit
=
1
...
@@ -694,12 +460,6 @@ export default {
...
@@ -694,12 +460,6 @@ export default {
if
(
!
this
.
$route
.
query
.
action
||
this
.
$route
.
query
.
action
==
'
batchUpdate
'
){
if
(
!
this
.
$route
.
query
.
action
||
this
.
$route
.
query
.
action
==
'
batchUpdate
'
){
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
// 默认体积单位,空运为千克,海运为立方米
console
.
log
(
'
指定默认单位
'
,
this
.
type
===
'
air
'
?
6
:
7
)
this
.
setDefaultVolumeUnit
(
this
.
type
===
'
air
'
?
6
:
7
)
// 默认货币单位(美元)
this
.
setDefaultPriceUnit
(
1
)
// 空运默认的阶梯重量单位是千克
// 空运默认的阶梯重量单位是千克
if
(
this
.
type
===
'
air
'
){
if
(
this
.
type
===
'
air
'
){
this
.
$set
(
this
.
form
.
priceStepList
[
0
],
'
weightUnit
'
,
6
)
this
.
$set
(
this
.
form
.
priceStepList
[
0
],
'
weightUnit
'
,
6
)
...
@@ -714,16 +474,6 @@ export default {
...
@@ -714,16 +474,6 @@ export default {
this
.
$set
(
this
.
form
,
'
productId
'
,
+
this
.
$route
.
query
.
product_id
)
this
.
$set
(
this
.
form
,
'
productId
'
,
+
this
.
$route
.
query
.
product_id
)
}
}
// 显示渠道(修改或者从异常处理等进入携带了渠道参数)
if
(
this
.
form
.
shippingChannelId
&&
this
.
type
==
'
air
'
){
getChannel
(
this
.
form
.
shippingChannelId
).
then
(
res
=>
{
this
.
channel
=
res
.
data
}
)
}
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
).
forEach
(
item
=>
{
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
).
forEach
(
item
=>
{
if
(
!
this
.
form
.
specialList
.
find
(
special
=>
special
.
specialDictType
==
item
.
value
)){
if
(
!
this
.
form
.
specialList
.
find
(
special
=>
special
.
specialDictType
==
item
.
value
)){
this
.
form
.
specialList
.
push
({
this
.
form
.
specialList
.
push
({
...
@@ -739,72 +489,67 @@ export default {
...
@@ -739,72 +489,67 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
// 同步全部单位
handleAddPrice
(){
syncAllUnit
(
from
){
if
(
!
this
.
form
.
priceStepList
){
let
obj
=
this
.
form
.
stepPrice
==
1
?
this
.
form
.
priceStepList
[
0
]
:
this
.
form
this
.
$set
(
this
.
form
,
'
priceStepList
'
,
[])
let
fields
=
{
}
}
// 全包价
let
allPriceUnit
=
DEFAULT_PRICE_UNIT
if
(
this
.
form
.
priceType
==
1
){
let
allVolumeUnit
=
DEFAULT_VOLUME_UNIT
fields
=
{
let
transportPriceUnit
=
DEFAULT_PRICE_UNIT
allPriceUnit
:
obj
[
'
allPriceUnit
'
],
let
transportVolumeUnit
=
DEFAULT_VOLUME_UNIT
allVolumeUnit
:
obj
[
'
allVolumeUnit
'
]
let
clearancePriceUnit
=
DEFAULT_PRICE_UNIT
}
let
clearanceVolumeUnit
=
DEFAULT_VOLUME_UNIT
}
else
{
let
weightUnit
=
DEFAULT_WEIGHT_UNIT
fields
=
{
transportPriceUnit
:
obj
.
transportPriceUnit
,
if
(
this
.
form
.
priceStepList
?.
length
){
transportVolumeUnit
:
obj
.
transportVolumeUnit
,
const
first
=
this
.
form
.
priceStepList
[
0
]
clearancePriceUnit
:
obj
.
clearancePriceUnit
,
allPriceUnit
=
first
.
allPriceUnit
clearanceVolumeUnit
:
obj
.
transportVolumeUnit
,
// 清关费和运费的体积单位同步
allVolumeUnit
=
first
.
allVolumeUnit
}
transportPriceUnit
=
first
.
transportPriceUnit
}
transportVolumeUnit
=
first
.
transportVolumeUnit
clearancePriceUnit
=
first
.
clearancePriceUnit
// 阶梯价还需要同步阶梯的重量单位
clearanceVolumeUnit
=
first
.
clearanceVolumeUnit
if
(
this
.
form
.
stepPrice
==
1
){
weightUnit
=
first
.
weightUnit
fields
[
'
weightUnit
'
]
=
obj
.
weightUnit
}
}
this
.
form
.
priceStepList
.
push
({
console
.
log
(
'
-> 同步特需单位
'
,
fields
,
{
from
}
)
allPriceUnit
,
this
.
syncSpecialUnit
(
fields
)
allVolumeUnit
,
}
,
transportPriceUnit
,
// 同步特需的货币单位和体积单位
transportVolumeUnit
,
syncSpecialUnit
(
obj
){
clearancePriceUnit
,
console
.
log
(
'
syncSpecialUnit
'
,
obj
)
clearanceVolumeUnit
,
if
(
!
obj
)
return
weightUnit
:
weightUnit
,
// 同步特需单位
specialList
:[]
this
.
form
.
specialList
.
forEach
(
item
=>
{
Object
.
assign
(
item
,
obj
)
})
})
},
handleDeletePrice
(
index
){
this
.
form
.
priceStepList
.
splice
(
index
,
1
)
},
// 阶梯价更新单位
handleUnitChange
(
index
,
data
){
console
.
log
(
'
handleUnitChange
'
,
...
arguments
)
if
(
index
>
0
)
return
// 如果是阶梯价则需要同步其他阶梯
// 如果是重量单位,且不是清关费想换的,则需要同步最小起计量单位
if
(
this
.
form
.
stepPrice
==
1
&&
this
.
form
.
priceStepList
){
if
(
data
.
field
===
'
weightUnit
'
&&
data
.
type
!=
'
clearance
'
){
this
.
form
.
priceStepList
.
forEach
((
item
,
index
)
=>
{
this
.
form
.
minWeightUnit
=
data
.
value
this
.
$set
(
this
.
form
.
priceStepList
,
index
,
Object
.
assign
(
item
,
obj
))
}
)
}
}
this
.
form
.
priceStepList
.
forEach
(
item
=>
{
// 不是阶梯价需要 同步最小起计量
item
[
data
.
field
]
=
data
.
value
if
(
obj
[
'
transportVolumeUnit
'
]
||
obj
[
'
allVolumeUnit
'
]){
if
(
item
.
specialList
?.
length
){
this
.
$set
(
this
.
form
,
'
minWeightUnit
'
,
obj
[
'
transportVolumeUnit
'
]
||
obj
[
'
allVolumeUnit
'
])
item
.
specialList
.
forEach
(
p
=>
{
p
[
data
.
field
]
=
data
.
value
})
}
}
})
},
},
priceValidator
(
rule
,
value
,
callback
){
// 非阶梯价格更新单位
if
(
!
value
||
value
==
''
)
return
callback
()
handleFormUniChange
(
data
){
value
=
parseFloat
(
value
)
if
(
this
.
form
.
specialList
?.
length
){
if
(
!
value
||
value
<
0
){
this
.
form
.
specialList
.
forEach
(
p
=>
{
return
callback
(
new
Error
(
'
价格错误
'
))
p
[
data
.
field
]
=
data
.
value
})
}
}
callback
()
}
,
setDefaultVolumeUnit
(
unit
){
console
.
log
(
'
设置默认体积单位
'
,
unit
)
this
.
$set
(
this
.
form
,
'
transportVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
clearanceVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
allVolumeUnit
'
,
unit
)
}
,
setDefaultPriceUnit
(
priceUnit
){
console
.
log
(
'
设置默认价格单位
'
,
priceUnit
)
this
.
$set
(
this
.
form
,
'
transportPriceUnit
'
,
priceUnit
)
this
.
$set
(
this
.
form
,
'
clearancePriceUnit
'
,
priceUnit
)
this
.
$set
(
this
.
form
,
'
allPriceUnit
'
,
priceUnit
)
},
},
// force 为是否强制提交,在价格过期的时候需要确认后强制提交
// force 为是否强制提交,在价格过期的时候需要确认后强制提交
submitForm
(
force
=
false
)
{
submitForm
(
force
=
false
)
{
...
@@ -946,46 +691,11 @@ export default {
...
@@ -946,46 +691,11 @@ export default {
}).
finally
(
res
=>
this
.
loading
=
false
);
}).
finally
(
res
=>
this
.
loading
=
false
);
});
});
},
},
closeLogsDialog
(){
showLogs
(){
this
.
showLogsDialog
=
false
if
(
!
this
.
$refs
.
logs
){
}
,
return
this
.
$message
.
error
(
"
未找到组件
"
)
laodLogs
(){
getPriceSnapshotList
(
this
.
form
.
id
).
then
(
res
=>
{
this
.
logs
=
res
.
data
this
.
logs
.
forEach
(
item
=>
{
item
.
detail
=
JSON
.
parse
(
item
.
content
)
}
)
}
)
}
,
// 快捷设置,只更新默认运费
quickSet
(){
// 字段,根据是否全包价来取
let
field
=
this
.
form
.
priceType
==
1
?
'
allPrice
'
:
'
transportPrice
'
// 取得要加的数额(减少则是负数)
let
amount
=
Decimal
(
this
.
quickForm
.
plus
||
-
this
.
quickForm
.
minus
)
this
.
form
.
priceStepList
.
forEach
(
item
=>
{
// 加上对应的价格,但是不能小于0
this
.
$set
(
item
,
field
,
Math
.
max
(
0
,
Decimal
(
item
[
field
]
||
0
).
plus
(
amount
).
toNumber
()))
}
)
}
,
// 添加区间价
addStepPrice
(){
let
fields
=
{
}
const
obj
=
this
.
form
.
priceStepList
[
0
]
||
{
}
if
(
this
.
form
.
priceType
==
1
){
fields
=
{
allPriceUnit
:
obj
[
'
allPriceUnit
'
],
allVolumeUnit
:
obj
[
'
allVolumeUnit
'
]
}
}
else
{
fields
=
{
transportPriceUnit
:
obj
.
transportPriceUnit
,
transportVolumeUnit
:
obj
.
transportVolumeUnit
,
clearancePriceUnit
:
obj
.
clearancePriceUnit
,
clearanceVolumeUnit
:
obj
.
transportVolumeUnit
,
}
}
}
this
.
form
.
priceStepList
.
push
(
fields
)
this
.
$refs
.
logs
.
open
(
this
.
form
.
id
)
}
}
}
}
}
}
...
...
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