Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
上
上药订单生命周期升级
Project overview
Project overview
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
sph
上药订单生命周期升级
Commits
991f13cd
Commit
991f13cd
authored
Mar 25, 2021
by
xiejb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
高级搜索 供应商实现多选功能
parent
cca1925c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
28 deletions
+78
-28
src/components/SearchGoods.vue
src/components/SearchGoods.vue
+2
-2
src/components/SearchInClient.vue
src/components/SearchInClient.vue
+2
-2
src/components/SearchInConsignor.vue
src/components/SearchInConsignor.vue
+1
-1
src/components/SearchInSupplier.vue
src/components/SearchInSupplier.vue
+25
-11
src/views/myOrder/components/HighSearch.vue
src/views/myOrder/components/HighSearch.vue
+37
-10
src/views/myOrder/index.vue
src/views/myOrder/index.vue
+1
-1
src/views/myOrder/myOrderList.vue
src/views/myOrder/myOrderList.vue
+10
-1
No files found.
src/components/SearchGoods.vue
View file @
991f13cd
...
...
@@ -90,8 +90,8 @@ export default {
},
// 供应商
supplier
:
{
type
:
Object
,
default
:
()
=>
{}
type
:
Array
,
default
:
()
=>
[]
},
// 货主
consignor
:
{
...
...
src/components/SearchInClient.vue
View file @
991f13cd
...
...
@@ -86,8 +86,8 @@ export default {
},
// 供应商
supplier
:
{
type
:
Object
,
default
:
()
=>
{}
type
:
Array
,
default
:
()
=>
[]
},
customer
:
{
type
:
Object
,
...
...
src/components/SearchInConsignor.vue
View file @
991f13cd
...
...
@@ -218,7 +218,7 @@ export default {
getConsignorSetList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
200
)
{
if
(
_this
.
currentPage
===
1
)
{
_this
.
searchNum
=
rt
.
data
.
total
_this
.
searchNum
=
rt
.
data
.
total
+
''
this
.
postDataList
=
[]
}
if
(
this
.
isRefreshing
)
{
...
...
src/components/SearchInSupplier.vue
View file @
991f13cd
...
...
@@ -28,16 +28,16 @@
:error.sync=
"error"
:offset=
"10"
@
load=
"onLoad"
>
<van-
radio-group
v-model=
"checked
"
>
<van-
checkbox-group
v-model=
"checkedList
"
>
<van-cell-group>
<van-cell
:title=
"titleInitial(item)"
clickable
@
click=
"itemClick(item,index)"
v-for=
"(item,index) in postDataList"
:key=
"index"
>
<template
#right-icon
>
<van-
radio
:name=
"item.org"
/>
<van-
checkbox
:name=
"item.org"
/>
</
template
>
</van-cell>
</van-cell-group>
</van-
radio
-group>
</van-
checkbox
-group>
</van-list>
</van-pull-refresh>
</div>
...
...
@@ -71,7 +71,8 @@ export default {
pageSize
:
10
,
postDataList
:
[],
checked
:
''
,
choosedPost
:
{}
checkedList
:
[],
choosedPost
:
[]
}
},
computed
:
{
...
...
@@ -85,8 +86,8 @@ export default {
default
:
false
},
customer
:
{
type
:
Object
,
default
:
()
=>
{}
type
:
Array
,
default
:
()
=>
[]
},
// 货主
consignor
:
{
...
...
@@ -99,8 +100,13 @@ export default {
this
.
postShow
=
val
if
(
val
)
{
this
.
postDataList
=
[]
this
.
checkedList
=
[]
this
.
choosedPost
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
customer
))
this
.
checked
=
!
this
.
customer
.
org
?
''
:
this
.
customer
.
org
// this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
// console.log(this.checked)
this
.
customer
.
forEach
((
res
)
=>
{
this
.
checkedList
.
push
(
res
.
org
)
})
this
.
currentPage
=
1
this
.
onLoad
()
}
...
...
@@ -135,10 +141,11 @@ export default {
},
onCancelClick
()
{
this
.
postShow
=
false
this
.
checkedList
=
[]
this
.
$emit
(
'
cancleclick
'
)
},
onConfirmClick
()
{
if
(
!
this
.
choosedPost
.
org
)
{
if
(
!
this
.
choosedPost
.
length
===
0
)
{
Dialog
.
alert
({
title
:
'
温馨提示
'
,
message
:
'
请选择选项!
'
...
...
@@ -153,8 +160,15 @@ export default {
})
},
itemClick
(
item
,
index
)
{
this
.
checked
=
item
.
org
this
.
choosedPost
=
item
// this.checked = item.org
// this.choosedPost = item
if
(
this
.
checkedList
.
indexOf
(
item
.
org
)
>
-
1
)
{
this
.
choosedPost
.
splice
(
this
.
checkedList
.
indexOf
(
item
.
org
),
1
)
this
.
checkedList
.
splice
(
this
.
checkedList
.
indexOf
(
item
.
org
),
1
)
}
else
{
this
.
checkedList
.
push
(
item
.
org
)
this
.
choosedPost
.
push
(
item
)
}
},
onRefresh
()
{
// 刷新接口
...
...
@@ -206,7 +220,7 @@ export default {
getEmployeeOrgQueryList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
200
)
{
if
(
_this
.
currentPage
===
1
)
{
_this
.
searchNum
=
rt
.
data
.
length
_this
.
searchNum
=
rt
.
data
.
length
+
''
this
.
postDataList
=
[]
}
if
(
this
.
isRefreshing
)
{
...
...
src/views/myOrder/components/HighSearch.vue
View file @
991f13cd
...
...
@@ -175,8 +175,13 @@ export default {
computed
:
{
// 供应商
supplier
()
{
// if (this.moreSearchInfo.supplier) {
// return !this.moreSearchInfo.supplier ? '' : this.moreSearchInfo.supplier.partyName
// } else {
// return ''
// }
if
(
this
.
moreSearchInfo
.
supplier
)
{
return
!
this
.
moreSearchInfo
.
supplier
?
''
:
this
.
moreSearchInfo
.
supplier
.
partyName
return
this
.
supplierStitching
()
}
else
{
return
''
}
...
...
@@ -220,7 +225,7 @@ export default {
},
// 货主与供应商是否选择
isSelectConsignorSupplier
()
{
if
(
this
.
moreSearchInfo
.
consignor
.
length
===
0
||
this
.
moreSearchInfo
.
supplier
.
org
===
{}
||
this
.
moreSearchInfo
.
supplier
.
org
===
null
||
this
.
moreSearchInfo
.
supplier
.
org
===
undefined
)
{
if
(
this
.
moreSearchInfo
.
consignor
.
length
===
0
||
this
.
moreSearchInfo
.
supplier
.
length
===
0
)
{
return
false
}
return
true
...
...
@@ -239,7 +244,7 @@ export default {
type
:
Object
,
default
:
()
=>
{
return
{
supplier
:
{}
,
// 供应商
supplier
:
[]
,
// 供应商
consignor
:
[],
// 货主
goods
:
''
,
// 商品
client
:
''
,
// 客户
...
...
@@ -270,17 +275,21 @@ export default {
this
.
$toast
(
'
请先选择货主!
'
)
return
}
if
(
this
.
moreSearchInfo
.
supplier
.
org
===
''
||
this
.
moreSearchInfo
.
supplier
.
org
===
null
||
this
.
moreSearchInfo
.
supplier
.
org
===
undefined
)
{
if
(
this
.
moreSearchInfo
.
supplier
.
length
===
0
)
{
this
.
$toast
(
'
请先供应商!
'
)
return
}
// if (this.moreSearchInfo.supplier.org === '' || this.moreSearchInfo.supplier.org === null || this.moreSearchInfo.supplier.org === undefined) {
// this.$toast('请先供应商!')
// return
// }
// console.log(this.moreSearchInfo)
this
.
moreSearchShow
=
false
this
.
$emit
(
'
onsearch
'
,
this
.
moreSearchInfo
)
},
onCleanClick
()
{
this
.
moreSearchInfo
=
{
supplier
:
{}
,
// 供应商
supplier
:
[]
,
// 供应商
consignor
:
[],
// 货主
goods
:
''
,
// 商品
client
:
''
,
// 客户
...
...
@@ -303,7 +312,11 @@ export default {
return
}
if
(
type
!==
'
supplier
'
)
{
if
(
this
.
moreSearchInfo
.
supplier
.
org
===
''
||
this
.
moreSearchInfo
.
supplier
.
org
===
null
||
this
.
moreSearchInfo
.
supplier
.
org
===
undefined
)
{
// if (this.moreSearchInfo.supplier.org === '' || this.moreSearchInfo.supplier.org === null || this.moreSearchInfo.supplier.org === undefined) {
// this.$toast('请先供应商!')
// return
// }
if
(
this
.
moreSearchInfo
.
supplier
.
length
===
0
)
{
this
.
$toast
(
'
请先供应商!
'
)
return
}
...
...
@@ -338,7 +351,7 @@ export default {
this
.
moreSearchInfo
.
goods
=
data
.
value
break
;
case
data
.
page
===
'
consignor
'
:
this
.
moreSearchInfo
.
supplier
=
{}
this
.
moreSearchInfo
.
supplier
=
[]
this
.
moreSearchInfo
.
goods
=
''
this
.
moreSearchInfo
.
client
=
''
this
.
moreSearchInfo
.
consignor
=
data
.
value
...
...
@@ -349,7 +362,7 @@ export default {
}
this
.
showPost
(
data
.
page
);
},
// 字段拼接
//
货主
字段拼接
fieldStitching
()
{
let
str
=
''
if
(
this
.
moreSearchInfo
.
consignor
.
length
===
1
)
{
...
...
@@ -359,10 +372,24 @@ export default {
}
return
str
},
//
商品
信息拼接
//
货主
信息拼接
consignorInfoStitching
(
model
)
{
return
model
.
companyname
+
'
/(
'
+
model
.
erp_userid
[
0
]
+
'
)
'
// return model.comGoodsId + '/(' + model.goodsOpcode + ')' + model.goodsName + '/' + model.goodsDesc + '/' + model.partyName + '/' + model.packageNum + '/' + model.unitName
},
// 供应商字段拼接
supplierStitching
()
{
let
str
=
''
console
.
log
(
this
.
moreSearchInfo
)
if
(
this
.
moreSearchInfo
.
supplier
.
length
===
1
)
{
str
=
this
.
supplierInfoStitching
(
this
.
moreSearchInfo
.
supplier
[
0
])
}
else
if
(
this
.
moreSearchInfo
.
supplier
.
length
>
1
)
{
str
=
this
.
supplierInfoStitching
(
this
.
moreSearchInfo
.
supplier
[
0
])
+
'
......
'
}
return
str
},
// 货主信息拼接
supplierInfoStitching
(
model
)
{
return
model
.
partyName
},
onQuickDateChoose
(
index
,
tag
)
{
console
.
log
(
index
,
tag
)
...
...
src/views/myOrder/index.vue
View file @
991f13cd
...
...
@@ -53,7 +53,7 @@ export default {
moreSearchShow
:
false
,
activeTab
:
'
all
'
,
moreSearchInfo
:
{
supplier
:
{}
,
// 供应商
supplier
:
[]
,
// 供应商
consignor
:
[],
// 货主
goods
:
''
,
// 商品
client
:
''
,
// 客户
...
...
src/views/myOrder/myOrderList.vue
View file @
991f13cd
...
...
@@ -276,19 +276,28 @@ export default {
'
sourceDb
'
:
!
item
.
ownerid
?
''
:
item
.
ownerid
,
// 数据来源
'
sourceOrderNo
'
:
''
,
// 来源订单号(网上订单号)
'
sourceSystem
'
:
''
,
// 订单来源 来源订单号和订单来源必须同时不为空
'
supplierId
'
:
this
.
get
Array
(
_this
.
moreSearchInfo
.
supplier
.
org
)
// 供应商(部门)编码
'
supplierId
'
:
this
.
get
ValueArray
(
_this
.
moreSearchInfo
.
supplier
)
// 供应商(部门)编码
}
dataList
.
push
(
model
)
})
console
.
log
(
dataList
)
return
dataList
},
// 是否返回空数组
getArray
(
value
)
{
if
(
this
.
isJudgeStrNull
(
value
))
{
return
[
value
]
}
return
[]
},
// 返回数据数组
getValueArray
(
array
)
{
const
vaueArray
=
[]
array
.
forEach
(
item
=>
{
vaueArray
.
push
(
item
.
org
)
})
return
vaueArray
},
/// 判断数值是否为空
isJudgeStrNull
(
val
)
{
if
(
val
!==
null
&&
val
!==
undefined
&&
val
!==
''
)
{
...
...
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