ccjgmwz 3 rokov pred
rodič
commit
a1ae3d4cd1

+ 3 - 2
pages.json

@@ -339,7 +339,8 @@
 			"path": "pages/erpbusiness/quality_testing",
 			"style": {
 				"navigationStyle": "custom",
-				"navigationBarTitleText": ""
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -761,7 +762,7 @@
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "收购检斤",
-                "enablePullDownRefresh": false
+                "enablePullDownRefresh": true
             }
             
         },

+ 15 - 7
pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 		<view class="top">
-			<u-search placeholder="输入编号/客户号/车牌号" v-model="inputKeyword" @search="getList()"></u-search>
+			<u-search placeholder="输入编号/客户号/车牌号" v-model="inputKeyword" @search="getList(true)"></u-search>
 			<view class="dropdown">
 				<view class="left" @click="selectWarehouse">
 					<view>{{warehouseName}}</view>
@@ -115,11 +115,14 @@
 		onPullDownRefresh() {
 			this.currentPage=1
 			this.gridList=[]
-			this.getList()
+			this.getList(true)
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		},
 		 onReachBottom() {
 			 this.currentPage+=1
-		    this.getList()
+		    this.getList(false)
 			// this.getMoreNews()
 		},
 		methods: {
@@ -138,11 +141,11 @@
 					}
 					this.warehouseName = this.warehouseList[0].label
 					this.warehouseId = this.warehouseList[0].value
-					this.getList()
+					this.getList(true)
 				})
 			},
 			//获取列表
-			getList() {
+			getList(flag) {
 				this.$api.doRequest('get', '/weighingManagement/selectWeighingManagement', {
 					compId: '',
 					currentPage: this.currentPage,
@@ -152,7 +155,12 @@
 					managementType: 1,
 				}).then(res => {
 					var data=res.data.data.records
-					this.dataList = this.dataList.concat(data)
+					if(flag){
+						this.dataList = data
+					}
+					else{
+						this.dataList = this.dataList.concat(data)
+					}
 					if(res.data.data.records.length==0){
 						this.isContent=true
 					}
@@ -167,7 +175,7 @@
 				console.log(e)
 				this.warehouseName = e[0].label
 				this.dataList.warehouseName = e[0].label;
-				this.getList()
+				this.getList(true)
 			},
 			//毛重
 			grossWeightClick(val) {

+ 3 - 0
pages/erpbusiness/acquisitionInspection/grossWeightDetail.vue

@@ -121,6 +121,9 @@
 		.right-bottom{
 			width: 300rpx;
 			text-align: right;
+			font-size: 28rpx;
+			font-weight: 600;
+			color: #333333;
 		}
 	}
 }

+ 3 - 0
pages/erpbusiness/acquisitionInspection/tareDetail.vue

@@ -136,6 +136,9 @@
 		// border: 0;
 		.right-bottom{
 			width: 300rpx;
+			font-size: 28rpx;
+			font-weight: 600;
+			color: #333333;
 			text-align: right;
 		}
 	}

+ 32 - 2
pages/erpbusiness/edit_quality_testing.vue

@@ -89,7 +89,7 @@
 			<view class="c-row ">
 				<view class="title">水分(%)</view>
 				<view class="con-list">
-					<input v-model='gridList.waterContent' placeholder="请输入水分占比"
+					<input v-model='gridList.waterContent' placeholder="请输入水分占比" @input="waterContentChange"
 					 name="input"></input>
 				</view>
 			</view>
@@ -174,7 +174,12 @@
 				headUrl:"../../static/img/myimg/YongHu@3x.png",
 				userphone:"",
 				username:"请更改昵称",
-				gridList: {},
+				gridList: {
+					natureOfGrainPurchase:'贸易粮',
+					type:'潮粮',
+					tidalGrainPrice:'',
+					dryGrainPrice:''
+				},
 				managementType:'',
 				warehouseName: '',
 				warehouseList:[],
@@ -237,11 +242,35 @@
 							id:this.cangid
 						}).then(res => {
 							that.warehouseList=res.data.data.warehousePositionInfoList
+							
 						})
 					}
 				})
+				this.gridList.grade=this.gradeList[0].value
+				this.gridList.gradeKey=this.gradeList[0].key
 		},
 		methods: {
+			waterContentChange() {
+				var that = this
+				var numReg = /^[0-9]*$/
+				var numRe = new RegExp(numReg)
+				//潮粮单价改变事件
+				if (
+				  this.gridList.goodsName &&
+				  this.gridList.waterContent &&
+				  this.gridList.grade&&
+				  numRe.test(this.gridList.waterContent)
+				) {
+					this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice',{
+						warehouseId:this.cangid,
+						goodsName:this.gridList.goodsName,
+						waterContent: this.gridList.waterContent,
+						grade: this.gridList.grade,
+					}).then(res => {
+						that.gridList.tidalGrainPrice = res.data.data
+					})
+				}
+			},
 			submit(){
 				var that = this
 				if (!this.gridList.qualityNo) {
@@ -346,6 +375,7 @@
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
 				this.gridList.grade=this.gradeList[e[0]].value
 				this.gridList.gradeKey=this.gradeList[e[0]].key
+				this.waterContentChange()
 			},
 			binNumberpicker(e){
 				this.gridList.binNumber=this.warehouseList[e[0]].binNumber

+ 16 - 8
pages/erpbusiness/quality_testing.vue

@@ -180,11 +180,14 @@
 		onPullDownRefresh() {
 			this.currentPage=1
 			this.gridList=[]
-			this.getList()
+			this.getList(true)
+			setTimeout(function () {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		},
 		 onReachBottom() {
 			 this.currentPage+=1
-		    this.getList()
+		    this.getList(false)
 			// this.getMoreNews()
 		},
 		onLoad(options){
@@ -203,7 +206,7 @@
 					this.commonWarehouseNo=res.data.data[0].commonWarehouseNo
 					uni.setStorageSync('purchasePriceList',res.data.data[0].purchasePriceList)
 					this.selector=res.data.data
-					this.getList()
+					this.getList(true)
 				}
 			})
 		},
@@ -222,23 +225,23 @@
 				this.searchKeyWord=''
 				this.gridList=[]
 				this.currentPage=1
-				this.getList()
+				this.getList(true)
 			},
 			doSearch(){
 				this.gridList=[]
 				this.currentPage=1
-				this.getList()
+				this.getList(true)
 			},
-			warehousechange(e){debugger
+			warehousechange(e){
 				this.warehouseName=this.selector[e[0]].warehouseName
 				this.cangid=this.selector[e[0]].id
 				this.warehouseCount = this.selector[e[0]].count
 				this.commonWarehouseNo=this.selector[e[0]].commonWarehouseNo
 				uni.setStorageSync('purchasePriceList',this.selector[e[0]].purchasePriceList)
-				this.getList()
+				this.getList(true)
 				console.log(e)
 			},
-			getList(){
+			getList(flag){
 				var that = this
 				this.$api.doRequest('get', 'qualityInspectionManagement/selectQualityInspection',{
 					pageSize: this.pageSize,
@@ -254,7 +257,12 @@
 						let data = res.data.data.records
 						//采购信息
 						if (data.length > 0) {
+							if(flag){
+								that.gridList = data
+							}
+							else{
 								that.gridList = that.gridList.concat(data)
+							}
 						}else{
 							if(this.currentPage==1){
 								that.gridList=[]

+ 13 - 7
pages/grain_pulse/home.vue

@@ -147,6 +147,7 @@
 			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
 				this.isLoadMore = true
 				this.currentPage += 1
+				console.log("currentPage",this.currentPage)
 				this.getData()
 			}
 		 },
@@ -218,6 +219,7 @@
 				uni.showLoading({
 					title:"正在加载"
 				}) 
+				
 				this.$api.doRequest('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
 					mainBusinessType: this.mainBusinessType,
 					pageSize: this.pageSize,
@@ -230,11 +232,12 @@
 						var data = res.data.data.records
 						if(data.length > 0){
 							this.datalist = this.datalist.concat(data)
-							console.log(this.position)
-							let lat2 =this.position.location.split(',')[1];
-							let lng2 = this.position.location.split(',')[0];
-							for(var i=0;i<this.datalist.length;i++){
-								this.datalist[i]._metre=this.utils.getDistance(this.datalist[i].latitude,this.datalist[i].longitude,lat2,lng2)
+							if(this.position&&this.position.location){
+								let lat2 =this.position.location.split(',')[1];
+								let lng2 = this.position.location.split(',')[0];
+								for(var i=0;i<this.datalist.length;i++){
+									this.datalist[i]._metre=this.utils.getDistance(this.datalist[i].latitude,this.datalist[i].longitude,lat2,lng2)
+								}
 							}
 							if(this.currentPage==1&&this.datalist.length==0){
 								this.notlist=true
@@ -245,8 +248,10 @@
 							that.isLoadMore=false
 						}
 						else{
-							if(that.currentPage>1){that.currentPage-=1}						
-							that.isLoadMore=true
+							if (that.currentPage > 1) {
+								that.currentPage -= 1
+							}
+							that.isLoadMore = true
 							that.loadStatus = 'nomore'
 						}
 						
@@ -254,6 +259,7 @@
 					}
 					uni.hideLoading()
 				}).catch(res => {
+							debugger
 					that.isLoadMore=false
 					that.loadStatus = 'nomore'
 					if(that.currentPage>1){that.currentPage=1}