Kaynağa Gözat

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

mxx 3 yıl önce
ebeveyn
işleme
06fa003abf
1 değiştirilmiş dosya ile 13 ekleme ve 2 silme
  1. 13 2
      src/views/outboundManagement/weighing.vue

+ 13 - 2
src/views/outboundManagement/weighing.vue

@@ -48,14 +48,15 @@
 						</ws-form-item>
 						<ws-form-item label="毛重(公斤)" span="1" prop="grossWeight" v-if="this.types == 1">
 							<ws-input v-model="weighingList.grossWeight" @input="calculation" placeholder="未获取到毛重"
-								maxlength="100" size="small" :disabled="disabled2" />
+								maxlength="100" size="small"  />
 						</ws-form-item>
 						<el-button type="primary" v-if="this.types == 1" @click="openPort">重新获取</el-button>
 
 						<ws-form-item label="皮重(公斤)" span="1" prop="tare">
 							<!-- <ws-input v-model="weighingList.tare" placeholder="未获取到皮重" maxlength="100" size="small"
 								disabled /> -->
-								<ws-input @input="calculation" v-model="weighingList.tare" placeholder="未获取到皮重" maxlength="100" size="small" />
+								<ws-input @input="calculation" v-model="weighingList.tare" placeholder="未获取到皮重" 
+								maxlength="100" size="small" :disabled="disabled2"/>
 						</ws-form-item>
 						<el-button type="primary" v-if="this.types == 2 || this.types == null" @click="openPort">重新获取</el-button>
 						<!-- <div class="formItem"> -->
@@ -167,10 +168,13 @@
 				this.information = '毛重'
 				this.disabled = true
 				this.disabled1 = true
+				this.disabled2 = true
 			} else if (this.types == 2) {
 				this.information = '编辑皮重'
 				this.disabled1 = true
 				this.disabled2 = true
+			} else {
+				this.disabled2 = true
 			}
 			this.getList(id)
 		},
@@ -396,6 +400,13 @@
 						})
 						return
 					}
+					if (this.weighingList.netWeight < 0){
+						this.$message({
+							message: '净重不能为负',
+							type: 'warning',
+						})
+						return
+					}
 				}
 				this.weighingList.warehouseName = this.warehouseName
 				this.weighingList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName')