浏览代码

前端小程序 sdy

zhongtianhaoyuan 3 年之前
父节点
当前提交
f9839892a6

+ 1 - 1
pages/erp/contactCustomerService/contactCustomerService.vue

@@ -80,7 +80,7 @@
 				if (res.data.data == "INVALID") {
 					uni.showModal({
 						title: '登录提示',
-						content: 'Session过期需要重新登录,是否立即登录?',
+						content: '当前登入信息验证失败,是否重新登录?',
 						showCancel: true,
 						confirmText: '登录',
 						success: (e) => {

+ 1 - 1
pages/erp/demo.vue

@@ -50,7 +50,7 @@
 				if (res.data.data == "INVALID") {
 					uni.showModal({
 						title: '登录提示',
-						content: 'Session过期需要重新登录,是否立即登录?',
+						content: '当前登入信息验证失败,是否重新登录?',
 						showCancel: true,
 						confirmText: '登录',
 						success: (e) => {

+ 18 - 4
pages/erp/exWarehousing/exWarehousing.vue

@@ -73,12 +73,12 @@
 				<u-picker v-model="show7" mode="time" @confirm='dateChange($event)' :params="params">
 				</u-picker>
 			</view>
-			<view class="row">
+			<view class="row row-bottom">
 				<view class="left">出库类型</view>
-				<view @click='show5=true'>{{detailData.inOutType}}</view>
-				<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
+				<input v-model='detailData.inOutType' class="right-bottom" :disabled="isSelectType"></input>
+			<!-- 	<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
 					v-model="show5" mode="selector">
-				</u-picker>
+				</u-picker> -->
 			</view>
 			<view class="row row-bottom">
 				<view class="left">车牌号</view>
@@ -160,6 +160,7 @@
 				show6: false,
 				show7: false,
 				isPC: true,
+				isSelectType:true,
 				// contractNoList: [{
 				// 	contractNo: ""
 				// }],
@@ -225,9 +226,22 @@
 		},
 		onShow() {
 			let _data = uni.getStorageSync('erpContractNoCK') == '' ? {} : uni.getStorageSync('erpContractNoCK')
+			console.log("当前合同",_data)
 			this.binNumber = helper.erpWarehouse.binNumber
 			this.warehouseName = helper.erpWarehouse.warehouseName
 			this.detailData.goodsName = _data.goodsName;
+			this.detailData.inOutType = _data.inOutType;
+			if (this.detailData.inOutType == '销售出库') {
+				this.detailData.inOutTypeKey = 1
+			} else if (this.detailData.inOutType == '移库出库') {
+				this.detailData.inOutTypeKey = 3
+			} else if (this.detailData.inOutType == '暂存出库') {
+				this.detailData.inOutTypeKey = 4
+			} else if (this.detailData.inOutType == '贸易服务出库') {
+				this.detailData.inOutTypeKey = 5
+			} else if (this.detailData.inOutType == '采购出库') {
+				this.detailData.inOutTypeKey = 6
+			}
 			if (_data.contractNo) {
 				this.detailData.contractNo = _data.contractNo;
 			}

+ 1 - 1
pages/erp/exWarehousing/selectCarNo.vue

@@ -48,7 +48,7 @@
 			}
 		},
 		methods: {
-			confirm(item){
+			confirm(item){debugger
 				uni.setStorageSync('erpcarNoListCK', item);
 				uni.setStorageSync('ContractNoCarCK',item.carNo);
 				uni.navigateBack({})

+ 11 - 0
pages/erp/improvedExWaehousing/improvedExWaehousingDetail.vue

@@ -233,6 +233,17 @@
 			// this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
 			// this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
 			this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
+			if (this.detailData.inOutType == '销售出库') {
+				this.detailData.inOutTypeKey = 1
+			} else if (this.detailData.inOutType == '移库出库') {
+				this.detailData.inOutTypeKey = 3
+			} else if (this.detailData.inOutType == '暂存出库') {
+				this.detailData.inOutTypeKey = 4
+			} else if (this.detailData.inOutType == '贸易服务出库') {
+				this.detailData.inOutTypeKey = 5
+			} else if (this.detailData.inOutType == '采购出库') {
+				this.detailData.inOutTypeKey = 6
+			}
 			if (!this.detailData.contractNo) {
 				this.detailData.contractNo = '请选择合同编号'
 			}

+ 3 - 0
pages/erp/improvedWrehousing/improvedWrehousing.vue

@@ -107,6 +107,9 @@
 				this.getList()
 			},
 			goDetail(val) {
+				 // uni.setStorageSync('erpContractNoList',val)
+				  uni.setStorageSync('erpContractNo',val)
+				  uni.setStorageSync('ContractNoCar',val.carNo)
 				uni.navigateTo({
 					url: '/pages/erp/improvedWrehousing/improvedWrehousingDetail?data=' + JSON.stringify(val),
 				})

+ 79 - 34
pages/erp/improvedWrehousing/improvedWrehousingDetail.vue

@@ -83,9 +83,9 @@
 				<u-picker v-model="show4" mode="time" @confirm='dateChange($event)' :params="params">
 				</u-picker>
 			</view>
-			<view class="row">
+			<view class="row row-bottom">
 				<view class="left">入库类型</view>
-				<view @click='show5=true'>{{detailData.inOutType}}</view>
+				<input v-model='detailData.inOutType' class="right-bottom" @click="show5=true" :disabled="isSelectType"></input>
 				<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
 					v-model="show5" mode="selector">
 				</u-picker>
@@ -175,6 +175,8 @@
 		},
 		data() {
 			return {
+				isSelectType:true,
+				imgUrl: [],
 				show: false,
 				show1: false,
 				show2: false,
@@ -214,7 +216,7 @@
 					}
 				],
 				handlerList: [],
-				warehousingTypeList: [],
+				warehousingTypeList: [{constValue:'移库入库'},{constValue:'退库'}],
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
@@ -235,13 +237,13 @@
 					tare: 0,
 					deductionAmount: 0,
 					netWeight: 0,
-					warehouseInOutDetail: {}
+					warehouseInOutDetail: {},
 				},
-				imgUrl: []
+				
 			}
 		},
 		onLoad(options) {
-			this.detailData = JSON.parse(options.data)
+			this.detailData =JSON.parse(options.data)
 			this.netWeight = this.detailData.netWeight
 			this.binNumber = this.detailData.binNumber
 			this.warehouseName = this.detailData.warehouseName
@@ -256,28 +258,42 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		onShow() {
+			this.getContractNoList();
 			if (this.detailData.inOutType == '采购入库'&&this.detailData.status!='已暂存') {
-				this.detailData.freight = 0
+				// this.detailData.freight = 0
+			}else if(this.detailData.inOutType == '移库入库'){
+				this.isSelectType = true
+			}
+			if (this.detailData.inOutType == '采购入库') {
+				this.detailData.inOutTypeKey = 1
+			} else if (this.detailData.inOutType == '移库入库') {
+				this.detailData.inOutTypeKey = 3
+			} else if (this.detailData.inOutType == '暂存入库') {
+				this.detailData.inOutTypeKey = 4
+			} else if (this.detailData.inOutType == '贸易服务入库') {
+				this.detailData.inOutTypeKey = 5
+			} else if (this.detailData.inOutType == '退库') {
+				this.detailData.inOutTypeKey = 6
 			}
-			if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
-			if (!this.detailData.contractNo) {
-				this.detailData.contractNo = '请选择合同编号'
-			} else {
-				if (this.detailData.tranCarInfoList.length == 0) {
-					this.isPC = false
-				}
+			
+			// if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
+			// if (!this.detailData.contractNo) {
+			// 	this.detailData.contractNo = '请选择合同编号'
+			// } else {
+			// 	if (this.detailData.tranCarInfoList.length == 0) {
+			// 		this.isPC = false
+			// 	}
+			// }
+			// if (!this.detailData.goodsName) {
+			// 	this.detailData.goodsName = '货名'
+			// }
+			let _data = uni.getStorageSync('erpContractNo').contractNo
+			
+			console.log("当前合同",uni.getStorageSync('erpContractNo'))
+			if(_data){
+				 this.detailData.contractNo = _data
 			}
-			if (!this.detailData.goodsName) {
-				this.detailData.goodsName = '货名'
-			}
-			let _data = uni.getStorageSync('erpContractNo')==''?{}:uni.getStorageSync('erpContractNo')
-		     this.detailData.contractNo = _data.contractNo
-			if (!_data.tranCarInfoList){
-				this.isPC = false
-					this.detailData.carNo = ""
-				_data.tranCarInfoList = []
-			} else{
-				this.isPC = true
+				
 				if(uni.getStorageSync('ContractNoCar')){
 					this.detailData.carNo = uni.getStorageSync('ContractNoCar')
 					this.$api.doRequest('get', '/warehouseBaseInfo/selectCost', {
@@ -289,17 +305,11 @@
 						}
 					})
 				}else{
-					this.detailData.carNo = _data.tranCarInfoList[0].carNo
-				}
-			}
-			if(this.detailData.carNo){
-				for(let i = 0 ; i < uni.getStorageSync('erpContractNo').tranCarInfoList.length ;i++){
-					if(uni.getStorageSync('erpContractNo').tranCarInfoList[i].carNo == this.detailData.carNo)
-					this.detailData.tranCarNo = uni.getStorageSync('erpContractNo').tranCarInfoList[i].tranCarNo
+					// this.detailData.carNo = uni.setStorageSync('erpContractNoList')[0].carNo
 				}
-			}
+			
 			// 获取入库类型
-			this.getrkType()
+			// this.getrkType()
 			//获取经办人
 			this.getPerson()
 		},
@@ -309,6 +319,41 @@
 			},
 		},
 		methods: {
+			getContractNoList() {
+				this.imgUrl = []
+				this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
+					compId: this.compId,
+					flag: 7,
+				}).then(res => {
+					if (res.data.code == 200) {
+						console.log(res.data.data)
+						console.log(this.id)
+						for (let i = 0; i < res.data.data.length; i++) {
+							console.log(this.contractNo)
+							if (res.data.data[i].contractNo == this.detailData.contractNo) {
+								if (res.data.data[i].tranCarInfoList) {
+									this.isPC = true
+									uni.setStorageSync('erpContractNoCarList', res.data.data[i].tranCarInfoList);
+									
+									if(this.detailData.carNo){
+									console.log(uni.getStorageSync('erpContractNoCarList'))
+										for(let i = 0 ; i < uni.getStorageSync('erpContractNoCarList').length;i++){
+											console.log(uni.getStorageSync('erpContractNoCarList'))
+											if(uni.getStorageSync('erpContractNoCarList')[i].carNo == this.detailData.carNo)
+											this.detailData.tranCarNo = uni.getStorageSync('erpContractNoCarList')[i].tranCarNo
+										}
+									}
+									// uni.setStorageSync('erpContractNoList', res.data.data[i].tranCarInfoList);
+									// this.detailData.tranCarInfoList = res.data.data[i].tranCarInfoList
+								} else {
+									this.isPC = false
+								}
+							}
+						}
+					}
+				})
+			
+			},
 			//计算纯重
 			pureWeightCount() {
 				if (this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this

+ 2 - 2
pages/erp/index.vue

@@ -36,7 +36,7 @@
 		</view>
 		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
 			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='立即开通'
-			title='您尚未开通ERP业务' :content="content" @confirm="goOpenService"></u-modal>
+			title='您尚未开通ERP业务' showCancelButton='false' :content="content" @confirm="goOpenService"></u-modal>
 	</view>
 </template>
 <script>
@@ -156,7 +156,7 @@
 				if (res.data.data == "INVALID") {
 					uni.showModal({
 						title: '登录提示',
-						content: 'Session过期需要重新登录,是否立即登录?',
+						content: '当前登入信息验证失败,是否重新登录?',
 						showCancel: true,
 						confirmText: '登录',
 						success: (e) => {

+ 1 - 1
pages/erp/openService/openService.vue

@@ -80,7 +80,7 @@
 				if (res.data.data == "INVALID") {
 					uni.showModal({
 						title: '登录提示',
-						content: 'Session过期需要重新登录,是否立即登录?',
+						content: '当前登入信息验证失败,是否重新登录?',
 						showCancel: true,
 						confirmText: '登录',
 						success: (e) => {

+ 1 - 1
pages/erp/warehousing/selectCarNo.vue

@@ -32,7 +32,7 @@
 			}
 		},
 		onShow() {
-			this.newList = uni.getStorageSync('erpContractNo').tranCarInfoList
+			this.newList = uni.getStorageSync('erpContractNoCarList')
 			this.contractNo = uni.getStorageSync('erpContractNo').contractNo
 		},
 		onLoad(options) {

+ 32 - 7
pages/erp/warehousing/warehousing.vue

@@ -82,9 +82,9 @@
 				<u-picker v-model="show4" mode="time" @confirm='dateChange($event)' :params="params">
 				</u-picker>
 			</view>
-			<view class="row">
+			<view class="row row-bottom">
 				<view class="left">入库类型</view>
-				<view @click='show5=true'>{{detailData.inOutType}}</view>
+				<input v-model='detailData.inOutType' class="right-bottom" :disabled="isSelectType" @click="selectType"></input>
 				<u-picker :range="warehousingTypeList" range-key="constValue" @confirm='warehousingTypePicker($event)'
 					v-model="show5" mode="selector">
 				</u-picker>
@@ -184,6 +184,7 @@
 				show5: false,
 				show6: false,
 				isPC: true,
+				isSelectType:true,
 				params: {
 					year: true,
 					month: true,
@@ -215,7 +216,7 @@
 					}
 				],
 				handlerList: [],
-				warehousingTypeList: [],
+				warehousingTypeList: [{constValue:'移库入库'},{constValue:'退库'}],
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
@@ -250,12 +251,25 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		onShow() {
+		console.log("当前合同",uni.getStorageSync('erpContractNo'))
 			let _data = uni.getStorageSync('erpContractNo')==''?{}:uni.getStorageSync('erpContractNo')
 			if(helper.erpWarehouse.personCharge)
 			this.detailData.agent = helper.erpWarehouse.personCharge
 			this.detailData.goodsName = _data.goodsName;
 			this.detailData.contractNo = _data.contractNo;
 			this.detailData.goodsNameKey = _data.goodsNameKey;
+			this.detailData.inOutType = _data.inOutType;
+			if (this.detailData.inOutType == '采购入库') {
+				this.detailData.inOutTypeKey = 1
+			} else if (this.detailData.inOutType == '移库入库') {
+				this.detailData.inOutTypeKey = 3
+			} else if (this.detailData.inOutType == '暂存入库') {
+				this.detailData.inOutTypeKey = 4
+			} else if (this.detailData.inOutType == '贸易服务入库') {
+				this.detailData.inOutTypeKey = 5
+			} else if (this.detailData.inOutType == '退库') {
+				this.detailData.inOutTypeKey = 6
+			}
 			if(_data.unitContractPrice) {
 				this.detailData.cost = _data.unitContractPrice
 			}
@@ -264,8 +278,14 @@
 			this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
 			if (_data.inOutType == '采购入库') {
 				this.detailData.freight = 0
-			}else{this.detailData.freight = uni.getStorageSync('CarFreight')}
 				
+			}else if(_data.inOutType == '移库入库'){
+				this.isSelectType = false
+			}
+			else{
+				this.detailData.freight = uni.getStorageSync('CarFreight')
+				this.isSelectType = true
+			}
 			if (!_data.tranCarInfoList){
 				this.isPC = false
 				this.detailData.carNo = ""
@@ -273,6 +293,8 @@
 				_data.tranCarInfoList = []
 			} else{
 				this.isPC = true
+				uni.setStorageSync('erpContractNoCarList', _data.tranCarInfoList);
+				this.detailData.freight=uni.getStorageSync('erpcarNo').tranPrice
 				if(uni.getStorageSync('ContractNoCar')){
 					this.detailData.carNo = uni.getStorageSync('ContractNoCar')
 					this.$api.doRequest('get', '/warehouseBaseInfo/selectCost', {
@@ -305,7 +327,7 @@
 				this.detailData.goodsName = '货名'
 			}
 			// 获取入库类型
-			this.getrkType()
+			// this.getrkType()
 			//获取经办人
 			this.getPerson()
 
@@ -316,6 +338,10 @@
 			},
 		},
 		methods: {
+			selectType(){
+				if(this.isSelectType) return
+				this.show5 = true
+			},
 			//计算纯重
 			pureWeightCount() {
 				if (this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this
@@ -499,7 +525,7 @@
 					this.$api.msg('扣重输入错误!')
 					return
 				}
-				if (this.detailData.tare > this.detailData.grossWeight) {
+				if (Number(this.detailData.tare) > Number(this.detailData.grossWeight)) {
 					this.$api.msg('皮重不能大于毛重')
 					return
 				}
@@ -742,7 +768,6 @@
 					this.detailData.statusFlag = 3
 					title = "提交成功"
 				}
-				return
 				let that = this
 				uni.showModal({
 					content: "确定提交入库信息?",

+ 13 - 1
pages/erpbusiness/acquisitionInspection/acquisitionInspection.vue

@@ -164,12 +164,14 @@
 						that.warehouseId =  that.warehouseList[0].value
 						that.cangid =  that.warehouseList[0].value
 					}
-					
 					this.getList(true)
 				})
 			},
 			//获取列表
 			getList(flag) {
+				uni.showLoading({
+					title:"正在加载"
+				})
 				this.$api.doRequest('get', '/weighingManagement/selectWeighingManagement', {
 					compId: '',
 					currentPage: this.currentPage,
@@ -190,6 +192,16 @@
 					}
 					console.log("--------------------------------")
 					console.log("this.dataList",this.dataList)
+					
+					uni.hideLoading()
+				})
+				.catch(res => {
+					uni.showToast({
+						title: '系统异常,请联系管理员',
+						icon: 'none',
+						duration: 2000
+					})
+					uni.hideLoading()
 				})
 			},
 			selectWarehouse() {

+ 1 - 1
pages/erpbusiness/acquisitionInspection/add_check_the_weight.vue

@@ -43,7 +43,7 @@
 			</view>
 			<view class="row row-bottom">
 				<view class="left">皮重(公斤)</view>
-				<input class="right-bottom" placeholder="输入皮重"></input>
+				<input class="right-bottom" v-model="detailData.tare" placeholder="输入皮重"></input>
 			</view>
 		</div>
 		<!-- <u-select v-model="isShowContractNo" :list="contractNoList" @confirm="confirmContractNo"></u-select> -->

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

@@ -40,9 +40,9 @@
 				<view class="left">皮重(公斤)</view>
 				<input class="right-bottom" placeholder="输入皮重" @input="changeInput" v-model="detailData.tare"></input>
 			</view>
-			<view class="row row-bottom">
-				<view class="left">扣(公斤)</view>
-				<input class="right-bottom" placeholder="输入扣" @input="changeInput" v-model="detailData.buckleMiscellaneous"></input>
+			<view v-if="detailData.qualityInspectionManagement.paramType == '2'" class="row row-bottom">
+				<view class="left">扣(公斤)</view>
+				<input class="right-bottom" placeholder="输入扣" @input="changeInput" v-model="detailData.buckleMiscellaneous"></input>
 			</view>
 			<view class="row row-bottom" style="border: 0;">
 				<view class="left">净重(公斤)</view>

+ 43 - 9
pages/erpbusiness/add_quality_testing.vue

@@ -32,13 +32,20 @@
 						 name="input"></input>
 				</view>
 			</view>
-			<view class="c-row ">
+			<view v-if="gridList.paramType != '1'" class="c-row ">
 				<view class="title">扣重比</view>
 				<view class="con-list">
 					<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
 						 name="input"></input>
 				</view>
 			</view>
+			<view v-else class="c-row ">
+				<view class="title">扣杂</view>
+				<view class="con-list">
+					<input v-model='gridList.buckleMiscellaneous' placeholder="请输入扣杂" @input="waterContentChange"
+						 name="input"></input>
+				</view>
+			</view>
 			<view class="c-row ">
 				<view class="title">购粮性质</view>
 				<view class="con-list">
@@ -198,7 +205,8 @@
 					natureOfGrainPurchase:'贸易粮',
 					type:'潮粮',
 					tidalGrainPrice:'',
-					dryGrainPrice:''
+					dryGrainPrice:'',
+					buckleMiscellaneous:0
 				},
 				typeList:['潮粮','干粮'],
 				managementType:'',
@@ -256,11 +264,18 @@
 			 number = number.substring(number.length - 4, number.length)
 			this.gridList.warehouseName=options.warehouseName
 			this.gridList.qualityNo='SGRK' + this.getdate() + this.commonWarehouseNo + number
-			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
 			this.cangid=options.cangid
+			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName',{
+				warehouseId:this.cangid
+			}).then(res => {
+				if(res.data.data){
+					
+				}
+			})
 			this.managementType=options.managementType
 		},
 		onShow() {
+			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
 			if(uni.getStorageSync('checkcustomer')){
 				this.gridList.customerName=uni.getStorageSync('checkcustomer').customerName
 				this.gridList.customerPhone=uni.getStorageSync('checkcustomer').customerPhone
@@ -286,10 +301,12 @@
 					warehouseId:this.cangid
 				}).then(res => {
 					if(res.data.data){
-						this.goodsList = res.data.data
-						if(this.goodsList.length > 0){
-							this.gridList.goodsName=this.goodsList[0].goodsName
-							this.waterContentChange()
+						that.goodsList = res.data.data
+						if(that.goodsList.length > 0){
+							that.gridList.goodsName=that.goodsList[0].goodsName
+							uni.setStorageSync('purchasePriceList',that.goodsList)
+							that.purchasePriceList=uni.getStorageSync('purchasePriceList')
+							that.waterContentChange()
 						}
 						
 						// for (let i = 0; i < res.data.data.length; i++) {
@@ -308,10 +325,20 @@
 		methods: {
 			waterContentChange() {
 				var that = this
+				if(this.gridList.goodsName && this.cangid){
+					this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
+						warehouseId:this.cangid,
+						goodsName:this.gridList.goodsName
+					}).then(res => {
+						that.gridList.dryGrainPrice = res.data.data
+					})
+				}
+				
 				if (this.gridList.goodsName) {
 				  for (var i = 0; i < this.purchasePriceList.length; i++) {
 					if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
 					  this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
+					  this.gridList.paramType = this.purchasePriceList[i].paramType
 					}
 				  }
 				}
@@ -330,13 +357,20 @@
 						waterContent: this.gridList.waterContent,
 						grade: this.gridList.grade,
 					}).then(res => {
-						that.gridList.tidalGrainPrice = res.data.data
+						if(that.gridList.paramType == '1'){
+							that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that.gridList.buckleMiscellaneous)/100*parseFloat(that.gridList.dryGrainPrice)).toFixed(4)
+							if(!that.gridList.tidalGrainPrice){
+								that.gridList.tidalGrainPrice = ''
+							}
+						}else{
+							that.gridList.tidalGrainPrice = res.data.data
+						}
 					})
 				}
 			},
 			gocustomer(){
 				uni.navigateTo({
-					url:'/pages/erpbusiness/customer'
+					url:'/pages/erpbusiness/customer?cangid='+this.cangid
 				})
 			},
 			getdate() {

+ 17 - 12
pages/erpbusiness/customer.vue

@@ -84,9 +84,6 @@
 				cangid:''
 				
 			}
-		},
-		onLoad() {
-			
 		},
 		// #ifndef MP
 		onNavigationBarButtonTap(e) {
@@ -119,9 +116,18 @@
 			}
 		},
 		onLoad(options){
-			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
+			this.cangid = options.cangid
+			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName',{
+				warehouseId:this.cangid
+			}).then(res => {
+				if(res.data.data){
+					uni.setStorageSync('purchasePriceList',res.data.data)
+					this.purchasePriceList=uni.getStorageSync('purchasePriceList')
+				}
+			})
 		},
 		onShow() {
+			this.purchasePriceList=uni.getStorageSync('purchasePriceList')
 			this.gridList=[]
 			this.$api.doRequest('get', '/searchRecordsInfo/selectSearchRecordsInfo',{
 				pageSize:this.pageSize,
@@ -155,7 +161,6 @@
 				
 				var that = this
 				var count=''
-				
 				if(item.authenticationStatus=='已认证'){
 					uni.showLoading({title: '加载中'})
 					that.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{
@@ -211,27 +216,27 @@
 				var count=''
 				var that = this
 				var name=item.searchContent.split('(')[0]
-				
 				for(var i=0;i<this.customerList.length;i++){
 					// console.log(name,this.customerList[i].customerName,name==this.customerList[i].customerName)
 					if(this.customerList[i].customerName==name){
+						var tmpName = this.customerList[i].customerName
 						uni.showLoading({title: '加载中'})
 						that.$api.doRequest('post', '/searchRecordsInfo/api/addInfo',{
 							commonId:that.userInfo.id,
 							searchContent:this.customerList[i].customerName+'('+this.customerList[i].customerPhone+')',
 							functionType:3
 						}).then(res => {
-							uni.setStorageSync('checkcustomer',this.customerList[i])
+							uni.setStorageSync('checkcustomer',tmpName)
 							that.$api.doRequest('get', '/qualityInspectionManagement/api/settledCount',{
 								compId:'',
-								customerName: that.customerList[i].customerName,
+								customerName: tmpName,
 								goodsName: uni.getStorageSync('goodsName'),
 							}).then(res => {
 								if(res.data.code==200){
 									count=res.data.data
 									that.$api.doRequest('get', '/paymentManagement/cumulant',{
 										compId:'',
-										customerName: that.customerList[i].customerName,
+										customerName: tmpName,
 										goodsName: uni.getStorageSync('goodsName'),
 									}).then(res => {
 										for (let i = 0; i < that.purchasePriceList.length; i++) {
@@ -245,9 +250,9 @@
 									})
 								}
 							})
-							that.show=false
-							uni.navigateBack()							
-							uni.hideLoading()
+							that.show=false					
+							uni.hideLoading()								
+							uni.navigateBack()
 						})
 						.catch(res => {
 							uni.showToast({

+ 33 - 2
pages/erpbusiness/edit_quality_testing.vue

@@ -27,13 +27,20 @@
 						 name="input"></input>
 				</view>
 			</view>
-			<view class="c-row ">
+			<view v-if="gridList.paramType != '1'" class="c-row ">
 				<view class="title">扣重比</view>
 				<view class="con-list">
 					<input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
 						 name="input"></input>
 				</view>
 			</view>
+			<view v-else class="c-row ">
+				<view class="title">扣杂</view>
+				<view class="con-list">
+					<input v-model='gridList.buckleMiscellaneous' placeholder="请输入扣杂" @input="waterContentChange"
+						 name="input"></input>
+				</view>
+			</view>
 			<view class="c-row ">
 				<view class="title">购粮性质</view>
 				<view class="con-list">
@@ -253,6 +260,23 @@
 		methods: {
 			waterContentChange() {
 				var that = this
+				if(this.gridList.goodsName && this.cangid){
+					this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
+						warehouseId:this.cangid,
+						goodsName:this.gridList.goodsName
+					}).then(res => {
+						that.gridList.dryGrainPrice = res.data.data
+					})
+				}
+				
+				if (this.gridList.goodsName) {
+				  for (var i = 0; i < this.purchasePriceList.length; i++) {
+					if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
+					  this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
+					  this.gridList.paramType = this.purchasePriceList[i].paramType
+					}
+				  }
+				}
 				var numReg = /^[0-9]*$/
 				var numRe = new RegExp(numReg)
 				//潮粮单价改变事件
@@ -268,7 +292,14 @@
 						waterContent: this.gridList.waterContent,
 						grade: this.gridList.grade,
 					}).then(res => {
-						that.gridList.tidalGrainPrice = res.data.data
+						if(that.gridList.paramType == '1'){
+							that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that.gridList.buckleMiscellaneous)/100*parseFloat(that.gridList.dryGrainPrice)).toFixed(4)
+							if(!that.gridList.tidalGrainPrice){
+								that.gridList.tidalGrainPrice = ''
+							}
+						}else{
+							that.gridList.tidalGrainPrice = res.data.data
+						}
 					})
 				}
 			},

+ 1 - 1
pages/erpbusiness/index.vue

@@ -174,7 +174,7 @@
 				if (res.data.data == "INVALID") {
 					uni.showModal({
 						title: '登录提示',
-						content: 'Session过期需要重新登录,是否立即登录?',
+						content: '当前登入信息验证失败,是否重新登录?',
 						showCancel: true,
 						confirmText: '登录',
 						success: (e) => {

+ 15 - 3
pages/erpbusiness/quality_testing.vue

@@ -212,7 +212,7 @@
 						  that.warehouseName = list[i].warehouseName
 						  that.warehouseCount =  list[i].count
 						  that.commonWarehouseNo =  list[i].commonWarehouseNo
-						  uni.setStorageSync('purchasePriceList',list[i].purchasePriceList)
+						  // uni.setStorageSync('purchasePriceList',list[i].purchasePriceList)
 						  break
 						} 
 					}
@@ -222,7 +222,7 @@
 						that.warehouseCount =  that.selector[0].count
 						that.commonWarehouseNo =  that.selector[0].commonWarehouseNo
 						that.cangid =  that.selector[0].id
-						uni.setStorageSync('purchasePriceList',that.selector[0].purchasePriceList)
+						// uni.setStorageSync('purchasePriceList',that.selector[0].purchasePriceList)
 					}
 					this.getList(true)
 				}
@@ -256,12 +256,15 @@
 				uni.setStorageSync("cangid",this.cangid)
 				this.warehouseCount = this.selector[e[0]].count
 				this.commonWarehouseNo=this.selector[e[0]].commonWarehouseNo
-				uni.setStorageSync('purchasePriceList',this.selector[e[0]].purchasePriceList)
+				// uni.setStorageSync('purchasePriceList',this.selector[e[0]].purchasePriceList)
 				this.getList(true)
 				console.log(e)
 			},
 			getList(flag){
 				var that = this
+				uni.showLoading({
+					title:"正在加载"
+				})
 				this.$api.doRequest('get', 'qualityInspectionManagement/selectQualityInspection',{
 					pageSize: this.pageSize,
 					currentPage: this.currentPage,
@@ -272,6 +275,7 @@
 					compId:'',
 					// pcFlag:1
 				}).then(res => {
+					uni.hideLoading()
 					if(res.data.data){
 						let data = res.data.data.records
 						//采购信息
@@ -291,6 +295,14 @@
 					}
 					// console.log(that.gridList)
 				})
+				.catch(res => {
+					uni.showToast({
+						title: '系统异常,请联系管理员',
+						icon: 'none',
+						duration: 2000
+					})
+					uni.hideLoading()
+				})
 			},
 			edit(item){
 				uni.navigateTo({

+ 1 - 1
pages/grain_pulse/my_grain_pulse.vue

@@ -180,7 +180,7 @@
 					},
 				})
 			},
-			edit(item){debugger
+			edit(item){
 				if(item.status=='已驳回'||item.status=='待审核'){
 					uni.navigateTo({
 						url:'/pages/grain_pulse/editcompany?id='+item.id

+ 1 - 2
pages/task/my_task.vue

@@ -76,7 +76,7 @@
 				if (res.data.data == "INVALID") {
 					uni.showModal({
 						title: '登录提示',
-						content: 'Session过期需要重新登录,是否立即登录?',
+						content: '当前登入信息验证失败,是否重新登录?',
 						showCancel: true,
 						confirmText: '登录',
 						success: (e) => {
@@ -295,7 +295,6 @@
 				this.getIndexBuyData(1)
 			},
 			navToDetailPage(item) {
-				console.log(item.businessCode)
 				if (item.businessCode == 'PROCUREMENT-ORDER-APPROVE') {
 					uni.navigateTo({
 						url: '/pages/task/procurement_details?id=' + item.businessId