2 커밋 eca8af02ff ... cda72fff20

작성자 SHA1 메시지 날짜
  zhongtianhaoyuan cda72fff20 Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app 1 년 전
  zhongtianhaoyuan b9457c304e 大豆质检 1 년 전

+ 4 - 4
config/index.js

@@ -1,9 +1,9 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
-	// baseUrl: 'http://localhost:8080/',
+	// baseUrl: 'http://localhost:8090/',
 	// baseUrlNew: 'http://192.168.110.67:9100/',
-	// baseUrlNew: 'http://192.168.1.118:8090/',
-	// baseUrlNew: 'http://192.168.110.9:9888/',
+	// baseUrlNew: 'http://192.168.110.9:8099/',
+	baseUrlNew: 'http://192.168.110.9:9888/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// baseUrlNew: 'http://192.168.110.67:9888/',
 	// baseUrlNew: 'http://192.168.110.9:9888/',2.407
@@ -12,7 +12,7 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
-	baseUrlNew: 'https://api2.eliangeyun.com/',
+	// baseUrlNew: 'https://api2.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 84 - 14
pages/erpbusiness/add_quality_testing.vue

@@ -315,9 +315,8 @@
 							name="input" type="digit"></input> -->
 					</view>
 				</view>
-				<view class="c-row ">
-					<view v-show='gridList.goodsName!="大豆"' class="title">容重(克/升)</view>
-					<view v-show='gridList.goodsName=="大豆"' class="title">蛋白</view>
+				<view class="c-row" v-if="gridList.goodsName!='大豆'">
+					<view class="title">容重(克/升)</view>
 					<view class="con-list">
 						<MyNumberInput :myvalue="gridList.bulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
 							:myevent="'bulkDensity'" @setValue="mykeywordset" v-if="InputEvent=='bulkDensity'"
@@ -327,7 +326,18 @@
 						<!-- 	<input v-model='gridList.bulkDensity' placeholder="请输入容重" name="input" type="digit" @input="obtainPrice"></input> -->
 					</view>
 				</view>
-				<view class="c-row ">
+				<view class="c-row" v-else>
+					<view class="title">蛋白</view>
+					<view class="con-list">
+						<MyNumberInput :myvalue="gridList.protein" :Isedit="Isedit" :IsShow="MykeywordShow"
+							:myevent="'protein'" @setValue="mykeywordset" v-if="InputEvent=='protein'"
+							@Cancelword="Cancelword" @goNext="goNext('protein')"></MyNumberInput>
+						<input v-else v-model='gridList.protein' placeholder="请输入蛋白"
+							@click="SetInputKey('protein')" name="input" type="digit" @input="obtainPrice"></input>
+					</view>
+				</view>
+				
+				<view class="c-row " v-if="gridList.goodsName != '大豆'">
 					<view class="title">不完善粒(%)</view>
 					<view class="con-list">
 						<MyNumberInput :myvalue="gridList.imperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
@@ -337,6 +347,16 @@
 							placeholder="请输入不完整粒占比" name="input" type="digit"></input>
 					</view>
 				</view>
+				<view class="c-row" v-else>
+					<view class="title">完整粒率(%)</view>
+					<view class="con-list">
+						<MyNumberInput :myvalue="gridList.completeGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
+							:myevent="'completeGrain'" @setValue="mykeywordset" v-if="InputEvent=='completeGrain'"
+							@Cancelword="Cancelword" @goNext="goNext('impurity')"></MyNumberInput>
+						<input v-else v-model='gridList.completeGrain' 
+							placeholder="请输入完善粒率占比" name="input" type="digit"></input>
+					</view>
+				</view>
 				<view class="c-row ">
 					<view class="title">杂质(%)</view>
 					<view class="con-list">
@@ -367,8 +387,37 @@
 							placeholder="请输入热损伤占比" name="input" type="digit"></input>
 					</view>
 				</view>
-
-
+				<view class="c-row" v-if="gridList.goodsName == '大豆'">
+					<view class="title">转基因</view>
+					<view class="con-list">
+						<MyNumberInput :myvalue="gridList.transgene" :Isedit="Isedit" :IsShow="MykeywordShow"
+							:myevent="'transgene'" @setValue="mykeywordset" v-if="InputEvent=='transgene'"
+							@Cancelword="Cancelword" @goNext="goNext('transgene')"></MyNumberInput>
+							<view @click="transgeneShow=true">
+								{{gridList.transgene}}
+							</view>
+							<!-- 转基因 -->
+							<u-picker :range="transgeneList" range-key="value" @confirm='transgeneClick($event)' v-model="transgeneShow"
+								mode="selector">
+							</u-picker>
+					</view>
+				</view>
+				<view class="c-row" v-if="gridList.goodsName == '大豆'">
+					<view class="title">色泽/气味</view>
+					<view class="con-list">
+						<MyNumberInput :myvalue="gridList.colorLustre" :Isedit="Isedit" :IsShow="MykeywordShow"
+							:myevent="'colorLustre'" @setValue="mykeywordset" v-if="InputEvent=='colorLustre'"
+							@Cancelword="Cancelword" @goNext="goNext('colorLustre')"></MyNumberInput>
+						<!-- <input v-else v-model='gridList.colorLustre' @click="SetInputKey('colorLustre')"
+							placeholder="请选择色泽/气味是否正常" name="input" type="digit"></input> -->
+							<div @click="colorLustreShow = true">{{gridList.colorLustre}}</div>
+							
+							<!-- 转基因 -->
+							<u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick($event)' v-model="colorLustreShow"
+								mode="selector">
+							</u-picker>
+					</view>
+				</view>
 				<view v-show="utils.getCurrectRoles('acquisitionQuality.initial')&&typevalue==3" class="c-row">
 					<view class="title">水分增价(元/吨)</view>
 					<view class="con-list">
@@ -457,12 +506,13 @@
 				<view class="but_css" @click="close">返回</view>
 			</view>
 		</u-popup>
+		
 	</view>
 </template>
 
 <script>
 	var that;
-	const Equ_List = ['waterContent', 'bulkDensity', 'imperfectGrain', 'impurity', 'mildewGrain', 'jiaorenli'];
+	const Equ_List = ['waterContent', 'bulkDensity', 'imperfectGrain', 'impurity', 'mildewGrain', 'jiaorenli','protein','completeGrain'];
 	import dragButton from "@/components/drag-button/drag-button.vue";
 	import keyboard from "@/components/master-keyboard/master-keyboard.vue";
 	import MyNumberInput from "@/components/MyNumberInput.vue";
@@ -552,7 +602,6 @@
 				username: "请更改昵称",
 				contractFlag: 10,
 				gridList: {
-
 					outType: '汽运',
 					natureOfGrainPurchase: '贸易粮',
 					type: '',
@@ -747,7 +796,11 @@
 				],
 				cangid: '',
 
-				inType: "" //入库类型
+				inType: "" ,//入库类型
+				transgeneShow:false,
+				transgeneList:[{value:'非转基因'},{value:'转基因'}],
+				colorLustreShow : false,
+				colorLustreList:[{value:'正常'},{value:'异常'}]
 			}
 		},
 		// #ifndef MP
@@ -943,7 +996,6 @@
 							customerNumberCard: this.gridList.customerNumberCard,
 							warehouseName: this.gridList.warehouseName
 						}).then(res => {
-						console.log(3)
 						uni.hideLoading();
 						if (res.data.data.A + res.data.data.B + res.data.data.C * 50 > res.data.data.D - 50) {
 							that.redstatus = true
@@ -959,10 +1011,15 @@
 						that.$forceUpdate()
 					})
 				}
-
 			}
 		},
 		methods: {
+			colorLustreClick(e){
+				this.gridList.colorLustre = this.colorLustreList[e[0]].value
+			},
+			transgeneClick(e){
+				this.gridList.transgene = this.transgeneList[e[0]].value
+			},
 			Cancelword() {
 				this.bottomHeight = '10rpx';
 				this.MykeywordShow = false;
@@ -1084,10 +1141,11 @@
 			obtainPrice() { //根据容重获取价格
 				if (this.gridList.goodsName && this.cangid && this.gridList.bulkDensity) {
 					// if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
+						let quality = this.gridList.goodsName=='大豆'?this.gridList.protein:this.gridList.bulkDensity
 					this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
 						warehouseId: this.cangid,
 						goodsName: this.gridList.goodsName,
-						bulkDensity: this.gridList.bulkDensity
+						bulkDensity: quality
 					}).then(res => {
 						if (res.data.data != 0) {
 							this.gridList.dryGrainPrice = res.data.data
@@ -1342,6 +1400,17 @@
 					this.gridList.gradeKey = this.gradeList[1].key
 					// this.gridList.grade = this.contractNolist.grade
 					this.gridList.inOutType = this.contractNolist.inOutType
+					if(this.gridList.goodsName == "大豆"){ //货名为大豆是设置默认
+						this.gridList.transgene= "非转基因"
+						this.gridList.reTransgene= "非转基因"
+						this.gridList.colorLustre = "正常"
+						this.gridList.reColorLustre = "正常"
+					}else{
+						delete this.gridList.transgene
+						delete this.gridList.reTransgene
+						delete this.gridList.colorLustre
+						delete this.gridList.reColorLustre
+					}
 
 					if (this.gridList.inOutType == '采购入库') {
 						this.warehouseTradeCount = '000' + this.warehouseTradeCount
@@ -1820,8 +1889,9 @@
 								this.$api.msg('容重不能为空')
 								return
 							}
-						} else {
-							if (!this.gridList.bulkDensity) {
+						} 
+						if(this.gridList.goodsName == "大豆"){
+							if (!this.gridList.protein) {
 								this.$api.msg('蛋白不能为空')
 								return
 							}

+ 86 - 9
pages/erpbusiness/edit_quality_testing.vue

@@ -298,9 +298,8 @@
 							name="input"></input>
 					</view>
 				</view>
-				<view class="c-row ">
-					<view v-if='gridList.goodsName!="大豆"' class="title">容重(克/升)</view>
-					<view v-else class="title">蛋白</view>
+				<view class="c-row " v-if='gridList.goodsName!="大豆"'>
+					<view  class="title">容重(克/升)</view>
 					<view class="con-list">
 						<MyNumberInput :myvalue="gridList.bulkDensity" :Isedit="Isedit" :IsShow="MykeywordShow"
 							:myevent="'bulkDensity'"
@@ -318,7 +317,26 @@
 								name="input"></input>
 					</view>
 				</view>
-				<view class="c-row ">
+				<view class="c-row" v-else>
+					<view class="title">蛋白</view>
+					<view class="con-list">
+						<MyNumberInput :myvalue="gridList.protein" :Isedit="Isedit" :IsShow="MykeywordShow"
+							:myevent="'protein'"
+							@setValue="mykeywordset"  v-if="InputEvent=='protein'" 
+							@Cancelword="Cancelword" 
+							@goNext="goNext('protein')"></MyNumberInput>
+						<input v-else  @click="SetInputKey('protein')" :disabled='flag==1' type="digit" v-model='gridList.protein' placeholder="请输入蛋白"
+							name="input"  @input="obtainPrice"></input>
+						<MyNumberInput :myvalue="gridList.reProtein" :Isedit="Isedit" :IsShow="MykeywordShow"
+							:myevent="'reProtein'"
+							@setValue="mykeywordset"  v-if="InputEvent=='reProtein'" 
+							@Cancelword="Cancelword" 
+							@goNext="goNext('reProtein')"></MyNumberInput>
+						<input @click="SetInputKey('reProtein')" v-if="flag==1&&InputEvent!='reProtein'||flag==2&&InputEvent!='reProtein'" type="digit" v-model='gridList.reProtein' placeholder="请输入蛋白" 
+								name="input"></input>
+					</view>
+				</view>
+				<view class="c-row " v-if='gridList.goodsName!="大豆"'>
 					<view class="title">不完善粒(%)</view>
 					<view class="con-list">
 						<MyNumberInput :myvalue="gridList.imperfectGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
@@ -337,6 +355,25 @@
 								name="input"></input>
 					</view>
 				</view>
+				<view class="c-row" v-else>
+					<view class="title">完整粒率(%)</view>
+					<view class="con-list">
+						<MyNumberInput :myvalue="gridList.completeGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
+							:myevent="'completeGrain'"
+							@setValue="mykeywordset"  v-if="InputEvent=='completeGrain'" 
+							@Cancelword="Cancelword" 
+							@goNext="goNext('completeGrain')"></MyNumberInput>
+						<input v-else  @click="SetInputKey('completeGrain')" :disabled='flag==1' type="digit" v-model='gridList.completeGrain' placeholder="请输入完整粒率占比"
+							name="input"></input>
+						<MyNumberInput :myvalue="gridList.reCompleteGrain" :Isedit="Isedit" :IsShow="MykeywordShow"
+							:myevent="'reCompleteGrain'"
+							@setValue="mykeywordset"  v-if="InputEvent=='reCompleteGrain'" 
+							@Cancelword="Cancelword" 
+							@goNext="goNext('reCompleteGrain')"></MyNumberInput>
+						<input  @click="SetInputKey('reCompleteGrain')" v-if="flag==1&&InputEvent!='reCompleteGrain'||flag==2&&InputEvent!='reCompleteGrain'" type="digit" v-model='gridList.reCompleteGrain' placeholder="请输入完整粒率占比"
+								name="input"></input>
+					</view>
+				</view>
 				<view class="c-row ">
 					<view class="title">杂质(%)</view>
 					<view class="con-list">
@@ -395,6 +432,35 @@
 						<!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
 					</view>
 				</view>
+				<view class="c-row" v-if="gridList.goodsName == '大豆'">
+					<view class="title">转基因</view>
+					<view class="con-list">
+							<view @click="transgeneShow=true">{{gridList.transgene}}</view>
+							<!-- 转基因 -->
+							<u-picker :range="transgeneList" range-key="value" @confirm='transgeneClick($event)' v-model="transgeneShow"
+								mode="selector">
+							</u-picker>
+							<view @click="transgeneShow=true">{{gridList.reTransgene?gridList.reTransgene:"请选择是否转基因"}}</view>
+							<!-- 转基因 -->
+							<u-picker :range="transgeneList" range-key="value" @confirm='transgeneClick1($event)' v-model="transgeneShow"
+								mode="selector">
+							</u-picker>
+					</view>
+				</view>
+				<view class="c-row" v-if="gridList.goodsName == '大豆'">
+					<view class="title">色泽/气味</view>
+					<view class="con-list">
+							<div >{{gridList.colorLustre}}</div>
+							<u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick($event)' v-model="colorLustreShow"
+								mode="selector">
+							</u-picker>
+							
+							<div @click="colorLustreShow = true">{{gridList.reColorLustre?gridList.reColorLustre:"请选择色泽/气味是否正常"}}</div>
+							<u-picker :range="colorLustreList" range-key="value" @confirm='colorLustreClick1($event)' v-model="colorLustreShow"
+								mode="selector">
+							</u-picker>
+					</view>
+				</view>
 				<view v-show="utils.getCurrectRoles('acquisitionQuality.initial')"
 					class="c-row">
 					<view class="title">水分增价(元/吨)</view>
@@ -600,6 +666,10 @@
 				tidalGrainPrice:0,
 				isShowAlert: false,
 				content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
+				transgeneShow:false,
+				transgeneList:[{value:'非转基因'},{value:'转基因'}],
+				colorLustreShow : false,
+				colorLustreList:[{value:'正常'},{value:'异常'}]
 			}
 		},
 		// #ifndef MP
@@ -825,6 +895,18 @@
 			}
 		},
 		methods: {
+			colorLustreClick(e){
+				this.gridList.colorLustre = this.colorLustreList[e[0]].value
+			},
+			colorLustreClick1(e){
+				this.gridList.reColorLustre = this.colorLustreList[e[0]].value
+			},
+			transgeneClick(e){
+				this.gridList.transgene = this.transgeneList[e[0]].value
+			},
+			transgeneClick1(e){
+				this.gridList.reTransgene = this.transgeneList[e[0]].value
+			},
 			Cancelword(){
 				this.bottomHeight = '10rpx';
 				this.MykeywordShow =false;
@@ -1338,11 +1420,6 @@
 							this.$api.msg('容重不能为空')
 							return
 						}
-					}else{
-						if (!this.gridList.bulkDensity) {
-							this.$api.msg('蛋白不能为空')
-							return
-						}
 					}
 					if (!this.gridList.jiaorenli) {
 						this.$api.msg('热损伤不能为空')

+ 30 - 2
pages/erpbusiness/examine_quality_testing.vue

@@ -186,7 +186,7 @@
 					</view> -->
 
 				</view>
-				<view class="c-row ">
+				<view class="c-row " v-if="gridList.goodsName !='大豆'">
 					<view class="title">容重(克/升)</view>
 					<view class="con-list">
 						<view>{{gridList.bulkDensity}}</view>
@@ -194,13 +194,27 @@
 						
 					</view>
 				</view>
-				<view class="c-row ">
+				<view class="c-row " v-else>
+					<view class="title">蛋白</view>
+					<view class="con-list">
+						<view>{{gridList.protein}}</view>
+						<view>{{gridList.reProtein}}</view>
+					</view>
+				</view>
+				<view class="c-row " v-if="gridList.goodsName !='大豆'">
 					<view class="title">不完善粒(%)</view>
 					<view class="con-list">
 						<view>{{gridList.imperfectGrain}}</view>
 						<view>{{gridList.reImperfectGrain}}</view>
 					</view>
 				</view>
+				<view class="c-row " v-else>
+					<view class="title">完整粒率(%)</view>
+					<view class="con-list">
+						<view>{{gridList.completeGrain}}</view>
+						<view>{{gridList.reCompleteGrain}}</view>
+					</view>
+				</view>
 				<view class="c-row ">
 					<view class="title">杂质(%)</view>
 					<view class="con-list">
@@ -222,6 +236,20 @@
 						<view>{{gridList.reJiaorenli}}</view>
 					</view>
 				</view>
+				<view class="c-row ">
+					<view class="title">转基因</view>
+					<view class="con-list">
+						<view>{{gridList.transgene}}</view>
+						<view>{{gridList.reTransgene}}</view>
+					</view>
+				</view>
+				<view class="c-row ">
+					<view class="title">色泽/气味</view>
+					<view class="con-list">
+						<view>{{gridList.colorLustre}}</view>
+						<view>{{gridList.reColorLustre}}</view>
+					</view>
+				</view>
 				<view class="c-row">
 					<view class="title">水分增价(元/吨)</view>
 					<view class="con-list">

+ 2 - 1
pages/erpbusiness/quality_testing.vue

@@ -308,7 +308,7 @@
 		},
 		methods: {
 			print(item){
-				
+				console.log("wwwwwwwwww",item.protein)
 				uni.setStorageSync("quality_print", item)
 				uni.navigateTo({
 					url: '/pages/erpbusiness/bleConnect'
@@ -385,6 +385,7 @@
 							//采购信息
 							if (data.length > 0) {
 								if (flag) {
+									
 									that.gridList = data
 								} else {
 									that.gridList = that.gridList.concat(data)

+ 37 - 16
pages/erpbusiness/sendCommand.vue

@@ -157,9 +157,7 @@
 			//    })	
 		},
 		methods: {
-
 			clearBlue() {
-
 				let tmp = this.Bluetooth;
 				uni.closeBLEConnection({
 					deviceId: tmp.BLEInformation.deviceId
@@ -218,10 +216,7 @@
 					command.rowSpace(100);
 					command.setText("编号错误"+that.gridList.qualityNo);
 				}
-
-
 				command.setPrint();
-
 				// 标题
 				command.bold(1); //加粗
 				command.setFontSize(16); //字体大小
@@ -317,16 +312,34 @@
 				command.setLeftMargin(30)
 				command.setText("类型:" + that.gridList.type);
 				command.setPrint();
+				//蛋白
+				if(that.gridList.goodsName == '大豆'){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText('蛋白:' + that.gridList.protein);
+					command.setPrint();
+				}
 				//容量
-				command.setSelectJustification(0); //居左
-				command.setLeftMargin(30)
-				command.setText("容量(克/升):" + that.gridList.bulkDensity);
-				command.setPrint();
+				if(that.gridList.goodsName != '大豆'){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("容量(克/升):" + that.gridList.bulkDensity);
+					command.setPrint();
+				}
+				//完整粒率(%)
+				if(that.gridList.goodsName == '大豆'){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText('完整粒率(%):' + that.gridList.completeGrain);
+					command.setPrint();
+				}
 				//不完善粒
-				command.setSelectJustification(0); //居左
-				command.setLeftMargin(30)
-				command.setText("不完善粒(%):" + that.gridList.imperfectGrain);
-				command.setPrint();
+				if(that.gridList.goodsName != '大豆'){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText("不完善粒(%):" +that.gridList.imperfectGrain);
+					command.setPrint();
+				}
 				//等级
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
@@ -366,6 +379,17 @@
 				// command.setLeftMargin(30)
 				// command.setText("购粮性质:" + that.gridList.natureOfGrainPurchase);
 				// command.setPrint();
+				if(that.gridList.goodsName == '大豆'){
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText('转基因:' + that.gridList.transgene);
+					command.setPrint();
+					
+					command.setSelectJustification(0); //居左
+					command.setLeftMargin(30)
+					command.setText('色泽/气味:' + that.gridList.colorLustre);
+					command.setPrint();
+				}
 				//仓位号
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
@@ -396,10 +420,7 @@
 				command.setPrintAndFeedRow(10);
 				that.isReceiptSend = true;
 				that.prepareSend(command.getData());
-
-
 			},
-
 			//准备发送,根据每次发送字节数来处理分包数量
 			prepareSend(buff) {
 				console.log(buff);