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
e2a8b949
Commit
e2a8b949
authored
Mar 30, 2021
by
xiejb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品非必填
parent
7b0e210b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
323 additions
and
2 deletions
+323
-2
src/components/SearchInOrderSupplier.vue
src/components/SearchInOrderSupplier.vue
+321
-0
src/views/myOrder/components/HighSearch.vue
src/views/myOrder/components/HighSearch.vue
+2
-2
No files found.
src/components/SearchInOrderSupplier.vue
0 → 100644
View file @
e2a8b949
<
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-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-checkbox
:name=
"item.supplierId"
/>
</
template
>
</van-cell>
</van-cell-group>
</van-checkbox-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
{
getQuerySalesRefList
}
from
'
@/api/common
'
import
{
getResListNum
}
from
'
../utils/common
'
import
SearchResult
from
'
./SearchResult
'
import
{
Dialog
}
from
'
vant
'
export
default
{
name
:
'
SearchInOrderSupplier
'
,
components
:
{
SearchResult
},
data
()
{
return
{
postShow
:
false
,
keywords
:
''
,
isRefreshing
:
false
,
loading
:
false
,
finished
:
false
,
error
:
false
,
searchNum
:
'
0
'
,
currentPage
:
1
,
pageSize
:
10
,
postDataList
:
[],
checked
:
''
,
checkedList
:
[],
choosedPost
:
[]
}
},
computed
:
{
linkInfo
()
{
return
this
.
$store
.
state
.
linkInfo
}
},
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
customer
:
{
type
:
Array
,
default
:
()
=>
[]
},
// 货主
consignor
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
watch
:
{
value
(
val
)
{
this
.
postShow
=
val
if
(
val
)
{
this
.
postDataList
=
[]
this
.
checkedList
=
[]
this
.
choosedPost
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
customer
))
// this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
// console.log(this.checked)
this
.
customer
.
forEach
((
res
)
=>
{
this
.
checkedList
.
push
(
res
.
supplierId
)
})
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
.
supplierId
+
'
/
'
+
model
.
supplierName
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
.
checkedList
=
[]
this
.
$emit
(
'
cancleclick
'
)
},
onConfirmClick
()
{
if
(
!
this
.
choosedPost
.
length
===
0
)
{
Dialog
.
alert
({
title
:
'
温馨提示
'
,
message
:
'
请选择选项!
'
}).
then
(()
=>
{
})
return
}
this
.
postShow
=
false
this
.
$emit
(
'
confirmclick
'
,
{
page
:
'
supplier
'
,
value
:
this
.
choosedPost
})
},
itemClick
(
item
,
index
)
{
// this.checked = item.org
// this.choosedPost = item
if
(
this
.
checkedList
.
indexOf
(
item
.
supplierId
)
>
-
1
)
{
this
.
choosedPost
.
splice
(
this
.
checkedList
.
indexOf
(
item
.
supplierId
),
1
)
this
.
checkedList
.
splice
(
this
.
checkedList
.
indexOf
(
item
.
supplierId
),
1
)
}
else
{
this
.
checkedList
.
push
(
item
.
supplierId
)
this
.
choosedPost
.
push
(
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
const
companyList
=
[]
// _this.consignor.forEach(item => {
// const removeItem = {
// 'length': this.pageSize,
// 'attr': {
// 'empid': this.linkInfo.userId + ',1',
// 'userid': item.erpUserid,
// 'sysname': item.sysname,
// 'companyname': item.companyname
// },
// 'dbName': '',
// 'start': this.currentPage
// }
// companyList.push(removeItem)
// })
// let data = {
// 'list': companyList
// }
let
data
=
{
'
clientId
'
:
[
57847
],
'
empId
'
:
''
,
'
mdmClientCode
'
:
''
,
'
order
'
:
''
,
'
ownerId
'
:
''
,
'
pageNum
'
:
this
.
currentPage
,
'
pageSize
'
:
this
.
pageSize
,
'
rtnRefType
'
:
'
CS
'
,
'
sort
'
:
''
,
'
sourceDb
'
:
'
SHYY
'
,
'
supplierId
'
:
[]
}
getQuerySalesRefList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
200
&&
rt
.
data
.
code
===
'
00000
'
)
{
if
(
_this
.
currentPage
===
1
)
{
_this
.
searchNum
=
rt
.
data
.
entity
.
total
+
''
this
.
postDataList
=
[]
}
if
(
this
.
isRefreshing
)
{
this
.
postDataList
=
rt
.
data
.
entity
.
saleRefList
}
else
if
(
!!
rt
.
data
.
entity
.
saleRefList
||
rt
.
data
.
entity
.
saleRefList
.
length
>
0
)
{
this
.
postDataList
=
this
.
postDataList
.
concat
(
rt
.
data
.
entity
.
saleRefList
)
}
// _this.postDataListSetAction(rt.data)
// 重置刷新提示
_this
.
isRefreshing
=
false
// 重置加载更多提示
_this
.
loading
=
false
// 若当前加载的页数没有满足每页的数量代表完全加载
if
(
rt
.
data
.
entity
.
saleRefList
.
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
})
},
/// 判断数值是否为空
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/views/myOrder/components/HighSearch.vue
View file @
e2a8b949
...
...
@@ -157,7 +157,7 @@ export default {
active
:
true
},
{
name
:
'
七
天
'
,
name
:
'
7
天
'
,
active
:
false
},
{
...
...
@@ -431,7 +431,7 @@ export default {
_this
.
showCustomizeDate
=
false
_this
.
getCurrentMonth
()
break
case
'
七
天
'
:
case
'
7
天
'
:
_this
.
showCustomizeDate
=
false
_this
.
getCurrentWeek
()
break
...
...
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