diff --git a/pages/purchase/search.vue b/pages/purchase/search.vue
index 300bb43..ef4c9a3 100644
--- a/pages/purchase/search.vue
+++ b/pages/purchase/search.vue
@@ -16,9 +16,10 @@
-
-
+
+
{{v}}
+
@@ -27,29 +28,43 @@ import request from '@/common/request'
export default {
data(){
return{
- searchVal:"",
+ searchVal:{
+ supplier:"",
+ pageNo:1,
+ pageSize:20
+ },
list:[],
+ total:0,
eventChannel:null,
}
},
onLoad(options){
this.eventChannel=this.getOpenerEventChannel()
- this.searchVal=options.data
+ this.searchVal.supplier=options.data||""
this.search()
},
methods:{
+ clean(){
+ this.searchVal.pageNo=1
+ this.list=[]
+ this.total=0
+ },
async search(){
- var res=await request("/api/goods/supplierShow",{
- params:{supplier: this.searchVal}
- })
- if(res.statu){
- this.list=res.data
- }else{
- uni.showModal({
- title:"提示",
- content:res.msg||"获取供应商列表失败!",
- showCancel:false,
+ if(this.total==0 || this.list.length