zhongtianhaoyuan 3 年之前
父节点
当前提交
878339e3ce

+ 7 - 5
public/static/weightCheck.html

@@ -89,8 +89,8 @@
       }
 
       .small-content {
-        width: 400px;
-        margin: 0 auto;
+        width: 300px;
+        /* margin: 0 auto;
         border: 1px solid #ccc;
         padding: 20px 20px 160px 20px;
         position: absolute;
@@ -98,9 +98,9 @@
         bottom: 0;
         left: 0;
         right: 0;
-        margin: auto;
+        margin: auto; */
       }
-      
+
       .small-title {
         text-align: center;
         font-size: 18px;
@@ -227,7 +227,7 @@
       </div>
       <div v-else>
         <div class="content" v-if="bigContent">
-        
+
           <div class="title">{{tableData.compName}}</div>
           <div class="title">入库检斤单</div>
           <div class="left">
@@ -386,6 +386,8 @@
         </div>
         <div class="small-row">
           <div>收货单位签名或盖章:</div>
+        </div>
+        <div class="small-row">
           <div class="sign">客户签名:</div>
         </div>
       </div>

+ 56 - 34
src/components/balanceAlert.vue

@@ -155,43 +155,65 @@ export default {
               }
             }
           } else {
-            for (var i = 0; i < value.length; i++) {
-              var tmp = String.fromCharCode(value[i])
-
-              if (value[0] != 49 && value[0] != 2) {
-                if (
-                  value[value.length - 1] == 48 &&
-                  value[value.length - 2] == 48
-                ) {
-                  flag1 = true
-                } else {
-                  break
-                }
-              }
-              if (tmp == String.fromCharCode(32)) {
-                flag = true
-              }
-              if (
-                flag &&
-                result.length < 7 &&
-                tmp != String.fromCharCode(32) &&
-                !(
-                  value[value.length - 1] == 48 && value[value.length - 2] == 48
-                )
-              ) {
-                result += tmp
-              }
-              if (flag1 && tmp != String.fromCharCode(32)) {
-                if (
-                  value[value.length - 1] == 48 &&
-                  value[value.length - 2] == 48
-                ) {
-                  if (i == 0) {
-                    this.result1 = tmp + '0'
+            if(value.length > 10){
+               for (var i = 0; i < value.length; i++) {
+                  var tmp = String.fromCharCode(value[i])
+                  
+                  // if (value[0] != 49 && value[0] != 2) {
+                  //   // if (
+                  //   //   value[value.length - 1] == 48 &&
+                  //   //   value[value.length - 2] == 48
+                  //   // ) {
+                  //   //   flag1 = true
+                  //   // } else {
+                  //   //   break
+                  //   // }
+                  //   // flag1 = true
+                  //   if (i == 0) {
+                  //     this.result1 = tmp + '0'
+                  //   }
+                  // }
+                  // else{
+                  //   if (tmp == String.fromCharCode(32)) {
+                  //     flag = true
+                  //   }
+                  // }
+                  if (tmp == String.fromCharCode(32)) {
+                      flag = true
+                    }
+                  if (
+                    flag &&
+                    result.length < 7 &&
+                    tmp != String.fromCharCode(32) 
+                    // &&
+                    // !(
+                    //   value[value.length - 1] == 48 && value[value.length - 2] == 48
+                    // )
+                  ) {
+                    if(i > 0&& value[i] == 48&& value[i-1] == 32){
+                      break
+                    }
+                    else{
+                      result += tmp
+                    }
+                    
                   }
+                  // if (flag1 && tmp != String.fromCharCode(32)) {
+                  //   // if (
+                  //   //   value[value.length - 1] == 48 &&
+                  //   //   value[value.length - 2] == 48
+                  //   // ) {
+                  //   //   if (i == 0) {
+                  //   //     this.result1 = tmp + '0'
+                  //   //   }
+                  //   // }
+                  //   if (i == 0) {
+                  //     this.result1 = tmp + '0'
+                  //   }
+                  // }
                 }
-              }
             }
+            
             if (this.information.indexOf('毛重') > -1) {
               if (parseInt(result) || parseInt(result) == 0) {
                 this.grossWeightVal = parseInt(

+ 23 - 4
src/layout/index/top/index.vue

@@ -23,8 +23,8 @@
       <div class="hidden-content">
         <el-input ref="hiddenFocus" type="password" class="input-Style" v-model="barCode" size="small" @focus="focus" @blur="blur" autocomplete="new-password"
           @keyup.enter.native="payCode" placeholder="扫码枪内容"></el-input>
-        <div v-show="isOpenCodeGun">扫码枪已连接</div>
-        <div v-show="!isOpenCodeGun" @click="setCodeGun">点我扫码</div>
+        <div v-show="isOpenCodeGun" class="code-scan-text">扫码枪已连接</div>
+        <div v-show="!isOpenCodeGun" @click="setCodeGun" class="code-scan-text">点我扫码</div>
         <!--  -->
         <el-dialog title="扫描二维码" :visible.sync="smAlert"  :before-close="cancel">
           <div class="btn-list">
@@ -49,8 +49,8 @@
           </div>
         </el-dialog>
       </div>
-      <div >
-        <span style="padding: 0 4px;font-size:15px;position:relative;top:-5px;">{{compName}}</span>
+      <div class="compName-row">
+        <span class="compName">{{compName}}</span>
       </div>
       <div v-if="getDay" class="right-menu-item hover-effect dayClass">
         {{ $t('common.trialDays') }}
@@ -737,6 +737,8 @@
   .hidden-content {
     display: flex;
     font-size: 16px;
+    margin-right: 20px;
+    align-items: center;
   }
 
   .input-Style {
@@ -762,4 +764,21 @@
     padding: 20px!important;
     font-size: 40px;
   }
+  .compName{
+    font-size: 16px;
+  }
+  .compName-row{
+    // background: red;
+    display: flex;
+    height: 100%;
+  }
+  .code-scan-text{
+    height: 30px;
+    line-height: 30px;
+    background: #EFF7FD;
+    border-radius: 20px;
+    color:#5473E8 ;
+    border: 1px solid #5473E8;
+    padding: 0 15px;
+  }
 </style>

+ 6 - 4
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -1004,8 +1004,10 @@ export default {
           index === 13 ||
           index === 9
         ) {
-          const values = data.map((item) => Number(item[column.property]))
-          if (!values.every((value) => isNaN(value))) {
+          const values = data.map((item) => Number(item[column.property])) 
+          console.log(values)
+          // console.log(values)
+          if (values.length>0) {
             sums[index] = values.reduce((prev, curr) => {
               const value = Number(curr)
               if (!isNaN(value)) {
@@ -1015,7 +1017,7 @@ export default {
               }
             }, 0)
           } else {
-            sums[index] = '元'
+            sums[index] = 0
           }
         } else {
           sums[index] = '--'
@@ -1028,7 +1030,7 @@ export default {
         sums[sums.length-4]=sums[sums.length-4].toFixed(2)
       }
       if(typeof sums[sums.length-5]=='number'){
-        sums[sums.length-5]=sums[sums.length-3].toFixed(2)
+        sums[sums.length-5]=sums[sums.length-5].toFixed(2)
       }
       if(typeof sums[sums.length-7]=='number'){
         sums[sums.length-7]=sums[sums.length-7].toFixed(2)