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
aac816eb
Commit
aac816eb
authored
Oct 27, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复新建订单,商品属性批量编辑等bug
parent
6f257f86
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
26 deletions
+66
-26
index.vue
src/components/AreaSelector/index.vue
+2
-10
index.vue
src/components/ProductsSelector/index.vue
+26
-4
edit.vue
src/views/ecw/order/edit.vue
+15
-4
release.vue
src/views/ecw/order/release.vue
+8
-2
edit.vue
src/views/ecw/productAttr/edit.vue
+15
-6
No files found.
src/components/AreaSelector/index.vue
View file @
aac816eb
...
@@ -48,19 +48,11 @@ export default {
...
@@ -48,19 +48,11 @@ export default {
},
},
'
formData.country
'
(
country
){
'
formData.country
'
(
country
){
this
.
$emit
(
'
countryChange
'
,
country
)
this
.
$emit
(
'
countryChange
'
,
country
)
/* this.treeList.forEach(item => {
this
.
$set
(
this
.
formData
,
'
province
'
,
undefined
)
if(item.id == country){
this.provinceList = item.children || []
}
}) */
},
},
'
formData.province
'
(
province
){
'
formData.province
'
(
province
){
this
.
$emit
(
'
provinceChange
'
,
province
)
this
.
$emit
(
'
provinceChange
'
,
province
)
/* this.provinceList.forEach(item => {
this
.
$set
(
this
.
formData
,
'
city
'
,
''
)
if(item.id == province){
this.cityList = item.children || []
}
}) */
}
}
},
},
computed
:{
computed
:{
...
...
src/components/ProductsSelector/index.vue
View file @
aac816eb
...
@@ -11,6 +11,11 @@
...
@@ -11,6 +11,11 @@
</el-select>
</el-select>
<el-input
v-model=
"queryParams.titleZh"
:placeholder=
"$t('产品关键字')"
style=
"width:120px"
clearable
/>
<el-input
v-model=
"queryParams.titleZh"
:placeholder=
"$t('产品关键字')"
style=
"width:120px"
clearable
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"reLoad"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<div
v-if=
"showAll"
>
<el-checkbox
:label=
"$t('全选(最多500)')"
@
change=
"toggleAll"
></el-checkbox>
<el-checkbox
:label=
"$t('全选库内商品(共
{cnt}个)', {cnt: total})" v-model="isAllProduct">
</el-checkbox>
</div>
</div>
</div>
<div
class=
"list"
>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
...
@@ -23,7 +28,7 @@
...
@@ -23,7 +28,7 @@
<div
class=
"flex-1 ml-10"
>
<div
class=
"flex-1 ml-10"
>
<el-card
style=
"height:100%"
>
<el-card
style=
"height:100%"
>
<div
slot=
"header"
class=
"header"
>
<div
slot=
"header"
class=
"header"
>
{{
$t
(
'
已选
产品
'
)
}}
{{
$t
(
'
已选
{cnt
}
个产品
'
,
{
cnt
:
isAllProduct
?
total
:
choosedList
.
length
}
)
}}
<
/div
>
<
/div
>
<
div
class
=
"
list
"
>
<
div
class
=
"
list
"
>
<
div
class
=
"
item
"
v
-
for
=
"
(choosed) in choosedList
"
:
key
=
"
choosed.id
"
:
data
-
data
=
"
JSON.stringify(choosed)
"
>
<
div
class
=
"
item
"
v
-
for
=
"
(choosed) in choosedList
"
:
key
=
"
choosed.id
"
:
data
-
data
=
"
JSON.stringify(choosed)
"
>
...
@@ -47,13 +52,15 @@ export default {
...
@@ -47,13 +52,15 @@ export default {
default
:
()
=>
{
default
:
()
=>
{
return
[]
return
[]
}
}
}
}
,
showAll
:
Boolean
}
,
}
,
data
()
{
data
()
{
return
{
return
{
list
:
[],
list
:
[],
page
:
1
,
page
:
1
,
pages
:
1
,
pages
:
1
,
total
:
0
,
// 商品总数
queryParams
:
{
queryParams
:
{
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
500
,
pageSize
:
500
,
...
@@ -63,7 +70,8 @@ export default {
...
@@ -63,7 +70,8 @@ export default {
}
,
}
,
choosedList
:
[],
choosedList
:
[],
typeList
:
[],
typeList
:
[],
attrList
:
[]
attrList
:
[],
isAllProduct
:
false
}
}
}
,
}
,
computed
:
{
computed
:
{
...
@@ -83,6 +91,9 @@ export default {
...
@@ -83,6 +91,9 @@ export default {
watch
:
{
watch
:
{
ids
(
val
)
{
ids
(
val
)
{
this
.
$emit
(
'
input
'
,
val
)
this
.
$emit
(
'
input
'
,
val
)
}
,
isAllProduct
(
isAllProduct
){
this
.
$emit
(
'
setall
'
,
isAllProduct
)
}
}
}
,
}
,
created
()
{
created
()
{
...
@@ -92,6 +103,14 @@ export default {
...
@@ -92,6 +103,14 @@ export default {
this
.
ids
=
this
.
defaultIds
//数据回显
this
.
ids
=
this
.
defaultIds
//数据回显
}
,
}
,
methods
:
{
methods
:
{
/* setAllProduct(status){
this.isAllProduct = true
}
, */
toggleAll
(
status
){
this
.
list
.
forEach
(
item
=>
{
this
.
toggleCheck
(
item
,
status
)
}
)
}
,
reLoad
()
{
reLoad
()
{
this
.
queryParams
.
page
=
1
this
.
queryParams
.
page
=
1
this
.
list
=
[]
this
.
list
=
[]
...
@@ -109,6 +128,7 @@ export default {
...
@@ -109,6 +128,7 @@ export default {
this
.
list
=
res
.
data
.
list
//.concat(res.data.list || [])
this
.
list
=
res
.
data
.
list
//.concat(res.data.list || [])
this
.
page
=
res
.
data
.
page
this
.
page
=
res
.
data
.
page
this
.
pages
=
res
.
data
.
pages
this
.
pages
=
res
.
data
.
pages
this
.
total
=
res
.
data
.
total
this
.
choosedList
=
[]
//搜搜重置,数据回显
this
.
choosedList
=
[]
//搜搜重置,数据回显
if
(
this
.
defaultIds
.
length
>
0
)
{
if
(
this
.
defaultIds
.
length
>
0
)
{
this
.
defaultIds
.
map
(
item
=>
{
this
.
defaultIds
.
map
(
item
=>
{
...
@@ -129,7 +149,9 @@ export default {
...
@@ -129,7 +149,9 @@ export default {
}
}
}
,
}
,
choose
(
item
)
{
choose
(
item
)
{
this
.
choosedList
.
push
(
item
)
if
(
!
this
.
choosedList
.
find
(
it
=>
it
.
id
==
item
.
id
)){
this
.
choosedList
.
push
(
item
)
}
}
,
}
,
remove
(
item
)
{
remove
(
item
)
{
this
.
choosedList
.
forEach
((
choosed
,
index
)
=>
{
this
.
choosedList
.
forEach
((
choosed
,
index
)
=>
{
...
...
src/views/ecw/order/edit.vue
View file @
aac816eb
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('数量') + '(个)'"
width=
"120px"
>
<el-table-column
:label=
"$t('数量') + '(个)'"
width=
"120px"
>
<
template
slot-scope=
"{row}"
>
<
template
slot-scope=
"{row}"
>
<el-input
v-model=
"row.quantity"
type=
"number"
:disabled=
"!canAddProduct || !productEditable"
/>
<el-input
v-model=
"row.quantity"
type=
"number"
@
keyup.native=
"checkQuantity(row)"
:disabled=
"!canAddProduct || !productEditable"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('总体积') + '(m³)'"
width=
"100px"
>
<el-table-column
:label=
"$t('总体积') + '(m³)'"
width=
"100px"
>
...
@@ -588,6 +588,7 @@ export default {
...
@@ -588,6 +588,7 @@ export default {
contactChooseType
:
null
,
// 联系人选择对象consignor(发货人) 或者 consignee(收货人)
contactChooseType
:
null
,
// 联系人选择对象consignor(发货人) 或者 consignee(收货人)
quickCreateType
:
null
,
// 快速新建客户类型,1发货人,2收货人
quickCreateType
:
null
,
// 快速新建客户类型,1发货人,2收货人
showWorkFlow
:
false
,
// 是否显示工作流表单
showWorkFlow
:
false
,
// 是否显示工作流表单
calculating
:
false
,
// 是否正在计算费用,防止频繁重新请求
};
};
},
},
computed
:{
computed
:{
...
@@ -740,9 +741,15 @@ export default {
...
@@ -740,9 +741,15 @@ export default {
this
.
$set
(
this
.
form
,
'
lineId
'
,
undefined
)
this
.
$set
(
this
.
form
,
'
lineId
'
,
undefined
)
this
.
getOpenedRouterList
()
this
.
getOpenedRouterList
()
},
},
'
form.channelId
'
(){
this
.
calculationPrice
()
},
'
form.lineId
'
(
lineId
){
'
form.lineId
'
(
lineId
){
let
router
=
this
.
routerList
.
find
(
item
=>
item
.
id
==
lineId
)
let
router
=
this
.
routerList
.
find
(
item
=>
item
.
id
==
lineId
)
if
(
!
router
)
return
if
(
!
router
){
console
.
log
(
'
未选择路线
'
,
router
,
lineId
,
JSON
.
stringify
(
this
.
routerList
))
return
}
this
.
$set
(
this
.
form
,
'
departureId
'
,
router
.
startCityId
)
this
.
$set
(
this
.
form
,
'
departureId
'
,
router
.
startCityId
)
this
.
$set
(
this
.
form
,
'
objectiveId
'
,
router
.
destCityId
)
this
.
$set
(
this
.
form
,
'
objectiveId
'
,
router
.
destCityId
)
...
@@ -911,10 +918,12 @@ export default {
...
@@ -911,10 +918,12 @@ export default {
},
},
setLink
(
row
){
setLink
(
row
){
this
.
$prompt
(
this
.
$t
(
'
请输入商品链接
'
),
{
inputValue
:
row
.
link
}).
then
(({
value
})
=>
{
this
.
$prompt
(
this
.
$t
(
'
请输入商品链接
'
),
{
inputValue
:
row
.
link
}).
then
(({
value
})
=>
{
console
.
log
(
'
value
'
,
value
)
this
.
$set
(
row
,
'
link
'
,
value
)
this
.
$set
(
row
,
'
link
'
,
value
)
})
})
},
},
checkQuantity
(
row
){
row
.
quantity
=
row
.
quantity
.
replace
(
/
[^\d]
/g
,
''
)
},
/* onFileChoosed(e){
/* onFileChoosed(e){
window.choosed = e
window.choosed = e
console.log('onFileChoosed', e)
console.log('onFileChoosed', e)
...
@@ -1070,12 +1079,14 @@ export default {
...
@@ -1070,12 +1079,14 @@ export default {
calcable
=
false
calcable
=
false
}
}
})
})
console
.
log
(
'
calculationPrice
'
,
calcable
)
if
(
this
.
calculating
||
!
calcable
)
return
false
if
(
this
.
calculating
||
!
calcable
)
return
false
this
.
calculating
=
true
this
.
calculating
=
true
console
.
log
(
'
calculating --->
'
)
calculationPrice
({
calculationPrice
({
lineId
:
this
.
form
.
lineId
,
lineId
:
this
.
form
.
lineId
,
transportId
:
this
.
form
.
transportId
,
transportId
:
this
.
form
.
transportId
,
channelId
:
this
.
form
.
channelI
d
,
channelId
:
[
3
,
4
].
indexOf
(
this
.
form
.
transportId
)
>
-
1
?
this
.
form
.
channelId
:
undefine
d
,
prodConditionParamList
:
this
.
getProductListWithDefaultValue
()
prodConditionParamList
:
this
.
getProductListWithDefaultValue
()
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
$set
(
this
,
'
fee
'
,
res
.
data
.
costDto
)
this
.
$set
(
this
,
'
fee
'
,
res
.
data
.
costDto
)
...
...
src/views/ecw/order/release.vue
View file @
aac816eb
...
@@ -33,8 +33,7 @@
...
@@ -33,8 +33,7 @@
+
{{
order
.
consigneeVO
.
countryCode
}}
{{
order
.
consigneeVO
.
phone
}}
+
{{
order
.
consigneeVO
.
countryCode
}}
{{
order
.
consigneeVO
.
phone
}}
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('收货地址')"
>
<el-form-item
:label=
"$t('收货地址')"
>
<!--缺少国城名字-->
<el-input
v-model=
"form.deliverAddress"
placeholder=
""
></el-input>
{{
order
.
consigneeVO
.
address
}}
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('快递单号')"
>
<el-form-item
:label=
"$t('快递单号')"
>
<el-input
v-model=
"form.trackingNumber"
placeholder=
""
></el-input>
<el-input
v-model=
"form.trackingNumber"
placeholder=
""
></el-input>
...
@@ -73,6 +72,13 @@ export default {
...
@@ -73,6 +72,13 @@ export default {
form
:
{}
form
:
{}
}
}
},
},
watch
:{
'
form.pickType
'
(
type
){
if
(
type
==
1
&&
this
.
order
.
consigneeVO
.
address
){
this
.
$set
(
this
.
form
,
'
deliverAddress
'
,
this
.
order
.
consigneeVO
.
address
)
}
}
},
created
(){
created
(){
this
.
loadOrderData
()
this
.
loadOrderData
()
},
},
...
...
src/views/ecw/productAttr/edit.vue
View file @
aac816eb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
:label=
"$t('适用商品')"
prop=
"idList"
>
<el-form-item
:label=
"$t('适用商品')"
prop=
"idList"
>
<products-selector
:defaultIds=
"form.idList"
v-model=
"form.idList"
/>
<products-selector
:defaultIds=
"form.idList"
v-model=
"form.idList"
show-all
@
setall=
"toggleAll"
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('货柜位置')"
prop=
"containerLocation"
>
<el-form-item
:label=
"$t('货柜位置')"
prop=
"containerLocation"
>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</el-checkbox-group>
</el-checkbox-group>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('商品材质')"
prop=
"materialType"
>
<el-form-item
:label=
"$t('商品材质')"
prop=
"materialType"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_PRODUCT_MATERIAL"
v-model=
"form.materialType"
multiple
/>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_PRODUCT_MATERIAL"
v-model=
"form.materialType
Arr
"
multiple
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -68,7 +68,7 @@ export default {
...
@@ -68,7 +68,7 @@ export default {
"
containerLocation
"
:
undefined
,
"
containerLocation
"
:
undefined
,
"
dayLimit
"
:
undefined
,
"
dayLimit
"
:
undefined
,
"
idList
"
:
[],
"
idList
"
:
[],
"
isAllProduct
"
:
undefined
,
"
isAllProduct
"
:
0
,
"
needBook
"
:
false
,
"
needBook
"
:
false
,
"
packaging
"
:
undefined
,
"
packaging
"
:
undefined
,
"
requirements
"
:
undefined
,
"
requirements
"
:
undefined
,
...
@@ -84,12 +84,15 @@ export default {
...
@@ -84,12 +84,15 @@ export default {
},
},
watch
:
{
watch
:
{
'
form.idList
'
(
val
)
{
/*
'form.idList'(val) {
if (val.length > 0) {
if (val.length > 0) {
this.form.isAllProduct = 0
this.form.isAllProduct = 0
} else {
} else {
this.form.isAllProduct = 1
this.form.isAllProduct = 1
}
}
}, */
'
form.materialTypeArr
'
(
typeArr
){
this
.
$set
(
this
.
form
,
'
form.materialTyp
'
,
typeArr
.
join
(
'
,
'
))
},
},
attrIds
(
val
){
attrIds
(
val
){
this
.
form
.
attrId
=
val
.
join
(
'
,
'
)
this
.
form
.
attrId
=
val
.
join
(
'
,
'
)
...
@@ -103,6 +106,9 @@ export default {
...
@@ -103,6 +106,9 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
toggleAll
(
e
){
this
.
$set
(
this
.
form
,
'
isAllProduct
'
,
e
?
1
:
0
)
},
/** 表单重置 */
/** 表单重置 */
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
...
@@ -110,7 +116,7 @@ export default {
...
@@ -110,7 +116,7 @@ export default {
"
containerLocation
"
:
undefined
,
"
containerLocation
"
:
undefined
,
"
dayLimit
"
:
undefined
,
"
dayLimit
"
:
undefined
,
"
idList
"
:
[],
"
idList
"
:
[],
"
isAllProduct
"
:
undefined
,
"
isAllProduct
"
:
0
,
"
needBook
"
:
undefined
,
"
needBook
"
:
undefined
,
"
packaging
"
:
undefined
,
"
packaging
"
:
undefined
,
"
requirements
"
:
undefined
,
"
requirements
"
:
undefined
,
...
@@ -127,9 +133,12 @@ export default {
...
@@ -127,9 +133,12 @@ export default {
return
;
return
;
}
}
let
data
=
Object
.
assign
({},
this
.
form
)
let
data
=
Object
.
assign
({},
this
.
form
)
if
(
!
data
.
isAllProduct
&&
!
data
.
idList
.
length
){
return
this
.
$message
(
this
.
$t
(
'
请选择商品或勾选全部
'
))
}
batchUpdateProduct
(
data
).
then
((
response
)
=>
{
batchUpdateProduct
(
data
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
));
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
));
this
.
$
router
.
back
();
this
.
$
store
.
dispatch
(
'
tagsView/delCurrentView
'
)
});
});
});
});
},
},
...
...
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