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
4e4a145b
Commit
4e4a145b
authored
Jan 07, 2024
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善海运价格编辑和批量设置
parent
161770b9
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
357 additions
and
373 deletions
+357
-373
batchEdit.vue
src/views/ecw/productPrice/batchEdit.vue
+220
-275
SeaPrice.vue
src/views/ecw/productPrice/components/SeaPrice.vue
+113
-98
edit.vue
src/views/ecw/productPrice/edit.vue
+24
-0
No files found.
src/views/ecw/productPrice/batchEdit.vue
View file @
4e4a145b
This diff is collapsed.
Click to expand it.
src/views/ecw/productPrice/components/SeaPrice.vue
View file @
4e4a145b
...
...
@@ -93,7 +93,9 @@ export default {
</
script
>
<
template
>
<div>
<el-row>
<el-col
:span=
"12"
>
<div
class=
"page-title"
>
{{
$t
(
'
海运运费价格设置
'
)
}}
</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
...
...
@@ -120,54 +122,81 @@ export default {
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"
/>
<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[`clearance
PriceUnit`]"
v-model=
"value[`all
PriceUnit`]"
:options=
"currencyList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit',
{
value: $event,
field: `
clearance
PriceUnit`
field: `
all
PriceUnit`
})"
value-field="id"
class="w-100" />
/
<selector
:disabled=
"readonly"
v-model=
"value[`clearance
VolumeUnit`]"
v-model=
"value[`all
VolumeUnit`]"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit',
{
value: $event,
field: `
clearance
VolumeUnit`
field: `
all
VolumeUnit`
})"
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"
/>
<!--特性加价-->
<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[`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
>
</el-col>
<el-col
:span=
"12"
v-if=
"!priceType"
>
<div
class=
"page-title"
>
{{$t('海运清关费价格设置')}}
</div>
<el-form-item
:label=
"$t('默认清关费')"
>
<el-input-number
v-model=
"value[`clearancePrice`]"
:placeholder=
"$t('整数或者两位小数')"
:disabled=
"readonly"
:controls=
"false"
class=
"w-100 mr-10"
/>
<selector
:disabled=
"readonly"
v-model=
"value[`all
PriceUnit`]"
v-model=
"value[`clearance
PriceUnit`]"
:options=
"currencyList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit', {
value: $event,
field: `
all
PriceUnit`
field: `
clearance
PriceUnit`
})"
value-field=
"id"
class=
"w-100"
/>
/
<selector
:disabled=
"readonly"
v-model=
"value[`all
VolumeUnit`]"
v-model=
"value[`clearance
VolumeUnit`]"
:options=
"unitList"
:label-field=
"$l(null, 'title')"
@
input=
"$emit('changeUnit', {
value: $event,
field: `
all
VolumeUnit`
field: `
clearance
VolumeUnit`
})"
value-field=
"id"
class=
"w-100"
/>
...
...
@@ -175,15 +204,7 @@ export default {
<!--特性加价-->
<
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('清关费')"
...
...
@@ -193,18 +214,12 @@ export default {
<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>
</el-col>
</el-row>
</template>
<
style
scoped
lang=
"scss"
>
...
...
src/views/ecw/productPrice/edit.vue
View file @
4e4a145b
...
...
@@ -371,12 +371,14 @@ export default {
if
(
this
.
form
.
stepPrice
===
1
){
this
.
initStepPrice
()
}
this
.
syncMinWeightUnit
()
},
'
form.stepPrice
'
(
stepPrice
){
if
(
this
.
form
.
stepPrice
===
1
){
this
.
initStepPrice
()
}
this
.
stepPrice
=
!!
stepPrice
this
.
syncMinWeightUnit
()
},
needPay
(
val
){
this
.
$set
(
this
.
form
,
'
needPay
'
,
val
?
1
:
0
)
...
...
@@ -521,6 +523,21 @@ export default {
})
},
methods
:
{
// 设置最小起计量单位
syncMinWeightUnit
(){
// 如果是阶梯价
if
(
this
.
form
.
stepPrice
){
const
field
=
this
.
form
.
priceType
===
1
?
"
fullPriceStepList
"
:
"
freightPriceStepList
"
const
stepPriceList
=
this
.
form
[
field
]
if
(
stepPriceList
?.
length
){
this
.
form
.
minWeightUnit
=
stepPriceList
[
0
]?.
weightUnit
||
DEFAULT_WEIGHT_UNIT
}
else
{
this
.
form
.
minWeightUnit
=
DEFAULT_WEIGHT_UNIT
}
}
else
{
this
.
form
.
minWeightUnit
=
this
.
form
[
this
.
form
.
priceType
===
1
?
'
allVolumeUnit
'
:
'
transportVolumeUnit
'
]
||
DEFAULT_WEIGHT_UNIT
}
},
handleAddPrice
(
field
,
fieldPrefix
){
if
(
!
this
.
form
[
field
]){
this
.
$set
(
this
.
form
,
field
,
[])
...
...
@@ -593,11 +610,18 @@ export default {
},
// 非阶梯价格更新单位
handleFormUnitChange
(
data
){
// 海运非阶梯价没有重量单位,所以按照体积单位同步最小起计量单位
if
(
data
.
field
===
'
transportVolumeUnit
'
||
data
.
field
==
'
allVolumeUnit
'
){
this
.
form
.
minWeightUnit
=
data
.
value
}
if
(
this
.
form
.
specialList
?.
length
){
this
.
form
.
specialList
.
forEach
(
p
=>
{
p
[
data
.
field
]
=
data
.
value
})
}
// TODO 等加了包装之后还需要同步包装的单位
},
initStepPrice
(){
if
(
this
.
form
.
priceType
==
1
&&
!
this
.
form
.
fullPriceStepList
?.
length
){
...
...
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