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
b4a2e2ca
Commit
b4a2e2ca
authored
Aug 30, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善修复线路价格bug等
parent
45f2ffc8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
202 additions
and
115 deletions
+202
-115
productPrice.js
src/api/ecw/productPrice.js
+19
-0
index.vue
src/components/CustomerContactSelector/index.vue
+20
-2
index.vue
src/components/RoutersSelector/index.vue
+17
-3
edit.vue
src/views/ecw/productAttr/edit.vue
+1
-1
batchEdit.vue
src/views/ecw/productPrice/batchEdit.vue
+7
-3
edit.vue
src/views/ecw/productPrice/edit.vue
+69
-38
index.vue
src/views/ecw/productPrice/index.vue
+69
-68
No files found.
src/api/ecw/productPrice.js
View file @
b4a2e2ca
...
@@ -70,3 +70,22 @@ export function batchUpdateProductPrice(query) {
...
@@ -70,3 +70,22 @@ export function batchUpdateProductPrice(query) {
data
:
query
data
:
query
})
})
}
}
// 批量拉黑
export
function
batchBlock
(
query
)
{
return
request
({
url
:
'
/ecw/product-price/batchBlock
'
,
method
:
'
get
'
,
params
:
query
})
}
// 批量下架
export
function
batchOff
(
query
)
{
return
request
({
url
:
'
/ecw/product-price/batchOff
'
,
method
:
'
get
'
,
params
:
query
})
}
src/components/CustomerContactSelector/index.vue
View file @
b4a2e2ca
...
@@ -10,9 +10,9 @@
...
@@ -10,9 +10,9 @@
:remote-method=
"remoteMethod"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
:loading=
"loading"
>
<el-option
<el-option
v-for=
"(item, index) in
l
ist"
v-for=
"(item, index) in
formattedL
ist"
:key=
"item.id"
:key=
"item.id"
:label=
"`$
{item.
contactsName
}`"
:label=
"`$
{item.
label
}`"
:value="index">
:value="index">
</el-option>
</el-option>
</el-select>
</el-select>
...
@@ -44,6 +44,24 @@ export default {
...
@@ -44,6 +44,24 @@ export default {
showQuickCreate
:
false
showQuickCreate
:
false
}
}
},
},
computed
:{
formattedList
(){
return
this
.
list
.
map
(
item
=>
{
item
.
label
=
item
.
contactsName
let
more
=
[]
if
(
item
.
phoneNew
){
more
.
push
(
item
.
phoneNew
)
}
if
(
item
.
email
){
more
.
push
(
item
.
email
)
}
if
(
more
.
length
){
item
.
label
+=
`(
${
more
.
join
(
'
|
'
)}
)`
}
return
item
})
}
},
watch
:{
watch
:{
index
(
val
){
index
(
val
){
this
.
$emit
(
'
input
'
,
val
!==
null
?
this
.
list
[
val
].
customerContactsId
:
null
)
this
.
$emit
(
'
input
'
,
val
!==
null
?
this
.
list
[
val
].
customerContactsId
:
null
)
...
...
src/components/RoutersSelector/index.vue
View file @
b4a2e2ca
...
@@ -88,6 +88,20 @@ export default {
...
@@ -88,6 +88,20 @@ export default {
exportCityList
(){
exportCityList
(){
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
||
item
.
type
==
3
)
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
||
item
.
type
==
3
)
},
},
exportCityIds
(){
let
ids
=
[]
this
.
exportCityList
.
forEach
(
item
=>
{
ids
.
push
(
item
.
id
)
})
return
ids
},
importCityIds
(){
let
ids
=
[]
this
.
importCityList
.
forEach
(
item
=>
{
ids
.
push
(
item
.
id
)
})
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
)
},
},
...
@@ -181,9 +195,9 @@ export default {
...
@@ -181,9 +195,9 @@ export default {
if
(
this
.
importCity
){
if
(
this
.
importCity
){
params
.
destCityId
=
this
.
importCity
params
.
destCityId
=
this
.
importCity
}
}
openedRouterList
(
params
).
then
(
res
=>
{
openedRouterList
(
params
).
then
(
res
=>
this
.
openedRouterList
=
res
.
data
.
filter
(
item
=>
{
this
.
openedRouterList
=
res
.
data
return
this
.
exportCityIds
.
indexOf
(
item
.
startCityId
)
>
-
1
&&
this
.
importCityIds
.
indexOf
(
item
.
destCityId
)
>
-
1
})
})
)
},
},
// 切换路线选择
// 切换路线选择
toggleChecker
(
router
,
selected
){
toggleChecker
(
router
,
selected
){
...
...
src/views/ecw/productAttr/edit.vue
View file @
b4a2e2ca
...
@@ -111,7 +111,7 @@ export default {
...
@@ -111,7 +111,7 @@ export default {
"
dayLimit
"
:
undefined
,
"
dayLimit
"
:
undefined
,
"
idList
"
:
[],
"
idList
"
:
[],
"
isAllProduct
"
:
undefined
,
"
isAllProduct
"
:
undefined
,
"
needBook
"
:
false
,
"
needBook
"
:
undefined
,
"
packaging
"
:
undefined
,
"
packaging
"
:
undefined
,
"
requirements
"
:
undefined
,
"
requirements
"
:
undefined
,
"
square
"
:
undefined
,
"
square
"
:
undefined
,
...
...
src/views/ecw/productPrice/batchEdit.vue
View file @
b4a2e2ca
...
@@ -206,9 +206,9 @@ export default {
...
@@ -206,9 +206,9 @@ export default {
selectedRoutes
:
[],
// 勾选的路线渠道
selectedRoutes
:
[],
// 勾选的路线渠道
form
:
{
form
:
{
stepPrice
:
0
,
stepPrice
:
0
,
advanceStatus
:
0
,
//
advanceStatus: 0,
needBook
:
0
,
//
needBook: 0,
dayLimit
:
10000
//
dayLimit: 10000
},
},
specialProducts
:
[],
specialProducts
:
[],
priceStepList
:
[{},{}],
// 阶梯价格
priceStepList
:
[{},{}],
// 阶梯价格
...
@@ -299,6 +299,10 @@ export default {
...
@@ -299,6 +299,10 @@ export default {
if
(
transportIds
.
size
==
1
&&
transportIds
.
has
(
3
)){
if
(
transportIds
.
size
==
1
&&
transportIds
.
has
(
3
)){
this
.
setDefaultVolumeUnit
(
6
)
this
.
setDefaultVolumeUnit
(
6
)
}
else
this
.
setDefaultVolumeUnit
(
7
)
}
else
this
.
setDefaultVolumeUnit
(
7
)
},
'
form.needBook
'
(
val
){
if
(
val
)
this
.
$set
(
this
.
form
,
'
dayLimit
'
,
10000
)
else
delete
this
.
form
.
dayLimit
}
}
},
},
async
created
()
{
async
created
()
{
...
...
src/views/ecw/productPrice/edit.vue
View file @
b4a2e2ca
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
:key=
"item.lineId"
:key=
"item.lineId"
:value=
"'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType) + '】从【' + item.warehouseLineDO.startTitleZh + '】发往【' + item.warehouseLineDO.destTitleZh + '】'"
:value=
"'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType) + '】从【' + item.warehouseLineDO.startTitleZh + '】发往【' + item.warehouseLineDO.destTitleZh + '】'"
disabled
/>
disabled
/>
</el-form-item>
--
</el-form-item>
--
>
<!--多条路线批量修改-->
<!--多条路线批量修改-->
<el-form-item
label=
"路线"
prop=
"lineChannelList"
v-if=
"lineList.length"
>
<el-form-item
label=
"路线"
prop=
"lineChannelList"
v-if=
"lineList.length"
>
<template
v-if=
"lineList.length == 1"
>
<template
v-if=
"lineList.length == 1"
>
...
@@ -50,7 +50,8 @@
...
@@ -50,7 +50,8 @@
</el-checkbox-group>
</el-checkbox-group>
</el-form-item>
</el-form-item>
<routers-selector
v-if=
"!$route.query.ids"
v-model=
"selectedRoutes"
/>
<!--有路线则不显示路线选择器-->
<routers-selector
v-else
v-model=
"selectedRoutes"
/>
<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;"
>
...
@@ -327,11 +328,25 @@ export default {
...
@@ -327,11 +328,25 @@ export default {
item
.
clearanceVolumeUnit
=
val
item
.
clearanceVolumeUnit
=
val
})
})
},
},
'
form.transportPriceUnit
'
(
val
){
this
.
specialProducts
.
forEach
(
item
=>
{
item
.
transportPriceUnit
=
val
})
},
'
form.clearancePriceUnit
'
(
val
){
this
.
specialProducts
.
forEach
(
item
=>
{
item
.
clearancePriceUnit
=
val
})
},
'
form.allVolumeUnit
'
(
val
){
'
form.allVolumeUnit
'
(
val
){
this
.
specialProducts
.
forEach
(
item
=>
{
this
.
specialProducts
.
forEach
(
item
=>
{
item
.
allVolumeUnit
=
val
item
.
allVolumeUnit
=
val
})
})
},
},
'
form.needBook
'
(
val
){
if
(
val
)
this
.
$set
(
this
.
form
,
'
dayLimit
'
,
10000
)
else
delete
this
.
form
.
dayLimit
},
selectedRoutes
(
routers
)
{
selectedRoutes
(
routers
)
{
let
transportIds
=
[]
let
transportIds
=
[]
routers
.
forEach
(
item
=>
{
routers
.
forEach
(
item
=>
{
...
@@ -349,49 +364,47 @@ export default {
...
@@ -349,49 +364,47 @@ export default {
}
}
},
},
async
created
()
{
async
created
()
{
// 修改回显
// action=batchUpdate 表示批量修改单个商品的价格(一条或者多条),如果没有ids显示路线选择组件,否则不显示路线组件
// action=update 表示修改单个商品的单条路线价格,需要回显
if
(
this
.
$route
.
query
.
action
==
'
update
'
){
getProductPrice
(
this
.
$route
.
query
.
id
).
then
(
res
=>
{
this
.
$set
(
this
,
'
form
'
,
res
.
data
)
this
.
lineList
=
[
res
.
data
]
})
}
// action=batchUpdate且ids不为空
if
(
this
.
$route
.
query
.
action
==
'
batchUpdate
'
){
delete
this
.
form
.
needBook
}
if
(
this
.
$route
.
query
.
ids
)
{
if
(
this
.
$route
.
query
.
ids
)
{
let
query
=
{
let
query
=
{
ids
:
this
.
$route
.
query
.
ids
ids
:
this
.
$route
.
query
.
ids
}
}
getProductPriceList
(
query
).
then
(
res
=>
{
getProductPriceList
(
query
).
then
(
res
=>
{
this
.
form
=
{
productId
:
res
.
data
[
0
].
productId
,
productType
:
res
.
data
[
0
].
productType
,
specialList
:
res
.
data
[
0
].
specialList
,
advanceStatus
:
res
.
data
[
0
].
advanceStatus
,
needBook
:
res
.
data
[
0
].
needBook
,
dayLimit
:
res
.
data
[
0
].
dayLimit
,
containerLocation
:
res
.
data
[
0
].
containerLocation
,
square
:
res
.
data
[
0
].
square
}
this
.
lineList
=
res
.
data
this
.
lineList
=
res
.
data
})
})
}
else
{
}
this
.
productDisabled
=
false
// 获取类型列表
// 未指定商品则不禁用商品选择
getProductTypeList
().
then
(
res
=>
this
.
productTypeList
=
res
.
data
)
if
(
!
this
.
$route
.
query
.
product_id
){
this
.
productDisabled
=
false
}
// 获取类型列表
getProductTypeList
().
then
(
res
=>
this
.
productTypeList
=
res
.
data
)
if
(
this
.
$route
.
query
.
product_type
)
{
if
(
this
.
$route
.
query
.
product_type
)
{
this
.
$set
(
this
.
form
,
'
productType
'
,
+
this
.
$route
.
query
.
product_type
)
this
.
$set
(
this
.
form
,
'
productType
'
,
+
this
.
$route
.
query
.
product_type
)
}
}
if
(
this
.
$route
.
query
.
product_id
)
{
if
(
this
.
$route
.
query
.
product_id
)
{
this
.
$set
(
this
.
form
,
'
productId
'
,
+
this
.
$route
.
query
.
product_id
)
this
.
$set
(
this
.
form
,
'
productId
'
,
+
this
.
$route
.
query
.
product_id
)
/*
}
getProduct(this.$route.query.product_id).then(res => {
this.product = res.data
}) */
}
// 默认费用单位
// 修改单条路线不回显单位
if
(
this
.
$route
.
query
.
action
!==
'
update
'
){
this
.
setDefaultVolumeUnit
(
7
)
this
.
setDefaultVolumeUnit
(
7
)
}
}
/* // 指定产品
else
} */
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
)
...
@@ -420,8 +433,12 @@ export default {
...
@@ -420,8 +433,12 @@ export default {
return
;
return
;
}
}
// 只有新增的时候做判断
// 只有修改单条路线的时候,不需要选择路线
if
(
!
this
.
$route
.
query
.
ids
&&
(
!
this
.
selectedRoutes
||
!
this
.
selectedRoutes
.
length
))
{
/* if (this.$route.query.action !== 'update' && (!this.selectedRoutes || !this.selectedRoutes.length)) {
this.$message.error('请选择线路');
return;
} */
if
(
!
this
.
lineList
.
length
&&
(
!
this
.
selectedRoutes
||
!
this
.
selectedRoutes
.
length
))
{
this
.
$message
.
error
(
'
请选择线路
'
);
this
.
$message
.
error
(
'
请选择线路
'
);
return
;
return
;
}
}
...
@@ -434,14 +451,25 @@ export default {
...
@@ -434,14 +451,25 @@ export default {
data
.
priceStepList
=
this
.
priceStepList
data
.
priceStepList
=
this
.
priceStepList
}
}
// 修改
的提交
// 修改
单条路线
if
(
this
.
$route
.
query
.
action
==
'
update
'
)
{
if
(
this
.
$route
.
query
.
action
==
'
update
'
)
{
return
updateProductPrice
(
data
).
then
(
res
=>
{
this
.
$modal
.
msgSuccess
(
"
请求成功
"
);
this
.
$router
.
back
()
})
}
// 批量修改(单个商品的单个路线,多个路线,或者全部路线)的提交
if
(
this
.
$route
.
query
.
action
==
'
batchUpdate
'
)
{
// 指定一条路线
if
(
this
.
lineList
.
length
==
1
){
if
(
this
.
lineList
.
length
==
1
){
data
.
lineChannelList
=
{
data
.
lineChannelList
=
{
lineId
:
this
.
lineList
[
0
].
warehouseLineId
,
lineId
:
this
.
lineList
[
0
].
warehouseLineId
,
shippingChannelId
:
this
.
lineList
[
0
].
shippingChannelId
||
0
shippingChannelId
:
this
.
lineList
[
0
].
shippingChannelId
||
0
}
}
}
else
{
}
// 指定多条路线的需要过滤未勾选的
else
if
(
this
.
lineList
.
length
>
1
){
data
.
lineChannelList
=
[]
data
.
lineChannelList
=
[]
this
.
lineList
.
forEach
(
item
=>
{
this
.
lineList
.
forEach
(
item
=>
{
if
(
this
.
checkList
.
indexOf
(
item
.
id
)
>
-
1
){
if
(
this
.
checkList
.
indexOf
(
item
.
id
)
>
-
1
){
...
@@ -453,6 +481,10 @@ export default {
...
@@ -453,6 +481,10 @@ export default {
}
}
})
})
}
}
// 未指定路线的从路线选择组件里获取
if
(
!
this
.
lineList
.
length
){
data
.
lineChannelList
=
this
.
selectedRoutes
}
if
(
data
.
lineChannelList
.
length
<
1
){
if
(
data
.
lineChannelList
.
length
<
1
){
return
this
.
$message
.
error
(
'
请选择需要修改的路线
'
)
return
this
.
$message
.
error
(
'
请选择需要修改的路线
'
)
}
}
...
@@ -461,7 +493,6 @@ export default {
...
@@ -461,7 +493,6 @@ export default {
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$router
.
replace
(
'
/product/product-price?
'
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
())
this
.
$router
.
replace
(
'
/product/product-price?
'
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
())
})
})
return
;
return
;
}
}
// 添加的提交
// 添加的提交
...
...
src/views/ecw/productPrice/index.vue
View file @
b4a2e2ca
...
@@ -3,16 +3,16 @@
...
@@ -3,16 +3,16 @@
<div
class=
"page-title"
>
{{
$route
.
query
.
product_id
?
productTitle
+
'
-
'
:
'
全部
'
}}
路线价格列表
</div>
<div
class=
"page-title"
>
{{
$route
.
query
.
product_id
?
productTitle
+
'
-
'
:
'
全部
'
}}
路线价格列表
</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=
"商品编码"
prop=
"productCode"
v-if=
"!$route.query.product_id"
>
<
!--
<
el-form-item
label=
"商品编码"
prop=
"productCode"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.productCode"
placeholder=
"请输入商品编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.productCode"
placeholder=
"请输入商品编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"海关编码"
prop=
"customsCode"
v-if=
"!$route.query.product_id"
>
<el-form-item
label=
"海关编码"
prop=
"customsCode"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.customsCode"
placeholder=
"请输入海关编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.customsCode"
placeholder=
"请输入海关编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
"商品名称"
prop=
"titleZh"
v-if=
"!$route.query.product_id"
>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入
商品名称
"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入
中英文名称、商品编码、海关编码
"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品类型"
prop=
"typeId"
v-if=
"!$route.query.product_id"
>
<el-form-item
label=
"商品类型"
prop=
"typeId"
v-if=
"!$route.query.product_id"
>
...
@@ -20,18 +20,18 @@
...
@@ -20,18 +20,18 @@
<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=
"商品属性"
prop=
"attrId"
v-if=
"!$route.query.product_id"
>
<
!--
<
el-form-item
label=
"商品属性"
prop=
"attrId"
v-if=
"!$route.query.product_id"
>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择商品属性"
clearable
>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择商品属性"
clearable
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品特性"
prop=
"attrId"
v-if=
"!$route.query.product_id"
>
<el-form-item
label=
"商品特性"
prop=
"attrId"
v-if=
"!$route.query.product_id"
>
// TODO
// TODO
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
"运输方式"
prop=
"transportType"
>
<el-form-item
label=
"运输方式"
prop=
"transportType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
空运
渠道"
prop=
"shippingChannelId"
>
<el-form-item
label=
"
出货
渠道"
prop=
"shippingChannelId"
>
<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=
"item.nameZh"
:value=
"item.channelId"
/>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"item.nameZh"
:value=
"item.channelId"
/>
</el-select>
</el-select>
...
@@ -68,8 +68,8 @@
...
@@ -68,8 +68,8 @@
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<!--未指定商品-->
<!--未指定商品-->
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"handleBatchEdit"
>
批量设置价格
</el-button>
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"handleBatchEdit"
>
批量设置价格
</el-button>
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"
handleBatchEdit
"
:disabled=
"multiple"
>
批量加入黑名单
</el-button>
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"
batchBlock
"
:disabled=
"multiple"
>
批量加入黑名单
</el-button>
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"
handleBatchEdit
"
:disabled=
"multiple"
>
批量下架
</el-button>
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"
batchOff
"
:disabled=
"multiple"
>
批量下架
</el-button>
<!--指定商品-->
<!--指定商品-->
<el-button
v-if=
"$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"batchSetSingleProductPrice"
>
批量设置单个商品的路线路线
</el-button>
<el-button
v-if=
"$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"batchSetSingleProductPrice"
>
批量设置单个商品的路线路线
</el-button>
...
@@ -86,15 +86,15 @@
...
@@ -86,15 +86,15 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
label=
"序号"
prop=
"id"
width=
"50"
/>
<el-table-column
label=
"序号"
prop=
"id"
width=
"50"
/>
<el-table-column
label=
"商品编码"
align=
"center"
prop=
"productCode"
v-if=
"!$route.query.product_id"
>
<el-table-column
label=
"商品编码"
align=
"center"
prop=
"productCode"
>
<template
slot-scope=
"
{row}">
<template
slot-scope=
"
{row}">
<
div
>
<
el-link
type=
"primary"
@
click.native=
"handleUpdate(scope.row)"
>
{{
row
.
productDO
?
row
.
productDO
.
productCode
:
'
无productDO字段
'
}}
{{
row
.
productDO
?
row
.
productDO
.
productCode
:
'
无productDO字段
'
}}
</
div
>
</
el-link
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"海关编码"
align=
"center"
prop=
"customsCode"
v-if=
"!$route.query.product_id"
>
<el-table-column
label=
"海关编码"
align=
"center"
prop=
"customsCode"
>
<
template
slot-scope=
"{row}"
>
<
template
slot-scope=
"{row}"
>
<div>
<div>
{{
row
.
productDO
?
row
.
productDO
.
customsCode
:
'
无productDO字段
'
}}
{{
row
.
productDO
?
row
.
productDO
.
customsCode
:
'
无productDO字段
'
}}
...
@@ -102,17 +102,17 @@
...
@@ -102,17 +102,17 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"商品类型"
align=
"center"
prop=
"typeId"
v-if=
"!$route.query.product_id"
>
<el-table-column
label=
"商品类型"
align=
"center"
prop=
"typeId"
>
<
template
slot-scope=
"{row}"
>
<
template
slot-scope=
"{row}"
>
<span>
{{
row
.
productDO
?
getTypeName
(
row
.
productDO
.
typeId
)
:
'
无productDO字段
'
}}
</span>
<span>
{{
row
.
productDO
?
getTypeName
(
row
.
productDO
.
typeId
)
:
'
无productDO字段
'
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"productName"
v-if=
"!$route.query.product_id"
>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"productName"
>
<
template
slot-scope=
"{row}"
>
<
template
slot-scope=
"{row}"
>
<
div
>
<
el-link
type=
"primary"
@
click.native=
"handleUpdate(scope.row)"
>
{{
row
.
productDO
?
row
.
productDO
.
titleZh
+
'
/
'
+
row
.
productDO
.
titleEn
:
'
无productDO字段
'
}}
{{
row
.
productDO
?
row
.
productDO
.
titleZh
+
'
/
'
+
row
.
productDO
.
titleEn
:
'
无productDO字段
'
}}
</
div
>
</
el-link
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div>
<div>
<!--
{{
getAdvanceStatuTitle
(
scope
.
row
.
advanceStatus
)
}}
-->
<!--
{{
getAdvanceStatuTitle
(
scope
.
row
.
advanceStatus
)
}}
-->
<dict-tag
:type=
"DICT_TYPE.
ADVANCE_STATUS"
:value=
"scope.row.advanceStatus
"
></dict-tag>
<dict-tag
:type=
"DICT_TYPE.
ECW_PAY_ADVANCE"
:value=
"scope.row.needPay
"
></dict-tag>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -174,11 +174,11 @@
...
@@ -174,11 +174,11 @@
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:product-price:update']"
>
编辑
</el-button>
v-hasPermi=
"['ecw:product-price:update']"
>
编辑
</el-button>
<el-button
v-if=
"!$route.query.product_id"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'blacklist')"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'blacklist')"
>
{{
scope
.
row
.
blacklist
==
0
?
'
加入黑名单
'
:
'
移除黑名单
'
}}
</el-button>
>
{{
scope
.
row
.
blacklist
==
0
?
'
加入黑名单
'
:
'
移除黑名单
'
}}
</el-button>
<el-button
v-if=
"!$route.query.product_id"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'auditStatus')"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'auditStatus')"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
'
下架
'
:
'
上架
'
}}
</el-button>
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
'
下架
'
:
'
上架
'
}}
</el-button>
<el-button
v-if=
"!$route.query.product_id"
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']"
>
删除
</el-button>
v-hasPermi=
"['ecw:product-price:delete']"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -191,9 +191,9 @@
...
@@ -191,9 +191,9 @@
</template>
</template>
<
script
>
<
script
>
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
,
batchBlock
,
batchOff
}
from
"
@/api/ecw/productPrice
"
;
import
{
openedRouterList
}
from
"
@/api/ecw/warehouse
"
;
import
{
openedRouterList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getCityList
}
from
"
@/api/ecw/region
"
;
import
{
get
Trade
CityList
}
from
"
@/api/ecw/region
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
...
@@ -221,8 +221,9 @@ export default {
...
@@ -221,8 +221,9 @@ export default {
attrList
:[],
attrList
:[],
typeList
:
[],
typeList
:
[],
product
:
null
,
product
:
null
,
startCityList
:
[],
//始发地城市
cityList
:
[],
destCityList
:
[],
//目的地城市
/* startCityList: [], //始发地城市
destCityList: [], //目的地城市 */
routedList
:
[],
//已开头路线列表
routedList
:
[],
//已开头路线列表
currecyList
:
[],
//货币列表
currecyList
:
[],
//货币列表
unitList
:
[],
//单位列表
unitList
:
[],
//单位列表
...
@@ -369,23 +370,27 @@ export default {
...
@@ -369,23 +370,27 @@ export default {
}
}
},
},
/* getAdvanceStatuTitle() {
startCityList
(){
return value => {
return
this
.
cityList
.
filter
(
item
=>
item
.
type
==
2
||
item
.
type
==
3
)
for(let index in this.advanceStatusDictDatas) {
},
let dictItem = this.advanceStatusDictDatas[index];
destCityList
(){
if(dictItem.value === '' + value) {
return
this
.
cityList
.
filter
(
item
=>
item
.
type
==
1
||
item
.
type
==
3
)
return dictItem.label;
},
}
}
}
} */
},
},
activated
()
{
activated
()
{
console
.
log
(
'
activated
'
)
/* console.log('activated', this.product.id
)
this.$set(this.queryParams, 'typeId', +this.$route.query.product_type || null)
this.$set(this.queryParams, 'typeId', +this.$route.query.product_type || null)
this
.
handleQuery
()
let productId = this.product?.id
console.log(this.$route.query.product_id, productId, this.$route.query.product_id != productId)
if(this.$route.query.product_id != productId){
this.queryParams = {
pageNo: 1,
pageSize: 10
}
}
this.handleQuery() */
},
},
watch
:{
watch
:{
'
$route.query.product_id
'
(){
'
$route.query.product_id
'
(){
...
@@ -393,26 +398,20 @@ export default {
...
@@ -393,26 +398,20 @@ export default {
if
(
!
this
.
$route
.
query
.
product_id
){
if
(
!
this
.
$route
.
query
.
product_id
){
return
this
.
product
=
null
return
this
.
product
=
null
}
}
if
(
!
this
.
product
||
this
.
$route
.
query
.
product_id
==
this
.
product
.
id
){
let
productId
=
this
.
product
?.
id
if
(
this
.
$route
.
query
.
product_id
!=
productId
){
this
.
queryParams
=
{
pageNo
:
1
,
pageSize
:
10
}
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
res
=>
{
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
res
=>
{
this
.
product
=
res
.
data
this
.
product
=
res
.
data
})
})
this
.
handleQuery
()
}
}
}
}
},
},
created
()
{
created
()
{
// this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE);
// console.log(this.transportDatas);
/* let productJson = localStorage.getItem('product');
// console.log(productJson);
this.product = eval('(' + productJson + ')'); */
/* let typeListJson = localStorage.getItem('typeList');
if(typeListJson) {
this.typeList = eval('(' + typeListJson + ')');
} else {
} */
if
(
this
.
$route
.
query
.
product_type
){
if
(
this
.
$route
.
query
.
product_type
){
this
.
$set
(
this
.
queryParams
,
'
typeId
'
,
+
this
.
$route
.
query
.
product_type
);
this
.
$set
(
this
.
queryParams
,
'
typeId
'
,
+
this
.
$route
.
query
.
product_type
);
}
}
...
@@ -424,12 +423,11 @@ export default {
...
@@ -424,12 +423,11 @@ export default {
}
else
{
}
else
{
// 不指定产品获取类型等信息
// 不指定产品获取类型等信息
this
.
getTypeList
();
this
.
getTypeList
();
//获取城市列表
this
.
getAllCityList
();
this
.
getAttrList
();
this
.
getAttrList
();
}
}
//获取城市列表
this
.
getAllCityList
();
this
.
getChannelList
()
this
.
getChannelList
()
//获取货币列表
//获取货币列表
...
@@ -464,19 +462,8 @@ export default {
...
@@ -464,19 +462,8 @@ export default {
/**获取所有城市列表 */
/**获取所有城市列表 */
getAllCityList
()
{
getAllCityList
()
{
getCityList
({}).
then
(
response
=>
{
getTradeCityList
({}).
then
(
response
=>
{
let
cityList
=
response
.
data
;
this
.
cityList
=
response
.
data
;
for
(
let
index
in
cityList
)
{
let
city
=
cityList
[
index
];
if
(
city
.
type
==
'
1
'
)
{
//进口,目的地
this
.
destCityList
.
push
(
city
);
}
else
if
(
city
.
type
==
'
2
'
)
{
//出口,始发地
this
.
startCityList
.
push
(
city
);
}
else
if
(
city
.
type
==
'
3
'
)
{
//进出口
this
.
destCityList
.
push
(
city
);
this
.
startCityList
.
push
(
city
);
}
}
})
})
},
},
...
@@ -582,8 +569,9 @@ export default {
...
@@ -582,8 +569,9 @@ export default {
return
this
.
$router
.
push
(
'
../../lineProject/product-price/edit?
'
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
())
return
this
.
$router
.
push
(
'
../../lineProject/product-price/edit?
'
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
())
},
},
// 批量修改单个商品的价格(一条或者多条,后者全部路线)
batchSetSingleProductPrice
(){
batchSetSingleProductPrice
(){
this
.
$router
.
push
(
'
../../lineProject/product-price/edit?action=
u
pdate&product_id=
'
+
this
.
$route
.
query
.
product_id
+
'
&ids=
'
+
this
.
ids
)
this
.
$router
.
push
(
'
../../lineProject/product-price/edit?action=
batchU
pdate&product_id=
'
+
this
.
$route
.
query
.
product_id
+
'
&ids=
'
+
this
.
ids
)
},
},
// 批量设置路线
// 批量设置路线
handleBatchEdit
()
{
handleBatchEdit
()
{
...
@@ -591,7 +579,7 @@ export default {
...
@@ -591,7 +579,7 @@ export default {
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
return
this
.
$router
.
push
(
'
../../lineProject/product-price/edit?
ids
=
'
+
row
.
id
)
return
this
.
$router
.
push
(
'
../../lineProject/product-price/edit?
action=update&id
=
'
+
row
.
id
)
},
},
updateStatus
(
row
,
type
)
{
updateStatus
(
row
,
type
)
{
...
@@ -696,7 +684,20 @@ export default {
...
@@ -696,7 +684,20 @@ export default {
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
}
},
batchBlock
(){
batchBlock
({
ids
:
this
.
ids
.
join
(
'
,
'
)}).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
msg
||
'
操作成功
'
)
this
.
handleQuery
()
})
},
batchOff
(){
batchOff
({
ids
:
this
.
ids
.
join
(
'
,
'
)}).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
msg
||
'
操作成功
'
)
this
.
handleQuery
()
})
},
}
}
};
};
</
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