Browse Source

前端sdy

zhongtianhaoyuan 3 years ago
parent
commit
2aa1056e67

BIN
public/img/zuobiao.gif


+ 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'

+ 87 - 13
src/components/mapdrag/mapdrag.vue

@@ -2,6 +2,17 @@
 .mapContent {
   position: relative;
   margin-top: 80px;
+  .center-add{
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+    z-index: 999;
+    width: 30px;
+    height: 30px;
+  }
 }
 #mapContainer {
   width: 100%;
@@ -49,6 +60,11 @@
 
 <template>
   <div class="mapContent">
+     <img
+        class='center-add'
+        src="../../../public/img/zuobiao.gif"
+        alt=""
+          />
     <div id="mapContainer"></div>
     <div id="tip" v-show="showFlag === false ? false : true">
       <el-select v-model="province" @change="selectP" placeholder="省">
@@ -78,7 +94,7 @@
         >
         </el-option>
       </el-select>
-     
+      <el-button>经纬度:{{center}}</el-button>
       <el-button @click="positions" type="primary" v-if='!isShowaddress'>确定定位</el-button>
       <el-button @click="anewselect" v-if='!isShowaddress'>重新选择</el-button>
       <el-button @click="submit" v-if='isShowaddress'>确定</el-button>
@@ -119,6 +135,7 @@ export default {
       zoomEnable: true,
       dragEnable: true,
       status: true,
+      center:'',
     }
   },
   props: ['flagVisible', 'position','selectedOptions','isShowaddress','type'],
@@ -174,10 +191,10 @@ export default {
         }
       })
       this.marker = new AMap.Marker({
-        icon: new AMap.Icon({
-          size: new AMap.Size(36, 44),
-          image: image,
-        }),
+        // icon: new AMap.Icon({
+        //   size: new AMap.Size(36, 44),
+        //   image: image,
+        // }),
         map: that.map,
       })
       AMap.plugin(
@@ -219,13 +236,18 @@ export default {
           var geocoder = new AMap.Geocoder({
             radius: 1000,
           })
-          that.map.on('click', function (e) {
-            for (var i = 0, l = that.polygons.length; i < l; i++) {
+          that.map.on('moveend', function(e){debugger
+             that.center = that.map.getCenter(); //获取当前地图中心位置
+             that.center.lat =Number(that.center.lat.toFixed(3))
+             that.center.lng =Number(that.center.lng.toFixed(3))
+              that.center.Q =Number(that.center.Q.toFixed(3))
+             that.center.R =Number(that.center.R.toFixed(3))
+                  for (var i = 0, l = that.polygons.length; i < l; i++) {
               that.polygons[i].setMap(null)
             }
             that.marker.setMap(that.map)
-            that.marker.setPosition(e.lnglat)
-            geocoder.getAddress(e.lnglat, function (status, result) {
+            that.marker.setPosition(that.center)
+            geocoder.getAddress(that.center, function (status, result) {
               if (status === 'complete') {
                 var obj = {}
                 that.province = result.regeocode.addressComponent.province
@@ -234,14 +256,66 @@ export default {
                 obj.formattedAddress = result.regeocode.formattedAddress
                 obj.areacode = result.regeocode.addressComponent.adcode
                 that.address = result.regeocode.formattedAddress
-                obj.lat = e.lnglat.lat
-                obj.lng = e.lnglat.lng
+                obj.lat = that.center.lat
+                obj.lng = that.center.lng
                 that.$emit('pickedAddress', obj)
               } else {
                 that.$emit('pickedAddress', '')
               }
             })
-          })
+          });
+          that.map.on('zoomend', function(){
+            // this.zoom = map.getZoom(); //获取当前地图级别
+            that.center = that.map.getCenter(); //获取当前地图中心位置
+            that.center.lat =Number(that.center.lat.toFixed(3))
+            that.center.lng =Number(that.center.lng.toFixed(3))
+             that.center.Q =Number(that.center.Q.toFixed(3))
+             that.center.R =Number(that.center.R.toFixed(3))
+                       for (var i = 0, l = that.polygons.length; i < l; i++) {
+              that.polygons[i].setMap(null)
+            }
+            that.marker.setMap(that.map)
+            that.marker.setPosition(that.center)
+            geocoder.getAddress(that.center, function (status, result) {
+              if (status === 'complete') {
+                var obj = {}
+                that.province = result.regeocode.addressComponent.province
+                that.city = result.regeocode.addressComponent.city
+                that.district = result.regeocode.addressComponent.district
+                obj.formattedAddress = result.regeocode.formattedAddress
+                obj.areacode = result.regeocode.addressComponent.adcode
+                that.address = result.regeocode.formattedAddress
+                obj.lat = that.center.lat
+                obj.lng = that.center.lng
+                that.$emit('pickedAddress', obj)
+              } else {
+                that.$emit('pickedAddress', '')
+              }
+            })
+          });
+          // that.map.on('click', function (e) {
+          //   for (var i = 0, l = that.polygons.length; i < l; i++) {
+          //     that.polygons[i].setMap(null)
+          //   }
+          //   that.marker.setMap(that.map)
+          //   that.marker.setPosition(e.lnglat)
+          //   geocoder.getAddress(e.lnglat, function (status, result) {
+          //     if (status === 'complete') {
+          //       var obj = {}
+          //       that.province = result.regeocode.addressComponent.province
+          //       that.city = result.regeocode.addressComponent.city
+          //       that.district = result.regeocode.addressComponent.district
+          //       obj.formattedAddress = result.regeocode.formattedAddress
+          //       obj.areacode = result.regeocode.addressComponent.adcode
+          //       that.address = result.regeocode.formattedAddress
+          //       obj.lat = e.lnglat.lat
+          //       obj.lng = e.lnglat.lng
+          //       that.$emit('pickedAddress', obj)
+          //     } else {
+          //       that.$emit('pickedAddress', '')
+          //     }
+          //   })
+          // })
           // 根据坐标点定位,获取地址的详细信息
           if (that.position) {
             that.marker.setMap(that.map)
@@ -268,7 +342,7 @@ export default {
     this.loadmap()
   },
   methods: {
-    positions() {
+    positions() {debugger
       this.status = false
       var status = {
         zoomEnable: false,

+ 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>

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

@@ -783,7 +783,7 @@
               if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
                 if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0 )&&this.tipFlag) {
                   this.tipFlag = false
-                  this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+                  this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit/1000 +'吨。');
                 }
               }
             }

+ 37 - 9
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>
@@ -41,8 +41,14 @@
         >待付款</ws-button>
         <ws-button :type="searchType == 2 ? 'primary' : ''" @click="screen(2)" v-hasPermission="`acquisitionManagement.acquisitionPay.add`">待结算</ws-button>
         <ws-button :type="searchType == -1 ? 'primary' : ''" @click="screen(-1)">全部</ws-button>
+<<<<<<< HEAD
         <ws-button type="primary" @click="reject" v-if="isShowAdopt == 'true'">驳回</ws-button>
         <ws-button type="primary" @click="adopt" v-if="isShowAdopt == 'true'">通过</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>
+>>>>>>> e236289d9cae97f6c171795170f1988c99718604
         <!-- <ws-button type="primary" @click="handlepass" v-if="isShowAdopt">审核</ws-button> -->
         <ws-button
           type="primary"
@@ -103,7 +109,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 +155,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 +263,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 +326,8 @@ export default {
       isShowAdopt: false,
       //上传截图路径
       imageUrl: '',
-      payImg: []
+      payImg: [],
+      rowData:{}
     }
   },
   activated() {
@@ -320,6 +336,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 +372,7 @@ export default {
     typePrintClick() {
       //  this.isShowPrint = true
       getCustomerLook({
-        id: this.row.identityAuthenticationInfo.id,
+        id: this.rowData.identityAuthenticationInfo.id,
         authenticationStatusKey: 7
       })
         .toPromise()
@@ -357,7 +384,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
@@ -556,6 +583,7 @@ export default {
         })
     },
     payment() {
+      this.imageUrl = ''
       if (this.modification.length == 0) {
         this.$message.warning('请选择要付款的条目')
       } else {
@@ -565,7 +593,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
       }
     },
@@ -710,7 +738,7 @@ export default {
       console.log('打印数据', row)
       if (sessionStorage.getItem('ws-pf_roleName') == '财务') {
         this.isShowPrintType = true
-        this.row = row
+        this.rowData = row
       } else {
         getpaymentexamine({ id: row.id })
           .toPromise()
@@ -918,7 +946,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
 					},
 				})

+ 58 - 14
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
           }
@@ -601,7 +638,8 @@
                     ) {
                       //累计售粮超上限不能完成毛检保存
                       let count = (this.purchasePriceList[i].saleLimit - response / 1000).toFixed(2)
-                      console.log(this.weighingList.grossWeight / 1000, '毛重转吨')
+                      // console.log(this.weighingList.grossWeight / 1000, '毛重转吨')
+                      this.weighingList.grossWeight/=1000
                       if (count - this.weighingList.grossWeight / 1000 < 0) {
                         this.$alert(
                           '该客户累计销售' +
@@ -641,6 +679,12 @@
                   }
                 })
             } else if (this.tpyeNo == 2) {
+              this.weighingList.grossWeight/=1000
+              this.weighingList.tare/=1000
+              if(this.weighingList.buckleMiscellaneous){
+                this.weighingList.buckleMiscellaneous/=1000
+              }
+              this.weighingList.netWeight/=1000
               this.weighingList.warehouseId = this.warehouseId;
               (this.weighingList.skinInspector =
                 sessionStorage.getItem('ws-pf_staffName')),

+ 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

+ 32 - 32
src/views/tranManagement/tranManagementTransporFeedback.vue

@@ -631,38 +631,38 @@
         })
       },
       submit() {
-        for (var i = 0; i < this.freightspace.length; i++) {
-          if (this.freightspace[i].temporaryDriverFlag != 0) {
-            if (!this.freightspace[i].driver) {
-              this.$message({
-                message: '司机姓名不能为空!',
-                type: 'warning'
-              })
-              return
-            }
-            if (!this.freightspace[i].driverPhone) {
-              this.$message({
-                message: '司机电话不能为空!',
-                type: 'warning'
-              })
-              return
-            }
-            if (!this.freightspace[i].carNo) {
-              this.$message({
-                message: '车牌号不能为空!',
-                type: 'warning'
-              })
-              return
-            }
-            if (!this.freightspace[i].loadNetWeight) {
-              this.$message({
-                message: '装载净重不能为空!',
-                type: 'warning'
-              })
-              return
-            }
-          }
-        }
+        // for (var i = 0; i < this.freightspace.length; i++) {
+        //   if (this.freightspace[i].temporaryDriverFlag != 0) {
+        //     if (!this.freightspace[i].driver) {
+        //       this.$message({
+        //         message: '司机姓名不能为空!',
+        //         type: 'warning'
+        //       })
+        //       return
+        //     }
+        //     if (!this.freightspace[i].driverPhone) {
+        //       this.$message({
+        //         message: '司机电话不能为空!',
+        //         type: 'warning'
+        //       })
+        //       return
+        //     }
+        //     if (!this.freightspace[i].carNo) {
+        //       this.$message({
+        //         message: '车牌号不能为空!',
+        //         type: 'warning'
+        //       })
+        //       return
+        //     }
+        //     if (!this.freightspace[i].loadNetWeight) {
+        //       this.$message({
+        //         message: '装载净重不能为空!',
+        //         type: 'warning'
+        //       })
+        //       return
+        //     }
+        //   }
+        // }
         if (sessionStorage.getItem('qy-msg')) {
           this.validateFunc()
         } else {

+ 6 - 1
src/views/warehouse/warehouseManagementAdd.vue

@@ -221,7 +221,7 @@
         </div>
       </div>
       <div style="margin-bottom: 5px" class="small-title">仓库定位</div>
-      <map-drag  @marker="marker" @selectedAddress="selectedAddress" @provinceChange='provinceChange'></map-drag>
+      <map-drag  @marker="marker" @selectedAddress="selectedAddress" @provinceChange='provinceChange' @pickedAddress='getInfo'></map-drag>
     </ws-form>
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
@@ -342,6 +342,11 @@ export default {
     },
   },
   methods: {
+    getInfo(e){
+      console.log(e)
+      this.deptBudgetList.warehousePositioning = e.lat +','+e.lng
+      console.log(this.deptBudgetList.warehousePositioning)
+    },
     close(index) {
       this.addressUrls.splice(index, 1)
     },

+ 70 - 12
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)
@@ -1360,6 +1412,12 @@ export default {
               this.deptBudgetList.inOutFlag = 2
               this.deptBudgetList.pcFlag = 1
               this.deptBudgetList.statusFlag = 3
+              his.deptBudgetList.grossWeight /= 1000
+                this.deptBudgetList.tare /= 1000
+                this.deptBudgetList.netWeight /= 1000
+                this.deptBudgetList.pureWeight /= 1000
+                this.deptBudgetList.deductionAmount *= 1000
+                this.deptBudgetList.deductionWeight /= 1000
               addstorageputList(this.deptBudgetList)
                 .toPromise()
                 .then((response) => {
@@ -1863,7 +1921,7 @@ export default {
                 this.deptBudgetList.netWeight /= 1000
                 this.deptBudgetList.pureWeight /= 1000
                 this.deptBudgetList.deductionAmount *= 1000
-                this.deptBudgetList.deductionWeight *= 1000
+                this.deptBudgetList.deductionWeight /= 1000
               addstorageputList(this.deptBudgetList)
                 .toPromise()
                 .then((response) => {

+ 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

+ 47 - 9
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -593,6 +593,7 @@ export default {
         },
       },
       accessoryTFs: false,
+      param: 9600,
       allowEdit:true
     }
   },
@@ -640,7 +641,7 @@ export default {
     this.dataList.solidGrainWater=this.$route.query.solidGrainWater
     this.dataList.pureWeight=this.$route.query.pureWeight*1000
     this.dataList.deductionAmount=this.$route.query.deductionAmount/1000
-    this.dataList.deductionWeight=this.$route.query.deductionWeight/1000
+    this.dataList.deductionWeight=this.$route.query.deductionWeight*1000
     this.dataList.inOutTypeFlag=1
     this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
     if(this.dataList.cost){
@@ -687,17 +688,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
@@ -1337,7 +1375,7 @@ export default {
               if(!this.dataList.deductionAmount){
                 this.dataList.deductionAmount = 0
               }
-              this.dataList.deductionWeight *= 1000
+              this.dataList.deductionWeight /= 1000
               this.dataList.deductionAmount *= 1000
               addstorageputList(this.dataList)
                 .toPromise()

+ 50 - 10
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
@@ -1069,9 +1107,11 @@ export default {
               this.dataList.inOutFlag = 1
               this.dataList.statusFlag = 3
               this.dataList.grossWeight /= 1000
-              this.dataList.tare /= 1000
-              this.dataList.netWeight /= 1000
-              this.dataList.pureWeight /= 1000
+                this.dataList.tare /= 1000
+                this.dataList.netWeight /= 1000
+                this.dataList.pureWeight /= 1000
+                this.dataList.deductionAmount *= 1000
+                this.dataList.deductionWeight /= 1000
               addstorageputList(this.dataList)
                 .toPromise()
                 .then((response) => {

+ 71 - 15
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)
@@ -946,10 +996,10 @@ export default {
               this.deptBudgetList.inOutFlag = 1
               this.deptBudgetList.pcFlag = 1
               this.deptBudgetList.statusFlag = 1
-              this.deptBudgetList.grossWeight /= 1000
-              this.deptBudgetList.tare /= 1000
-              this.deptBudgetList.netWeight /= 1000
-              this.deptBudgetList.pureWeight /= 1000
+              his.deptBudgetList.grossWeight /= 1000
+                this.deptBudgetList.tare /= 1000
+                this.deptBudgetList.netWeight /= 1000
+                this.deptBudgetList.pureWeight /= 1000
               addstorageputList(this.deptBudgetList)
                 .toPromise()
                 .then((response) => {
@@ -1364,6 +1414,12 @@ export default {
       }).then(() => {
         this.$refs.deptBudgetList.validate((valid) => {
           if (valid) {
+             this.deptBudgetList.grossWeight /= 1000
+                this.deptBudgetList.tare /= 1000
+                this.deptBudgetList.netWeight /= 1000
+                this.deptBudgetList.pureWeight /= 1000
+                this.deptBudgetList.deductionAmount *= 1000
+                this.deptBudgetList.deductionWeight /= 1000
             this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
             this.deptBudgetList.inOutFlag = 1
             this.deptBudgetList.statusFlag = 3

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

@@ -120,7 +120,7 @@
         </el-table-column>
         <el-table-column prop="costAfter" label="入库后加权成本" >
           <template slot-scope="scope">
-            <div>{{scope.row.costAfter}}<span v-if='scope.row.grainType'>(改)</span></div>
+            <div>{{scope.row.costAfter}}<span v-if='!scope.row.grainType'>(改)</span></div>
           </template>
         </el-table-column>
         <el-table-column  prop="createDate" label="更新日期">