Browse Source

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

gjy 2 years ago
parent
commit
e80fd2f7b4

+ 20 - 7
src/views/warehousenew/addCar.vue

@@ -76,6 +76,7 @@
                                         </ws-info-table>
                                         <div class="but">
                                             <el-button @click="submit" type="primary">提交</el-button>
+                                            <el-button @click="canel" type="primary">取消</el-button>
                                         </div>
                                     </div>
                                 </div>
@@ -151,11 +152,11 @@ export default {
             weighingList: {},
             deptBudgetList: {},
             warehouseList: [],
-            warehouseId: "",
+            warehouseId: '',
             deliveryList: [],
-            index: "",
-            monitorUrl1: "",
-            monitorUrl2: "",
+            index: '',
+            monitorUrl1: '',
+            monitorUrl2: '',
             deptBudgetTotal: 0,
         }
     },
@@ -169,6 +170,7 @@ export default {
             } else {
                 this.disabled = true
             }
+
         }
     },
     activated() { },
@@ -196,7 +198,7 @@ export default {
             this.$refs.weightChild.openPort()
         },
         carDel(val) {
-            this.$confirm('确定删除车辆 ' + val.carNo + " ?", '提示', {
+            this.$confirm('确定删除车辆 ' + val.carNo + ' ?', '提示', {
                 confirmButtonText: '确定',
                 cancelButtonText: '取消',
                 type: 'warning',
@@ -286,6 +288,7 @@ export default {
                 return
             }
             this.weighingList.warehouseName = this.warehouseName
+            this.weighingList.baseId = this.warehouseId
             this.$confirm('确定保存车辆信息?', '提示', {
                 confirmButtonText: '确定',
                 cancelButtonText: '取消',
@@ -299,8 +302,8 @@ export default {
                                 message: '添加成功!',
                                 type: 'success'
                             });
-                            this.weighingList.carNo = ""
-                            this.weighingList.tare = ""
+                            this.weighingList.carNo = ''
+                            this.weighingList.tare = ''
                             this.getList()
                         })
                 })
@@ -308,6 +311,11 @@ export default {
                     return false
                 })
         },
+        canel(){
+            this.weighingList.carNo = ''
+            this.weighingList.tare = ''
+            this.$router.go(-1)
+        },
         carNoTypeChange() {
             this.carjudge = !this.carjudge
             if (this.carjudge) {
@@ -403,6 +411,11 @@ export default {
                     } else {
                         this.warehouseName = response[0].warehouseName
                         this.warehouseId = response[0].id
+                        if (response[0].allowEdit == 1) {
+                            this.disabled = false
+                        } else {
+                            this.disabled = true
+                        }
                         this.getList()
                     }
                     this.warehouseList = response

+ 3 - 2
src/views/warehousenew/dryRecord.vue

@@ -521,6 +521,7 @@ export default {
                     this.count += this.modification[i].netWeight
                 }
             }
+            this.count = this.count.toFixed(2)
         },
         dateFormat(fmt, date) {
             let ret
@@ -545,7 +546,7 @@ export default {
             return fmt
         },
         lookup() {
-            if (this.value2.length > 0) {
+            if (this.value2) {
                 this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
                 this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
             } else {
@@ -583,7 +584,7 @@ export default {
                 currentPage: this.currentPage,
                 pageSize: this.pageSize,
                 searchKeyWord: this.searchKeyWord,
-                searchType: "",
+                searchType: '',
                 startDate: this.startDate,
                 endDate: this.endDate,
             })

+ 27 - 12
src/views/warehousenew/dryWarehousing.vue

@@ -115,6 +115,7 @@
                                         </ws-info-table>
                                         <div class="but">
                                             <el-button @click="submit" type="primary">提交</el-button>
+                                            <el-button @click="canel" type="primary">清空</el-button>
                                         </div>
                                     </div>
                                 </div>
@@ -241,6 +242,9 @@ export default {
                 if (e == this.carList[i].id) {
                     this.weighingList.carNo = this.carList[i].carNo
                     this.weighingList.tare = this.carList[i].tare
+                    if (this.weighingList.grossWeight) {
+                        this.weighingList.netWeight = this.weighingList.grossWeight - this.weighingList.tare
+                    }
                     break
                 }
             }
@@ -295,7 +299,16 @@ export default {
                 path: 'addCar',
             })
         },
-
+        canel() {
+            if (this.tpyeNo == '1') {
+                this.weighingList.tare = ''
+            } else {
+                this.weighingList.carNo = ''
+                this.weighingList.grossWeight = ''
+                this.weighingList.tare = ''
+                this.weighingList.netWeight = ''
+            }
+        },
         submit() {
             var allow = hasPermission('warehouseManagement.warehouse.warehouseInfo.hong')
             if (!allow) {// 提交为外勤权限,错误提示“暂未获得权限”
@@ -308,6 +321,8 @@ export default {
             this.weighingList.compId = localStorage.getItem('ws-pf_compId')
             this.weighingList.weigher = localStorage.getItem('ws-pf_staffName')
             this.weighingList.warehouseName = this.warehouseName
+            this.weighingList.baseId = this.warehouseId
+            this.weighingList.warehouseNo = this.weighingList.warehouseNo
             if (this.tpyeNo == 2) {
                 this.weighingList.statusFlag = 1
                 if (!this.weighingList.goodsName) {
@@ -426,10 +441,10 @@ export default {
                                     message: '操作成功!',
                                     type: 'success'
                                 });
-                                this.weighingList.carNo = ""
-                                this.weighingList.grossWeight = ""
-                                this.weighingList.tare = ""
-                                this.weighingList.netWeight = ""
+                                this.weighingList.carNo = ''
+                                this.weighingList.grossWeight = ''
+                                this.weighingList.tare = ''
+                                this.weighingList.netWeight = ''
                                 this.getList()
                             })
                     } else if (this.tpyeNo == 1) {//称皮重
@@ -440,10 +455,10 @@ export default {
                                     message: '操作成功!',
                                     type: 'success'
                                 });
-                                this.weighingList.carNo = ""
-                                this.weighingList.grossWeight = ""
-                                this.weighingList.tare = ""
-                                this.weighingList.netWeight = ""
+                                this.weighingList.carNo = ''
+                                this.weighingList.grossWeight = ''
+                                this.weighingList.tare = ''
+                                this.weighingList.netWeight = ''
                                 this.getList()
                             })
                     }
@@ -537,9 +552,9 @@ export default {
                 currentPage: this.currentPage,
                 pageSize: this.pageSize,
                 searchType: 1,
-                startDate: "",
-                endDate: "",
-                searchKeyWord: "",
+                startDate: '',
+                endDate: '',
+                searchKeyWord: '',
             })
                 .toPromise()
                 .then((response) => {