|
|
@@ -1,6 +1,16 @@
|
|
|
<template>
|
|
|
<view class="order-page">
|
|
|
<app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" @change="change" itemWidth="20%"/>
|
|
|
+
|
|
|
+ <view style="margin-left:60upx;margin-top:110upx;padding-bottom:30upx;position: relative;">
|
|
|
+ <DateSelect @selectDateFn="selectDateFn" defaultShowName='时间' />
|
|
|
+
|
|
|
+ <button class="admin-button-com mini-btn blue" style="position: absolute;right:300upx;top:-8upx;" @click="debtChangeFn()">选供货商</button>
|
|
|
+
|
|
|
+ <button class="admin-button-com mini-btn blue" style="position: absolute;right:80upx;top:-8upx;" @click="debtChangeFn()">重置搜索</button>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
<view class="pay_list">
|
|
|
<OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="goToDetail"></OrderItem>
|
|
|
@@ -11,9 +21,11 @@
|
|
|
<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)"/>
|
|
|
</view>
|
|
|
</block>
|
|
|
+
|
|
|
<view class="app-footer open_btn">
|
|
|
<view @click="addEvent" class="admin-button-com big blue">新增采购</view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -22,11 +34,13 @@ import OrderItem from "./orderItem";
|
|
|
import { list } from "@/mixins";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import { ghsList, purchaseList } from "@/api/purchase/index";
|
|
|
+import DateSelect from "@/components/module/dateSelect";
|
|
|
export default {
|
|
|
components: {
|
|
|
AppWrapperEmpty,
|
|
|
OrderItem,
|
|
|
- AppTabs
|
|
|
+ AppTabs,
|
|
|
+ DateSelect
|
|
|
},
|
|
|
mixins: [list],
|
|
|
data () {
|
|
|
@@ -63,7 +77,13 @@ export default {
|
|
|
},
|
|
|
supplierList: [],
|
|
|
tabIndex: 0,
|
|
|
- status: '0'
|
|
|
+ status: '0',
|
|
|
+ refreshPage:1,
|
|
|
+ searchContent:'',
|
|
|
+ searchTime:'',
|
|
|
+ startTime:'',
|
|
|
+ ghsId:0,
|
|
|
+ ghsName:''
|
|
|
}
|
|
|
},
|
|
|
onReachBottom () {
|
|
|
@@ -75,12 +95,28 @@ export default {
|
|
|
uni.stopPullDownRefresh()
|
|
|
}
|
|
|
},
|
|
|
- onPullDownRefresh() {
|
|
|
+ onPullDownRefresh () {
|
|
|
+ this.resetList();
|
|
|
this.getpurchaseList().then(res => {
|
|
|
uni.stopPullDownRefresh()
|
|
|
})
|
|
|
},
|
|
|
+ onShow(){
|
|
|
+ if(this.refreshPage == 1){
|
|
|
+ this.resetList()
|
|
|
+ this.getpurchaseList()
|
|
|
+ }else{
|
|
|
+ this.refreshPage = 1
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ selectDateFn(val) {
|
|
|
+ this.searchTime = val.searchTime
|
|
|
+ this.startTime = val.startTime
|
|
|
+ this.endTime = val.endTime
|
|
|
+ this.resetList()
|
|
|
+ this.getpurchaseList()
|
|
|
+ },
|
|
|
change(e) {
|
|
|
if (this.tabIndex == e.index) {
|
|
|
return false;
|
|
|
@@ -95,7 +131,7 @@ export default {
|
|
|
this.getpurchaseList()
|
|
|
},
|
|
|
getpurchaseList () {
|
|
|
- return purchaseList({ status: this.status,page: this.list.page }).then(res => {
|
|
|
+ return purchaseList({ status: this.status,page: this.list.page,searchTime: this.searchTime,startTime: this.startTime,endTime: this.endTime,ghsId:this.ghsId}).then(res => {
|
|
|
this.completes(res)
|
|
|
this.tabs[0].value = res.data.shop.totalPurchaseOrder // 全部
|
|
|
this.tabs[1].value = res.data.shop.cgUnPay // 待付款
|
|
|
@@ -197,7 +233,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.pay_list {
|
|
|
- padding-top: 100upx;
|
|
|
+ padding-top:20upx;
|
|
|
padding-bottom: 100upx;
|
|
|
background-color: #f0f2f6;
|
|
|
}
|