Ver Fonte

修改锁屏质检 问题

wangchao há 3 anos atrás
pai
commit
55079773fb
1 ficheiros alterados com 101 adições e 88 exclusões
  1. 101 88
      pages/erpbusiness/edit_quality_testing.vue

+ 101 - 88
pages/erpbusiness/edit_quality_testing.vue

@@ -23,8 +23,10 @@
 			<view class="c-row ">
 				<view class="title">车牌号</view>
 				<view class="con-list">
-					<input v-model='gridList.carNumber' @click.stop="handleShowKeyboard" placeholder="请输入车牌号" name="input"></input>
-					<master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false" :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
+					<input v-model='gridList.carNumber' @click.stop="handleShowKeyboard" placeholder="请输入车牌号"
+						name="input"></input>
+					<master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
+						:defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
 					<!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
 				</view>
 			</view>
@@ -65,18 +67,18 @@
 			<view class="c-row ">
 				<view class="title">囤位号</view>
 				<view class="con-list">
-					<input v-model='gridList.storageTagNo' placeholder="请输入囤位号"
-						name="input"></input>
+					<input v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
 				</view>
 			</view>
 			<view class="c-row ">
 				<view class="title">货名</view>
-				<view  class="con-list">
-					 <!-- <view v-if="flag != '0'">
+				<view class="con-list">
+					<!-- <view v-if="flag != '0'">
 						{{gridList.goodsName}}
 					</view> -->
 					<view @click='goodsName = true'>{{gridList.goodsName}}</view>
-					<u-picker :range="goodsList" range-key="goodsName" @confirm='goodsPicker($event)' v-model="goodsName" mode="selector" >
+					<u-picker :range="goodsList" range-key="goodsName" @confirm='goodsPicker($event)'
+						v-model="goodsName" mode="selector">
 					</u-picker>
 				</view>
 			</view>
@@ -101,23 +103,27 @@
 			</view>
 			<view class="c-row-fj" v-if="flag==2||flag==1">
 				<view style="margin: 0px 0px 30rpx 10rpx;">复检备注</view>
-					<textarea class='textarea-style' v-model='gridList.reMemo' placeholder="请输入复检备注" maxlength="300"></textarea>
+				<textarea class='textarea-style' v-model='gridList.reMemo' placeholder="请输入复检备注"
+					maxlength="300"></textarea>
 			</view>
 			<view class="c-row" v-if="flag==1&&gridList.warehouseName=='鲅鱼圈金信库'">
 				<view class="title">车型</view>
 				<view class="con-list">
 					<view @click='carstatus = true'>{{gridList.carModel?gridList.carModel:'请选择车型'}}</view>
-				<u-picker :range="carModeList" range-key="constValue" @confirm='carPicker($event)' v-model="carstatus" mode="selector" >
-				</u-picker>
+					<u-picker :range="carModeList" range-key="constValue" @confirm='carPicker($event)'
+						v-model="carstatus" mode="selector">
+					</u-picker>
 				</view>
-				
+
 			</view>
 		</view>
 		<view style='padding-bottom:300rpx;'>
 			<view class='wrap'>
 				<view style='margin-right:10px;' class='flex justify-between align-item-center'>
 					<view class='title_b'>化验信息</view>
-					<view class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572" v-if='flag==0' v-model="value" @change="change"></u-switch></view>
+					<view class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572"
+							v-if='flag==0' v-model="value" @change="change"></u-switch>
+					</view>
 				</view>
 				<view class="c-row ">
 					<view class="title">等级</view>
@@ -172,7 +178,7 @@
 					<view class="con-list">
 						<input :disabled='flag==1' v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
 							name="input"></input>
-							<!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
+						<!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
 					</view>
 				</view>
 			</view>
@@ -185,12 +191,12 @@
 		<u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
 			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
 			showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
-			<u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
-				<view class="buns_item">
-					<view class="but_css" @click="print">打印小票</view>
-					<view class="but_css" @click="close">返回</view>
-				</view>
-			</u-popup>
+		<u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
+			<view class="buns_item">
+				<view class="but_css" @click="print">打印小票</view>
+				<view class="but_css" @click="close">返回</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -210,7 +216,7 @@
 		},
 		data() {
 			return {
-				isShowPrint:false,
+				isShowPrint: false,
 				inputShow: false,
 				modalName: '',
 				mycarStyle: '',
@@ -219,8 +225,8 @@
 				show: false,
 				selector: [],
 				show1: false,
-				goodsName:false,
-				carstatus:false,
+				goodsName: false,
+				carstatus: false,
 				inputContent: '',
 				coverTransform: 'translateY(0px)',
 				coverTransition: '0s',
@@ -244,8 +250,8 @@
 					type: '潮粮',
 					tidalGrainPrice: '',
 					dryGrainPrice: '',
-					carNumber:'',
-					carModel:'',
+					carNumber: '',
+					carModel: '',
 				},
 				managementType: '',
 				warehouseName: '',
@@ -253,8 +259,8 @@
 				showTran: true,
 				companyId: 1,
 				current: 4,
-				value:false,
-				carModeList:[],
+				value: false,
+				carModeList: [],
 				gradeList: [{
 						key: 1,
 						value: '一等品'
@@ -273,8 +279,8 @@
 					},
 				],
 				cangid: '',
-				goodsList:[],
-				isShowAlert:false,
+				goodsList: [],
+				isShowAlert: false,
 				content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
 			}
 		},
@@ -313,8 +319,6 @@
 			this.flag = options.flag
 			this.cangid = options.cangid
 			this.managementType = options.managementType
-		},
-		onShow() {
 			console.log(this.flag)
 			var that = this
 			this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
@@ -322,10 +326,10 @@
 			}).then(res => {
 				if (res.data.data) {
 					let data = res.data.data
-					if(data.supplementaryRecording==1){
-						that.value=true
-					}else{
-						that.value=false
+					if (data.supplementaryRecording == 1) {
+						that.value = true
+					} else {
+						that.value = false
 					}
 					that.gridList = data
 					that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
@@ -340,12 +344,12 @@
 				constId: 'QUA1'
 			}).then(res => {
 				if (res.data.data) {
-					that.carModeList=res.data.data
+					that.carModeList = res.data.data
 				}
 			})
 			//质检货名下拉
 			this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
-				 warehouseId: this.cangid
+				warehouseId: this.cangid
 			}).then(res => {
 				if (res.data.data) {
 					this.goodsList = res.data.data
@@ -353,14 +357,17 @@
 			})
 			this.gridList.grade = this.gradeList[0].value
 			this.gridList.gradeKey = this.gradeList[0].key
+		},
+		onShow() {
+
 		},
 		methods: {
-			print(){
+			print() {
 				uni.navigateTo({
 					url: '/pages/erpbusiness/bleConnect'
 				})
 			},
-			close(){
+			close() {
 				this.isShowPrint = false
 				uni.navigateBack({})
 			},
@@ -368,70 +375,72 @@
 			// 	console.log('childclick',type)
 			// 	// 0是上一项
 			// 	if(type==0){
-					
+
 			// 	}else{}
 			// },
-			hidden(){
+			hidden() {
 				this.$refs.keyboard.open(false)
 			},
-			carPicker(e){
-				this.gridList.carModel=this.carModeList[e[0]].constValue
+			carPicker(e) {
+				this.gridList.carModel = this.carModeList[e[0]].constValue
 			},
-			handleShowKeyboard(){
-				if(this.flag==0){
-					if(this.$refs.keyboard.open){
-						this.$refs.keyboard.open(true)//true 键盘显示 false 键盘隐藏
-					}else{
+			handleShowKeyboard() {
+				if (this.flag == 0) {
+					if (this.$refs.keyboard.open) {
+						this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
+					} else {
 						this.$refs.keyboard[0].open(true)
 					}
 				}
 			},
-			handleShowKeyboard1(){
-				if(this.flag==0){
-					if(this.$refs.keyboard1.open){
-						this.$refs.keyboard1.open(true)//true 键盘显示 false 键盘隐藏
-					}else{
+			handleShowKeyboard1() {
+				if (this.flag == 0) {
+					if (this.$refs.keyboard1.open) {
+						this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
+					} else {
 						this.$refs.keyboard1[0].open(true)
 					}
 				}
 			},
-			handleClick(e){
+			handleClick(e) {
 				this.gridList.carNumber = e.value //键盘输入值
 			},
-			handleClick1(e){
+			handleClick1(e) {
 				this.gridList.jiaorenli = e.value //键盘输入值
 			},
-			change(e){
-				if(e){
-					this.gridList.supplementaryRecording=1
-				}else{
-					this.gridList.supplementaryRecording=0
+			change(e) {
+				if (e) {
+					this.gridList.supplementaryRecording = 1
+				} else {
+					this.gridList.supplementaryRecording = 0
 				}
-				
+
 			},
 			confirmInfo() {
-				this.isShowAlert = true	
+				this.isShowAlert = true
 			},
 			alertBtn() {
 				var that = this
 				that.gridList.flag = 2
-				this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection',that.gridList).then(res => {
-					if(res.data.code=="200"){
-						that.gridList.flag=1
-						that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(res => {
-							if(res.data.code=="200"){
-								that.$api.msg('提交成功!')
-								setTimeout(function(){
+				this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
+					res => {
+						if (res.data.code == "200") {
+							that.gridList.flag = 1
+							that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that
+								.gridList).then(res => {
+								if (res.data.code == "200") {
+									that.$api.msg('提交成功!')
+									setTimeout(function() {
 										uni.navigateBack({})
-								},1000)
-							}else{
-								that.$api.msg('提交失败')
-							}
-						})
-					}else{
-						that.$api.msg('提交失败')
-					}
-				})
+									}, 1000)
+								} else {
+									that.$api.msg('提交失败')
+								}
+							})
+						} else {
+							that.$api.msg('提交失败')
+						}
+					})
 			},
 			waterContentChange() {
 				var that = this
@@ -481,7 +490,7 @@
 					})
 				}
 			},
-			goodsPicker(e){
+			goodsPicker(e) {
 				this.gridList.goodsName = this.goodsList[e[0]].goodsName
 			},
 			submit() {
@@ -552,7 +561,7 @@
 					this.$api.msg('购粮性质不能为空')
 					return
 				}
-				if(this.value==false||this.flag==2){
+				if (this.value == false || this.flag == 2) {
 					if (!this.gridList.grade) {
 						this.$api.msg('等级不能为空')
 						return
@@ -596,11 +605,11 @@
 									'/qualityInspectionManagement/api/editQualityInspection', that.gridList)
 								.then(res => {
 									if (res.data.code == 200) {
-									that.$api.msg('编辑质检成功')
+										that.$api.msg('编辑质检成功')
 										that.isShowPrint = true
 										that.gridList.warehouseId = that.cangid
-										uni.setStorageSync("quality_print",that.gridList)
-										console.log('that.gridList',that.gridList)
+										uni.setStorageSync("quality_print", that.gridList)
+										console.log('that.gridList', that.gridList)
 										// uni.getStorageSync("depotAcquisition_warehouseName")
 										// uni.navigateBack({})
 									}
@@ -807,21 +816,25 @@
 	input:disabled {
 		color: #ccc;
 	}
-	.textarea-style{
+
+	.textarea-style {
 		border: 1px solid #EEEEEE;
 		width: 100%;
-		padding:20rpx;
+		padding: 20rpx;
 		border-radius: 20rpx;
 	}
-	.c-row-fj{
-		padding:20rpx
+
+	.c-row-fj {
+		padding: 20rpx
 	}
-	.buns_item{
+
+	.buns_item {
 		display: flex;
 		padding: 80rpx 0 50rpx 0;
 		justify-content: space-around;
 	}
-	.but_css{
+
+	.but_css {
 		background: #22C572;
 		width: 40%;
 		padding: 20rpx;