Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

# Conflicts:
#	config/index.js
ccjgmwz 3 years ago
parent
commit
ff087b865a

+ 1 - 0
common/directive.js

@@ -12,6 +12,7 @@ const permission = (el, binding) => {
 	  }
 	  }
 }
 }
 const getRoles = ()=>{
 const getRoles = ()=>{
+	debugger
 	let _roles = uni.getStorageSync('jurisdiction');
 	let _roles = uni.getStorageSync('jurisdiction');
 	let list = uni.getStorageSync('rolesList');
 	let list = uni.getStorageSync('rolesList');
 	if(list&&list.length > 0){
 	if(list&&list.length > 0){

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

@@ -102,9 +102,8 @@
 										) {
 										) {
 											let count = (that.purchasePriceList[i].saleLimit -
 											let count = (that.purchasePriceList[i].saleLimit -
 												res.data.data / 1000).toFixed(2)
 												res.data.data / 1000).toFixed(2)
-											if (count <= 0) {
-												count = 0
-												that.$api.msg('该客户累计销售' + this.detailData.goodsName + (
+											if (Number(count) - that.detailData.grossWeight / 1000 <= 0) {
+												that.$api.msg('该客户累计销售' + that.detailData.goodsName + (
 														res.data.data / 1000).toFixed(2) +
 														res.data.data / 1000).toFixed(2) +
 													'吨,还可售粮' +
 													'吨,还可售粮' +
 													count + '吨', )
 													count + '吨', )

+ 36 - 17
pages/erpbusiness/add_quality_testing.vue

@@ -212,7 +212,7 @@
 				username: "请更改昵称",
 				username: "请更改昵称",
 				gridList: {
 				gridList: {
 					natureOfGrainPurchase: '贸易粮',
 					natureOfGrainPurchase: '贸易粮',
-					type: '潮粮',
+					type: '',
 					tidalGrainPrice: '',
 					tidalGrainPrice: '',
 					dryGrainPrice: '',
 					dryGrainPrice: '',
 					buckleMiscellaneous: '',
 					buckleMiscellaneous: '',
@@ -277,7 +277,6 @@
 			}
 			}
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
-
 			this.commonWarehouseNo = options.commonWarehouseNo
 			this.commonWarehouseNo = options.commonWarehouseNo
 			this.warehouseCount = Number(options.warehouseCount) + 1
 			this.warehouseCount = Number(options.warehouseCount) + 1
 			let number = '000' + this.warehouseCount
 			let number = '000' + this.warehouseCount
@@ -285,16 +284,19 @@
 			this.gridList.warehouseName = options.warehouseName
 			this.gridList.warehouseName = options.warehouseName
 			this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
 			this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
 			this.cangid = options.cangid
 			this.cangid = options.cangid
-			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
-				warehouseId: this.cangid
-			}).then(res => {
-				if (res.data.data) {
+			// this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
+			// 	warehouseId: this.cangid
+			// }).then(res => {
+			// 	if (res.data.data) {
+			// 		this.setGoodName([0])
 
 
-				}
-			})
+			// 	}
+			// })
 			this.managementType = options.managementType
 			this.managementType = options.managementType
 		},
 		},
 		onShow() {
 		onShow() {
+
+			let that = this
 			this.purchasePriceList = uni.getStorageSync('purchasePriceList')
 			this.purchasePriceList = uni.getStorageSync('purchasePriceList')
 			if (uni.getStorageSync('checkcustomer')) {
 			if (uni.getStorageSync('checkcustomer')) {
 
 
@@ -302,10 +304,10 @@
 				if (_customerInfo.shipperName) {
 				if (_customerInfo.shipperName) {
 					//点击登记客户
 					//点击登记客户
 					this.gridList.customerName = _customerInfo.shipperName
 					this.gridList.customerName = _customerInfo.shipperName
-					this.gridList.customerPhone =_customerInfo.shipperPhone
+					this.gridList.customerPhone = _customerInfo.shipperPhone
 				} else {
 				} else {
 					//点击搜索客户
 					//点击搜索客户
-					this.gridList.customerName =_customerInfo.customerName
+					this.gridList.customerName = _customerInfo.customerName
 					this.gridList.customerPhone = _customerInfo.customerPhone
 					this.gridList.customerPhone = _customerInfo.customerPhone
 				}
 				}
 
 
@@ -313,7 +315,6 @@
 			}
 			}
 			this.gridList.grade = this.gradeList[0].value
 			this.gridList.grade = this.gradeList[0].value
 			this.gridList.gradeKey = this.gradeList[0].key
 			this.gridList.gradeKey = this.gradeList[0].key
-			var that = this
 			this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
 			this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
 				compId: '',
 				compId: '',
 				authenticationStatusKey: 7
 				authenticationStatusKey: 7
@@ -335,6 +336,15 @@
 					that.goodsList = res.data.data
 					that.goodsList = res.data.data
 					if (that.goodsList.length > 0) {
 					if (that.goodsList.length > 0) {
 						that.gridList.goodsName = that.goodsList[0].goodsName
 						that.gridList.goodsName = that.goodsList[0].goodsName
+						if (that.goodsList[0].goodsName == '玉米') {
+							that.gridList.type = '干粮'
+							that.edit = true
+						} else if (that.goodsList[0].goodsName == '玉米(潮粮)') {
+							that.gridList.type = '潮粮'
+							that.edit = true
+						} else {
+							that.edit = false
+						}
 						uni.setStorageSync('purchasePriceList', that.goodsList)
 						uni.setStorageSync('purchasePriceList', that.goodsList)
 						that.purchasePriceList = uni.getStorageSync('purchasePriceList')
 						that.purchasePriceList = uni.getStorageSync('purchasePriceList')
 						that.waterContentChange()
 						that.waterContentChange()
@@ -354,7 +364,7 @@
 			})
 			})
 		},
 		},
 		methods: {
 		methods: {
-			confirmInfo(){
+			confirmInfo() {
 				this.isShowAlert = true
 				this.isShowAlert = true
 			},
 			},
 			alertBtn() {
 			alertBtn() {
@@ -540,11 +550,15 @@
 												that.gridList.goodsName == that.purchasePriceList[i]
 												that.gridList.goodsName == that.purchasePriceList[i]
 												.goodsName
 												.goodsName
 											) {
 											) {
+												debugger
 												let count = (that.purchasePriceList[i].saleLimit -
 												let count = (that.purchasePriceList[i].saleLimit -
 													response.data.data / 1000).toFixed(2)
 													response.data.data / 1000).toFixed(2)
-												if (count <= 0) {
+													console.log(count,that.purchasePriceList[i].saleLimit,
+													response.data.data)
+												
+												if (Number(count) <= 0) {
 													count = 0
 													count = 0
-													that.$api.msg('该客户累计销售' + this.gridList.goodsName + (
+													that.$api.msg('该客户累计销售' + that.gridList.goodsName + (
 															response.data.data / 1000).toFixed(2) +
 															response.data.data / 1000).toFixed(2) +
 														'吨,还可售粮' +
 														'吨,还可售粮' +
 														count + '吨', )
 														count + '吨', )
@@ -577,8 +591,8 @@
 				this.gridList.gradeKey = this.gradeList[e[0]].key
 				this.gridList.gradeKey = this.gradeList[e[0]].key
 				this.waterContentChange()
 				this.waterContentChange()
 			},
 			},
-			goodspicker(e) {
-				console.log(e)
+			setGoodName(e) {
+				// [e[0]] = 0
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
 				// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
 				if (this.goodsList[e[0]].goodsName == '玉米') {
 				if (this.goodsList[e[0]].goodsName == '玉米') {
 					this.gridList.type = '干粮'
 					this.gridList.type = '干粮'
@@ -596,11 +610,16 @@
 						warehouseId: this.cangid,
 						warehouseId: this.cangid,
 						goodsName: this.gridList.goodsName
 						goodsName: this.gridList.goodsName
 					}).then(res => {
 					}).then(res => {
-						that.gridList.dryGrainPrice = res.data.data
+						this.gridList.dryGrainPrice = res.data.data
 					})
 					})
 				}
 				}
 				this.waterContentChange()
 				this.waterContentChange()
 			},
 			},
+			goodspicker(e) {
+				console.log(e)
+				this.setGoodName(e)
+
+			},
 			typepicker(e) {
 			typepicker(e) {
 				var that = this
 				var that = this
 				this.gridList.type = this.typeList[e[0]]
 				this.gridList.type = this.typeList[e[0]]

+ 1 - 1
pages/erpbusiness/customer.vue

@@ -176,7 +176,7 @@
 			// 	authenticationStatusKey: 7,
 			// 	authenticationStatusKey: 7,
 			// 	searchKeyWord:''
 			// 	searchKeyWord:''
 			// }).then(res => {
 			// }).then(res => {
-			// 	if (res.data.data) {debugger
+			// 	if (res.data.data) {
 			// 		this.customerList = res.data.data
 			// 		this.customerList = res.data.data
 			// 	}
 			// 	}
 			// })
 			// })

+ 4 - 4
pages/erpbusiness/examine_quality_testing.vue

@@ -56,9 +56,9 @@
 			<view v-else class="c-row ">
 			<view v-else class="c-row ">
 				<view class="title">扣杂</view>
 				<view class="title">扣杂</view>
 				<view class="con-list">
 				<view class="con-list">
-					<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
+					<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input=""
 						name="input"></input>
 						name="input"></input>
-					<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
+					<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input=""
 						name="input"></input>
 						name="input"></input>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -118,9 +118,9 @@
 				<view class="c-row ">
 				<view class="c-row ">
 					<view class="title">水分(%)</view>
 					<view class="title">水分(%)</view>
 					<view class="con-list">
 					<view class="con-list">
-						<input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
+						<input v-model='gridList.waterContent' placeholder="初检水分" @input=""
 							name="input"></input>
 							name="input"></input>
-						<input v-model='gridList.reWaterContent' placeholder="复检水分" @input="waterContentChange"
+						<input v-model='gridList.reWaterContent' placeholder="复检水分" @input=""
 							name="input"></input>
 							name="input"></input>
 					</view>
 					</view>
 					<view class="con-list">
 					<view class="con-list">

+ 1 - 1
pages/user/user.vue

@@ -306,7 +306,7 @@
 					this.headUrl = this.userInfo.avatarUrl
 					this.headUrl = this.userInfo.avatarUrl
 				}
 				}
 				this.username = this.userInfo.userName?this.userInfo.userName:uni.getStorageSync("userInfo").data.userName
 				this.username = this.userInfo.userName?this.userInfo.userName:uni.getStorageSync("userInfo").data.userName
-								this.userphone = this.userInfo.phone?this.userInfo.phone:uni.getStorageSync("userInfo").data.phone
+				this.userphone = this.userInfo.phone?this.userInfo.phone:uni.getStorageSync("userInfo").data.phone
 				var that = this
 				var that = this
 				this.$api.doRequest('get', '/notice/query/noticeNumber').then(res => {
 				this.$api.doRequest('get', '/notice/query/noticeNumber').then(res => {
 					console.log("noticeNumber", res)
 					console.log("noticeNumber", res)