shish 1 год назад
Родитель
Сommit
6651aa7b1b

+ 47 - 28
hdApp/src/admin/stat/cgItem.vue

@@ -8,6 +8,13 @@
     </view>
 	<view class="top-bar">
 		<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+
+					<button class="admin-button-com middle blue" style="position: absolute;right:320upx;top:-8upx;" @click="selGhs()">{{ ghsName==''?'选供货商':ghsName }}</button>
+
+			<button class="admin-button-com middle blue" style="position: absolute;right:130upx;top:-8upx;" @click="showGhsName()">显供货商名</button>
+			
+			<button class="admin-button-com middle blue" style="position: absolute;right:20upx;top:-8upx;" @click="resetSearch()">重置</button>
+
 	</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
 			<view class="space-view ex-table">
@@ -49,40 +56,55 @@ export default {
 	data() {
 		return {
 			isShow:false,
-			customizationTime:'',
 			shopId:'',
 			itemId:'',
-			nowTime: "",
-			showTimeDropdown: false,
-			nowShop: "",
-			showShopDropdown: false,
-			dataList: [],
-			params:{
-				itemId: '',
-				searchTime:'',
-				startTime: "",
-				endTime: "",
-				shopId: "",
-			},
 			profile:[],
 			storageData:[],
 			searchContent:'',
-			info:{}
+			info:{},
+			ghsId:0,
+			ghsName:'',
+			searchTime:'',
+			startTime:'',
+			endTime:'',
+			showGhsParam:0
 		};
 	},
 	onPullDownRefresh() {
 		this.resetList();
-		this.getStatList().then(res => {
+		this.getMyStatList().then(res => {
 			uni.stopPullDownRefresh();
 		});
 	},
 	onLoad(e) {
 		this.itemId = e.id;
-		this.params.itemId = e.id;
+		this.itemId = e.id;
 		this.shopId = this.getLoginInfo.shopId;
 	},
+	onShow(){
+		this.resetList()
+		this.getMyStatList()
+	},
 	methods: {
 		...mapActions(['setUserShopAll']),
+		selGhs(){
+			this.$util.pageTo({ url: "/pagesPurchase/selectGhs"})
+		},
+		showGhsName(){
+			this.showGhsParam = 1
+			this.resetList()
+			this.getMyStatList()
+		},
+		resetSearch(){
+			this.ghsId = 0
+			this.ghsName=''
+			this.searchTime = ''
+			this.startTime = ''
+			this.endTime = ''
+			this.showGhsParam = 0
+			this.resetList()
+			this.getMyStatList()
+		},
 		searchFn(e){
 			this.searchContent = e;
 			this.filterStat()
@@ -103,30 +125,27 @@ export default {
 				that.profile = that.storageData
 			}
 		},
-		//选择分店
-		selectShopFn(val){
-			this.params.shopId = val.id;
-			this.init();
-		},
-		//选择时间
 		selectDateFn(val) {
-			this.params = {...this.params,...val}
-			this.init();			
+			this.searchTime = val.searchTime
+			this.startTime = val.startTime
+			this.endTime = val.endTime
+      		this.resetList()
+			this.getMyStatList()
 		},
 		async init() {
-			this.getStatList();
+			this.getMyStatList();
 		},
-		getStatList() {
+		getMyStatList() {
 			let that = this
 			uni.showLoading()
-			getStatCgItem(this.params).then(res => {
+			getStatCgItem({itemId: this.itemId, searchTime:this.searchTime, startTime:this.startTime, endTime: this.endTime,shopId:this.shopId,ghsId:this.ghsId,showGhsParam:this.showGhsParam}).then(res => {
 				uni.hideLoading()
 				if (!this.$util.isEmpty(res.data.list)) {
 					that.storageData = res.data.list
 					that.info = res.data ? res.data : []
 					that.filterStat()
 				}else{
-					that.storageData=[]
+					that.profile = []
 				}
 			});
 		}

+ 9 - 3
hdApp/src/pagesPurchase/orderItem.vue

@@ -17,11 +17,17 @@
     </view>
     <view class="item-main" >
       <view class="item-info">
+
         <view class="info-row">
-          <text class="info-label"> 日期:</text>
-          <text class="info-value" v-if="info.payTime!='0000-00-00 00:00:00'">{{ info.payTime ? info.payTime.substring(5, 16) : '' }}</text>
-          <text class="info-value" v-else>{{ info.addTime ? info.addTime.substring(5, 16) : '' }}</text>
+          <text class="info-label"> 创建:</text>
+          <text class="info-value">{{ info.addTime ? info.addTime.substring(5, 16) : '' }}</text>
+        </view>
+
+        <view class="info-row" v-if="info.payTime!='0000-00-00 00:00:00'">
+          <text class="info-label"> 确认:</text>
+          <text class="info-value">{{ info.payTime ? info.payTime.substring(5, 16) : '' }}</text>
         </view>
+
         <view class="info-row">
           <text class="info-label"> 单号:</text>
           <text class="info-value">{{ info.orderSn }} </text>

+ 2 - 2
hdApp/src/plugins/luch-request_0.0.7/request.js

@@ -141,7 +141,7 @@ class Request {
 					} else {
 						if (response.data.code == 0) {
 							if (!config.hideError) {
-								uni.showToast({ title: response.data.msg, icon: 'none', mask: true, duration: 2000 })
+								uni.showToast({ title: response.data.msg, icon: 'none', mask: false, duration: 2000 })
 							}
 							reject(response.data)
 						} else if (response.data.code && response.data.code == -1) {
@@ -152,7 +152,7 @@ class Request {
 							uni.removeStorageSync('account')
 						} else {
 							if (!config.hideError) {
-								uni.showToast({ title: response.data.msg, icon: 'none', mask: true })
+								uni.showToast({ title: response.data.msg, icon: 'none', mask: false })
 							}
 							reject(response.data)
 						}