浏览代码

打印页修改

zhongtianhaoyuan 3 年之前
父节点
当前提交
ec317ec888
共有 2 个文件被更改,包括 17 次插入22 次删除
  1. 1 3
      public/static/weightCheckInOut.html
  2. 16 19
      src/views/warehouse/warehouseManagementTare.vue

+ 1 - 3
public/static/weightCheckInOut.html

@@ -157,7 +157,7 @@
             <td class="col col-bgc">皮重(吨)</td>
             <td class="col">{{tableData.tare}}</td>
             <td class="col col-bgc">扣重(吨)</td>
-            <td class="col">{{tableData.deductionWeight}}</td>
+            <td class="col">{{tableData.deductionWeight ? tableData.deductionWeight : '0'}}</td>
             <td class="col col-bgc" colspan="2">净重(吨)</td>
             <td class="col">{{tableData.netWeight}}</td>
           </tr>
@@ -225,9 +225,7 @@
           this.smallContent = true
           this.bigContent = false
         }
-        console.log(_data, "sddsd")
         this.tableData = _data
-        console.log(this.tableData)
         document.title = "粮食检斤单"
         window.print()
         window.onafterprint = function(event) {

+ 16 - 19
src/views/warehouse/warehouseManagementTare.vue

@@ -323,6 +323,7 @@
     getstaff,
     goodsnameXiala,
     getReceiptTaskNo,
+    getPrintInfo
   } from '@/model/warehouse/index'
   import Pagination from '@/components/Pagination'
   import WsUpload from '@/components/WsUpload'
@@ -1451,6 +1452,8 @@
         }).then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
+              console.log( this.deptBudgetList)
+
               this.deptBudgetList.grossWeight /= 1000
               this.deptBudgetList.tare /= 1000
               this.deptBudgetList.netWeight /= 1000
@@ -1470,25 +1473,19 @@
                   }
                   this.$message.success('添加成功')
                   if (status) {
-                    this.weightbills.carNo = this.deptBudgetList.carNo
-                    this.weightbills.boxNo = this.deptBudgetList.boxNo
-                    this.weightbills.boxNoOther = this.deptBudgetList.boxNoOther
-                    this.weightbills.wingNumber = this.deptBudgetList.wingNumber
-                    this.weightbills.wingNumberOther = this.deptBudgetList.wingNumberOther
-                    this.weightbills.shipName = this.deptBudgetList.shipName
-                    this.weightbills.shipNumber = this.deptBudgetList.shipNumber
-                    this.weightbills.type = this.deptBudgetList.type
-                    this.weightbills.grossWeight = this.deptBudgetList.grossWeight
-                    this.weightbills.tare = this.deptBudgetList.tare
-                    this.weightbills.netWeight = this.deptBudgetList.netWeight
-                    this.weightbills.outType = this.deptBudgetList.outType
-                    this.weightbills.backOffice = this.deptBudgetList.outType
-
-                    var date = new Date()
-                    this.weightbills.updateDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' +
-                      date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()
-                      localStorage.setItem('ck_bd_printData1',JSON.stringify(this.weightbills))
-                      window.open('../../../../static/weightCheckOut.html?type=2')
+                     getPrintInfo({
+                            id: response,
+                          })
+                          .toPromise()
+                          .then((res) => {
+                            localStorage.setItem('ck_bd_printData',JSON.stringify(res))//出库皮重检斤
+                           window.open('../../../../static/weightCheckInOut.html?type=2')
+                          })
+                    // var date = new Date()
+                    // this.weightbills.updateDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' +
+                    //   date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()
+                    //   localStorage.setItem('ck_bd_printData',JSON.stringify(this.deptBudgetList))//出库皮重检斤
+                    //   window.open('../../../../static/weightCheckInOut.html?type=2')
                   }
                   this.$router.push({
                     path: 'warehouseManagementList',