فهرست منبع

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

高敬炎 2 سال پیش
والد
کامیت
74bb6d1a1d
3فایلهای تغییر یافته به همراه45 افزوده شده و 22 حذف شده
  1. 1 1
      .env.production
  2. 39 21
      src/components/balanceAlert.vue
  3. 5 0
      src/views/houseSelfCollect/newWeighingManagement.vue

+ 1 - 1
.env.production

@@ -5,7 +5,7 @@
 NODE_ENV = 'production'
 # base api
 VUE_APP_BASE_API = 'https://api2.eliangeyun.com'
-#VUE_APP_BASE_API = 'https://apitest.eliangeyun.com'
+# VUE_APP_BASE_API = 'https://apitest2.eliangeyun.com'
 
 # 微服务相关接口配置
 ## 任务消息

+ 39 - 21
src/components/balanceAlert.vue

@@ -1,9 +1,21 @@
 <template>
   <div class="content">
-    <el-radio-group v-if="deptBudgetList.warehouseName=='榆树库'" @change="radiochange" v-model="radio">
-    <el-radio :label="1">大秤</el-radio>
-    <el-radio :label="2">小秤</el-radio>
-  </el-radio-group>
+    <div v-if="deptBudgetList.warehouseName=='榆树库'">
+      <!-- <el-radio-group @change="radiochange" v-model="radio">
+          <el-radio :label="1">大秤</el-radio>
+          <el-radio :label="2">小秤</el-radio>
+        </el-radio-group> -->
+        <div class="select">
+          <el-select @change="radiochange" v-model="value" placeholder="请选择">
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+    </div>
     <div class="title" v-if="information.indexOf('毛重') > -1">毛重</div>
     <div class="title" v-else>皮重</div>
     <div class="contentInfo">
@@ -26,14 +38,25 @@ export default {
       param: 9600,
       grossWeightVal: '',
       tareVal: '',
-      radio:1
+      radio:1,
+      options: [{
+          value: '1',
+          label: '大秤'
+        }, {
+          value: '2',
+          label: '小秤'
+        }],
+        value: '1'
     }
   },
   activated() {},
   mounted() {
-
     console.log(this.deptBudgetList)
+    if(localStorage.getItem('balanceStatus')){
+      this.value=localStorage.getItem('balanceStatus')
+    }
     this.openPort()
+    
   },
   computed: {},
   created() {},
@@ -51,7 +74,7 @@ export default {
     radiochange(e){
       console.log(e)
       localStorage.setItem('balanceStatus',e)
-      this.openPort()
+      // this.openPort()
     },
     async closePort() {
       console.log('closePort')
@@ -63,7 +86,7 @@ export default {
       if ('serial' in navigator) {
         if (!this.$store.state.app.reader) {
           if(localStorage.getItem('balanceStatus')){
-            this.radio=localStorage.getItem('balanceStatus')
+            this.value=localStorage.getItem('balanceStatus')
           }
           // The Web Serial API is supported.
           console.log('the Web Serial API is supported.')
@@ -81,7 +104,7 @@ export default {
             this.param = 2400
           } else if(this.deptBudgetList.warehouseName == '大庆朝阳沟库' ){
             this.param = 4800
-          }else if(this.deptBudgetList.warehouseName == '榆树库' &&this.radio==2){
+          }else if(this.deptBudgetList.warehouseName == '榆树库' &&this.value==1){
             this.param = 1200
           } else {
             this.param = 9600
@@ -149,7 +172,8 @@ export default {
             this.deptBudgetList.warehouseName == '洮南胡力吐粮食储备库' ||
             this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'||
             this.deptBudgetList.warehouseName == '洮南向阳乡金昊'||
-            this.deptBudgetList.warehouseName == '佳屹农仓储库'
+            this.deptBudgetList.warehouseName == '佳屹农仓储库'||
+            (this.deptBudgetList.warehouseName == '榆树库'&&this.value==1)
           ) {
             console.log('value:', value)
             var start = new Date().getTime()
@@ -334,7 +358,7 @@ export default {
         }
         await port.close()
       } else {
-        console.log('the Web Serial API is not supported.', navigator)
+        // console.log('the Web Serial API is not supported.', navigator)
       }
     }
   }
@@ -346,16 +370,6 @@ export default {
   position:absolute;
   top:29px;
 }
-/deep/.el-radio{
-  color:#fff;
-}
-/deep/.el-radio__input.is-checked+.el-radio__label{
-  color:#2aff7c;
-}
-/deep/.el-radio__input.is-checked .el-radio__inner {
-  background: #2aff7c !important;
-  border-color: #2aff7c !important;
-}
 .content {
   height: 350px;
   position: relative;
@@ -393,4 +407,8 @@ export default {
   text-align: right;
   margin-bottom: 20px;
 }
+.select{
+  position: absolute;
+  left: 20px;
+}
 </style>

+ 5 - 0
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -649,6 +649,7 @@ export default {
       jjSelectPrintList: [],
       printSeparately: false,
       number: '',
+      warehousingType: 1,
     }
   },
   beforeDestroy() {
@@ -1169,6 +1170,9 @@ export default {
               this.dialogDataList.push(_datas)
             } else {
               this.dialogData.compName = this.companyName
+              if(this.dialogData&&this.dialogData.contractManagement&& this.warehousingType != 3){
+                this.dialogData.customer = this.dialogData.contractManagement.seller
+              }
               this.dialogDataList.push(this.dialogData)
             }
             
@@ -1239,6 +1243,7 @@ export default {
       if (this.inWarehouseType == 1 && this.status == 2) {
         this.status = 1
       }
+      this.warehousingType = this.inWarehouseType
       this.getList()
     },
     setVal(data) {