zhongtianhaoyuan 3 years ago
parent
commit
5d1bb63fe7

+ 22 - 13
src/components/balanceAlert.vue

@@ -5,7 +5,7 @@
     <div class="title" v-else>皮重</div>
     <div class="title" v-else>皮重</div>
     <div class="number" v-if="information.indexOf('毛重') > -1">{{grossWeightVal}} kg</div>
     <div class="number" v-if="information.indexOf('毛重') > -1">{{grossWeightVal}} kg</div>
     <div class="number" v-else>{{tareVal}} KG</div>
     <div class="number" v-else>{{tareVal}} KG</div>
-    
+
     <div class="btn" @click="sendVal">确定</div>
     <div class="btn" @click="sendVal">确定</div>
   </div>
   </div>
 </template>
 </template>
@@ -14,28 +14,34 @@
 
 
 export default {
 export default {
   name: 'balanceAlert',
   name: 'balanceAlert',
-  props: ['deptBudgetList', 'information'],
+  props: ['deptBudgetList1', 'information'],
   data () {
   data () {
     return {
     return {
      param: 9600,
      param: 9600,
      grossWeightVal:'',
      grossWeightVal:'',
-     tareVal:''
+     tareVal:'',
+     deptBudgetList:this.deptBudgetList1
     }
     }
   },
   },
   activated(){
   activated(){
-   
+
   },
   },
-  mounted(){
+  mounted(){debugger
  console.log('11111111111111111111111111111111111')
  console.log('11111111111111111111111111111111111')
-    console.log(this.deptBudgetList)
+    console.log(this.deptBudgetList1)
     this.openPort()
     this.openPort()
   },
   },
   computed: {
   computed: {
-    
+
   },
   },
   created () {
   created () {
-    
+
   },
   },
+   watch: {
+      deptBudgetList1: function (deptBudgetList1) {debugger
+        this.deptBudgetList = deptBudgetList1
+      }
+    },
   methods: {
   methods: {
     sendVal(){
     sendVal(){
       console.log(this.grossWeightVal)
       console.log(this.grossWeightVal)
@@ -45,7 +51,7 @@ export default {
       }else{
       }else{
         this.$emit('balanceListen',this.tareVal)
         this.$emit('balanceListen',this.tareVal)
       }
       }
-      
+
     },
     },
    async closePort() {
    async closePort() {
       console.log('closePort')
       console.log('closePort')
@@ -72,6 +78,7 @@ export default {
           }
           }
         // 监听来自串行设备的数据
         // 监听来自串行设备的数据
         while (true) {
         while (true) {
+
           const { value, done } = await this.reader.read()
           const { value, done } = await this.reader.read()
           // console.log("value",value);
           // console.log("value",value);
           if (done) {
           if (done) {
@@ -104,6 +111,7 @@ export default {
           //   }
           //   }
           // }
           // }
           console.log('value:', value)
           console.log('value:', value)
+          debugger
           if (
           if (
             this.deptBudgetList.warehouseName &&
             this.deptBudgetList.warehouseName &&
             (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
             (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
@@ -112,6 +120,7 @@ export default {
               this.deptBudgetList.warehouseName == '哈尔滨依兰库'||
               this.deptBudgetList.warehouseName == '哈尔滨依兰库'||
               this.deptBudgetList.warehouseName == '龙江金信库')
               this.deptBudgetList.warehouseName == '龙江金信库')
           ) {
           ) {
+
             for (var i = 0; i < value.length; i++) {
             for (var i = 0; i < value.length; i++) {
               var tmp = String.fromCharCode(value[i])
               var tmp = String.fromCharCode(value[i])
               if (tmp == '+') {
               if (tmp == '+') {
@@ -158,7 +167,7 @@ export default {
             if(value.length > 10){
             if(value.length > 10){
                for (var i = 0; i < value.length; i++) {
                for (var i = 0; i < value.length; i++) {
                   var tmp = String.fromCharCode(value[i])
                   var tmp = String.fromCharCode(value[i])
-                  
+
                   // if (value[0] != 49 && value[0] != 2) {
                   // if (value[0] != 49 && value[0] != 2) {
                   //   // if (
                   //   // if (
                   //   //   value[value.length - 1] == 48 &&
                   //   //   value[value.length - 1] == 48 &&
@@ -184,7 +193,7 @@ export default {
                   if (
                   if (
                     flag &&
                     flag &&
                     result.length < 7 &&
                     result.length < 7 &&
-                    tmp != String.fromCharCode(32) 
+                    tmp != String.fromCharCode(32)
                     // &&
                     // &&
                     // !(
                     // !(
                     //   value[value.length - 1] == 48 && value[value.length - 2] == 48
                     //   value[value.length - 1] == 48 && value[value.length - 2] == 48
@@ -196,7 +205,7 @@ export default {
                     else{
                     else{
                       result += tmp
                       result += tmp
                     }
                     }
-                    
+
                   }
                   }
                   // if (flag1 && tmp != String.fromCharCode(32)) {
                   // if (flag1 && tmp != String.fromCharCode(32)) {
                   //   // if (
                   //   // if (
@@ -213,7 +222,7 @@ export default {
                   // }
                   // }
                 }
                 }
             }
             }
-            
+
             if (this.information.indexOf('毛重') > -1) {
             if (this.information.indexOf('毛重') > -1) {
               if (parseInt(result) || parseInt(result) == 0) {
               if (parseInt(result) || parseInt(result) == 0) {
                 this.grossWeightVal = parseInt(
                 this.grossWeightVal = parseInt(

+ 15 - 11
src/views/contractManagement/purchaseContractAdd.vue

@@ -712,17 +712,21 @@ import { isUndefined } from 'xe-utils/methods'
         this.deptBudgetList.totalContractPrice = e * this.deptBudgetList.weight
         this.deptBudgetList.totalContractPrice = e * this.deptBudgetList.weight
       },
       },
       returnsales() {
       returnsales() {
-        this.deptBudgetList = {
-                  deliverType: '1',
-                  agreementType: '采购合同',
-                  finalTradingVolume: 0,
-                  totalContractPrice: 0,
-                  contractGoodsInfo: {
-                    goodsName: '',
-                  },
-                  contractProcessInfo: {},
-                  addressUrl: '',
-                }
+        this.deptBudgetList =  {
+          deliverType: '1',
+          sourceGoods:'',
+          placeDelivery:'',
+          agreementType: '采购合同',
+          addressUrl: '',
+          sellerPhone:'',
+          finalTradingVolume: 0,
+          totalContractPrice: 0,
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          contractProcessInfo: {},
+          settlementWeightMethod: '1',
+        }
         this.$router.push({
         this.$router.push({
           path: 'buyContract'
           path: 'buyContract'
         })
         })

+ 19 - 11
src/views/contractManagement/salesContractAdd.vue

@@ -608,16 +608,20 @@
       },
       },
       returnsales() {
       returnsales() {
         this.deptBudgetList = {
         this.deptBudgetList = {
-                  deliverType: '1',
-                  agreementType: '采购合同',
-                  finalTradingVolume: 0,
-                  totalContractPrice: 0,
-                  contractGoodsInfo: {
-                    goodsName: '',
-                  },
-                  contractProcessInfo: {},
-                  addressUrl: '',
-                }
+          deliverType: '1',
+          agreementType: '销售合同',
+          finalTradingVolume: 0,
+          totalContractPrice: 0,
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          buyerPhone:'',
+          contractProcessInfo: {},
+          addressUrl: '',
+          sourceGoods: '',
+          placeDelivery: '',
+          settlementWeightMethod: '1',
+        }
         this.$router.push({
         this.$router.push({
           path: 'salesContract',
           path: 'salesContract',
         })
         })
@@ -1413,10 +1417,14 @@
                   contractGoodsInfo: {
                   contractGoodsInfo: {
                     goodsName: '',
                     goodsName: '',
                   },
                   },
+                  buyerPhone:'',
                   contractProcessInfo: {},
                   contractProcessInfo: {},
+                  addressUrl: '',
+                  sourceGoods: '',
+                  placeDelivery: '',
+                  settlementWeightMethod: '1',
                 }
                 }
 
 
-
                 this.$router.push({
                 this.$router.push({
                   path: 'salesContract',
                   path: 'salesContract',
                 })
                 })

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

@@ -12,7 +12,7 @@
     </el-row>
     </el-row>
     <div class="substance">
     <div class="substance">
       <div class="left">
       <div class="left">
-        <BalanceAlert v-if='isShowBalance' ref="weightChild" :deptBudgetList='weighingList'
+        <BalanceAlert v-if='isShowBalance' ref="weightChild" :deptBudgetList1='deptBudgetList'
             :information='information' v-on:balanceListen="setVal"></BalanceAlert>
             :information='information' v-on:balanceListen="setVal"></BalanceAlert>
         <div class="top">
         <div class="top">
           <div class="car-type">{{carWeightInfo.type}}</div>
           <div class="car-type">{{carWeightInfo.type}}</div>
@@ -237,6 +237,9 @@
           buckleMiscellaneous: 0,
           buckleMiscellaneous: 0,
           netWeight: 0,
           netWeight: 0,
           receivableWeighingFee:'',
           receivableWeighingFee:'',
+        },
+        deptBudgetList: {
+          
         },
         },
         tpyeNo: 1,
         tpyeNo: 1,
         disabled: true,
         disabled: true,
@@ -272,6 +275,7 @@
       this.warehouseName = this.$route.query.warehouseName
       this.warehouseName = this.$route.query.warehouseName
       localStorage.setItem('ck', this.warehouseName)
       localStorage.setItem('ck', this.warehouseName)
       this.weighingList.warehouseName = this.$route.query.warehouseName
       this.weighingList.warehouseName = this.$route.query.warehouseName
+      // this.deptBudgetList.warehouseName = this.$route.query.warehouseName
       this.weighingList.number = this.$route.query.number
       this.weighingList.number = this.$route.query.number
       this.weighingList.binNumber = this.$route.query.binNumber
       this.weighingList.binNumber = this.$route.query.binNumber
       this.weighingList.customerNumberCard = this.$route.query.customerNumberCard
       this.weighingList.customerNumberCard = this.$route.query.customerNumberCard

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

@@ -22,7 +22,7 @@
           <span v-show="this.$route.query.warehouseType == 2">(临)</span>
           <span v-show="this.$route.query.warehouseType == 2">(临)</span>
         </h2>
         </h2>
         <div class="balance-row">
         <div class="balance-row">
-          <BalanceAlert v-if='isShowBalance' class="left" ref="weightChild" :deptBudgetList='deptBudgetList'
+          <BalanceAlert v-if='isShowBalance' class="left" ref="weightChild" :deptBudgetList1='deptBudgetList'
             :information='information' v-on:balanceListen="setVal"></BalanceAlert>
             :information='information' v-on:balanceListen="setVal"></BalanceAlert>
           <div class="top">
           <div class="top">
             <div class="car-type">皮重</div>
             <div class="car-type">皮重</div>

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

@@ -22,7 +22,7 @@
           <span v-show="this.$route.query.warehouseType == 2"> (临) </span>
           <span v-show="this.$route.query.warehouseType == 2"> (临) </span>
         </h2>
         </h2>
         <div class="balance-row">
         <div class="balance-row">
-          <BalanceAlert v-if='isShowBalance' class="left" ref="weightChild" :deptBudgetList='deptBudgetList'
+          <BalanceAlert v-if='isShowBalance' class="left" ref="weightChild" :deptBudgetList1='deptBudgetList'
             :information='information' v-on:balanceListen="setVal"></BalanceAlert>
             :information='information' v-on:balanceListen="setVal"></BalanceAlert>
           <div class="top">
           <div class="top">
             <div class="car-type">毛重</div>
             <div class="car-type">毛重</div>

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

@@ -21,7 +21,7 @@
           <span v-show="this.deptBudgetList.warehouseType == 2">(临)</span>
           <span v-show="this.deptBudgetList.warehouseType == 2">(临)</span>
         </h2>
         </h2>
         <div class="balance-row">
         <div class="balance-row">
-          <BalanceAlert v-if='isShowBalance' class="left" ref="weightChild" :deptBudgetList='deptBudgetList'
+          <BalanceAlert v-if='isShowBalance' class="left" ref="weightChild" :deptBudgetList1='deptBudgetList'
             :information='information' v-on:balanceListen="setVal"></BalanceAlert>
             :information='information' v-on:balanceListen="setVal"></BalanceAlert>
           <div class="top">
           <div class="top">
             <div class="car-type">皮重</div>
             <div class="car-type">皮重</div>