Browse Source

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

gjy 3 years ago
parent
commit
4af7c30982

+ 1 - 1
public/static/weightCheck.html

@@ -167,7 +167,7 @@
             <td class="col">{{tableData.qualityInspectionManagement.impurity}}</td>
             <td class="col col-bgc">霉变粒(%)</td>
             <td class="col">{{tableData.qualityInspectionManagement.mildewGrain}}</td>
-            <td class="col col-bgc">扣杂(公斤)</td>
+            <td class="col col-bgc">扣杂</td>
             <td class="col">{{tableData.qualityInspectionManagement.buckleMiscellaneous}}</td>
             <td class="col col-bgc">净重(公斤)</td>
             <td class="col">{{tableData.netWeight}}</td>

+ 2 - 0
src/api/V2/houseSelfCollect/index.js

@@ -82,3 +82,5 @@ export const API_POST_PAYMENT_SETTLEMENTEDIT = '/paymentManagement/api/editColle
 export const API_GET_INSPECT_GETDRYGRAINPRICE = '/purchasePrice/dryGrainPrice'
 //付款权限查询
 export const API_GET_INSPECT_GETJURISDICTION = '/paymentManagement/selectTaskId'
+//财务开票
+export const API_POST_INVOICING = '/paymentManagement/readXmlManagement'

+ 4 - 1
src/model/houseSelfCollect/index.js

@@ -42,7 +42,8 @@ import {
   API_GET_CUSTOMER_CODE,
   API_GET_CUSTOMER_CODEJY,
   API_GET_INSPECT_GETDRYGRAINPRICE,
-  API_GET_INSPECT_GETJURISDICTION
+  API_GET_INSPECT_GETJURISDICTION,
+  API_POST_INVOICING
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -128,3 +129,5 @@ export const settlementEdit = appRx.post(API_POST_PAYMENT_SETTLEMENTEDIT, errorC
 export const getDryGrainPrice = appRx.get(API_GET_INSPECT_GETDRYGRAINPRICE, errorCatcher, errorHandle, filter)
 //付款权限查询
 export const getJurisdiction  = appRx.get(API_GET_INSPECT_GETJURISDICTION, errorCatcher, errorHandle, filter)
+//财务开票
+export const invoicing  = appRx.post(API_POST_INVOICING, errorCatcher, errorHandle, filter)

+ 22 - 6
src/views/home/index.vue

@@ -118,7 +118,7 @@ export default {
       },
       vesselBankFlag: sessionStorage.getItem('ws-pf_vesselBankFlag'),
       shezhiVal: '',
-      text:"数据",
+      text:'数据',
       reader:null,
       param:9600
     }
@@ -554,28 +554,44 @@ export default {
         // 监听来自串行设备的数据
         while (true) {
           const { value, done } = await this.reader.read();
-          // console.log("value",value);
           if (done) {
             // 允许稍后关闭串口。
             this.reader.releaseLock();
             break;
           }
-          var result="";
+          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])
             var tmp = String.fromCharCode(value[i])
-            if(tmp == "+"){
+            if(value[0] != 49 && value[0] != 2){
+              break
+            }
+            if (tmp == String.fromCharCode(32) ) {
               flag = true
             }
-            if(flag && result.length <7){
+            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
+              // }
               result += tmp
             }
           }
-          this.text = parseInt(result)
           setTimeout(1000)
+          if(parseInt(result)){
+            console.log('result:',result);
+            this.text = parseInt(result)*100
+          }
+          console.log('this.text:',this.text);
+          
           // value 是一个 Uint8Array
         }
          await port.close();

+ 1 - 1
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -290,7 +290,7 @@ export default {
              _data.allowEdit = 0
            } 
             sessionStorage.setItem('houseSelfCollect_house',JSON.stringify(_data))
-           
+            this.getWarehouseSelf()
           // this.tableData = response.records
         })
     },

+ 4 - 5
src/views/houseSelfCollect/component/weightCheckPrint.vue

@@ -43,18 +43,17 @@
             <td class="col">{{tableData.qualityInspectionManagement.impurity}}</td>
             <td class="col col-bgc">霉变粒(%)</td>
             <td class="col">{{tableData.qualityInspectionManagement.mildewGrain}}</td>
-            <td class="col col-bgc">扣杂(公斤)</td>
+            <td class="col col-bgc">扣杂</td>
             <td class="col">{{tableData.qualityInspectionManagement.buckleMiscellaneous}}</td>
-            <td class="col col-bgc">净重(公斤)</td>
-            <td class="col">{{tableData.netWeight}}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc">毛重(公斤)</td>
             <td class="col">{{tableData.grossWeight}}</td>
             <td class="col col-bgc">皮重(公斤)</td>
             <td class="col">{{tableData.tare}}</td>
-            <td class="col " colspan="4"></td>
-           
+            <!-- <td class="col " colspan="2"></td> -->
+            <td class="col col-bgc">净重(公斤)</td>
+            <td class="col">{{tableData.netWeight}}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc" colspan="2">毛重检斤时间</td>

+ 33 - 10
src/views/houseSelfCollect/paymentManagement.vue

@@ -15,7 +15,7 @@
               class="label-width"
               @change="selectType($event)"
             ></el-checkbox>
-            <el-checkbox label="打印发票" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
+            <!-- <el-checkbox label="打印发票" name="type" class="label-width" @change="selectType($event)"></el-checkbox> -->
           </el-checkbox-group>
         </div>
       </div>
@@ -43,6 +43,7 @@
         <ws-button :type="searchType == -1 ? 'primary' : ''" @click="screen(-1)">全部</ws-button>
         <ws-button type="primary" @click="reject" v-if="isShowAdopt">驳回</ws-button>
         <ws-button type="primary" @click="adopt" v-if="isShowAdopt">通过</ws-button>
+        <ws-button type="primary" @click="invoicingClick" v-if="isShowAdopt" v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">开票</ws-button>
         <!-- <ws-button type="primary" @click="handlepass" v-if="isShowAdopt">审核</ws-button> -->
         <ws-button
           type="primary"
@@ -103,7 +104,7 @@
       <el-table-column class="table_td" prop="paymentNo" width="100" label="编号"></el-table-column>
       <el-table-column class="table_td" prop="customerName" label="客户"></el-table-column>
       <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
-      <el-table-column class="table_td" prop="goodsName" width="60" label="货名"></el-table-column>
+      <el-table-column class="table_td" prop="goodsName" width="100" label="货名"></el-table-column>
       <el-table-column class="table_td" prop="type" width="60" label="类型"></el-table-column>
       <el-table-column class="table_td" prop="tidalGrainPrice" width="140" label="净重单价(元/公斤)"></el-table-column>
       <el-table-column class="table_td" prop="unitDeduction" width="130" label="扣单价(元/公斤)"></el-table-column>
@@ -149,6 +150,14 @@
             @click="print(scope.row)"
             v-hasPermission="`acquisitionManagement.acquisitionPay.print`"
           >打印</el-button>
+             <el-button
+            v-if="
+              scope.row.approveStatus ||
+              (scope.row.status != '待结算' && !scope.row.approveStatus)
+            "
+            @click="print(scope.row)"
+            v-hasPermission="`acquisitionManagement.acquisitionPay.finace`"
+          >财务打印</el-button>
           <el-button
             type="danger"
             v-if="
@@ -249,7 +258,8 @@ import {
   getpaymentexamine,
   getCustomerLook,
   paymentCommit,
-  getJurisdiction
+  getJurisdiction,
+  invoicing
 } from '@/model/houseSelfCollect/index'
 import { posthandle } from '@/model/purchasingManagement/index'
 import paymentPrint from './component/paymentPrint.vue'
@@ -311,7 +321,8 @@ export default {
       isShowAdopt: false,
       //上传截图路径
       imageUrl: '',
-      payImg: []
+      payImg: [],
+      rowData:{}
     }
   },
   activated() {
@@ -320,6 +331,17 @@ export default {
     // this.getList()
   },
   methods: {
+    invoicingClick(){
+      let data = JSON.stringify(this.modification)
+      console.log("开票",this.modification)
+      //开票
+        invoicing(data)
+        .toPromise()
+        .then(response => {
+          console.log(response)
+    
+        })
+    },
     selectType(val) {
       console.log(val)
       console.log(this.ruleForm.type)
@@ -345,7 +367,7 @@ export default {
     typePrintClick() {
       //  this.isShowPrint = true
       getCustomerLook({
-        id: this.row.identityAuthenticationInfo.id,
+        id: this.rowData.identityAuthenticationInfo.id,
         authenticationStatusKey: 7
       })
         .toPromise()
@@ -357,7 +379,7 @@ export default {
           this.imageUrl2 = this.identity[1]
           this.imageUrl3 = this.bank[0]
           this.imageUrl4 = this.bank[1]
-          getpaymentexamine({ id: this.row.id })
+          getpaymentexamine({ id: this.rowData.id })
             .toPromise()
             .then(response => {
               this.printData = response
@@ -557,6 +579,7 @@ export default {
         })
     },
     payment() {
+      this.imageUrl = ''
       if (this.modification.length == 0) {
         this.$message.warning('请选择要付款的条目')
       } else {
@@ -566,7 +589,7 @@ export default {
           sum += this.modification[i].amountIngPayable
           count += this.modification[i].amountEdPayable
         }
-        this.payments.amountNotPayable = sum - count
+        this.payments.amountNotPayable = (sum - count).toFixed(2)
         this.paymentForm = true
       }
     },
@@ -707,11 +730,11 @@ export default {
           })
       }
     },
-    print(row) {
+    print(row) {debugger
       console.log('打印数据', row)
       if (sessionStorage.getItem('ws-pf_roleName') == '财务') {
         this.isShowPrintType = true
-        this.row = row
+        this.rowData = row
       } else {
         getpaymentexamine({ id: row.id })
           .toPromise()
@@ -919,7 +942,7 @@ table {
   right: 0;
   margin: auto;
   width: 200px;
-  height: 215px;
+  height: 200px;
   background: white;
   border-radius: 10px;
   z-index: 999;

+ 1 - 0
src/views/houseSelfCollect/weighingManagement.vue

@@ -188,6 +188,7 @@
 						monitorUrl2: this.monitorUrl2,
 						allowEdit: this.allowEdit,
 						cangid: this.cangid,
+						warehouseName:this.warehouseName,
 						paramType: row.qualityInspectionManagement.paramType
 					},
 				})

+ 50 - 13
src/views/houseSelfCollect/weightCheck.vue

@@ -216,7 +216,8 @@
         monitorUrl1: '',
         monitorUrl2: '',
         cangid:'',
-        paramType:'1'
+        paramType:'1',
+        warehouseName:''
       }
     },
     activated() {
@@ -225,6 +226,7 @@
       this.paramType = this.$route.query.paramType
       this.getList()
       this.tpyeNo = this.$route.query.tpyeNo
+      this.warehouseName = this.$route.query.warehouseName
       this.weighingList.number = this.$route.query.number
       this.weighingList.binNumber = this.$route.query.binNumber
       this.weighingList.customer = this.$route.query.customer
@@ -367,6 +369,8 @@
         }
       },
       tabClick(val) {
+        this.carWeightInfo.carNumber = ''
+        this.weighingList = []
         this.index = val
         if (this.information == '皮重') {
           this.information = '毛重'
@@ -405,6 +409,7 @@
             baudRate: this.param
           }); // set baud rate
           this.reader = port.readable.getReader();
+          
           // 监听来自串行设备的数据
           while (true) {
             const {
@@ -422,24 +427,56 @@
             // var receData = HexConvert.ByteToString(value);
             // console.log("receData",receData);
             var flag = false;
-            for (var i = 0; i < value.length; i++) {
-              var tmp = String.fromCharCode(value[i])
-              if (tmp == '+') {
-                flag = true
+            if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
+              for (var i = 0; i < value.length; i++) {
+                var tmp = String.fromCharCode(value[i])
+                if (tmp == '+') {
+                  flag = true
+                }
+                if (flag && result.length < 6 && tmp != '+') {
+                  result += tmp
+                }
               }
-              if (flag && result.length < 6 && 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)
+                }
               }
             }
-            if (this.tpyeNo != 2) {
-              if(parseInt(result)){
-                this.weighingList.grossWeight = parseInt(result)
+            else{
+              for(var i=0;i<value.length;i++){
+                var tmp = String.fromCharCode(value[i])
+                if(value[0] != 49 && value[0] != 2){
+                  break
+                }
+                if (tmp == String.fromCharCode(32) ) {
+                  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
+                  // }
+                  result += tmp
+                }
               }
-            } else {
-              if(parseInt(result)){
-                this.weighingList.tare = parseInt(result)
+              if (this.tpyeNo != 2) {
+                if(parseInt(result)|| parseInt(result) == 0){
+                  this.weighingList.grossWeight = parseInt(result)*100
+                }
+              } else {
+                if(parseInt(result)|| parseInt(result) == 0){
+                  this.weighingList.tare = parseInt(result)*100
+                }
               }
             }
+            
             setTimeout(1000)
             // value 是一个 Uint8Array
           }

+ 59 - 10
src/views/outboundManagement/weighing.vue

@@ -198,20 +198,69 @@
 				// var receData = HexConvert.ByteToString(value);
 				// console.log("receData",receData);
 				var flag = false;
-				for(var i=0;i<value.length;i++){
-					var tmp = String.fromCharCode(value[i])
-					if(tmp == '+'){
-					flag = true
+				// for(var i=0;i<value.length;i++){
+				// 	var tmp = String.fromCharCode(value[i])
+				// 	if(tmp == '+'){
+				// 	flag = true
+				// 	}
+				// 	if(flag && result.length <6 && tmp != '+'){
+				// 	result += tmp
+				// 	}
+				// }
+				// if(this.tpyeNo != 2){
+				// 	this.weighingList.grossWeight = parseInt(result)
+				// }
+				// else{
+				// 	this.weighingList.tare = parseInt(result) 
+				// }
+				if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
+					for (var i = 0; i < value.length; i++) {
+						var tmp = String.fromCharCode(value[i])
+						if (tmp == '+') {
+						flag = true
+						}
+						if (flag && result.length < 6 && tmp != '+') {
+						result += tmp
+						}
 					}
-					if(flag && result.length <6 && 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)
+						}
 					}
 				}
-				if(this.tpyeNo != 2){
-					this.weighingList.grossWeight = parseInt(result)
-				}
 				else{
-					this.weighingList.tare = parseInt(result) 
+					for(var i=0;i<value.length;i++){
+						var tmp = String.fromCharCode(value[i])
+						if(value[0] != 49 && value[0] != 2){
+						break
+						}
+						if (tmp == String.fromCharCode(32) ) {
+						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
+						// }
+						result += tmp
+						}
+					}
+					if (this.tpyeNo != 2) {
+						if(parseInt(result)|| parseInt(result) == 0){
+						this.weighingList.grossWeight = parseInt(result)*100
+						}
+					} else {
+						if(parseInt(result)|| parseInt(result) == 0){
+						this.weighingList.tare = parseInt(result)*100
+						}
+					}
 				}
 				setTimeout(1000)
 				// value 是一个 Uint8Array

+ 6 - 14
src/views/statisticalReport/huoyunList.vue

@@ -50,7 +50,7 @@
           > -->
         </el-col>
         <el-col
-          style="text-align: right; line-height: 60px; padding-right: 10px;display: flex;"
+          style="display: flex; justify-content:flex-end;margin-top:13px"
           :span="14"
         >
           <el-select
@@ -76,7 +76,6 @@
             placeholder="请选择运输任务编号"
             clearable
             filterable
-           
             @change="taskNochange"
             maxlength="500"
             type="input"
@@ -106,17 +105,10 @@
               :label="item.processNoValue "
               :value="item.processNoValue"
             />
-            <!-- <el-option
-              v-if="!item.reportStatus"
-              v-for="item in options"
-              :key="item.constKey"
-              :label="item.contractNo"
-              :value="item.contractNo"
-            /> -->
           </el-select>
         </el-col>
       </el-row>
-      <div class="freightSet">
+      <div class="freightSet" v-if="actualFreight && tranPriceIng">
         <div style="display: flex;width:200px;line-height: 30px;"> 预计运费(元):{{tranPriceIng}}元</div>
         <span style="display: flex;line-height: 30px;">实际运费(元):<el-input type="text" maxlength="70" size="small"  v-model="actualFreight" v-show="textShow"/><span v-show="!textShow">{{actualFreight}}</span>元</span>
         <i @click="actualFreightchange" class="iconfont icon-dui" v-show="textShow" style="margin-top:10px"></i>
@@ -1325,10 +1317,6 @@ export default {
   border-top-left-radius: 0px;
   border-bottom-left-radius: 0px;
 }
-/deep/.findValue .el-input__inner {
-  width: 300px;
-
-}
 .completed.el-button--default {
   border-color: #5878e8;
   background-color: #f6f7fc;
@@ -1550,4 +1538,8 @@ hr {
 /deep/.freightSet .el-input{
   width: 44%;
 }
+.findValue{
+  width: 300px;
+  margin-left: 5px;
+}
 </style>

+ 5 - 11
src/views/statisticalReport/shippingList.vue

@@ -106,17 +106,10 @@
               :label="item.processNoValue "
               :value="item.processNoValue"
             />
-            <!-- <el-option
-              v-if="!item.reportStatus"
-              v-for="item in options"
-              :key="item.constKey"
-              :label="item.contractNo"
-              :value="item.contractNo"
-            /> -->
           </el-select>
         </el-col>
       </el-row>
-       <div class="freightSet">
+       <div class="freightSet" v-if="actualFreight && tranPriceIng">
         <div style="display: flex;width:200px;line-height: 30px;"> 预计运费(元):{{tranPriceIng}}元</div>
         <span style="display: flex;line-height: 30px;">实际运费(元):<el-input type="text" maxlength="70" size="small"  v-model="actualFreight" v-show="textShow"/><span v-show="!textShow">{{actualFreight}}</span>元</span>
         <i @click="actualFreightchange" class="iconfont icon-dui" v-show="textShow" style="margin-top:10px"></i>
@@ -1331,9 +1324,6 @@ export default {
   border-top-left-radius: 0px;
   border-bottom-left-radius: 0px;
 }
-/deep/.findValue .el-input__inner {
-  width: 300px;
-}
 .completed.el-button--default {
   border-color: #5878e8;
   background-color: #f6f7fc;
@@ -1558,4 +1548,8 @@ hr {
 /deep/.freightSet .el-input{
   width: 44%;
 }
+.findValue{
+  width: 300px;
+  margin-left: 5px;
+}
 </style>

+ 1 - 1
src/views/taskManagement/tranManagementWarehouseInOutTask.vue

@@ -82,7 +82,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="establishDate" class="table_td" label="创建时间"></el-table-column>
-        <el-table-column prop="seller" label="操作" width="180">
+        <el-table-column prop="seller" label="操作" width="230">
           <template slot-scope="scope">
             <span class="corles" @click="nocomplete(scope.row)" v-hasPermission="
                 `warehouseManagement.warehouse.warehouseInfoTask.View`

+ 11 - 11
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -109,12 +109,12 @@
 							value-format="yyyy-MM-dd" />
 					</el-form-item>
 					<!--经办人-->
-					<!-- <el-form-item label="出库经办人">
-            <el-select v-model="dataList.agent" placeholder="请选择经办人" filterable
+					<el-form-item label="发货人">
+            <el-select v-model="dataList.agent" placeholder="请选择发货人" filterable
               @change="selectstaff">
               <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
             </el-select>
-          </el-form-item> -->
+          </el-form-item>
 					<!--业务描述=-->
 					<el-form-item v-if="dataList.taskTypeKey != 3" label="业务描述" span="20">
 						<el-input v-model="dataList.businessDescribe" placeholder="请输入业务描述(运输方式),不超过150字"
@@ -209,13 +209,13 @@
 						<el-date-picker v-model="dataList1.predictDate" type="date" placeholder="请选择预计入库日期"
 							value-format="yyyy-MM-dd" />
 					</el-form-item>
-					<!--经办人-->
-					<!-- <el-form-item label="入库经办人">
-            <el-select v-model="dataList1.agent" placeholder="请选择经办人" filterable :filter-method="dataFilter1"
+					<!-- 经办人-->
+					<el-form-item label="收货人">
+            <el-select v-model="dataList1.agent" placeholder="请选择收货人" filterable :filter-method="dataFilter1"
               @change="selectstaff1">
               <el-option v-for="item in options1" :key="item.value" :label="item.staffName" :value="item.staffName" />
             </el-select>
-          </el-form-item> -->
+          </el-form-item>
 					<!--业务描述=-->
 					<el-form-item v-if="dataList.taskTypeKey != 4" label="业务描述">
 						<el-input v-model="dataList1.businessDescribe" placeholder="请输入业务描述(运输方式),不超过150字"
@@ -312,13 +312,13 @@
 						<el-date-picker v-model="dataList.predictDate" type="date" placeholder="请选择预计出库日期"
 							value-format="yyyy-MM-dd" />
 					</el-form-item>
-					<!--经办人-->
-					<!-- <el-form-item label="出库经办人">
-            <el-select v-model="dataList.agent" placeholder="请选择经办人" filterable
+					<!--发货人-->
+					<el-form-item label="发货人">
+            <el-select v-model="dataList.agent" placeholder="请选择发货人" filterable
               @change="selectstaff">
               <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
             </el-select>
-          </el-form-item> -->
+          </el-form-item>
 					<!--业务描述=-->
 					<el-form-item label="业务描述">
 						<el-input v-model="dataList.businessDescribe" placeholder="请输入业务描述(运输方式),不超过150字"

+ 0 - 2
src/views/tranManagement/tranManagementReceivingloading.vue

@@ -541,11 +541,9 @@ export default {
           // _this.freightspace.concat(arr)
           let _ispushData = true
           console.log(arr, _this.deptBudgetList.tranCarInfoList)
-          // debugger
           for (let i = 0; i < _this.excelFreightspace.length; i++) {
             _ispushData = true
             for (let k = 0; k < _this.deptBudgetList.tranCarInfoList.length; k++) {
-              debugger
               if (
                 _this.excelFreightspace[i].driverPhone ==
                 _this.deptBudgetList.tranCarInfoList[k].driverPhone

+ 63 - 11
src/views/warehouse/warehouseManagementGross.vue

@@ -662,6 +662,7 @@ export default {
       },
       accessoryTFs: false,
       allowEdit: true,
+      param: 9600,
       information:''
     }
   },
@@ -737,22 +738,73 @@ export default {
           // var receData = HexConvert.ByteToString(value);
           // console.log("receData",receData);
           var flag = false;
-          for (var i = 0; i < value.length; i++) {
-            var tmp = String.fromCharCode(value[i])
-            if (tmp == '+') {
+          // for (var i = 0; i < value.length; i++) {
+          //   var tmp = String.fromCharCode(value[i])
+          //   if (tmp == '+') {
+          //     flag = true
+          //   }
+          //   if (flag && result.length < 6 && tmp != '+') {
+          //     result += tmp
+          //   }
+          // }
+          // if (this.information != '毛重检斤') {
+          //   if(parseInt(result)){
+          //     this.deptBudgetList.grossWeight = parseInt(result)
+          //   }
+          // } else {
+          //   if(parseInt(result)){
+          //     this.deptBudgetList.tare = parseInt(result)
+          //   }
+          // }
+          console.log('value:',value);
+
+          if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
+            for (var i = 0; i < value.length; i++) {
+              var tmp = String.fromCharCode(value[i])
+              if (tmp == '+') {
               flag = true
-            }
-            if (flag && result.length < 6 && tmp != '+') {
+              }
+              if (flag && result.length < 6 && 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)
+              }
             }
           }
-          if (this.information != '毛重检斤') {
-            if(parseInt(result)){
-              this.deptBudgetList.grossWeight = parseInt(result)
+          else{
+            for(var i=0;i<value.length;i++){
+              var tmp = String.fromCharCode(value[i])
+              if(value[0] != 49 && value[0] != 2){
+              break
+              }
+              if (tmp == String.fromCharCode(32) ) {
+              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
+              // }
+              result += tmp
+              }
             }
-          } else {
-            if(parseInt(result)){
-              this.deptBudgetList.tare = parseInt(result)
+            if (this.information != '毛重检斤') {
+              if(parseInt(result)|| parseInt(result) == 0){
+              this.deptBudgetList.grossWeight = parseInt(result)*100
+              }
+            } else {
+              if(parseInt(result)|| parseInt(result) == 0){
+              this.deptBudgetList.tare = parseInt(result)*100
+              }
             }
           }
           setTimeout(1000)

+ 1 - 1
src/views/warehouse/warehouseManagementIoss.vue

@@ -246,7 +246,7 @@ export default {
         var num = 0
       } else {
         // .占比=损耗量÷(累计入库-实际库存)
-        num = Math.floor((loss / defect) * 1000000) / 1000
+        num = ((loss / defect)*100).toFixed(3)
       }
       // this.deptBudgetList.inventoryRatio = this.deptBudgetList.inventoryRatio.toFixed(3)
       //  this.deptBudgetList.inventoryRatio = num

+ 45 - 7
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -593,6 +593,7 @@ export default {
         },
       },
       accessoryTFs: false,
+      param: 9600,
       allowEdit:true
     }
   },
@@ -686,17 +687,54 @@ export default {
           // var receData = HexConvert.ByteToString(value);
           // console.log("receData",receData);
           var flag = false;
-          for (var i = 0; i < value.length; i++) {
-            var tmp = String.fromCharCode(value[i])
-            if (tmp == '+') {
+          // for (var i = 0; i < value.length; i++) {
+          //   var tmp = String.fromCharCode(value[i])
+          //   if (tmp == '+') {
+          //     flag = true
+          //   }
+          //   if (flag && result.length < 6 && tmp != '+') {
+          //     result += tmp
+          //   }
+          // }
+          // if(parseInt(result)){
+          //     this.dataList.tare = parseInt(result)
+          // }
+          if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
+            for (var i = 0; i < value.length; i++) {
+              var tmp = String.fromCharCode(value[i])
+              if (tmp == '+') {
               flag = true
-            }
-            if (flag && result.length < 6 && tmp != '+') {
+              }
+              if (flag && result.length < 6 && tmp != '+') {
               result += tmp
+              }
             }
-          }
-          if(parseInt(result)){
+            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])
+              if(value[0] != 49 && value[0] != 2){
+              break
+              }
+              if (tmp == String.fromCharCode(32) ) {
+              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
+              // }
+              result += tmp
+              }
+            }
+            if(parseInt(result)|| parseInt(result) == 0){
+              this.dataList.tare = parseInt(result)*100
+            }
           }
           setTimeout(1000)
           // value 是一个 Uint8Array

+ 45 - 7
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -505,6 +505,7 @@ export default {
         },
       },
       accessoryTFs: false,
+      param: 9600,
       allowEdit:true
     }
   },
@@ -580,17 +581,54 @@ export default {
           // var receData = HexConvert.ByteToString(value);
           // console.log("receData",receData);
           var flag = false;
-          for (var i = 0; i < value.length; i++) {
-            var tmp = String.fromCharCode(value[i])
-            if (tmp == '+') {
+          // for (var i = 0; i < value.length; i++) {
+          //   var tmp = String.fromCharCode(value[i])
+          //   if (tmp == '+') {
+          //     flag = true
+          //   }
+          //   if (flag && result.length < 6 && tmp != '+') {
+          //     result += tmp
+          //   }
+          // }
+          // if(parseInt(result)){
+          //     this.dataList.grossWeight = parseInt(result)
+          // }
+          if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
+            for (var i = 0; i < value.length; i++) {
+              var tmp = String.fromCharCode(value[i])
+              if (tmp == '+') {
               flag = true
-            }
-            if (flag && result.length < 6 && tmp != '+') {
+              }
+              if (flag && result.length < 6 && tmp != '+') {
               result += tmp
+              }
             }
-          }
-          if(parseInt(result)){
+            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])
+              if(value[0] != 49 && value[0] != 2){
+              break
+              }
+              if (tmp == String.fromCharCode(32) ) {
+              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
+              // }
+              result += tmp
+              }
+            }
+            if(parseInt(result)|| parseInt(result) == 0){
+              this.dataList.grossWeight = parseInt(result)*100
+            }
           }
           setTimeout(1000)
           // value 是一个 Uint8Array

+ 61 - 11
src/views/warehouse/warehouseManagementTare.vue

@@ -481,6 +481,7 @@ export default {
       },
       accessoryTFs: false,
       allowEdit: true,
+      param: 9600,
       information:''
     }
   },
@@ -538,22 +539,71 @@ export default {
           // var receData = HexConvert.ByteToString(value);
           // console.log("receData",receData);
           var flag = false;
-          for (var i = 0; i < value.length; i++) {
-            var tmp = String.fromCharCode(value[i])
-            if (tmp == '+') {
+          // for (var i = 0; i < value.length; i++) {
+          //   var tmp = String.fromCharCode(value[i])
+          //   if (tmp == '+') {
+          //     flag = true
+          //   }
+          //   if (flag && result.length < 6 && tmp != '+') {
+          //     result += tmp
+          //   }
+          // }
+          // if (this.information != '毛重检斤') {
+          //   if(parseInt(result)){
+          //     this.deptBudgetList.grossWeight = parseInt(result)
+          //   }
+          // } else {
+          //   if(parseInt(result)){
+          //     this.deptBudgetList.tare = parseInt(result)
+          //   }
+          // }
+          if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
+            for (var i = 0; i < value.length; i++) {
+              var tmp = String.fromCharCode(value[i])
+              if (tmp == '+') {
               flag = true
-            }
-            if (flag && result.length < 6 && tmp != '+') {
+              }
+              if (flag && result.length < 6 && 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)
+              }
             }
           }
-          if (this.information != '毛重检斤') {
-            if(parseInt(result)){
-              this.deptBudgetList.grossWeight = parseInt(result)
+          else{
+            for(var i=0;i<value.length;i++){
+              var tmp = String.fromCharCode(value[i])
+              if(value[0] != 49 && value[0] != 2){
+              break
+              }
+              if (tmp == String.fromCharCode(32) ) {
+              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
+              // }
+              result += tmp
+              }
             }
-          } else {
-            if(parseInt(result)){
-              this.deptBudgetList.tare = parseInt(result)
+            if (this.information != '毛重检斤') {
+              if(parseInt(result) || parseInt(result) == 0){
+                this.deptBudgetList.grossWeight = parseInt(result)*100
+              }
+            } else {
+              if(parseInt(result)|| parseInt(result) == 0){
+                this.deptBudgetList.tare = parseInt(result)*100
+              }
             }
           }
           setTimeout(1000)