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
eeae9183
Commit
eeae9183
authored
Mar 03, 2021
by
xiejb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 我的订单 高级搜索
parent
a1c6d702
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
956 additions
and
8 deletions
+956
-8
src/api/common.js
src/api/common.js
+11
-2
src/components/CgSearchGoods.vue
src/components/CgSearchGoods.vue
+1
-1
src/components/SearchInClient.vue
src/components/SearchInClient.vue
+324
-0
src/components/SearchInConsignor.vue
src/components/SearchInConsignor.vue
+324
-0
src/components/SearchInSupplier.vue
src/components/SearchInSupplier.vue
+1
-1
src/views/myOrder/components/HighSearch.vue
src/views/myOrder/components/HighSearch.vue
+270
-0
src/views/myOrder/index.vue
src/views/myOrder/index.vue
+25
-4
No files found.
src/api/common.js
View file @
eeae9183
...
...
@@ -9,9 +9,18 @@ export function getCustomerList(params) {
})
}
// 获取商品列表
export
function
getGoodsList
(
params
)
{
export
function
get
Cg
GoodsList
(
params
)
{
return
fetch
({
url
:
'
/product/queryGoods_PS
'
,
url
:
'
/purchaseCommon/queryAllGoods
'
,
method
:
'
post
'
,
data
:
params
,
loading
:
true
})
}
// 获取供应商列表
export
function
getCgSupplyList
(
params
)
{
return
fetch
({
url
:
'
/purchaseCommon/querySupply
'
,
method
:
'
post
'
,
data
:
params
,
loading
:
true
...
...
src/components/CgSearchGoods.vue
View file @
eeae9183
...
...
@@ -50,7 +50,7 @@
</template>
<
script
>
import
{
getCgGoodsList
}
from
'
@/
cgA
pi/common
'
import
{
getCgGoodsList
}
from
'
@/
a
pi/common
'
import
{
getResListNum
}
from
'
../utils/common
'
import
SearchResult
from
'
./SearchResult
'
import
{
Dialog
}
from
'
vant
'
...
...
src/components/SearchInClient.vue
0 → 100644
View file @
eeae9183
<
template
>
<div>
<van-popup
v-model=
"postShow"
class=
"more-search bg-gray"
position=
"right"
get-container=
"body"
>
<div
class=
"title-layout font-bold font-16"
>
供应商
</div>
<van-search
v-model=
"keywords"
placeholder=
"请输入编码或名称"
show-action
@
search=
"onSearch"
>
<i
slot=
"left-icon"
class=
"fa fa-search"
></i>
<div
slot=
"action"
class=
"font14"
@
click=
"onSearch"
>
搜索
</div>
</van-search>
<search-result
:result-num=
"searchNum"
></search-result>
<div
class=
"w100 listHeight"
ref=
"scrollRef"
>
<van-pull-refresh
v-model=
"isRefreshing"
@
refresh=
"onRefresh"
>
<van-list
v-model=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
:error.sync=
"error"
:offset=
"10"
@
load=
"onLoad"
>
<van-radio-group
v-model=
"checked"
>
<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.comPartyId"
/>
</
template
>
</van-cell>
</van-cell-group>
</van-radio-group>
</van-list>
</van-pull-refresh>
</div>
<div
class=
"action-bottom"
>
<van-button
type=
"default"
@
click=
"onCancelClick"
>
取消
</van-button>
<van-button
type=
"info"
class=
"submit"
@
click=
"onConfirmClick"
>
确定
</van-button>
</div>
</van-popup>
</div>
</template>
<
script
>
import
{
getCgSupplyList
}
from
'
@/api/common
'
import
{
getResListNum
}
from
'
../utils/common
'
import
SearchResult
from
'
./SearchResult
'
import
{
Dialog
}
from
'
vant
'
export
default
{
name
:
'
SearchInSupplier
'
,
components
:
{
SearchResult
},
data
()
{
return
{
postShow
:
false
,
keywords
:
''
,
isRefreshing
:
false
,
loading
:
false
,
finished
:
false
,
error
:
false
,
searchNum
:
'
0
'
,
currentPage
:
1
,
pageSize
:
10
,
postDataList
:
[],
checked
:
''
,
choosedPost
:
{}
}
},
computed
:
{
linkInfo
()
{
return
this
.
$store
.
state
.
linkInfo
}
},
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
customer
:
{
type
:
Object
,
default
:
()
=>
{}
},
chinfo
:
{
type
:
Object
,
default
:
()
=>
{
return
{
goodsId
:
''
,
supplier
:
''
}
}
}
},
watch
:
{
value
(
val
)
{
this
.
postShow
=
val
if
(
val
)
{
this
.
postDataList
=
[]
this
.
choosedPost
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
customer
))
this
.
checked
=
!
this
.
customer
.
comPartyId
?
''
:
this
.
customer
.
comPartyId
console
.
log
(
this
.
checked
)
this
.
currentPage
=
1
this
.
onLoad
()
}
},
postShow
(
val
)
{
if
(
!
val
)
{
this
.
$refs
.
scrollRef
.
scrollTop
=
0
}
this
.
$emit
(
'
input
'
,
val
)
}
},
methods
:
{
/// 标题拼接
<!--
药厂码
/
(
SAP
码)名称
-->
titleInitial
(
model
)
{
let
titleStr
=
model
.
comPartyId
+
'
/(
'
+
model
.
partyOpcode
+
'
)/
'
+
model
.
partyName
return
titleStr
},
onSearch
()
{
// if (!this.isJudgeStrNull(this.keywords)) {
// Dialog.alert({
// title: '温馨提示',
// message: '搜索内容为空!'
// }).then(() => {
// })
// return
// }
this
.
keywords
=
this
.
keywords
.
replace
(
/
\s
+/g
,
""
)
this
.
$refs
.
scrollRef
.
scrollTop
=
0
this
.
currentPage
=
1
this
.
finished
=
false
this
.
onLoad
()
},
onCancelClick
()
{
this
.
postShow
=
false
this
.
$emit
(
'
cancleclick
'
)
},
onConfirmClick
()
{
if
(
!
this
.
choosedPost
.
comPartyId
)
{
Dialog
.
alert
({
title
:
'
温馨提示
'
,
message
:
'
请选择选项!
'
}).
then
(()
=>
{
})
return
}
this
.
postShow
=
false
this
.
$emit
(
'
confirmclick
'
,
{
page
:
'
client
'
,
value
:
this
.
choosedPost
})
},
itemClick
(
item
,
index
)
{
this
.
checked
=
item
.
comPartyId
this
.
choosedPost
=
item
},
onRefresh
()
{
// 刷新接口
// this.postDataList = []
this
.
currentPage
=
1
this
.
isRefreshing
=
true
this
.
finished
=
false
this
.
getPostData
()
},
onLoad
()
{
this
.
loading
=
true
this
.
getPostData
()
},
getPostData
()
{
let
_this
=
this
let
data
=
{
'
dbSource
'
:
this
.
linkInfo
.
sysDbSource
,
'
pageNum
'
:
_this
.
currentPage
,
'
pageSize
'
:
_this
.
pageSize
,
'
erpUserId
'
:
this
.
linkInfo
.
sysUserId
,
'
invOwner
'
:
this
.
linkInfo
.
sysOrgId
,
'
goodsId
'
:
_this
.
chinfo
.
goodsId
,
'
supply
'
:
_this
.
keywords
}
getCgSupplyList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
'
00000
'
)
{
if
(
_this
.
currentPage
===
1
)
{
_this
.
searchNum
=
rt
.
entity
.
total
+
''
this
.
postDataList
=
[]
}
if
(
this
.
isRefreshing
)
{
this
.
postDataList
=
rt
.
entity
.
supplyList
}
else
if
(
!!
rt
.
entity
.
supplyList
||
rt
.
entity
.
supplyList
.
length
>
0
)
{
this
.
postDataList
=
this
.
postDataList
.
concat
(
rt
.
entity
.
supplyList
)
}
// _this.postDataListSetAction(rt.data)
// 重置刷新提示
_this
.
isRefreshing
=
false
// 重置加载更多提示
_this
.
loading
=
false
// 若当前加载的页数没有满足每页的数量代表完全加载
if
(
rt
.
entity
.
supplyList
.
length
<
10
)
{
_this
.
finished
=
true
}
else
{
// 加载成功后下一页自增1
_this
.
currentPage
++
}
}
else
{
_this
.
$toast
(
rt
.
message
)
// _this.$toast('列表获取失败')
_this
.
isRefreshing
=
false
_this
.
error
=
true
_this
.
finished
=
true
}
// 加载状态结束
_this
.
loading
=
false
}).
catch
(
e
=>
{
_this
.
$toast
(
'
列表获取失败
'
)
_this
.
isRefreshing
=
false
_this
.
loading
=
false
_this
.
error
=
true
_this
.
finished
=
true
})
},
// 数据处理
postDataListSetAction
(
array
)
{
array
.
forEach
((
res
)
=>
{
this
.
postDataList
.
push
({
assigneeFactoryId
:
res
.
assigneeFactoryId
,
catagory
:
res
.
catagory
,
comGoodsFormId
:
res
.
comGoodsFormId
,
comGoodsId
:
res
.
comGoodsId
,
comGoodsVarietyId
:
res
.
comGoodsVarietyId
,
comUnitId
:
res
.
comUnitId
,
defaultExpireDate
:
res
.
defaultExpireDate
,
factoryId
:
res
.
factoryId
,
goodsDesc
:
res
.
goodsDesc
,
goodsName
:
res
.
goodsName
,
goodsOpcode
:
res
.
goodsOpcode
,
goodsSpell
:
res
.
goodsSpell
,
goodsStatus
:
res
.
goodsStatus
,
midPacknum
:
res
.
midPacknum
,
packageNum
:
res
.
packageNum
,
partyName
:
res
.
partyName
,
partyName1
:
res
.
partyName1
,
partyOpcode
:
res
.
partyOpcode
,
productLocation
:
res
.
productLocation
,
unitName
:
res
.
unitName
,
goodsForm
:
res
.
goodsForm
,
partyOpcode1
:
res
.
partyOpcode1
,
priceCode
:
res
.
priceCode
,
retailPrice
:
res
.
retailPrice
,
taxRate
:
res
.
taxRate
,
varietyName
:
res
.
varietyName
,
})
})
},
/// 判断数值是否为空
isJudgeStrNull
(
val
)
{
if
(
val
!==
null
&&
val
!==
undefined
&&
val
!==
''
)
{
return
true
}
return
false
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.content
{
background-color
:
#F5F5F5
;
}
.more-search
{
width
:
75%
;
height
:
100%
;
overflow
:
hidden
;
display
:
flex
;
flex-direction
:
column
;
}
.title-layout
{
height
:
45px
;
line-height
:
45px
;
text-align
:
center
;
background
:
white
;
font-size
:
17px
;
font-weight
:
500
;
color
:
#23262A
;
}
.listHeight
{
flex
:
1
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
}
.num-tip
{
padding
:
10px
;
}
.item-layout
{
height
:
40px
;
line-height
:
40px
;
background
:
white
;
border-bottom
:
#dedede
1px
solid
;
padding-left
:
10px
;
}
.action-bottom
{
width
:
100%
;
display
:
flex
;
button
{
flex
:
1
;
}
}
.red-tips
{
color
:
#fb1c1c
;
font-weight
:
bold
;
}
</
style
>
src/components/SearchInConsignor.vue
0 → 100644
View file @
eeae9183
<
template
>
<div>
<van-popup
v-model=
"postShow"
class=
"more-search bg-gray"
position=
"right"
get-container=
"body"
>
<div
class=
"title-layout font-bold font-16"
>
货主
</div>
<van-search
v-model=
"keywords"
placeholder=
"请输入编码或名称"
show-action
@
search=
"onSearch"
>
<i
slot=
"left-icon"
class=
"fa fa-search"
></i>
<div
slot=
"action"
class=
"font14"
@
click=
"onSearch"
>
搜索
</div>
</van-search>
<search-result
:result-num=
"searchNum"
></search-result>
<div
class=
"w100 listHeight"
ref=
"scrollRef"
>
<van-pull-refresh
v-model=
"isRefreshing"
@
refresh=
"onRefresh"
>
<van-list
v-model=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
:error.sync=
"error"
:offset=
"10"
@
load=
"onLoad"
>
<van-radio-group
v-model=
"checked"
>
<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.comPartyId"
/>
</
template
>
</van-cell>
</van-cell-group>
</van-radio-group>
</van-list>
</van-pull-refresh>
</div>
<div
class=
"action-bottom"
>
<van-button
type=
"default"
@
click=
"onCancelClick"
>
取消
</van-button>
<van-button
type=
"info"
class=
"submit"
@
click=
"onConfirmClick"
>
确定
</van-button>
</div>
</van-popup>
</div>
</template>
<
script
>
import
{
getCgSupplyList
}
from
'
@/api/common
'
import
{
getResListNum
}
from
'
../utils/common
'
import
SearchResult
from
'
./SearchResult
'
import
{
Dialog
}
from
'
vant
'
export
default
{
name
:
'
SearchInConsignor
'
,
components
:
{
SearchResult
},
data
()
{
return
{
postShow
:
false
,
keywords
:
''
,
isRefreshing
:
false
,
loading
:
false
,
finished
:
false
,
error
:
false
,
searchNum
:
'
0
'
,
currentPage
:
1
,
pageSize
:
10
,
postDataList
:
[],
checked
:
''
,
choosedPost
:
{}
}
},
computed
:
{
linkInfo
()
{
return
this
.
$store
.
state
.
linkInfo
}
},
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
customer
:
{
type
:
Object
,
default
:
()
=>
{}
},
chinfo
:
{
type
:
Object
,
default
:
()
=>
{
return
{
goodsId
:
''
,
supplier
:
''
}
}
}
},
watch
:
{
value
(
val
)
{
this
.
postShow
=
val
if
(
val
)
{
this
.
postDataList
=
[]
this
.
choosedPost
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
customer
))
this
.
checked
=
!
this
.
customer
.
comPartyId
?
''
:
this
.
customer
.
comPartyId
console
.
log
(
this
.
checked
)
this
.
currentPage
=
1
this
.
onLoad
()
}
},
postShow
(
val
)
{
if
(
!
val
)
{
this
.
$refs
.
scrollRef
.
scrollTop
=
0
}
this
.
$emit
(
'
input
'
,
val
)
}
},
methods
:
{
/// 标题拼接
<!--
药厂码
/
(
SAP
码)名称
-->
titleInitial
(
model
)
{
let
titleStr
=
model
.
comPartyId
+
'
/(
'
+
model
.
partyOpcode
+
'
)/
'
+
model
.
partyName
return
titleStr
},
onSearch
()
{
// if (!this.isJudgeStrNull(this.keywords)) {
// Dialog.alert({
// title: '温馨提示',
// message: '搜索内容为空!'
// }).then(() => {
// })
// return
// }
this
.
keywords
=
this
.
keywords
.
replace
(
/
\s
+/g
,
""
)
this
.
$refs
.
scrollRef
.
scrollTop
=
0
this
.
currentPage
=
1
this
.
finished
=
false
this
.
onLoad
()
},
onCancelClick
()
{
this
.
postShow
=
false
this
.
$emit
(
'
cancleclick
'
)
},
onConfirmClick
()
{
if
(
!
this
.
choosedPost
.
comPartyId
)
{
Dialog
.
alert
({
title
:
'
温馨提示
'
,
message
:
'
请选择选项!
'
}).
then
(()
=>
{
})
return
}
this
.
postShow
=
false
this
.
$emit
(
'
confirmclick
'
,
{
page
:
'
consignor
'
,
value
:
this
.
choosedPost
})
},
itemClick
(
item
,
index
)
{
this
.
checked
=
item
.
comPartyId
this
.
choosedPost
=
item
},
onRefresh
()
{
// 刷新接口
// this.postDataList = []
this
.
currentPage
=
1
this
.
isRefreshing
=
true
this
.
finished
=
false
this
.
getPostData
()
},
onLoad
()
{
this
.
loading
=
true
this
.
getPostData
()
},
getPostData
()
{
let
_this
=
this
let
data
=
{
'
dbSource
'
:
this
.
linkInfo
.
sysDbSource
,
'
pageNum
'
:
_this
.
currentPage
,
'
pageSize
'
:
_this
.
pageSize
,
'
erpUserId
'
:
this
.
linkInfo
.
sysUserId
,
'
invOwner
'
:
this
.
linkInfo
.
sysOrgId
,
'
goodsId
'
:
_this
.
chinfo
.
goodsId
,
'
supply
'
:
_this
.
keywords
}
getCgSupplyList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
'
00000
'
)
{
if
(
_this
.
currentPage
===
1
)
{
_this
.
searchNum
=
rt
.
entity
.
total
+
''
this
.
postDataList
=
[]
}
if
(
this
.
isRefreshing
)
{
this
.
postDataList
=
rt
.
entity
.
supplyList
}
else
if
(
!!
rt
.
entity
.
supplyList
||
rt
.
entity
.
supplyList
.
length
>
0
)
{
this
.
postDataList
=
this
.
postDataList
.
concat
(
rt
.
entity
.
supplyList
)
}
// _this.postDataListSetAction(rt.data)
// 重置刷新提示
_this
.
isRefreshing
=
false
// 重置加载更多提示
_this
.
loading
=
false
// 若当前加载的页数没有满足每页的数量代表完全加载
if
(
rt
.
entity
.
supplyList
.
length
<
10
)
{
_this
.
finished
=
true
}
else
{
// 加载成功后下一页自增1
_this
.
currentPage
++
}
}
else
{
_this
.
$toast
(
rt
.
message
)
// _this.$toast('列表获取失败')
_this
.
isRefreshing
=
false
_this
.
error
=
true
_this
.
finished
=
true
}
// 加载状态结束
_this
.
loading
=
false
}).
catch
(
e
=>
{
_this
.
$toast
(
'
列表获取失败
'
)
_this
.
isRefreshing
=
false
_this
.
loading
=
false
_this
.
error
=
true
_this
.
finished
=
true
})
},
// 数据处理
postDataListSetAction
(
array
)
{
array
.
forEach
((
res
)
=>
{
this
.
postDataList
.
push
({
assigneeFactoryId
:
res
.
assigneeFactoryId
,
catagory
:
res
.
catagory
,
comGoodsFormId
:
res
.
comGoodsFormId
,
comGoodsId
:
res
.
comGoodsId
,
comGoodsVarietyId
:
res
.
comGoodsVarietyId
,
comUnitId
:
res
.
comUnitId
,
defaultExpireDate
:
res
.
defaultExpireDate
,
factoryId
:
res
.
factoryId
,
goodsDesc
:
res
.
goodsDesc
,
goodsName
:
res
.
goodsName
,
goodsOpcode
:
res
.
goodsOpcode
,
goodsSpell
:
res
.
goodsSpell
,
goodsStatus
:
res
.
goodsStatus
,
midPacknum
:
res
.
midPacknum
,
packageNum
:
res
.
packageNum
,
partyName
:
res
.
partyName
,
partyName1
:
res
.
partyName1
,
partyOpcode
:
res
.
partyOpcode
,
productLocation
:
res
.
productLocation
,
unitName
:
res
.
unitName
,
goodsForm
:
res
.
goodsForm
,
partyOpcode1
:
res
.
partyOpcode1
,
priceCode
:
res
.
priceCode
,
retailPrice
:
res
.
retailPrice
,
taxRate
:
res
.
taxRate
,
varietyName
:
res
.
varietyName
,
})
})
},
/// 判断数值是否为空
isJudgeStrNull
(
val
)
{
if
(
val
!==
null
&&
val
!==
undefined
&&
val
!==
''
)
{
return
true
}
return
false
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.content
{
background-color
:
#F5F5F5
;
}
.more-search
{
width
:
75%
;
height
:
100%
;
overflow
:
hidden
;
display
:
flex
;
flex-direction
:
column
;
}
.title-layout
{
height
:
45px
;
line-height
:
45px
;
text-align
:
center
;
background
:
white
;
font-size
:
17px
;
font-weight
:
500
;
color
:
#23262A
;
}
.listHeight
{
flex
:
1
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
}
.num-tip
{
padding
:
10px
;
}
.item-layout
{
height
:
40px
;
line-height
:
40px
;
background
:
white
;
border-bottom
:
#dedede
1px
solid
;
padding-left
:
10px
;
}
.action-bottom
{
width
:
100%
;
display
:
flex
;
button
{
flex
:
1
;
}
}
.red-tips
{
color
:
#fb1c1c
;
font-weight
:
bold
;
}
</
style
>
src/components/SearchInSupplier.vue
View file @
eeae9183
...
...
@@ -50,7 +50,7 @@
</template>
<
script
>
import
{
getCgSupplyList
}
from
'
@/
cgA
pi/common
'
import
{
getCgSupplyList
}
from
'
@/
a
pi/common
'
import
{
getResListNum
}
from
'
../utils/common
'
import
SearchResult
from
'
./SearchResult
'
import
{
Dialog
}
from
'
vant
'
...
...
src/views/myOrder/components/HighSearch.vue
0 → 100644
View file @
eeae9183
<
template
>
<div
class=
"h100"
>
<van-popup
v-model=
"moreSearchShow"
class=
"more-search"
position=
"right"
:style=
"
{ width: '75%',height: '100%', overflow: 'hidden' }">
<div
class=
"title font-bold font-16"
>
下单时间
</div>
<time-choose
:startTime=
"moreSearchInfo.time.start"
:endTime=
"moreSearchInfo.time.end"
@
confirm=
"timeConfirm"
></time-choose>
<van-cell-group
class=
"high-info"
>
<van-cell
class=
"flex4"
is-link
:value=
"consignor"
@
click=
"showPost('consignor')"
>
<template
#title
>
<span
type=
"danger"
class=
"font-bold"
>
货主
</span>
</
template
>
</van-cell>
<van-field
class=
"common"
placeholder=
"请输入订单号"
v-model=
"moreSearchInfo.orderNo"
>
<
template
#label
>
<span
type=
"danger"
class=
"font-bold"
>
订单号
</span>
</
template
>
</van-field>
<van-cell
class=
"flex4"
is-link
:value=
"supplier"
@
click=
"showPost('supplier')"
>
<
template
#title
>
<span
type=
"danger"
class=
"font-bold"
>
供应商
</span>
</
template
>
</van-cell>
<van-cell
class=
"flex4"
is-link
:value=
"goods"
@
click=
"showPost('goods')"
>
<
template
#title
>
<span
type=
"danger"
class=
"font-bold"
>
商品
</span>
</
template
>
</van-cell>
<van-cell
class=
"flex4"
is-link
:value=
"client"
@
click=
"showPost('client')"
>
<
template
#title
>
<span
type=
"danger"
class=
"font-bold"
>
客户
</span>
</
template
>
</van-cell>
</van-cell-group>
<div
class=
"action-bottom"
>
<van-button
type=
"default"
@
click=
"onCleanClick"
>
重置
</van-button>
<van-button
type=
"info"
class=
"submit"
@
click=
"onSearchClick"
>
查询
</van-button>
</div>
</van-popup>
<search-in-supplier
v-model=
"moreSearchDialog.supplierShow"
:customer=
"!moreSearchInfo.supplier ? {}:moreSearchInfo.supplier"
:chinfo=
"chinfo"
@
cancleclick=
"showPost"
@
confirmclick=
"postConfirm"
></search-in-supplier>
<search-in-consignor
v-model=
"moreSearchDialog.consignorShow"
:customer=
"!moreSearchInfo.consignor ? {}:moreSearchInfo.consignor"
:chinfo=
"chinfo"
@
cancleclick=
"showPost"
@
confirmclick=
"postConfirm"
></search-in-consignor>
<cg-search-goods
v-model=
"moreSearchDialog.goodsShow"
:customer=
"!moreSearchInfo.goods ? {}:moreSearchInfo.goods"
@
cancleclick=
"showPost"
@
confirmclick=
"postConfirm"
></cg-search-goods>
<search-in-client
v-model=
"moreSearchDialog.clientShow"
:customer=
"!moreSearchInfo.client ? {}:moreSearchInfo.client"
:chinfo=
"chinfo"
@
cancleclick=
"showPost"
@
confirmclick=
"postConfirm"
></search-in-client>
</div>
</template>
<
script
>
import
TimeChoose
from
'
@/components/TimeChoose
'
import
{
getFormateDate
}
from
'
@/utils/common
'
// 供应商
import
SearchInSupplier
from
"
@/components/SearchInSupplier
"
;
// 货主
import
SearchInConsignor
from
"
@/components/SearchInConsignor
"
;
// 商品
import
CgSearchGoods
from
"
@/components/CgSearchGoods
"
;
// 客户
import
SearchInClient
from
"
@/components/SearchInClient
"
export
default
{
name
:
'
HighSearch
'
,
components
:
{
TimeChoose
,
SearchInSupplier
,
CgSearchGoods
,
SearchInConsignor
,
SearchInClient
},
data
()
{
return
{
moreSearchShow
:
false
,
moreSearchDialog
:
{
consignorShow
:
false
,
goodsShow
:
false
,
supplierShow
:
false
,
goodsShow
:
false
,
clientShow
:
false
},
moreSearchInfo
:
{
supplier
:
''
,
// 供应商
consignor
:
''
,
// 货主
goods
:
''
,
// 商品
client
:
''
,
// 客户
time
:
{
start
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
),
end
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
)
},
},
chinfo
:
{
goodsId
:
''
,
supplier
:
''
}
}
},
computed
:
{
// 供应商
supplier
()
{
if
(
this
.
moreSearchInfo
.
supplier
.
comPartyId
)
{
return
!
this
.
moreSearchInfo
.
supplier
?
''
:
(
this
.
moreSearchInfo
.
supplier
.
comPartyId
+
'
/(
'
+
this
.
moreSearchInfo
.
supplier
.
partyOpcode
+
'
)
'
+
this
.
moreSearchInfo
.
supplier
.
partyName
)
}
else
{
return
''
}
},
// 货主
consignor
()
{
if
(
this
.
moreSearchInfo
.
consignor
.
comPartyId
)
{
return
!
this
.
moreSearchInfo
.
consignor
?
''
:
(
this
.
moreSearchInfo
.
consignor
.
comPartyId
+
'
/(
'
+
this
.
moreSearchInfo
.
consignor
.
partyOpcode
+
'
)
'
+
this
.
moreSearchInfo
.
consignor
.
partyName
)
}
else
{
return
''
}
},
// 商品
goods
()
{
if
(
this
.
moreSearchInfo
.
goods
.
comGoodsId
)
{
return
!
this
.
moreSearchInfo
.
goods
?
''
:
(
this
.
moreSearchInfo
.
goods
.
comGoodsId
+
'
/(
'
+
this
.
moreSearchInfo
.
goods
.
goodsOpcode
+
'
)
'
+
this
.
moreSearchInfo
.
goods
.
goodsName
+
'
/
'
+
this
.
moreSearchInfo
.
goods
.
goodsDesc
+
'
/
'
+
this
.
moreSearchInfo
.
goods
.
productLocation
+
'
/
'
+
this
.
moreSearchInfo
.
goods
.
packageNum
+
'
/
'
+
this
.
moreSearchInfo
.
goods
.
unitName
)
}
else
{
return
''
}
},
// 客户
client
()
{
if
(
this
.
moreSearchInfo
.
client
.
comPartyId
)
{
return
!
this
.
moreSearchInfo
.
client
?
''
:
(
this
.
moreSearchInfo
.
client
.
comPartyId
+
'
/(
'
+
this
.
moreSearchInfo
.
client
.
partyOpcode
+
'
)
'
+
this
.
moreSearchInfo
.
client
.
partyName
)
}
else
{
return
''
}
}
},
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
choosetime
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
watch
:
{
value
(
val
)
{
this
.
moreSearchShow
=
val
// this.time = JSON.parse(JSON.stringify(this.choosetime))
},
moreSearchShow
(
val
)
{
this
.
$emit
(
'
input
'
,
val
)
}
},
methods
:
{
timeConfirm
(
data
)
{
this
.
time
=
data
},
onSearchClick
()
{
this
.
moreSearchShow
=
false
console
.
log
(
this
.
moreSearchInfo
)
this
.
$emit
(
'
onsearch
'
,
this
.
moreSearchInfo
)
},
onCleanClick
()
{
this
.
moreSearchInfo
=
{
supplier
:
''
,
// 供应商
consignor
:
''
,
// 货主
goods
:
''
,
// 商品
client
:
''
,
// 客户
time
:
{
start
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
),
end
:
getFormateDate
(
new
Date
(),
'
yyyy-MM-dd
'
)
},
}
this
.
moreSearchShow
=
false
this
.
$emit
(
'
onsearch
'
,
this
.
moreSearchInfo
)
},
showPost
(
type
)
{
switch
(
true
)
{
case
type
===
'
supplier
'
:
this
.
moreSearchDialog
.
supplierShow
=
!
this
.
moreSearchDialog
.
supplierShow
;
break
;
case
type
===
'
consignor
'
:
this
.
moreSearchDialog
.
consignorShow
=
!
this
.
moreSearchDialog
.
consignorShow
;
break
;
case
type
===
'
goods
'
:
this
.
moreSearchDialog
.
goodsShow
=
!
this
.
moreSearchDialog
.
goodsShow
break
;
case
type
===
'
client
'
:
this
.
moreSearchDialog
.
clientShow
=
!
this
.
moreSearchDialog
.
clientShow
break
;
}
window
.
history
.
pushState
(
null
,
null
,
document
.
URL
);
},
postConfirm
(
data
)
{
console
.
log
(
data
)
switch
(
true
)
{
case
data
.
page
===
'
supplier
'
:
this
.
moreSearchInfo
.
supplier
=
data
.
value
;
this
.
chinfo
.
supplier
=
this
.
moreSearchInfo
.
supplier
.
comPartyId
break
;
case
data
.
page
===
'
goods
'
:
this
.
moreSearchInfo
.
goods
=
data
.
value
break
;
case
data
.
page
===
'
consignor
'
:
this
.
moreSearchInfo
.
consignor
=
data
.
value
break
;
case
data
.
page
===
'
client
'
:
this
.
moreSearchInfo
.
client
=
data
.
value
break
;
}
this
.
showPost
(
data
.
page
);
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
*
{
box-sizing
:
border-box
;
}
.more-search
{
.title
{
margin
:
30px
0
0
15px
}
.search-value
{
margin-top
:
45px
;
}
.flex4
{
/
deep
/
.van-cell__title
{
flex
:
none
;
}
}
.action-bottom
{
position
:
absolute
;
bottom
:
0
;
width
:
100%
;
display
:
flex
;
button
{
flex
:
1
;
}
}
}
</
style
>
src/views/myOrder/index.vue
View file @
eeae9183
...
...
@@ -25,11 +25,14 @@
<my-order-list/>
</van-tab>
</van-tabs>
<high-search
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
</div>
</
template
>
<
script
>
import
myOrderList
from
'
./myOrderList.vue
'
import
HighSearch
from
'
./components/HighSearch.vue
'
import
{
getFormateDate
}
from
'
@/utils/common
'
const
allTabsTitle
=
[
{
title
:
'
全部
'
,
name
:
'
home
'
},
{
title
:
'
已开单
'
,
name
:
'
monitor
'
},
...
...
@@ -39,11 +42,25 @@ const allTabsTitle = [
]
export
default
{
components
:
{
myOrderList
myOrderList
,
HighSearch
},
data
()
{
return
{
tabsTitle
:
[]
tabsTitle
:
[],
moreSearchShow
:
false
,
activeTab
:
'
home
'
,
moreSearchInfo
:
{
//接收搜索更多回传的数据
supplier
:
{
comPartyId
:
""
},
//供应商ID
goods
:
{
comGoodsId
:
""
},
//商品ID
orderNo
:
""
,
//订单编号
time
:
{
//起始时间
start
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
end
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
},
}
}
},
computed
:
{
...
...
@@ -66,7 +83,7 @@ export default {
rightIcon
:
true
,
title
:
'
我的订单
'
,
leftClick
:
this
.
closeAppPage
,
rightClick
:
this
.
closeAppPage
rightClick
:
this
.
onMoreSearch
})
// 给window添加一个popstate事件,拦截返回键,执行this.onBrowserBack事件,addEventListener需要指向一个方法
window
.
addEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
...
...
@@ -93,9 +110,13 @@ export default {
window
.
history
.
pushState
(
null
,
null
,
document
.
URL
)
}
},
// 高级搜索查询
moreSearchConfirm
(
data
)
{
console
.
log
(
'
000000000
'
)
this
.
time
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
},
// 高级搜索取消
moreSearchClean
(
data
)
{
this
.
moreSearchInfo
=
data
;
},
addNextTab
(
pos
)
{
// 加载下一个页面
...
...
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