Browse Source

修改质检

wangchao 3 years ago
parent
commit
7bbc6a2580

+ 30 - 15
pages/erpbusiness/add_quality_testing.vue

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

+ 1 - 1
pages/erpbusiness/customer.vue

@@ -176,7 +176,7 @@
 			// 	authenticationStatusKey: 7,
 			// 	searchKeyWord:''
 			// }).then(res => {
-			// 	if (res.data.data) {debugger
+			// 	if (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 class="title">扣杂</view>
 				<view class="con-list">
-					<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
+					<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input=""
 						name="input"></input>
-					<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
+					<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input=""
 						name="input"></input>
 				</view>
 			</view>
@@ -118,9 +118,9 @@
 				<view class="c-row ">
 					<view class="title">水分(%)</view>
 					<view class="con-list">
-						<input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
+						<input v-model='gridList.waterContent' placeholder="初检水分" @input=""
 							name="input"></input>
-						<input v-model='gridList.reWaterContent' placeholder="复检水分" @input="waterContentChange"
+						<input v-model='gridList.reWaterContent' placeholder="复检水分" @input=""
 							name="input"></input>
 					</view>
 					<view class="con-list">