ccjgmwz 3 years ago
parent
commit
cc6f202538

+ 5 - 17
src/views/home/index.vue

@@ -561,33 +561,21 @@ export default {
           console.log('value:',value);
 
           var result='';
-          //2。获取16进制字符串
-          // var receData = HexConvert.ByteToString(value);
-          // console.log("receData",receData);
           var flag = false;
-          for(var i=0;i<value.length;i++){
-              console.log('value[0]',value[0])
+          for (var i = value.length - 1; i >= 0; i--) {
             var tmp = String.fromCharCode(value[i])
-            if(value[0] != 49 && value[0] != 2){
-              break
-            }
-            if (tmp == String.fromCharCode(32) ) {
+            if (tmp == '=') {
               flag = true
             }
-            if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
-              // if(i-1 >=0 &&tmp == String.fromCharCode(48) && value[i-1] == 32){
-              //   continue
-              // }
-              // if(i-2 >=0 &&tmp == String.fromCharCode(48) && value[i-2] == 32){
-              //   continue
-              // }
+            if (flag && result.length < 9 && tmp != '=') {
               result += tmp
             }
           }
+          
           setTimeout(1000)
           if(parseInt(result)){
             console.log('result:',result);
-            this.text = parseInt(result)*100
+            this.text = parseInt(result)
           }
           console.log('this.text:',this.text);
           

+ 32 - 32
src/views/houseSelfCollect/customerManagementAdd.vue

@@ -300,25 +300,25 @@
         this.identityLow = 'low'
         this.identity[1] = e.url
         this.imageUrl2 = e.url
-        getIdentity({
-            personImg: e.url
-          })
-          .toPromise()
-          .then((response) => {
-            if (response.recPerson ) {
-                this.$set( this.customerList,'customerName',response.recPerson)
-                this.$set( this.customerList,'payeeName',response.recPerson)
-            }
+        // getIdentity({
+        //     personImg: e.url
+        //   })
+        //   .toPromise()
+        //   .then((response) => {
+        //     if (response.recPerson ) {
+        //         this.$set( this.customerList,'customerName',response.recPerson)
+        //         this.$set( this.customerList,'payeeName',response.recPerson)
+        //     }
             
-            if (response.recPersonNo ) {
-              this.$set( this.customerList,'customerNumberCard',response.recPersonNo)
-               this.$set( this.customerList,'payeeNumberCard',response.recPersonNo)
-            }
+        //     if (response.recPersonNo ) {
+        //       this.$set( this.customerList,'customerNumberCard',response.recPersonNo)
+        //        this.$set( this.customerList,'payeeNumberCard',response.recPersonNo)
+        //     }
             
-            if (response.recPersonAddr ) {
-              this.$set( this.customerList,'compAddress',response.recPersonAddr)
-            }
-          })
+        //     if (response.recPersonAddr ) {
+        //       this.$set( this.customerList,'compAddress',response.recPersonAddr)
+        //     }
+        //   })
       },
       bankSuccess1(e) {
         this.bankUps = 'bankUp'
@@ -344,21 +344,21 @@
         this.bankLows = 'bankLow'
         this.bank[1] = e.url
         this.imageUrl4 = e.url
-        getBank({
-            bankImg: e.url
-          })
-          .toPromise()
-          .then((response) => {
-             if (response.bankNameZhihang) {
-              this.bankList = response.bankNameZhihang
-            }
-            if (response.bankNo) {
-              this.$set(this.customerList,'bankCard',response.bankNo)
-            }
-            if (response.bankName) {
-              this.$set(this.customerList,'bankDeposit',response.bankName)
-            }
-          })
+        // getBank({
+        //     bankImg: e.url
+        //   })
+        //   .toPromise()
+        //   .then((response) => {
+        //      if (response.bankNameZhihang) {
+        //       this.bankList = response.bankNameZhihang
+        //     }
+        //     if (response.bankNo) {
+        //       this.$set(this.customerList,'bankCard',response.bankNo)
+        //     }
+        //     if (response.bankName) {
+        //       this.$set(this.customerList,'bankDeposit',response.bankName)
+        //     }
+        //   })
       },
       commit() {
         if (!this.imageUrl1) {

+ 26 - 5
src/views/houseSelfCollect/weightCheck.vue

@@ -111,7 +111,7 @@
             </el-table>
             <div style="text-align: center">
               <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                :current-page="currentPage" page-size="100"
+                :current-page="currentPage" :page-size="pageSize"
                 layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
               </el-pagination>
             </div>
@@ -185,14 +185,12 @@
     data() {
       return {
         currentPage: 1,
-        pageSize: 10,
+        pageSize: 100,
         deptCircularPage: {},
         deptBudgetTotal: 0,
         pList: [],
         mList: [],
         index: 0,
-        currentPage: 1,
-        pageSize: 10,
         carList: [],
         carWeightInfo: {
           carNumber: '',
@@ -482,7 +480,28 @@
                   this.weighingList.tare = parseInt(result)
                 }
               }
-            } else {
+            }
+            else if (this.warehouseName && (this.warehouseName == '顺城粮库')) {
+              for (var i = value.length - 1; i >= 0; i--) {
+                var tmp = String.fromCharCode(value[i])
+                if (tmp == '=') {
+                  flag = true
+                }
+                if (flag && result.length < 9 && tmp != '=') {
+                  result += tmp
+                }
+              }
+              if (this.tpyeNo != 2) {
+                if (parseInt(result) || parseInt(result) == 0) {
+                  this.weighingList.grossWeight = parseInt(result)
+                }
+              } else {
+                if (parseInt(result) || parseInt(result) == 0) {
+                  this.weighingList.tare = parseInt(result)
+                }
+              }
+            }
+            else {
               for(var i=0;i<value.length;i++){
                 var tmp = String.fromCharCode(value[i])
                 
@@ -706,6 +725,7 @@
                           grossWeight(this.weighingList)
                           .toPromise()
                           .then((response) => {
+                            this.reader.cancel()
                             this.$notify.success({
                               title: '成功',
                               message: '保存成功',
@@ -732,6 +752,7 @@
               tare(this.weighingList)
                 .toPromise()
                 .then((response) => {
+                  this.reader.cancel()
                   this.$notify.success({
                     title: '成功',
                     message: '保存成功',

+ 20 - 0
src/views/outboundManagement/weighing.vue

@@ -233,6 +233,26 @@
 						}
 					}
 				}
+				else if (this.warehouseName && (this.warehouseName == '顺城粮库')) {
+					for (var i = value.length - 1; i >= 0; i--) {
+						var tmp = String.fromCharCode(value[i])
+						if (tmp == '=') {
+							flag = true
+						}
+						if (flag && result.length < 9 && tmp != '=') {
+							result += tmp
+						}
+					}
+					if (this.tpyeNo != 2) {
+						if (parseInt(result) || parseInt(result) == 0) {
+							this.weighingList.grossWeight = parseInt(result)
+						}
+					} else {
+						if (parseInt(result) || parseInt(result) == 0) {
+							this.weighingList.tare = parseInt(result)
+						}
+					}
+				}
 				else{
 					for(var i=0;i<value.length;i++){
 						var tmp = String.fromCharCode(value[i])

+ 25 - 4
src/views/warehouse/warehouseManagementGross.vue

@@ -353,8 +353,8 @@
           warehouseInOutDetail: {},
           deductionAmount: 0,
           deductionWeight: 0,
-          grossWeight: "",
-          tare: "",
+          grossWeight: '',
+          tare: '',
         },
         historyList: [],
         cost: '',
@@ -461,7 +461,7 @@
             // }
             console.log('value:', value);
             if (this.deptBudgetList.warehouseName && (this.deptBudgetList.warehouseName == '山东诸城迈饶库' || this
-                .deptBudgetList.warehouseName == '克东千红库' || this.warehouseName == '鲅鱼圈祥腾库')) {
+                .deptBudgetList.warehouseName == '克东千红库' || this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库')) {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
                 if (tmp == '+') {
@@ -480,7 +480,28 @@
                   this.deptBudgetList.tare = parseInt(result)
                 }
               }
-            } else {
+            } 
+            else if (this.deptBudgetList.warehouseName && (this.deptBudgetList.warehouseName == '顺城粮库')) {
+              for (var i = value.length - 1; i >= 0; i--) {
+                var tmp = String.fromCharCode(value[i])
+                if (tmp == '=') {
+                  flag = true
+                }
+                if (flag && result.length < 9 && tmp != '=') {
+                  result += tmp
+                }
+              }
+              if (this.information == '毛重检斤') {
+                if (parseInt(result) || parseInt(result) == 0) {
+                  this.deptBudgetList.grossWeight = parseInt(result)
+                }
+              } else {
+                if (parseInt(result) || parseInt(result) == 0) {
+                  this.deptBudgetList.tare = parseInt(result)
+                }
+              }
+            }
+            else {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
 

+ 18 - 3
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -493,8 +493,8 @@
             // if(parseInt(result)){
             //     this.dataList.tare = parseInt(result)
             // }
-            if (this.deptBudgetList1.warehouseName && (this.deptBudgetList.warehouseName == '山东诸城迈饶库' || this
-                .deptBudgetList.warehouseName == '克东千红库' || this.warehouseName == '鲅鱼圈祥腾库')) {
+            if (this.deptBudgetList1.warehouseName && (this.deptBudgetList1.warehouseName == '山东诸城迈饶库' || this
+                .deptBudgetList1.warehouseName == '克东千红库' || this.deptBudgetList1.warehouseName == '鲅鱼圈祥腾库')) {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
                 if (tmp == '+') {
@@ -507,7 +507,22 @@
               if (parseInt(result) || parseInt(result) == 0) {
                 this.dataList.tare = parseInt(result)
               }
-            } else {
+            }
+            else if (this.deptBudgetList1.warehouseName && (this.deptBudgetList1.warehouseName == '顺城粮库')) {
+              for (var i = value.length - 1; i >= 0; i--) {
+                var tmp = String.fromCharCode(value[i])
+                if (tmp == '=') {
+                  flag = true
+                }
+                if (flag && result.length < 9 && tmp != '=') {
+                  result += tmp
+                }
+              }
+              if (parseInt(result) || parseInt(result) == 0) {
+                this.dataList.tare = parseInt(result)
+              }
+            }
+            else {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
 

+ 17 - 2
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -430,7 +430,7 @@
             //     this.dataList.grossWeight = parseInt(result)
             // }
             if (this.deptBudgetList1.warehouseName && (this.deptBudgetList.warehouseName == '山东诸城迈饶库' || this
-                .deptBudgetList.warehouseName == '克东千红库' || this.warehouseName == '鲅鱼圈祥腾库')) {
+                .deptBudgetList1.warehouseName == '克东千红库' || this.deptBudgetList1.warehouseName == '鲅鱼圈祥腾库')) {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
                 if (tmp == '+') {
@@ -443,7 +443,22 @@
               if (parseInt(result) || parseInt(result) == 0) {
                 this.dataList.grossWeight = parseInt(result)
               }
-            } else {
+            }
+            else if (this.deptBudgetList1.warehouseName && (this.deptBudgetList1.warehouseName == '顺城粮库')) {
+              for (var i = value.length - 1; i >= 0; i--) {
+                var tmp = String.fromCharCode(value[i])
+                if (tmp == '=') {
+                  flag = true
+                }
+                if (flag && result.length < 9 && tmp != '=') {
+                  result += tmp
+                }
+              }
+              if (parseInt(result) || parseInt(result) == 0) {
+                this.dataList.grossWeight = parseInt(result)
+              }
+            }
+            else {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
 

+ 23 - 2
src/views/warehouse/warehouseManagementTare.vue

@@ -390,7 +390,7 @@
             //   }
             // }
             if (this.deptBudgetList.warehouseName && (this.deptBudgetList.warehouseName == '山东诸城迈饶库' || this
-                .deptBudgetList.warehouseName == '克东千红库' || this.warehouseName == '鲅鱼圈祥腾库')) {
+                .deptBudgetList.warehouseName == '克东千红库' || this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库')) {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
                 if (tmp == '+') {
@@ -409,7 +409,28 @@
                   this.deptBudgetList.tare = parseInt(result)
                 }
               }
-            } else {
+            }
+            else if (this.deptBudgetList.warehouseName && (this.deptBudgetList.warehouseName == '顺城粮库')) {
+              for (var i = value.length - 1; i >= 0; i--) {
+                var tmp = String.fromCharCode(value[i])
+                if (tmp == '=') {
+                  flag = true
+                }
+                if (flag && result.length < 9 && tmp != '=') {
+                  result += tmp
+                }
+              }
+              if (this.information == '毛重检斤') {
+                if (parseInt(result) || parseInt(result) == 0) {
+                  this.deptBudgetList.grossWeight = parseInt(result)
+                }
+              } else {
+                if (parseInt(result) || parseInt(result) == 0) {
+                  this.deptBudgetList.tare = parseInt(result)
+                }
+              }
+            }
+            else {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])