Forráskód Böngészése

前端出库检斤单

gjy 2 éve
szülő
commit
d4836bcbb3

+ 7 - 10
src/views/houseSelfCollect/paymentManagement.vue

@@ -1627,19 +1627,16 @@
       selectInit(row) {
       selectInit(row) {
         //在这里一定要记得类型匹配的上。
         //在这里一定要记得类型匹配的上。
         // if (row.status != '已驳回') {
         // if (row.status != '已驳回') {
-        //   if (
-        //     row.taskId == null &&
-        //     row.status != '已通过' &&
-        //     row.status != '部分付款'
-        //   ) {
-        //     return false
-        //   } else {
-        //     return true
-        //   }
+          if (
+            row.taskId == null ) {
+            return false
+          } else {
+            return true
+          }
         // } else {
         // } else {
         //   return true
         //   return true
         // }
         // }
-        return true
+        // return true
       },
       },
       handleSelectionChange(val) {
       handleSelectionChange(val) {
         this.modification = val
         this.modification = val

+ 314 - 1
src/views/outboundManagement/weighingManagementNew.vue

@@ -300,6 +300,55 @@
           </el-col>
           </el-col>
         </el-row>
         </el-row>
       </div>
       </div>
+    </div>
+      <div class="mask" v-show="isShowPrintType"></div>
+    <div class="print-type" v-show="isShowPrintType">
+      <div class="print-type-content">
+        <div class="print-type-title">请选择打印类型</div>
+        <div class="print-type-checkbox">
+          <!-- <el-radio-group v-model="radio">
+            <el-radio label="A4" class="label-width" @change="selectType">A4</el-radio>
+            <el-radio label="A5" class="label-width" @change="selectType">A5</el-radio>
+          </el-radio-group> -->
+        </div>
+        <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
+          <div>收货单位:</div>
+          <!-- <div>{{companyName}}</div> -->
+          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
+            <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
+          <div class="print-type-ew">
+            <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
+            <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
+          </div>
+          <div class="ew-print" v-if="printSeparately">
+            <div class="row">
+              <div>额外客户姓名:</div>
+              <!-- <div>{{companyName}}</div> -->
+              <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
+                <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+            </div>
+            <div class="row">
+              <div>额外收货单位:</div>
+              <!-- <div>{{companyNameEW}}</div> -->
+              <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
+                <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="bottom-btn">
+        <el-button @click="typePrintClick">确定</el-button>
+        <el-button @click="typePrintCannelClick">取消</el-button>
+      </div>
     </div>
     </div>
     <!-- @opened="opendBtn" -->
     <!-- @opened="opendBtn" -->
     <el-dialog width="70%" class="title_css" center :visible.sync="isShowPrint" title="出库检斤单" @close="closeDialog"
     <el-dialog width="70%" class="title_css" center :visible.sync="isShowPrint" title="出库检斤单" @close="closeDialog"
@@ -334,6 +383,7 @@
     getstaff,
     getstaff,
     getReceiptTaskNo,
     getReceiptTaskNo,
   } from '@/model/warehouse/index'
   } from '@/model/warehouse/index'
+  
   import axios from 'axios'
   import axios from 'axios'
   import weightCheckPrint from './component/weightCheckPrint.vue'
   import weightCheckPrint from './component/weightCheckPrint.vue'
   import inspectInfoPrint from './component/inspectInfoPrint.vue'
   import inspectInfoPrint from './component/inspectInfoPrint.vue'
@@ -366,6 +416,7 @@
         inOutTypeList:[],
         inOutTypeList:[],
         positionInfos: [],
         positionInfos: [],
         searchKeyWord: '',
         searchKeyWord: '',
+        companyName:'',
         paramType: '',
         paramType: '',
         deptBudgetTotal: 0,
         deptBudgetTotal: 0,
         monitorUrl1: '',
         monitorUrl1: '',
@@ -433,6 +484,42 @@
           type: '',
           type: '',
           weight: '',
           weight: '',
         },
         },
+        ddchecked:false,
+        checked:false,
+        dialogDataList:[],
+        ewCustomerOptions: [{
+          value: '黑龙江利润元粮食贸易有限公司',
+          label: '黑龙江利润元粮食贸易有限公司'
+        }, {
+          value: '黑龙江众利合粮食贸易有限公司',
+          label: '黑龙江众利合粮食贸易有限公司'
+        }, {
+          value: '黑龙江鑫满仓粮食贸易有限公司',
+          label: '黑龙江鑫满仓粮食贸易有限公司'
+        }, {
+          value: '黑龙江中天昊元贸易有限公司',
+          label: '黑龙江中天昊元贸易有限公司'
+        }],
+        companyNameOptions: [{
+          value: '黑龙江利润元粮食贸易有限公司',
+          label: '黑龙江利润元粮食贸易有限公司'
+        }, {
+          value: '黑龙江众利合粮食贸易有限公司',
+          label: '黑龙江众利合粮食贸易有限公司'
+        }, {
+          value: '黑龙江鑫满仓粮食贸易有限公司',
+          label: '黑龙江鑫满仓粮食贸易有限公司'
+        }, {
+          value: '黑龙江中天昊元贸易有限公司',
+          label: '黑龙江中天昊元贸易有限公司'
+        }, ],
+        companyNameEWOptions: [{
+          value: '厦门建发物产有限公司',
+          label: '厦门建发物产有限公司'
+        }],
+        idPrint: '',
+        printSeparately: false,
+        isShowPrintType:false,
         deptBudgetList: {},
         deptBudgetList: {},
         multiSelector: [{
         multiSelector: [{
             name: '汽运',
             name: '汽运',
@@ -475,6 +562,60 @@
     },
     },
     activated() {},
     activated() {},
     methods: {
     methods: {
+      async typePrintClick(type) {
+        getweighing({
+            id: this.idPrint
+          })
+          .toPromise()
+          .then((response) => {
+            this.dialogDataList = [] //点击确认时先清空要打印的数组
+            this.dialogData = response
+            if (response.compName == '黑龙江秋收有限公司') {
+              this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
+            }
+            if (this.checked) {
+              this.dialogDataList.push(this.dialogData)
+              var _datas = JSON.stringify(this.dialogData)
+              _datas = JSON.parse(_datas)
+              _datas.compName = this.companyNameEW;
+              _datas.customer = this.ewCustomer
+              this.dialogDataList.push(_datas)
+            } else if (this.ddchecked) {
+              _datas = this.dialogData
+              _datas.compName = this.companyNameEW;
+              _datas.customer = this.ewCustomer
+              this.dialogDataList.push(_datas)
+            } else {
+              this.dialogData.compName = this.companyName
+              this.dialogDataList.push(this.dialogData)
+            }
+            window.open('../../../../static/weightCheckOut.html?type=2&tableData=' + JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
+            // this.printBig("", this.radio)
+          })
+          .catch((response) => {})
+      },
+      typePrintCannelClick() {
+        this.ddchecked = false,
+          this.checked = false,
+          this.dialogDataList = [] //打个打印取消时数组至空
+        this.isShowPrintType = false
+      },
+      changeEw(e) {
+        this.ddchecked = false
+        if (e) {
+          this.printSeparately = true
+        } else {
+          this.printSeparately = false
+        }
+      },
+      changeEwDD(e) {
+        this.checked = false
+        if (e) {
+          this.printSeparately = true
+        } else {
+          this.printSeparately = false
+        }
+      },
       addstocks(index) {
       addstocks(index) {
         this.stocks.push({
         this.stocks.push({
           warehouseName: '',
           warehouseName: '',
@@ -924,6 +1065,25 @@
           }
           }
         }
         }
       },
       },
+      check(name, type) {
+        if (type == 1) {
+          for (var _tmp = 0; _tmp < this.ewCustomerOptions.length; _tmp++) {
+            if (this.ewCustomerOptions[_tmp].label == name) {
+              return false
+            }
+          }
+          return true
+        } else if (type == 2) {
+          for (var _tmp = 0; _tmp < this.companyNameEWOptions.length; _tmp++) {
+            if (this.companyNameEWOptions[_tmp].label == name) {
+              return false
+            }
+          }
+          return true
+
+        }
+
+      },
       print() {
       print() {
         this.carjudge=false
         this.carjudge=false
         this.carChange1 = '手动填写'
         this.carChange1 = '手动填写'
@@ -1126,6 +1286,7 @@
                           type: 'success',
                           type: 'success',
                         })
                         })
                         this.getList()
                         this.getList()
+                        
                         this.weighingList = response
                         this.weighingList = response
                         // this.warehouseCount = Number(this.warehouseCount) + 1
                         // this.warehouseCount = Number(this.warehouseCount) + 1
                         // this.warehouseCount1 = Number(this.warehouseCount1) + 1
                         // this.warehouseCount1 = Number(this.warehouseCount1) + 1
@@ -1177,6 +1338,7 @@
                 newSubmit(weighingList1)
                 newSubmit(weighingList1)
                   .toPromise()
                   .toPromise()
                   .then((response) => {
                   .then((response) => {
+                    this.idPrint=response
                     getweighing({
                     getweighing({
                         id: response
                         id: response
                       })
                       })
@@ -1196,7 +1358,29 @@
                         this.inspect = JSON.parse(
                         this.inspect = JSON.parse(
                           JSON.stringify(this.weighingList)
                           JSON.stringify(this.weighingList)
                         )
                         )
-                        this.isShowPrint = true
+                        if(this.warehouseName == '鲅鱼圈金信库' ||
+                        this
+                        .warehouseName == '哈尔滨依兰库' || this
+                        .warehouseName == '白城内陆港'|| this
+                        .warehouseName == '山东园丰库'){
+                          
+                          console.log(11111111111111111111)
+                          let cang = {}
+                          cang.value = this.weighingList.seller
+                          cang.label = this.weighingList.seller
+                         if (this.check(this.weighingList.seller, 1)) {
+                          this.ewCustomerOptions.push(cang)
+                          }
+                          let cang1 = {}
+                          cang1.value = this.weighingList.buyer
+                          cang1.label = this.weighingList.buyer
+                          if (this.check(this.weighingList.buyer, 2)) {
+                            this.companyNameEWOptions.push(cang1)
+                          }
+                          this.isShowPrintType = true
+                        }else{
+                          this.isShowPrint = true
+                        }
                         this.weighingList = {
                         this.weighingList = {
                           grossWeight: 0,
                           grossWeight: 0,
                           tare: 0,
                           tare: 0,
@@ -2169,4 +2353,133 @@
   /deep/.title_css .el-dialog__header {
   /deep/.title_css .el-dialog__header {
     text-align: center !important;
     text-align: center !important;
   }
   }
+   .mask {
+    background: black;
+    width: 100vw;
+    height: 100vh;
+    position: fixed;
+    top: 0;
+    z-index: 99;
+    opacity: 0.3;
+  }
+
+  .print-type-title {
+    text-align: center;
+    font-size: 18px;
+    margin: 20px;
+  }
+
+  .bottom-btn {
+    display: flex;
+    margin-top: 20px;
+    justify-content: space-around;
+  }
+
+  .print-type-checkbox {
+    // padding-left: 20px;
+  }
+
+  .print-type {
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+    width: 440px;
+    height: 320px;
+    background: white;
+    border-radius: 10px;
+    z-index: 999;
+  }
+
+  /deep/.el-radio-group {
+    width: 100%;
+    display: flex;
+  }
+
+  /deep/.el-radio__label {
+    font-size: 20px;
+  }
+
+  /deep/.el-radio__inner {
+    // background: red;
+    height: 20px;
+    width: 20px;
+  }
+
+  .label-width {
+    width: 100%;
+    text-align: center;
+    font-size: 20px;
+  }
+
+  .show-excel {
+    opacity: 0;
+  }
+
+  /deep/.base_header_layout .find.el-button--primary {
+    width: 30px;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+
+  /deep/.base_header_layout .findinput input {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+
+  .ew-print {
+    padding: 0 20px;
+    margin-top: 10px;
+
+    // display: flex;
+    // justify-content: space-between;
+    // align-content: center;
+    .row {
+      display: flex;
+      margin-top: 10px;
+      align-items: center;
+    }
+  }
+
+  .sh-address {
+    display: flex;
+  }
+
+  .print-type-ew {
+    display: flex;
+    justify-content: space-between;
+    padding: 0 20px;
+
+    /deep/.el-radio__label {
+      font-size: 14px;
+    }
+
+    margin-top: 10px;
+  }
+
+  /deep/.el-table .cell {
+    text-align: center;
+  }
+
+  .shdw-style {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 20px;
+    margin-top: 20px;
+  }
+
+ 
+
+  // /deep/.el-table__body .current-row td:first-child {
+  //   border-left: 4px solid #2aff7c;
+  //   // border-bottom: 1px solid #2aff7c ;
+  // }
+
+  // /deep/.el-table__body .current-row td:last-child {
+  //   border-right: 4px solid #2aff7c;
+  //   // border-bottom: 1px solid #2aff7c ;
+  // }
 </style>
 </style>