浏览代码

入库收购打印,出库回车切换焦点

高敬炎 2 年之前
父节点
当前提交
54627a458d

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

@@ -152,7 +152,7 @@
                     @change="carChange($event, 0)">
                     <el-option v-for="item in options2" :key="item.constKey" :label="item.carNo" :value="item.carNo" />
                   </el-select> -->
-                  <el-select :disabled="disabled2" v-if="carNumberList.length > 0 && !carstatus"
+                  <el-select :disabled="disabled2" v-if="carNumberList.length > 0 && carstatus"
                     filterable clearable :allow-create="true" v-model="deptBudgetList.carNo" placeholder="请选择车牌号"
                     class="typeselect" @change="carChange($event, 1)">
                     <el-option v-for="item in carNumberList" :key="item.id" :label="item.carNo" :value="item.carNo" />

+ 18 - 2
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -278,6 +278,14 @@
             </el-option>
           </el-select>
         </div>
+        <div class="shdw-style" v-if="checked || (!ddchecked && !checked)">
+          <div>发货单位:</div>
+          <!-- <div>{{companyName}}</div> -->
+          <el-select v-model="customer" placeholder="请选择" style="width: 75%;">
+            <el-option v-for="item in customerOptions" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
         <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='杜尔伯特家禾库'||warehouseName=='甘南宏旗库'||warehouseName=='洮南新友谊兴旺库'||warehouseName=='洮南向阳乡金昊'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
@@ -491,6 +499,7 @@ export default {
       status: 1,
       carList: [],
       carListCopy: [],
+      customerOptions:[],
       carWeightInfo: {
         carNumber: '',
         type: '',
@@ -552,6 +561,7 @@ export default {
       id: '',
       inOutData: {},
       idPrint: '',
+      customer:'',
       ewCustomerOptions: [
         {
           value: '黑龙江中天昊元贸易有限公司',
@@ -2284,12 +2294,12 @@ export default {
                     message: '保存成功',
                   })
                   this.idPrint = response
-                  if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' ||
+                  if ( this.warehouseName == '鲅鱼圈金信库' ||
                     this
                       .warehouseName == '洮南向阳乡金昊' || this
                         .warehouseName == '白城内陆港' || this
                           .warehouseName == '山东园丰库'|| this
-                          .warehouseName == '杜尔伯特家禾库'||this.warehouseName=='甘南宏旗库'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='佳屹农仓储库')) {
+                          .warehouseName == '杜尔伯特家禾库'||this.warehouseName=='甘南宏旗库'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='佳屹农仓储库') {
                     if (this.weighingList.seller && this.weighingList.buyer) {
                       let cang = {}
                       cang.value = this.weighingList.seller
@@ -2298,10 +2308,16 @@ export default {
                       cang1.value = this.weighingList.buyer
                       cang1.label = this.weighingList.buyer
                       if(this.warehouseName=='佳屹农仓储库'){
+                        this.customerOptions=[{label:this.weighingList.customer,value:this.weighingList.customer}]
                         if (this.check(this.weighingList.buyer, 3)) {
                           this.companyNameEWOptions.push(cang1)
                           this.companyName=this.weighingList.buyer
                         }
+                        if(this.weighingList.serviceManagementType == 3){
+                          this.customerOptions.push({label:this.weighingList.seller,value:this.weighingList.seller})
+                        this.customer=this.weighingList.customer
+                        }
+                        
                       }else{
                         if (this.check(this.weighingList.buyer, 2)) {
                         this.companyNameEWOptions.push(cang1)

+ 38 - 12
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -113,6 +113,14 @@
             </el-option>
           </el-select>
         </div>
+        <div class="shdw-style" v-if="checked || (!ddchecked && !checked)">
+          <div>发货单位:</div>
+          <!-- <div>{{companyName}}</div> -->
+          <el-select v-model="customer" placeholder="请选择" style="width: 75%;">
+            <el-option v-for="item in customerOptions" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
         <div v-if="warehouseName=='鲅鱼圈金信库'&&printType==2||
         warehouseName=='白城内陆港'&&printType==2||
         warehouseName=='杜尔伯特家禾库'&&printType==2||
@@ -453,6 +461,8 @@
         ddchecked: false,
         checked: false,
         outchecked:false,
+        customerOptions:[],
+        customer:'',
         isShowPrintType: false,
         dialogDataList: [],
         jjSelectPrintList: [],
@@ -1067,6 +1077,7 @@
               }else{
                 this.dialogData.compName = this.companyName
               }
+              this.dialogData.customer=this.customer
               if (this.checked) {
                 if(this.dialogData&&!this.dialogData.customer&&this.dialogData.contractManagement){
                   this.dialogData.customer = this.dialogData.contractManagement.seller
@@ -1132,6 +1143,7 @@
                 if (response.compName == '黑龙江秋收有限公司') {
                   response.compName = '黑龙江中天昊元贸易有限公司'
                 }
+                response.customer=this.customer
                 this.jjSelectPrintList.push(response)
                 if (index1 == this.modification.length) {
                   this.printBig(1, this.radio)
@@ -1188,29 +1200,35 @@
             return
           }
           for (let _num = 0; _num < this.modification.length; _num++) {
-            if (this.modification[_num].serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '杜尔伯特家禾库'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='甘南宏旗库' || this.warehouseName == '白城内陆港' || this.warehouseName == '洮南向阳乡金昊'||this.warehouseName=='山东园丰库'||this.warehouseName=='佳屹农仓储库')) {
+            if (this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '杜尔伯特家禾库'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='甘南宏旗库' || this.warehouseName == '白城内陆港' || this.warehouseName == '洮南向阳乡金昊'||this.warehouseName=='山东园丰库'||this.warehouseName=='佳屹农仓储库') {
               if (this.modification[_num].seller && this.modification[_num].buyer) {
                 let cang = {}
                 cang.value = this.modification[_num].seller
                 cang.label = this.modification[_num].seller
+                let cang1 = {}
+                cang1.value = this.modification[_num].buyer
+                cang1.label = this.modification[_num].buyer
                 // if (this.check(this.modification[_num].seller, 1)) {
                 //   this.ewCustomerOptions.push(cang)
                 // }
                 if(this.warehouseName=='佳屹农仓储库'){
-                  if (this.check(this.modification[_num].seller, 3)) {
-                    this.companyNameOptions.push(cang)
-                    this.companyName=this.modification[_num].seller
+                  if (this.check(this.modification[_num].buyer, 3)) {
+                    this.companyNameOptions.push(cang1)
+                    this.companyName=this.modification[_num].buyer
+                  }
+                  if(this.modification[_num].serviceManagementType == 3){
+                    this.customerOptions=[{label:this.modification[_num].customer,value:this.modification[_num].customer}]
+                    this.customerOptions.push({label:this.modification[_num].seller,value:this.modification[_num].seller})
+                    this.customer=this.modification[_num].customer
                   }
                 }else{
-                  if (this.check(this.modification[_num].seller, 1)) {
-                    this.ewCustomerOptions.push(cang)
+                  if (this.check(this.modification[_num].buyer, 2)) {
+                    this.ewCustomerOptions.push(cang1)
                   }
                 }
-                let cang1 = {}
-                cang1.value = this.modification[_num].buyer
-                cang1.label = this.modification[_num].buyer
-                if (this.check(this.modification[_num].buyer, 2)) {
-                  this.companyNameEWOptions.push(cang1)
+                
+                if (this.check(this.modification[_num].seller, 1)) {
+                  this.companyNameEWOptions.push(cang)
                 }
               }
             }
@@ -1219,7 +1237,7 @@
           this.isShowPrintType = true
           
         } else {
-          if (row.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '杜尔伯特家禾库'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='甘南宏旗库' || this.warehouseName == '白城内陆港' || this.warehouseName == '洮南向阳乡金昊'||this.warehouseName=='山东园丰库'||this.warehouseName=='佳屹农仓储库')) {
+          if (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '杜尔伯特家禾库'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='甘南宏旗库' || this.warehouseName == '白城内陆港' || this.warehouseName == '洮南向阳乡金昊'||this.warehouseName=='山东园丰库'||this.warehouseName=='佳屹农仓储库') {
             if (row.seller && row.buyer) {
               let cang = {}
               cang.value = row.seller
@@ -1230,11 +1248,19 @@
               let cang1 = {}
               cang1.value = row.buyer
               cang1.label = row.buyer
+              console.log(111111)
               if(this.warehouseName=='佳屹农仓储库'){
                 if (this.check(row.buyer, 3)) {
                   this.companyNameOptions.push(cang1)
                   this.companyName=row.buyer
                 }
+                if(row.serviceManagementType == 3){
+                  this.customerOptions=[{label:row.customer,value:row.customer}]
+                  this.customerOptions.push({label:row.seller,value:row.seller})
+                  this.customer=row.customer
+                  console.log(this.customerOptions,this.customer,222222)
+                }
+               
               }else{
                 if (this.check(row.buyer, 2)) {
                   this.companyNameEWOptions.push(cang1)

+ 32 - 0
src/views/outboundManagement/weighingManagementNew.vue

@@ -774,6 +774,8 @@
           }
         }
       }
+      
+      window.addEventListener("keydown", this.enterCallback);
     })
       this.getNowTime()
       this.selectWarehouse()
@@ -791,6 +793,36 @@
     },
     activated() {},
     methods: {
+      findFormItem(el) {
+      const parent = el.parentElement;
+      if (!parent) return document.body;
+      if (
+      parent.className.includes("el-form-item") &&
+      parent.className.includes("el-form-item--small")
+      ) {
+      return parent;
+      }
+      return this.findFormItem(parent);
+      },
+      findInput(container) {
+      let nextEl = container.nextElementSibling;
+      if (!nextEl) return;
+      let input = nextEl.querySelector("input");
+      while (input.id === "el-select") {
+      nextEl = nextEl.nextElementSibling;
+      if (!nextEl) return;
+      input = nextEl.querySelector("input");
+      }
+      if (input.className.includes("el-input__inner")) return input;
+      },
+      enterCallback(e) {
+        console.log(e)
+      if (e.keyCode === 13) {
+      // 按下回车后的逻辑
+      const container = this.findFormItem(document.activeElement);
+      this.findInput(container) && this.findInput(container).focus();
+      }
+      },
       shipInfoChange(e){
         for (let i = 0; i < this.shipInfoList.length; i++) {
           if(this.shipInfoList[i].shipName==this.weighingList.shipName){