|
|
@@ -1,8 +1,13 @@
|
|
|
<template>
|
|
|
<view class="app-content">
|
|
|
<view class="order-page">
|
|
|
+ <view class="input-wrap_box">
|
|
|
+ <view>
|
|
|
+ <AppSearchModule placeholder="核销码 / 名称 / 手机号" @input="searchFn"/>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="tabs">
|
|
|
- <Tabs :isFixed="true" :tabs="tabs" :currentTab="tabIndex" @change="changeTabEvent" itemWidth="25%"></Tabs>
|
|
|
+ <Tabs :isFixed="false" :tabs="tabs" :currentTab="tabIndex" @change="changeTabEvent" itemWidth="25%"></Tabs>
|
|
|
</view>
|
|
|
<view scroll-y class="order-list">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
@@ -24,11 +29,13 @@ import OrderItem from "./orderItem";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import { list } from "@/mixins";
|
|
|
import { getPurchaseListApi,getLsRunningOrderNum } from "@/api/purchase";
|
|
|
+import AppSearchModule from "@/components/module/app-search";
|
|
|
export default {
|
|
|
components: {
|
|
|
Tabs,
|
|
|
OrderItem,
|
|
|
- AppWrapperEmpty
|
|
|
+ AppWrapperEmpty,
|
|
|
+ AppSearchModule
|
|
|
},
|
|
|
mixins: [list],
|
|
|
data() {
|
|
|
@@ -58,7 +65,9 @@ export default {
|
|
|
key: "5",
|
|
|
value: "0"
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ T:null,
|
|
|
+ searchContent:''
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -80,13 +89,24 @@ export default {
|
|
|
this.getCgList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ searchFn(e){
|
|
|
+ let that = this
|
|
|
+ if(that.T != null){
|
|
|
+ clearTimeout(that.T)
|
|
|
+ }
|
|
|
+ that.T = setTimeout(function(){
|
|
|
+ that.searchContent = e
|
|
|
+ that.resetList()
|
|
|
+ that.getCgList()
|
|
|
+ },700)
|
|
|
+ },
|
|
|
init(){
|
|
|
|
|
|
},
|
|
|
getCgList() {
|
|
|
let ghsId = this.option.ghsId || 0
|
|
|
let status = this.tabs[this.tabIndex].key
|
|
|
- let options = {page:this.list.page,status:status,ghsId:ghsId}
|
|
|
+ let options = {page:this.list.page,status:status,ghsId:ghsId,search:this.searchContent}
|
|
|
return getPurchaseListApi(options) .then(res => {
|
|
|
this.completes(res);
|
|
|
})
|
|
|
@@ -116,7 +136,7 @@ export default {
|
|
|
flex-direction: column;
|
|
|
background-color: #f9fbfc;
|
|
|
.order-list {
|
|
|
- padding-top:120upx;
|
|
|
+ padding-top:20upx;
|
|
|
padding-bottom:100upx;
|
|
|
flex: 1;
|
|
|
.allot-item {
|