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
a81d99d4
Commit
a81d99d4
authored
Jun 05, 2023
by
邓春圆
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
56796bc1
86ac0e37
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
860 additions
and
400 deletions
+860
-400
App.vue
src/App.vue
+3
-0
order.js
src/api/ecw/order.js
+54
-0
productPrice.js
src/api/ecw/productPrice.js
+10
-1
index.vue
src/components/DictSelector/index.vue
+5
-2
index.vue
src/components/RoutersSelector/index.vue
+57
-23
dict.js
src/utils/dict.js
+2
-0
edit.vue
src/views/ecw/order/edit.vue
+8
-5
index.vue
src/views/ecw/order/index.vue
+14
-1
penddingList.vue
src/views/ecw/order/penddingList.vue
+84
-6
Preferential.vue
src/views/ecw/order/special/Preferential.vue
+30
-8
index.vue
src/views/ecw/order/special/index.vue
+6
-3
stockingList.vue
src/views/ecw/order/stockingList.vue
+13
-4
batchEdit.vue
src/views/ecw/productPrice/batchEdit.vue
+268
-164
edit.vue
src/views/ecw/productPrice/edit.vue
+204
-139
index.vue
src/views/ecw/productPrice/index.vue
+102
-44
No files found.
src/App.vue
View file @
a81d99d4
...
@@ -46,6 +46,9 @@ export default {
...
@@ -46,6 +46,9 @@ export default {
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
}
}
.items-center
{
align-items
:
center
;
}
.empty-placeholder
{
.empty-placeholder
{
padding
:
50px
;
padding
:
50px
;
text-align
:
center
;
text-align
:
center
;
...
...
src/api/ecw/order.js
View file @
a81d99d4
...
@@ -748,4 +748,58 @@ export function splitItemUpdate(data){
...
@@ -748,4 +748,58 @@ export function splitItemUpdate(data){
data
data
})
})
}
}
// 可出订单列表
export
function
canShipmentPage
(
params
){
return
request
({
url
:
'
/air/order/can/shipment/page
'
,
method
:
'
get
'
,
params
})
}
// 待出订单列表
export
function
waitingShipmentPage
(
params
){
return
request
({
url
:
'
/air/order/waiting/shipment/page
'
,
method
:
'
get
'
,
params
})
}
// 备货订单列表
export
function
canReadyStockShipmentPage
(
params
){
return
request
({
url
:
'
/air/order/can-ready-stock/shipment/page
'
,
method
:
'
get
'
,
params
})
}
// 确认订单可出
export
function
setCanShipment
(
orderId
){
return
request
({
url
:
'
/air/order/can/shipment/
'
+
orderId
,
method
:
'
put
'
,
})
}
// 批量可出
export
function
batchCanShipment
(
orderIdList
){
return
request
({
url
:
'
/air/order/can/shipment/
'
,
method
:
'
put
'
,
data
:
{
orderIdList
}
})
}
// 批量转异
export
function
batchException
(
ids
){
throw
new
Error
(
'
接口未出,待完善,以下代码是copilot生成
'
)
}
// 导出备货订单
export
function
exportReadyStock
(
params
){
return
request
({
url
:
'
/ecw/order/export/ready-stock/search
'
,
method
:
'
get
'
,
params
,
responseType
:
'
blob
'
})
}
src/api/ecw/productPrice.js
View file @
a81d99d4
...
@@ -106,4 +106,13 @@ export function getProductPriceGetPrice(query) {
...
@@ -106,4 +106,13 @@ export function getProductPriceGetPrice(query) {
method
:
'
get
'
,
method
:
'
get
'
,
params
:
query
params
:
query
})
})
}
}
\ No newline at end of file
// 更新单询
export
function
updateOrderInquiry
(
data
)
{
return
request
({
url
:
'
/ecw/product-price/updateOrderInquiry
'
,
method
:
'
put
'
,
data
:
data
})
}
src/components/DictSelector/index.vue
View file @
a81d99d4
...
@@ -57,8 +57,11 @@ export default {
...
@@ -57,8 +57,11 @@ export default {
}
}
},
},
computed
:{
computed
:{
dicts
(){
return
this
.
getList
(
this
.
type
)
},
dictList
(){
dictList
(){
return
this
.
getList
(
this
.
type
)
.
filter
(
this
.
filter
)
return
this
.
dicts
.
filter
(
this
.
filter
)
},
},
formattedList
(){
formattedList
(){
let
arr
=
[]
let
arr
=
[]
...
@@ -104,7 +107,7 @@ export default {
...
@@ -104,7 +107,7 @@ export default {
},
},
setValueSync
(){
setValueSync
(){
if
(
this
.
value
===
null
||
this
.
value
===
undefined
||
this
.
value
===
''
){
if
(
this
.
value
===
null
||
this
.
value
===
undefined
||
this
.
value
===
''
){
return
this
.
valueSync
=
this
.
multiple
?
[]
:
this
.
value
return
this
.
valueSync
=
this
.
multiple
?
[]
:
this
.
value
}
}
if
(
this
.
multiple
){
if
(
this
.
multiple
){
let
value
=
this
.
value
||
[]
let
value
=
this
.
value
||
[]
...
...
src/components/RoutersSelector/index.vue
View file @
a81d99d4
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<div>
<div>
<div
class=
"filters mb-10"
>
<div
class=
"filters mb-10"
>
{{
$t
(
'
运输方式
'
)
}}
{{
$t
(
'
运输方式
'
)
}}
<dict-selector
:type=
'DICT_TYPE.ECW_TRANSPORT_TYPE'
v-model=
"transportType"
:placeholder=
"$t('请选择运输方式')"
style=
"width:150px"
/>
<dict-selector
:type=
'DICT_TYPE.ECW_TRANSPORT_TYPE'
v-model=
"transportType"
:placeholder=
"$t('请选择运输方式')"
:filter=
"transportFilter"
style=
"width:150px"
/>
{{
$t
(
'
始发地
'
)
}}
:
{{
$t
(
'
始发地
'
)
}}
:
<el-select
:placeholder=
"$t('请选择始发地')"
v-model=
"exportCity"
clearable
>
<el-select
:placeholder=
"$t('请选择始发地')"
v-model=
"exportCity"
clearable
>
<el-option
v-for=
"item in exportCityList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
<el-option
v-for=
"item in exportCityList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
...
@@ -50,6 +50,11 @@
...
@@ -50,6 +50,11 @@
{{
$l
(
row
.
channel
,
'
name
'
)
}}
{{
$l
(
row
.
channel
,
'
name
'
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
v-if=
"showAttr"
:label=
"$t('商品特性')"
prop=
"startTitleZh"
>
<
template
slot-scope=
"{row}"
>
{{
getAttrNames
(
row
.
attrId
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
prop=
""
>
<el-table-column
:label=
"$t('操作')"
prop=
""
>
<
template
slot=
"header"
>
<
template
slot=
"header"
>
<el-checkbox
@
change=
"toggleGroupChecker(index, $event)"
v-model=
"groupChecker[item.value]"
></el-checkbox>
<el-checkbox
@
change=
"toggleGroupChecker(index, $event)"
v-model=
"groupChecker[item.value]"
></el-checkbox>
...
@@ -69,12 +74,15 @@
...
@@ -69,12 +74,15 @@
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
openedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
openedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
export
default
{
export
default
{
props
:{
props
:{
value
:
{
value
:
{
type
:
Array
type
:
Array
},
},
option
:
Object
option
:
Object
,
// 类型,sea海运,air空运
type
:
String
},
},
data
(){
data
(){
return
{
return
{
...
@@ -90,7 +98,7 @@ export default {
...
@@ -90,7 +98,7 @@ export default {
hideMap
:
{},
// 折叠状态
hideMap
:
{},
// 折叠状态
checkAll
:
null
,
checkAll
:
null
,
groupChecker
:
{},
// 分组全选状态
groupChecker
:
{},
// 分组全选状态
attrList
:[],
// 商品特性
}
}
},
},
computed
:{
computed
:{
...
@@ -114,12 +122,14 @@ export default {
...
@@ -114,12 +122,14 @@ export default {
})
})
return
ids
return
ids
},
},
// 根据选择的渠道筛选
availChannelList
(){
availChannelList
(){
return
this
.
channelList
.
filter
(
item
=>
!
this
.
channelId
||
this
.
channelId
==
item
.
channelId
)
return
this
.
channelList
.
filter
(
item
=>
!
this
.
channelId
||
this
.
channelId
==
item
.
channelId
)
},
},
filteredRouterList
(){
filteredRouterList
(){
let
transportTypeList
=
[]
let
transportTypeList
=
[]
this
.
transportTypeDicts
this
.
transportTypeDicts
.
filter
(
this
.
transportFilter
)
.
filter
(
transport
=>
!
this
.
channelId
||
transport
.
cssClass
==
'
channel
'
)
.
filter
(
transport
=>
!
this
.
channelId
||
transport
.
cssClass
==
'
channel
'
)
.
forEach
(
item
=>
{
.
forEach
(
item
=>
{
if
(
this
.
transportType
===
null
||
this
.
transportType
==
''
||
this
.
transportType
==
item
.
value
){
if
(
this
.
transportType
===
null
||
this
.
transportType
==
''
||
this
.
transportType
==
item
.
value
){
...
@@ -151,6 +161,25 @@ export default {
...
@@ -151,6 +161,25 @@ export default {
}
}
})
})
return
transportTypeList
return
transportTypeList
},
// 是否显示商品特性(渠道)
showAttr
(){
return
this
.
type
==
'
air
'
},
// 显示产品特性
getAttrName
(){
return
(
id
)
=>
{
let
item
=
this
.
attrList
.
find
(
item
=>
item
.
id
==
id
)
if
(
!
item
)
return
''
return
this
.
$l
(
item
,
'
attrName
'
)
}
},
// 显示多个商品特性
getAttrNames
(){
return
(
ids
)
=>
{
if
(
!
ids
)
return
''
return
ids
.
split
(
'
,
'
).
filter
(
item
=>
!!
item
).
map
(
id
=>
this
.
getAttrName
(
id
)).
join
(
'
,
'
)
}
}
}
},
},
watch
:{
watch
:{
...
@@ -188,7 +217,7 @@ export default {
...
@@ -188,7 +217,7 @@ export default {
if
(
option
){
if
(
option
){
this
.
changeOption
()
this
.
changeOption
()
}
}
}
}
},
},
created
(){
created
(){
...
@@ -200,7 +229,7 @@ export default {
...
@@ -200,7 +229,7 @@ export default {
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
this
.
getOpenedRouterList
()
this
.
getOpenedRouterList
()
})
})
if
(
this
.
value
&&
this
.
value
.
length
){
if
(
this
.
value
&&
this
.
value
.
length
){
this
.
selectedRoutes
=
this
.
value
this
.
selectedRoutes
=
this
.
value
}
}
...
@@ -208,9 +237,19 @@ export default {
...
@@ -208,9 +237,19 @@ export default {
if
(
this
.
option
){
if
(
this
.
option
){
this
.
changeOption
()
this
.
changeOption
()
}
}
// 如果显示特性,则需要查询特数据备用
if
(
this
.
showAttr
){
this
.
getAttrList
()
}
},
},
methods
:{
methods
:{
getAttrList
(){
getProductAttrList
().
then
(
res
=>
{
this
.
attrList
=
res
.
data
})
},
changeOption
(){
changeOption
(){
if
(
!
this
.
option
)
return
if
(
!
this
.
option
)
return
this
.
importCity
=
+
this
.
option
.
importCity
||
null
this
.
importCity
=
+
this
.
option
.
importCity
||
null
...
@@ -258,22 +297,13 @@ export default {
...
@@ -258,22 +297,13 @@ export default {
if
(
index
>
-
1
){
if
(
index
>
-
1
){
this
.
selectedRoutes
.
splice
(
index
,
1
)
this
.
selectedRoutes
.
splice
(
index
,
1
)
}
}
}
}
},
},
getSelectedIndex
(
router
){
getSelectedIndex
(
router
){
return
this
.
selectedRoutes
.
findIndex
(
item
=>
{
return
this
.
selectedRoutes
.
findIndex
(
item
=>
{
return
item
.
lineId
==
router
.
id
&&
item
.
channelId
==
router
.
channel
.
channelId
return
item
.
lineId
==
router
.
id
&&
item
.
channelId
==
router
.
channel
.
channelId
})
})
/* let index = null
this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == router.channel.channelId){
index = i
// break
}
})
return index */
},
},
SpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}){
SpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}){
if
(
columnIndex
<
2
)
{
if
(
columnIndex
<
2
)
{
...
@@ -290,7 +320,11 @@ export default {
...
@@ -290,7 +320,11 @@ export default {
// 折叠,展开
// 折叠,展开
toggleHide
(
value
){
toggleHide
(
value
){
this
.
$set
(
this
.
hideMap
,
value
,
!
this
.
hideMap
[
value
])
this
.
$set
(
this
.
hideMap
,
value
,
!
this
.
hideMap
[
value
])
}
},
// 运输方式筛选
transportFilter
(
item
){
return
(
this
.
type
==
'
sea
'
?
[
'
1
'
,
'
2
'
]
:
[
'
3
'
,
'
4
'
]).
indexOf
(
item
.
value
)
>
-
1
},
}
}
}
}
</
script
>
</
script
>
...
@@ -298,4 +332,4 @@ export default {
...
@@ -298,4 +332,4 @@ export default {
.mb-10
{
.mb-10
{
margin-bottom
:
10px
margin-bottom
:
10px
}
}
</
style
>
</
style
>
\ No newline at end of file
src/utils/dict.js
View file @
a81d99d4
...
@@ -188,6 +188,8 @@ export const DICT_TYPE = {
...
@@ -188,6 +188,8 @@ export const DICT_TYPE = {
WAREHOUSING_SPECIFICATION_TYPE
:
'
warehousing_specification_type
'
,
WAREHOUSING_SPECIFICATION_TYPE
:
'
warehousing_specification_type
'
,
ECW_AUTH_TYPE
:
'
auth_type
'
,
//品牌授权
ECW_AUTH_TYPE
:
'
auth_type
'
,
//品牌授权
NEED_ORDER_INQUIRY
:
'
need_order_inquiry
'
,
// 是否需要単询
ECASH_INIT
:
'
ecash_init
'
,
//e-cash
ECASH_INIT
:
'
ecash_init
'
,
//e-cash
FEE_TYPE
:
'
receivable_fee_type
'
,
FEE_TYPE
:
'
receivable_fee_type
'
,
// PAY_TYPE:'payment_type',
// PAY_TYPE:'payment_type',
...
...
src/views/ecw/order/edit.vue
View file @
a81d99d4
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<!--初始化过程中不渲染页面,利用此特性在新建订单后重新初始化表单(字典选择组件默认值)-->
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-position=
"left"
inline
:disabled=
"updateChannel"
>
<el-form
v-if=
"!initing"
ref=
"form"
:model=
"form"
:rules=
"rules"
label-position=
"left"
inline
:disabled=
"updateChannel"
>
<el-card
v-if=
"form.applyStatus == 1"
class=
"mb-10"
>
<el-card
v-if=
"form.applyStatus == 1"
class=
"mb-10"
>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
以下信息修改审核中
'
)
}}
</div>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
以下信息修改审核中
'
)
}}
</div>
<el-table
:data=
"form.applyInfoList"
>
<el-table
:data=
"form.applyInfoList"
>
...
@@ -1256,14 +1256,17 @@ export default {
...
@@ -1256,14 +1256,17 @@ export default {
// 添加的提交
// 添加的提交
createOrder
(
data
).
then
(
response
=>
{
createOrder
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
));
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
));
this
.
initing
=
true
// 重置数据
// 重置数据
this
.
form
=
{...
makeDefaultFormData
()}
this
.
form
=
{...
makeDefaultFormData
()}
this
.
routerList
=
[]
this
.
routerList
=
[]
this
.
addProduct
()
this
.
addProduct
()
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
form
.
clearValidate
()
this
.
initing
=
false
this
.
$redirect
(
'
success?orderId=
'
+
response
.
data
)
this
.
$nextTick
(()
=>
{
this
.
$refs
.
form
.
clearValidate
this
.
$redirect
(
'
success?orderId=
'
+
response
.
data
)
})
})
})
...
...
src/views/ecw/order/index.vue
View file @
a81d99d4
...
@@ -427,6 +427,19 @@
...
@@ -427,6 +427,19 @@
<el-dropdown-item
@
click.native=
"$router.push(
{path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" v-hasPermi="['ecw:order:warehouse_arrive']">
{{
$t
(
'
调拨到仓
'
)
}}
</el-dropdown-item>
<el-dropdown-item
@
click.native=
"$router.push(
{path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" v-hasPermi="['ecw:order:warehouse_arrive']">
{{
$t
(
'
调拨到仓
'
)
}}
</el-dropdown-item>
</
template
>
</
template
>
<!--开始备货-->
<
template
v-if=
"
include(scope.row.airShipment, [2])
"
>
<el-dropdown-item
@
click.native=
"$router.push(
{path:'/order/stocking?id=' + scope.row.orderId})" v-hasPermi="['ecw:order:stocking']">
{{
$t
(
'
开始备货
'
)
}}
</el-dropdown-item>
</
template
>
<!--修改备货-->
<
template
v-if=
"
include(scope.row.airShipment, [3, 4, 10])
"
>
<el-dropdown-item
@
click.native=
"$router.push(
{path:'/order/stocking?action=update
&
id=' + scope.row.orderId})" v-hasPermi="['ecw:order:stocking_update']">
{{
$t
(
'
修改备货
'
)
}}
</el-dropdown-item>
</
template
>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</template>
</template>
...
@@ -511,7 +524,7 @@ import {
...
@@ -511,7 +524,7 @@ import {
exportCustomsDatas
,
exportCustomsDatas
,
exportShippingDatas
,
exportShippingDatas
,
exportShipFee
,
exportShipFee
,
exportUnload
,
splitCancelApply
,
orderSplitRevoke
exportUnload
,
splitCancelApply
,
orderSplitRevoke
,
setCanShipment
}
from
"
@/api/ecw/order
"
;
}
from
"
@/api/ecw/order
"
;
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import
PrintTag
from
'
./components/PrintTag
'
import
PrintTag
from
'
./components/PrintTag
'
...
...
src/views/ecw/order/penddingList.vue
View file @
a81d99d4
...
@@ -104,8 +104,8 @@
...
@@ -104,8 +104,8 @@
<!-- 操作工具栏 -->
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
:disabled=
"!multipleSelection.length"
type=
"primary"
plain
size=
"mini"
@
click=
"
$alert('//TODO')"
v-hasPermi=
"['ecw:order:peddingList:batch_avail4shpiing
']"
>
{{
$t
(
'
批量可出
'
)
}}
</el-button>
<el-button
:disabled=
"!multipleSelection.length"
type=
"primary"
plain
size=
"mini"
@
click=
"
batchCanShipment"
v-hasPermi=
"['ecw:order:peddingList:batch_can_shipment
']"
>
{{
$t
(
'
批量可出
'
)
}}
</el-button>
<el-button
:disabled=
"!multipleSelection.length"
type=
"primary"
plain
size=
"mini"
@
click=
"
$alert('//TODO')
"
v-hasPermi=
"['ecw:order:peddingList:batch_exception']"
>
{{
$t
(
'
批量转异
'
)
}}
</el-button>
<el-button
:disabled=
"!multipleSelection.length"
type=
"primary"
plain
size=
"mini"
@
click=
"
batchException
"
v-hasPermi=
"['ecw:order:peddingList:batch_exception']"
>
{{
$t
(
'
批量转异
'
)
}}
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
<el-table-column
:label=
"$t('操作')"
align=
"center"
class-name=
"small-padding fixed-width actions"
width=
"150px"
>
<el-table-column
:label=
"$t('操作')"
align=
"center"
class-name=
"small-padding fixed-width actions"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"
$alert('// TODO')"
v-hasPermi=
"['ecw:order:peddingList:avail4shpiing
']"
>
{{
$t
(
'
可出
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"
setCanShipment(scope.row)"
v-hasPermi=
"['ecw:order:peddingList:can_shipment
']"
>
{{
$t
(
'
可出
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"printTagOrderId=scope.row.orderId"
v-hasPermi=
"['ecw:order:peddingList:print_tag']"
>
{{
$t
(
'
打印标签
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"printTagOrderId=scope.row.orderId"
v-hasPermi=
"['ecw:order:peddingList:print_tag']"
>
{{
$t
(
'
打印标签
'
)
}}
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -182,6 +182,27 @@
...
@@ -182,6 +182,27 @@
@
pagination=
"getList"
/>
@
pagination=
"getList"
/>
<print-tag
v-if=
"printTagOrderId !== null"
:order-id=
"printTagOrderId"
@
close=
"printTagOrderId=null"
/>
<print-tag
v-if=
"printTagOrderId !== null"
:order-id=
"printTagOrderId"
@
close=
"printTagOrderId=null"
/>
<el-dialog
:title=
"$t('订单转异')"
center
:visible.sync=
"showBatchException"
>
<el-form
label-position=
"top"
label-width=
"200"
ref=
"batchExceptionForm"
:model=
"batchExceptionForm"
:rules=
"exceptionRules"
>
<el-form-item
:label=
"$t('订单号')"
prop=
"manualExceptionType"
>
{{multipleSelection.map(item => item.orderNo).join(',')}}
</el-form-item>
<el-form-item
:label=
"$t('原因类型')"
prop=
"manualExceptionType"
>
<dict-selector
v-model=
"batchExceptionForm.manualExceptionType"
form-type=
"checkbox"
:type=
"DICT_TYPE.MANUAL_EXCEPTION_TYPE"
multiple
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('附件')"
>
<image-upload
v-model=
"batchExceptionForm.exceptionUrls"
></image-upload>
</el-form-item>
<el-form-item
:label=
"$t('详细信息')"
>
<el-input
v-model=
"batchExceptionForm.descZh"
type=
"textarea"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleBatchException"
>
{{$t('确认转异')}}
</el-button>
<el-button
@
click=
"showBatchException = false"
>
{{$t('取消')}}
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -216,7 +237,7 @@ import {
...
@@ -216,7 +237,7 @@ import {
exportCustomsDatas
,
exportCustomsDatas
,
exportShippingDatas
,
exportShippingDatas
,
exportShipFee
,
exportShipFee
,
exportUnload
exportUnload
,
setCanShipment
,
canShipmentPage
,
batchCanShipment
,
batchException
,
waitingShipmentPage
}
from
"
@/api/ecw/order
"
;
}
from
"
@/api/ecw/order
"
;
import
PrintTag
from
'
./components/PrintTag
'
import
PrintTag
from
'
./components/PrintTag
'
import
PrintWarehouseReceipt
from
'
./components/PrintWarehouseReceipt
'
import
PrintWarehouseReceipt
from
'
./components/PrintWarehouseReceipt
'
...
@@ -278,7 +299,25 @@ export default {
...
@@ -278,7 +299,25 @@ export default {
rows
:
20
,
rows
:
20
,
},
},
currencyList
:[],
currencyList
:[],
channelList
:[]
channelList
:[],
// 是否显示批量转异弹层
showBatchException
:
false
,
// 批量转异表单
batchExceptionForm
:
{},
// 批量转异表单验证规则
exceptionRules
:
{
manualExceptionType
:
[
{
required
:
true
,
message
:
'
请勾选原因类型
'
,
trigger
:
'
change
'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
length
<=
0
)
{
callback
(
new
Error
(
'
请勾选原因类型
'
))
}
callback
()
},
trigger
:
'
change
'
}
]
}
};
};
},
},
watch
:{
watch
:{
...
@@ -323,7 +362,7 @@ export default {
...
@@ -323,7 +362,7 @@ export default {
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
// 执行查询
// 执行查询
getOrder
Page
(
this
.
combinedQueryParams
).
then
(
response
=>
{
waitingShipment
Page
(
this
.
combinedQueryParams
).
then
(
response
=>
{
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
this
.
list
=
[]
this
.
list
=
[]
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -361,6 +400,45 @@ export default {
...
@@ -361,6 +400,45 @@ export default {
this
.
ids
=
selection
.
map
(
item
=>
item
.
orderId
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
orderId
)
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
},
// 设置可出
setCanShipment
(
row
){
this
.
$confirm
(
this
.
$t
(
`您确定要将订单{orderNo}设置为可出吗?`
,
{
orderNo
:
row
.
orderNo
})).
then
(()
=>
{
return
setCanShipment
(
row
.
orderId
)
}).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
message
||
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
})
},
// 批量可出
batchCanShipment
(){
let
orderNos
=
this
.
multipleSelection
.
map
(
item
=>
item
.
orderNo
).
join
(
'
,
'
)
this
.
$confirm
(
this
.
$t
(
`您确定要将订单{orderNos}设置为可出吗?`
,
{
orderNos
})).
then
(()
=>
{
return
batchCanShipment
(
this
.
ids
)
}).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
message
||
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
})
},
// 批量转异
batchException
(){
if
(
!
this
.
multipleSelection
.
length
){
return
this
.
$message
.
error
(
"
暂无选择订单
"
)
}
this
.
showBatchException
=
true
},
handleBatchException
(){
// 以下代码是copilot生成,暂无接口,回头在改
this
.
$refs
.
batchExceptionForm
.
validate
(
valid
=>
{
if
(
valid
)
{
let
params
=
Object
.
assign
({},
this
.
batchExceptionForm
,
{
orderIds
:
this
.
ids
})
batchException
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
message
||
this
.
$t
(
'
操作成功
'
))
this
.
showBatchException
=
false
this
.
getList
()
})
}
})
}
}
}
}
};
};
...
...
src/views/ecw/order/special/Preferential.vue
View file @
a81d99d4
<
template
>
<
template
>
<el-dialog
visible
:close-on-click-modal=
"false"
:before-close=
"closeDialog"
:title=
"title"
>
<el-dialog
visible
:close-on-click-modal=
"false"
:before-close=
"closeDialog"
:title=
"title"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"120px"
:rules=
"rules"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"120px"
:rules=
"rules"
>
<!-- 海运是重货,空运是泡货 -->
<!-- 海运是重货,空运是泡货 -->
<template
v-if=
"
order.transportId === 1 || order.transportId === 2
"
>
<template
v-if=
"
applyType == 4
"
>
<el-form-item
:label=
"$t('原重货标准')"
>
<el-form-item
:label=
"$t('原重货标准')"
>
{{
form
.
orgWVolume
}}
kg/cbm
{{
form
.
orgWVolume
}}
kg/cbm
</el-form-item>
</el-form-item>
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<el-input
v-model=
"form.wvolume"
type=
"number"
class=
"w-100"
/>
kg/cbm
<el-input
v-model=
"form.wvolume"
type=
"number"
class=
"w-100"
/>
kg/cbm
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
-if=
"applyType == 5"
>
<el-form-item
:label=
"$t('原泡货标准')"
>
<el-form-item
:label=
"$t('原泡货标准')"
>
{{
form
.
orgVWeight
}}
kg
{{
form
.
orgVWeight
}}
kg
</el-form-item>
</el-form-item>
...
@@ -19,9 +19,17 @@
...
@@ -19,9 +19,17 @@
<el-input
v-model=
"form.vweight"
type=
"number"
class=
"w-100"
/>
kg
<el-input
v-model=
"form.vweight"
type=
"number"
class=
"w-100"
/>
kg
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<
template
v-else-if=
"applyType == 29"
>
<el-form-item
:label=
"$t('现订单泡重')"
>
{{
form
.
orgVWeight
}}
kg
</el-form-item>
<el-form-item
:label=
"$t('新订单泡重')"
style=
"width: 400px"
prop=
"clearanceFreight"
>
<el-input
v-model=
"form.vweight"
type=
"number"
class=
"w-100"
/>
kg
</el-form-item>
</
template
>
</el-form>
</el-form>
<div
class=
"page-title"
>
{{ $t('审批流程') }}
</div>
<div
class=
"page-title"
>
{{ $t('审批流程') }}
</div>
<work-flow
xmlkey=
"special_appl
y"
v-model=
"ccIdArr"
/>
<work-flow
:xmlkey=
"workFlowKe
y"
v-model=
"ccIdArr"
/>
<div
v-if=
"form.applyStatus != 1"
>
<div
v-if=
"form.applyStatus != 1"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{ $t('提交') }}
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{ $t('提交') }}
</el-button>
</div>
</div>
...
@@ -29,7 +37,7 @@
...
@@ -29,7 +37,7 @@
<el-button
type=
"primary"
@
click=
"$router.push('/bpm/process-instance/detail?id=' + form.formId)"
>
<el-button
type=
"primary"
@
click=
"$router.push('/bpm/process-instance/detail?id=' + form.formId)"
>
<dict-tag
:type=
"DICT_TYPE.APPLY_STATUS"
:value=
"form.applyStatus"
/>
<dict-tag
:type=
"DICT_TYPE.APPLY_STATUS"
:value=
"form.applyStatus"
/>
</el-button>
</el-button>
<el-button
type=
"primary"
@
click=
"cancelAudit"
>
{{ $t('取消审核') }}
</el-button>
<el-button
type=
"primary"
@
click=
"cancelAudit"
>
{{ $t('取消审核') }}
</el-button>
<el-button
type=
"default"
@
click=
"closeDialog"
>
{{ $t('返回') }}
</el-button>
<el-button
type=
"default"
@
click=
"closeDialog"
>
{{ $t('返回') }}
</el-button>
</div>
</div>
...
@@ -50,7 +58,7 @@ export default {
...
@@ -50,7 +58,7 @@ export default {
props
:
{
props
:
{
order
:
Object
,
order
:
Object
,
orderItem
:
Object
,
orderItem
:
Object
,
applyType
:
Number
// 4是重货
优惠5是
泡货优惠
applyType
:
Number
// 4是重货
标准优惠5是泡货标准优惠,29
泡货优惠
},
},
components
:
{
components
:
{
WorkFlow
WorkFlow
...
@@ -65,7 +73,7 @@ export default {
...
@@ -65,7 +73,7 @@ export default {
// applyType: 2, //1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
// applyType: 2, //1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
ccIdArr
:
[],
ccIdArr
:
[],
form
:
{
form
:
{
},
},
rules
:{
rules
:{
...
@@ -79,7 +87,21 @@ export default {
...
@@ -79,7 +87,21 @@ export default {
},
},
computed
:{
computed
:{
title
(){
title
(){
return
this
.
applyType
==
4
?
this
.
$t
(
'
重货优惠申请
'
)
:
this
.
$t
(
'
泡货优惠申请
'
)
return
{
4
:
this
.
$t
(
'
重货标准优惠申请
'
),
5
:
this
.
$t
(
'
泡货标准优惠申请
'
),
29
:
this
.
$t
(
'
泡货优惠申请
'
)
}[
this
.
applyType
]
// return this.applyType == 4 ? this.$t('重货优惠申请') : this.$t('泡货优惠申请')
},
// 流程key
workFlowKey
(){
// 泡货优惠申请审核
if
(
this
.
applyType
==
29
){
return
'
shipment_bulky_cargo
'
}
// 订单特价审核
return
'
special_apply
'
}
}
},
},
methods
:
{
methods
:
{
...
...
src/views/ecw/order/special/index.vue
View file @
a81d99d4
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
:formatter=
"(_, __, v) => parseTime(v)"
:formatter=
"(_, __, v) => parseTime(v)"
:label=
"$t('最后操作时间')"
>
:label=
"$t('最后操作时间')"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
:label=
"$t('原价')"
>
:label=
"$t('原价')"
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
...
@@ -111,7 +111,10 @@
...
@@ -111,7 +111,10 @@
2.空运专线、海空联运显示泡货优惠 3,4
2.空运专线、海空联运显示泡货优惠 3,4
-->
-->
<el-button
v-hasPermi=
"['ecw:order:heavy']"
type=
"primary"
@
click=
"showPreferentialType=4"
v-if=
"order.transportId === 1 || order.transportId === 2"
>
{{$t('申请重货优惠')}}
</el-button>
<el-button
v-hasPermi=
"['ecw:order:heavy']"
type=
"primary"
@
click=
"showPreferentialType=4"
v-if=
"order.transportId === 1 || order.transportId === 2"
>
{{$t('申请重货优惠')}}
</el-button>
<el-button
v-hasPermi=
"['ecw:order:bulky']"
type=
"primary"
@
click=
"showPreferentialType=5"
v-else
>
{{$t('申请泡货优惠')}}
</el-button>
<
template
v-else
>
<el-button
v-hasPermi=
"['ecw:order:bulky2']"
type=
"primary"
@
click=
"showPreferentialType=29"
>
{{
$t
(
'
申请泡货优惠
'
)
}}
</el-button>
<el-button
v-hasPermi=
"['ecw:order:bulky']"
type=
"primary"
@
click=
"showPreferentialType=5"
>
{{
$t
(
'
申请泡货标准优惠
'
)
}}
</el-button>
</
template
>
<el-button
type=
"primary"
@
click=
"$tab.closePage()"
>
{{$t('关闭窗口')}}
</el-button>
<el-button
type=
"primary"
@
click=
"$tab.closePage()"
>
{{$t('关闭窗口')}}
</el-button>
</div>
</div>
</el-card>
</el-card>
...
@@ -122,7 +125,7 @@
...
@@ -122,7 +125,7 @@
<discount
v-if=
"!!showAllowanceItem"
:order=
"order"
:orderItem=
"showAllowanceItem"
@
close=
"showAllowanceItem=null"
:applyType=
"2"
@
success=
"onDiscountSuccess"
/>
<discount
v-if=
"!!showAllowanceItem"
:order=
"order"
:orderItem=
"showAllowanceItem"
@
close=
"showAllowanceItem=null"
:applyType=
"2"
@
success=
"onDiscountSuccess"
/>
<!-- 佣金规则 -->
<!-- 佣金规则 -->
<commission
v-if=
"!!showCommissionItem"
:order=
"order"
:orderItem=
"showCommissionItem"
@
close=
"showCommissionItem=null"
@
success=
"onCommissionSuccess"
/>
<commission
v-if=
"!!showCommissionItem"
:order=
"order"
:orderItem=
"showCommissionItem"
@
close=
"showCommissionItem=null"
@
success=
"onCommissionSuccess"
/>
<!-- 重泡货优惠 -->
<!-- 重泡货
(标准)
优惠 -->
<preferential
v-if=
"!!showPreferentialType"
:applyType=
"showPreferentialType"
:order=
"order"
@
close=
"showPreferentialType=null"
@
success=
"onPreferentialSuccess"
/>
<preferential
v-if=
"!!showPreferentialType"
:applyType=
"showPreferentialType"
:order=
"order"
@
close=
"showPreferentialType=null"
@
success=
"onPreferentialSuccess"
/>
</div>
</div>
</template>
</template>
...
...
src/views/ecw/order/stockingList.vue
View file @
a81d99d4
...
@@ -104,8 +104,8 @@
...
@@ -104,8 +104,8 @@
<!-- 操作工具栏 -->
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
:disabled=
"!multipleSelection.length"
type=
"primary"
plain
size=
"mini"
@
click=
"$alert('//TODO'
)"
v-hasPermi=
"['ecw:order:stockingList:export_selected']"
>
{{
$t
(
'
导出所选
'
)
}}
</el-button>
<el-button
:disabled=
"!multipleSelection.length"
type=
"primary"
:loading=
"exporting"
plain
size=
"mini"
@
click=
"exportXls(ids
)"
v-hasPermi=
"['ecw:order:stockingList:export_selected']"
>
{{
$t
(
'
导出所选
'
)
}}
</el-button>
<el-button
:disabled=
"!multipleSelection.length"
type=
"primary"
plain
size=
"mini"
@
click=
"$alert('//TODO'
)"
v-hasPermi=
"['ecw:order:stockingList:export_search']"
>
{{
$t
(
'
导出搜索
'
)
}}
</el-button>
<el-button
type=
"primary"
:loading=
"exporting"
plain
size=
"mini"
@
click=
"exportXls(queryParams
)"
v-hasPermi=
"['ecw:order:stockingList:export_search']"
>
{{
$t
(
'
导出搜索
'
)
}}
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -192,7 +192,7 @@ import { getProductAttrList } from '@/api/ecw/productAttr'
...
@@ -192,7 +192,7 @@ import { getProductAttrList } from '@/api/ecw/productAttr'
import
CustomerSelector
from
'
@/components/CustomerSelector
'
import
CustomerSelector
from
'
@/components/CustomerSelector
'
import
specialNeeds
from
'
@/views/ecw/order/components/specialNeeds
'
;
import
specialNeeds
from
'
@/views/ecw/order/components/specialNeeds
'
;
import
{
getOrderPage
}
from
"
@/api/ecw/order
"
;
import
{
canReadyStockShipmentPage
,
exportReadyStock
,
getOrderPage
}
from
"
@/api/ecw/order
"
;
import
PrintTag
from
'
./components/PrintTag
'
import
PrintTag
from
'
./components/PrintTag
'
import
PrintWarehouseReceipt
from
'
./components/PrintWarehouseReceipt
'
import
PrintWarehouseReceipt
from
'
./components/PrintWarehouseReceipt
'
import
PrintLadingBill
from
'
./components/PrintLadingBill
'
import
PrintLadingBill
from
'
./components/PrintLadingBill
'
...
@@ -298,7 +298,7 @@ export default {
...
@@ -298,7 +298,7 @@ export default {
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
// 执行查询
// 执行查询
getOrder
Page
(
this
.
combinedQueryParams
).
then
(
response
=>
{
canReadyStockShipment
Page
(
this
.
combinedQueryParams
).
then
(
response
=>
{
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
this
.
list
=
[]
this
.
list
=
[]
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -336,6 +336,15 @@ export default {
...
@@ -336,6 +336,15 @@ export default {
this
.
ids
=
selection
.
map
(
item
=>
item
.
orderId
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
orderId
)
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
},
// 导出
exportXls
(
params
){
this
.
exporting
=
true
exportReadyStock
(
params
).
then
(
res
=>
{
this
.
$download
.
excel
(
res
,
this
.
$t
(
'
备货订单
'
)
+
'
.xls
'
);
}).
finally
(()
=>
{
this
.
exporting
=
false
})
}
}
}
}
};
};
...
...
src/views/ecw/productPrice/batchEdit.vue
View file @
a81d99d4
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<products-selector
v-model=
"form.productIdList"
show-all
@
setall=
"isAllProduct=$even
t"
class=
"mb-20"
/>
<products-selector
ref=
"productSelector"
v-model=
"form.productIdList"
show-all
@
setall=
"isAllProduct=$event"
:default-ids=
"form.productIdLis
t"
class=
"mb-20"
/>
<routers-selector
v-model=
"selectedRoutes"
/>
<routers-selector
v-model=
"selectedRoutes"
:type=
"type"
/>
<el-card
style=
"margin-bottom: 10px"
>
<el-card
style=
"margin-bottom: 10px"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
{{
$t
(
'
价格设置
'
)
}}
{{
$t
(
'
价格设置
'
)
}}
<
span
>
<
!--空运只有阶梯价格,不显示阶梯价格勾选--
>
<!--
<el-checkbox
label=
""
@
change=
"form.needPay=$event ? 1 : 0"
>
{{
$t
(
'
预付
'
)
}}
</el-checkbox>
--
>
<span
v-if=
"type != 'air'"
>
<el-checkbox
label=
""
@
change=
"form.stepPrice=$event ? 1 : 0"
>
{{
$t
(
'
阶梯价格
'
)
}}
</el-checkbox>
<el-checkbox
label=
""
@
change=
"form.stepPrice=$event ? 1 : 0"
>
{{
$t
(
'
阶梯价格
'
)
}}
</el-checkbox>
</span>
</span>
</div>
</div>
<el-form-item
:label=
"$t('预付')"
prop=
"needPay"
>
<el-row
:gutter=
"20"
>
<el-radio-group
v-model=
"form.needPay"
>
<el-col
:span=
"12"
>
<el-radio
:label=
"1"
>
{{
$t
(
'
预付
'
)
}}
</el-radio>
<el-form-item
:label=
"$t('预付')"
prop=
"needPay"
>
<el-radio
:label=
"0"
>
{{
$t
(
'
均可
'
)
}}
</el-radio>
<el-radio-group
v-model=
"form.needPay"
>
</el-radio-group>
<el-radio
:label=
"1"
>
{{
$t
(
'
预付
'
)
}}
</el-radio>
</el-form-item>
<el-radio
:label=
"0"
>
{{
$t
(
'
均可
'
)
}}
</el-radio>
<el-form-item
:label=
"$t('单价模式')"
prop=
"priceType"
>
</el-radio-group>
<dict-selector
:type=
"DICT_TYPE.ECW_PRICE_TYPE"
v-model=
"form.priceType"
form-type=
"radio"
/>
</el-form-item>
<!--阶梯订单-->
<template
v-if=
"form.stepPrice==1"
>
<div
v-for=
"(item, index) in form.priceStepList"
:key=
"index"
>
<div
style=
"font-size:14px; margin:10px 0"
>
{{
$t
(
'
第{index
}
阶梯定价方案
'
,
{
index
:
index
+
1
}
)
}}
:
<
template
v
-
if
=
"
index == form.priceStepList.length - 1
"
>
<
el
-
link
type
=
"
primary
"
@
click
.
native
=
"
form.priceStepList.push({
}
)
"
>
{{
$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
=
"
w100
"
><
/el-input
>
-
<
el
-
input
v
-
model
=
"
item.endNum
"
type
=
"
number
"
placeholder
=
""
class
=
"
w100
"
><
/el-input
>
/
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
form.weightUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
</el-form-item>
</el-form-item>
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
v
-
if
=
"
form.priceType != 1
"
>
<el-form-item
:label=
"$t('单价模式')"
prop=
"priceType"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w100 mr10
"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_PRICE_TYPE"
v-model=
"form.priceType"
form-type=
"radio"
/>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.transportVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w100" /
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认清关费')
"
v
-
if
=
"
form.priceType != 1
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w100 mr10
"
/>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.clearancePriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.clearanceVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w100" /
>
</el-form-item>
</el-form-item>
<
el
-
form
-
item
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
>
<!--阶梯订单-->
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w100 mr10
"
/>
<template
v-if=
"form.stepPrice==1"
>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
<div
v-for=
"(item, index) in form.priceStepList"
:key=
"index"
>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.allVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w100" /
>
<div
style=
"font-size:14px; margin:10px 0"
>
<
/el-form-item
>
{{
$t
(
'
第{index
}
阶梯定价方案
'
,
{
index
:
index
+
1
}
)
}}
:
<
/div
>
<
template
v
-
if
=
"
index == form.priceStepList.length - 1
"
>
<
/template
>
<
el
-
link
type
=
"
primary
"
@
click
.
native
=
"
form.priceStepList.push({
}
)
"
>
{{
$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
=
"
w100
"
><
/el-input
>
-
<
el
-
input
v
-
model
=
"
item.endNum
"
type
=
"
number
"
placeholder
=
""
class
=
"
w100
"
><
/el-input
>
/
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
form.weightUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
v
-
if
=
"
form.priceType != 1
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w100 mr10
"
/>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.transportVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w100" /
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认清关费')
"
v
-
if
=
"
form.priceType != 1 && type != 'air'
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w100 mr10
"
/>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.clearancePriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.clearanceVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w100" /
>
<
/el-form-item
>
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
>
<
el
-
form
-
item
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w100 mr10
"
/>
:
label
=
"
$t('最小起计量')
"
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
:
prop
=
"
`minWeight`
"
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.allVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w100" /
>
>
<
/el-form-item
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.minWeight
"
type
=
"
number
"
class
=
"
w-100
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '数量错误'
}
"
/>
<
/div
>
/ <selector v-model="form.minWeightUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable2 class="w-100" disabled /
>
<
/template
>
<
/el-form-item
>
<!--
非阶梯订单
-->
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('最小起计量')
"
:
prop
=
"
`minWeight`
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.minWeight
"
type
=
"
number
"
class
=
"
w-100
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '数量错误'
}
"
/>
/ <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
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
>
<
el
-
form
-
item
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w100 mr10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w100 mr10
"
/>
<
selector
v
-
model
=
"
form.allPriceUnit
"
@
input
=
"
syncAllUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
<
selector
v
-
model
=
"
form.allPriceUnit
"
@
input
=
"
syncAllUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w100
"
/>
/ <selector v-model="form.allVolumeUnit" @input="syncAllUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w100" /
>
/ <selector v-model="form.allVolumeUnit" @input="syncAllUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w100" /
>
<
/el-form-item
>
<
/el-form-item
>
<
template
v
-
else
>
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
prop
=
"
transportPrice
"
>
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
prop
=
"
transportPrice
"
>
<
selector
v
-
model
=
"
form.transportPriceUnit
"
@
input
=
"
syncAllUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
selector
v
-
model
=
"
form.transportPriceUnit
"
@
input
=
"
syncAllUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
/ <selector v-model="form.transportVolumeUnit" @input="syncAllUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
/ <selector v-model="form.transportVolumeUnit" @input="syncAllUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认清关费')
"
prop
=
"
clearancePrice
"
>
<
el
-
form
-
item
:
label
=
"
$t('默认清关费')
"
prop
=
"
clearancePrice
"
v
-
if
=
"
type != 'air'
"
>
<
selector
v
-
model
=
"
form.clearancePriceUnit
"
@
input
=
"
syncAllUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
selector
v
-
model
=
"
form.clearancePriceUnit
"
@
input
=
"
syncAllUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
/ <selector v-model="form.clearanceVolumeUnit" @input="syncAllUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
/ <selector v-model="form.clearanceVolumeUnit" @input="syncAllUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
<
/el-form-item
>
<
/el-form-item
>
<
/template
>
<
/template
>
<
/template
>
<
/template
>
<!--
特需
-->
<!--
特需
-->
<
template
v
-
if
=
"
form.priceType==1
"
>
<
template
v
-
if
=
"
form.priceType==1
"
>
<
el
-
form
-
item
<
el
-
form
-
item
v
-
for
=
"
(special, specialIndex) in form.specialList
"
v
-
for
=
"
(special, specialIndex) in form.specialList
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')
"
:
key
=
"
specialIndex + 'transport'
"
>
:
key
=
"
specialIndex + 'transport'
"
>
<
selector
disabled
v
-
model
=
"
special.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
selector
disabled
v
-
model
=
"
special.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
/ <selector disabled v-model="special.allVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
/ <selector disabled v-model="special.allVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
<
/el-form-item
>
<
/el-form-item
>
<
/template
>
<
/template
>
<
template
v
-
else
v
-
for
=
"
(special, specialIndex) in form.specialList
"
>
<
template
v
-
else
v
-
for
=
"
(special, specialIndex) in form.specialList
"
>
<
el
-
form
-
item
<
el
-
form
-
item
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')
"
:
key
=
"
specialIndex + 'transport'
"
>
:
key
=
"
specialIndex + 'transport'
"
>
<
selector
disabled
v
-
model
=
"
special.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
selector
disabled
v
-
model
=
"
special.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
/ <selector disabled v-model="special.transportVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
/ <selector disabled v-model="special.transportVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
<
el
-
form
-
item
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')
"
v
-
if
=
"
type != 'air'
"
:
key
=
"
specialIndex + 'clearance'
"
>
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')
"
<
selector
disabled
v
-
model
=
"
special.clearancePriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
:
key
=
"
specialIndex + 'clearance'
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
<
selector
disabled
v
-
model
=
"
special.clearancePriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
/ <selector disabled v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10 mr-10
"
/>
<
/el-form-item
>
/ <selector disabled v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l
(
'title'
)
" value-field="id" defaultable2 class="w-100" /
>
<
/template
>
<
/el-form-item
>
<
/template
>
<!--
<
el
-
form
-
item
:
label
=
"
$t('是否预付')
"
prop
=
"
advanceStatus
"
>
<!--
<
el
-
form
-
item
:
label
=
"
$t('是否预付')
"
prop
=
"
advanceStatus
"
>
<
dict
-
selector
form
-
type
=
"
radio
"
:
type
=
"
DICT_TYPE.ADVANCE_STATUS
"
v
-
model
=
"
form.advanceStatus
"
/>
<
dict
-
selector
form
-
type
=
"
radio
"
:
type
=
"
DICT_TYPE.ADVANCE_STATUS
"
v
-
model
=
"
form.advanceStatus
"
/>
<
/el-form-item> --
>
<
/el-form-item> --
>
<
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
=
"
form.stepPrice
"
>
<
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
>
<
/el-row
>
<
/el-card
>
<
/el-card
>
...
@@ -137,16 +162,23 @@
...
@@ -137,16 +162,23 @@
<
el
-
radio
v
-
model
.
number
=
"
form.needBook
"
:
label
=
"
0
"
>
{{
$t
(
'
否
'
)
}}
<
/el-radio
>
<
el
-
radio
v
-
model
.
number
=
"
form.needBook
"
:
label
=
"
0
"
>
{{
$t
(
'
否
'
)
}}
<
/el-radio
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('每日入仓上限')
"
prop
=
"
dayLimit
"
v
-
if
=
"
form.needBook == 1
"
>
<!--
下面几个字段只有批量设置海运才需要
-->
<
el
-
input
v
-
model
.
number
=
"
form.dayLimit
"
type
=
"
number
"
class
=
"
w-100
"
/>
{{
$t
(
'
立方米
'
)
}}
<
template
v
-
if
=
"
type == 'sea'
"
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('每日入仓上限')
"
prop
=
"
dayLimit
"
v
-
if
=
"
form.needBook == 1
"
>
<
el
-
input
v
-
model
.
number
=
"
form.dayLimit
"
type
=
"
number
"
class
=
"
w-100
"
/>
{{
$t
(
'
立方米
'
)
}}
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('货柜位置')
"
prop
=
"
containerLocation
"
>
<
el
-
form
-
item
:
label
=
"
$t('货柜位置')
"
prop
=
"
containerLocation
"
>
<
dict
-
selector
:
type
=
"
DICT_TYPE.ECW_CONTAINER_LOCATION
"
v
-
model
=
"
form.containerLocation
"
/>
<
dict
-
selector
:
type
=
"
DICT_TYPE.ECW_CONTAINER_LOCATION
"
v
-
model
=
"
form.containerLocation
"
/>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('订单方数上限')
"
prop
=
"
square
"
>
<
el
-
form
-
item
:
label
=
"
$t('订单方数上限')
"
prop
=
"
square
"
>
<
el
-
input
v
-
model
.
number
=
"
form.square
"
type
=
"
number
"
style
=
"
width:200px
"
/>
<
el
-
input
v
-
model
.
number
=
"
form.square
"
type
=
"
number
"
style
=
"
width:200px
"
/>
<
/el-form-item
>
<
/template
>
<
el
-
form
-
item
:
label
=
"
$t('是否単询')
"
prop
=
"
inquiry
"
>
<
dict
-
selector
:
type
=
"
DICT_TYPE.NEED_ORDER_INQUIRY
"
v
-
model
=
"
form.needOrderInquiry
"
form
-
type
=
"
radio
"
><
/dict-selector
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-card
>
<
/el-card
>
<
/el-form
>
<
/el-form
>
...
@@ -159,15 +191,14 @@
...
@@ -159,15 +191,14 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
RoutersSelector
from
'
@/components/RoutersSelector
'
import
RoutersSelector
from
'
@/components/RoutersSelector
'
import
{
createProductPrice
,
updateProductPrice
,
batchUpdateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPriceList
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
batchUpdateProductPrice
,
getProductPrice
}
from
"
@/api/ecw/productPrice
"
;
import
{
getProductType
,
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
Selector
from
'
@/components/Selector
'
import
Selector
from
'
@/components/Selector
'
import
Inputor
from
'
@/components/Inputor
'
import
Inputor
from
'
@/components/Inputor
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
Decimal
from
'
decimal.js
'
import
{
getProduct
}
from
"
@/api/ecw/product
"
;
export
default
{
export
default
{
components
:
{
RoutersSelector
,
ProductsSelector
,
Selector
,
Inputor
}
,
components
:
{
RoutersSelector
,
ProductsSelector
,
Selector
,
Inputor
}
,
...
@@ -195,11 +226,32 @@ export default {
...
@@ -195,11 +226,32 @@ export default {
productTypeList
:
[],
productTypeList
:
[],
productDisabled
:
true
,
productDisabled
:
true
,
lineList
:
[],
//路线数组
lineList
:
[],
//路线数组
loading
:
false
loading
:
false
,
// 批量加价/减价
quickForm
:{
}
}
}
}
,
}
,
computed
:
{
computed
:
{
// 类型,默认海运sea,air表示空运
type
(){
return
this
.
$route
.
path
.
split
(
/
[
-_
]
/
).
pop
()
}
,
// 默认运费的货币和体积单位
currencyAndUnit
(){
let
currency
=
null
,
unit
=
null
,
fields
=
null
// 如果是阶梯价格则取第一阶梯,否则就取form中的字段
let
obj
=
this
.
form
.
stepPrice
==
1
?
this
.
form
.
priceStepList
[
0
]
:
this
.
form
// 全包价
if
(
this
.
form
.
priceType
==
1
){
currency
=
obj
.
allPriceUnit
unit
=
obj
.
allVolumeUnit
}
else
{
currency
=
obj
.
transportPriceUnit
unit
=
obj
.
transportVolumeUnit
}
return
{
currency
,
unit
}
}
}
,
}
,
watch
:
{
watch
:
{
checkList
()
{
//选择路线
checkList
()
{
//选择路线
...
@@ -213,43 +265,7 @@ export default {
...
@@ -213,43 +265,7 @@ export default {
}
,
}
,
product
()
{
product
()
{
this
.
$set
(
this
.
form
,
'
productType
'
,
this
.
product
.
typeId
)
this
.
$set
(
this
.
form
,
'
productType
'
,
this
.
product
.
typeId
)
/* getProductType(this.product.typeId).then(res => {
this.productType = res.data
}
) */
}
,
/*
批量操作没有回显需求
form(val) {
if (!val) return
// 特殊需求回显
if (val.specialList) {
let keyed = arrryToKeyedObjectBy(val.specialList, 'specialDictType')
this.specialList.map((item, index) => {
if (keyed[item.specialDictType]) {
for (let field in item) {
if (keyed[item.specialDictType][field]) {
item[field] = keyed[item.specialDictType][field]
}
}
}
}
)
}
}
, */
/* 'form.transportVolumeUnit'(val){
this.specialProducts.forEach(item => {
item.transportVolumeUnit = val
}
)
}
,
'form.clearanceVolumeUnit'(val){
this.specialProducts.forEach(item => {
item.clearanceVolumeUnit = val
}
)
}
,
}
,
'form.allVolumeUnit'(val){
this.specialProducts.forEach(item => {
item.allVolumeUnit = val
}
)
}
, */
'
form.stepPrice
'
(
stepPrice
){
'
form.stepPrice
'
(
stepPrice
){
if
(
stepPrice
==
1
&&
!
this
.
form
.
priceStepList
.
length
){
if
(
stepPrice
==
1
&&
!
this
.
form
.
priceStepList
.
length
){
this
.
form
.
priceStepList
=
[{
}
,
{
}
]
this
.
form
.
priceStepList
=
[{
}
,
{
}
]
...
@@ -279,19 +295,88 @@ export default {
...
@@ -279,19 +295,88 @@ export default {
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
// 如果是复制,则获取数据并填充,先复制,然后填充特需,避免数据的特需不全导致部分不显示
if
(
this
.
$route
.
query
.
templateId
){
await
this
.
getTemplateDetail
(
this
.
$route
.
query
.
templateId
)
}
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
=>
{
this
.
form
.
specialList
.
push
({
// 没有的才push,已有的可能是从复制模板携带过来的数据
"
clearancePrice
"
:
null
,
if
(
!
this
.
form
.
specialList
.
find
(
special
=>
special
.
specialDictType
==
item
.
value
))
{
"
clearancePriceUnit
"
:
null
,
this
.
form
.
specialList
.
push
({
"
clearanceVolumeUnit
"
:
null
,
"
clearancePrice
"
:
null
,
"
specialDictType
"
:
item
.
value
,
"
clearancePriceUnit
"
:
null
,
"
transportPrice
"
:
null
,
"
clearanceVolumeUnit
"
:
null
,
"
transportPriceUnit
"
:
null
,
"
specialDictType
"
:
item
.
value
,
"
transportVolumeUnit
"
:
null
,
"
transportPrice
"
:
null
,
}
)
"
transportPriceUnit
"
:
null
,
"
transportVolumeUnit
"
:
null
,
}
)
}
}
)
this
.
$nextTick
(()
=>
{
// 如果是空运,阶梯价格默认为1
if
(
this
.
type
==
'
air
'
){
this
.
$set
(
this
.
form
,
'
stepPrice
'
,
1
)
}
}
)
}
)
}
,
}
,
methods
:
{
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
}
=
res
.
data
this
.
$set
(
this
,
'
form
'
,
Object
.
assign
({
}
,
this
.
form
,
{
allPrice
,
allPriceUnit
,
allVolumeUnit
,
transportPrice
,
transportPriceUnit
,
transportVolumeUnit
,
clearancePrice
,
clearancePriceUnit
,
clearanceVolumeUnit
,
priceType
,
stepPrice
,
specialList
,
priceStepList
,
minWeight
,
minWeightUnit
}
))
// 产品选择器默认选择的商品
getProduct
(
res
.
data
.
productId
).
then
(
res
=>
{
this
.
$refs
.
productSelector
.
choose
(
res
.
data
)
}
)
}
)
}
,
// 同步全部单位
// 同步全部单位
syncAllUnit
(){
syncAllUnit
(){
let
obj
=
this
.
form
.
stepPrice
==
1
?
this
.
form
.
priceStepList
[
0
]
:
this
.
form
let
obj
=
this
.
form
.
stepPrice
==
1
?
this
.
form
.
priceStepList
[
0
]
:
this
.
form
...
@@ -339,7 +424,15 @@ export default {
...
@@ -339,7 +424,15 @@ export default {
this
.
$set
(
this
.
form
,
'
minWeightUnit
'
,
obj
[
'
transportVolumeUnit
'
]
||
obj
[
'
allVolumeUnit
'
])
this
.
$set
(
this
.
form
,
'
minWeightUnit
'
,
obj
[
'
transportVolumeUnit
'
]
||
obj
[
'
allVolumeUnit
'
])
}
}
}
,
}
,
// 价格校验器
priceValidator
(
rule
,
value
,
callback
){
if
(
!
value
||
value
==
''
)
return
callback
()
value
=
parseFloat
(
value
)
if
(
!
value
||
value
<
0
){
return
callback
(
new
Error
(
'
价格错误
'
))
}
callback
()
}
,
setDefaultVolumeUnit
(
unit
){
setDefaultVolumeUnit
(
unit
){
this
.
$set
(
this
.
form
,
'
transportVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
transportVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
clearanceVolumeUnit
'
,
unit
)
this
.
$set
(
this
.
form
,
'
clearanceVolumeUnit
'
,
unit
)
...
@@ -385,6 +478,17 @@ export default {
...
@@ -385,6 +478,17 @@ export default {
.
finally
(
res
=>
this
.
loading
=
false
)
.
finally
(
res
=>
this
.
loading
=
false
)
}
);
}
);
}
,
}
,
// 快捷设置,只更新默认运费
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
()))
}
)
}
}
}
}
}
<
/script
>
<
/script
>
...
...
src/views/ecw/productPrice/edit.vue
View file @
a81d99d4
...
@@ -62,143 +62,167 @@
...
@@ -62,143 +62,167 @@
</el-form-item>
</el-form-item>
<!--有路线则不显示路线选择器-->
<!--有路线则不显示路线选择器-->
<routers-selector
v-else
v-model=
"selectedRoutes"
:option=
"routerOption"
/>
<routers-selector
v-else
v-model=
"selectedRoutes"
:option=
"routerOption"
:type=
"type"
/>
<el-card
style=
"margin-bottom: 10px"
>
<el-card
style=
"margin-bottom: 10px"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
{{$t('价格设置')}}
{{$t('价格设置')}}
<span>
<span>
<el-checkbox
v-if=
"$route.query.action != 'batchUpdate'"
label=
""
v-model=
"needPay"
>
{{$t('预付')}}
</el-checkbox>
<el-checkbox
v-if=
"$route.query.action != 'batchUpdate'"
label=
""
v-model=
"needPay"
>
{{$t('预付')}}
</el-checkbox>
<el-checkbox
label=
""
v-model=
"stepPrice"
>
{{$t('阶梯定价')}}
</el-checkbox>
<!--空运只有阶梯价格,所以不显示勾选-->
<el-checkbox
label=
""
v-model=
"stepPrice"
v-if=
"type != 'air'"
>
{{$t('阶梯定价')}}
</el-checkbox>
</span>
</span>
</div>
</div>
<el-form-item
:label=
"$t('预付')"
prop=
"needPay"
v-if=
"$route.query.action == 'batchUpdate'"
>
<el-row
:gutter=
"20"
>
<el-radio-group
v-model=
"form.needPay"
>
<el-col
:span=
"12"
>
<el-radio
:label=
"1"
>
{{$t('预付')}}
</el-radio>
<el-form-item
:label=
"$t('预付')"
prop=
"needPay"
v-if=
"$route.query.action == 'batchUpdate'"
>
<el-radio
:label=
"0"
>
{{$t('均可')}}
</el-radio>
<el-radio-group
v-model=
"form.needPay"
>
</el-radio-group>
<el-radio
:label=
"1"
>
{{$t('预付')}}
</el-radio>
</el-form-item>
<el-radio
:label=
"0"
>
{{$t('均可')}}
</el-radio>
<el-form-item
:label=
"$t('单价模式')"
prop=
"priceType"
>
</el-radio-group>
<dict-selector
:type=
"DICT_TYPE.ECW_PRICE_TYPE"
v-model=
"form.priceType"
form-type=
"radio"
formatter=
"number"
defaultable2
/>
</el-form-item>
<!--阶梯定价-->
<
template
v-if=
"form.stepPrice==1"
>
<div
v-for=
"(item, index) in form.priceStepList"
:key=
"index"
>
<div
style=
"font-size:14px; margin:10px 0"
>
{{
$t
(
'
第{index
}
阶梯定价方案
'
,
{
index
:
index
+
1
}
)
}}
:
<
template
v
-
if
=
"
index == form.priceStepList.length - 1
"
>
<
el
-
link
type
=
"
primary
"
@
click
.
native
=
"
form.priceStepList.push({
}
)
"
>
{{
$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
"
defaultable
class
=
"
w-100
"
/>
</el-form-item>
</el-form-item>
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
v
-
if
=
"
form.priceType != 1
"
:
prop
=
"
`priceStepList.${index
}
.transportPrice`
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<el-form-item
:label=
"$t('单价模式')"
prop=
"priceType"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_PRICE_TYPE"
v-model=
"form.priceType"
form-type=
"radio"
formatter=
"number"
defaultable2
/>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable
class
=
"
w-100
"
/>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.transportVolumeUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable class="w-100" /
>
</el-form-item>
</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.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
/>
<
template
v-if=
"form.stepPrice==1"
>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.clearancePriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable
class
=
"
w-100
"
/>
<div
v-for=
"(item, index) in form.priceStepList"
:key=
"index"
>
/ <selector disabled @input="syncAllUnit" v-model="item.clearanceVolumeUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable class="w-100" /
>
<div
style=
"font-size:14px; margin:10px 0"
>
<
/el-form-item
>
{{
$t
(
'
第{index
}
阶梯定价方案
'
,
{
index
:
index
+
1
}
)
}}
:
<
template
v
-
if
=
"
index == form.priceStepList.length - 1
"
>
<
el
-
form
-
item
<
el
-
link
type
=
"
primary
"
@
click
.
native
=
"
form.priceStepList.push({
}
)
"
>
{{
$t
(
'
添加区间
'
)
}}
<
/el-link
>
:
label
=
"
$t('默认全包价')
"
<
el
-
divider
direction
=
"
vertical
"
><
/el-divider
>
v
-
if
=
"
form.priceType == 1
"
<
el
-
link
type
=
"
danger
"
@
click
.
native
=
"
form.priceStepList.splice(index, 1)
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-link
>
:
prop
=
"
`priceStepList.${index
}
.allPrice`
"
<
/template
>
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
<
/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
"
defaultable
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
"
defaultable
class
=
"
w-100
"
/>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.transportVolumeUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable 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
"
defaultable
class
=
"
w-100
"
/>
/ <selector disabled @input="syncAllUnit" v-model="item.clearanceVolumeUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable class="w-100" /
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
:
prop
=
"
`priceStepList.${index
}
.allPrice`
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable
class
=
"
w-100
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
/>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.allVolumeUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable class="w-100" /
>
<
/el-form-item
>
<
/div
>
<
/template
>
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('最小起计量')
"
:
prop
=
"
`minWeight`
"
>
>
<
selector
:
disabled
=
"
index > 0
"
@
input
=
"
syncAllUnit
"
v
-
model
=
"
item.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable
class
=
"
w-100
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.minWeight
"
type
=
"
number
"
class
=
"
w-100
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '数量错误'
}
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
item.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 ml-10
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
/>
/ <selector v-model="form.minWeightUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable2 class="w-100" disabled /
>
/ <selector :disabled="index > 0" @input="syncAllUnit" v-model="item.allVolumeUnit" :options="unitList" :label-field="$l
(
null, 'title'
)
" value-field="id" defaultable class="w-100" /
>
<
/el-form-item
>
<
/el-form-item
>
<
/div
>
<
/template
>
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('最小起计量')
"
:
prop
=
"
`minWeight`
"
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.minWeight
"
type
=
"
number
"
class
=
"
w-100
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '数量错误'
}
"
/>
/ <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
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
prop
=
"
allPrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
el
-
form
-
item
:
label
=
"
$t('默认全包价')
"
v
-
if
=
"
form.priceType == 1
"
prop
=
"
allPrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
test
=
"
allPriceUnit
"
v
-
model
=
"
form.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10 aaa
"
/>
<
selector
test
=
"
allPriceUnit
"
v
-
model
=
"
form.allPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10 aaa
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr10
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
form.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
v
-
model
=
"
form.allVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
prop
=
"
transportPrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
v
-
model
=
"
form.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10
"
/>
<
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
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('默认清关费')
"
prop
=
"
clearancePrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
v
-
model
=
"
form.clearancePriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
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
>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
selector
disabled
v
-
model
=
"
form.clearanceVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
selector
v
-
model
=
"
form.allVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
/el-form-item
>
<
/template
>
<
template
v
-
else
>
<
el
-
form
-
item
:
label
=
"
$t('默认运费')
"
prop
=
"
transportPrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
>
<
selector
v
-
model
=
"
form.transportPriceUnit
"
:
options
=
"
currencyList
"
:
label
-
field
=
"
$l('title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100 mr-10
"
/>
<
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
"
defaultable2
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
"
defaultable2
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
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
/template
>
<
/template
>
<
/template
>
<!--
特需
-->
<!--
特需
-->
<
template
v
-
if
=
"
form.priceType==1
"
>
<
template
v
-
if
=
"
form.priceType==1
"
>
<
el
-
form
-
item
<
el
-
form
-
item
v
-
for
=
"
(special, specialIndex) in this.form.specialList
"
v
-
for
=
"
(special, specialIndex) in this.form.specialList
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('全包价')
"
:
key
=
"
specialIndex + 'transport'
"
:
key
=
"
specialIndex + 'transport'
"
:
prop
=
"
`specialList.${specialIndex
}
`.allPrice
"
:
prop
=
"
`specialList.${specialIndex
}
`.allPrice
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
:
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
"
/>
<
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
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.allPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
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
"
/>
<
selector
disabled
v
-
model
=
"
special.allVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/el-form-item
>
<
/el-form-item
>
<
/template
>
<
/template
>
<
template
v
-
else
v
-
for
=
"
(special, specialIndex) in this.form.specialList
"
>
<
template
v
-
else
v
-
for
=
"
(special, specialIndex) in this.form.specialList
"
>
<
el
-
form
-
item
<
el
-
form
-
item
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('运费')
"
:
key
=
"
specialIndex + 'transport'
"
:
key
=
"
specialIndex + 'transport'
"
:
prop
=
"
`specialList.${specialIndex
}
.transportPrice`
"
:
prop
=
"
`specialList.${specialIndex
}
.transportPrice`
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
:
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
"
/>
<
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
"
/>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.transportPrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
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
"
/>
<
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
>
<
el
-
form
-
item
<
el
-
form
-
item
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')
"
v
-
if
=
"
type != 'air'
"
:
key
=
"
specialIndex + 'clearance'
"
:
label
=
"
getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + $t('清关费')
"
:
prop
=
"
`specialList.${specialIndex
}
.clearancePrice`
"
:
key
=
"
specialIndex + 'clearance'
"
:
rules
=
"
{validator: priceValidator, trigger: 'blur', message: '价格错误'
}
"
:
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
"
/>
<
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
>
<
inputor
default2
=
"
0
"
v
-
model
.
number
=
"
special.clearancePrice
"
type
=
"
number
"
:
placeholder
=
"
$t('整数或者两位小数')
"
class
=
"
w-100 mr-10
"
/>
<
selector
disabled
v
-
model
=
"
special.clearanceVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
span
class
=
"
mr-10
"
>
/</
span
>
<
/el-form-item
>
<
selector
disabled
v
-
model
=
"
special.clearanceVolumeUnit
"
:
options
=
"
unitList
"
:
label
-
field
=
"
$l(null, 'title')
"
value
-
field
=
"
id
"
defaultable2
class
=
"
w-100
"
/>
<
/template
>
<
/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
"
>
<
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
>
<
/el-row
>
<
/el-card
>
<
/el-card
>
...
@@ -212,16 +236,23 @@
...
@@ -212,16 +236,23 @@
<
el
-
radio
v
-
model
.
number
=
"
form.needBook
"
:
label
=
"
0
"
>
{{
$t
(
'
否
'
)
}}
<
/el-radio
>
<
el
-
radio
v
-
model
.
number
=
"
form.needBook
"
:
label
=
"
0
"
>
{{
$t
(
'
否
'
)
}}
<
/el-radio
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('每日入仓上限')
"
prop
=
"
dayLimit
"
v
-
if
=
"
form.needBook == 1
"
>
<!--
空运不显示这几个字段
-->
<
el
-
input
v
-
model
.
number
=
"
form.dayLimit
"
type
=
"
number
"
class
=
"
w-100
"
/>
{{
$t
(
'
立方米
'
)
}}
<
template
v
-
if
=
"
type != 'air'
"
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('每日入仓上限')
"
prop
=
"
dayLimit
"
v
-
if
=
"
form.needBook == 1
"
>
<
el
-
input
v
-
model
.
number
=
"
form.dayLimit
"
type
=
"
number
"
class
=
"
w-100
"
/>
{{
$t
(
'
立方米
'
)
}}
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('货柜位置')
"
prop
=
"
containerLocation
"
>
<
el
-
form
-
item
:
label
=
"
$t('货柜位置')
"
prop
=
"
containerLocation
"
>
<
dict
-
selector
:
type
=
"
DICT_TYPE.ECW_CONTAINER_LOCATION
"
v
-
model
=
"
form.containerLocation
"
/>
<
dict
-
selector
:
type
=
"
DICT_TYPE.ECW_CONTAINER_LOCATION
"
v
-
model
=
"
form.containerLocation
"
/>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('订单方数上限')
"
prop
=
"
square
"
>
<
el
-
input
v
-
model
.
number
=
"
form.square
"
type
=
"
number
"
style
=
"
width:200px
"
/>
<
/el-form-item
>
<
/template
>
<
el
-
form
-
item
:
label
=
"
$t('
订单方数上限')
"
prop
=
"
square
"
>
<
el
-
form
-
item
:
label
=
"
$t('
是否単询')
"
prop
=
"
inquiry
"
>
<
el
-
input
v
-
model
.
number
=
"
form.square
"
type
=
"
number
"
style
=
"
width:200px
"
/
>
<
dict
-
selector
:
type
=
"
DICT_TYPE.NEED_ORDER_INQUIRY
"
v
-
model
=
"
form.needOrderInquiry
"
form
-
type
=
"
radio
"
><
/dict-selector
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-card
>
<
/el-card
>
<
/el-form
>
<
/el-form
>
...
@@ -331,6 +362,7 @@ import Selector from '@/components/Selector'
...
@@ -331,6 +362,7 @@ import Selector from '@/components/Selector'
import
Inputor
from
'
@/components/Inputor
'
import
Inputor
from
'
@/components/Inputor
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
{
openedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
openedRouterList
}
from
'
@/api/ecw/warehouse
'
import
Decimal
from
"
decimal.js
"
;
export
default
{
export
default
{
components
:
{
RoutersSelector
,
ProductSelector
,
Selector
,
Inputor
}
,
components
:
{
RoutersSelector
,
ProductSelector
,
Selector
,
Inputor
}
,
filters
:
{
parseTime
}
,
filters
:
{
parseTime
}
,
...
@@ -363,7 +395,9 @@ export default {
...
@@ -363,7 +395,9 @@ export default {
lineList
:
[],
//路线数组
lineList
:
[],
//路线数组
loading
:
false
,
loading
:
false
,
showLogsDialog
:
false
,
// 显示价格日志弹层
showLogsDialog
:
false
,
// 显示价格日志弹层
logs
:
[]
logs
:
[],
// 批量加价/减价
quickForm
:{
}
// 快速加价/减价表单
}
}
}
,
}
,
computed
:
{
computed
:
{
...
@@ -383,7 +417,27 @@ export default {
...
@@ -383,7 +417,27 @@ export default {
map
[
item
.
id
]
=
this
.
$l
(
item
,
'
title
'
)
map
[
item
.
id
]
=
this
.
$l
(
item
,
'
title
'
)
}
)
}
)
return
map
return
map
}
}
,
// 默认运费的货币和体积单位
currencyAndUnit
(){
let
currency
=
null
,
unit
=
null
,
fields
=
null
// 如果是阶梯价格则取第一阶梯,否则就取form中的字段
let
obj
=
this
.
form
.
stepPrice
==
1
?
this
.
form
.
priceStepList
[
0
]
:
this
.
form
// 全包价
if
(
this
.
form
.
priceType
==
1
){
currency
=
obj
.
allPriceUnit
unit
=
obj
.
allVolumeUnit
}
else
{
currency
=
obj
.
transportPriceUnit
unit
=
obj
.
transportVolumeUnit
}
return
{
currency
,
unit
}
}
,
// 类型,默认海运sea,air表示空运
type
(){
return
this
.
$route
.
path
.
split
(
/
[
-_
]
/
).
pop
()
}
,
}
,
}
,
watch
:
{
watch
:
{
...
@@ -464,14 +518,6 @@ export default {
...
@@ -464,14 +518,6 @@ export default {
}
,
}
,
'
form.stepPrice
'
(
stepPrice
){
'
form.stepPrice
'
(
stepPrice
){
if
(
stepPrice
==
1
&&
(
!
this
.
form
.
priceStepList
||
!
this
.
form
.
priceStepList
.
length
)){
if
(
stepPrice
==
1
&&
(
!
this
.
form
.
priceStepList
||
!
this
.
form
.
priceStepList
.
length
)){
/* let def = {
weightUnit: this.unitList[0].id,
allPriceUnit: this.currencyList[0].id,
transportPriceUnit: this.currencyList[0].id,
transportVolumeUnit: this.unitList[0].id,
clearancePriceUnit: this.currencyList[0].id,
clearanceVolumeUnit: this.unitList[0].id,
}
*/
this
.
$set
(
this
.
form
,
'
priceStepList
'
,
[{
}
,{
}
])
this
.
$set
(
this
.
form
,
'
priceStepList
'
,
[{
}
,{
}
])
}
}
this
.
syncAllUnit
()
this
.
syncAllUnit
()
...
@@ -551,7 +597,8 @@ export default {
...
@@ -551,7 +597,8 @@ export default {
if
(
!
this
.
$route
.
query
.
action
){
if
(
!
this
.
$route
.
query
.
action
){
this
.
form
=
{
this
.
form
=
{
priceType
:
0
,
priceType
:
0
,
stepPrice
:
0
,
// 空运则默认是阶梯价格
stepPrice
:
this
.
type
==
'
air
'
?
1
:
0
,
advanceStatus
:
0
,
advanceStatus
:
0
,
needBook
:
0
,
needBook
:
0
,
specialList
:
[],
specialList
:
[],
...
@@ -617,7 +664,6 @@ export default {
...
@@ -617,7 +664,6 @@ export default {
}
)
}
)
}
)
}
)
}
*/
}
*/
console
.
log
(
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
))
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
({
...
@@ -812,6 +858,14 @@ export default {
...
@@ -812,6 +858,14 @@ export default {
data
.
productId
=
this
.
product
.
id
;
data
.
productId
=
this
.
product
.
id
;
data
.
lineChannelList
=
this
.
lineList
.
length
?
this
.
lineList
:
this
.
selectedRoutes
data
.
lineChannelList
=
this
.
lineList
.
length
?
this
.
lineList
:
this
.
selectedRoutes
// 空运且不是全包价的清关费用0填充
if
(
this
.
type
==
'
air
'
&&
this
.
form
.
priceType
==
0
){
// 根据是否全包价确定字段
data
.
priceStepList
.
forEach
(
item
=>
{
item
.
clearancePrice
=
item
.
clearancePrice
||
0
}
)
}
this
.
loading
=
true
this
.
loading
=
true
createProductPrice
(
data
).
then
(
response
=>
{
createProductPrice
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
请求成功
"
));
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
请求成功
"
));
...
@@ -829,6 +883,17 @@ export default {
...
@@ -829,6 +883,17 @@ export default {
item
.
detail
=
JSON
.
parse
(
item
.
content
)
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
()))
}
)
}
}
}
}
}
}
...
...
src/views/ecw/productPrice/index.vue
View file @
a81d99d4
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<div
class=
"page-title"
>
{{
$route
.
query
.
product_id
?
productTitle
+
'
-
'
:
this
.
$t
(
'
全部
'
)
}}{{
$t
(
'
路线价格列表
'
)
}}
</div>
<div
class=
"page-title"
>
{{
$route
.
query
.
product_id
?
productTitle
+
'
-
'
+
$t
(
'
路线价格列表
'
)
:
routeName
}}
</div>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<!--
<el-form-item
:label=
"$t('商品编码')"
prop=
"productCode"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.productCode"
:placeholder=
"$t('请输入商品编码')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('海关编码')"
prop=
"customsCode"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.customsCode"
:placeholder=
"$t('请输入海关编码')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
:label=
"$t('商品名称')"
prop=
"titleZh"
v-if=
"!$route.query.product_id"
>
<el-form-item
:label=
"$t('商品名称')"
prop=
"titleZh"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.titleZh"
:placeholder=
"$t('请输入中英文名称、商品编码、海关编码')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.titleZh"
:placeholder=
"$t('请输入中英文名称、商品编码、海关编码')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
...
@@ -20,18 +12,11 @@
...
@@ -20,18 +12,11 @@
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<!--
<el-form-item
:label=
"$t('商品属性')"
prop=
"attrId"
v-if=
"!$route.query.product_id"
>
<el-select
v-model=
"queryParams.attrId"
:placeholder=
"$t('选择商品属性')"
clearable
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('商品特性')"
prop=
"attrId"
v-if=
"!$route.query.product_id"
>
// TODO
</el-form-item>
-->
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportType"
>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
clearable
/>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
clearable
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelId"
>
<!--海运不显示渠道-->
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelId"
v-if=
"type == 'sea'"
>
<el-select
v-model=
"queryParams.shippingChannelId"
clearable
>
<el-select
v-model=
"queryParams.shippingChannelId"
clearable
>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
/>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
/>
</el-select>
</el-select>
...
@@ -69,23 +54,27 @@
...
@@ -69,23 +54,27 @@
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<!--全部路线吗没有新增入口,指定商品的路线价格才有添加路线-->
<!--全部路线吗没有新增入口,指定商品的路线价格才有添加路线-->
<el-col
:span=
"1.5"
v-if=
"$route.query.product_id"
>
<el-col
:span=
"1.5"
v-if=
"$route.query.product_id"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:product-price:create']"
>
{{
$t
(
'
新建价格
'
)
}}
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd('air')"
v-hasPermi=
"['ecw:product-price:create']"
>
{{
$t
(
'
新建空运价格
'
)
}}
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd('sea')"
v-hasPermi=
"['ecw:product-price:create']"
>
{{
$t
(
'
新建海运价格
'
)
}}
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<!--未指定商品-->
<!--未指定商品-->
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit"
>
{{
$t
(
'
批量设置价格
'
)
}}
</el-button>
<template
v-if=
"!$route.query.product_id"
>
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
v-hasPermi=
"['ecw:product-price:bartch_black']"
size=
"mini"
@
click=
"batchBlock"
:disabled=
"multiple"
>
{{
$t
(
'
批量加入黑名单
'
)
}}
</el-button>
<!--
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit"
>
{{
$t
(
'
批量设置价格
'
)
}}
</el-button>
-->
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_down']"
size=
"mini"
@
click=
"batchOff"
:disabled=
"multiple"
>
{{
$t
(
'
批量下架
'
)
}}
</el-button>
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:bartch_black']"
size=
"mini"
@
click=
"batchBlock"
:disabled=
"multiple"
>
{{
$t
(
'
批量加入黑名单
'
)
}}
</el-button>
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_down']"
size=
"mini"
@
click=
"batchOff"
:disabled=
"multiple"
>
{{
$t
(
'
批量下架
'
)
}}
</el-button>
<el-button
v-if=
"!$route.query.product_id"
type=
"warning"
v-hasPermi=
"['ecw:product-price:export']"
@
click=
"handleExport"
:loading=
"exportLoading"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
<el-button
type=
"warning"
v-hasPermi=
"['ecw:product-price:export']"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
<el-button
type=
"primary"
v-if=
"type != 'air'"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('sea')"
>
{{
$t
(
'
批量设置海运价格
'
)
}}
</el-button>
<el-button
type=
"primary"
v-if=
"type != 'sea'"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('air')"
>
{{
$t
(
'
批量设置空运价格
'
)
}}
</el-button>
</
template
>
<!--指定商品-->
<!--指定商品-->
<el-button
v-if=
"$route.query.product_id"
type=
"primary"
v-hasPermi=
"['ecw:product-price:single_product']"
@
click=
"batchSetSingleProductPrice"
>
{{
$t
(
'
批量设置单个商品的路线
'
)
}}
</el-button>
<
template
v-else
>
<el-button
type=
"primary"
size=
"mini"
v-hasPermi=
"['ecw:product-price:single_product']"
@
click=
"batchSetSingleProductPrice('sea')"
>
{{
$t
(
'
批量设置商品海运路线
'
)
}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
v-hasPermi=
"['ecw:product-price:single_product']"
@
click=
"batchSetSingleProductPrice('air')"
>
{{
$t
(
'
批量设置商品空运路线
'
)
}}
</el-button>
</
template
>
</el-col>
</el-col>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:product-price:export']"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
</el-col>
-->
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
...
@@ -162,8 +151,19 @@
...
@@ -162,8 +151,19 @@
{{
$t
(
'
运费
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
priceStepList
[
0
].
transportPriceUnit
)
+
scope
.
row
.
priceStepList
[
0
].
transportPrice
}}
&
nbsp
;
{{
$t
(
'
运费
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
priceStepList
[
0
].
transportPriceUnit
)
+
scope
.
row
.
priceStepList
[
0
].
transportPrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
priceStepList
[
0
].
transportPriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
priceStepList
[
0
].
transportVolumeUnit
)
}}
{{
getCurrencyTitle
(
scope
.
row
.
priceStepList
[
0
].
transportPriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
priceStepList
[
0
].
transportVolumeUnit
)
}}
<
br
/>
<
br
/>
{{
$t
(
'
清关费
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
priceStepList
[
0
].
clearancePriceUnit
)
+
scope
.
row
.
priceStepList
[
0
].
clearancePrice
}}
&
nbsp
;
<
template
v
-
if
=
"
[3,4].indexOf(+scope.row.warehouseLineDO.transportType) > -1
"
>
{{
getCurrencyTitle
(
scope
.
row
.
priceStepList
[
0
].
clearancePriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
priceStepList
[
0
].
clearanceVolumeUnit
)
}}
<!--
空运的清关费
-->
<
template
v
-
if
=
"
scope.row.clearPriceStepList.length
"
>
{{
$t
(
'
清关费
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
clearPriceStepList
[
0
].
clearancePriceUnit
)
+
scope
.
row
.
clearPriceStepList
[
0
].
clearancePrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
clearPriceStepList
[
0
].
clearancePriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
clearPriceStepList
[
0
].
clearanceVolumeUnit
)
}}
<
/template
>
<
template
v
-
else
>
{{
$t
(
'
暂无清关费设置
'
)
}}
<
/template
>
<
/template
>
<
template
v
-
else
>
<!--
海运的清关费
-->
{{
$t
(
'
清关费
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
priceStepList
[
0
].
clearancePriceUnit
)
+
scope
.
row
.
priceStepList
[
0
].
clearancePrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
priceStepList
[
0
].
clearancePriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
priceStepList
[
0
].
clearanceVolumeUnit
)
}}
<
/template
>
<
/div
>
<
/div
>
<
div
v
-
if
=
"
scope.row.priceType == 1
"
>
<
div
v
-
if
=
"
scope.row.priceType == 1
"
>
{{
$t
(
'
全包价
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
priceStepList
[
0
].
allPriceUnit
)
+
scope
.
row
.
priceStepList
[
0
].
allPrice
}}
&
nbsp
;
{{
$t
(
'
全包价
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
priceStepList
[
0
].
allPriceUnit
)
+
scope
.
row
.
priceStepList
[
0
].
allPrice
}}
&
nbsp
;
...
@@ -195,7 +195,11 @@
...
@@ -195,7 +195,11 @@
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
advanceStatus
"
:
label
=
"
$t('単询')
"
align
=
"
center
"
width
=
"
80
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.NEED_ORDER_INQUIRY
"
:
value
=
"
scope.row.needOrderInquiry
"
><
/dict-tag
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
advanceStatus
"
:
label
=
"
$t('预付')
"
align
=
"
center
"
width
=
"
80
"
>
<
el
-
table
-
column
prop
=
"
advanceStatus
"
:
label
=
"
$t('预付')
"
align
=
"
center
"
width
=
"
80
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
div
>
<
div
>
...
@@ -224,6 +228,9 @@
...
@@ -224,6 +228,9 @@
v
-
hasPermi
=
"
['ecw:product-price:down']
"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
$t
(
'
下架
'
)
:
$t
(
'
上架
'
)
}}
<
/el-button
>
v
-
hasPermi
=
"
['ecw:product-price:down']
"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
$t
(
'
下架
'
)
:
$t
(
'
上架
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
v
-
hasPermi
=
"
['ecw:product-price:delete']
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-button
>
v
-
hasPermi
=
"
['ecw:product-price:delete']
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
copyTemplate(scope.row)
"
size
=
"
mini
"
type
=
"
text
"
>
复制模板
<
/el-button
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 0)
"
v
-
if
=
"
scope.row.needOrderInquiry
"
size
=
"
mini
"
type
=
"
text
"
>
取消単询
<
/el-button
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 1)
"
v
-
else
size
=
"
mini
"
type
=
"
text
"
>
加入単询
<
/el-button
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
...
@@ -235,7 +242,17 @@
...
@@ -235,7 +242,17 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
,
batchBlock
,
batchOff
}
from
"
@/api/ecw/productPrice
"
;
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
,
batchBlock
,
batchOff
,
updateOrderInquiry
}
from
"
@/api/ecw/productPrice
"
;
import
{
openedRouterList
}
from
"
@/api/ecw/warehouse
"
;
import
{
openedRouterList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
...
@@ -249,10 +266,12 @@ import DictTag from '@/components/DictTag'
...
@@ -249,10 +266,12 @@ import DictTag from '@/components/DictTag'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
{
getProduct
}
from
'
@/api/ecw/product
'
;
import
{
getProduct
}
from
'
@/api/ecw/product
'
;
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
Template
from
"
@/views/cms/template
"
;
export
default
{
export
default
{
name
:
"
EcwProductpriceIndex
"
,
name
:
"
EcwProductpriceIndex
"
,
filters
:
{
parseTime
}
,
filters
:
{
parseTime
}
,
components
:
{
components
:
{
Template
,
DictTag
DictTag
}
,
}
,
data
()
{
data
()
{
...
@@ -339,6 +358,23 @@ export default {
...
@@ -339,6 +358,23 @@ export default {
}
,
}
,
computed
:
{
computed
:
{
// 路径中的运输方式参数
transportType
()
{
// product-price-1_2的格式,如果没有三段则最后一段不是运输方式
return
this
.
$route
.
path
.
split
(
'
-
'
)[
2
]
||
''
;
}
,
// 路由中的标题
routeName
(){
return
this
.
$route
.
name
}
,
// 类型,transportType是1和2(1_2用一个表示)表示海运,3和4表示空运
type
(){
// 如果没有则表示商品路线价格
if
(
!
this
.
transportType
){
return
null
}
return
[
'
3
'
,
'
4
'
].
indexOf
(
this
.
transportType
)
>
-
1
?
'
air
'
:
'
sea
'
}
,
// 商品名称
// 商品名称
productTitle
(){
productTitle
(){
if
(
!
this
.
product
){
if
(
!
this
.
product
){
...
@@ -482,6 +518,12 @@ export default {
...
@@ -482,6 +518,12 @@ export default {
this
.
product
=
res
.
data
this
.
product
=
res
.
data
}
)
}
)
}
else
{
}
else
{
if
(
this
.
transportType
)
{
// 如果指定了单个的运输方式则赋值
if
(
this
.
transportType
.
split
(
'
_
'
).
length
==
1
)
{
this
.
$set
(
this
.
queryParams
,
'
transportType
'
,
+
this
.
transportType
)
}
}
this
.
getAttrList
();
this
.
getAttrList
();
}
}
...
@@ -549,9 +591,9 @@ export default {
...
@@ -549,9 +591,9 @@ export default {
}
)
}
)
}
,
}
,
handleSelectionChange
(
val
)
{
/*
handleSelectionChange(val) {
this.lineList = val;
this.lineList = val;
}
,
}
,
*/
/**运输线路改变 */
/**运输线路改变 */
transportTypeChange
(
newVal
)
{
transportTypeChange
(
newVal
)
{
...
@@ -631,21 +673,23 @@ export default {
...
@@ -631,21 +673,23 @@ export default {
this
.
handleQuery
();
this
.
handleQuery
();
}
,
}
,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
(
type
)
{
return
this
.
$router
.
push
(
'
../../lineProject/product-price/edit?
'
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
())
return
this
.
$router
.
push
(
`../../lineProject/product-price/edit-${type
}
?`
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
())
}
,
}
,
// 批量修改单个商品的价格(一条或者多条,后者全部路线)
// 批量修改单个商品的价格(一条或者多条,后者全部路线)
batchSetSingleProductPrice
(){
batchSetSingleProductPrice
(
type
){
this
.
$router
.
push
(
'
../../lineProject/product-price/edit?action=batchUpdate&product_id=
'
+
this
.
$route
.
query
.
product_id
+
'
&ids=
'
+
this
.
ids
)
this
.
$router
.
push
(
`../../lineProject/product-price/edit?action=batchUpdate&type=${type
}
&product_id=${this.$route.query.product_id
}
&ids=${this.ids
}
`
)
}
,
}
,
// 批量设置路线
// 批量设置路线
handleBatchEdit
()
{
handleBatchEdit
(
type
)
{
this
.
$router
.
push
(
'
../../lineProject/batch-edit
'
)
this
.
$router
.
push
(
'
../../lineProject/batch-edit
-
'
+
type
)
}
,
}
,
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
,
readonly
)
{
handleUpdate
(
row
,
readonly
)
{
let
url
=
'
../../lineProject/product-price/edit?action=update&id=
'
+
row
.
id
let
transportType
=
row
.
warehouseLineDO
.
transportType
let
type
=
transportType
==
3
||
transportType
==
4
?
'
air
'
:
'
sea
'
let
url
=
`../../lineProject/product-price/edit-${type
}
?action=update&id=${row.id
}
`
if
(
readonly
)
url
+=
'
&readonly=1
'
if
(
readonly
)
url
+=
'
&readonly=1
'
return
this
.
$router
.
push
(
url
)
return
this
.
$router
.
push
(
url
)
}
,
}
,
...
@@ -685,7 +729,7 @@ export default {
...
@@ -685,7 +729,7 @@ export default {
}
,
}
,
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
/*
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate(valid => {
if (!valid) {
if (!valid) {
return;
return;
...
@@ -720,7 +764,7 @@ export default {
...
@@ -720,7 +764,7 @@ export default {
this.getList();
this.getList();
}
);
}
);
}
);
}
);
}
,
}
,
*/
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
id
=
row
.
id
;
const
id
=
row
.
id
;
...
@@ -768,6 +812,20 @@ export default {
...
@@ -768,6 +812,20 @@ export default {
}
)
}
)
}
,
}
,
// 设置,取消単询
setOrderInquiry
(
row
,
needOrderInquiry
){
row
.
needOrderInquiry
=
needOrderInquiry
updateOrderInquiry
(
row
).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
msg
||
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
}
)
}
,
// 复制模板
copyTemplate
(
row
){
// 跳转到批量设置页面,并填充数据
this
.
$router
.
push
(
`../../lineProject/batch-edit-${row.transportType == 3 || row.transportType == 4 ? 'air' : 'sea'
}
?templateId=${row.id
}
`
)
}
}
}
}
;
}
;
<
/script
>
<
/script
>
...
...
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