shish 1 rok pred
rodič
commit
e94a0c035a

+ 7 - 6
hdApp/src/components/module/dateSelect.vue

@@ -20,7 +20,7 @@
                 </view>
 
                 <view class="select-item-box">
-                    <view class="title">月份</view>
+                    <view class="title">月份</view>
                     <picker mode="date" :value="date" :start="startDate" :end="endDate" fields="month" @change="bindMonthChange" >
                         <view class="item-child_box">
                             <view class="admin-button-com mini-btn default custom" >{{showMonth||'选择月份'}}</view>
@@ -29,7 +29,7 @@
                 </view>
 
                 <view class="select-item-box">
-                    <view class="title">快捷</view>
+                    <view class="title">快捷选项</view>
                     <view class="item-child_box">
                         <button
                             v-for="(item,index) in getDictionariesInfo.dateDefaultOption"
@@ -42,13 +42,14 @@
                 </view>
 
                 <view class="select-item-box">
-                    <view class="title">时段</view>
+                    <view class="title">时段</view>
                     <view class="item-child_box" >
                         <view class="admin-button-com mini-btn default custom" @click="showDatePicker(0)">{{startDate || '选择开始日期'}}</view>
                         <view class="admin-button-com mini-btn default custom" @click="showDatePicker(1)">{{endDate || '选择结束日期'}}</view>
                         <view class="admin-button-com mini-btn blue custom" @click="customDateConfirm()">确认</view>
                     </view>
                 </view>
+
             </slot>
         </view>
         <mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="cancelPicker" />
@@ -157,7 +158,7 @@ export default {
                 return false
             }
             this.dropdownShow = false
-            this.defaultDateName = '时段'
+            this.defaultDateName = this.startDate == this.endDate ?  this.startDate : '时段' 
             this.$emit('selectDateFn',{searchTime:'custom',startTime:this.startDate,endTime:this.endDate})
         },
         cancelPicker(){
@@ -205,7 +206,7 @@ export default {
         background-color: #FFFFFF;
         left: 0;
         z-index: 29;
-        padding:120upx 30upx 40upx;
+        padding:50upx 30upx 40upx;
         border-radius: 0upx 0upx 20upx 20upx;
         transition: all 0.5s ease-in-out;
         & .select-item-box {
@@ -220,7 +221,7 @@ export default {
                 align-items: center;
                 & .admin-button-com {
                     margin-bottom: 20upx;
-                    padding: 18upx 50upx;
+                    padding: 25upx 50upx;
                     margin-right: 20upx;
                     &.custom {
                         width: 100%;

+ 1 - 1
hdApp/src/pages.json

@@ -427,7 +427,7 @@
 				{ "path": "pb", "style": { "navigationBarTitleText": "已屏蔽商家", "enablePullDownRefresh": true } },
 				{ "path": "open", "style": { "navigationBarTitleText": "商城功能开关", "enablePullDownRefresh": true } },
 				{ "path": "contact", "style": { "navigationBarTitleText": "联系官方", "enablePullDownRefresh": true } },
-				{ "path": "shopping", "style": { "navigationBarTitleText": "采购", "enablePullDownRefresh": true } },
+				{ "path": "shopping", "style": { "navigationBarTitleText": "买花记录", "enablePullDownRefresh": true } },
 				{ "path": "ghsProduct", "style": { "navigationBarTitleText": "采购花材", "enablePullDownRefresh": false } },
 				{ "path": "ghsProduct2", "style": { "navigationBarTitleText": "采购花材", "enablePullDownRefresh": false } },
 				{ "path": "setPsd", "style": { "navigationBarTitleText": "设置密码", "enablePullDownRefresh": true } },

+ 6 - 0
hdApp/src/pagesPurchase/purDetails.vue

@@ -401,6 +401,12 @@ export default {
   },
 	onLoad(){
     this.beginInit()
+
+    //返回上一页时不需要刷新
+		let pages = getCurrentPages();
+		let prevPage = pages[ pages.length - 2 ];
+		prevPage.$vm.refreshPage = 0
+
   },
   methods: {
     affirmTake(){

+ 41 - 5
hdApp/src/pagesPurchase/shopping.vue

@@ -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;
   }