Explorar o código

Merge branch 'dev' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc into dev

gjy %!s(int64=3) %!d(string=hai) anos
pai
achega
edec7e9638

+ 8 - 1
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -140,7 +140,7 @@
               <div class="but">
                 <!-- <el-button @click="print" type="primary" :disabled="submitAllow">提交</el-button> -->
                 <el-button @click="print" v-if="information == '毛重'" type="primary">保存</el-button>
-                <el-button @click="print(1)" v-if="information == '皮重'" type="primary" :disabled="submitAllow">保存并打印
+                <el-button @click="print(1)" v-if="information == '皮重'" type="primary">保存并打印
                 </el-button>
               </div>
             </div>
@@ -1070,6 +1070,7 @@
         this.isShowPrint = false
       },
       print() {
+      
         if (this.reader) {
           this.reader.cancel()
         }
@@ -1151,6 +1152,12 @@
             })
             return
           }
+        }
+          if(this.tpyeNo == 2) {
+              if(this.submitAllow){
+                this.$message.error("该条质检信息未确认")
+                return
+              }
         }
         this.$confirm('确定保存检斤信息?', '提示', {
             confirmButtonText: '确定',

+ 13 - 14
src/views/outboundManagement/weighingManagementNew.vue

@@ -183,7 +183,7 @@
 								</ws-form-item>
 								<ws-form-item v-if="tpyeNo == 2" label="毛重(KG)" span="1" prop="grossWeight">
 									<ws-input type="number" @mousewheel.native.prevent v-if="tpyeNo==2"
-										v-model="weighingList.grossWeight" @input="calculation(status)" placeholder="未获取到毛重" maxlength="100"
+										v-model="weighingList.grossWeight" @input="calculation" placeholder="未获取到毛重" maxlength="100"
 										size="small" :disabled="disabled" />
 										<el-button v-if="tpyeNo == 2&&warehouseType==1" @click="openPort">重新获取</el-button>
 										<el-button v-if="tpyeNo == 2&&warehouseType==2" @click="disabled=false">编辑</el-button>
@@ -237,8 +237,8 @@
 					<div>
 						<el-button v-if='tpyeNo == 1' @click='add' type="primary">新增</el-button>
             			<el-button v-if='tpyeNo == 1' @click='deletelist' type="danger">删除</el-button>
-						<el-button v-if='tpyeNo == 2' @click='statustypechangelist(5)' :type="statusType==5?'primary':''">未称毛重</el-button>
-          				<el-button v-if='tpyeNo == 2' @click='statustypechangelist(3)' :type="statusType==3?'primary':''">已称毛重</el-button>
+						<el-button v-if='tpyeNo == 2' @click='statustypechangelist(3)' :type="statusType==3?'primary':''">未称毛重</el-button>
+          				<el-button v-if='tpyeNo == 2' @click='statustypechangelist(2)' :type="statusType==2?'primary':''">已称毛重</el-button>
 					</div>
 					<div><el-button @click='record' type="primary">记录</el-button></div>
 				</div>
@@ -400,13 +400,14 @@
       	this.showType = this.isShow
 	  	this.openPort()
 		this.getNowTime()
-	},
-	activated() {
 		if(	localStorage.getItem('houseSelfCollect_house1').allowEdit == 1){
 			this.disabled = false
 		}else{
 			this.disabled = true
 		}		
+	},
+	activated() {
+		
 	},
 	methods: {
 		statustypechangelist(status){
@@ -529,13 +530,12 @@
 				})
 				.toPromise()
 				.then((response) => {
-					console.log(response)
 					this.weighingList=response
 					this.weighingList.carNo=response.qualityInspectionManagement.carNumber
-					this.weighingList.boxNo=response.qualityInspectionManagement.boxNo
-					this.weighingList.boxNoOther=response.qualityInspectionManagement.boxNoOther
-					this.weighingList.titleNo=response.qualityInspectionManagement.titleNo
-					this.weighingList.titleNoOther=response.qualityInspectionManagement.titleNoOther
+					this.weighingList.boxNo=response.boxNo
+					this.weighingList.boxNoOther=response.boxNoOther
+					this.weighingList.titleNo=response.titleNo
+					this.weighingList.titleNoOther=response.titleNoOther
 					this.weighingList.wingNumber=response.qualityInspectionManagement.wingNumber
 					this.weighingList.wingNumberOther=response.qualityInspectionManagement.wingNumberOther
 					this.weighingList.warehouseInOutDetail={
@@ -973,12 +973,13 @@
 		tabClick(val){
 			this.weighingList = []
 			this.index = val
-			this.disabled=true
+			// this.disabled=true
 			if (val == 0) {
 				this.statusType='1'
 				this.information = '皮重'
 				this.tpyeNo = '1'
 			} else {
+				this.statusType = 3
 				this.tpyeNo = '2'
 				this.information = '毛重'
 			}
@@ -1146,9 +1147,7 @@
 			calculation() {
 				if (this.weighingList.grossWeight && this.weighingList.tare) {
 					let count = 0
-					this.weighingList.netWeight =
-						this.weighingList.grossWeight -
-						this.weighingList.tare
+					this.weighingList.netWeight = this.weighingList.tare - this.weighingList.grossWeight
 				}
 			},
 			carChange(e) {