Jelajahi Sumber

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

# Conflicts:
#	src/lang/zh.js
#	src/views/contractManagement/collectionContractRecord.vue
#	src/views/contractManagement/salesContractAdd.vue
#	src/views/contractManagement/salesContractEdit.vue
#	src/views/contractManagement/storageContractAdd.vue
#	src/views/statisticalReport/autoSettlementList.vue
#	src/views/statisticalReport/huoyunList.vue
#	src/views/statisticalReport/salesDeliveryReportList.vue
#	src/views/statisticalReport/shippingList.vue
#	src/views/statisticalReport/stockPurchaseReceiptReportList.vue
#	src/views/statisticalReport/stockSaleOutReportList.vue
#	src/views/warehousenew/warehouseManagementDelivery.vue
#	src/views/warehousenew/warehouseManagementNoWeightIn.vue
#	src/views/warehousenew/warehouseManagementNoWeightOut.vue
#	src/views/warehousenew/warehouseManagementPerfectDelivery.vue
#	src/views/warehousenew/warehouseManagementPerfectput.vue
#	src/views/warehousenew/warehouseManagementPut.vue
#	src/views/warehousenew/warehouseManagementRecord.vue
#	src/views/warehousenew/warehouseManagementTare.vue
#	vue.min.js
achao 3 tahun lalu
induk
melakukan
893839eb4e
100 mengubah file dengan 33555 tambahan dan 15665 penghapusan
  1. 2 0
      Sortable.min.js
  2. 1 0
      axios.min.js
  3. 21 0
      echarts.min.js
  4. 0 0
      index.js
  5. 28 23
      public/static/inspection.html
  6. 391 0
      public/static/inspectionnew.html
  7. 377 0
      public/static/outInspectionPrint.html
  8. 45 35
      public/static/payprint.html
  9. 289 279
      public/static/print.html
  10. 184 181
      public/static/tradeServicesPrint.html
  11. 17 13
      public/static/warehouseBatchPrint.html
  12. 2 2
      public/static/warehousePrint.html
  13. 43 26
      public/static/weightCheck.html
  14. 31 22
      public/static/weightCheckInOut.html
  15. 11 8
      public/static/weightCheckOut.html
  16. 487 0
      public/static/weightChecknew.html
  17. 1 0
      sockjs.min.js
  18. 4 0
      src/api/V2/houseSelfCollect/index.js
  19. 2 2
      src/api/V2/notice/index.js
  20. 1 2
      src/api/V2/statisticalReport/index.js
  21. 3 1
      src/api/V2/transport/index.js
  22. 2 1
      src/components/balanceAlert.vue
  23. 27 28
      src/lang/zh.js
  24. 29 92
      src/layout/index/top/index.vue
  25. 8 1
      src/model/houseSelfCollect/index.js
  26. 2 3
      src/model/statisticalReport/index.js
  27. 5 2
      src/model/transport/index.js
  28. 11 9
      src/views/contractManagement/collectionContractRecord.vue
  29. 65 79
      src/views/contractManagement/purchaseContractEdit.vue
  30. 3 3
      src/views/contractManagement/salesContractAdd.vue
  31. 65 36
      src/views/contractManagement/salesContractEdit.vue
  32. 7 7
      src/views/contractManagement/storageContractAdd.vue
  33. 115 97
      src/views/home/index.vue
  34. 2 2
      src/views/houseSelfCollect/acquisitionManagementAdd.vue
  35. 0 1
      src/views/houseSelfCollect/component/inspectInfoPrint.vue
  36. 8 7
      src/views/houseSelfCollect/component/paymentPrint.vue
  37. 82 10
      src/views/houseSelfCollect/component/routers/route.js
  38. 12 6
      src/views/houseSelfCollect/component/weightCheckPrint.vue
  39. 7 0
      src/views/houseSelfCollect/customerManagementAdd.vue
  40. 1 2
      src/views/houseSelfCollect/inspectInfo.vue
  41. 1348 0
      src/views/houseSelfCollect/inspectInfoLook.vue
  42. 2209 0
      src/views/houseSelfCollect/inspectionManagementNew.vue
  43. 445 0
      src/views/houseSelfCollect/inspectionManagementrecord.vue
  44. 1591 0
      src/views/houseSelfCollect/newWeighingManagement.vue
  45. 33 17
      src/views/houseSelfCollect/settlement.vue
  46. 316 0
      src/views/houseSelfCollect/weightCheckRecord.vue
  47. 2 2
      src/views/outboundManagement/collectionManagement.vue
  48. 169 0
      src/views/outboundManagement/component/inspectInfoPrint.vue
  49. 155 0
      src/views/outboundManagement/component/outInspectPrint.vue
  50. 73 16
      src/views/outboundManagement/component/route.js
  51. 184 0
      src/views/outboundManagement/component/weightCheckPrint.vue
  52. 743 0
      src/views/outboundManagement/newQualityInspectionManagement.vue
  53. 264 0
      src/views/outboundManagement/outInspectRecord.vue
  54. 63 256
      src/views/outboundManagement/qualityInspection.vue
  55. 1433 0
      src/views/outboundManagement/weighingManagementNew.vue
  56. 434 0
      src/views/outboundManagement/weighingManagementrecord.vue
  57. 926 0
      src/views/platformaudit/driverAudit.vue
  58. 1428 0
      src/views/platformaudit/purchaseContractAdd.vue
  59. 1385 0
      src/views/platformaudit/purchaseContractEdit.vue
  60. 558 0
      src/views/platformaudit/purchaseContractExamine.vue
  61. 978 0
      src/views/platformaudit/salesContract.vue
  62. 1453 0
      src/views/platformaudit/salesContractAdd.vue
  63. 1443 0
      src/views/platformaudit/salesContractEdit.vue
  64. 733 0
      src/views/platformaudit/salesContractExamine.vue
  65. 970 1017
      src/views/purchasingManagement/procurementPlanAdd.vue
  66. 940 1056
      src/views/purchasingManagement/procurementPlanEdit.vue
  67. 530 503
      src/views/purchasingManagement/procurementPlanLook.vue
  68. 1007 1134
      src/views/salesManagement/salesPlanAdd.vue
  69. 950 1005
      src/views/salesManagement/salesPlanEdit.vue
  70. 541 514
      src/views/salesManagement/salesPlanLook.vue
  71. 905 1191
      src/views/statisticalReport/autoSettlementList.vue
  72. 897 1070
      src/views/statisticalReport/huoyunList.vue
  73. 5 5
      src/views/statisticalReport/purchaseClosingCashierList.vue
  74. 3 3
      src/views/statisticalReport/purchaseReceiptStatisticsList.vue
  75. 646 808
      src/views/statisticalReport/salesClosingCashierList.vue
  76. 792 1026
      src/views/statisticalReport/salesDeliveryReportList.vue
  77. 1236 1378
      src/views/statisticalReport/shippingList.vue
  78. 790 994
      src/views/statisticalReport/stockPurchaseReceiptReportList.vue
  79. 243 167
      src/views/statisticalReport/stockSaleOutReportList.vue
  80. 176 176
      src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue
  81. 483 628
      src/views/tradeServicesManagement/approveWarehouseReceipt.vue
  82. 288 463
      src/views/tradeServicesManagement/reviewWarehouseReceipt.vue
  83. 2 2
      src/views/tradeServicesManagement/warehouseReceiptAdd.vue
  84. 199 260
      src/views/tradeServicesManagement/warehouseReceiptEdit.vue
  85. 166 281
      src/views/tradeServicesManagement/warehouseReceiptLook.vue
  86. 372 97
      src/views/tranManagement/tranManagementVehicleDispatching.vue
  87. 44 1
      src/views/tranManagement/tranManagementVehicleLook.vue
  88. 9 9
      src/views/warehouse/warehouseManagementDelivery.vue
  89. 64 53
      src/views/warehouse/warehouseManagementGross.vue
  90. 26 18
      src/views/warehouse/warehouseManagementNoWeightIn.vue
  91. 16 17
      src/views/warehouse/warehouseManagementNoWeightOut.vue
  92. 8 8
      src/views/warehouse/warehouseManagementPerfectDelivery.vue
  93. 1 1
      src/views/warehouse/warehouseManagementPerfectput.vue
  94. 2 2
      src/views/warehouse/warehouseManagementPut.vue
  95. 0 1
      src/views/warehouse/warehouseManagementPutOutLook.vue
  96. 3 1
      src/views/warehouse/warehouseManagementRecord.vue
  97. 22 23
      src/views/warehouse/warehouseManagementTare.vue
  98. 448 467
      src/views/warehouse/weightedsubsidiary.vue
  99. 9 9
      src/views/warehousenew/warehouseManagementDelivery.vue
  100. 5 6
      src/views/warehousenew/warehouseManagementNoWeightIn.vue

File diff ditekan karena terlalu besar
+ 2 - 0
Sortable.min.js


File diff ditekan karena terlalu besar
+ 1 - 0
axios.min.js


File diff ditekan karena terlalu besar
+ 21 - 0
echarts.min.js


File diff ditekan karena terlalu besar
+ 0 - 0
index.js


+ 28 - 23
public/static/inspection.html

@@ -51,13 +51,15 @@
         margin: 10px 0;
 
       }
-      img,.left {
+
+      img,
+      .left {
         width: 110px;
         height: 110px;
         /* margin-right: 118px; */
         position: absolute;
-          right: 20px;
-          top: 12px;
+        right: 20px;
+        top: 12px;
       }
 
       .config {
@@ -70,8 +72,8 @@
 
       .title {
         text-align: center;
-    font-size: 36px;
-    font-weight: 500;
+        font-size: 36px;
+        font-weight: 500;
       }
 
       .number {
@@ -86,7 +88,7 @@
 
       .small-content {
         width: 300px;
-     /*   margin: 0 auto;
+        /*   margin: 0 auto;
         border: 1px solid #ccc;
         padding: 20px 20px 160px 20px;
         position: absolute;
@@ -106,7 +108,8 @@
         justify-content: space-between;
         align-items: center;
       }
-      .numberNo{
+
+      .numberNo {
         font-size: 36px;
       }
 
@@ -119,12 +122,14 @@
       .small-img {
         margin-right: 0;
       }
-      .sign{
+
+      .sign {
         margin-right: 100px;
       }
-      .small-code{
+
+      .small-code {
         position: relative;
-        left:calc(50% - 55px)
+        left: calc(50% - 55px)
       }
     </style>
   </head>
@@ -133,11 +138,11 @@
       <div class="content" v-if="bigContent">
         <div>
 
-        <div class="title">{{tableData.compName}}</div>
-        <div class="title">粮食质检单</div>
-        <div class="left">
-          <img :src="tableData.codeUrl " alt="">
-        </div>
+          <div class="title">{{tableData.compName}}</div>
+          <div class="title">粮食质检单</div>
+          <div class="left">
+            <img :src="tableData.codeUrl " alt="">
+          </div>
         </div>
 
         <div class="number">{{tableData.qualityNo}}</div>
@@ -189,8 +194,8 @@
             <td class="col">{{tableData.impurity}}</td>
             <td class="col col-bgc">霉变粒(%)</td>
             <td class="col">{{tableData.mildewGrain}}</td>
-            <td v-if="tableData.paramType == '1'"  class="col col-bgc">扣杂</td>
-            <td v-if="tableData.paramType == '1'"  class="col">{{tableData.buckleMiscellaneous}}</td>
+            <td v-if="tableData.paramType == '1'" class="col col-bgc">扣杂</td>
+            <td v-if="tableData.paramType == '1'" class="col">{{tableData.buckleMiscellaneous}}</td>
             <td v-if="tableData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
             <td v-else class="col col-bgc" colspan="2">购粮性质</td>
             <td v-if="tableData.paramType == '1'" class="col" colspan="1">{{ tableData.natureOfGrainPurchase }}</td>
@@ -225,7 +230,7 @@
           <div class="numberNo">{{tableData.qualityNo.substring(tableData.qualityNo.length - 3)}}</div>
           <div>粮食质检单</div>
         </div>
-         <img :src="tableData.codeUrl " alt="" class="small-code">
+        <img :src="tableData.codeUrl " alt="" class="small-code">
         <div class="small-row">
           <div>编号:</div>
           <div>{{tableData.qualityNo}}</div>
@@ -285,7 +290,7 @@
         <div class="small-row">
           <div v-if="tableData.confirm == '1'">单价(元/公斤):</div>
           <div v-else>待定单价(元/公斤):</div>
-          <div  v-if="tableData.type == '潮粮'">
+          <div v-if="tableData.type == '潮粮'">
             {{tableData.tidalGrainPrice}}
           </div>
           <div v-if="tableData.type == '干粮'">
@@ -321,12 +326,12 @@
           <div>收货单位签名或盖章:</div>
         </div>
         <div class="small-row">
-         <div class="sign">客户签名:</div>
+          <div class="sign">客户签名:</div>
         </div>
       </div>
     </div>
   </body>
-  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">
     new Vue({
@@ -336,7 +341,7 @@
         name: "",
         bigContent: false,
         smallContent: false,
-        printData :{},
+        printData: {},
       },
       computed: {},
       methods: {
@@ -378,7 +383,7 @@
         console.log(_data)
         this.tableData = JSON.parse(_data)
         console.log(this.tableData)
-        document.title="粮食质检单"
+        document.title = "粮食质检单"
         window.print()
         window.onafterprint = function(event) {
           window.history.back(-1)

+ 391 - 0
public/static/inspectionnew.html

@@ -0,0 +1,391 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <title></title>
+
+    <style>
+      table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+      }
+
+      #app {
+        /* height: 98vh;
+        position: relative; */
+      }
+
+      .content {
+        width: 1000px;
+        padding: 30px 20px 20px 20px;
+        font-size: 18px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
+
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+      .bottom-row1 {
+        display: flex;
+        justify-content: space-between;
+        margin: 20px 0;
+      }
+
+      .bottom-row2 {
+        display: flex;
+        margin: 10px 0;
+
+      }
+      img,.left {
+        width: 110px;
+        height: 110px;
+        /* margin-right: 118px; */
+        position: absolute;
+          right: 20px;
+          top: 12px;
+      }
+
+      .config {
+        margin-right: 240px;
+      }
+
+      .bottom-row3 {
+        margin: 10px 0;
+      }
+
+      .title {
+        text-align: center;
+    font-size: 36px;
+    font-weight: 500;
+      }
+
+      .number {
+        text-align: right;
+        /* margin-bottom: 10px; */
+        margin: 10px 0;
+      }
+
+      .small-row {
+        display: flex;
+      }
+
+      .small-content {
+        width: 300px;
+     /*   margin: 0 auto;
+        border: 1px solid #ccc;
+        padding: 20px 20px 160px 20px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+        margin: auto;
+        height: 650px; */
+      }
+
+      .small-title {
+        text-align: center;
+        font-size: 18px;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        align-items: center;
+      }
+      .numberNo{
+        font-size: 36px;
+      }
+
+      .small-row {
+        display: flex;
+        justify-content: space-between;
+        margin: 10px;
+      }
+
+      .small-img {
+        margin-right: 0;
+      }
+      .sign{
+        margin-right: 100px;
+      }
+      .small-code{
+        position: relative;
+        left:calc(50% - 55px)
+      }
+    </style>
+  </head>
+  <body>
+    <div id="app">
+      <div class="content" v-if="bigContent">
+        <div>
+
+        <div class="title">{{tableData.compName}}</div>
+        <div class="title">粮食质检单</div>
+        <div class="left">
+          <img :src="tableData.codeUrl " alt="">
+        </div>
+        </div>
+
+        <div class="number">{{tableData.qualityNo}}</div>
+        <table class="table">
+          <tr class="row">
+            <td class="col col-bgc">客户姓名</td>
+            <td class="col" colspan="2">{{tableData.customerName}}</td>
+            <td class="col col-bgc">客户电话</td>
+            <td class="col" colspan="2">{{tableData.customerPhone}}</td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col">{{tableData.carNumber}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">收货单位</td>
+            <td class="col" colspan="2">{{tableData.compName}}</td>
+            <td class="col col-bgc">联系人</td>
+            <td class="col" colspan="2">{{tableData.person}}</td>
+            <td class="col col-bgc">联系电话</td>
+            <td class="col">{{tableData.personPhone}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">货名</td>
+            <td class="col">{{tableData.goodsName}}</td>
+            <td class="col col-bgc">类型</td>
+            <td class="col">{{tableData.type}}</td>
+            <td class="col col-bgc">容量(克/升)</td>
+            <td class="col">{{tableData.bulkDensity}}</td>
+            <td class="col col-bgc">不完善粒(%)</td>
+            <td class="col">{{tableData.imperfectGrain}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">等级</td>
+            <td class="col">{{tableData.grade}}</td>
+            <td class="col col-bgc">水分(%)</td>
+            <td class="col">{{tableData.waterContent}}</td>
+            <td class="col col-bgc">热损伤(%)</td>
+            <td class="col">{{tableData.jiaorenli}}</td>
+            <td v-if="tableData.confirm == '1'" class="col col-bgc">单价(元/公斤)</td>
+            <td v-else class="col col-bgc">待定单价(元/公斤)</td>
+            <td class="col " v-if="tableData.type == '潮粮'">
+              {{tableData.tidalGrainPrice}}
+            </td>
+            <td class="col " v-if="tableData.type == '干粮'">
+              {{tableData.dryGrainPrice}}
+            </td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">杂质(%)</td>
+            <td class="col">{{tableData.impurity}}</td>
+            <td class="col col-bgc">霉变粒(%)</td>
+            <td class="col">{{tableData.mildewGrain}}</td>
+            <td v-if="tableData.paramType == '1'"  class="col col-bgc">扣杂</td>
+            <td v-if="tableData.paramType == '1'"  class="col">{{tableData.buckleMiscellaneous}}</td>
+            <td v-if="tableData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
+            <td v-else class="col col-bgc" colspan="2">购粮性质</td>
+            <td v-if="tableData.paramType == '1'" class="col" colspan="1">{{ tableData.natureOfGrainPurchase }}</td>
+            <td v-else class="col" colspan="2">{{ tableData.natureOfGrainPurchase }}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">仓位号</td>
+            <td class="col">{{ tableData.binNumber }}</td>
+            <td class="col col-bgc">囤位号</td>
+            <td class="col">{{ tableData.storageTagNo }}</td>
+            <td class="col col-bgc" colspan="2">质检员</td>
+            <td class="col" colspan="2">{{ tableData.qualityInspector }}</td>
+          </tr>
+        </table>
+        <div class="bottom">
+          <div class="bottom-row1">
+            <div></div>
+            <div>{{tableData.qualityDate}}</div>
+          </div>
+          <div class="bottom-row2">
+            <!-- <div class="left">
+              <img :src="tableData.codeUrl " alt="">
+            </div> -->
+            <div class="config">收货单位签名或盖章</div>
+            <div class="">客户签名</div>
+          </div>
+          <!-- <div class="bottom-row3">扫一扫</div> -->
+        </div>
+      </div>
+      <div class="small-content" v-if="smallContent">
+        <div class="small-title">
+          <div class="numberNo">{{tableData.qualityNo.substring(tableData.qualityNo.length - 3)}}</div>
+          <div>粮食质检单</div>
+        </div>
+         <img :src="tableData.codeUrl " alt="" class="small-code">
+        <div class="small-row">
+          <div>编号:</div>
+          <div>{{tableData.qualityNo}}</div>
+        </div>
+        <div class="small-row">
+          <div>客户姓名:</div>
+          <div>{{tableData.customerName}}</div>
+        </div>
+        <div class="small-row">
+          <div>客户电话:</div>
+          <div>{{tableData.customerPhone}}</div>
+        </div>
+        <div class="small-row">
+          <div>车牌号:</div>
+          <div>{{tableData.carNumber}}</div>
+        </div>
+        <div class="small-row">
+          <div>收货单位:</div>
+          <div>{{tableData.compName}}</div>
+        </div>
+        <div class="small-row">
+          <div>联系人:</div>
+          <div>{{tableData.person}}</div>
+        </div>
+        <div class="small-row">
+          <div>联系电话:</div>
+          <div>{{tableData.personPhone}}</div>
+        </div>
+        <div class="small-row">
+          <div>货名:</div>
+          <div>{{tableData.goodsName}}</div>
+        </div>
+        <div class="small-row">
+          <div>类型:</div>
+          <div>{{tableData.type}}</div>
+        </div>
+        <div class="small-row">
+          <div>容量(克/升):</div>
+          <div>{{tableData.bulkDensity}}</div>
+        </div>
+        <div class="small-row">
+          <div>不完善粒(%):</div>
+          <div>{{tableData.imperfectGrain}}</div>
+        </div>
+        <div class="small-row">
+          <div>等级:</div>
+          <div>{{tableData.grade}}</div>
+        </div>
+        <div class="small-row">
+          <div>水分(%):</div>
+          <div>{{tableData.waterContent}}</div>
+        </div>
+        <div class="small-row">
+          <div>热损伤(%):</div>
+          <div>{{tableData.jiaorenli}}</div>
+        </div>
+        <div class="small-row">
+          <div v-if="tableData.confirm == '1'">单价(元/公斤):</div>
+          <div v-else>待定单价(元/公斤):</div>
+          <div  v-if="tableData.type == '潮粮'">
+            {{tableData.tidalGrainPrice}}
+          </div>
+          <div v-if="tableData.type == '干粮'">
+            {{tableData.dryGrainPrice}}
+          </div>
+          <!-- <div>{{tableData.tidalGrainPrice}}</div> -->
+        </div>
+        <div class="small-row">
+          <div>杂质(%):</div>
+          <div>{{tableData.impurity}}</div>
+        </div>
+        <div class="small-row">
+          <div>霉变粒(%):</div>
+          <div>{{tableData.mildewGrain}}</div>
+        </div>
+        <div v-if="tableData.paramType == '1'" class="small-row">
+          <div>扣杂:</div>
+          <div>{{tableData.buckleMiscellaneous}}</div>
+        </div>
+        <div class="small-row">
+          <div>购粮性质:</div>
+          <div>{{tableData.natureOfGrainPurchase}}</div>
+        </div>
+        <div class="small-row">
+          <div>质检:</div>
+          <div>{{tableData.qualityInspector}}</div>
+        </div>
+        <div class="small-row">
+          <div>时间:</div>
+          <div>{{tableData.qualityDate}}</div>
+        </div>
+        <div class="small-row">
+          <div>收货单位签名或盖章:</div>
+        </div>
+        <div class="small-row">
+         <div class="sign">客户签名:</div>
+        </div>
+      </div>
+    </div>
+  </body>
+  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+  <script type="text/javascript">
+    new Vue({
+      el: '#app',
+      data: {
+        tableData: "",
+        name: "",
+        bigContent: false,
+        smallContent: false,
+        printData :{},
+      },
+      computed: {},
+      methods: {
+        tableRowClassName({
+          row,
+          rowIndex
+        }) {
+          if (rowIndex === 1) {
+            return 'warning-row';
+          } else if (rowIndex === 3) {
+            return 'success-row';
+          }
+          return '';
+        },
+        getQueryVariable(variable) {
+          var query = window.location.search.substring(1);
+          var vars = query.split("&");
+          for (var i = 0; i < vars.length; i++) {
+            var pair = vars[i].split("=");
+            if (pair[0] == variable) {
+              return pair[1];
+            }
+          }
+          return (false);
+        },
+        printSmall() {},
+        printBig() {},
+      },
+      mounted() {
+        let _data = decodeURIComponent(this.getQueryVariable("dataList"))
+        let _type = decodeURIComponent(this.getQueryVariable("type"))
+        if (_type == 2) {
+          this.bigContent = true
+          this.smallContent = false
+        } else {
+          this.smallContent = true
+          this.bigContent = false
+        }
+        console.log(_data)
+        this.tableData = JSON.parse(_data)
+        console.log(this.tableData)
+        document.title="粮食质检单"
+        window.print()
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        };
+      },
+      watch: {}
+    })
+  </script>
+
+</html>

+ 377 - 0
public/static/outInspectionPrint.html

@@ -0,0 +1,377 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <title></title>
+
+    <style>
+      table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+      }
+
+      #app {
+        /* height: 98vh;
+        position: relative; */
+      }
+
+      .content {
+        width: 1000px;
+        padding: 30px 20px 20px 20px;
+        font-size: 18px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
+
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+      .bottom-row1 {
+        display: flex;
+        justify-content: space-between;
+        margin: 20px 0;
+      }
+
+      .bottom-row2 {
+        display: flex;
+        margin: 10px 0;
+
+      }
+      img,.left {
+        width: 110px;
+        height: 110px;
+        /* margin-right: 118px; */
+        position: absolute;
+          right: 20px;
+          top: 12px;
+      }
+
+      .config {
+        margin-right: 240px;
+      }
+
+      .bottom-row3 {
+        margin: 10px 0;
+      }
+
+      .title {
+        text-align: center;
+    font-size: 36px;
+    font-weight: 500;
+      }
+
+      .number {
+        text-align: right;
+        /* margin-bottom: 10px; */
+        margin: 10px 0;
+      }
+
+      .small-row {
+        display: flex;
+      }
+
+      .small-content {
+        width: 300px;
+     /*   margin: 0 auto;
+        border: 1px solid #ccc;
+        padding: 20px 20px 160px 20px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+        margin: auto;
+        height: 650px; */
+      }
+
+      .small-title {
+        text-align: center;
+        font-size: 18px;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        align-items: center;
+      }
+      .numberNo{
+        font-size: 36px;
+      }
+
+      .small-row {
+        display: flex;
+        justify-content: space-between;
+        margin: 10px;
+      }
+
+      .small-img {
+        margin-right: 0;
+      }
+      .sign{
+        margin-right: 100px;
+      }
+      .small-code{
+        position: relative;
+        left:calc(50% - 55px)
+      }
+    </style>
+  </head>
+  <body>
+    <div id="app">
+      <div class="content" v-if="bigContent">
+        <div>
+
+        <div class="title">{{tableData.compName}}</div>
+        <div class="title">粮食质检单</div>
+        <div class="left">
+          <img :src="tableData.codeUrl " alt="">
+        </div>
+        </div>
+        <div class="number">{{tableData.qualityNo}}</div>
+        <table class="table">
+          <tr class="row">
+            <td class="col col-bgc">收货单位</td>
+            <td class="col" colspan="2">{{ tableData.contractManagement.buyer }}</td>
+            <td class="col col-bgc">联系电话</td>
+            <td class="col" colspan="2">{{ tableData.contractManagement.buyerPhone }}</td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col">{{ tableData.carNumber }}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">发货单位</td>
+            <td class="col" colspan="2">{{ tableData.contractManagement.seller }}</td>
+            <td class="col col-bgc">联系人</td>
+            <td class="col" colspan="2">{{ tableData.contractManagement.feedbackLeader }}</td>
+            <td class="col col-bgc">联系电话</td>
+            <td class="col">{{ tableData.contractManagement.sellerPhone }}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">货名</td>
+            <td class="col">{{tableData.goodsName}}</td>
+            <td class="col col-bgc">类型</td>
+            <td class="col">{{tableData.type}}</td>
+            <td class="col col-bgc">容量(克/升)</td>
+            <td class="col">{{tableData.bulkDensity}}</td>
+            <td class="col col-bgc">不完善粒(%)</td>
+            <td class="col">{{tableData.imperfectGrain}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">等级</td>
+            <td class="col">{{tableData.grade}}</td>
+            <td class="col col-bgc">水分(%)</td>
+            <td class="col">{{tableData.waterContent}}</td>
+            <td class="col col-bgc">热损伤(%)</td>
+            <td class="col">{{tableData.jiaorenli}}</td>
+            <td v-if="tableData.contractManagement.priceType == '定价销售'" class="col col-bgc">单价(元/公斤)</td>
+            <td v-else class="col col-bgc">待定单价(元/公斤)</td>
+            <!-- <td v-if="tableData.type == '潮粮'" class="col">{{ tableData.tidalGrainPrice }}</td> -->
+            <td class="col">{{ tableData.contractManagement.unitContractPrice }}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">杂质(%)</td>
+            <td class="col">{{tableData.impurity}}</td>
+            <td class="col col-bgc">霉变粒(%)</td>
+            <td class="col">{{tableData.mildewGrain}}</td>
+            <td v-if="tableData.paramType == '1'"  class="col col-bgc">扣杂</td>
+            <td v-if="tableData.paramType == '1'"  class="col">{{tableData.buckleMiscellaneous}}</td>
+            <td v-else colspan="2"></td>
+            <!-- <td v-if="tableData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
+            <td v-else class="col col-bgc" colspan="2">购粮性质</td>
+            <td v-if="tableData.paramType == '1'" class="col" colspan="1">{{ tableData.natureOfGrainPurchase }}</td>
+            <td v-else class="col" colspan="2">{{ tableData.natureOfGrainPurchase }}</td> -->
+            <td colspan="2"></td>
+          </tr>
+        </table>
+        <div class="bottom">
+          <div class="bottom-row1">
+            <div></div>
+            <div>{{tableData.qualityDate}}</div>
+          </div>
+          <div class="bottom-row2">
+            <!-- <div class="left">
+              <img :src="tableData.codeUrl " alt="">
+            </div> -->
+            <div class="config">收货单位签名或盖章</div>
+            <div class="">客户签名</div>
+          </div>
+          <!-- <div class="bottom-row3">扫一扫</div> -->
+        </div>
+      </div>
+      <div class="small-content" v-if="smallContent">
+        <div class="small-title">
+          <div class="numberNo">{{tableData.qualityNo?tableData.qualityNo.substring(tableData.qualityNo.length - 3):""}}</div>
+          <div>粮食质检单</div>
+        </div>
+         <img :src="tableData.codeUrl " alt="" class="small-code">
+        <div class="small-row">
+          <div>业务编号:</div>
+          <div>{{tableData.qualityNo}}</div>
+        </div>
+        <div class="small-row">
+          <div>收货单位</div>
+          <div>{{tableData.customerName}}</div>
+        </div>
+        <div class="small-row">
+          <div>联系电话</div>
+          <div>{{tableData.customerPhone}}</div>
+        </div>
+        <div class="small-row">
+          <div>车牌号:</div>
+          <div>{{tableData.carNumber}}</div>
+        </div>
+        <div class="small-row">
+          <div>发货单位:</div>
+          <div>{{tableData.compName}}</div>
+        </div>
+        <div class="small-row">
+          <div>联系人:</div>
+          <div>{{tableData.person}}</div>
+        </div>
+        <div class="small-row">
+          <div>联系电话:</div>
+          <div>{{tableData.personPhone}}</div>
+        </div>
+        <div class="small-row">
+          <div>货名:</div>
+          <div>{{tableData.goodsName}}</div>
+        </div>
+        <div class="small-row">
+          <div>类型:</div>
+          <div>{{tableData.type}}</div>
+        </div>
+        <div class="small-row">
+          <div>容量(克/升):</div>
+          <div>{{tableData.bulkDensity}}</div>
+        </div>
+        <div class="small-row">
+          <div>不完善粒(%):</div>
+          <div>{{tableData.imperfectGrain}}</div>
+        </div>
+        <div class="small-row">
+          <div>等级:</div>
+          <div>{{tableData.grade}}</div>
+        </div>
+        <div class="small-row">
+          <div>水分(%):</div>
+          <div>{{tableData.waterContent}}</div>
+        </div>
+        <div class="small-row">
+          <div>热损伤(%):</div>
+          <div>{{tableData.jiaorenli}}</div>
+        </div>
+        <div class="small-row">
+          <div v-if="tableData.confirm == '1'">单价(元/公斤):</div>
+          <div v-else>待定单价(元/公斤):</div>
+          <div  v-if="tableData.type == '潮粮'">
+            {{tableData.tidalGrainPrice}}
+          </div>
+          <div v-if="tableData.type == '干粮'">
+            {{tableData.dryGrainPrice}}
+          </div>
+        </div>
+        <div class="small-row">
+          <div>杂质(%):</div>
+          <div>{{tableData.impurity}}</div>
+        </div>
+        <div class="small-row">
+          <div>霉变粒(%):</div>
+          <div>{{tableData.mildewGrain}}</div>
+        </div>
+        <div v-if="tableData.paramType == '1'" class="small-row">
+          <div>扣杂:</div>
+          <div>{{tableData.buckleMiscellaneous}}</div>
+        </div>
+        <div class="small-row">
+          <div>购粮性质:</div>
+          <div>{{tableData.natureOfGrainPurchase}}</div>
+        </div>
+        <div class="small-row">
+          <div>质检:</div>
+          <div>{{tableData.qualityInspector}}</div>
+        </div>
+        <div class="small-row">
+          <div>时间:</div>
+          <div>{{tableData.qualityDate}}</div>
+        </div>
+        <div class="small-row">
+          <div>收货单位签名或盖章:</div>
+        </div>
+        <div class="small-row">
+         <div class="sign">客户签名:</div>
+        </div>
+      </div>
+    </div>
+  </body>
+  <!-- <script src="https://cdn.jsdelivr.net/npm/vue@2"></script> -->
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
+  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+  <script type="text/javascript">
+    new Vue({
+      el: '#app',
+      data: {
+        tableData: {
+          contractManagement:{},
+
+        },
+        name: "",
+        bigContent: false,
+        smallContent: false,
+      },
+      computed: {},
+      methods: {
+        tableRowClassName({
+          row,
+          rowIndex
+        }) {
+          if (rowIndex === 1) {
+            return 'warning-row';
+          } else if (rowIndex === 3) {
+            return 'success-row';
+          }
+          return '';
+        },
+        getQueryVariable(variable) {
+          var query = window.location.search.substring(1);
+          var vars = query.split("&");
+          for (var i = 0; i < vars.length; i++) {
+            var pair = vars[i].split("=");
+            if (pair[0] == variable) {
+              return pair[1];
+            }
+          }
+          return (false);
+        },
+      },
+      mounted() {
+        _data = localStorage.getItem("out-Warehouse_print")
+        this.tableData = JSON.parse(_data)
+        if (this.tableData.type == 2) {
+          this.bigContent = true
+          this.smallContent = false
+        } else {
+          this.smallContent = true
+          this.bigContent = false
+        }
+        document.title="粮食质检单"
+        window.print()
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        };
+      },
+      watch: {}
+    })
+  </script>
+
+</html>

+ 45 - 35
public/static/payprint.html

@@ -14,9 +14,11 @@
         height: 88vh;
         position: relative;
       }
-      .simple{
+
+      .simple {
         height: 120vh !important;
       }
+
       .content {
         width: 1000px;
         margin: auto;
@@ -48,7 +50,8 @@
         height: 80px;
         /* margin-right: 118px; */
       }
-      .leftimg{
+
+      .leftimg {
         width: 80px;
         height: 80px;
         position: absolute;
@@ -73,11 +76,12 @@
         text-align: right;
         margin-bottom: 10px;
       }
+
       .number1 {
-    text-align: right;
-    margin-bottom: 10px;
-    margin-top: 60px;
-}
+        text-align: right;
+        margin-bottom: 10px;
+        margin-top: 60px;
+      }
 
       .small-row {
         display: flex;
@@ -277,7 +281,6 @@
                   <td class="col col-bgc">皮重</td>
                   <td class="col col-bgc">扣杂重</td>
                   <td class="col col-bgc">净重</td>
-                  <!-- <td class="col col-bgc">纯重</td> -->
                 </tr>
                 <tr class="row">
                   <td class="col">{{ printData1[index].goodsName}}</td>
@@ -292,14 +295,15 @@
                   <td class="col">
                     {{ printData1[index].qualityInspectionManagement.impurity}}
                   </td>
-                  <td class="col">  {{printData1[index].weighingManagement.qualityInspectionManagement?printData1[index].weighingManagement.qualityInspectionManagement.bulkDensity:''}}</td>
+                  <td class="col">
+                    {{printData1[index].weighingManagement.qualityInspectionManagement?printData1[index].weighingManagement.qualityInspectionManagement.bulkDensity:''}}
+                  </td>
                   <td class="col">{{ printData1[index].grossWeight}}</td>
                   <td class="col">{{ printData1[index].tare}}</td>
                   <td class="col">
                     {{printData1[index].weighingManagement?printData1[index].weighingManagement.buckleMiscellaneous:''}}
                   </td>
                   <td class="col">{{ printData1[index].netWeight}}</td>
-                  <!-- <td class="col">{{ printData1[index].pureWeight}}</td> -->
                 </tr>
                 <tr class="row">
                   <td class="col col-bgc">纯重</td>
@@ -317,7 +321,6 @@
                   <td class="col col-bgc">其他补助</td>
                   <td class="col col-bgc">称重扣款</td>
                   <td class="col col-bgc">运费扣款</td>
-                  <!-- <td class="col col-bgc">卸车扣款</td> -->
                 </tr>
                 <tr class="row">
                   <td class="col">{{ printData1[index].pureWeight}}</td>
@@ -416,14 +419,14 @@
             </div>
             <div v-if="isShowPrintType4" class="part2">
               <div style="height: 120px;">
-             
-                  <div class="title">入库检斤单</div>
-                  <div class="leftimg">
-                    <img :src="printData1[index].weighingManagement.codeUrl" alt="">
-                  </div>
-                  <div class="number1">{{printData1[index].weighingManagement.number}}</div>
+
+                <div class="title">入库检斤单</div>
+                <div class="leftimg">
+                  <img :src="printData1[index].weighingManagement.codeUrl" alt="">
                 </div>
-             
+                <div class="number1">{{printData1[index].weighingManagement.number}}</div>
+              </div>
+
               <table class="table">
                 <tr class="row">
                   <td class="col col-bgc">客户姓名</td>
@@ -626,7 +629,8 @@
               <td class="col col-bgc">皮重</td>
               <td class="col col-bgc">扣杂重</td>
               <td class="col col-bgc">净重</td>
-              <td class="col col-bgc">纯重</td>
+              <td class="col col-bgc">出库净重</td>
+              <!-- <td class="col col-bgc">纯重</td> -->
             </tr>
             <tr class="row">
               <td class="col">{{ printData.goodsName}}</td>
@@ -646,9 +650,11 @@
                 {{ printData.weighingManagement.buckleMiscellaneous}}
               </td>
               <td class="col">{{ printData.netWeight}}</td>
-              <td class="col">{{ printData.pureWeight}}</td>
+              <td class="col">{{printData.contractManagement ? printData.contractManagement.weight : "0"}}</td>
+              <!-- <td class="col">{{ printData.pureWeight}}</td> -->
             </tr>
             <tr class="row">
+              <td class="col col-bgc">纯重</td>
               <td class="col col-bgc" v-if="printData.type == '潮粮'">
                 净重单价
               </td>
@@ -661,9 +667,10 @@
               <td class="col col-bgc">其他补助</td>
               <td class="col col-bgc">称重扣款</td>
               <td class="col col-bgc">运费扣款</td>
-              <td class="col col-bgc">卸车扣款</td>
+              <!-- <td class="col col-bgc">1卸车扣款</td> -->
             </tr>
             <tr class="row">
+              <td class="col">{{ printData.pureWeight}}</td>
               <td class="col " v-if="printData.type == '潮粮'">
                 {{printData.tidalGrainPrice}}
               </td>
@@ -678,9 +685,10 @@
               <td class="col ">{{ printData.otherSubsidy}}</td>
               <td class="col ">{{ printData.weighingDeduction}}</td>
               <td class="col ">{{ printData.freightDeduction}}</td>
-              <td class="col ">{{ printData.unloadDeduction}}</td>
+              <!-- <td class="col ">{{ printData.unloadDeduction}}</td> -->
             </tr>
             <tr class="row">
+              <td class="col col-bgc">卸车扣款</td>
               <td class="col col-bgc">质量扣款</td>
               <td class="col col-bgc">其他扣款</td>
               <td class="col col-bgc" v-if="printData.type == '潮粮'">
@@ -689,9 +697,10 @@
               <td class="col col-bgc">合计应付</td>
               <td class="col col-bgc">购粮性质</td>
               <td class="col col-bgc">车牌号</td>
-              <td class="col col-bgc" colspan="5">记事</td>
+              <td class="col col-bgc" colspan="4">记事</td>
             </tr>
             <tr class="row">
+              <td class="col ">{{ printData.unloadDeduction}}</td>
               <td class="col ">{{ printData.qualityDeduction}}</td>
               <td class="col ">{{ printData.otherDeduction}}</td>
               <td class="col " v-if="printData.type == '潮粮'">
@@ -702,7 +711,7 @@
                 {{ printData.qualityInspectionManagement.natureOfGrainPurchase}}
               </td>
               <td class="col ">{{ printData.carNo}}</td>
-              <td class="col " colspan="5">{{ printData.remarks}}</td>
+              <td class="col " colspan="4">{{ printData.remarks}}</td>
             </tr>
             <tr class="row">
               <td class="col col-bgc">实付金额</td>
@@ -744,13 +753,13 @@
 
         <div v-if="isShowPrintType4" class="part2">
           <div>
-        
-          <div class="title">入库检斤单</div>
-          <div class="leftimg">
-            <img :src="tableData.codeUrl" alt="">
+
+            <div class="title">入库检斤单</div>
+            <div class="leftimg">
+              <img :src="tableData.codeUrl" alt="">
+            </div>
+            <div class="number1">{{tableData.number}}</div>
           </div>
-          <div class="number1">{{tableData.number}}</div>
-        </div>
           <table class="table">
             <tr class="row">
               <td class="col col-bgc">客户姓名</td>
@@ -1064,7 +1073,7 @@
       </div>
     </div>
   </body>
-  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">
     new Vue({
@@ -1074,7 +1083,7 @@
         isShowPrintType2: false,
         isShowPrintType3: false,
         isShowPrintType4: false,
-        isShowPrintType5:false,
+        isShowPrintType5: false,
         showType: [],
         printData: {},
         printData1: [],
@@ -1135,7 +1144,8 @@
           console.log("对象", this.printData1)
           console.log("对象", this.printData)
           for (let i = 0; i < this.printData1.length; i++) {
-            if(!this.printData1[i].identityAuthenticationInfo.compAddress) this.printData1[i].identityAuthenticationInfo.compAddress=''
+            if (!this.printData1[i].identityAuthenticationInfo.compAddress) this.printData1[i]
+              .identityAuthenticationInfo.compAddress = ''
             if (this.printData1[i].identityAuthenticationInfo.compAddress.length > 24) {
               this.printData1[i].identityAuthenticationInfo.compAddress = this.printData1[i]
                 .identityAuthenticationInfo
@@ -1211,9 +1221,9 @@
               case '打印检斤单':
                 this.isShowPrintType4 = !this.isShowPrintType4
                 break
-                case '打印回执单':
-                  this.isShowPrintType5 = !this.isShowPrintType5
-                  break
+              case '打印回执单':
+                this.isShowPrintType5 = !this.isShowPrintType5
+                break
             }
           }
         } else {

+ 289 - 279
public/static/print.html

@@ -1,41 +1,41 @@
 <!DOCTYPE html>
 <html>
 
-<head>
-  <meta charset="utf-8">
-  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
-  <title></title>
-  <style>
-    .content {
-      text-align: center;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      flex-direction: column;
-    }
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <title></title>
+    <style>
+      .content {
+        text-align: center;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        flex-direction: column;
+      }
 
-    .title {
-      width: 600px;
-      position: relative;
-      /* border-top: 1px solid #EBEEF5;
+      .title {
+        width: 600px;
+        position: relative;
+        /* border-top: 1px solid #EBEEF5;
       border-left: 1px solid #EBEEF5;
       border-right: 1px solid #EBEEF5; */
-      /* padding: 20px; */
-      box-sizing: border-box;
-      display: flex;
-      justify-content: center;
-      align-items: center;
-    }
+        /* padding: 20px; */
+        box-sizing: border-box;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
 
-    .name {
-      font-size: 16px;
-      font-weight: 500;
-      color: #323233;
-      margin: 10px;
-    }
+      .name {
+        font-size: 16px;
+        font-weight: 500;
+        color: #323233;
+        margin: 10px;
+      }
 
-    .price {
-      /* position: absolute;
+      .price {
+        /* position: absolute;
       right: 10px;
       bottom: 0;
       margin: auto;
@@ -43,177 +43,193 @@
       top: 0;
       display: flex;
     align-items: center; */
-    }
-    .tableBox {
-      width: 80px;
-      border-left: 1px solid #ccc;
-      /* border-right: 1px solid #ccc; */
-    }
-    .tableBox tr {
-      font-size: 12px;
-      padding: 0 !important;
-      display: flow-root;
-      /* border-left:1px solid #ccc; */
-      /* border-right:1px solid #ccc;*/
-      border-bottom:1px solid #ccc; 
-      display: flex;
-      justify-content: space-between;
-      padding-right: 10px;
-    }
+      }
 
-    .tableBox td {
-      font-size: 12px;
-      padding: 0 !important;
-    }
+      .tableBox {
+        width: 80px;
+        border-left: 1px solid #ccc;
+        /* border-right: 1px solid #ccc; */
+      }
 
-    .tableBox .cell {
-      text-align: center;
-      padding: 0!important;
-      line-height: 22px;
-      /* margin:0 2px!important; */
-    }
-    .table-row{
-      display: flex;
-      border-top: 1px solid #ccc;
-    }
-    .el-table--scrollable-x .el-table__body-wrapper{
-      overflow: hidden!important;
-    }
-    .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
-    border: 0;
-    padding: 0;
-    text-overflow: initial;
-    border-right: 1px solid #ccc;
-}
-.el-table__row td:nth-of-type(1){
-  width: 40%;
-  /* border-right: 1px solid #ccc!important; */
-  background: #cccccc3d;
-}
-.el-table__row td:nth-of-type(2){
-  width: 60%;
-}
-.el-table::before {
-    left: 0;
-    bottom: 0;
-    width: 100%;
-    height: 0px;
-}
-.content0{
-  /* margin-bottom: 30vh; */
-  /* padding-top: 5vh; */
-  /* background-color: powderblue; */
-}
-.content1{
-  /* margin-bottom: 20vh; */
-  /* padding-top: 5vh; */
-  margin-top: 15vh;
-/* background: palegreen; */
-}
-.content2{
-  /* padding-top: 5vh; */
-  /* margin-bottom: 30vh; */
-  margin-top: 15vh;
-  /* background: yellow; */
-}
-.content3{
-  /* padding-top: 10px; */
-  margin-top: 15vh;
-  /* background-color: red; */
-}
-.has-gutter th:nth-of-type(1){
-  width: 40%;
-}
-.has-gutter th:nth-of-type(2){
-  width: 60%;
-}
-.tableBox7 tr{
-border-right: 1px solid #ccc!important;
-}
-  </style>
-</head>
+      .tableBox tr {
+        font-size: 12px;
+        padding: 0 !important;
+        display: flow-root;
+        /* border-left:1px solid #ccc; */
+        /* border-right:1px solid #ccc;*/
+        border-bottom: 1px solid #ccc;
+        display: flex;
+        justify-content: space-between;
+        padding-right: 10px;
+      }
 
-<body>
-  <div id="app">
-    <div class="content" :class="'content'+index" v-for="(item,index) in 4">
-      <div class="title">
-        <div class="name" v-if="index==0">一等单价 {{name}}价格对照表(按水分)</div>
-        <div class="name" v-if="index==1">二等单价 {{name}}价格对照表(按水分)</div>
-        <div class="name" v-if="index==2">三等单价 {{name}}价格对照表(按水分)</div>
-        <div class="name" v-if="index==3">等外单价 {{name}}价格对照表(按水分)</div>
-        <div class="price">价格单位:元/公斤</div>
-      </div>
-      <div class="table-row" >
-        <el-table :data="tableData1" :row-class-name="tableRowClassName" class="tableBox">
-          <el-table-column prop="waterMin" label="水分" header-align="center">
-          </el-table-column>
-          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+      .tableBox td {
+        font-size: 12px;
+        padding: 0 !important;
+      }
+
+      .tableBox .cell {
+        text-align: center;
+        padding: 0 !important;
+        line-height: 22px;
+        /* margin:0 2px!important; */
+      }
+
+      .table-row {
+        display: flex;
+        border-top: 1px solid #ccc;
+      }
+
+      .el-table--scrollable-x .el-table__body-wrapper {
+        overflow: hidden !important;
+      }
+
+      .el-table td.el-table__cell,
+      .el-table th.el-table__cell.is-leaf {
+        border: 0;
+        padding: 0;
+        text-overflow: initial;
+        border-right: 1px solid #ccc;
+      }
+
+      .el-table__row td:nth-of-type(1) {
+        width: 40%;
+        /* border-right: 1px solid #ccc!important; */
+        background: #cccccc3d;
+      }
+
+      .el-table__row td:nth-of-type(2) {
+        width: 60%;
+      }
+
+      .el-table::before {
+        left: 0;
+        bottom: 0;
+        width: 100%;
+        height: 0px;
+      }
+
+      .content0 {
+        /* margin-bottom: 30vh; */
+        /* padding-top: 5vh; */
+        /* background-color: powderblue; */
+      }
+
+      .content1 {
+        /* margin-bottom: 20vh; */
+        /* padding-top: 5vh; */
+        margin-top: 15vh;
+        /* background: palegreen; */
+      }
+
+      .content2 {
+        /* padding-top: 5vh; */
+        /* margin-bottom: 30vh; */
+        margin-top: 15vh;
+        /* background: yellow; */
+      }
+
+      .content3 {
+        /* padding-top: 10px; */
+        margin-top: 15vh;
+        /* background-color: red; */
+      }
+
+      .has-gutter th:nth-of-type(1) {
+        width: 40%;
+      }
+
+      .has-gutter th:nth-of-type(2) {
+        width: 60%;
+      }
+
+      .tableBox7 tr {
+        border-right: 1px solid #ccc !important;
+      }
+    </style>
+  </head>
+
+  <body>
+    <div id="app">
+      <div class="content" :class="'content'+index" v-for="(item,index) in 4">
+        <div class="title">
+          <div class="name" v-if="index==0">一等单价 {{name}}价格对照表(按水分)</div>
+          <div class="name" v-if="index==1">二等单价 {{name}}价格对照表(按水分)</div>
+          <div class="name" v-if="index==2">三等单价 {{name}}价格对照表(按水分)</div>
+          <div class="name" v-if="index==3">等外单价 {{name}}价格对照表(按水分)</div>
+          <div class="price">价格单位:元/公斤</div>
+        </div>
+        <div class="table-row">
+          <el-table :data="tableData1" :row-class-name="tableRowClassName" class="tableBox">
+            <el-table-column prop="waterMin" label="水分" header-align="center">
+            </el-table-column>
+            <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
             </el-table-column> -->
-          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
-          </el-table-column>
-          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
-          </el-table-column>
-        </el-table>
-        <el-table :data="tableData2" :row-class-name="tableRowClassName" class="tableBox">
-          <el-table-column prop="waterMin" label="水分" header-align="center">
-          </el-table-column>
-          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+            <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+            </el-table-column>
+            <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+            </el-table-column>
+          </el-table>
+          <el-table :data="tableData2" :row-class-name="tableRowClassName" class="tableBox">
+            <el-table-column prop="waterMin" label="水分" header-align="center">
+            </el-table-column>
+            <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
            </el-table-column> -->
-          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
-          </el-table-column>
-          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
-          </el-table-column>
-        </el-table>
-        <el-table :data="tableData3" :row-class-name="tableRowClassName" class="tableBox">
-          <el-table-column prop="waterMin" label="水分" header-align="center">
-          </el-table-column>
-          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+            <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+            </el-table-column>
+            <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+            </el-table-column>
+          </el-table>
+          <el-table :data="tableData3" :row-class-name="tableRowClassName" class="tableBox">
+            <el-table-column prop="waterMin" label="水分" header-align="center">
+            </el-table-column>
+            <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
            </el-table-column> -->
-          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
-          </el-table-column>
-          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
-          </el-table-column>
-        </el-table>
-        <el-table :data="tableData4" :row-class-name="tableRowClassName" class="tableBox">
-          <el-table-column prop="waterMin" label="水分" header-align="center">
-          </el-table-column>
-          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+            <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+            </el-table-column>
+            <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+            </el-table-column>
+          </el-table>
+          <el-table :data="tableData4" :row-class-name="tableRowClassName" class="tableBox">
+            <el-table-column prop="waterMin" label="水分" header-align="center">
+            </el-table-column>
+            <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
            </el-table-column> -->
-          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
-          </el-table-column>
-          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
-          </el-table-column>
-        </el-table>
-        <el-table :data="tableData5" :row-class-name="tableRowClassName" class="tableBox">
-          <el-table-column prop="waterMin" label="水分" header-align="center">
-          </el-table-column>
-          <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
+            <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+            </el-table-column>
+            <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+            </el-table-column>
+          </el-table>
+          <el-table :data="tableData5" :row-class-name="tableRowClassName" class="tableBox">
+            <el-table-column prop="waterMin" label="水分" header-align="center">
+            </el-table-column>
+            <!-- <el-table-column prop="waterMax" label="水分上限(%)" header-align="center">
            </el-table-column> -->
-          <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
-          </el-table-column>
-          <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
-          </el-table-column>
-          <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
-          </el-table-column>
-        </el-table>
+            <el-table-column prop="price1" label="单价" v-if="index==0" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price2" label="单价" v-if="index==1" header-align="center">
+            </el-table-column>
+            <el-table-column prop="price3" label="单价" v-if="index==2" header-align="center">
+            </el-table-column>
+            <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
+            </el-table-column>
+          </el-table>
           <el-table :data="tableData6" :row-class-name="tableRowClassName" class="tableBox">
             <el-table-column prop="waterMin" label="水分" header-align="center">
             </el-table-column>
@@ -242,97 +258,91 @@ border-right: 1px solid #ccc!important;
             <el-table-column prop="priceOther" label="单价" v-if="index==3" header-align="center">
             </el-table-column>
           </el-table>
+        </div>
+
       </div>
 
     </div>
-
-  </div>
-</body>
-<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
-<script src="https://unpkg.com/element-ui/lib/index.js"></script>
-<script type="text/javascript">
-  new Vue({
-    el: '#app',
-    data: {
-      tableData: [],
-      tableData1: [],
-      tableData2: [],
-      tableData3: [],
-      tableData4: [],
-      tableData5: [],
-      tableData6: [],
-      tableData7: [],
-      name: "",
-      waterMin: '',
-      waterMax: ''
-    },
-    computed: {},
-    methods: {
-      tableRowClassName({
-        row,
-        rowIndex
-      }) {
-        if (rowIndex === 1) {
-          return 'warning-row';
-        } else if (rowIndex === 3) {
-          return 'success-row';
-        }
-        return '';
+  </body>
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
+  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+  <script type="text/javascript">
+    new Vue({
+      el: '#app',
+      data: {
+        tableData: [],
+        tableData1: [],
+        tableData2: [],
+        tableData3: [],
+        tableData4: [],
+        tableData5: [],
+        tableData6: [],
+        tableData7: [],
+        name: "",
+        waterMin: '',
+        waterMax: ''
       },
-      getQueryVariable(variable) {
-        var query = window.location.search.substring(1);
-        var vars = query.split("&");
-        for (var i = 0; i < vars.length; i++) {
-          var pair = vars[i].split("=");
-          if (pair[0] == variable) {
-            return pair[1];
+      computed: {},
+      methods: {
+        tableRowClassName({
+          row,
+          rowIndex
+        }) {
+          if (rowIndex === 1) {
+            return 'warning-row';
+          } else if (rowIndex === 3) {
+            return 'success-row';
           }
+          return '';
+        },
+        getQueryVariable(variable) {
+          var query = window.location.search.substring(1);
+          var vars = query.split("&");
+          for (var i = 0; i < vars.length; i++) {
+            var pair = vars[i].split("=");
+            if (pair[0] == variable) {
+              return pair[1];
+            }
+          }
+          return (false);
         }
-        return (false);
-      }
-    },
-    mounted() {
-      let _data = localStorage.getItem("pricePrintList")
-      this.name = decodeURIComponent(this.getQueryVariable("name"))
-      console.log(_data)
-      this.tableData = JSON.parse(_data)
-      // 构造显示数据
-      this.waterMin = this.tableData[0].waterMin
-      this.waterMax = this.tableData[0].waterMax
-      document.title = this.name + '价格对照表(按水分)'
-      for (let i = 0; i < this.tableData.length; i++) {
-        // if(!this.tableData[i].waterMin.toString().split(".")[1]){
-        //   this.tableData[i].waterMin = this.tableData[i].waterMin+'.0'
-        // }
-        if (i <= 39) {
-          this.tableData1.push(this.tableData[i])
-        } else if (i <= 79 && i > 39) {
-          this.tableData2.push(this.tableData[i])
-        }
-        else if (i <= 119 && i > 79) {
-          this.tableData3.push(this.tableData[i])
-        }
-        else if (i <= 159 && i > 119) {
-          this.tableData4.push(this.tableData[i])
-        }
-        else if (i <= 199 && i > 159) {
-          this.tableData5.push(this.tableData[i])
-        }
-        else if (i <= 239 && i > 199) {
-          this.tableData6.push(this.tableData[i])
-        }
-        else if (i <= 279 && i > 239) {
-          this.tableData7.push(this.tableData[i])
+      },
+      mounted() {
+        let _data = localStorage.getItem("pricePrintList")
+        this.name = decodeURIComponent(this.getQueryVariable("name"))
+        console.log(_data)
+        this.tableData = JSON.parse(_data)
+        // 构造显示数据
+        this.waterMin = this.tableData[0].waterMin
+        this.waterMax = this.tableData[0].waterMax
+        document.title = this.name + '价格对照表(按水分)'
+        for (let i = 0; i < this.tableData.length; i++) {
+          // if(!this.tableData[i].waterMin.toString().split(".")[1]){
+          //   this.tableData[i].waterMin = this.tableData[i].waterMin+'.0'
+          // }
+          if (i <= 39) {
+            this.tableData1.push(this.tableData[i])
+          } else if (i <= 79 && i > 39) {
+            this.tableData2.push(this.tableData[i])
+          } else if (i <= 119 && i > 79) {
+            this.tableData3.push(this.tableData[i])
+          } else if (i <= 159 && i > 119) {
+            this.tableData4.push(this.tableData[i])
+          } else if (i <= 199 && i > 159) {
+            this.tableData5.push(this.tableData[i])
+          } else if (i <= 239 && i > 199) {
+            this.tableData6.push(this.tableData[i])
+          } else if (i <= 279 && i > 239) {
+            this.tableData7.push(this.tableData[i])
+          }
         }
-      }
-      // window.print()
-      window.onafterprint = function (event) {
-        window.history.back(-1)
-      };
-    },
-    watch: {
-    }
-  })
-</script>
+        // window.print()
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        };
+      },
+      watch: {}
+    })
+  </script>
 
-</html>
+</html>

+ 184 - 181
public/static/tradeServicesPrint.html

@@ -49,6 +49,7 @@
         display: flex;
         margin: 10px 0;
       }
+
       .config {
         margin-right: 240px;
       }
@@ -66,6 +67,7 @@
         text-align: right;
         margin-bottom: 10px;
       }
+
       .sign {
         margin-right: 100px;
       }
@@ -76,214 +78,215 @@
         font-size: 16px;
         margin: 10px 0;
       }
+
       .header-top {
         display: flex;
         justify-content: space-between;
       }
+
       .center {
-       height: calc(100vh - 8px);
+        height: calc(100vh - 8px);
       }
     </style>
   </head>
   <body>
     <div id="app">
-      <div v-for="(item,index) in printData" >
+      <div v-for="(item,index) in printData">
         <div class="center">
-            <div class="title">磅码单</div>
-            <div class="title">{{item.code}}</div>
-            <table class="table">
-              <tr class="row">
-                <td class="col col-bgc">单位</td>
-                <td class="col" colspan="4">{{item.companyName}}</td>
-                <td class="col col-bgc">类型</td>
-                <td class="col" colspan="1">{{item.inOutType}}</td>
-                <td class="col col-bgc">车牌号</td>
-                <td class="col" colspan="1">{{item.carNo}}</td>
-              </tr>
-              <tr class="row">
-                <td class="col col-bgc">仓库</td>
-                <td class="col" colspan="4">{{item.warehouseName}}</td>
-                <td class="col col-bgc">仓位</td>
-                <td class="col" colspan="1">{{item.binNumber}}</td>
-                <td class="col col-bgc">货名</td>
-                <td class="col" colspan="1">{{item.goodsName}}</td>
-              </tr>
-              <tr class="row">
-                <td class="col col-bgc">毛重(公斤)</td>
-                <td class="col" colspan="1">{{item.grossWeight}}</td>
-                <td class="col col-bgc">皮重(公斤)</td>
-                <td class="col" colspan="2">{{item.tare}}</td>
-                <td class="col col-bgc">扣重(公斤)</td>
-                <td class="col" colspan="1">{{item.weight}}</td>
-                <td class="col col-bgc">净重(公斤)</td>
-                <td class="col" colspan="1">{{item.netWeight}}</td>
-              </tr>
-            </table> 
-            <div class="bottom">
-              <div style='justify-content: space-between;' class="bottom-row1">
-                <div class="config">毛检:{{item.secretaryWeigher}}皮检:{{item.skinInspector}}</div>
-                <div class="autograph">日期:{{item.inOutDate}}</div>
-              </div>
+          <div class="title">磅码单</div>
+          <div class="title">{{item.code}}</div>
+          <table class="table">
+            <tr class="row">
+              <td class="col col-bgc">单位</td>
+              <td class="col" colspan="4">{{item.companyName}}</td>
+              <td class="col col-bgc">类型</td>
+              <td class="col" colspan="1">{{item.inOutType}}</td>
+              <td class="col col-bgc">车牌号</td>
+              <td class="col" colspan="1">{{item.carNo}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">仓库</td>
+              <td class="col" colspan="4">{{item.warehouseName}}</td>
+              <td class="col col-bgc">仓位</td>
+              <td class="col" colspan="1">{{item.binNumber}}</td>
+              <td class="col col-bgc">货名</td>
+              <td class="col" colspan="1">{{item.goodsName}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">毛重(公斤)</td>
+              <td class="col" colspan="1">{{item.grossWeight}}</td>
+              <td class="col col-bgc">皮重(公斤)</td>
+              <td class="col" colspan="2">{{item.tare}}</td>
+              <td class="col col-bgc">扣重(公斤)</td>
+              <td class="col" colspan="1">{{item.weight}}</td>
+              <td class="col col-bgc">净重(公斤)</td>
+              <td class="col" colspan="1">{{item.netWeight}}</td>
+            </tr>
+          </table>
+          <div class="bottom">
+            <div style='justify-content: space-between;' class="bottom-row1">
+              <div class="config">毛检:{{item.secretaryWeigher}}皮检:{{item.skinInspector}}</div>
+              <div class="autograph">日期:{{item.inOutDate}}</div>
             </div>
+          </div>
         </div>
       </div>
       <div v-for="(item,index) in printData1" :key="index">
-      <div class="center">
-        <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
-        <div class="header">
-           <div>单位名称:{{item.compName}}</div>
-        </div>
-        <div class="header-top">
-          <div>单位:公斤/元</div>
-          <div>No.</div>
-        </div>
-        <div class="header-top">
-          <div>开票日期:{{item.createDate}}</div>
-          <div class="number">{{item.paymentNo}}</div>
-        </div>
-        <table class="table">
-          <tr class="row">
-            <td rowspan="4" class="col col-bgc">买方</td>
-            <td class="col col-bgc">单位名称</td>
-            <td class="col" colspan="3">{{ item.compName}}</td>
-            <td rowspan="4" class="col col-bgc">卖方</td>
-            <td class="col col-bgc">姓名</td>
-            <td class="col" colspan="4">{{ item.customerName}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc">税务登记号</td>
-            <td class="col" colspan="3">{{ item.taxRegistrationNo}}</td>
-            <td class="col col-bgc">身份证号</td>
-            <td class="col" colspan="4">{{ item.identityAuthenticationInfo.customerNumberCard}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc">业务编号</td>
-            <td class="col" colspan="3">{{ item.paymentNo}}</td>
-            <td class="col col-bgc">卡号</td>
-            <td class="col" colspan="4">{{item.identityAuthenticationInfo.bankDeposit}}{{item.identityAuthenticationInfo.bankCard}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc">收货仓库</td>
-            <td class="col" colspan="3">{{item.warehouseName}}</td>
-            <td class="col col-bgc">地址</td>
-            <td class="col" colspan="4">{{item.identityAuthenticationInfo.compAddress}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc">货名</td>
-            <td class="col col-bgc">类型</td>
-            <td class="col col-bgc">等级</td>
-            <td class="col col-bgc">水分%</td>
-            <td class="col col-bgc">杂质%</td>
-            <td class="col col-bgc">毛重</td>
-            <td class="col col-bgc">皮重</td>
-            <td class="col col-bgc">扣重</td>
-            <td class="col col-bgc">扣杂</td>
-            <td class="col col-bgc">净重</td>
-          </tr>
-          <tr class="row">
-            <td class="col">{{ item.goodsName}}</td>
-            <td class="col">{{ item.type}}</td>
-            <td class="col">{{ item.qualityInspectionManagement.grade}}</td>
-            <td class="col">{{ item.qualityInspectionManagement.waterContent}}</td>
-            <td class="col">{{ item.qualityInspectionManagement.impurity}}</td>
-            <td class="col">{{ item.grossWeight}}</td>
-            <td class="col">{{ item.tare}}</td>
-            <td class="col" v-if="item.type == '干粮'">{{item.weighingManagement.buckleMiscellaneous}}</td>
-            <td class="col" v-if="item.type == '潮粮'">0</td>
-            <td class="col" v-if="item.type == '干粮'">0</td>
-            <td class="col" v-if="item.type == '潮粮'">{{item.netWeight}}</td>
-            <td class="col">{{item.pureWeight}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc"  v-if="item.type == '潮粮'">净重单价</td>
-            <td class="col col-bgc" v-if="item.type == '干粮'">单价</td>
-            <td class="col col-bgc">扣单价</td>
-            <td class="col col-bgc">粮款</td>
-            <td class="col col-bgc">称重补助</td>
-            <td class="col col-bgc">运费补助</td>
-            <td class="col col-bgc">卸车补助</td>
-            <td class="col col-bgc">其他补助</td>
-            <td class="col col-bgc">称重扣款</td>
-            <td class="col col-bgc">运费扣款</td>
-            <td class="col col-bgc">卸车扣款</td>
-          </tr>
-          <tr class="row">
-            <td class="col " v-if="item.type == '潮粮'">{{item.tidalGrainPrice}}</td>
-            <td class="col " v-if="item.type == '干粮'">{{item.qualityInspectionManagement.dryGrainPrice}}</td>
-            <td class="col ">{{ item.unitDeduction}}</td>
-            <td class="col ">{{ item.grainMoney}}</td>
-            <td class="col ">{{ item.weighingSubsidy}}</td>
-            <td class="col ">{{ item.freightSubsidy}}</td>
-            <td class="col ">{{ item.unloadSubsidy}}</td>
-            <td class="col ">{{ item.otherSubsidy}}</td>
-            <td class="col ">{{ item.weighingDeduction}}</td>
-            <td class="col ">{{ item.freightDeduction}}</td>
-            <td class="col ">{{ item.unloadDeduction}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc">质量扣款</td>
-            <td class="col col-bgc">其他扣款</td>
-            <td class="col col-bgc">合计应付</td>
-            <td class="col col-bgc">购粮性质</td>
-            <td class="col col-bgc">车牌号</td>
-            <td class="col col-bgc" colspan="5">记事</td>
-          </tr>
-          <tr class="row">
-            <td class="col ">{{ item.qualityDeduction}}</td>
-            <td class="col ">{{ item.otherDeduction}}</td>
-            <td class="col ">{{ item.calculationPayable}}</td>
-            <td class="col ">{{ item.qualityInspectionManagement.natureOfGrainPurchase}}</td>
-            <td class="col ">{{ item.carNo}}</td>
-            <td class="col " colspan="5">{{ item.remarks}}</td>
-          </tr>
-          <tr class="row">
-            <td class="col col-bgc" colspan="3">人民币(大写)</td>
-            <td class="col " colspan="7">{{item.capitalize}}</td>
-    
-          </tr>
-        </table>
-        <div class="bottom">
-          <div class="bottom-row1">
-            <div>质检:{{ item.qualityInspectionManagement.qualityInspector}}</div>
-            <div>毛检:{{ item.weighingManagement.secretaryWeigher}}</div>
-            <div>皮检:{{ item.weighingManagement.skinInspector}}</div>
-            <div>结算:{{ item.settlementClerk}}</div>
-            <div>付款:{{ item.cashier}}</div>
-            <div>复点:{{ }}</div>
-            <div></div>
+        <div class="center">
+          <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
+          <div class="header">
+            <div>单位名称:{{item.compName}}</div>
           </div>
-          <div class="bottom-row2">
-            <!-- <div class="left">
+          <div class="header-top">
+            <div>单位:公斤/元</div>
+            <div>No.</div>
+          </div>
+          <div class="header-top">
+            <div>开票日期:{{item.createDate}}</div>
+            <div class="number">{{item.paymentNo}}</div>
+          </div>
+          <table class="table">
+            <tr class="row">
+              <td rowspan="4" class="col col-bgc">买方</td>
+              <td class="col col-bgc">单位名称</td>
+              <td class="col" colspan="3">{{ item.compName}}</td>
+              <td rowspan="4" class="col col-bgc">卖方</td>
+              <td class="col col-bgc">姓名</td>
+              <td class="col" colspan="4">{{ item.customerName}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">税务登记号</td>
+              <td class="col" colspan="3">{{ item.taxRegistrationNo}}</td>
+              <td class="col col-bgc">身份证号</td>
+              <td class="col" colspan="4">{{ item.identityAuthenticationInfo.customerNumberCard}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">业务编号</td>
+              <td class="col" colspan="3">{{ item.paymentNo}}</td>
+              <td class="col col-bgc">卡号</td>
+              <td class="col" colspan="4">
+                {{item.identityAuthenticationInfo.bankDeposit}}{{item.identityAuthenticationInfo.bankCard}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">收货仓库</td>
+              <td class="col" colspan="3">{{item.warehouseName}}</td>
+              <td class="col col-bgc">地址</td>
+              <td class="col" colspan="4">{{item.identityAuthenticationInfo.compAddress}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">货名</td>
+              <td class="col col-bgc">类型</td>
+              <td class="col col-bgc">等级</td>
+              <td class="col col-bgc">水分%</td>
+              <td class="col col-bgc">杂质%</td>
+              <td class="col col-bgc">毛重</td>
+              <td class="col col-bgc">皮重</td>
+              <td class="col col-bgc">扣重</td>
+              <td class="col col-bgc">扣杂</td>
+              <td class="col col-bgc">净重</td>
+            </tr>
+            <tr class="row">
+              <td class="col">{{ item.goodsName}}</td>
+              <td class="col">{{ item.type}}</td>
+              <td class="col">{{ item.qualityInspectionManagement.grade}}</td>
+              <td class="col">{{ item.qualityInspectionManagement.waterContent}}</td>
+              <td class="col">{{ item.qualityInspectionManagement.impurity}}</td>
+              <td class="col">{{ item.grossWeight}}</td>
+              <td class="col">{{ item.tare}}</td>
+              <td class="col" v-if="item.type == '干粮'">{{item.weighingManagement.buckleMiscellaneous}}</td>
+              <td class="col" v-if="item.type == '潮粮'">0</td>
+              <td class="col" v-if="item.type == '干粮'">0</td>
+              <td class="col" v-if="item.type == '潮粮'">{{item.netWeight}}</td>
+              <td class="col">{{item.pureWeight}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc" v-if="item.type == '潮粮'">净重单价</td>
+              <td class="col col-bgc" v-if="item.type == '干粮'">单价</td>
+              <td class="col col-bgc">扣单价</td>
+              <td class="col col-bgc">粮款</td>
+              <td class="col col-bgc">称重补助</td>
+              <td class="col col-bgc">运费补助</td>
+              <td class="col col-bgc">卸车补助</td>
+              <td class="col col-bgc">其他补助</td>
+              <td class="col col-bgc">称重扣款</td>
+              <td class="col col-bgc">运费扣款</td>
+              <td class="col col-bgc">卸车扣款</td>
+            </tr>
+            <tr class="row">
+              <td class="col " v-if="item.type == '潮粮'">{{item.tidalGrainPrice}}</td>
+              <td class="col " v-if="item.type == '干粮'">{{item.qualityInspectionManagement.dryGrainPrice}}</td>
+              <td class="col ">{{ item.unitDeduction}}</td>
+              <td class="col ">{{ item.grainMoney}}</td>
+              <td class="col ">{{ item.weighingSubsidy}}</td>
+              <td class="col ">{{ item.freightSubsidy}}</td>
+              <td class="col ">{{ item.unloadSubsidy}}</td>
+              <td class="col ">{{ item.otherSubsidy}}</td>
+              <td class="col ">{{ item.weighingDeduction}}</td>
+              <td class="col ">{{ item.freightDeduction}}</td>
+              <td class="col ">{{ item.unloadDeduction}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">质量扣款</td>
+              <td class="col col-bgc">其他扣款</td>
+              <td class="col col-bgc">合计应付</td>
+              <td class="col col-bgc">购粮性质</td>
+              <td class="col col-bgc">车牌号</td>
+              <td class="col col-bgc" colspan="5">记事</td>
+            </tr>
+            <tr class="row">
+              <td class="col ">{{ item.qualityDeduction}}</td>
+              <td class="col ">{{ item.otherDeduction}}</td>
+              <td class="col ">{{ item.calculationPayable}}</td>
+              <td class="col ">{{ item.qualityInspectionManagement.natureOfGrainPurchase}}</td>
+              <td class="col ">{{ item.carNo}}</td>
+              <td class="col " colspan="5">{{ item.remarks}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc" colspan="3">人民币(大写)</td>
+              <td class="col " colspan="7">{{item.capitalize}}</td>
+
+            </tr>
+          </table>
+          <div class="bottom">
+            <div class="bottom-row1">
+              <div>质检:{{ item.qualityInspectionManagement.qualityInspector}}</div>
+              <div>毛检:{{ item.weighingManagement.secretaryWeigher}}</div>
+              <div>皮检:{{ item.weighingManagement.skinInspector}}</div>
+              <div>结算:{{ item.settlementClerk}}</div>
+              <div>付款:{{ item.cashier}}</div>
+              <div>复点:{{ }}</div>
+              <div></div>
+            </div>
+            <div class="bottom-row2">
+              <!-- <div class="left">
               <img src="../../../../public/img/add.png" alt="" />
             </div> -->
-            <div class="config">收货单位签名或盖章</div>
-            <div class="">客户签名</div>
-          </div>
-          <!-- <div class="bottom-row3">扫一扫</div> -->
-          <!-- <div class="bottom-row4">
-            <el-button type="primary">关闭</el-button> 
-             <el-button type="primary" @click="printSmall">打印小票</el-button> 
+              <div class="config">收货单位签名或盖章</div>
+              <div class="">客户签名</div>
+            </div>
+            <!-- <div class="bottom-row3">扫一扫</div> -->
+            <!-- <div class="bottom-row4">
+            <el-button type="primary">关闭</el-button>
+             <el-button type="primary" @click="printSmall">打印小票</el-button>
              <el-button type="primary" @click="printBig">打印单据</el-button>
           </div> -->
+          </div>
         </div>
       </div>
     </div>
-    </div>
   </body>
-  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">
     new Vue({
       el: '#app',
       data: {
-        printData: [
-            {
-                identityAuthenticationInfo:{},
-                qualityInspectionManagement:{},
-                weighingManagement:{},
-                customerNumberCard:{},
-            }
-        ],
+        printData: [{
+          identityAuthenticationInfo: {},
+          qualityInspectionManagement: {},
+          weighingManagement: {},
+          customerNumberCard: {},
+        }],
         printData1: [],
         date: '',
       },
@@ -321,8 +324,8 @@
         this.date = new Date().toLocaleString()
         this.printData = JSON.parse(sessionStorage.getItem('inOutRecord_printBD'))
         this.printData1 = JSON.parse(sessionStorage.getItem('inOutRecord_printJSD'))
-        console.log("磅单",this.printData)
-        console.log("结算单",this.printData1)
+        console.log("磅单", this.printData)
+        console.log("结算单", this.printData1)
         // document.title = this.printData.compName + '结算凭证'
         window.print()
         window.onafterprint = function(event) {

+ 17 - 13
public/static/warehouseBatchPrint.html

@@ -14,15 +14,15 @@
       }
 
       #app {
-         /* height: 98vh;  */
-        position: relative; 
+        /* height: 98vh;  */
+        position: relative;
       }
 
       .content {
         width: 1000px;
         padding: 70px 20px 20px 20px;
         font-size: 22px;
-        height: calc(100vh - 7.5vh) ;
+        height: calc(100vh - 7.5vh);
         top: 0;
         bottom: 0;
         left: 0;
@@ -49,13 +49,15 @@
       .bottom-row2 {
         display: flex;
       }
+
       .config {
         margin-top: 10px;
         margin-right: 240px;
       }
-      .autograph{
+
+      .autograph {
         margin-top: 10px;
-     }
+      }
 
       .title {
         text-align: center;
@@ -67,15 +69,17 @@
   </head>
   <body>
     <div id="app">
-      <div class="content"  v-for="(item,index) in tableData">
+      <div class="content" v-for="(item,index) in tableData">
         <div v-if="item.inOutFlag == '2'" class="title">{{item.companyName}}</div>
-        <div v-else  class="title">{{item.contractManagementInfo?item.contractManagementInfo.seller:item.companyName}}</div>
+        <div v-else class="title">{{item.contractManagementInfo?item.contractManagementInfo.seller:item.companyName}}
+        </div>
         <div v-if="item.inOutFlag == '2'" class="title">入库检斤单</div>
         <div v-else class="title">出库检斤单</div>
         <table class="table">
           <tr class="row">
             <td class="col col-bgc">送货单位</td>
-            <td class="col" colspan="4">{{item.contractManagementInfo?item.contractManagementInfo.seller:item.warehouseName}}</td>
+            <td class="col" colspan="4">
+              {{item.contractManagementInfo?item.contractManagementInfo.seller:item.warehouseName}}</td>
             <td class="col col-bgc">车牌号</td>
             <td class="col" colspan="1">{{item.carNo}}</td>
             <td class="col col-bgc">货名</td>
@@ -83,9 +87,10 @@
           </tr>
           <tr class="row">
             <td class="col col-bgc">收货单位</td>
-            <td class="col" colspan="4">{{item.contractManagementInfo?item.contractManagementInfo.buyer:item.receiveWarehouse}}</td>
+            <td class="col" colspan="4">
+              {{item.contractManagementInfo?item.contractManagementInfo.buyer:item.receiveWarehouse}}</td>
             <td class="col col-bgc">类型</td>
-            <td class="col"colspan="1">{{item.type}}</td>
+            <td class="col" colspan="1">{{item.type}}</td>
             <td class="col col-bgc">检斤时间</td>
             <td class="col" colspan="1">{{item.updateDate}}</td>
           </tr>
@@ -110,14 +115,13 @@
       </div>
     </div>
   </body>
-  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">
     new Vue({
       el: '#app',
       data: {
-        tableData: {
-        },
+        tableData: {},
         name: "",
       },
       computed: {},

+ 2 - 2
public/static/warehousePrint.html

@@ -238,7 +238,7 @@
 
     </div>
   </body>
-  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">
     new Vue({
@@ -301,7 +301,7 @@
         this.type = decodeURIComponent(this.getQueryVariable('type'))
         this.warehouseName = decodeURIComponent(this.getQueryVariable('warehouseName'))
         this.startDate = this.getQueryVariable('startDate')
-        this.endDate =this.getQueryVariable('endDate')
+        this.endDate = this.getQueryVariable('endDate')
         this.printData = JSON.parse(sessionStorage.getItem('inOutWarehouse_Print'))
         for (var count = 0; count < this.printData.length; count++) {
           this.maoZhong += this.printData[count].grossWeight

+ 43 - 26
public/static/weightCheck.html

@@ -65,6 +65,7 @@
 
       .autograph {
         margin-top: 10px;
+        margin-right: 170px;
       }
 
       .bottom-row3 {
@@ -144,10 +145,14 @@
             <div class="number">{{item.number}}</div>
             <table class="table">
               <tr class="row">
-                <td class="col col-bgc">客户姓名</td>
-                <td class="col" colspan="2">{{item.customer}}</td>
-                <td class="col col-bgc">客户电话</td>
-                <td class="col">{{item.customerPhone}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 3">客户姓名</td>
+                <td class="col" colspan="2" v-if="item.serviceManagementType == 3">{{item.customer}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 1">发货单位</td>
+                <td class="col" colspan="2" v-if="item.serviceManagementType == 1">{{item.contractManagement ? item.contractManagement.seller : ""}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 3">客户电话</td>
+                <td class="col" v-if="item.serviceManagementType == 3">{{item.customerPhone}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 1">联系电话</td>
+                <td class="col" v-if="item.serviceManagementType == 1">{{item.contractManagement ? item.contractManagement.sellerPhone : ""}}</td>
                 <td class="col col-bgc">车牌号</td>
                 <td class="col" colspan="2">{{item.carNumber}}</td>
               </tr>
@@ -219,6 +224,7 @@
               </div> -->
                 <div class="config">收货单位签名或盖章:</div>
                 <div class="autograph">客户签名:</div>
+                <div class="autograph">司机签名:</div>
               </div>
               <!-- <div class="bottom-row3">扫一扫</div> -->
             </div>
@@ -227,7 +233,6 @@
       </div>
       <div v-else>
         <div class="content" v-if="bigContent">
-
           <div class="title">{{tableData.compName}}</div>
           <div class="title">入库检斤单</div>
           <div class="left">
@@ -236,10 +241,14 @@
           <div class="number">{{tableData.number}}</div>
           <table class="table">
             <tr class="row">
-              <td class="col col-bgc">客户姓名</td>
-              <td class="col" colspan="2">{{tableData.customer}}</td>
-              <td class="col col-bgc">客户电话</td>
-              <td class="col">{{tableData.customerPhone}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户姓名</td>
+              <td class="col" colspan="2" v-if="tableData.serviceManagementType == 3">{{tableData.customer}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">发货单位</td>
+              <td class="col" colspan="2" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户电话</td>
+              <td class="col" v-if="tableData.serviceManagementType == 3">{{tableData.customerPhone}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">联系电话</td>
+              <td class="col" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</td>
               <td class="col col-bgc">车牌号</td>
               <td class="col" colspan="2">{{tableData.carNumber}}</td>
             </tr>
@@ -290,7 +299,6 @@
               <td class="col col-bgc">净重(公斤)</td>
               <td class="col">{{tableData.netWeight}}</td>
               <td class="col " colspan="2"></td>
-
             </tr>
             <tr class="row">
               <td class="col col-bgc" colspan="2">毛重检斤时间</td>
@@ -311,6 +319,7 @@
               </div> -->
               <div class="config">收货单位签名或盖章:</div>
               <div class="autograph">客户签名:</div>
+              <div class="autograph">司机签名:</div>
             </div>
             <!-- <div class="bottom-row3">扫一扫</div> -->
           </div>
@@ -324,17 +333,25 @@
         </div>
         <img :src="tableData.codeUrl" alt="" class="small-code">
         <div class="small-row">
-          <div>编号</div>
+          <div>业务编号</div>
           <div>{{tableData.number}}</div>
         </div>
-        <div class="small-row">
+        <div class="small-row" v-if="tableData.serviceManagementType == 3">
           <div>客户姓名</div>
           <div>{{tableData.customer}}</div>
         </div>
-        <div class="small-row">
+        <div class="small-row" v-if="tableData.serviceManagementType == 3">
           <div>客户电话</div>
           <div>{{tableData.customerPhone}}</div>
         </div>
+        <div class="small-row" v-if="tableData.serviceManagementType == 1">
+          <div>发货单位</div>
+          <div>{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</div>
+        </div>
+        <div class="small-row" v-if="tableData.serviceManagementType == 1">
+          <div>联系电话</div>
+          <div>{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</div>
+        </div>
         <div class="small-row">
           <div>车牌号</div>
           <div>{{tableData.carNumber}}</div>
@@ -359,14 +376,6 @@
           <div>类型</div>
           <div>{{tableData.type}}</div>
         </div>
-        <div class="small-row">
-          <div>皮重(公斤)</div>
-          <div>{{tableData.tare}}</div>
-        </div>
-        <div class="small-row">
-          <div>皮检时间</div>
-          <div>{{tableData.tareDate}}</div>
-        </div>
         <div class="small-row">
           <div>毛重(公斤)</div>
           <div>{{tableData.grossWeight}}</div>
@@ -375,11 +384,18 @@
           <div>毛检时间</div>
           <div>{{tableData.grossDate}}</div>
         </div>
-
-        <!-- <div class="small-row">
-          <div>扣杂(公斤)</div>
+        <div class="small-row">
+          <div>皮重(公斤)</div>
+          <div>{{tableData.tare}}</div>
+        </div>
+        <div class="small-row">
+          <div>皮检时间</div>
+          <div>{{tableData.tareDate}}</div>
+        </div>
+        <div class="small-row" v-if="tableData.qualityInspectionManagement.paramType == 2 || tableData.serviceManagementType == 1">
+          <div>扣重(公斤)</div>
           <div>{{tableData.buckleMiscellaneous}}</div>
-        </div> -->
+        </div>
         <div class="small-row">
           <div>净重(公斤)</div>
           <div>{{tableData.netWeight}}</div>
@@ -390,10 +406,11 @@
         <div class="small-row">
           <div class="sign">客户签名:</div>
         </div>
+       
       </div>
     </div>
   </body>
-  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">
     new Vue({

+ 31 - 22
public/static/weightCheckInOut.html

@@ -60,9 +60,11 @@
         margin-top: 10px;
         margin-right: 240px;
       }
-      .autograph{
-    margin-top: 10px;
-     }
+
+      .autograph {
+        margin-top: 10px;
+      }
+
       .bottom-row3 {
         margin: 10px 0;
       }
@@ -115,7 +117,8 @@
       .small-img {
         margin-right: 0;
       }
-      .sign{
+
+      .sign {
         margin-right: 100px;
       }
     </style>
@@ -123,14 +126,16 @@
   <body>
     <div id="app">
       <div class="content" v-if="true">
-        <div v-if="tableData.inOutFlag == '2'"  class="title">{{tableData.companyName}}</div>
-        <div v-else  class="title">{{tableData.contractManagementInfo?tableData.contractManagementInfo.seller:tableData.companyName}}</div>
+        <div v-if="tableData.inOutFlag == '2'" class="title">{{tableData.companyName}}</div>
+        <div v-else class="title">
+          {{tableData.contractManagementInfo?tableData.contractManagementInfo.seller:tableData.companyName}}</div>
         <div v-if="tableData.inOutFlag == '2'" class="title">入库检斤单</div>
         <div v-else class="title">出库检斤单</div>
         <table class="table">
           <tr class="row">
             <td class="col col-bgc">送货单位</td>
-            <td class="col" colspan="4">{{tableData.contractManagementInfo?tableData.contractManagementInfo.seller:tableData.warehouseName}}</td>
+            <td class="col" colspan="4">
+              {{tableData.contractManagementInfo?tableData.contractManagementInfo.seller:tableData.warehouseName}}</td>
             <td class="col col-bgc">车牌号</td>
             <td class="col" colspan="1">{{tableData.carNo}}</td>
             <td class="col col-bgc">货名</td>
@@ -138,19 +143,23 @@
           </tr>
           <tr class="row">
             <td class="col col-bgc">收货单位</td>
-            <td class="col" colspan="4">{{tableData.contractManagementInfo?tableData.contractManagementInfo.buyer:tableData.receiveWarehouse}}</td>
+            <td class="col" colspan="4">
+              {{tableData.contractManagementInfo?tableData.contractManagementInfo.buyer:tableData.receiveWarehouse}}
+            </td>
             <td class="col col-bgc">类型</td>
-            <td class="col"colspan="1">{{tableData.type}}</td>
+            <td class="col" colspan="1">{{tableData.type}}</td>
             <td class="col col-bgc">检斤时间</td>
             <td class="col" colspan="1">{{tableData.updateDate}}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc">毛重(吨)</td>
-            <td class="col" colspan="2">{{tableData.grossWeight}}</td>
+            <td class="col">{{tableData.grossWeight}}</td>
             <td class="col col-bgc">皮重(吨)</td>
-            <td class="col" colspan="2">{{tableData.tare}}</td>
-            <td class="col col-bgc">净重(吨)</td>
-            <td class="col" colspan="2">{{tableData.netWeight}}</td>
+            <td class="col">{{tableData.tare}}</td>
+            <td class="col col-bgc">扣重(吨)</td>
+            <td class="col">{{tableData.deductionWeight}}</td>
+            <td class="col col-bgc" colspan="2">净重(吨)</td>
+            <td class="col">{{tableData.netWeight}}</td>
           </tr>
         </table>
         <div class="bottom">
@@ -165,15 +174,13 @@
       </div>
     </div>
   </body>
-  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">
     new Vue({
       el: '#app',
       data: {
-        tableData: {
-          // qualityInspectionManagement:{}
-        },
+        tableData: {},
         name: "",
         bigContent: false,
         smallContent: false
@@ -206,9 +213,11 @@
         printBig() {},
       },
       mounted() {
-        console.log(this.getQueryVariable("tableData"))
-        let _data = decodeURIComponent(this.getQueryVariable("tableData"))
-        let _type = decodeURIComponent(this.getQueryVariable("type"))
+        // console.log("sssss",this.getQueryVariable("tableData"))
+        // let _data = decodeURIComponent(this.getQueryVariable("tableData"))
+        // console.log("dfddd",_data)
+        let _data = JSON.parse(localStorage.getItem('ck_bd_printData'))
+        let _type = this.getQueryVariable("type")
         if (_type == 2) {
           this.bigContent = true
           this.smallContent = false
@@ -216,8 +225,8 @@
           this.smallContent = true
           this.bigContent = false
         }
-        console.log(_data,"sddsd")
-        this.tableData = JSON.parse(_data)
+        console.log(_data, "sddsd")
+        this.tableData = _data
         console.log(this.tableData)
         document.title = "粮食检斤单"
         window.print()

+ 11 - 8
public/static/weightCheckOut.html

@@ -163,9 +163,11 @@
             <td class="col col-bgc" v-if='tableData.outType=="火运"'>车厢号</td>
             <td class="col col-bgc" v-if='tableData.outType=="散船"'>船次</td>
             <td class="col" colspan="2" v-if='tableData.outType=="集装箱船"||tableData.outType=="汽运"'>
-              {{tableData.boxNo}},{{tableData.boxNoOther}}</td>
+              {{tableData.boxNo}},{{tableData.boxNoOther}}
+            </td>
             <td class="col" colspan="2" v-if='tableData.outType=="火运"'>
-              {{tableData.wingNumber}},{{tableData.wingNumberOther}}</td>
+              {{tableData.wingNumber}},{{tableData.wingNumberOther}}
+            </td>
             <td class="col" colspan="2" v-if='tableData.outType=="散船"'>{{tableData.shipNumber}}</td>
           </tr>
         </table>
@@ -178,7 +180,7 @@
       </div>
     </div>
   </body>
-  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="../cdn/vue/2.6.10/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">
     new Vue({
@@ -219,9 +221,10 @@
         printBig() {},
       },
       mounted() {
-        console.log(decodeURIComponent(this.getQueryVariable("tableData")))
-        let _data = decodeURIComponent(this.getQueryVariable("tableData"))
-        let _type = decodeURIComponent(this.getQueryVariable("type"))
+        // console.log(decodeURIComponent(this.getQueryVariable("tableData")))
+        // let _data = decodeURIComponent(this.getQueryVariable("tableData"))
+        let _data = JSON.parse(localStorage.getItem('ck_bd_printData1'))
+        let _type = this.getQueryVariable("type")
         if (_type == 2) {
           this.bigContent = true
           this.smallContent = false
@@ -230,10 +233,10 @@
           this.bigContent = false
         }
         console.log(_data, "sddsd")
-        this.tableData = JSON.parse(_data)
+        this.tableData = _data
         console.log(this.tableData)
         document.title = "粮食检斤单"
-        //window.print()
+        window.print()
         window.onafterprint = function(event) {
           window.history.back(-1)
         };

+ 487 - 0
public/static/weightChecknew.html

@@ -0,0 +1,487 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <title></title>
+    <style>
+      table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+        height: 43px;
+      }
+
+      #app {
+        /* height: 98vh;
+        position: relative; */
+      }
+
+      .content {
+        width: 1000px;
+        padding: 30px 20px 20px 20px;
+        font-size: 18px;
+        height: 660px;
+      }
+
+      .a5-content {
+        height: 130vh;
+      }
+
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+      .bottom-row1 {
+        display: flex;
+        /* justify-content: space-between; */
+        margin-top: 5px 0;
+      }
+
+      .bottom-row2 {
+        display: flex;
+      }
+
+      img,.left{
+        width: 120px;
+        height: 120px;
+        position: absolute;
+        right: 20px;
+        top: 12px;
+      }
+
+      .config {
+        margin-top: 10px;
+        margin-right: 240px;
+      }
+
+      .autograph {
+        margin-top: 10px;
+        margin-right: 180px;
+      }
+
+      .bottom-row3 {
+        margin: 10px 0;
+      }
+
+      .title {
+        text-align: center;
+        font-size: 36px;
+        font-weight: 500;
+        position: relative;
+      }
+
+      .number {
+        text-align: right;
+        margin-bottom: 10px;
+        margin-top: 30px;
+      }
+
+      .small-row {
+        display: flex;
+      }
+
+      .small-content {
+        width: 300px;
+        /* margin: 0 auto;
+        border: 1px solid #ccc;
+        padding: 20px 20px 160px 20px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+        margin: auto; */
+      }
+
+      .small-title {
+        text-align: center;
+        font-size: 18px;
+        /* display: flex; */
+        justify-content: space-between;
+        align-items: center;
+      }
+       .numberNo{
+          font-size: 36px;
+          margin: auto;
+        }
+      .small-row {
+        display: flex;
+        justify-content: space-between;
+        margin: 10px;
+      }
+
+      .small-img {
+        margin-right: 0;
+      }
+
+      .sign {
+        margin-right: 100px;
+      }
+      .small-code{
+        position: relative;
+        left:calc(50% - 55px)
+      }
+    </style>
+  </head>
+  <body>
+    <div id="app">
+      <div v-if="selectPrint">
+        <div v-for="(item,index) in tableData1" :key="index">
+          <div class="content" :class="pageType=='A5'?'a5-content':''">
+            <div class="title">{{item.compName}}</div>
+            <div class="title">入库检斤单</div>
+            <div class="left">
+              <img :src="item.codeUrl" alt="">
+            </div>
+            <div class="number">{{item.number}}</div>
+            <table class="table">
+              <tr class="row">
+                <td class="col col-bgc" v-if="item.serviceManagementType == 3">客户姓名</td>
+                <td class="col" colspan="2" v-if="item.serviceManagementType == 3">{{item.customer}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 1">发货单位</td>
+                <td class="col" colspan="2" v-if="item.serviceManagementType == 1">{{item.contractManagement ? item.contractManagement.seller : ""}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 3">客户电话</td>
+                <td class="col" v-if="item.serviceManagementType == 3">{{item.customerPhone}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 1">联系电话</td>
+                <td class="col" v-if="item.serviceManagementType == 1">{{item.contractManagement ? item.contractManagement.sellerPhone : ""}}</td>
+                <td class="col col-bgc">车牌号</td>
+                <td class="col" colspan="2">{{item.carNumber}}</td>
+              </tr>
+              <tr class="row">
+                <td class="col col-bgc">收货单位</td>
+                <td class="col" colspan="2">{{item.compName}}</td>
+                <td class="col col-bgc">联系人</td>
+                <td class="col">{{item.person}}</td>
+                <td class="col col-bgc">联系电话</td>
+                <td class="col" colspan="2">{{item.personPhone}}</td>
+              </tr>
+              <tr class="row">
+                <td class="col col-bgc">货名</td>
+                <td class="col">{{item.goodsName}}</td>
+                <td class="col col-bgc">类型</td>
+                <td class="col">{{item.type}}</td>
+                <td class="col col-bgc">容量(克/升)</td>
+                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.bulkDensity:''}}</td>
+                <td class="col col-bgc">不完善粒(%)</td>
+                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.imperfectGrain:''}}</td>
+              </tr>
+              <tr class="row">
+                <td class="col col-bgc">等级</td>
+                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.grade:''}}</td>
+                <td class="col col-bgc">水分(%)</td>
+                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.waterContent:''}}</td>
+                <td class="col col-bgc">热损伤(%)</td>
+                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.jiaorenli:''}}</td>
+                <td class="col col-bgc">质检时间</td>
+                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.qualityDate:''}}</td>
+              </tr>
+              <tr class="row">
+                <td class="col col-bgc">杂质(%)</td>
+                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.impurity:''}}</td>
+                <td class="col col-bgc">霉变粒(%)</td>
+                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.mildewGrain:''}}</td>
+                <td class="col col-bgc">扣杂</td>
+                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
+                <td class="col " colspan="2"></td>
+              </tr>
+              <tr class="row">
+                <td class="col col-bgc">毛重(公斤)</td>
+                <td class="col">{{item.grossWeight}}</td>
+                <td class="col col-bgc">皮重(公斤)</td>
+                <td class="col">{{item.tare}}</td>
+                <td class="col col-bgc">扣重(公斤)</td>
+                <td class="col">{{item.buckleMiscellaneous}}</td>
+                <td class="col col-bgc">净重(公斤)</td>
+                <td class="col">{{item.netWeight}}</td>
+                <!-- <td class="col " colspan="2"></td> -->
+
+              </tr>
+              <tr class="row">
+                <td class="col col-bgc" colspan="2">毛重检斤时间</td>
+                <td class="col" colspan="2">{{item.grossDate}}</td>
+                <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
+                <td class="col" colspan="2">{{item.tareDate}}</td>
+              </tr>
+            </table>
+            <div class="bottom">
+              <div class="bottom-row1">
+                <div>毛检:{{item.secretaryWeigher}}</div>
+                <div style="margin-left:60px">皮检:{{item.skinInspector}}</div>
+                <!-- <div>{{tableData.qualityDate}}</div> -->
+              </div>
+              <div class="bottom-row2">
+                <!-- <div class="left">
+                <img :src="item.codeUrl" alt="">
+              </div> -->
+                <div class="config">收货单位签名或盖章:</div>
+                <div class="autograph">客户签名:</div>
+                <div class="autograph">司机签名:</div>
+              </div>
+              <!-- <div class="bottom-row3">扫一扫</div> -->
+            </div>
+          </div>
+        </div>
+      </div>
+      <div v-else>
+        <div class="content" v-if="bigContent">
+          <div class="title">{{tableData.compName}}</div>
+          <div class="title">入库检斤单</div>
+          <div class="left">
+            <img :src="tableData.codeUrl" alt="">
+          </div>
+          <div class="number">{{tableData.number}}</div>
+          <table class="table">
+            <tr class="row">
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户姓名</td>
+              <td class="col" colspan="2" v-if="tableData.serviceManagementType == 3">{{tableData.customer}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">发货单位</td>
+              <td class="col" colspan="2" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户电话</td>
+              <td class="col" v-if="tableData.serviceManagementType == 3">{{tableData.customerPhone}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">联系电话</td>
+              <td class="col" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</td>
+              <td class="col col-bgc">车牌号</td>
+              <td class="col" colspan="2">{{tableData.carNumber}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">收货单位</td>
+              <td class="col" colspan="2">{{tableData.compName}}</td>
+              <td class="col col-bgc">联系人</td>
+              <td class="col">{{tableData.person}}</td>
+              <td class="col col-bgc">联系电话</td>
+              <td class="col" colspan="2">{{tableData.personPhone}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">货名</td>
+              <td class="col">{{tableData.goodsName}}</td>
+              <td class="col col-bgc">类型</td>
+              <td class="col">{{tableData.type}}</td>
+              <td class="col col-bgc">容量(克/升)</td>
+              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}</td>
+              <td class="col col-bgc">不完善粒(%)</td>
+              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.imperfectGrain:''}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">等级</td>
+              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.grade:''}}</td>
+              <td class="col col-bgc">水分(%)</td>
+              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.waterContent:''}}</td>
+              <td class="col col-bgc">热损伤(%)</td>
+              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.jiaorenli:''}}</td>
+              <td class="col col-bgc">质检时间</td>
+              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.qualityDate:''}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">杂质(%)</td>
+              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.impurity:''}}</td>
+              <td class="col col-bgc">霉变粒(%)</td>
+              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.mildewGrain:''}}</td>
+              <td class="col col-bgc">扣杂</td>
+              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
+              <td class="col " colspan="2"></td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">毛重(公斤)</td>
+              <td class="col">{{tableData.grossWeight}}</td>
+              <td class="col col-bgc">皮重(公斤)</td>
+              <td class="col">{{tableData.tare}}</td>
+              <td class="col col-bgc">扣重(公斤)</td>
+              <td class="col">{{tableData.buckleMiscellaneous}}</td>
+              <td class="col col-bgc">净重(公斤)</td>
+              <td class="col">{{tableData.netWeight}}</td>
+              <td class="col " colspan="2"></td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc" colspan="2">毛重检斤时间</td>
+              <td class="col" colspan="2">{{tableData.grossDate}}</td>
+              <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
+              <td class="col" colspan="2">{{tableData.tareDate}}</td>
+            </tr>
+          </table>
+          <div class="bottom">
+            <div class="bottom-row1">
+              <div>毛检:{{tableData.secretaryWeigher}}</div>
+              <div style="margin-left:60px">皮检:{{tableData.skinInspector}}</div>
+              <!-- <div>{{tableData.qualityDate}}</div> -->
+            </div>
+            <div class="bottom-row2">
+              <!-- <div class="left">
+                <img :src="tableData.codeUrl" alt="">
+              </div> -->
+              <div class="config">收货单位签名或盖章:</div>
+              <div class="autograph">客户签名:</div>
+              <div class="autograph">司机签名:</div>
+            </div>
+            <!-- <div class="bottom-row3">扫一扫</div> -->
+          </div>
+        </div>
+      </div>
+
+      <div class="small-content" v-if="smallContent">
+        <div class="small-title">
+          <div  class="numberNo">{{tableData.number.substring(tableData.number.length - 3)}}</div>
+          <div style="margin: auto;">粮食检斤单</div>
+        </div>
+        <img :src="tableData.codeUrl" alt="" class="small-code">
+        <div class="small-row">
+          <div>业务编号</div>
+          <div>{{tableData.number}}</div>
+        </div>
+        <div class="small-row" v-if="tableData.serviceManagementType == 3">
+          <div>客户姓名</div>
+          <div>{{tableData.customer}}</div>
+        </div>
+        <div class="small-row" v-if="tableData.serviceManagementType == 3">
+          <div>客户电话</div>
+          <div>{{tableData.customerPhone}}</div>
+        </div>
+        <div class="small-row" v-if="tableData.serviceManagementType == 1">
+          <div>发货单位</div>
+          <div>{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</div>
+        </div>
+        <div class="small-row" v-if="tableData.serviceManagementType == 1">
+          <div>联系电话</div>
+          <div>{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</div>
+        </div>
+        <div class="small-row">
+          <div>车牌号</div>
+          <div>{{tableData.carNumber}}</div>
+        </div>
+        <div class="small-row">
+          <div>收货单位</div>
+          <div>{{tableData.compName}}</div>
+        </div>
+        <div class="small-row">
+          <div>联系人</div>
+          <div>{{tableData.person}}</div>
+        </div>
+        <div class="small-row">
+          <div>联系电话</div>
+          <div>{{tableData.personPhone}}</div>
+        </div>
+        <div class="small-row">
+          <div>货名</div>
+          <div>{{tableData.goodsName}}</div>
+        </div>
+        <div class="small-row">
+          <div>类型</div>
+          <div>{{tableData.type}}</div>
+        </div>
+        <div class="small-row">
+          <div>毛重(公斤)</div>
+          <div>{{tableData.grossWeight}}</div>
+        </div>
+        <div class="small-row">
+          <div>毛检时间</div>
+          <div>{{tableData.grossDate}}</div>
+        </div>
+        <div class="small-row">
+          <div>皮重(公斤)</div>
+          <div>{{tableData.tare}}</div>
+        </div>
+        <div class="small-row">
+          <div>皮检时间</div>
+          <div>{{tableData.tareDate}}</div>
+        </div>
+        <div class="small-row" v-if="tableData.qualityInspectionManagement.paramType == 2 || tableData.serviceManagementType == 1">
+          <div>扣重(公斤)</div>
+          <div>{{tableData.buckleMiscellaneous}}</div>
+        </div>
+        <div class="small-row">
+          <div>净重(公斤)</div>
+          <div>{{tableData.netWeight}}</div>
+        </div>
+        <div class="small-row">
+          <div>收货单位签名或盖章:</div>
+        </div>
+        <div class="small-row">
+          <div class="sign">客户签名:</div>
+        </div>
+      </div>
+    </div>
+  </body>
+  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+  <script type="text/javascript">
+    new Vue({
+      el: '#app',
+      data: {
+        tableData: {
+          // qualityInspectionManagement:{}
+        },
+        tableData1: [],
+        selectPrint: false,
+        name: "",
+        bigContent: false,
+        smallContent: false,
+        pageType: ''
+      },
+      computed: {},
+      methods: {
+        tableRowClassName({
+          row,
+          rowIndex
+        }) {
+          if (rowIndex === 1) {
+            return 'warning-row';
+          } else if (rowIndex === 3) {
+            return 'success-row';
+          }
+          return '';
+        },
+        getQueryVariable(variable) {
+          var query = window.location.search.substring(1);
+          var vars = query.split("&");
+          for (var i = 0; i < vars.length; i++) {
+            var pair = vars[i].split("=");
+            if (pair[0] == variable) {
+              return pair[1];
+            }
+          }
+          return (false);
+        },
+        printSmall() {},
+        printBig() {},
+      },
+      mounted() {
+        let _data = localStorage.getItem('inspect')
+        // let _data = this.getQueryVariable("dataList")
+        let _type = decodeURIComponent(this.getQueryVariable("type"))
+        this.pageType = decodeURIComponent(this.getQueryVariable("radioType"))
+        if (_type == 2) {
+          this.bigContent = true
+          this.smallContent = false
+        } else {
+          this.smallContent = true
+          this.bigContent = false
+        }
+        if (_data == 'false') {
+          this.selectPrint = true;
+          this.tableData1 = JSON.parse(localStorage.getItem('selectPrint_jjSelectPrintList'))
+        } else {
+          this.tableData = JSON.parse(_data)
+          console.log(this.tableData)
+        }
+        // sessionStorage.setItem('record_print', JSON.stringify(response))
+        // this.tableData = JSON.parse(sessionStorage.getItem("record_print"))
+
+        document.title = "粮食检斤单"
+        window.print()
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        };
+      },
+      watch: {}
+    })
+  </script>
+
+</html>

File diff ditekan karena terlalu besar
+ 1 - 0
sockjs.min.js


+ 4 - 0
src/api/V2/houseSelfCollect/index.js

@@ -62,6 +62,8 @@ export const API_GET_PAYMENT = '/paymentManagement/getInfo'
 export const API_POST_PAYMENT_EDIT = '/paymentManagement/api/editInfo'
 //质检客户下拉校验
 export const API_GET_INSPECT_GETAMOUNT = '/paymentManagement/cumulant'
+//质检运输方式
+export const API_GET_INSPECT_CONTRACTNO = '/inOutWarehouseTask/getContractNo'
 //识别身份证
 export const API_GET_CUSTOMER_GETIDENTITY = '/driverViewInfo/personShibie'
 //识别银行卡
@@ -97,3 +99,5 @@ export const API_GAT_GETQRCODE = '/weighingManagement/getQRcode'
 export const API_GAT_INFO = '/commonSysParameter/getInfo'
 // 审核之后接口
 export const API_POST_WORKFLOW_TASK = `/newWorkflow/getTaskWebsocket`
+// 结算单
+export const API_GET_SETTLEACCOUT = '/warehouseInOutInfo/getInfo'

+ 2 - 2
src/api/V2/notice/index.js

@@ -4,10 +4,10 @@ const baseUrl = process.env.VUE_APP_API_NOTICE
 export const API_GET_NOTICETASK_BUSINESSTYPEAMOUNT = `${baseUrl}/noticeTask/query/businessTypeAmount`
 
 // 任务列表数据查询
-export const API_GET_NOTICETASKS = `${baseUrl}/noticeTask/query/noticeTasks`
+export const API_GET_NOTICETASKS = `${baseUrl}/newNoticeTask/query/noticeTasks`
 
 // 查询 - 提醒 - 可处理模块及数量
-export const API_GET_NOTICEREMIND_BUSINESSTYPEAMOUNT = `${baseUrl}/noticeTask/query/noticeTasks`
+export const API_GET_NOTICEREMIND_BUSINESSTYPEAMOUNT = `${baseUrl}/newNoticeTask/query/noticeTasks`
 
 // 提醒 列表数据查询
 export const API_GET_NOTICEREMIND_NOTICEREMINDS = `${baseUrl}/noticeRemind/query/noticeReminds`

+ 1 - 2
src/api/V2/statisticalReport/index.js

@@ -81,8 +81,7 @@ export const API_POST_ADDDISORREMARKS = '/stockPurchaseReceiptReport/api/disAndR
 export const API_POST_EDITSETTLEMENTWEIGHT = '/stockPurchaseReceiptReport/api/edit'
 //现货采购入库合同
 export const API_GET_STOCK_PURCHASE_CONTRACTNO = '/stockPurchaseReceiptReport/selectContractNoList'
-//现货采购入库导出
-export const API_GET_STOCK_PURCHASE_EXPORT ='/stockPurchaseReceiptReport/export'
+
 
 //现货销售出库报表
 export const API_GET_STOCKSALECEIPT = '/stockSaleReceiptReport/selectSaleOrder'

+ 3 - 1
src/api/V2/transport/index.js

@@ -53,8 +53,10 @@ export const API_GET_TRANPROCESSINFO = '/tranProcessInfo/getThreeTranProcess'
 export const API_POST_TRANPROCESSINFO = '/tranProcessInfo/api/addTranCar'
 //状态
 export const API_POST_AUTOMOBILE_ALSOSTATE = '/tranProcessInfo/editStatus'
-//运输价格
+//运输价格
 export const API_POST_AUTOMOBILE_TRANPRICE = '/tranProcessInfo/api/setUpTranPrice'
+//运输价格车
+export const API_POST_AUTOMOBILE_TRANPRICE_CAR  = '/tranProcessInfo/api/setUpTranPriceCar'
 // 删除运输车辆
 export const API_POST_DEL_HAULAGE_STAGE= '/tranCarInfo/api/deleteTranCar'
 // 导入

+ 2 - 1
src/components/balanceAlert.vue

@@ -135,7 +135,8 @@ export default {
               this.deptBudgetList.warehouseName == '哈尔滨依兰库' ||
               this.deptBudgetList.warehouseName == '龙江金信库' ||
               this.deptBudgetList.warehouseName == '白城内陆港'||
-              this.deptBudgetList.warehouseName == '肇东金信库')
+              this.deptBudgetList.warehouseName == '肇东金信库'||
+              this.deptBudgetList.warehouseName == '呼兰大金仓')
           ) {
             for (var i = 0; i < value.length; i++) {
               var tmp = String.fromCharCode(value[i])

+ 27 - 28
src/lang/zh.js

@@ -481,30 +481,19 @@ export default {
     protectionInventory: '劳保库存',
     // 合同管理
     contractManagement: '合同管理',
-    purchaseContract: '采购合同',
-    salesContract: '销售合同',
-    salesContractEdit: '销售合同编辑',
-    salesContractExamine: '销售合同查看',
-    purchaseContractExamine: '采购合同查看',
-    salesContractAdd: '销售合同添加',
-    purchaseContractAdd: '采购合同添加',
-    purchaseContractEdit: '采购合同编辑',
-    // 平台审核
-    platformAudit:'平台审核',
-    driveraudit:'司机审核',
     purchaseContract: '现货采购合同',
     collectionContract: '代收合同',
+    storageContract:'代储合同',
     purchaseContractAdd: '现货采购合同  /  添加',
     collectionContractAdd: '代收合同  /  添加',
+    storageContractAdd:'代储合同  /  添加',
     purchaseContractEdit: '现货采购合同  /  编辑',
     collectionContractEdit: '代收合同  /  编辑',
     collectionContractExamine:'代收合同  /  查看',
     collectionContractRecord:'代收合同  /  记录',
-    storageContract: '代储合同',
-    storageContractAdd: '代储合同  /  添加',
     storageContractEdit: '代储合同  /  编辑',
-    storageContractExamine: '代储合同  /  查看',
-    storageContractRecord:'代储合同  /  代储费',
+    storageContractExamine:'代储合同  /  查看',
+    storageContractRecord:'代储合同  /  记录',
     purchaseContractExamine: '现货采购合同  /  查看',
     salesContract: '现货销售合同',
     salesContractEdit: '现货销售合同  /  编辑',
@@ -545,8 +534,6 @@ export default {
     warehouseManagementPerfectput: '编辑',
     warehouseManagementPutOut: '任务',
     warehouseManagementPutOutLook: '查看',
-    // 新仓库管理
-    newwarehouseManagementList: '新仓库管理',
     transformation: '折转',
     //客户管理
     customerList: '客户管理',
@@ -1045,12 +1032,16 @@ export default {
     dynamicReportsDetail: '动态报详情',
 
     // 库内自采
-    houseSelfCollect: '收购业务管理',
+    houseSelfCollect: '入库管理',
+    deliverywarehouse:'出库管理',
     customerManagement: '客户管理',
     acquisitionManagement: '仓库设置',
     inspectionManagement: '质检管理',
+    inspectionManagementrecord:'质检管理记录',
     paymentManagement: '付款管理',
     weighingManagement: '检斤管理',
+    newWeighingManagement: '检斤管理',
+    weightCheckRecord: '检斤记录',
     houseSelfCollectPrint: '查看',
     acquisitionManagementAdd: '收购管理',
     acquisitionManagementEdit: '收购管理编辑',
@@ -1064,7 +1055,10 @@ export default {
     outboundManagement: '出库管理',
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    newQualityInspectionManagement: '质检管理',
+    outInspectRecord:"质检记录",
     qualityInspection: '质检信息',
+    weighingManagementrecord:'检斤记录',
     collectionManagement: '收款管理',
     collectionment: '查看收款管理',
     weighing: '检斤信息',
@@ -4834,24 +4828,22 @@ export default {
     collectionContractEdit: '代收合同编辑',
     collectionContractExamine: '代收合同查看',
     collectionContractRecord:'代收合同记录',
-    storageContract: '代储合同',
-    storageContractAdd: '代储合同添加',
+    storageContract:'代储合同',
+    storageContractAdd:'代储合同添加',
     storageContractEdit: '代储合同编辑',
-    storageContractExamine: '代储合同查看',
-    storageContractRecord:'代储合同记录'
+    storageContractExamine:'代储合同查看',
+    storageContractRecord:'代储合同记录',
 
   },
   purchase: {
     purchaseContract: '采购合同',
-    driveraudit:'司机审核'
   },
   //仓库管理
   warehouseManagement: {
     warehouseManagementList: '仓库管理',
-    // newwarehouseManagementList: '新仓库管理',
-    warehouselocation:'成本管理  /  库点费用',
-    weightedsubsidiary:'加权明细',
-    costmanagement:'成本管理',
+    warehouselocation: '成本管理  /  库点费用',
+    weightedsubsidiary: '加权明细',
+    costmanagement: '成本管理',
     warehouseManagementAdd: '仓库管理添加',
     warehouseManagementEdit: '仓库管理编辑',
     warehouseManagementPut: '入库',
@@ -7475,9 +7467,13 @@ export default {
     acquisitionManagement: '仓库设置',
     acquisitionManagementEdit: '收购管理编辑',
     inspectionManagement: '质检管理',
+    inspectionManagementrecord:'质检管理记录',
     paymentManagement: '付款管理',
     weighingManagement: '检斤管理',
-    houseSelfCollect: '收购业务管理',
+    weighingManagement: '检斤管理',
+    newWeighingManagement: '检斤管理',
+    houseSelfCollect: '入库管理',
+    deliverywarehouse:'出库管理',
     houseSelfCollectPrint: '查看',
     customerManagementEdit: '客户管理编辑',
     customerManagementAdd: '客户管理添加',
@@ -7489,7 +7485,10 @@ export default {
   outboundManagement: {
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    newQualityInspectionManagement: '质检管理',
+    outInspectRecord:"质检记录",
     qualityInspection: '质检信息',
+    weighingManagementrecord:'检斤记录',
     collectionManagement: '收款管理',
   }
 

+ 29 - 92
src/layout/index/top/index.vue

@@ -43,8 +43,9 @@
               <el-button v-hasPermission="`acquisitionManagement.acquisitionPay.add`" v-if="btnStatus.status5"
                 @click="goToPage(5)" class="btn_css">去结算</el-button>
               <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`" 
-                v-if="btnStatus.status2||btnStatus.status3||btnStatus.status4||btnStatus.status5" @click="goToPage(6)" v-show="toPageData.qualityInspectionManagement.confirm != '1'" class="btn_css">去称皮重
+                v-if="btnStatus.status2||btnStatus.status3||btnStatus.status4||btnStatus.status5" @click="goToPage(6)" class="btn_css">去称皮重
               </el-button>
+              <!-- v-show="toPageData.qualityInspectionManagement.confirm != '1'"  -->
               <el-button @click="cancel" class="btn" >关闭</el-button>
           </div>
         </el-dialog>
@@ -616,81 +617,39 @@
         this.isOpenCodeGun = false
       },
       goToPage(type) {
+        var _saomadata = {}
+        _saomadata.cangid = this.cangid
+        _saomadata.id = this.toPageData.qualityInspectionManagement.id
+        _saomadata.warehouseName = this.toPageData.qualityInspectionManagement.warehouseName
+       _saomadata.managementType = this.toPageData.qualityInspectionManagement.managementType//贸易入库1 收购入库3
          this.barCode = ''
         let _url = ''
         if (type === 1) {
-// this.toPageData 
+           _saomadata.type = 1
+           localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
           this.$router.push({
-          	name: 'inspectInfo',
-          	query: {
-          		type: 3,
-          		cangid: this.cangid,
-          		id: this.toPageData.qualityInspectionManagement.id,
-          		warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-          		count: 0,
-          		warehouseNo: 0,
-          		allowEdit:this.toPageData.warehouseBaseInfo.allowEdit,
-          		status:this.toPageData.status
-          	},
+          	name: 'inspectionManagementNew'
           })
         } else if (type === 2) {
-               this.$router.push({
-          	name: 'inspectInfo',
-          	query: {
-          		type: 5,
-          		cangid: this.cangid,
-          		id: this.toPageData.qualityInspectionManagement.id,
-          		warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-          		count: 0,
-          		warehouseNo: 0,
-          		allowEdit:this.toPageData.warehouseBaseInfo.allowEdit,
-          		status:this.toPageData.status
-          	},
+           _saomadata.type = 2
+           localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
+            this.$router.push({
+          	name: 'inspectionManagementNew'
           })
         } else if (type === 3) {
+           _saomadata.type = 3
+           localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
             this.$router.push({
-          	name: 'inspectInfo',
-          	query: {
-          		type: 4,
-          		cangid: this.cangid,
-          		id: this.toPageData.qualityInspectionManagement.id,
-          		warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-          		count: 0,
-          		warehouseNo: 0,
-          		allowEdit:this.toPageData.warehouseBaseInfo.allowEdit,
-          		status:this.toPageData.status
-          	},
+          	name: 'inspectionManagementNew'
           })
         } else if (type === 4) {
+           _saomadata.typeNo = 1
+           _saomadata.monitorUrl1 = this.toPageData.warehouseBaseInfo.monitorUrl1
+           _saomadata.monitorUrl2 = this.toPageData.warehouseBaseInfo.monitorUrl2
+           _saomadata.allowEdit = this.toPageData.warehouseBaseInfo.allowEdit
+            localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
              this.$router.push({
-            name: 'weightCheck',
-            query: {
-              tpyeNo: 1,
-              id: this.toPageData.id,
-              number: this.toPageData.number,
-              binNumber: this.toPageData.binNumber,
-              customer: this.toPageData.customer,
-              storageNumber: this.toPageData.storageNumber,
-              carNumber: this.toPageData.carNumber,
-              boxNo: this.toPageData.qualityInspectionManagement.boxNo,
-              boxNoOther: this.toPageData.qualityInspectionManagement.boxNoOther,
-              titleNo: this.toPageData.qualityInspectionManagement.titleNo,
-              titleNoOther: this.toPageData.qualityInspectionManagement.titleNoOther,
-              goodsName: this.toPageData.goodsName,
-              grossWeight: this.toPageData.grossWeight,
-              tare: this.toPageData.tare,
-              netWeight: this.toPageData.netWeight,
-              relationId: this.toPageData.relationId,
-              warehouseId: this.cangid,
-              monitorUrl1: this.toPageData.warehouseBaseInfo.monitorUrl1,
-              monitorUrl2: this.toPageData.warehouseBaseInfo.monitorUrl2,
-              allowEdit: this.toPageData.warehouseBaseInfo.allowEdit,
-              cangid: this.cangid,
-              warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-              paramType: this.toPageData.qualityInspectionManagement.paramType,
-              customerNumberCard: this.toPageData.customerNumberCard,
-              automaticWeightAcquisition: this.toPageData.automaticWeightAcquisition
-            },
+            name: 'newWeighingManagement'
           })
         } else if (type === 5) {
              localStorage.setItem('paymentManagementReturn', false)
@@ -702,35 +661,13 @@
             },
           })
         } else if (type === 6) {
+            _saomadata.typeNo = 2
+           _saomadata.monitorUrl1 = this.toPageData.warehouseBaseInfo.monitorUrl1
+           _saomadata.monitorUrl2 = this.toPageData.warehouseBaseInfo.monitorUrl2
+           _saomadata.allowEdit = this.toPageData.warehouseBaseInfo.allowEdit
+            localStorage.setItem("saoma_data",JSON.stringify(_saomadata))
            this.$router.push({
-            name: 'weightCheck',
-            query: {
-              tpyeNo: 2,
-              id: this.toPageData.id,
-              number: this.toPageData.number,
-              binNumber: this.toPageData.binNumber,
-              customer: this.toPageData.customer,
-              storageNumber: this.toPageData.storageNumber,
-              carNumber: this.toPageData.carNumber,
-              boxNo: this.toPageData.qualityInspectionManagement.boxNo,
-              boxNoOther: this.toPageData.qualityInspectionManagement.boxNoOther,
-              titleNo: this.toPageData.qualityInspectionManagement.titleNo,
-              titleNoOther: this.toPageData.qualityInspectionManagement.titleNoOther,
-              goodsName: this.toPageData.goodsName,
-              grossWeight: this.toPageData.grossWeight,
-              tare: this.toPageData.tare,
-              netWeight: this.toPageData.netWeight,
-              relationId: this.toPageData.relationId,
-              warehouseId: this.cangid,
-              monitorUrl1: this.toPageData.warehouseBaseInfo.monitorUrl1,
-              monitorUrl2: this.toPageData.warehouseBaseInfo.monitorUrl2,
-              allowEdit: this.toPageData.warehouseBaseInfo.allowEdit,
-              cangid: this.cangid,
-              warehouseName: this.toPageData.qualityInspectionManagement.warehouseName,
-              paramType: this.toPageData.qualityInspectionManagement.paramType,
-              customerNumberCard: this.toPageData.customerNumberCard,
-              automaticWeightAcquisition: this.toPageData.automaticWeightAcquisition
-            },
+            name: 'newWeighingManagement',
           })
         }
         this.smAlert = false

+ 8 - 1
src/model/houseSelfCollect/index.js

@@ -50,7 +50,9 @@ import {
   API_GAT_QRCODE,
   API_GAT_GETQRCODE,
   API_GAT_INFO,
-  API_POST_WORKFLOW_TASK
+  API_POST_WORKFLOW_TASK,
+  API_GET_INSPECT_CONTRACTNO,
+  API_GET_SETTLEACCOUT
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -116,6 +118,8 @@ export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorH
 export const postpaymentedit = appRx.post(API_POST_PAYMENT_EDIT, errorCatcher, errorHandle, filter)
 //质检客户下拉校验
 export const getamount = appRx.get(API_GET_INSPECT_GETAMOUNT, errorCatcher, errorHandle, filter)
+//质检运输方式
+export const getinspectcontractno = appRx.get(API_GET_INSPECT_CONTRACTNO, errorCatcher, errorHandle, filter)
 //身份证识别
 export const getIdentity = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)
 //银行卡识别
@@ -152,3 +156,6 @@ export const getQRCodeData  = appRx.get(API_GAT_GETQRCODE, errorCatcher, errorHa
 export const getcartype  = appRx.get(API_GAT_INFO, errorCatcher, errorHandle, filter)
 // 审核之后
 export const workflowcontent = appRx.get(API_POST_WORKFLOW_TASK, errorCatcher, errorHandle, filter)
+
+// 查看结算单
+export const getsettleaccout = appRx.get(API_GET_SETTLEACCOUT, errorCatcher, errorHandle, filter)

+ 2 - 3
src/model/statisticalReport/index.js

@@ -48,8 +48,7 @@ import {
     API_GET_YUNSHUNUMBER,
     API_POST_YUNSHUSETPRICE,
     API_POST_EDIT_SETTLEMENTWEIGHT,
-    API_POST_INVOICELIST,
-    API_GET_STOCK_PURCHASE_EXPORT
+    API_POST_INVOICELIST
 } from '@/api/V2/statisticalReport'
 //期货采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -95,7 +94,7 @@ export const postopeninvoice = appRx.post(API_POST_OPENINVOICE, errorCatcher, er
 export const postbatchopeninvoice = appRx.post(API_POST_BATCHOPENINVOICE, errorCatcher, errorHandle, filter)
 
 
-export const export1 = appRx.post(API_GET_STOCK_PURCHASE_EXPORT)
+
 //期货销售出库报表
 export const salelist = appRx.get(API_GET_SALELIST, errorCatcher, errorHandle, filter)
 //期货销售出库出纳收款

+ 5 - 2
src/model/transport/index.js

@@ -32,7 +32,8 @@ import {
     API_POST_AUTOMOBILE_STATEREC,
     API_GET_IMPORT,
     API_GET_TRANPROCESSINFO,
-    API_POST_TRANPROCESSINFO
+    API_POST_TRANPROCESSINFO,
+    API_POST_AUTOMOBILE_TRANPRICE_CAR
 } from '@/api/V2/transport'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
@@ -88,8 +89,10 @@ export const gettranprocessinfo = appRx.get(API_GET_TRANPROCESSINFO, errorCatche
 export const posttranprocessinfo = appRx.post(API_POST_TRANPROCESSINFO, errorCatcher, errorHandle, filter)
 //状态
 export const alsostate = appRx.post(API_POST_AUTOMOBILE_ALSOSTATE, errorCatcher, errorHandle, filter)
-//设置运输价格
+//设置运输价格
 export const setUpTranPrice = appRx.post(API_POST_AUTOMOBILE_TRANPRICE, errorCatcher, errorHandle, filter)
+//设置运输价格车
+export const setUpTranPriceCar = appRx.post(API_POST_AUTOMOBILE_TRANPRICE_CAR, errorCatcher, errorHandle, filter)
 //删除车辆
 export const delhaulagestage = appRx.post(API_POST_DEL_HAULAGE_STAGE, errorCatcher, errorHandle, filter)
 // 导入

+ 11 - 9
src/views/contractManagement/collectionContractRecord.vue

@@ -690,6 +690,7 @@
       rowEdit(row) {
         this.viewLock = false
         this.getCustomerNumberCard(row)
+        this.getList()
       },
       imgshow() {
         this.deleteshow = false
@@ -826,14 +827,14 @@
         if (this.modification.length == 0) {
           this.$message.warning('请选择一条要开票的条目')
         } else {
-          for (let i = 0; i < this.modification.length; i++) {
-            if (
-              this.modification[i].status != '全部付款'
-            ) {
-              this.$message.error('请选择全部付款条目!')
-              return
-            }
-          }
+          // for (let i = 0; i < this.modification.length; i++) {
+          //   if (
+          //     this.modification[i].status != '全部付款'
+          //   ) {
+          //     this.$message.error('请选择全部付款条目!')
+          //     return
+          //   }
+          // }
 
           this.$confirm(
               '确定修改所选条目的发票状态?',
@@ -977,6 +978,7 @@
         } = param
         const sums = []
         var _number = [6, 8, 9, 12, 13]
+        console.log(data)
         columns.forEach((column, index) => {
           if (index === 0) {
             sums[index] = '合计'
@@ -1137,7 +1139,7 @@
       },
       // 付款
       payment() {
-        this.imageUrl = ''
+        this.imageUrl = []
         if (this.modification.length == 0) {
           this.$message.warning('请选择要付款的条目')
         } else {

+ 65 - 79
src/views/contractManagement/purchaseContractEdit.vue

@@ -895,20 +895,21 @@
           })
           return
         }
-        if (!this.deptBudgetList.unitContractPrice) {
+          if (!this.deptBudgetList.unitContractPrice && this.deptBudgetList.priceType == "定价采购") {
           this.$message({
             message: '请输入合同单价!',
             type: 'warning',
           })
           return
         }
+        
         if (
           isNaN(this.deptBudgetList.unitContractPrice) ||
           (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
             String(this.deptBudgetList.unitContractPrice).length -
             (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
             2) ||
-          this.deptBudgetList.unitContractPrice <= 0 ||
+          this.deptBudgetList.unitContractPrice < 0 ||
           this.deptBudgetList.unitContractPrice > 10000
         ) {
           this.$message({
@@ -917,7 +918,7 @@
           })
           return
         }
-        if (!this.deptBudgetList.totalContractPrice) {
+        if (!this.deptBudgetList.totalContractPrice && this.deptBudgetList.priceType == "定价采购") {
           this.$message({
             message: '请输入合同总价!',
             type: 'warning',
@@ -930,7 +931,7 @@
             String(this.deptBudgetList.totalContractPrice).length -
             (String(this.deptBudgetList.totalContractPrice).indexOf('.') + 1) >
             2) ||
-          this.deptBudgetList.totalContractPrice <= 0 ||
+          this.deptBudgetList.totalContractPrice < 0 ||
           this.deptBudgetList.totalContractPrice > 1000000000
         ) {
           this.$message({
@@ -997,13 +998,13 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
-          this.$message({
-            message: '请输入水分',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+        //   this.$message({
+        //     message: '请输入水分',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
           this.deptBudgetList.contractGoodsInfo.waterContent &&
           String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
@@ -1025,13 +1026,13 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.impurity) {
-          this.$message({
-            message: '请输入杂质',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.impurity) {
+        //   this.$message({
+        //     message: '请输入杂质',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
           this.deptBudgetList.contractGoodsInfo.impurity &&
           String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
@@ -1045,13 +1046,13 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
-          this.$message({
-            message: '请输入容重',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
+        //   this.$message({
+        //     message: '请输入容重',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
           (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
             String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
@@ -1066,25 +1067,19 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
-          this.$message({
-            message: '请输入霉变粒',
-            type: 'warning',
-          })
-          return
-        }
-        if (
-          !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
-          (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
-              '.'
-            ) != -1 &&
-            String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
-            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
-                '.'
-              ) +
-              1) >
-            2 || this.deptBudgetList.contractGoodsInfo.mildewGrain > 40 || this.deptBudgetList.contractGoodsInfo
-            .mildewGrain < 0)
+        // if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
+        //   this.$message({
+        //     message: '请输入霉变粒',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+         if (
+          this.deptBudgetList.contractGoodsInfo.mildewGrain &&
+          String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf('.') != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
+          (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf('.') + 1) >
+          2 || this.deptBudgetList.contractGoodsInfo.mildewGrain > 40 || this.deptBudgetList.contractGoodsInfo.mildewGrain < 0
         ) {
           this.$message({
             message: '霉变粒输入错误',
@@ -1092,24 +1087,19 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
-          this.$message({
-            message: '请输入热损伤',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
+        //   this.$message({
+        //     message: '请输入热损伤',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
-          !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
-          (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
-            -1 &&
-            String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
-            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
-                '.'
-              ) +
-              1) >
-            2 || this.deptBudgetList.contractGoodsInfo.jiaorenli > 40 || this.deptBudgetList.contractGoodsInfo
-            .jiaorenli < 0)
+          this.deptBudgetList.contractGoodsInfo.jiaorenli &&
+          String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
+          (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') + 1) >
+          2 || this.deptBudgetList.contractGoodsInfo.jiaorenli > 40 || this.deptBudgetList.contractGoodsInfo.jiaorenli < 0
         ) {
           this.$message({
             message: '热损伤输入错误',
@@ -1117,25 +1107,19 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
-          this.$message({
-            message: '请输入不完善粒',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
+        //   this.$message({
+        //     message: '请输入不完善粒',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
-          !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
-          (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
-              '.'
-            ) != -1 &&
-            String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
-            (String(
-                this.deptBudgetList.contractGoodsInfo.imperfectGrain
-              ).indexOf('.') +
-              1) >
-            2 || this.deptBudgetList.contractGoodsInfo.imperfectGrain > 40 || this.deptBudgetList.contractGoodsInfo
-            .imperfectGrain < 0)
+          this.deptBudgetList.contractGoodsInfo.imperfectGrain &&
+          String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf('.') != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
+          (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf('.') + 1) >
+          2 || this.deptBudgetList.contractGoodsInfo.imperfectGrain > 40 || this.deptBudgetList.contractGoodsInfo.imperfectGrain < 0
         ) {
           this.$message({
             message: '不完善粒输入错误',
@@ -1143,6 +1127,8 @@
           })
           return
         }
+
+
         if (
           (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) ||
           (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||

+ 3 - 3
src/views/contractManagement/salesContractAdd.vue

@@ -1159,7 +1159,7 @@
         //   return
         // }
         if (
-          this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+          this.deptBudgetList.contractGoodsInfo.mildewGrain &&
           (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
               '.'
             ) != -1 &&
@@ -1186,7 +1186,7 @@
         //   return
         // }
         if (
-          this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+          this.deptBudgetList.contractGoodsInfo.jiaorenli &&
           (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
             -1 &&
             String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
@@ -1212,7 +1212,7 @@
         //   return
         // }
         if (
-          this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+          this.deptBudgetList.contractGoodsInfo.imperfectGrain &&
           (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
               '.'
             ) != -1 &&

+ 65 - 36
src/views/contractManagement/salesContractEdit.vue

@@ -238,7 +238,7 @@
             <span class="unchangeable">*</span>
           </ws-form-item>
           <!-- 最终实际交易量(吨) -->
-          <ws-form-item label="最终实际交易量(吨)" span="1" prop="totalContractPrice">
+          <ws-form-item label="最终实际交易量(吨)" span="1" prop="finalTradingVolume">
             <ws-input v-model="deptBudgetList.finalTradingVolume" maxlength="100" placeholder="请输入最终实际交易量"
               size="small" />
           </ws-form-item>
@@ -913,7 +913,7 @@
           })
           return
         }
-        if (!this.deptBudgetList.unitContractPrice) {
+          if (!this.deptBudgetList.unitContractPrice && this.deptBudgetList.priceType == "定价销售") {
           this.$message({
             message: '请输入合同单价!',
             type: 'warning',
@@ -926,7 +926,7 @@
             String(this.deptBudgetList.unitContractPrice).length -
             (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
             2) ||
-          this.deptBudgetList.unitContractPrice <= 0 ||
+          this.deptBudgetList.unitContractPrice < 0 ||
           this.deptBudgetList.unitContractPrice > 10000
         ) {
           this.$message({
@@ -935,20 +935,21 @@
           })
           return
         }
-        if (!this.deptBudgetList.totalContractPrice) {
+             if (!this.deptBudgetList.totalContractPrice && this.deptBudgetList.priceType == "定价销售") {
           this.$message({
             message: '请输入合同总价!',
             type: 'warning',
           })
           return
         }
+     
         if (
           isNaN(this.deptBudgetList.totalContractPrice) ||
           (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
             String(this.deptBudgetList.totalContractPrice).length -
             (String(this.deptBudgetList.totalContractPrice).indexOf('.') + 1) >
             2) ||
-          this.deptBudgetList.totalContractPrice <= 0 ||
+          this.deptBudgetList.totalContractPrice < 0 ||
           this.deptBudgetList.totalContractPrice > 1000000000
         ) {
           this.$message({
@@ -1015,6 +1016,13 @@
           })
           return
         }
+        // if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+        //   this.$message({
+        //     message: '请输入水分',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
           this.deptBudgetList.contractGoodsInfo.waterContent &&
           String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
@@ -1036,6 +1044,13 @@
           })
           return
         }
+        // if (!this.deptBudgetList.contractGoodsInfo.impurity) {
+        //   this.$message({
+        //     message: '请输入杂质',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
           this.deptBudgetList.contractGoodsInfo.impurity &&
           String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
@@ -1049,6 +1064,13 @@
           })
           return
         }
+        // if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
+        //   this.$message({
+        //     message: '请输入容重',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
           (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
             String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
@@ -1063,18 +1085,20 @@
           })
           return
         }
+        // if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
+        //   this.$message({
+        //     message: '请输入霉变粒',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
-          !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
-          (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
-              '.'
-            ) != -1 &&
+          (this.deptBudgetList.contractGoodsInfo.mildewGrain &&
+            String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf('.') != -1 &&
             String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
-            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
-                '.'
-              ) +
-              1) >
-            2 || this.deptBudgetList.contractGoodsInfo.mildewGrain > 40 || this.deptBudgetList.contractGoodsInfo
-            .mildewGrain < 0)
+            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf('.') + 1) >
+            2) || this.deptBudgetList.contractGoodsInfo.mildewGrain > 40|| this.deptBudgetList.contractGoodsInfo
+          .mildewGrain < 0
         ) {
           this.$message({
             message: '霉变粒输入错误',
@@ -1082,17 +1106,19 @@
           })
           return
         }
-        if (
-          !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
-          (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
-            -1 &&
+        // if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
+        //   this.$message({
+        //     message: '请输入热损伤',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+         if (
+          (this.deptBudgetList.contractGoodsInfo.jiaorenli &&
+            String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') != -1 &&
             String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
-            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
-                '.'
-              ) +
-              1) >
-            2 || this.deptBudgetList.contractGoodsInfo.jiaorenli > 40 || this.deptBudgetList.contractGoodsInfo
-            .jiaorenli < 0)
+            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') + 1) >
+            2) || this.deptBudgetList.contractGoodsInfo.jiaorenli > 40|| this.deptBudgetList.contractGoodsInfo.jiaorenli < 0
         ) {
           this.$message({
             message: '热损伤输入错误',
@@ -1100,18 +1126,19 @@
           })
           return
         }
-        if (
-          !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
-          (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
-              '.'
-            ) != -1 &&
+        // if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
+        //   this.$message({
+        //     message: '请输入不完善粒',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+         if (
+          (this.deptBudgetList.contractGoodsInfo.imperfectGrain &&
+            String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf('.') != -1 &&
             String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
-            (String(
-                this.deptBudgetList.contractGoodsInfo.imperfectGrain
-              ).indexOf('.') +
-              1) >
-            2 || this.deptBudgetList.contractGoodsInfo.imperfectGrain > 40 || this.deptBudgetList.contractGoodsInfo
-            .imperfectGrain < 0)
+            (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf('.') + 1) >
+            2) || this.deptBudgetList.contractGoodsInfo.imperfectGrain > 40|| this.deptBudgetList.contractGoodsInfo.imperfectGrain < 0
         ) {
           this.$message({
             message: '不完善粒输入错误',
@@ -1119,6 +1146,8 @@
           })
           return
         }
+
+
         if(this.deptBudgetList.contractProcessInfo.goodsNameKey){
 
         if (

+ 7 - 7
src/views/contractManagement/storageContractAdd.vue

@@ -868,7 +868,7 @@
           })
           return
         }
-        if (!this.deptBudgetList.storageFeeNew) {
+        if (!this.deptBudgetList.storageFee) {
           this.$message({
             message: '代储费不能为空!',
             type: 'warning',
@@ -883,13 +883,13 @@
           return
         }
         if (
-          isNaN(this.deptBudgetList.storageFeeNew) ||
-          (String(this.deptBudgetList.storageFeeNew).indexOf('.') != -1 &&
-            String(this.deptBudgetList.storageFeeNew).length -
-            (String(this.deptBudgetList.storageFeeNew).indexOf('.') + 1) >
+          isNaN(this.deptBudgetList.storageFee) ||
+          (String(this.deptBudgetList.storageFee).indexOf('.') != -1 &&
+            String(this.deptBudgetList.storageFee).length -
+            (String(this.deptBudgetList.storageFee).indexOf('.') + 1) >
             2) ||
-          this.deptBudgetList.storageFeeNew < 0 ||
-          this.deptBudgetList.storageFeeNew > 1000
+          this.deptBudgetList.storageFee < 0 ||
+          this.deptBudgetList.storageFee > 1000
         ) {
           this.$message({
             message: '代储费填写错误!',

+ 115 - 97
src/views/home/index.vue

@@ -28,13 +28,13 @@
         <div class="content2">
           <el-row class="content2-aside">
             <h3 class="title" @click="contract(0)">采购合同完成进度</h3>
-            <el-col :span="12" class="chart-card" >
+            <el-col :span="12" class="chart-card">
               <div style="font-weight: bold;" class="">
                 <div ref="myEchart1" style="height: 288px;" class="roseChart"></div>
                 <div class="bottom-tip">统计单位:吨</div>
               </div>
             </el-col>
-            <el-col :span="12" class="chart-card" >
+            <el-col :span="12" class="chart-card">
               <div style="font-weight: bold;">
                 <div ref="myEchart2" style="height: 288px;" class="roseChart"></div>
                 <div class="bottom-tip">统计单位:元</div>
@@ -80,19 +80,28 @@
               </div>
             </el-row>
             <el-row>
-              <h3>库存成本</h3>
+              <div style="display: flex;">
+                  <h3>头寸</h3>
+                   <h3 style="margin-left: 30px;">{{position}}吨</h3>
+              </div>
               <div class="content3">
                 <div class="left">
-                  <img src="../../../public/img/1637204557176-s4AMbBA8.png" alt="">
-                  <span>总库存量</span>
-                  <span class="content3-number blue">{{inventoryCost}}</span>
+                  <!-- <img src="../../../public/img/1637204557176-s4AMbBA8.png" alt=""> -->
+                  <span>实际库存</span>
+                  <span class="content3-number blue">{{physicalInventory}}</span>
+                  <span style="margin-top: 10px;">吨</span>
+                </div>
+                <div class="left">
+                  <!-- <img src="../../../public/img/1637204557176-s4AMbBA8.png" alt=""> -->
+                  <span>采购待执行(吨)</span>
+                  <span class="content3-number blue">{{procurementPending}}</span>
                   <span style="margin-top: 10px;">吨</span>
                 </div>
                 <div class="right">
-                  <img src="../../../public/img/1637204768818-70JRjz0H.png" alt="">
-                  <span>库存价值</span>
-                  <span class="content3-number yellow">{{inventoryValue}}</span>
-                  <span style="margin-top: 10px;"></span>
+                  <!-- <img src="../../../public/img/1637204768818-70JRjz0H.png" alt=""> -->
+                  <span>销售待执行(吨)</span>
+                  <span class="content3-number yellow">{{salesPending}}</span>
+                  <span style="margin-top: 10px;"></span>
                 </div>
               </div>
             </el-row>
@@ -111,7 +120,7 @@
                 <div class="bottom-tip">统计单位:元</div>
               </div>
             </el-col>
-            <el-col :span="12" class="chart-card" >
+            <el-col :span="12" class="chart-card">
               <div style="font-weight: bold;">
                 <div ref="myEchart6" style="height: 288px;" class="roseChart" @click="contract(1)"></div>
                 <div class="bottom-tip">统计单位:元</div>
@@ -214,10 +223,12 @@
 
     data() {
       return {
+        physicalInventory :0,
+        procurementPending:0,
+        salesPending:0,
+        position:0,
         mapInfo: [],
         totalReserves: '',
-        inventoryCost: '',
-        inventoryValue: '',
         carCount1: '',
         carCount2: '',
         carCount3: '',
@@ -328,7 +339,7 @@
       },
 
     },
-    activated(){
+    activated() {
       // var staffId=JSON.parse(localStorage.getItem('winseaview-userInfo')).content.staffId
       //      if ('WebSocket' in window) {
       //             if (process.env.NODE_ENV === 'production') {
@@ -358,18 +369,17 @@
       }
     },
     async mounted() {
-      var staffId=JSON.parse(localStorage.getItem('winseaview-userInfo')).content.staffId
+      var staffId = JSON.parse(localStorage.getItem('winseaview-userInfo')).content.staffId
       // getAdminId().toPromise().then(response => {console.log(11111)})
       this.loading = false
       // WebSocket
       // this.$store.dispatch('setAdminId', response.data.data)
       if ('WebSocket' in window) {
         if (process.env.NODE_ENV === 'production') {
-          this.websocket = new WebSocket('wss://www.zthymaoyi.com/wss/websocket/'+staffId )
-        }
-        else {
+          this.websocket = new WebSocket('wss://www.zthymaoyi.com/wss/websocket/' + staffId)
+        } else {
           //  this.websocket = new WebSocket('ws://192.168.1.115:8090/commonUser/api/onOpen?adminId=84f62127b7384dcdbaeaddfe460329fc' )
-          this.websocket = new WebSocket('ws://192.168.1.119:9100/websocket/'+staffId )
+          this.websocket = new WebSocket('ws://192.168.1.119:9100/websocket/' + staffId)
         }
         this.initWebSocket()
       } else {
@@ -395,16 +405,18 @@
       //获取新闻列表
       // this.getNewList()
       gChartsData({
-        compId:localStorage.getItem('ws-pf_compId'),
-		seachMoth:'2021'
+        compId: localStorage.getItem('ws-pf_compId'),
+        seachMoth: '2021'
       }).toPromise().then(res => {
-        console.log('··············',res)
+        console.log('··············', res)
         this.chartsData = res
         this.carCount1 = res[6].biViewInfoList[0].count
         this.carCount2 = res[6].biViewInfoList[1].count
         this.carCount3 = res[6].biViewInfoList[2].count
-        this.inventoryCost = res[7].biViewInfoList[0].count
-        this.inventoryValue = res[7].biViewInfoList[1].count
+        this.physicalInventory = Number(res[7].biViewInfoList[0].count).toFixed(2)
+        this.procurementPending= Number(res[7].biViewInfoList[1].count).toFixed(2)
+        this.salesPending =  Number(res[7].biViewInfoList[2].count).toFixed(2)
+        this.position = Number(Number(this.physicalInventory)+Number(this.procurementPending) - Number(this.salesPending)).toFixed(2)
         this.totalReserves = res[8].biViewInfoList
         this.mapInfo = res[9]
         this.initCharts()
@@ -451,67 +463,72 @@
           this.number.news = news
         })
       },
-         initWebSocket () {
-           console.log(this.websocket)
-      // 连接错误
-      this.websocket.onerror = this.setErrorMessage
-      // 连接成功
-      this.websocket.onopen = this.setOnopenMessage
+      initWebSocket() {
+        console.log(this.websocket)
+        // 连接错误
+        this.websocket.onerror = this.setErrorMessage
+        // 连接成功
+        this.websocket.onopen = this.setOnopenMessage
 
-      // 收到消息的回调
-      this.websocket.onmessage = this.setOnmessageMessage
+        // 收到消息的回调
+        this.websocket.onmessage = this.setOnmessageMessage
 
-      // 连接关闭的回调
-      this.websocket.onclose = this.setOncloseMessage
+        // 连接关闭的回调
+        this.websocket.onclose = this.setOncloseMessage
 
-      // 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
-      window.onbeforeunload = this.onbeforeunload
-    },
-    setErrorMessage () {
-      console.log('WebSocket连接发生错误   状态码:' +this.websocket.readyState)
-    },
-    setOnopenMessage () {
-      // console.log(this.websocket)
-      console.log('WebSocket连接成功    状态码:' + this.websocket.readyState)
-    },
-    setOnmessageMessage (event) {
-      // console.log(3333)
-      // 根据服务器推送的消息做自己的业务处理
-      console.log('服务端返回:' + event.data)
-      var msg = event.data.split('$')
-      var that = this
-      this.$notify.warning({
-        title: '新消息提醒',
-        message: msg[0],
-        duration: 0,
-        onClick() {
-          that.$router.push({
-            path: msg[1] }) // 你要跳转的路由 还可以传参 当然也可以通过其他方式跳转
-        }
-      })
-      var currentPage = that.$router.history.current.path
-      that.$router.push({ path: '/' })
-      that.$router.push({ path: currentPage })
-    },
-    setOncloseMessage () {
-      // console.log(this.websocket)
-      console.log('WebSocket连接关闭    状态码:' + this.websocket.readyState)
-    },
-      //跳转
-      contract(index){
-         if(index == 0){
-            this.$router.push({
-              name:'buyContract'
-            })
-          }else if(index == 1){
-            this.$router.push({
-              name:'salesContract'
-            })
-          }else if(index == 3){
-            this.$router.push({
-              name:'warehouseManagementList'
-            })
+        // 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
+        window.onbeforeunload = this.onbeforeunload
+      },
+      setErrorMessage() {
+        console.log('WebSocket连接发生错误   状态码:' + this.websocket.readyState)
+      },
+      setOnopenMessage() {
+        // console.log(this.websocket)
+        console.log('WebSocket连接成功    状态码:' + this.websocket.readyState)
+      },
+      setOnmessageMessage(event) {
+        // console.log(3333)
+        // 根据服务器推送的消息做自己的业务处理
+        console.log('服务端返回:' + event.data)
+        var msg = event.data.split('$')
+        var that = this
+        this.$notify.warning({
+          title: '新消息提醒',
+          message: msg[0],
+          duration: 0,
+          onClick() {
+            that.$router.push({
+              path: msg[1]
+            }) // 你要跳转的路由 还可以传参 当然也可以通过其他方式跳转
           }
+        })
+        var currentPage = that.$router.history.current.path
+        that.$router.push({
+          path: '/'
+        })
+        that.$router.push({
+          path: currentPage
+        })
+      },
+      setOncloseMessage() {
+        // console.log(this.websocket)
+        console.log('WebSocket连接关闭    状态码:' + this.websocket.readyState)
+      },
+      //跳转
+      contract(index) {
+        if (index == 0) {
+          this.$router.push({
+            name: 'buyContract'
+          })
+        } else if (index == 1) {
+          this.$router.push({
+            name: 'salesContract'
+          })
+        } else if (index == 3) {
+          this.$router.push({
+            name: 'warehouseManagementList'
+          })
+        }
       },
       getTime() {
         const date = new Date();
@@ -551,12 +568,12 @@
               // 圆环图各环节的名称和值(系列中各数据项的名称和值)
               data = [{
                 name: '已完成量',
-                value:Number(this.chartsData[i].biViewInfoList[0].count).toFixed(2) ,
-                type:'采购合同'
+                value: Number(this.chartsData[i].biViewInfoList[0].count).toFixed(2),
+                type: '采购合同'
               }, {
                 name: '待完成量',
-                value:Number(this.chartsData[i].biViewInfoList[1].count).toFixed(2) ,
-                type:'采购合同'
+                value: Number(this.chartsData[i].biViewInfoList[1].count).toFixed(2),
+                type: '采购合同'
               }]
               text = '合同总量'
               formatter = '{b}{c}吨 </br> 占比{d}%'
@@ -569,12 +586,12 @@
               // 圆环图各环节的名称和值(系列中各数据项的名称和值)
               data = [{
                 name: '已开票',
-                value:Number(this.chartsData[i].biViewInfoList[0].count).toFixed(2),
-                type:'采购合同'
+                value: Number(this.chartsData[i].biViewInfoList[0].count).toFixed(2),
+                type: '采购合同'
               }, {
                 name: '待开票',
-                value:Number(this.chartsData[i].biViewInfoList[1].count).toFixed(2),
-                type:'采购合同'
+                value: Number(this.chartsData[i].biViewInfoList[1].count).toFixed(2),
+                type: '采购合同'
               }]
               text = '合同总额'
               formatter = '{b}{c}元 </br> 占比{d}%'
@@ -590,8 +607,8 @@
                 type: '采购合同'
               }, {
                 name: '待付款',
-                value:Number(this.chartsData[i].biViewInfoList[1].count).toFixed(2),
-                   type: '采购合同'
+                value: Number(this.chartsData[i].biViewInfoList[1].count).toFixed(2),
+                type: '采购合同'
               }]
               text = '合同总额'
               formatter = '{b}{c}元 </br> 占比{d}%'
@@ -604,15 +621,15 @@
               data = [{
                 name: '已完成量',
                 value: Number(this.chartsData[i].biViewInfoList[0].count).toFixed(2),
-                  type: '销售合同'
+                type: '销售合同'
               }, {
                 name: '待完成量',
-                value:Number(this.chartsData[i].biViewInfoList[1].count).toFixed(2),
+                value: Number(this.chartsData[i].biViewInfoList[1].count).toFixed(2),
               }]
               text = '合同总量'
               formatter = '{b}{c}吨 </br> 占比{d}%'
               graphicText = ' \n\n总量合计\n\n' + Number(this.chartsData[i].total).toFixed(2)
-                break;
+              break;
             case 4:
               // 圆环图各环节的颜色
               color = ['#247ef4', '#3a3b40'];
@@ -725,7 +742,7 @@
             //  var a = params.dataIndex
             // console.log(params, '我被点击了');
             // app.dialogVisible = true
-           return
+            return
           })
         }
         console.log(this.totalReserves)
@@ -1892,7 +1909,8 @@
     .content2-middle {
       width: calc(100% - 720px);
       margin: 0 20px 0 15px;
-      min-width:910px ;
+      min-width: 910px;
+
       .left-card {
         display: flex;
         // background: green;
@@ -1950,7 +1968,7 @@
     justify-content: space-between;
     align-items: center;
     background: #2a2a2a;
-    padding: 10px 60px;
+    padding: 10px;
 
     .content3-number {
       margin-left: 40px;

+ 2 - 2
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -77,8 +77,8 @@
         <div class="content" v-for="(item,index) in priceList" :key="index">
           <div class="top">
             <div  class="left">
-              <div v-if="baseInfoForm.paramType == '2' "class="text">基准单价(元/公斤)</div>
-              <el-input v-if="baseInfoForm.paramType == '2' "type="number" @mousewheel.native.prevent v-model="item.basicUnitPrice" :disabled="!isEdit"></el-input>
+              <div v-if="baseInfoForm.paramType == '2' " class="text">基准单价(元/公斤)</div>
+              <el-input v-if="baseInfoForm.paramType == '2' " type="number" @mousewheel.native.prevent v-model="item.basicUnitPrice" :disabled="!isEdit"></el-input>
             </div>
             <el-button @click="delSetPrice(item,index)" :disabled="!isEdit">删除</el-button>
           </div>

+ 0 - 1
src/views/houseSelfCollect/component/inspectInfoPrint.vue

@@ -1,7 +1,6 @@
 <!--质检信息-->
 <template>
   <div class="center">
-    123
     <div class="number">{{ printData.qualityNo }}</div>
     <table class="table">
       <tr class="row">

+ 8 - 7
src/views/houseSelfCollect/component/paymentPrint.vue

@@ -52,7 +52,6 @@
         <td class="col col-bgc">皮重</td>
         <td class="col col-bgc">扣杂重</td>
         <td class="col col-bgc">净重</td>
-        <!-- <td class="col col-bgc">纯重</td> -->
       </tr>
       <tr class="row">
         <td class="col">{{ printData.goodsName}}</td>
@@ -67,6 +66,7 @@
         <td class="col">{{ printData.netWeight}}</td>
       </tr>
       <tr class="row">
+         <td class="col col-bgc">出库净重</td>
         <td class="col col-bgc">纯重</td>
         <td class="col col-bgc"  v-if="printData.type == '潮粮'">净重单价</td>
         <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
@@ -77,10 +77,10 @@
         <td class="col col-bgc">卸车补助</td>
         <td class="col col-bgc">其他补助</td>
         <td class="col col-bgc">称重扣款</td>
-        <td class="col col-bgc">运费扣款</td>
-        <!-- <td class="col col-bgc">卸车扣款</td> -->
+        <!-- <td class="col col-bgc">运费扣款</td> -->
       </tr>
       <tr class="row">
+        <td class="col">{{ printData.contractManagement ? printData.contractManagement.weight : "0"}}</td>
         <td class="col">{{ printData.pureWeight}}</td>
         <td class="col " v-if="printData.type == '潮粮'">{{printData.tidalGrainPrice}}</td>
         <td class="col " v-if="printData.type == '干粮'">{{printData.qualityInspectionManagement.dryGrainPrice}}</td>
@@ -91,10 +91,10 @@
         <td class="col ">{{ printData.unloadSubsidy}}</td>
         <td class="col ">{{ printData.otherSubsidy}}</td>
         <td class="col ">{{ printData.weighingDeduction}}</td>
-        <td class="col ">{{ printData.freightDeduction}}</td>
-        <!-- <td class="col ">{{ printData.unloadDeduction}}</td> -->
+        <!-- <td class="col ">{{ printData.freightDeduction}}</td> -->
       </tr>
       <tr class="row">
+        <td class="col col-bgc">运费扣款</td>
         <td class="col col-bgc">卸车扣款</td>
         <td class="col col-bgc">质量扣款</td>
         <td class="col col-bgc">其他扣款</td>
@@ -102,9 +102,10 @@
         <td class="col col-bgc">合计应付</td>
         <td class="col col-bgc">购粮性质</td>
         <td class="col col-bgc">车牌号</td>
-        <td class="col col-bgc" colspan="4">记事</td>
+        <td class="col col-bgc" colspan="3">记事</td>
       </tr>
       <tr class="row">
+        <td class="col ">{{ printData.freightDeduction}}</td>
         <td class="col ">{{ printData.unloadDeduction}}</td>
         <td class="col ">{{ printData.qualityDeduction}}</td>
         <td class="col ">{{ printData.otherDeduction}}</td>
@@ -112,7 +113,7 @@
         <td class="col ">{{ printData.calculationPayable}}</td>
         <td class="col ">{{ printData.qualityInspectionManagement.natureOfGrainPurchase}}</td>
         <td class="col ">{{ printData.carNo}}</td>
-        <td class="col " colspan="4">{{ printData.remarks}}</td>
+        <td class="col " colspan="3">{{ printData.remarks}}</td>
       </tr>
       <tr class="row">
         <td class="col col-bgc">实付金额</td>

+ 82 - 10
src/views/houseSelfCollect/component/routers/route.js

@@ -70,28 +70,70 @@ const houseSelfCollectRouter = {
       },
         hidden: true
     },
-    // 质检管理
+    // // 质检管理
+    // {
+    //   path: 'inspectionManagement',
+    //   component: () =>
+    //     import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectionManagement'),
+    //   name: 'inspectionManagement',
+    //   meta: {
+    //     title: 'inspectionManagement',
+    //     shortcutEntrance: 'houseSelfCollect',
+    //     module: 'acquisitionManagement.acquisitionQuality.view',
+    //     permissicon: [],
+    //     keepAlive: true
+    //   }
+    // },
+    // // 质检管理记录
+    {
+      path: 'inspectionManagementrecord',
+      component: () =>
+        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectionManagementrecord'),
+      name: 'inspectionManagementrecord',
+      meta: {
+        title: 'inspectionManagementrecord',
+        shortcutEntrance: 'houseSelfCollect',
+        module: 'acquisitionManagement.acquisitionQuality.view',
+        permissicon: [],
+        // keepAlive:true
+      },
+      hidden: true
+    },
     {
       path: 'inspectionManagement',
       component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectionManagement'),
-      name: 'inspectionManagement',
+        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectionManagementNew'),
+      name: 'inspectionManagementNew',
       meta: {
         title: 'inspectionManagement',
         shortcutEntrance: 'houseSelfCollect',
         module: 'acquisitionManagement.acquisitionQuality.view',
         permissicon: [],
-        keepAlive: true
+        keepAlive:true
       }
     },
-    // 检斤管理
-    {
-      path: 'weighingManagement',
+    // // 检斤管理
+    // {
+    //   path: 'weighingManagement',
+    //   component: () =>
+    //     import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/weighingManagement'),
+    //   name: 'weighingManagement',
+    //   meta: {
+    //     title: 'weighingManagement',
+    //     shortcutEntrance: 'houseSelfCollect',
+    //     module: 'acquisitionManagement.acquisitionWeight.view',
+    //     permissicon: [],
+    //     keepAlive: true
+    //   }
+    // },
+     // 新检斤管理
+     {
+      path: 'newWeighingManagement',
       component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/weighingManagement'),
-      name: 'weighingManagement',
+        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/newWeighingManagement'),
+      name: 'newWeighingManagement',
       meta: {
-        title: 'weighingManagement',
+        title: 'newWeighingManagement',
         shortcutEntrance: 'houseSelfCollect',
         module: 'acquisitionManagement.acquisitionWeight.view',
         permissicon: [],
@@ -126,6 +168,20 @@ const houseSelfCollectRouter = {
       },
       hidden: true
     },
+    {
+      path: 'inspectInfolook',
+      component: () =>
+        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/inspectInfoLook'),
+      name: 'inspectInfo',
+      meta: {
+        title: 'inspectInfo',
+        shortcutEntrance: 'inspectInfo',
+        module: 'acquisitionManagement.acquisitionQuality.view',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
     {
       path: 'inspectInfo',
       component: () =>
@@ -154,6 +210,22 @@ const houseSelfCollectRouter = {
       },
       hidden: true
     },
+   
+    // 记录
+    {
+      path: 'weightCheckRecord',
+      component: () =>
+        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/weightCheckRecord'),
+      name: 'weightCheckRecord',
+      meta: {
+        title: 'weightCheckRecord',
+        shortcutEntrance: 'houseSelfCollect',
+        module: 'acquisitionManagement.acquisitionWeight.view',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
   ],
 
 };

+ 12 - 6
src/views/houseSelfCollect/component/weightCheckPrint.vue

@@ -4,10 +4,14 @@
         <div class="number">{{tableData.number}}</div>
         <table class="table">
           <tr class="row">
-            <td class="col col-bgc">客户姓名</td>
-            <td class="col" colspan="2">{{tableData.customer}}</td>
-            <td class="col col-bgc">客户电话</td>
-            <td class="col" >{{tableData.customerPhone}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户姓名</td>
+            <td class="col" colspan="2" v-if="tableData.serviceManagementType == 3">{{tableData.customer}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">发货单位</td>
+            <td class="col" colspan="2" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户电话</td>
+            <td class="col" v-if="tableData.serviceManagementType == 3">{{tableData.customerPhone}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">联系电话</td>
+            <td class="col" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</td>
             <td class="col col-bgc">车牌号</td>
             <td class="col" colspan="2">{{tableData.carNumber}}</td>
           </tr>
@@ -51,7 +55,8 @@
             <td class="col">{{tableData.grossWeight}}</td>
             <td class="col col-bgc">皮重(公斤)</td>
             <td class="col">{{tableData.tare}}</td>
-            <!-- <td class="col " colspan="2"></td> -->
+            <td class="col ">扣重(公斤)</td>
+            <td class="col">{{tableData.buckleMiscellaneous}}</td>
             <td class="col col-bgc">净重(公斤)</td>
             <td class="col">{{tableData.netWeight}}</td>
           </tr>
@@ -74,6 +79,7 @@
             </div>
             <div class="config">收货单位签名或盖章:</div>
             <div class="autograph">客户签名:</div>
+            <div class="autograph">司机签名:</div>
           </div>
           <div class="bottom-row3">扫一扫</div>
            <!-- <div class="bottom-row4">
@@ -119,7 +125,6 @@ export default{
     text-align: right;
     margin: 0 0 10px 0;
   }
-
   table,
   table tr th,
   table tr td {
@@ -164,6 +169,7 @@ export default{
     }
     .autograph{
         margin-top: 20px;
+        margin-right:240px;
     }
   }
 

+ 7 - 0
src/views/houseSelfCollect/customerManagementAdd.vue

@@ -584,6 +584,13 @@
           })
           return
         }
+        if (!this.customerList.compAddress) {
+          this.$message({
+            message: '请输入联系地址',
+            type: 'warning',
+          })
+          return
+        }
         // 验证码校验
         GetCustomerCodeJY({
             phone: this.customerList.customerPhone,

+ 1 - 2
src/views/houseSelfCollect/inspectInfo.vue

@@ -156,8 +156,7 @@
           <div class="but">
             <el-button @click="cancel" v-if="types != 2" type="primary">取消</el-button>
                <el-button @click="checkOk" v-if="types == 4" type="primary">确认初检信息</el-button>
-            <el-button @click="print" v-if="types ==3 || types ==1" type="primary">保存
-            </el-button>
+            <el-button @click="print" v-if="types ==3 || types ==1" type="primary">保存</el-button>
             <el-button @click="print" v-if="types == 5 || types==4" type="primary">确认并打印</el-button>
             <el-button @click="cancel" v-if="types == 2" type="primary">关闭</el-button>
           </div>

+ 1348 - 0
src/views/houseSelfCollect/inspectInfoLook.vue

@@ -0,0 +1,1348 @@
+<!--质检信息-->
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left titleup">{{ information }}信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <div class="substance">
+      <ws-form>
+        <div style="width: 80%; margin: 0 auto">
+          <div class="title">基本信息</div>
+          <ws-info-table>
+            <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+              <ws-input v-model="inspect.inOutTaskNo" placeholder="请输入任务编号" maxlength="100" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="仓位号" span="1" prop="binNumber">
+              <ws-select v-model="inspect.binNumber" placeholder="请输入仓位号" class="typeselect" :disabled="disabled">
+                <ws-option v-for="item in getbinNumberList" :key="item.value" :label="item.value" :value="item.value" />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="业务编号" span="1" prop="qualityNo">
+              <ws-input v-model="inspect.qualityNo" placeholder="请输入业务编号" maxlength="100" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="囤位号" span="1" prop="storageTagNo">
+              <ws-input v-model="inspect.storageTagNo" placeholder="请输入囤位号" maxlength="15" size="small"
+                :disabled="disabled3" />
+            </ws-form-item>
+             <ws-form-item label="合同/移库编号" span="1" prop="contractNo">
+              <ws-input v-model="inspect.contractNo" placeholder="请输入合同/移库编号" maxlength="100" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="成本" span="1" prop="cost">
+              <ws-input v-model="inspect.cost" placeholder="请输入成本" maxlength="100" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="提示" span="1" prop="cost">
+              <ws-input v-model="inspect.tips" placeholder="请输入提示" maxlength="100" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="扣款" span="1" prop="cost">
+              <ws-input v-model="inspect.deductionAmount" placeholder="请输入扣款" maxlength="100" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="货名" span="1" prop="goodsName">
+              <ws-select v-model="inspect.goodsName" placeholder="" class="typeselect" :disabled="disabledName" @change="waterContentChange">
+                <ws-option v-for="item in goodNameList" :key="item.goodsName" :label="item.goodsName"
+                  :value="item.goodsName" />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="经办人" span="1" prop="natureOfGrainPurchase">
+              <ws-input v-model="inspect.agent" placeholder="请输入经办人" maxlength="10" size="small"
+                :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="入库类型" span="1" prop="goodsName">
+               <ws-input v-model="inspect.inOutType" placeholder="请输入入库类型" maxlength="10" size="small"
+                :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="入库日期" span="1" prop="natureOfGrainPurchase">
+              <ws-input v-model="inspect.inOutDate" placeholder="请输入入库日期" maxlength="10" size="small"
+                :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="运输方式" span="1" prop="outType">
+               <ws-input v-model="inspect.outType" placeholder="请输入运输方式" maxlength="10" size="small"
+                :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="车队" span="1" prop="natureOfGrainPurchase">
+              <ws-input v-model="inspect.fleet" placeholder="请输入彻底" maxlength="10" size="small"
+                :disabled="disabled" />
+            </ws-form-item>
+            <!-- <ws-form-item label="购粮性质" span="1" prop="natureOfGrainPurchase">
+              <ws-input v-model="inspect.natureOfGrainPurchase" placeholder="请输入购粮性质" maxlength="10" size="small"
+                :disabled="disabled" />
+            </ws-form-item>
+            
+            <ws-form-item label="客户" span="1" prop="customerName">
+              <el-select v-model="inspect.customerName" clearable filterable placeholder="请选择" class="typeselect"
+                @change="customerChange" :disabled="disabled1">
+                <el-option v-for="item in customerList" :key="item.valueKey" :label="item.value" :value="item.value" />
+              </el-select>
+            </ws-form-item> -->
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
+              <!-- <el-select v-model="inspect.carNumber" clearable  @blur="selectBlur" filterable  placeholder="请选择" class="typeselect" @change="shipperNameChange"
+                :disabled="disabled1"> -->
+                
+                <el-select v-model="inspect.carNumber" clearable filterable allow-create default-first-option placeholder="请选择" class="typeselect" @change="shipperNameChange"
+                :disabled="disabled1">
+                <el-option v-for="(item,index) in carNumberList" :key="index" :label="item.carNo" :value="index" />
+              </el-select>
+              <!-- <ws-input @change='carnochange' v-model="inspect.carNumber" placeholder="请输入车牌号" maxlength="10" size="small"
+                :disabled="disabled" /> -->
+            </ws-form-item>
+            <ws-form-item label="箱号-1" span="1" prop="boxNo">
+              <ws-input :disabled="disabled" v-model="inspect.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+            </ws-form-item>
+            <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
+              <ws-input :disabled="disabled" v-model="inspect.boxNoOther" placeholder="请输入箱号" maxlength="20"
+                size="small" />
+            </ws-form-item>
+            <ws-form-item label="封号-1" span="1" prop="titleNo">
+              <ws-input :disabled="disabled" v-model="inspect.titleNo" placeholder="请输入封号" maxlength="20"
+                size="small" />
+            </ws-form-item>
+            <ws-form-item label="封号-2" span="1" prop="titleNoOther">
+              <ws-input :disabled="disabled" v-model="inspect.titleNoOther" placeholder="请输入封号" maxlength="20"
+                size="small" />
+            </ws-form-item>
+            
+            <ws-form-item v-if="inspect.paramType != '1'" label="扣重比" span="1" prop="buckleWeightRatio">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.buckleWeightRatio"
+                placeholder="请输入扣重比" maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item v-else label="扣杂" span="1" prop="buckleWeightRatio">
+              <ws-input type="number" style="padding-right:30px" @mousewheel.native.prevent
+                v-model="inspect.buckleMiscellaneous" @input="waterContentChange" placeholder="请输入扣杂" maxlength="100"
+                size="small" :disabled="disabled" />
+              <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous"
+                placeholder="请输入扣杂" maxlength="100" size="small" />
+              <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous"
+                placeholder="未复检" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item label="类型" span="1" prop="type">
+              <ws-select v-model="inspect.type" disabled @change="typeChange">
+                <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="净重单价(元/公斤)" span="1" prop="tidalGrainPrice" v-if="inspect.type == '潮粮'">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.tidalGrainPrice" placeholder="请输入净重单价"
+                maxlength="10" size="small"  />
+            </ws-form-item>
+            <ws-form-item label="干粮单价(元/公斤)" span="2" prop="dryGrainPrice" v-if="inspect.type == '干粮'">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.dryGrainPrice" placeholder="请输入干粮单价"
+                maxlength="10" size="small"  />
+            </ws-form-item>
+              
+               <!-- <ws-form-item label="车型" span="2" prop="dryGrainPrice" v-if="types==4&&warehouseName=='鲅鱼圈金信库'||types==2&&warehouseName=='鲅鱼圈金信库'">
+                <el-select v-model="inspect.carModel" clearable filterable placeholder="请选择" class="typeselect"
+                 :disabled="disabled3">
+                <el-option v-for="item in cartypeList" :key="item.constValue" :label="item.constValue" :value="item.constValue" />
+              </el-select>
+            </ws-form-item> -->
+          </ws-info-table>
+
+          <div class="title">质检数据</div>
+          <ws-info-table>
+            <ws-form-item label="等级" span="1" prop="grade">
+              <ws-select v-model="inspect.grade" placeholder="请输入等级" class="typeselect" :disabled="disabled"
+                @change="waterContentChange">
+                <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                  :value="item.constValue" />
+              </ws-select>
+              <ws-select v-model="inspect.reGrade" placeholder="请输入复检等级" class="typeselect" :disabled="disabled"
+                @change="waterContentChange">
+                <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                  :value="item.constValue" />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="杂质(%)" span="1" prop="impurity">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.impurity" placeholder="请输入杂质占比"
+                maxlength="100" size="small" :disabled="disabled" />
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.reImpurity" placeholder="请输入复检杂质占比"
+                maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="水分(%)" span="1" prop="waterContent">
+
+              <ws-input type="number" @mousewheel.native.prevent style="padding-right:30px"
+                v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="100" size="small"
+                @change="waterContentChange('water')" :disabled="disabled" />
+              <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent"
+                placeholder="请输入水分占比" maxlength="100" size="small" />
+              <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent"
+                placeholder="未复检" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.mildewGrain" placeholder="请输入霉变粒占比"
+                maxlength="100" size="small" :disabled="disabled" />
+                <ws-input type="number" @mousewheel.native.prevent v-model="inspect.reMildewGrain" placeholder="请输入复检霉变粒占比"
+                maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.bulkDensity" placeholder="请输入容重"
+                maxlength="100" size="small" :disabled="disabled" />
+                <ws-input type="number" @mousewheel.native.prevent v-model="inspect.reBulkDensity" placeholder="请输入复检容重"
+                maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.jiaorenli" placeholder="请输入热损伤占比"
+                maxlength="100" size="small" :disabled="disabled" />
+                <ws-input type="number" @mousewheel.native.prevent v-model="inspect.reJiaorenli" placeholder="请输入复检热损伤占比"
+                maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.imperfectGrain"
+                placeholder="请输入不完善粒占比" maxlength="100" size="small" :disabled="disabled" />
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.reImperfectGrain"
+                placeholder="请输入复检不完善粒占比" maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="复检备注" span="2" prop="reMemo" v-if="information == '编辑复检' || statusShow == '已复检'">
+              <ws-input type="textarea" v-model="inspect.reMemo" placeholder="请输入复检备注" maxlength="300" v-if="statusShow != '已复检'" />
+              <ws-input type="textarea" v-model="inspect.reMemo" placeholder="请输入复检备注" maxlength="300" v-else disabled />
+            </ws-form-item>
+          </ws-info-table>
+          <div class="but">
+            <el-button @click="cancel" v-if="types != 2" type="primary">取消</el-button>
+               <el-button @click="checkOk" v-if="types == 4" type="primary">确认初检信息</el-button>
+            <el-button @click="print" v-if="types ==3 || types ==1" type="primary">保存</el-button>
+            <el-button @click="print" v-if="types == 5 || types==4" type="primary">确认并打印</el-button>
+            <el-button @click="cancel" v-if="types == 2" type="primary">关闭</el-button>
+          </div>
+        </div>
+      </ws-form>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    inspectAdd,
+    getbinNumber,
+    getcustomer,
+    getinspectLook,
+    getinspectLookUnitPrice,
+    getinspectLookGoods,
+    getinspectEdit,
+    getamount,
+    getCount,
+    getDryGrainPrice,
+    getshippinginfo,
+    postCheck,
+    getQRcode,
+    getcartype
+  } from '@/model/houseSelfCollect/index'
+  import {
+    packList
+  } from '@/model/contarct/index'
+  import inspectInfoPrint from './component/inspectInfoPrint.vue'
+  import html2canvas from 'html2canvas'
+  import axios from 'axios'
+  export default {
+    components: {
+      inspectInfoPrint,
+    },
+    watch: {},
+    data() {
+      return {
+        isShowPrint: false,
+        customerList1: [],
+        // warehouseList: {},
+        inspect: {
+          tidalGrainPrice: 0,
+          buckleWeightRatio: 0,
+          natureOfGrainPurchase: '贸易粮',
+          buckleMiscellaneous: 0,
+          paramType: 1,
+          type: '潮粮'
+        },
+        carNumberList: [],
+        disabled: false,
+        disabled1: false,
+        disabled2: false,
+        disabled3:false,
+        disabledName: false,
+        types: '1',
+        information: '添加初检',
+        goodNameList: [],
+        gradeList: [],
+        customerList: [],
+        getbinNumberList: [],
+        cartypeList:[],
+        cangid: '', //仓库id
+        warehouseName: '',
+        unitPrice: 0,
+        count: 0,
+        cangNo: '',
+        typeList: ['干粮', '潮粮'],
+        purchasePriceList: [],
+        id: '',
+        imgUrl: '',
+        printData: {},
+        num: 0,
+        tipFlag: true,
+        allowEdit: 0,
+        statusShow :''
+      }
+    },
+    activated() {
+      this.types = this.$route.query.type
+      this.allowEdit = this.$route.query.allowEdit
+      if (this.allowEdit == 0) {
+        this.disabled2 = true
+      } else if (this.allowEdit == 1) {
+        this.disabled2 = false
+      }
+      if (!this.types) {
+        this.types = 1
+        this.information = '添加初检'
+        this.disabled = false
+        this.inspect = {
+          tidalGrainPrice: 0,
+          buckleWeightRatio: 0,
+          natureOfGrainPurchase: '贸易粮',
+          type: '潮粮'
+        }
+      }
+      this.cangid = this.$route.query.cangid
+      this.warehouseName = this.$route.query.warehouseName
+      this.cangNo = this.$route.query.warehouseNo
+      this.count = Number(this.$route.query.count) + 1
+      this.statusShow = this.$route.query.status
+      // this.purchasePriceList = this.$route.query.purchasePriceList
+      this.id = this.$route.query.id
+      if (this.types == 2) {
+        this.disabled = true
+        this.disabled1 = true
+        this.disabled2 = true
+        this.disabledName = true
+        this.disabled3=true
+        this.information = '查看质检'
+      } else if (this.types == 3) {
+        this.disabled = false
+        this.disabled1 = true
+        this.disabledName = true
+        this.information = '编辑初检'
+      } else if (this.types == 4) {
+        this.disabled = true
+        this.disabled1 = true
+        this.disabledName = true
+        this.information = '编辑复检'
+      } else if (this.types == 5) {
+        this.disabled = false
+        this.disabled1 = true
+        this.disabledName = false
+        this.information = '确认质检'
+      } else {
+        this.disabled1 = false
+        this.disabled = false
+        this.disabledName = false
+      }
+      this.calculation()
+      this.getList(this.id)
+    },
+    methods: {
+      //确认初检信息
+      checkOk(){
+        this.$confirm('确定初检信息后,初检员不需要再次确认质检信息,是否确认提交', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              postCheck(this.inspect)
+                .toPromise()
+                .then((response) => {
+                   postCheck({id:this.id,flag:2})
+                    .toPromise()
+                    .then((response) => {
+                      if(response == 'OK'){
+                      this.$message.success('提交成功')
+                        this.$router.push({path: 'inspectionManagement' })
+                        }else{
+                          this.$message.error('提交失败')
+                        }
+                    })
+                }).catch(() => {
+              return false
+            })
+        })
+
+      },
+      printSmall() {
+        window.open('../../../static/inspection.html?type=1&dataList=' + JSON.stringify(this.inspect))
+      },
+      printBig() {
+        window.open('../../../static/inspection.html?type=2&dataList=' + JSON.stringify(this.inspect))
+      },
+      getdate() {
+        var date = new Date()
+        var year = date.getFullYear() //获取完整的年份(4位)
+        var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+        var datetime = date.getDate() //获取当前日(1-31)
+        if (mouth < 10) {
+          mouth = '0' + mouth
+        }
+        if (datetime < 10) {
+          datetime = '0' + datetime
+        }
+        return String(year) + String(mouth) + String(datetime)
+      },
+      calculation() {
+        let number = '000' + this.count
+        number = number.substring(number.length - 4, number.length)
+        this.inspect.qualityNo = 'SGRK' + this.getdate() + this.cangNo + number //SGRK+8位时间+3位仓库编号+4位序列号
+      },
+      selectBlur(e) {
+                if (e.target.value) {  
+                 // 不在表单的时候不需要判断,也不需要isname字段
+                    this.inspect.carNumber = e.target.value;
+                    // this.isName = true;   
+                } else {
+                    // this.isName = false;
+                }
+            },
+      opendBtn(){
+           html2canvas(this.$refs.saveImg.$el).then(canvas => {
+          let dataURL = canvas.toDataURL('image/png');
+          this.imgUrl = dataURL;
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImg')
+            let formdata = new FormData();
+            formdata.append('file', b);
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata
+            }).then((response) => {
+              //编辑接口
+              this.inspect.pictureAddress = response.data.url
+              console.log(this.types)
+              if (this.types == 3) {
+                this.inspect.flag = 0
+              } else if (this.types == 4) {
+                this.inspect.flag = 1
+              }
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  // this.inspect = [] 
+              
+                })
+            })
+          }
+        })
+      },
+      
+      closeDialog() {
+        html2canvas(this.$refs.saveImg.$el).then(canvas => {
+          let dataURL = canvas.toDataURL('image/png');
+          this.imgUrl = dataURL;
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImg')
+            let formdata = new FormData();
+            formdata.append('file', b);
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata
+            }).then((response) => {
+              //编辑接口
+              this.inspect.pictureAddress = response.data.url
+              console.log(this.types)
+              if (this.types == 3) {
+                this.inspect.flag = 0
+              } else if (this.types == 4) {
+                this.inspect.flag = 1
+              }
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  // this.inspect = [] 
+                  this.isShowPrint = false
+                  this.$router.push({
+                    path: 'inspectionManagement'
+                  })
+                })
+            })
+            this.dialogTableVisible = true;
+          }
+        })
+
+      },
+      typeChange() {
+        if (this.inspect.type == '干粮' && this.inspect.goodsName) {
+          getDryGrainPrice({
+              warehouseId: this.cangid,
+              goodsName: this.inspect.goodsName
+            })
+            .toPromise()
+            .then((response) => {
+              this.$set(this.inspect, 'dryGrainPrice', response)
+            })
+        }
+      },
+      closePrint() {
+        // this.inspect = [] 
+        this.isShowPrint = false
+      },
+      submit() {
+        this.inspect.warehouseName = this.warehouseName
+        this.inspect.compId = localStorage.getItem('ws-pf_compId')
+        if (this.types == 1) {
+          this.inspect.qualityInspector = localStorage.getItem('ws-pf_staffName')
+          this.$confirm('确定保存质检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              if (!this.inspect.tidalGrainPrice || this.inspect.tidalGrainPrice == 'NaN') {
+                this.inspect.tidalGrainPrice = 0
+              }
+              inspectAdd(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('保存成功')
+                  getinspectLook({
+                      id: response
+                    })
+                    .toPromise()
+                    .then((response) => {
+                    //  let printString = localStorage.getItem('ws-pf_compId') + "," + row.qualityNo + "," + this.cangid 
+                    //       getQRcode({printString}).toPromise()
+                    //             .then((res) => {
+                            this.isShowPrint = true
+                            this.printData = response
+                            // this.printData.qrCodeUrl = res
+                            // })
+                      this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
+                    })
+                  this.isShowPrint = true
+                  //打印
+                  // this.$router.go(-1)
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        } else if (this.types == 3) {
+          this.inspect.qualityInspector = localStorage.getItem('ws-pf_staffName')
+          this.inspect.flag = 0
+          this.$confirm('确定保存初检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              // return
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  this.$router.push({
+                    path: 'inspectionManagement'
+                  })
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        } else if (this.types == 4) {
+          this.inspect.flag = 1
+          this.inspect.reInspector = localStorage.getItem('ws-pf_roleName') + localStorage.getItem('ws-pf_staffName')
+          this.$confirm('确定保存复检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              // return
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  
+                  // this.$router.push({
+                  //   path: 'inspectionManagement'
+                  // })
+                   getinspectLook({
+                      id: this.inspect.id
+                    })
+                    .toPromise()
+                    .then((response) => {
+                      this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
+                    })
+                  this.isShowPrint = true
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        } else if (this.types == 5) {
+          this.inspect.flag = 2
+          // this.inspect.reInspector=localStorage.getItem('ws-pf_roleName') + localStorage.getItem('ws-pf_staffName')
+          this.$confirm('确定保存质检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  getinspectLook({
+                      id: this.inspect.id
+                    })
+                    .toPromise()
+                    .then((response) => {
+                      this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
+                    })
+                  this.isShowPrint = true
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        }
+      },
+      print() {
+        if (!this.inspect.qualityNo) {
+          this.$message({
+            message: '编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.binNumber) {
+          this.$message({
+            message: '仓位不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.customerName) {
+          this.$message({
+            message: '客户不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (!this.inspect.storageTagNo) {
+        //   this.$message({
+        //     message: '囤位号不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if(this.inspect.storageTagNo){
+            if (this.inspect.storageTagNo.length > 10) {
+            this.$message({
+              message: '囤位号不超过10个字符',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (!this.inspect.carNumber) {
+          this.$message({
+            message: '车牌号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.carNumber.length > 7 || this.inspect.carNumber.length != 7) {
+          this.$message({
+            message: '车牌号输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.boxNo && this.inspect.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.boxNoOther && this.inspect.boxNoOther.length > 20) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.titleNo && this.inspect.titleNo.length > 20) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.titleNoOther && this.inspect.titleNoOther.length > 20) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.paramType == '2') {
+          if (
+            this.inspect.buckleWeightRatio < 0 ||
+            this.inspect.buckleWeightRatio > 2
+          ) {
+            this.$message({
+              message: '扣重比输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            String(this.inspect.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.inspect.buckleWeightRatio).length -
+            (String(this.inspect.buckleWeightRatio).indexOf('.') + 1) >
+            2
+          ) {
+            this.$message({
+              message: '扣重比输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (!this.inspect.type) {
+          this.$message({
+            message: '类型不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.natureOfGrainPurchase) {
+          this.$message({
+            message: '购粮性质不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.type == '干粮') {
+          if (!this.inspect.dryGrainPrice) {
+            this.$message({
+              message: '干粮价格不能为空',
+              type: 'warning'
+            })
+            return
+          }
+          if (this.inspect.dryGrainPrice <= 0 || this.inspect.dryGrainPrice > 1000) {
+            this.$message({
+              message: '干粮价格输入错误',
+              type: 'warning'
+            })
+            return
+          }
+          if (
+            String(this.inspect.dryGrainPrice).indexOf('.') != -1 &&
+            String(this.inspect.dryGrainPrice).length - (String(this.inspect.dryGrainPrice).indexOf('.') + 1) > 4) {
+            this.$message({
+              message: '干粮价格输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        } else {
+          if (!this.inspect.tidalGrainPrice) {
+            this.$message({
+              message: '净重单价不能为空',
+              type: 'warning'
+            })
+            return
+          }
+          if (this.inspect.tidalGrainPrice <= 0 || this.inspect.tidalGrainPrice > 1000) {
+            this.$message({
+              message: '净重单价输入错误',
+              type: 'warning'
+            })
+            return
+          }
+        }
+        if (!this.inspect.grade) {
+          this.$message({
+            message: '等级不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.impurity) {
+          this.$message({
+            message: '杂质不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.impurity).indexOf('.') != -1 && String(this.inspect.impurity).length - (String(this
+            .inspect.impurity).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (this.inspect.impurity < 0 || this.inspect.impurity > 40) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if( this.information != '编辑复检'){
+        if (!this.inspect.waterContent) {
+          this.$message({
+            message: '水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.waterContent < 0 || this.inspect.waterContent > 50) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.waterContent).indexOf('.') != -1 && String(this.inspect.waterContent).length - (String(
+            this.inspect.waterContent).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        }
+        
+        if (!this.inspect.mildewGrain) {
+          this.$message({
+            message: '霉变粒不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.mildewGrain < 0 || this.inspect.mildewGrain > 40) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.mildewGrain).indexOf('.') != -1 && String(this.inspect.mildewGrain).length - (String(
+            this.inspect.mildewGrain).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.bulkDensity) {
+          this.$message({
+            message: '容重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect.bulkDensity).length - (String(
+            this.inspect.bulkDensity).indexOf('.') + 1) > 0) {
+          this.$message({
+            message: '容重需输入整数',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.jiaorenli) {
+          this.$message({
+            message: '热损伤不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.jiaorenli < 0 || this.inspect.jiaorenli > 40) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.jiaorenli).indexOf('.') != -1 && String(this.inspect.jiaorenli).length - (String(this
+            .inspect.jiaorenli).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.imperfectGrain) {
+          this.$message({
+            message: '不完善粒不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.imperfectGrain < 0 || this.inspect.imperfectGrain > 40) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.imperfectGrain).indexOf('.') != -1 && String(this.inspect.imperfectGrain).length - (
+            String(this.inspect.imperfectGrain).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        getamount({
+            compId: localStorage.getItem('ws-pf_compId'),
+            customerNumberCard: this.inspect.customerNumberCard,
+            goodsName: this.inspect.goodsName,
+          })
+          .toPromise()
+          .then((response) => {
+            for (let i = 0; i < this.purchasePriceList.length; i++) {
+              if (
+                this.inspect.goodsName == this.purchasePriceList[i].goodsName
+              ) {
+                let count = (this.purchasePriceList[i].saleLimit - response / 1000).toFixed(2)
+                if (count <= 0) {
+                  count = 0
+                  this.$alert(
+                    '该客户累计销售' +
+                    this.inspect.goodsName +
+                    (response / 1000).toFixed(2) +
+                    '吨,还可售粮' +
+                    count +
+                    '吨',
+                    '提示', {
+                      confirmButtonText: '确定',
+                      callback: (action) => {
+                        this.$message({
+                          type: 'info',
+                          message: `累计售粮已超出上限`,
+                        })
+                      },
+                    }
+                  )
+                } else {
+                  this.submit();
+                }
+              }
+            }
+          })
+      },
+      cancel() {
+        this.types = ''
+        // this.inspect = [] 
+        this.$router.push({
+          path: 'inspectionManagementrecord'
+        })
+
+      },
+      shipperNameChange(e) {
+        this.$set(this.inspect, 'customerName', this.carNumberList[e].shipperName)
+        this.$set(this.inspect, 'carNumber', this.carNumberList[e].carNo)
+        this.$set(this.inspect, 'customerPhone', this.carNumberList[e].shipperPhone)
+        for (let i = 0; i < this.customerList1.length; i++) {
+          if (this.customerList1[i].customerName == this.inspect.customerName) {
+            this.inspect.customerNumberCard = this.customerList1[i].customerNumberCard
+          }
+        }
+        if (this.inspect.goodsName && this.inspect.customerName) {
+          // //查看当前用户对应货名有未结算状态的送货
+          // let count = 0
+          // getCount({
+          //     compId: localStorage.getItem('ws-pf_compId'),
+          //     customerName: this.inspect.customerName,
+          //     goodsName: this.inspect.goodsName,
+          //     customerNumberCard: this.inspect.customerNumberCard
+          //   }).toPromise()
+          //   .then((response) => {
+          //     count = response
+          //   })
+          //  客户下拉校验
+          // getamount({
+          //   compId: localStorage.getItem('ws-pf_compId'),
+          //   customerName: this.inspect.customerName,
+          //   goodsName: this.inspect.goodsName,
+          //   customerNumberCard:this.inspect.customerNumberCard
+          // })
+          //   .toPromise()
+          //   .then((response) => {
+          //     for (let i = 0; i < this.purchasePriceList.length; i++) {
+          //       if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+          //         if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0)&&this.tipFlag) {
+          //           this.tipFlag = false
+          //           this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+          //         }
+          //       }
+          //     }
+          //   })
+        }
+      },
+      customerChange(e) {
+        let customers = e.split('(')
+        this.inspect.customerName = customers[0]
+        for (let i = 0; i < this.customerList1.length; i++) {
+          // console.log(this.customerList1[i].customerName, this.customerList1[i])
+          if (this.customerList1[i].customerName == this.inspect.customerName) {
+            // console.log(this.customerList1[i])
+            this.inspect.customerNumberCard = this.customerList1[i].customerNumberCard
+          }
+        }
+        this.inspect.customerPhone = customers[1].split(')')[0]
+        if (this.inspect.goodsName && this.inspect.customerName) {
+          // //查看当前用户对应货名有未结算状态的送货
+          // let count = 0
+          // getCount({
+          //     compId: localStorage.getItem('ws-pf_compId'),
+          //     customerName: this.inspect.customerName,
+          //     goodsName: this.inspect.goodsName,
+          //     customerNumberCard: this.inspect.customerNumberCard
+          //   }).toPromise()
+          //   .then((response) => {
+          //     count = response
+          //   })
+          //   //  客户下拉校验
+          // getamount({
+          //   compId: localStorage.getItem('ws-pf_compId'),
+          //   customerName: this.inspect.customerName,
+          //   goodsName: this.inspect.goodsName,
+          //   customerNumberCard:this.inspect.customerNumberCard
+          // })
+          //   .toPromise()
+          //   .then((response) => {
+          //     for (let i = 0; i < this.purchasePriceList.length; i++) {
+          //       if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+          //         if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0)&&this.tipFlag) {
+          //           this.tipFlag = false
+          //           this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+          //         }
+          //       }
+          //     }
+          //   })
+        }
+      },
+
+      waterContentChange(type) {
+        if (this.inspect.goodsName && type != 'water') {
+          if (this.inspect.goodsName.indexOf('潮粮') != -1) {
+            this.inspect.type = '潮粮'
+          } else {
+            this.inspect.type = '干粮'
+          }
+          if (!this.inspect.dryGrainPrice || this.inspect.dryGrainPrice == 0) {
+            getDryGrainPrice({
+                warehouseId: this.cangid,
+                goodsName: this.inspect.goodsName
+              })
+              .toPromise()
+              .then((response) => {
+                this.$set(this.inspect, 'dryGrainPrice', response)
+              })
+          }
+        //客户
+        getcustomer({
+            warehouseId: this.cangid,
+            goodsName:this.inspect.goodsName
+          })
+          .toPromise()
+          .then((response) => {
+            this.customerList1 = response
+            this.customerList = []
+            let customer = response
+            for (let i = 0; i < response.length; i++) {
+              if (response[i].supplier) {
+                customer = response[i].customerName + '(' + response[i].customerPhone + ')' + '-' + response[i]
+                  .supplier
+              } else {
+                customer = response[i].customerName + '(' + response[i].customerPhone + ')'
+              }
+              this.customerList.push({
+                valueKey: i,
+                value: customer,
+              })
+            }
+          })
+          for (var i = 0; i < this.purchasePriceList.length; i++) {
+            if (this.purchasePriceList[i].goodsName == this.inspect.goodsName) {
+              this.$set(this.inspect, 'buckleWeightRatio', this.purchasePriceList[i].deductWeight)
+              this.$set(this.inspect, 'paramType', this.purchasePriceList[i].paramType)
+
+            }
+          }
+        }
+        //潮粮单价改变事件
+        if (
+          this.inspect.goodsName &&
+          this.inspect.waterContent &&
+          this.inspect.grade
+        ) {
+          getinspectLookUnitPrice({
+              warehouseId: this.cangid,
+              goodsName: this.inspect.goodsName,
+              waterContent: this.inspect.waterContent,
+              grade: this.inspect.grade,
+            })
+            .toPromise()
+            .then((response) => {
+              if (this.inspect.paramType == '1') {
+                this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect
+                  .buckleMiscellaneous) / 100 * parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
+              } else {
+                if (this.inspect.type == '干粮') {
+                  if (response == 0) {
+                    getDryGrainPrice({
+                        warehouseId: this.cangid,
+                        goodsName: this.inspect.goodsName
+                      })
+                      .toPromise()
+                      .then((response) => {
+                        this.$set(this.inspect, 'dryGrainPrice', response)
+                      })
+                  } else {
+                    this.inspect.dryGrainPrice = response
+                  }
+                } else {
+                  this.inspect.tidalGrainPrice = response
+                }
+              }
+            })
+        }
+        if (this.inspect.goodsName && this.inspect.customerName) {
+          // //查看当前用户对应货名有未结算状态的送货
+          // let count = 0
+          // if (
+          //   this.inspect.goodsName &&
+          //   this.inspect.customerName
+          // ) {
+          //   getCount({
+          //       compId: localStorage.getItem('ws-pf_compId'),
+          //       customerName: this.inspect.customerName,
+          //       goodsName: this.inspect.goodsName,
+          //       customerNumberCard: this.inspect.customerNumberCard
+          //     }).toPromise()
+          //     .then((response) => {
+          //       count = response
+          //     })
+          //   // //  货名下拉校验
+          //   // getamount({
+          //   //   compId: localStorage.getItem('ws-pf_compId'),
+          //   //   customerName: this.inspect.customerName,
+          //   //   goodsName: this.inspect.goodsName,
+          //   //   customerNumberCard:this.inspect.customerNumberCard
+          //   // })
+          //   //   .toPromise()
+          //   //   .then((response) => {
+          //   //     for (let i = 0; i < this.purchasePriceList.length; i++) {
+          //   //       if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+          //   //         if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0 )&&this.tipFlag) {
+          //   //           this.tipFlag = false
+          //   //           this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+          //   //         }
+          //   //       }
+          //   //     }
+          //   //   })
+          // }
+        }
+      },
+
+      getList(ids) {
+        // 车型
+        getcartype({constId:'QUA1'}).toPromise()
+          .then((response) => {
+            this.cartypeList=response
+          })
+        // 货名
+        getinspectLookGoods({
+            warehouseId: this.cangid
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodNameList = []
+            this.goodNameList = response
+            this.purchasePriceList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        getshippinginfo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseName: this.warehouseName
+          }).toPromise()
+          .then((response) => {
+            this.carNumberList = response
+          })
+        // 仓位
+        getbinNumber({
+            id: this.cangid
+          })
+          .toPromise()
+          .then((response) => {
+            this.getbinNumberList = []
+            for (let i = 0; i < response.warehousePositionInfoList.length; i++) {
+              this.getbinNumberList.push({
+                value: response.warehousePositionInfoList[i].binNumber,
+              })
+            }
+          })
+        if (this.types != 1) {
+          //查看
+          getinspectLook({
+              id: ids
+            })
+            .toPromise()
+            .then((response) => {
+              this.inspect = response
+            })
+        }
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.el-dialog__header {
+    text-align: center !important;
+    padding: 10px 0 !important;
+    height: auto !important;
+  }
+
+  /deep/.el-dialog__title {
+    font-size: 24px !important;
+  }
+
+  .center {
+    background: #f6f7fc;
+  }
+
+  .ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    text-align: center;
+    background: #ffffff;
+    font-size: 14px;
+    color: #8890b1;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+    // overflow: auto!important;
+    height: 55px;
+  }
+
+  /deep/.el-textarea__inner {
+    width: 100%;
+  }
+
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    margin: 10px;
+  }
+
+  .titleup {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 15px;
+    background: #8890b1;
+    margin-right: 5px;
+  }
+
+  .substance {
+    background: #ffffff;
+    width: 100%;
+    border-radius: 4px;
+    margin: 0 auto;
+    padding-top: 20px;
+  }
+
+  /deep/.el-table .el-table__header .cell,
+  .el-table .el-table__body .cell {
+    text-align: center;
+  }
+
+  /deep/.el-table--enable-row-transition .el-table__body td {
+    text-align: center;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .titleup {
+    position: relative;
+  }
+
+  .titleup::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .but {
+    text-align: center;
+    // margin: 20px auto;
+  }
+</style>

+ 2209 - 0
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -0,0 +1,2209 @@
+<!--质检管理-->
+<template>
+  <div style='overflow-y:scroll;'>
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+        <el-button @click='warehousetypechange(1)' :type="serviceManagementType==1?'primary':''">贸易入库</el-button>
+        <el-button @click='warehousetypechange(3)' :type="serviceManagementType==3?'primary':''">收购入库</el-button>
+      </template>
+      <template slot="right">
+        <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
+          style="margin: 0 10px">
+          <ws-option v-for="item in warehouseList" :key="'cangku'+item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        <!-- <el-checkbox @change='checkchange' v-model="checked">默认</el-checkbox> -->
+      </template>
+    </BaseHeaderLayout>
+    <div style='margin:10px;'>
+      <el-row :gutter="20">
+        <el-col :span="8">
+          <el-button @click='statustypechange("初检")' :type="statusTypetext=='初检'?'primary':''">初检</el-button>
+          <el-button @click='statustypechange("复检")' :type="statusTypetext=='复检'?'primary':''">复检</el-button>
+          <el-button @click='statustypechange("确认")' :type="statusTypetext=='确认'?'primary':''">确认</el-button>
+        </el-col>
+        <el-col :span="8">
+          <div style='text-align:center;'>
+            <el-button @click='add' type="primary">新增</el-button>
+            <el-button @click='deletelist' type="danger">删除</el-button>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div style='text-align:right;'>
+            <el-button @click='record' type="primary">记录</el-button>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <el-row :gutter="20">
+      <el-col :span="18">
+        <div class="grid-content bg-purple">
+          <ws-form ref="deptBudgetList" :model="deptBudgetList">
+            <div style="margin: 0 auto">
+              <div class="title">
+                基本信息
+                <el-checkbox v-if="statusTypetext=='初检'" v-model="directselling">原箱直销 
+                  <el-tooltip class="item" effect="dark" content="集装箱入库不开箱直接销售" placement="top-start">
+                    <i class="el-icon-question"></i>
+                  </el-tooltip>
+                </el-checkbox>
+              </div>
+              <ws-info-table>
+                <ws-form-item v-if='serviceManagementType==1' label="任务编号" span="1" prop="inOutTaskNo">
+                  <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect" @change="contractNoChange">
+                    <el-option v-for="item in taskNolist" :key="'renwu'+item.inOutTaskNo" :label="item.inOutTaskNo" :value="item.inOutTaskNo" />
+                  </el-select>
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==3' label="业务编号" span="1" prop="qualityNo">
+                  <ws-input v-model="deptBudgetList.qualityNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+                </ws-form-item>
+                <ws-form-item label="仓位号" span="1" prop="inOutTaskNo">
+                  <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.binNumber" placeholder="请选择仓位号" class="typeselect" @change="binNumberChange">
+                    <el-option v-for="item in positionInfos" :key="item.id" :label="item.binNumber" :value="item.binNumber" />
+                  </el-select>
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==1' label="业务编号" span="1" prop="qualityNo">
+                  <ws-input v-model="deptBudgetList.qualityNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==3' label="客户" span="1" prop="customerName">
+                  <el-select v-model="deptBudgetList.customerName" clearable filterable placeholder="请选择" class="typeselect"
+                    @change="customerChange" :disabled="disabled1">
+                    <el-option v-for="item in customerList" :key="'kehu'+item.valueKey" :label="item.value" :value="item.value" />
+                  </el-select>
+                </ws-form-item>
+                <ws-form-item label="囤位号" span="1" prop="storageTagNo">
+                  <ws-input :disabled='recheck' v-model="deptBudgetList.storageTagNo" placeholder="选填,1-10个字符" maxlength="10" size="small" />
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==3' label="购粮性质" span="1" prop="natureOfGrainPurchase">
+                  <ws-input v-model="deptBudgetList.natureOfGrainPurchase" placeholder="请输入购粮性质" maxlength="10" size="small"
+                    :disabled="disabled" />
+                </ws-form-item>
+                <ws-form-item v-if='deptBudgetList.outType=="移库入库"&&serviceManagementType==1' label="移库编号" span="1" prop="contractNo">
+                  <ws-input v-model="deptBudgetList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+                </ws-form-item>
+                <ws-form-item v-if='deptBudgetList.outType!="移库入库"&&serviceManagementType==1' label="合同编号" span="1" prop="contractNo">
+                  <ws-input v-model="deptBudgetList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==1' label="成本(元/吨)" span="1" prop="cost">
+                  <ws-input v-model="deptBudgetList.cost" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==1' label="提示" span="1" prop="tips">
+                  <ws-input v-model="deptBudgetList.tips" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+                </ws-form-item>
+                <ws-form-item v-if='statusTypetext!="复检"&&serviceManagementType==1' label="扣款" span="1" prop="deductionAmount">
+                  <ws-input  @input="kkInput(deptBudgetList.deductionAmount)" v-model="deptBudgetList.deductionAmount" placeholder="选填,1-10个字符" maxlength="10" size="small" />
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==1' label="货名" span="1" prop="inOutTaskNo">
+                  <ws-input v-model="deptBudgetList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==3' label="货名" span="1" prop="inOutTaskNo">
+                  <el-select v-model="deptBudgetList.goodsName" clearable filterable placeholder="请选择" class="typeselect"
+                    @change="goodsNameChange" :disabled="goodsdisabled">
+                    <el-option v-for="item in goodnameList" :key="'huoming'+item.valueKey" :label="item.goodsName" :value="item.goodsName" />
+                  </el-select>
+                </ws-form-item>
+                <ws-form-item v-if='statusTypetext!="初检"&&serviceManagementType==1' label="经办人" span="1" prop="agent">
+                  <ws-input v-model="deptBudgetList.agent" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+                </ws-form-item>
+                <ws-form-item label="净重单价(元/公斤)" span="1" prop="tidalGrainPrice" v-if="deptBudgetList.type == '潮粮' && serviceManagementType == 3">
+                  <ws-input type="number" @mousewheel.native.prevent v-model="deptBudgetList.tidalGrainPrice" placeholder="请输入净重单价"
+                    maxlength="10" size="small"  />
+                </ws-form-item>
+                <ws-form-item label="干粮单价(元/公斤)" span="2" prop="dryGrainPrice" v-if="deptBudgetList.type == '干粮' && serviceManagementType == 3">
+                  <ws-input type="number" @mousewheel.native.prevent v-model="deptBudgetList.dryGrainPrice" placeholder="请输入干粮单价"
+                    maxlength="10" size="small"  />
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==3' label="类型" span="1" prop="type">
+                  <ws-select v-model="deptBudgetList.type" disabled>
+                    <ws-option v-for="item in typeList" :key="'leixin'+item" :label="item" :value="item" />
+                  </ws-select>
+                </ws-form-item>
+                <ws-form-item v-if='statusTypetext=="初检"&&serviceManagementType==1' label="运费(元/吨)" span="1" prop="freight">
+                  <ws-input :disabled="disabledfright" v-model="deptBudgetList.freight" placeholder="请输入运费" size="small" type="number" @mousewheel.native.prevent />
+                  <img width="17" height="18" style="
+                      vertical-align: text-top;
+                      position: relative;
+                      top: -1px;
+                    " src="../../../public/img/edit.png" @click="editClick(2)" alt="" />
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==1' label="入库类型" span="1">
+                  <ws-select v-model="deptBudgetList.inOutType" placeholder class="typeselect" @change="selectstorageType" :disabled="isSelectType">
+                    <ws-option v-for="item in storageType" :key="'rklx'+item.constKey" :label="item.constValue" :value="item.constValue" />
+                  </ws-select>
+                </ws-form-item>
+                <ws-form-item v-if='serviceManagementType==1' label="入库日期" span="1" prop="inOutDate" class="deliverydate">
+                  <el-date-picker :disabled='recheck' v-model="deptBudgetList.inOutDate" placeholder="请选择入库日期" type="date" value-format="yyyy-MM-dd"></el-date-picker>
+                </ws-form-item>
+                <ws-form-item label="运输方式" span="1" prop="outType">
+                  <el-select v-if='serviceManagementType==1' :disabled='recheck' v-model="deptBudgetList.outType" placeholder="请选择运输方式">
+                    <el-option v-for="item in multiSelector" :key="'ysfs'+item.value" :label="item.name" :value="item.name" />
+                  </el-select>
+                  <el-select v-if='serviceManagementType==3' @change='outTypechange' :disabled='recheck' v-model="outType" placeholder="请选择运输方式">
+                    <el-option v-for="item in multiSelector1" :key="item.id" :label="item.type+'('+item.contractNo+' '+item.seller+')'" :value="item.id" />
+                    <el-option  key="tayun1" label="他运" value="他运" />
+                  </el-select>
+                </ws-form-item>
+                <ws-form-item  v-if='serviceManagementType==1||serviceManagementType==3&&deptBudgetList.outType=="自运"' label="车队" span="1" prop="fleetName">
+                  <el-select  :disabled='recheck' v-model="deptBudgetList.fleet" placeholder="非车队车辆">
+                    <el-option v-for="item in fleetNameList" :key="item.value" :label="item.fleetName" :value="item.fleetName" />
+                  </el-select>
+                </ws-form-item>
+                <ws-form-item label="车牌号" span="1" prop="carNo">
+                  <ws-input :disabled="disabled2" v-if="options2.length == 0 || serviceManagementType==3" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
+                  size="small" />
+                <el-select :disabled="disabled2" v-if="carstatus && options2.length > 0 && serviceManagementType!=3" filterable clearable v-model="deptBudgetList.carNoCopy" placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="(item,index) in options2" :key="index"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="index" />
+                </el-select>
+                <el-select :disabled="disabled2" v-if="!carstatus && options2.length > 0" filterable clearable :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey" :label="item.carNo" :value="item.carNo" />
+                </el-select>
+                  <!-- <el-select @change='carchange' v-if="statusTypetext=='初检'&&editcar==false&&carstatus||statusTypetext=='确认'&&editcar==false&&carstatus" v-model="deptBudgetList.carNo" placeholder="请选择车牌号">
+                    <el-option v-for="(item,index) in options2" :key="item.value" :label="item.carNo + '(' + item.tranCarNo + ')'" :value="index"  />
+                  </el-select>
+                  <el-select @change='carchange' v-if="statusTypetext=='初检'&&editcar==false&&!carstatus||statusTypetext=='确认'&&editcar==false&&!carstatus" v-model="deptBudgetList.carNo" placeholder="请选择车牌号">
+                    <el-option v-for="(item,index) in options2" :key="item.value" :label="item.carNo" :value="index"  />
+                  </el-select>
+                  <ws-input v-if="statusTypetext=='复检'||editcar" :disabled="disabled2" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" size="small" type="number" @mousewheel.native.prevent />
+                  <img v-if="statusTypetext=='初检'||statusTypetext=='确认'" width="17" height="18" style="
+                      vertical-align: text-top;
+                      position: relative;
+                      top: -1px;
+                    " src="../../../public/img/edit.png" @click="editClick(3)" alt="" /> -->
+                </ws-form-item>
+                <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="deptBudgetList.outType == '汽运' ||deptBudgetList.outType == '集装箱船'||serviceManagementType==3">
+                  <ws-input  :disabled='recheck' v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+                </ws-form-item>
+                <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="deptBudgetList.outType == '汽运' ||deptBudgetList.outType == '集装箱船'||serviceManagementType==3">
+                  <ws-input  :disabled='recheck' v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
+                </ws-form-item>
+                <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="deptBudgetList.outType == '汽运' ||deptBudgetList.outType == '集装箱船'||serviceManagementType==3">
+                  <ws-input :disabled='recheck' v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
+                </ws-form-item>
+                <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="deptBudgetList.outType == '汽运' ||deptBudgetList.outType == '集装箱船'||serviceManagementType==3">
+                  <ws-input :disabled='recheck' v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
+                </ws-form-item>
+              </ws-info-table>
+
+              <div class="title">质检数据</div>
+              <ws-info-table>
+                <ws-form-item label="等级" span="1" prop="outType">
+                  <ws-select v-if='statusTypetext!="复检"' v-model="deptBudgetList.grade" placeholder class="typeselect" @change="selectpackingMethod">
+                    <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                  </ws-select>
+                  <ws-select v-if='statusTypetext!="初检"' v-model="deptBudgetList.reGrade" placeholder class="typeselect" @change="reselectpackingMethod">
+                    <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                  </ws-select>
+                </ws-form-item>
+                <ws-form-item label="水分(%)" span="1" prop="waterContent">
+                  <ws-input @change="waterContentChange('water')" v-if='statusTypetext!="复检"' v-model="deptBudgetList.waterContent" type="number"
+                    @mousewheel.native.prevent placeholder="请输入水分占比" maxlength="40" size="small" />
+                    <ws-input  :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reWaterContent" type="number"
+                    @mousewheel.native.prevent placeholder="请输入水分占比" maxlength="40" size="small" />
+                </ws-form-item>
+                <!--杂质(%)<=-->
+                <ws-form-item label="杂质(%)" span="1" prop="impurity">
+                  <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.impurity" type="number" @mousewheel.native.prevent
+                    placeholder="请输入杂质占比" maxlength="40" size="small" />
+                  <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reImpurity" type="number" @mousewheel.native.prevent
+                    placeholder="请输入杂质占比" maxlength="40" size="small" />
+                </ws-form-item>
+                <!--容重(克/升)-->
+                <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+                  <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.bulkDensity" type="number" @mousewheel.native.prevent
+                    placeholder="请输入容重" maxlength="40" size="small" />
+                  <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reBulkDensity" type="number" @mousewheel.native.prevent
+                    placeholder="请输入容重" maxlength="40" size="small" />
+                </ws-form-item>
+                <!--霉变粒(%)<=-->
+                <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+                  <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.mildewGrain" type="number" @mousewheel.native.prevent
+                    placeholder="请输入霉变粒占比" maxlength="40" size="small" />
+                  <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reMildewGrain" type="number" @mousewheel.native.prevent
+                    placeholder="请输入霉变粒占比" maxlength="40" size="small" />
+                </ws-form-item>
+                <!--热损伤(%)<=-->
+                <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+                  <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.jiaorenli" type="number" @mousewheel.native.prevent
+                    placeholder="请输入热损伤占比" maxlength="40" size="small" />
+                  <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reJiaorenli" type="number" @mousewheel.native.prevent
+                    placeholder="请输入热损伤占比" maxlength="40" size="small" />
+                </ws-form-item>
+                <!--不完善粒(%)<=-->
+                <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
+                  <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.imperfectGrain" type="number"
+                    @mousewheel.native.prevent placeholder="请输入不完善粒占比" maxlength="40" size="small" />
+                  <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reImperfectGrain" type="number"
+                    @mousewheel.native.prevent placeholder="请输入不完善粒占比" maxlength="40" size="small" />
+                </ws-form-item>
+              </ws-info-table>
+              <ws-info-table>
+                  <el-form-item  class='rememo' v-if='statusTypetext!="初检"' label="复检" span="1" prop="imperfectGrain">
+                  <ws-input 
+                    v-model="deptBudgetList.reMemo"
+                    type="textarea"
+                    row="3"
+                    placeholder="请输入备注信息,不超过200字"
+                    maxlength="200"
+                  />
+                </el-form-item> 
+              </ws-info-table>
+                
+            </div>
+          </ws-form>
+        </div>
+      </el-col>
+      <el-col :span="6">
+        <div class="grid-content bg-purple">
+          <el-button v-if='statusTypetext=="复检"' @click='statustypechangelist(1)' :type="statusType==1?'primary':''">未复检</el-button>
+          <el-button v-if='statusTypetext=="复检"' @click='statustypechangelist(2)' :type="statusType==2?'primary':''">已复检</el-button>
+          <el-table @cell-click='listclick' :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border>
+            <el-table-column prop="qualityNo" width="100" label="业务编号"></el-table-column>
+            <el-table-column prop="carNumber" label="车牌号"></el-table-column>
+            <el-table-column prop="status" label="状态">
+              <template slot-scope="scope">
+                <span v-if='scope.row.confirm=="1"'>
+                  已确认
+                </span>
+                <span v-else>
+                  {{scope.row.status}}
+                </span>
+              </template>
+            </el-table-column>
+          </el-table>
+         
+        </div>
+      </el-col>
+    </el-row>
+    <div class="but">
+      <div style='text-align:right;'>
+        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+          :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+          :total="deptBudgetTotal">
+          </el-pagination>
+      </div>
+      
+        <el-button @click="submit" type="primary">提交</el-button>
+    </div>
+    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单" @opened='opendBtn' @close="closeDialog"
+      :close-on-click-modal="false">
+      <inspectInfoPrint :printData="deptBudgetList" ref="saveImg"></inspectInfoPrint>
+      <div style="text-align:center">
+        <el-button type="primary" @click="closePrint">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    selectWarehouseSelf,
+    getinspectList,
+    getinspectDelete,
+    getinspectLook,
+    getQRcode,
+    inspectAdd,
+    getinspectEdit,
+    getinspectcontractno,
+    getinspectLookUnitPrice,
+    getcustomer,
+    getDryGrainPrice,
+    getinspectLookGoods,
+  } from '@/model/houseSelfCollect/index'
+  import {
+    pullDown,
+    addstorageputList,
+    xialaNo,
+    getstaff,
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
+  import inspectInfoPrint from './component/inspectInfoPrint.vue'
+    import html2canvas from 'html2canvas'
+    import axios from 'axios'
+  export default {
+    components: {
+      inspectInfoPrint
+    },
+    watch: {},
+    data() {
+      return {
+        //分页
+        currentPage: 1,
+        cost:'',
+        pageSize: 10,
+        isShowPrint:false,
+        typeList: ['干粮', '潮粮'],
+        disablednotarize:false,
+        goodsdisabled:false,
+        deptBudgetList:{
+          type: '潮粮',
+          freight: 0,
+          cost: '',
+          addressUrl: '',
+          tidalGrainPrice: 0,
+          buckleWeightRatio: 0,
+          natureOfGrainPurchase: '贸易粮',
+          buckleMiscellaneous: 0,
+          paramType: 1,
+          warehouseInOutDetail: {
+            grade:'',
+            reGrade:'',
+            imperfectGrain:'',
+            reImperfectGrain:'',
+            impurity:'',
+            reImpurity:'',
+            jiaorenli:'',
+            reJiaorenli:'',
+            bulkDensity:'',
+            reBulkDensity:'',
+            mildewGrain:'',
+            reMildewGrain:'',
+          },
+          
+          deductionAmount: 0,
+          deductionWeight: 0,
+          grossWeight: 0,
+          tare: 0,
+          grade:'',
+          inOutDate: '',
+          netWeight:0,
+          pureWeight:0,
+          deductionWeight:0,
+          waterContent:'',
+          reWaterContent:'',
+          reGrade:'',
+          imperfectGrain:'',
+          reImperfectGrain:'',
+          impurity:'',
+          reImpurity:'',
+          jiaorenli:'',
+          reJiaorenli:'',
+          bulkDensity:'',
+          reBulkDensity:'',
+          reMemo:'',
+          storageTagNo:'',
+          mildewGrain:'',
+          reMildewGrain:'',
+          boxNo:'',
+          boxNoOther:'',
+          titleNo:'',
+          titleNoOther:'',
+        },
+        taskNolist:[],
+        outType:'',
+        purchasePriceList:[],
+        disabled:false,
+        goodnameList:[],
+        disabled2:false,
+        disabled1:false,
+        disabledfright:true,
+        recheck:false,
+        storageType:[],
+        multiSelector1:[],
+        isSelectType:false,
+        warehouseName:'',
+        warehouseCount:'',
+        warehouseNo: '',
+        cangid:'',
+        allowEdit:'0',
+        inspect:[],
+        // checked:false,
+        searchType: 0,
+        id:'',
+        warehouseList:[],
+        warehouseList1:[],
+        serviceManagementType:1,
+        statusType:0,
+        positionInfos:[],
+        statusTypetext:'初检',
+        directselling:false,
+        fleetNameList:[],
+        outContractNo:[],
+        options1:[],
+        editcar:false,
+        isGetCost:'',
+        disabled1:false,
+        carstatus:false,
+        options2:[],
+        tranCarInfoList:[],
+        gradeList:[],
+        deptBudgetTotal:0,
+        customerList:[],
+        customerList1:[],
+        multiSelector: [{
+            name: '汽运',
+            value: '0',
+          },
+          {
+            name: '火运',
+            value: '1',
+          },
+          {
+            name: '集装箱船',
+            value: '2',
+          },
+          {
+            name: '散船',
+            value: '3',
+          },
+        ],
+        // searchKeyWord:''
+      }
+    },
+    activated(){
+       this.selectWarehouse()
+       var _saomaData = JSON.parse(localStorage.getItem("saoma_data"))
+       if(_saomaData){//缓存中有值,证明扫码进来的
+         this.warehouseName = _saomaData.warehouseName
+         this.warehouseNameChange(this.warehouseName)
+          let ids={}
+         ids.id = _saomaData.id
+         this.listclick(ids)
+          if(_saomaData.type == 1){
+         this.statusTypetext = "初检"
+       }else if(_saomaData.type == 2){
+         this.statusTypetext = "确认"
+       }else if(_saomaData.type == 3){
+         this.statusTypetext = "复检"
+       }
+       this.serviceManagementType = _saomaData.managementType
+         localStorage.removeItem("saoma_data");//第一次进来结束后清除缓存
+       }else{
+          let _WarehouseName = localStorage.getItem('houseSelfCollect_house1')
+          _WarehouseName = JSON.parse(_WarehouseName)
+          if (_WarehouseName) {
+            this.warehouseNameChange(_WarehouseName.value)
+          }
+       }
+    },
+    
+    methods: {
+      binNumberChange(e){
+        for (let i = 0; i < this.positionInfos.length; i++) {
+          if(this.positionInfos[i].binNumber==e){
+            this.deptBudgetList.positionId=this.positionInfos[i].id
+          }
+          
+        }
+      },
+      goodsNameChange(e){
+        for (let q = 0; q < this.goodnameList.length; q++) {
+            if(this.goodnameList[q].contractNo=e){
+              this.deptBudgetList.goodsName=this.goodnameList[q].goodsName
+              this.deptBudgetList.goodsNameKey=this.goodnameList[q].goodsNameKey
+            } 
+          }
+          this.waterContentChange()
+      },
+      outTypechange(e){
+        // console.log(e)
+        if(e!='他运'){
+          for (let i = 0; i < this.multiSelector1.length; i++) {
+            this.deptBudgetList.contractNo=this.multiSelector1[i].contractNo
+            
+          }
+          for (let q = 0; q < this.outContractNo.length; q++) {
+            if(this.outContractNo[q].contractNo=this.deptBudgetList.contractNo){
+              this.deptBudgetList.goodsName=this.outContractNo[q].goodsName
+              this.deptBudgetList.goodsNameKey=this.outContractNo[q].goodsNameKey
+            } 
+          }
+          this.deptBudgetList.outType='自运'
+          this.goodsdisabled=true
+          this.waterContentChange()
+        }else{
+          this.deptBudgetList.outType='他运'
+          this.goodsdisabled=false
+        }
+      },
+       printSmall() {
+        window.open('../../../static/inspectionnew.html?type=1&dataList=' + JSON.stringify(this.deptBudgetList))
+      },
+      printBig() {
+        window.open('../../../static/inspectionnew.html?type=2&dataList=' + JSON.stringify(this.deptBudgetList))
+      },
+      record(){
+        this.$router.push({path: 'inspectionManagementrecord' })
+      },
+      carChange(e) {
+        this.$set(this.deptBudgetList, 'customerName', this.carNumberList[e].shipperName)
+        this.$set(this.deptBudgetList, 'customerPhone', this.carNumberList[e].shipperPhone)
+        for (let i = 0; i < this.customerList1.length; i++) {
+          if (this.customerList1[i].customerName == this.deptBudgetList.customerName) {
+            this.deptBudgetList.customerNumberCard = this.customerList1[i].customerNumberCard
+          }
+        }
+        for (let i = 0; i < this.tranCarInfoList.length; i++) {
+          if (i==e) {
+            this.deptBudgetList.carNo =  this.tranCarInfoList[i].carNo
+             this.deptBudgetList.carNoCopy =  this.tranCarInfoList[i].carNo + '(' + this.tranCarInfoList[i].tranCarNo + ')'
+            this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
+            this.deptBudgetList.carId = this.tranCarInfoList[i].id
+            this.deptBudgetList.freight = Math.round(
+              this.tranCarInfoList[i].tranPrice
+            )
+            if (this.deptBudgetList.inOutType == '移库入库') {
+              if (!this.deptBudgetList.cost) {
+                this.deptBudgetList.cost = this.tranCarInfoList[i].cost
+              }
+              this.deptBudgetList.loadNetWeight =
+                this.tranCarInfoList[i].loadNetWeight
+            }
+          }
+        }
+      },
+      customerChange(e) {
+        let customers = e.split('(')
+        this.deptBudgetList.customerName = customers[0]
+        for (let i = 0; i < this.customerList1.length; i++) {
+          // console.log(this.customerList1[i].customerName, this.customerList1[i])
+          if (this.customerList1[i].customerName == this.deptBudgetList.customerName) {
+            // console.log(this.customerList1[i])
+            this.deptBudgetList.customerNumberCard = this.customerList1[i].customerNumberCard
+          }
+        }
+        this.deptBudgetList.customerPhone = customers[1].split(')')[0]
+      },
+      waterContentChange(type) {
+        if (this.deptBudgetList.goodsName && type != 'water') {
+          if (this.deptBudgetList.goodsName.indexOf('潮粮') != -1) {
+            this.deptBudgetList.type = '潮粮'
+          } else {
+            this.deptBudgetList.type = '干粮'
+          }
+          if (!this.deptBudgetList.dryGrainPrice || this.deptBudgetList.dryGrainPrice == 0) {
+            getDryGrainPrice({
+                warehouseId: this.cangid,
+                goodsName: this.deptBudgetList.goodsName
+              })
+              .toPromise()
+              .then((response) => {
+                this.$set(this.deptBudgetList, 'dryGrainPrice', response)
+              })
+          }
+        //客户
+        getcustomer({
+            warehouseId: this.cangid,
+            goodsName:this.deptBudgetList.goodsName
+          })
+          .toPromise()
+          .then((response) => {
+            this.customerList1 = response
+            this.customerList = []
+            let customer = response
+            for (let i = 0; i < response.length; i++) {
+              if (response[i].supplier) {
+                customer = response[i].customerName + '(' + response[i].customerPhone + ')' + '-' + response[i]
+                  .supplier
+              } else {
+                customer = response[i].customerName + '(' + response[i].customerPhone + ')'
+              }
+              this.customerList.push({
+                valueKey: i,
+                value: customer,
+              })
+            }
+          })
+          for (var i = 0; i < this.purchasePriceList.length; i++) {
+            if (this.purchasePriceList[i].goodsName == this.deptBudgetList.goodsName) {
+              this.$set(this.deptBudgetList, 'buckleWeightRatio', this.purchasePriceList[i].deductWeight)
+              this.$set(this.deptBudgetList, 'paramType', this.purchasePriceList[i].paramType)
+
+            }
+          }
+        }
+        //潮粮单价改变事件
+        if (
+          this.deptBudgetList.goodsName &&
+          this.deptBudgetList.waterContent &&
+          this.deptBudgetList.grade
+        ) {
+          getinspectLookUnitPrice({
+              warehouseId: this.cangid,
+              goodsName: this.deptBudgetList.goodsName,
+              waterContent: this.deptBudgetList.waterContent,
+              grade: this.deptBudgetList.grade,
+            })
+            .toPromise()
+            .then((response) => {
+              if (this.deptBudgetList.paramType == '1') {
+                this.deptBudgetList.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.deptBudgetList
+                  .buckleMiscellaneous) / 100 * parseFloat(this.deptBudgetList.dryGrainPrice?this.deptBudgetList.dryGrainPrice:0 )).toFixed(4)
+              } else {
+                if (this.inspect.type == '干粮') {
+                  if (response == 0) {
+                    getDryGrainPrice({
+                        warehouseId: this.cangid,
+                        goodsName: this.deptBudgetList.goodsName
+                      })
+                      .toPromise()
+                      .then((response) => {
+                        this.$set(this.deptBudgetList, 'dryGrainPrice', response)
+                      })
+                  } else {
+                    this.deptBudgetList.dryGrainPrice = response
+                  }
+                } else {
+                  this.deptBudgetList.tidalGrainPrice = response
+                }
+              }
+            })
+        }
+        if (this.deptBudgetList.goodsName && this.deptBudgetList.customerName) {
+        }
+      },
+       opendBtn(){
+           html2canvas(this.$refs.saveImg.$el).then(canvas => {
+          let dataURL = canvas.toDataURL('image/png');
+          this.imgUrl = dataURL;
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImg')
+            let formdata = new FormData();
+            formdata.append('file', b);
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata
+            }).then((response) => {
+              //编辑接口
+              this.deptBudgetList.pictureAddress = response.data.url
+              console.log(this.types)
+              if (this.types == 3) {
+                this.deptBudgetList.flag = 0
+              } else if (this.types == 4) {
+                this.deptBudgetList.flag = 1
+              }
+              getinspectEdit(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  // this.inspect = [] 
+              
+                })
+            })
+          }
+        })
+      },
+      closeDialog() {
+        html2canvas(this.$refs.saveImg.$el).then(canvas => {
+          let dataURL = canvas.toDataURL('image/png');
+          this.imgUrl = dataURL;
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImg')
+            let formdata = new FormData();
+            formdata.append('file', b);
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata
+            }).then((response) => {
+              //编辑接口
+              this.deptBudgetList.pictureAddress = response.data.url
+              console.log(this.types)
+              if (this.types == 3) {
+                this.deptBudgetList.flag = 0
+              } else if (this.types == 4) {
+                this.deptBudgetList.flag = 1
+              }
+              getinspectEdit(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  // this.inspect = [] 
+                  this.isShowPrint = false
+                  this.deptBudgetList={
+                    type: '潮粮',
+                    freight: 0,
+                    cost: '',
+                    addressUrl: '',
+                    tidalGrainPrice: 0,
+                    buckleWeightRatio: 0,
+                    natureOfGrainPurchase: '贸易粮',
+                    buckleMiscellaneous: 0,
+                    paramType: 1,
+                    warehouseInOutDetail: {
+                      grade:'',
+                      reGrade:'',
+                      imperfectGrain:'',
+                      reImperfectGrain:'',
+                      impurity:'',
+                      reImpurity:'',
+                      jiaorenli:'',
+                      reJiaorenli:'',
+                      bulkDensity:'',
+                      reBulkDensity:'',
+                      mildewGrain:'',
+                      reMildewGrain:'',
+                    },
+                    disablednotarize:false,
+                    deductionAmount: 0,
+                    deductionWeight: 0,
+                    grossWeight: 0,
+                    tare: 0,
+                    grade:'',
+                    inOutDate: '',
+                    netWeight:0,
+                    pureWeight:0,
+                    deductionWeight:0,
+                    waterContent:'',
+                    reWaterContent:'',
+                    reGrade:'',
+                    imperfectGrain:'',
+                    reImperfectGrain:'',
+                    impurity:'',
+                    reImpurity:'',
+                    jiaorenli:'',
+                    reJiaorenli:'',
+                    bulkDensity:'',
+                    reBulkDensity:'',
+                    reMemo:'',
+                    storageTagNo:'',
+                    mildewGrain:'',
+                    reMildewGrain:'',
+                    boxNo:'',
+                    boxNoOther:'',
+                    titleNo:'',
+                    titleNoOther:'',
+                  }
+                })
+            })
+            this.dialogTableVisible = true;
+          }
+        })
+
+      },
+      deletelist(){
+        if(this.id){
+          getinspectDelete({
+              id: this.id
+            })
+            .toPromise()
+            .then((response) => {
+              this.$message({
+                message: '删除成功!',
+                type: 'success',
+              })
+              this.deptBudgetList={
+                type: '潮粮',
+                freight: 0,
+                cost: '',
+                addressUrl: '',
+                tidalGrainPrice: 0,
+                buckleWeightRatio: 0,
+                natureOfGrainPurchase: '贸易粮',
+                buckleMiscellaneous: 0,
+                paramType: 1,
+                warehouseInOutDetail: {
+                  grade:'',
+                  reGrade:'',
+                  imperfectGrain:'',
+                  reImperfectGrain:'',
+                  impurity:'',
+                  reImpurity:'',
+                  jiaorenli:'',
+                  reJiaorenli:'',
+                  bulkDensity:'',
+                  reBulkDensity:'',
+                  mildewGrain:'',
+                  reMildewGrain:'',
+                },
+                disablednotarize:false,
+                deductionAmount: 0,
+                deductionWeight: 0,
+                grossWeight: 0,
+                tare: 0,
+                grade:'',
+                inOutDate: '',
+                netWeight:0,
+                pureWeight:0,
+                deductionWeight:0,
+                waterContent:'',
+                reWaterContent:'',
+                reGrade:'',
+                imperfectGrain:'',
+                reImperfectGrain:'',
+                impurity:'',
+                reImpurity:'',
+                jiaorenli:'',
+                reJiaorenli:'',
+                bulkDensity:'',
+                reBulkDensity:'',
+                reMemo:'',
+                storageTagNo:'',
+                mildewGrain:'',
+                reMildewGrain:'',
+                boxNo:'',
+                boxNoOther:'',
+                titleNo:'',
+                titleNoOther:'',
+              }
+              this.getList()
+            })
+        }
+      },
+      listclick(row){
+        this.id=row.id
+        getinspectLook({
+              id: row.id
+            })
+            .toPromise()
+            .then((response) => {
+              console.log(response)
+              this.deptBudgetList=response
+              this.deptBudgetList.warehouseInOutDetail={
+                grade:response.grade,
+                reGrade:response.reGrade,
+                imperfectGrain:response.imperfectGrain,
+                reImperfectGrain:response.reImperfectGrain,
+                impurity:response.impurity,
+                reImpurity:response.reImpurity,
+                jiaorenli:response.jiaorenli,
+                reJiaorenli:response.reJiaorenli,
+                bulkDensity:response.bulkDensity,
+                reBulkDensity:response.reBulkDensity,
+                mildewGrain:response.mildewGrain,
+                reMildewGrain:response.reMildewGrain,
+              }
+              this.deptBudgetList.carNo=response.carNumber
+               for (let i = 0; i < this.taskNolist.length; i++) {
+                if (this.taskNolist[i].inOutTaskNo == this.deptBudgetList.inOutTaskNo) {
+                  console.log(this.taskNolist[i])
+                  var data = this.taskNolist[i]
+                }
+              }
+              if (!data) return
+            for (var i = 0; i < this.outContractNo.length; i++) {
+              if (
+                this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
+              ) {
+                console.log(this.outContractNo[i])
+                if (this.outContractNo[i].inOutType == '采购入库') {
+                  if (!this.outContractNo[i].unitContractPrice) {
+                    this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller
+                  } else {
+                    this.deptBudgetList.tips ='卖方' +this.outContractNo[i].seller +'( ' + this.outContractNo[i].unitContractPrice +'元/吨)'
+                  }
+                } else if (this.outContractNo[i].inOutType == '移库入库') {
+                  if (this.outContractNo[i].unitContractPrice) {
+                    this.deptBudgetList.tips ='出货库' +data.sendWarehouse +' (' +this.outContractNo[i].unitContractPrice +'元/吨)'
+                  } else {
+                    this.deptBudgetList.tips = '出货库' + data.sendWarehouse
+                  }
+                } else if (this.outContractNo[i].inOutType == '移库出库') {
+                
+                  this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
+                }else if (this.outContractNo[i].inOutType == '退库') {
+                  if (this.outContractNo[i].contractNo) {
+                    this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
+                  } else {
+                    this.deptBudgetList.tips = '出货库' + data.sendWarehouse
+                  }
+                }
+                this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+                if (this.outContractNo[i].tranCarInfoList) {
+                  this.options2 = this.outContractNo[i].tranCarInfoList
+                  this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+                  // this.carstatus = true
+                }
+                this.fleetNameList=this.outContractNo[i].tranCarInfoList1
+              }
+            }
+             this.$forceUpdate()
+            })
+        // if(){
+          
+        // }
+        // this.deptBudgetList=row
+        // console.log(row)
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      add(){
+        this.outType=''
+        this.deptBudgetList={
+          type: '潮粮',
+          freight: 0,
+          cost: '',
+          addressUrl: '',
+          tidalGrainPrice: 0,
+          buckleWeightRatio: 0,
+          natureOfGrainPurchase: '贸易粮',
+          buckleMiscellaneous: 0,
+          paramType: 1,
+          warehouseInOutDetail: {
+            grade:'',
+            reGrade:'',
+            imperfectGrain:'',
+            reImperfectGrain:'',
+            impurity:'',
+            reImpurity:'',
+            jiaorenli:'',
+            reJiaorenli:'',
+            bulkDensity:'',
+            reBulkDensity:'',
+            mildewGrain:'',
+            reMildewGrain:'',
+          },
+          disablednotarize:false,
+          deductionAmount: 0,
+          deductionWeight: 0,
+          grossWeight: 0,
+          tare: 0,
+          grade:'',
+          inOutDate: '',
+          netWeight:0,
+          pureWeight:0,
+          deductionWeight:0,
+          waterContent:'',
+          reWaterContent:'',
+          reGrade:'',
+          imperfectGrain:'',
+          reImperfectGrain:'',
+          impurity:'',
+          reImpurity:'',
+          jiaorenli:'',
+          reJiaorenli:'',
+          bulkDensity:'',
+          reBulkDensity:'',
+          reMemo:'',
+          storageTagNo:'',
+          mildewGrain:'',
+          reMildewGrain:'',
+          boxNo:'',
+          boxNoOther:'',
+          titleNo:'',
+          titleNoOther:'',
+        }
+      },
+      statustypechangelist(status){
+        this.statusType=status
+        getinspectList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            warehouseName: this.warehouseName,
+            managementType: 1,
+            statusType:this.statusType,
+            serviceManagementType:this.serviceManagementType
+          })
+          .toPromise()
+          .then((response) => {
+            this.inspect = response.records
+            this.deptBudgetTotal = response.total
+            // this.$forceUpdate();
+          })
+      },
+      statustypechange(status){
+        this.statusTypetext=status
+        if(status=='初检'){
+          this.disabled2=false
+          this.deptBudgetList.statusType=1
+          this.recheck=false
+        }else if(status=='复检'){
+          this.deptBudgetList.statusType=1
+          this.recheck=true
+          this.disabled2=true
+          this.isSelectType=true
+        }else if(status=='确认'){
+          this.deptBudgetList.statusType=3
+          this.recheck=false
+          this.disablednotarize=true
+          this.disabled2=false
+        }
+      },
+      submit(){
+        if (this.reader) {
+          this.reader.cancel()
+        }
+        if (!this.deptBudgetList.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!String(this.deptBudgetList.deductionAmount)&&this.statusTypetext!='复检') {
+          this.$message({
+            message: '扣款不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!String(this.deptBudgetList.reDeductionAmount)&&this.statusTypetext=='复检') {
+          this.$message({
+            message: '复检扣款不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.deptBudgetList.deductionAmount < 0 ||
+        //   this.deptBudgetList.deductionAmount > 10000 ||
+        //   (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
+        //     String(this.deptBudgetList.deductionAmount).length -
+        //     (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
+        //     2)
+        // ) {
+        //   this.$message({
+        //     message: '扣款输入错误',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        console.log(this.serviceManagementType)
+        if(this.serviceManagementType==1){
+          if (!this.deptBudgetList.cost) {
+            this.$message({
+              message: '未获取到成本,请编辑后提交',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.cost < 0 ||
+            this.deptBudgetList.cost > 20000 ||
+            (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
+              String(this.deptBudgetList.cost).length -
+              (String(this.deptBudgetList.cost).indexOf('.') + 1) >
+              2)
+          ) {
+            this.$message({
+              message: '成本输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (!String(this.deptBudgetList.freight)) {
+            this.$message({
+              message: '运费不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.freight < 0 ||
+            this.deptBudgetList.freight > 100000 ||
+            (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
+              String(this.deptBudgetList.freight).length -
+              (String(this.deptBudgetList.freight).indexOf('.') + 1) >
+              2)
+          ) {
+            this.$message({
+              message: '运费输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (!this.deptBudgetList.inOutDate) {
+            this.$message({
+              message: '入库日期不能为空!',
+              type: 'warning',
+            })
+            return
+          }
+          if (!this.deptBudgetList.inOutType) {
+            this.$message({
+              message: '入库类型不能为空!',
+              type: 'warning',
+            })
+            return
+        }
+        }
+        this.deptBudgetList.warehouseInOutDetail.grade=this.deptBudgetList.grade
+        if (!this.deptBudgetList.grade) {
+          this.$message({
+            message: '等级不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        this.deptBudgetList.warehouseInOutDetail.reGrade=this.deptBudgetList.reGrade
+        if (!this.deptBudgetList.reGrade&&this.statusTypetext=='复检') {
+          this.$message({
+            message: '复检等级不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.carNo) {
+          this.$message({
+            message: '车牌号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.carNo.length > 7) {
+          this.$message({
+            message: '车牌号输入错误,请输入7个字符之内',
+            type: 'warning',
+          })
+          return
+        }
+        if(this.directselling){
+          if (!this.deptBudgetList.boxNo ) {
+            this.$message({
+              message: '箱号-1不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (!this.deptBudgetList.titleNo ) {
+            this.$message({
+              message: '封号-1不能为空',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if(this.deptBudgetList.boxNo&&!this.deptBudgetList.titleNo){
+          this.$message({
+              message: '封号-1不能为空',
+              type: 'warning',
+            })
+            return
+        }
+        if(this.deptBudgetList.boxNoOther&&!this.deptBudgetList.titleNoOther){
+          this.$message({
+              message: '封号-2不能为空',
+              type: 'warning',
+            })
+            return
+        }
+        if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.boxNoOther &&
+          this.deptBudgetList.boxNoOther.length > 20
+        ) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.titleNo &&
+          this.deptBudgetList.titleNo.length > 20
+        ) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.titleNoOther &&
+          this.deptBudgetList.titleNoOther.length > 20
+        ) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if(this.serviceManagementType==1||this.serviceManagementType==3&&this.deptBudgetList.outType=='自运'){
+          if (!this.deptBudgetList.contractNo) {
+            this.$message({
+              message: '合同编号不能为空',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        
+
+        // if (
+        //   this.deptBudgetList.contractNo.length < 6 ||
+        //   this.deptBudgetList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (!this.deptBudgetList.addressUrl) {
+        //   this.$message({
+        //     message: '附件不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        //自检员
+        this.deptBudgetList.warehouseInOutDetail.waterContent=this.deptBudgetList.waterContent
+        if (this.deptBudgetList.waterContent) {
+          if (isNaN(this.deptBudgetList.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.waterContent < 0 ||
+            this.deptBudgetList.waterContent > 40 ||
+            (String(this.deptBudgetList.waterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.waterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.waterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.deptBudgetList.warehouseInOutDetail.reWaterContent=this.deptBudgetList.reWaterContent
+        if (this.deptBudgetList.reWaterContent) {
+          if (isNaN(this.deptBudgetList.reWaterContent)) {
+            this.$message({
+              message: '复检水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.reWaterContent < 0 ||
+            this.deptBudgetList.reWaterContent > 40 ||
+            (String(this.deptBudgetList.reWaterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.reWaterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.reWaterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '复检水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //杂质
+        this.deptBudgetList.warehouseInOutDetail.impurity=this.deptBudgetList.impurity
+        if (this.deptBudgetList.impurity) {
+          if (isNaN(this.deptBudgetList.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.impurity < 0 ||
+            this.deptBudgetList.impurity > 40 ||
+            (String(this.deptBudgetList.impurity).indexOf( '.') != -1 &&
+              String(this.deptBudgetList.impurity).length -
+              (String(this.deptBudgetList.impurity).indexOf('.') +1) >2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.deptBudgetList.warehouseInOutDetail.reImpurity=this.deptBudgetList.reImpurity
+        if (this.deptBudgetList.reImpurity) {
+          if (isNaN(this.deptBudgetList.reImpurity)) {
+            this.$message({
+              message: '复检杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.reImpurity < 0 ||
+            this.deptBudgetList.reImpurity > 40 ||
+            (String(this.deptBudgetList.reImpurity).indexOf( '.') != -1 &&
+              String(this.deptBudgetList.reImpurity).length -
+              (String(this.deptBudgetList.reImpurity).indexOf('.') +1) >2)
+          ) {
+            this.$message({
+              message: '复检杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //霉变
+        this.deptBudgetList.warehouseInOutDetail.mildewGrain=this.deptBudgetList.mildewGrain
+        if (this.deptBudgetList.mildewGrain) {
+          if (isNaN(this.deptBudgetList.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.mildewGrain < 0 ||
+            this.deptBudgetList.mildewGrain > 40 ||
+            (String(this.deptBudgetList.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.mildewGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.mildewGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.deptBudgetList.warehouseInOutDetail.reMildewGrain=this.deptBudgetList.reMildewGrain
+        if (this.deptBudgetList.reMildewGrain) {
+          if (isNaN(this.deptBudgetList.reMildewGrain)) {
+            this.$message({
+              message: '复检霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.reMildewGrain < 0 ||
+            this.deptBudgetList.reMildewGrain > 40 ||
+            (String(this.deptBudgetList.reMildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.reMildewGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.reMildewGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '复检霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.deptBudgetList.warehouseInOutDetail.jiaorenli=this.deptBudgetList.jiaorenli
+        //热损伤
+        if (this.deptBudgetList.jiaorenli) {
+          if (isNaN(this.deptBudgetList.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.jiaorenli < 0 ||
+            this.deptBudgetList.jiaorenli > 40 ||
+            (String(this.deptBudgetList.jiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.jiaorenli).length -
+              (String(
+                  this.deptBudgetList.jiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.deptBudgetList.warehouseInOutDetail.reJiaorenli=this.deptBudgetList.reJiaorenli
+        if (this.deptBudgetList.reJiaorenli) {
+          if (isNaN(this.deptBudgetList.reJiaorenli)) {
+            this.$message({
+              message: '复检热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.reJiaorenli < 0 ||
+            this.deptBudgetList.reJiaorenli > 40 ||
+            (String(this.deptBudgetList.reJiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.reJiaorenli).length -
+              (String(
+                  this.deptBudgetList.reJiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '复检热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.deptBudgetList.warehouseInOutDetail.imperfectGrain=this.deptBudgetList.imperfectGrain
+        //不完善粒(%)
+        if (this.deptBudgetList.imperfectGrain) {
+          if (isNaN(this.deptBudgetList.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.imperfectGrain < 0 ||
+            this.deptBudgetList.imperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.imperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.imperfectGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.deptBudgetList.warehouseInOutDetail.reImperfectGrain=this.deptBudgetList.reImperfectGrain
+        if (this.deptBudgetList.reImperfectGrain) {
+          if (isNaN(this.deptBudgetList.reImperfectGrain)) {
+            this.$message({
+              message: '复检不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.reImperfectGrain < 0 ||
+            this.deptBudgetList.reImperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.reImperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.reImperfectGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.reImperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '复检不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        this.deptBudgetList.warehouseInOutDetail.bulkDensity=this.deptBudgetList.bulkDensity
+        if (this.deptBudgetList.bulkDensity) {
+          if (isNaN(this.deptBudgetList.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.deptBudgetList.bulkDensity &&
+              String(
+                this.deptBudgetList.bulkDensity
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.bulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.bulkDensity
+                ).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.bulkDensity > 1000 ||
+            this.deptBudgetList.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.deptBudgetList.warehouseInOutDetail.reBulkDensity=this.deptBudgetList.reBulkDensity
+        if (this.deptBudgetList.reBulkDensity) {
+          if (isNaN(this.deptBudgetList.reBulkDensity)) {
+            this.$message({
+              message: '复检容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.deptBudgetList.reBulkDensity &&
+              String(
+                this.deptBudgetList.reBulkDensity
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.reBulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.reBulkDensity
+                ).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.reBulkDensity > 1000 ||
+            this.deptBudgetList.reBulkDensity < 0
+          ) {
+            this.$message({
+              message: '复检容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        console.log(this.deptBudgetList, '入库对象')
+
+        this.$confirm(`确定提交入库信息`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.deptBudgetList.validate((valid) => {
+              if (valid) {
+                this.deptBudgetList.baseId=this.cangid
+                this.deptBudgetList.carNumber=this.deptBudgetList.carNo
+                this.deptBudgetList.warehouseName=this.warehouseName
+                this.deptBudgetList.serviceManagementType=this.serviceManagementType
+                this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
+                this.deptBudgetList.secretaryWeigher =
+                  localStorage.getItem('ws-pf_staffName')
+                this.deptBudgetList.inOutFlag = 2
+                this.deptBudgetList.pcFlag = 1
+                this.deptBudgetList.statusFlag = 1
+                if(this.statusTypetext=='初检'){
+                 addstorageputList(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    this.deptBudgetList.warehouseInOutId=response
+                     inspectAdd(this.deptBudgetList)
+                    .toPromise()
+                    .then((response1) => {
+                      if (this.reader) {
+                        this.reader.cancel()
+                      }
+                      this.$message.success('添加成功')
+                      this.getList()
+                      // this.$router.push({
+                      //   path: 'warehouseManagementList',
+                      // })
+                       getinspectLook({
+                        id: response1
+                      })
+                      .toPromise()
+                      .then((response2) => {
+                      //  let printString = localStorage.getItem('ws-pf_compId') + "," + row.qualityNo + "," + this.cangid 
+                      //       getQRcode({printString}).toPromise()
+                      //             .then((res) => {
+                              this.isShowPrint = true
+                              this.printData = response2
+                              // this.printData.qrCodeUrl = res
+                              // })
+                        this.deptBudgetList = response2
+                        if (response.compName == '黑龙江秋收有限公司') {
+                    		 this.deptBudgetList.compName = '黑龙江中天昊元贸易有限公司'
+                    			}
+                      })
+                    })
+                    .catch((response) => {
+                    })
+                    
+                    // this.$message.success('保存成功')
+                   
+                    //打印
+                    // this.$router.go(-1)
+                  })
+                }else if(this.statusTypetext=='复检'){
+                  this.deptBudgetList.flag=1
+                  getinspectEdit(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                      addstorageputList(this.deptBudgetList)
+                      .toPromise()
+                      .then((response) => {
+                        if (this.reader) {
+                          this.reader.cancel()
+                        }
+                        this.$message.success('修改成功')
+                        this.deptBudgetList={
+                          type: '潮粮',
+                          freight: 0,
+                          cost: '',
+                          addressUrl: '',
+                          tidalGrainPrice: 0,
+                          buckleWeightRatio: 0,
+                          natureOfGrainPurchase: '贸易粮',
+                          buckleMiscellaneous: 0,
+                          paramType: 1,
+                          warehouseInOutDetail: {
+                            grade:'',
+                            reGrade:'',
+                            imperfectGrain:'',
+                            reImperfectGrain:'',
+                            impurity:'',
+                            reImpurity:'',
+                            jiaorenli:'',
+                            reJiaorenli:'',
+                            bulkDensity:'',
+                            reBulkDensity:'',
+                            mildewGrain:'',
+                            reMildewGrain:'',
+                          },
+                          disablednotarize:false,
+                          deductionAmount: 0,
+                          deductionWeight: 0,
+                          grossWeight: 0,
+                          tare: 0,
+                          grade:'',
+                          inOutDate: '',
+                          netWeight:0,
+                          pureWeight:0,
+                          deductionWeight:0,
+                          waterContent:'',
+                          reWaterContent:'',
+                          reGrade:'',
+                          imperfectGrain:'',
+                          reImperfectGrain:'',
+                          impurity:'',
+                          reImpurity:'',
+                          jiaorenli:'',
+                          reJiaorenli:'',
+                          bulkDensity:'',
+                          reBulkDensity:'',
+                          reMemo:'',
+                          storageTagNo:'',
+                          mildewGrain:'',
+                          reMildewGrain:'',
+                          boxNo:'',
+                          boxNoOther:'',
+                          titleNo:'',
+                          titleNoOther:'',
+                        }
+                        this.getList()
+                      })
+                      .catch((response) => {
+                      })
+                  })
+                }else if(this.statusTypetext=='确认'){
+                  this.deptBudgetList.flag=2
+                  getinspectEdit(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    addstorageputList(this.deptBudgetList)
+                    .toPromise()
+                    .then((response) => {
+                      if (this.reader) {
+                        this.reader.cancel()
+                      }
+                      this.$message.success('修改成功')
+                      this.deptBudgetList={
+                        type: '潮粮',
+                        freight: 0,
+                        cost: '',
+                        addressUrl: '',
+                        tidalGrainPrice: 0,
+                        buckleWeightRatio: 0,
+                        natureOfGrainPurchase: '贸易粮',
+                        buckleMiscellaneous: 0,
+                        paramType: 1,
+                        warehouseInOutDetail: {
+                          grade:'',
+                          reGrade:'',
+                          imperfectGrain:'',
+                          reImperfectGrain:'',
+                          impurity:'',
+                          reImpurity:'',
+                          jiaorenli:'',
+                          reJiaorenli:'',
+                          bulkDensity:'',
+                          reBulkDensity:'',
+                          mildewGrain:'',
+                          reMildewGrain:'',
+                        },
+                        disablednotarize:false,
+                        deductionAmount: 0,
+                        deductionWeight: 0,
+                        grossWeight: 0,
+                        tare: 0,
+                        grade:'',
+                        inOutDate: '',
+                        netWeight:0,
+                        pureWeight:0,
+                        deductionWeight:0,
+                        waterContent:'',
+                        reWaterContent:'',
+                        reGrade:'',
+                        imperfectGrain:'',
+                        reImperfectGrain:'',
+                        impurity:'',
+                        reImpurity:'',
+                        jiaorenli:'',
+                        reJiaorenli:'',
+                        bulkDensity:'',
+                        reBulkDensity:'',
+                        reMemo:'',
+                        storageTagNo:'',
+                        mildewGrain:'',
+                        reMildewGrain:'',
+                        boxNo:'',
+                        boxNoOther:'',
+                        titleNo:'',
+                        titleNoOther:'',
+                      }
+                      this.getList()
+                    })
+                    .catch((response) => {
+                    })
+                  })
+                }
+
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      kkInput(val) {
+        console.log(val)
+        if (this.isGetCost) {
+          if (this.deptBudgetList.cost > val) {
+            this.deptBudgetList.cost =
+              this.cost - this.deptBudgetList.deductionAmount
+          }
+        }
+      },
+      // 获取当前年月日
+      getTime(){
+        var date= new Date()
+        var mouth=date.getMonth()+1
+        var day=date.getDate()
+        if(mouth<10){
+          mouth='0'+mouth
+        }
+        if(day<10){
+          day='0'+day
+        }
+        return date.getFullYear()+mouth+date.getDate()
+      },
+      editClick(status){
+        if(status==3){
+          this.editcar=!this.editcar
+        }else if(status==2){
+          this.disabledfright=!this.disabledfright
+        }
+      },
+      selectWarehouse() {
+        selectWarehouseSelf({
+            compId: localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList1 = response
+            this.warehouseList = []
+            let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
+            _wareHouse = JSON.parse(_wareHouse)
+            for (let i = 0; i < response.length; i++) {
+              if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
+                this.warehouseCount = response[i].count
+                this.allowEdit = response[i].allowEdit
+                this.cangid = _wareHouse.warehouseId
+                this.warehouseName = response[i].warehouseName
+                this.positionInfos=response[i].positionInfos
+                this.warehouseNo = response[i].commonWarehouseNo
+              }
+              this.warehouseList.push({
+                value: response[i].warehouseName,
+                warehouseId: response[i].id,
+                count: response[i].count,
+                No: response[i].commonWarehouseNo,
+                allowEdit: response[i].allowEdit,
+                compId: localStorage.getItem('ws-pf_compId')
+              })
+              if (!_wareHouse) {
+                if (this.cangid && this.cangid == response[i].id) {
+                  this.warehouseName = response[i].warehouseName
+                  this.warehouseCount = response[i].count
+                  this.warehouseNo = response[i].commonWarehouseNo
+                  this.allowEdit = response[i].allowEdit
+                }
+                if (this.warehouseList.length > 0 && !this.cangid) {
+                  this.warehouseName = this.warehouseList[0].value
+                  this.warehouseCount = this.warehouseList[0].count
+                  this.warehouseNo = this.warehouseList[0].No
+                  this.cangid = this.warehouseList[0].warehouseId
+                  this.allowEdit = this.warehouseList[0].allowEdit
+                  this.WAREHOUSE[1].payname = this.warehouseList[0].value
+                }
+              }
+            }
+            getReceiptTaskNo({
+              flag: 2,
+              warehouseName: this.warehouseName,
+              agentKey: localStorage.getItem('ws-pf_userId'),
+            })
+            .toPromise()
+            .then((response) => {
+              console.log(response)
+              this.taskNolist = response
+            })
+              this.getList()
+          })
+      },
+      closePrint() {
+        this.isShowPrint = false
+        
+      },
+      warehousetypechange(status){
+        this.serviceManagementType=status
+        if(status==3){
+          this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+this.warehouseCount
+        }
+        this.getList()
+      },
+      // 默认按钮暂时不用
+      // checkchange(e){
+      //   if(e){
+      //     for (let i = 0; i < this.warehouseList.length; i++) {
+      //     if (this.warehouseList[i].value == this.warehouseName) {
+      //       this.warehouseName = this.warehouseList[i].value
+      //       this.warehouseCount = this.warehouseList[i].count
+      //       this.warehouseNo = this.warehouseList[i].No
+      //       this.cangid = this.warehouseList[i].warehouseId
+      //       this.allowEdit = this.warehouseList[i].allowEdit
+      //       this.WAREHOUSE[1].payname = this.warehouseList[i].value
+      //       this.warehouseList[i].compId = localStorage.getItem('ws-pf_compId')
+      //       localStorage.setItem('houseSelfCollect_house1', JSON.stringify(this.warehouseList[i]))
+      //     }
+      //   }
+      //   }
+      // },
+      find() {
+        this.getList()
+      },
+      contractNoChange(e) {
+        // 循环任务编号获取合同号
+        for (let i = 0; i < this.taskNolist.length; i++) {
+          if (this.taskNolist[i].inOutTaskNo == e) {
+            console.log(this.taskNolist[i])
+            var data = this.taskNolist[i]
+
+            if (this.taskNolist[i].contractNo) {
+              this.deptBudgetList.contractNo = this.taskNolist[i].contractNo
+            } else {
+              this.deptBudgetList.contractNo = this.taskNolist[i].moveTaskNo
+            }
+          }
+        }
+        if (!data) return
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (
+            this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
+          ) {
+            console.log(this.outContractNo[i])
+            this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            this.deptBudgetList.grade = this.outContractNo[i].grade
+            if (this.outContractNo[i].inOutType == '采购入库') {
+              this.deptBudgetList.qualityNo='CGRK'+this.getTime()+this.warehouseNo+this.warehouseCount
+              if (!this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller
+              } else {
+                this.deptBudgetList.tips ='卖方' +this.outContractNo[i].seller +'( ' + this.outContractNo[i].unitContractPrice +'元/吨)'
+              }
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库入库') {
+              this.deptBudgetList.qualityNo='YKRK'+this.getTime()+this.warehouseNo+this.warehouseCount
+              this.deptBudgetList.goodsName = data.goodsName
+              this.deptBudgetList.goodsNameKey = data.goodsNameKey
+              this.deptBudgetList.grade = data.grade
+              if (this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips ='出货库' +data.sendWarehouse +' (' +this.outContractNo[i].unitContractPrice +'元/吨)'
+              } else {
+                this.deptBudgetList.tips = '出货库' + data.sendWarehouse
+              }
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+             
+              this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '退库') {
+              if (this.outContractNo[i].contractNo) {
+                this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
+              } else {
+                this.deptBudgetList.tips = '出货库' + data.sendWarehouse
+              }
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+            this.cost = this.outContractNo[i].contractPrice
+            if (this.cost) {
+              this.isGetCost = true
+              this.deptBudgetList.cost =this.cost - this.deptBudgetList.deductionAmount
+            } else {
+              this.isGetCost = false
+              this.deptBudgetList.cost = this.deptBudgetList.cost
+            }
+            this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+            if (this.outContractNo[i].inOutType == '移库入库') {
+              this.isSelectType = false
+
+            } else {
+              this.isSelectType = true
+            }
+            if (this.outContractNo[i].priceType == '随行就市') {
+              this.disabled1 = !this.disabled1
+            }
+
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
+            } else {
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              // this.carstatus = true
+            }
+            this.fleetNameList=this.outContractNo[i].tranCarInfoList1
+          }
+        }
+      },
+      selectstorageType(){
+
+      },
+      
+      warehouseNameChange(e) {
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseList[i].value == e) {
+            this.warehouseName = this.warehouseList[i].value
+            this.warehouseCount = this.warehouseList[i].count
+            this.warehouseNo = this.warehouseList[i].No
+            this.cangid = this.warehouseList[i].warehouseId
+            this.allowEdit = this.warehouseList[i].allowEdit
+            this.WAREHOUSE[1].payname = this.warehouseList[i].value
+            this.warehouseList[i].compId = localStorage.getItem('ws-pf_compId')
+            localStorage.setItem('houseSelfCollect_house1', JSON.stringify(this.warehouseList[i]))
+            getReceiptTaskNo({
+              flag: 2,
+              warehouseName: this.warehouseName,
+              agentKey: localStorage.getItem('ws-pf_userId'),
+            })
+            .toPromise()
+            .then((response) => {
+              console.log(response)
+              this.taskNolist = response
+            })
+           
+              this.getList()
+          }
+        }
+        for (let i = 0; i < this.warehouseList1.length; i++) {
+          if (this.warehouseList1[i].warehouseName == e) {
+            this.positionInfos=this.warehouseList1[i].positionInfos
+          }
+        }
+        console.log(this.positionInfos)
+        if(this.warehouseName){
+          getReceiptTaskNo({
+              flag: 2,
+              warehouseName: this.warehouseName,
+              agentKey: localStorage.getItem('ws-pf_userId'),
+            })
+            .toPromise()
+            .then((response) => {
+              this.taskNolist = response
+            })
+          this.getList()
+        }
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+          }
+        }
+        this.waterContentChange()
+      },
+      reselectpackingMethod(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.deptBudgetList.reGradeKey = this.gradeList5     [i].constKey
+          }
+        }
+      },
+      getList() {
+        // 类型
+        this.storageType = []
+        console.log(this.storageType)
+          pullDown({
+              constId: 'CON5',
+            })
+            .toPromise()
+            .then((response) => {
+              this.storageType = response
+              // for (let i = 0; i < response.length; i++) {
+              //   if (
+              //     response[i].constValue == '移库入库' ||
+              //     response[i].constValue == '退库'
+              //   ) {
+              //     this.storageType.push(response[i])
+              //     console.log(this.storageType)
+              //   }
+              // }
+            })
+          getinspectLookGoods({
+            warehouseId: this.cangid
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+            this.purchasePriceList = response
+          })
+        // 品级
+        pullDown({
+            constId: 'CON3',
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+          //合同编号
+            xialaNo({
+              compId: localStorage.getItem('ws-pf_compId'),
+              flag: 7,
+            })
+            .toPromise()
+            .then((response) => {
+              this.options1 = response
+              this.outContractNo = response
+            })
+            this.multiSelector1=[]
+        getinspectcontractno({compId:localStorage.getItem('ws-pf_compId'),warehouseName:this.warehouseName}).toPromise()
+            .then((response) => {
+              if(response.contractManagementInfoList){
+                for (let i = 0; i < response.contractManagementInfoList.length; i++) {
+                  response.contractManagementInfoList[i].type='自运'
+                }
+              }
+              this.multiSelector1=response.contractManagementInfoList
+              // this.options1 = response
+              // this.outContractNo = response
+            })
+        getinspectList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            warehouseName: this.warehouseName,
+            managementType: 1,
+            serviceManagementType:this.serviceManagementType
+          })
+          .toPromise()
+          .then((response) => {
+            this.inspect = response.records
+            this.deptBudgetTotal = response.total
+            // this.$forceUpdate();
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.el-dialog__header {
+    text-align: center !important;
+    padding: 10px 0 !important;
+    height: auto !important;
+  }
+
+  /deep/.el-dialog__title {
+    font-size: 24px !important;
+  }
+
+  .title {
+    font-size: 20px;
+    font-weight: 600;
+    margin: 20px 0 0 20px;
+  }
+
+  .tit {
+    font-size: 16px;
+    font-weight: 600;
+    margin: 20px;
+  }
+
+  .ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    text-align: center;
+    background: #ffffff;
+    color: #8890b1;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+  }
+  /deep/.el-textarea__inner{
+    width:92%;
+  }
+  /deep/.ws-info-table .el-form-item.rememo .el-form-item__content{
+  height:76px;
+  }
+</style>

+ 445 - 0
src/views/houseSelfCollect/inspectionManagementrecord.vue

@@ -0,0 +1,445 @@
+<!--质检管理-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+        <div>
+          <el-button @click='warehousetypechange(1)' :type="serviceManagementType==1?'primary':''">贸易入库</el-button>
+          <el-button @click='warehousetypechange(3)' :type="serviceManagementType==3?'primary':''">收购入库</el-button>
+          <div style='margin-top:10px;'>
+            <el-button @click='statustypechange("全部")' :type="statusTypetext=='全部'?'primary':''">全部</el-button>
+            <el-button @click='statustypechange("初检")' :type="statusTypetext=='初检'?'primary':''">已初检</el-button>
+            <el-button @click='statustypechange("复检")' :type="statusTypetext=='复检'?'primary':''">已复检</el-button>
+            <el-button @click='statustypechange("确认")' :type="statusTypetext=='确认'?'primary':''">已确认</el-button>
+          </div>
+        </div>
+        
+      </template>
+      <template slot="right">
+        <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
+          style="margin: 0 10px">
+          <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        <div></div>
+        <ws-input class='findinput' @keyup.enter.native="find()" v-model="searchKeyWord" placeholder="可按业务编号、合同编号、车牌号查找"
+          clearable maxlength="500" type="input">
+        </ws-input>
+        <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left:-8px;
+            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <!-- <div style="height:calc(100vh - 600px)"> -->
+    <el-table :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border height="calc(100% - 130px)">
+      <el-table-column type="index" label="序号" width="50">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="qualityNo" width="100" label="业务编号"></el-table-column>
+      <el-table-column v-if='serviceManagementType==1' prop="qualityNo" width="100" label="合同编号/移库编号">
+        <template scope="scope">
+          <span v-if="scope.row.contractNo">0{{ scope.row.contractNo }}</span>
+          <span v-else>{{ scope.row.moveTaskNo }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column v-if='serviceManagementType==3' prop="customerName" label="客户"></el-table-column>
+      <el-table-column prop="carNumber" label="车牌号"></el-table-column>
+      <el-table-column prop="goodsName" label="货名"></el-table-column>
+      <el-table-column prop="waterContent" label="水分(%)" width="120">
+        <template scope="scope">
+          <span class="water-left">{{scope.row.waterContent}}</span>
+          <span class="water-line">|</span>
+          <span class="water-right">{{scope.row.reWaterContent ? scope.row.reWaterContent : '未复检' }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="type" label="类型"></el-table-column>
+      <el-table-column v-if='serviceManagementType==1' prop="cost" label="成本(元/吨)"></el-table-column>
+      <el-table-column v-if='serviceManagementType==3' prop="tidalGrainPrice" label="单价(元/公斤)" width="120px">
+        <template scope="scope">
+          <span v-if="scope.row.type == '潮粮'">{{ scope.row.tidalGrainPrice }}</span>
+          <span v-else>{{ scope.row.dryGrainPrice }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="binNumber" label="仓位号"></el-table-column>
+      
+      <el-table-column prop="qualityInspector" label="质检员" width="120px">
+        <template scope="scope">
+          <span>{{scope.row.qualityInspector}}</span>
+          <span
+            v-if="scope.row.reInspector && scope.row.qualityInspector != scope.row.reInspector">,{{scope.row.reInspector}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="updateDate" label="质检时间" width="90px"></el-table-column>
+      <el-table-column prop="status" label="状态">
+        <template slot-scope="scope">
+          <span v-if='scope.row.confirm=="1"'>
+            已确认
+          </span>
+          <span v-else>
+            {{scope.row.status}}
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column width="410" label="操作">
+        <template slot-scope="scope">
+          <el-button @click="inspectInfo(scope.row, 2)"
+            v-hasPermission="`acquisitionManagement.acquisitionQuality.view`">查看</el-button>
+          <div style="display: inline-block;"
+            v-if="scope.row.weighingManagement&&scope.row.weighingManagement.status=='已质检'">
+            <el-button @click="del(scope.row)" type="danger"
+              v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
+          </div>
+          <el-button @click="print(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionQuality.print`">打印
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+     <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单">
+      <!-- <inspectInfoPrint :printData="printData"></inspectInfoPrint> -->
+      <inspectInfoPrint :printData="printData" ref="saveImg"></inspectInfoPrint>
+      <div style="text-align:center">
+        <el-button type="primary" @click="closePrint">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </el-dialog>
+    <div style="text-align: center;margin-top:20px">
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+    <!-- </div> -->
+  </div>
+</template>
+<script>
+  import {
+    selectWarehouseSelf,
+    getinspectList,
+    getinspectDelete,
+    getinspectLook,
+    getQRcode
+  } from '@/model/houseSelfCollect/index'
+  import inspectInfoPrint from './component/inspectInfoPrint.vue'
+  export default {
+    components: {
+      inspectInfoPrint
+    },
+    watch: {},
+    data() {
+      return {
+        //分页
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        deptBudgetTotal: 0,
+
+        searchKeyWord: '',
+        taskTypeList: [],
+        searchType: 0,
+        warehouseName: '',
+        inspect: [],
+        warehouseList1: [],
+        serviceManagementType:1,
+        warehouseList: [],
+        cangid: '', //仓库id
+        warehouseCount: '',
+        warehouseNo: '',
+        isShowPrint: false,
+        printData: {},
+        deductWeight: '', //扣重比
+        saleLimit: '',
+        allowEdit: '0',
+        statusTypetext:'全部'
+      }
+    },
+    mounted() {
+      this.selectWarehouse()
+      let _WarehouseName = localStorage.getItem('houseSelfCollect_house1')
+      _WarehouseName = JSON.parse(_WarehouseName)
+      if (_WarehouseName) {
+        this.warehouseNameChange(_WarehouseName.value)
+      }
+    },
+    
+    methods: {
+      warehousetypechange(status){
+        this.serviceManagementType=status
+        this.getList()
+      },
+      statustypechange(status){
+        this.statusTypetext=status
+        if(status=='初检'){
+          this.statusType=1
+        }else if(status=='复检'){
+          this.statusType=1
+        }else if(status=='确认'){
+          this.statusType=3
+        }else if(status=='全部'){
+          this.statusType=''
+        }
+        this.getList()
+      },
+      printSmall() {
+        window.open('../../../static/inspection.html?type=1&dataList=' + JSON.stringify(this.printData))
+      },
+      printBig() {
+        window.open('../../../static/inspection.html?type=2&dataList=' + JSON.stringify(this.printData))
+      },
+      closePrint() {
+        this.isShowPrint = false
+        this.$router.push({
+          path: 'inspectionManagement'
+        })
+      },
+      find() {
+        this.getList()
+      },
+      inspectInfo(row, index) {
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseName == this.warehouseList[i].value) {
+            // console.log(this.warehouseList[i])
+            this.cangid = this.warehouseList[i].warehouseId
+          }
+        }
+        // console.log(this.cangid)
+        //添加,编辑,查看
+        this.$router.push({
+          path: 'inspectInfoLook',
+          query: {
+            type: index,
+            cangid: this.cangid,
+            id: row.id,
+            warehouseName: this.warehouseName,
+            count: this.warehouseCount,
+            warehouseNo: this.warehouseNo,
+            allowEdit: this.allowEdit,
+            status: row.status
+          },
+        })
+      },
+      warehouseNameChange(e) {
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseList[i].value == e) {
+            this.warehouseName = this.warehouseList[i].value
+            this.warehouseCount = this.warehouseList[i].count
+            this.warehouseNo = this.warehouseList[i].No
+            this.cangid = this.warehouseList[i].warehouseId
+            this.allowEdit = this.warehouseList[i].allowEdit
+            this.WAREHOUSE[1].payname = this.warehouseList[i].value
+            this.warehouseList[i].compId = localStorage.getItem('ws-pf_compId')
+            localStorage.setItem('houseSelfCollect_house1', JSON.stringify(this.warehouseList[i]))
+          }
+        }
+        this.getList()
+      },
+      del(row) {
+        //删除
+        this.$confirm('确定删除质检信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            getinspectDelete({
+                id: row.id,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '删除成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      selectWarehouse() {
+        selectWarehouseSelf({
+            compId: localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList1 = response
+            this.warehouseList = []
+            let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
+            _wareHouse = JSON.parse(_wareHouse)
+            for (let i = 0; i < response.length; i++) {
+              if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
+                this.warehouseCount = response[i].count
+                this.allowEdit = response[i].allowEdit
+                this.cangid = _wareHouse.warehouseId
+                this.warehouseName = response[i].warehouseName
+                this.warehouseNo = response[i].commonWarehouseNo
+              }
+              this.warehouseList.push({
+                value: response[i].warehouseName,
+                warehouseId: response[i].id,
+                count: response[i].count,
+                No: response[i].commonWarehouseNo,
+                allowEdit: response[i].allowEdit,
+                compId: localStorage.getItem('ws-pf_compId')
+              })
+              // if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
+              // 		this.cangid = _wareHouse.warehouseId
+              // 		this.warehouseName = response[i].warehouseName
+              // 		this.warehouseNo = response[i].commonWarehouseNo
+              // 		this.warehouseCount =  response[i].count
+              // 		this.allowEdit = response[i].allowEdit
+              // }
+              if (!_wareHouse) {
+                if (this.cangid && this.cangid == response[i].id) {
+                  this.warehouseName = response[i].warehouseName
+                  this.warehouseCount = response[i].count
+                  this.warehouseNo = response[i].commonWarehouseNo
+                  this.allowEdit = response[i].allowEdit
+                }
+                if (this.warehouseList.length > 0 && !this.cangid) {
+                  this.warehouseName = this.warehouseList[0].value
+                  this.warehouseCount = this.warehouseList[0].count
+                  this.warehouseNo = this.warehouseList[0].No
+                  this.cangid = this.warehouseList[0].warehouseId
+                  this.allowEdit = this.warehouseList[0].allowEdit
+                  this.WAREHOUSE[1].payname = this.warehouseList[0].value
+                }
+              }
+            }
+            this.getList()
+          })
+      },
+      getList() {
+        getinspectList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            warehouseName: this.warehouseName,
+            managementType: 1,
+            statusType:this.statusType,
+            serviceManagementType:this.serviceManagementType,
+            searchKeyWord:this.searchKeyWord
+          })
+          .toPromise()
+          .then((response) => {
+            this.inspect = response.records
+            this.deptBudgetTotal = response.total
+            // this.$forceUpdate();
+          })
+      },
+      print(row) {
+        getinspectLook({
+            id: row.id,
+          })
+          .toPromise()
+          .then((response) => {
+            this.printData = response
+            this.isShowPrint = true
+            if (response.compName == '黑龙江秋收有限公司') {
+              this.printData.compName = '黑龙江中天昊元贸易有限公司'
+            }
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.el-dialog__header {
+    text-align: center !important;
+    padding: 10px 0 !important;
+    height: auto !important;
+  }
+
+  /deep/.el-dialog__title {
+    font-size: 24px !important;
+  }
+
+  .title {
+    font-size: 20px;
+    font-weight: 600;
+    margin: 20px 0 0 20px;
+  }
+
+  .tit {
+    font-size: 16px;
+    font-weight: 600;
+    margin: 20px;
+  }
+
+  .ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    text-align: center;
+    background: #ffffff;
+    color: #8890b1;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+  }
+
+  /deep/.el-table .el-table__header .cell,
+  .el-table .el-table__body .cell {
+    text-align: center;
+  }
+
+  /deep/.el-table--enable-row-transition .el-table__body td {
+    text-align: center;
+  }
+
+  /deep/.el-dialog__body {
+    padding: 20px !important;
+  }
+
+  .water-left,
+  .water-right {
+    width: 45%;
+    display: inline-block;
+  }
+
+  /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;
+  }
+  /deep/.base_header_layout .grid-content{
+    height:50px;
+  }
+  // 	/deep/.el-table--border{
+  //   height: calc(100vh - 600px) !important;
+  // }
+</style>

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

@@ -0,0 +1,1591 @@
+//检斤管理
+<template>
+  <div class="center">
+    <div class="substance">
+      <div class="left">
+        <BalanceAlert v-if="isShowBalance" ref="weightChild" :deptBudgetList="deptBudgetList" :information="information"
+          v-on:balanceListen="setVal" class="zujian">
+        </BalanceAlert>
+        <div class="top">
+          <div class="confirmWeight">
+            <div class="titleWeight">确认重量</div>
+            <div v-if="index == 0" class="weight">
+              {{ weighingList.grossWeight }} <span class="kg-style">kg</span>
+            </div>
+            <div v-else class="weight">
+              {{ weighingList.tare }} <span class="kg-style">kg</span>
+            </div>
+          </div>
+          <div class="confirmInfo">
+            <div class="car-type">车牌号</div>
+            <div class="car-no">{{ carWeightInfo.carNumber }}</div>
+          </div>
+        </div>
+
+        <div class="bottom">
+          <div class="bg-left titleup"><span class="word_css">实时监控</span></div>
+          <div v-if="!monitorUrl1" class="video1">
+            <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
+            <div>监控视频未连接</div>
+          </div>
+          <div v-else class="video1">
+            <iframe :src="monitorUrl1" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
+              mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
+          </div>
+          <div v-if="!monitorUrl2" class="video1">
+            <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
+            <div>监控视频未连接</div>
+          </div>
+          <div v-else class="video2">
+            <iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
+              mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
+          </div>
+        </div>
+      </div>
+      <div class="right">
+        <ws-form class="right-content">
+          <div class="left1">
+            <div class="titlesign weightTitle">
+              <span class="word_css">检斤信息</span>
+
+            </div>
+            <div class="weightInfo">
+              <div class="tab">
+                <div :class="inWarehouseType == 1 ? 'in_css':'in_cssno'" @click="WarehousingType(1)">贸易入库</div>
+                <div :class="inWarehouseType == 3 ? 'in_css':'in_cssno'" @click="WarehousingType(3)">收购入库</div>
+              </div>
+              <div class="tab weigh_btn">
+                <el-badge :value="mListTop.length" class="badge_item">
+                  <div :class="tpyeNo == 1 ? 'in_css1':'in_cssno1'" @click="tabClick(0)">称毛重</div>
+                </el-badge>
+                <el-badge :value="pListTop.length" class="badge_item">
+                  <div :class="tpyeNo == 2 ? 'in_css1':'in_cssno1'" @click="tabClick(1)">称皮重</div>
+                </el-badge>
+              </div>
+              <ws-info-table>
+                <ws-form-item label="业务编号" span="1" prop="number">
+                  <ws-input v-model="weighingList.number" placeholder="自动获取,不可编辑" maxlength="100" disabled
+                    size="small" />
+                </ws-form-item>
+                <ws-form-item label="合同编号" span="1" prop="contractNo" v-show="inWarehouseType == 1"
+                  v-if="weighingList.contractNo">
+                  <ws-input v-model="weighingList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
+                    size="small" />
+                </ws-form-item>
+                <ws-form-item label="移库编号" span="1" prop="moveTaskNo" v-show="inWarehouseType == 1" v-else>
+                  <ws-input v-model="weighingList.moveTaskNo" placeholder="自动获取,不可编辑" maxlength="100" size="small"
+                    disabled />
+                </ws-form-item>
+                <ws-form-item label="客户" span="1" prop="customer" v-if="inWarehouseType == 3">
+                  <ws-input v-model="weighingList.customer" placeholder="自动获取,不可编辑" maxlength="100" disabled
+                    size="small" />
+                </ws-form-item>
+                <ws-form-item label="货名" span="1" prop="goodsName">
+                  <ws-input v-model="weighingList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled
+                    size="small" />
+                </ws-form-item>
+                <ws-form-item label="车牌号" span="1" prop="carNumber">
+                  <ws-input v-model="weighingList.carNumber" placeholder="自动获取,不可编辑" maxlength="100" size="small"
+                    disabled />
+                </ws-form-item>
+                <ws-form-item label="运输方式" span="1" prop="outType" v-if="inWarehouseType == 1">
+                  <ws-input v-model="weighingList.outType" placeholder="自动获取,不可编辑" maxlength="100" size="small"
+                    disabled />
+                </ws-form-item>
+                <ws-form-item label="箱号-1" span="1" prop="boxNo">
+                  <ws-input disabled v-model="weighingList.boxNo" placeholder="暂无" maxlength="20" size="small" />
+                </ws-form-item>
+                <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
+                  <ws-input disabled v-model="weighingList.boxNoOther" placeholder="暂无" maxlength="20" size="small" />
+                </ws-form-item>
+                <ws-form-item label="封号-1" span="1" prop="titleNo">
+                  <ws-input disabled v-model="weighingList.titleNo" placeholder="暂无" maxlength="20" size="small" />
+                </ws-form-item>
+                <ws-form-item label="封号-2" span="1" prop="titleNoOther">
+                  <ws-input disabled v-model="weighingList.titleNoOther" placeholder="暂无" maxlength="20" size="small" />
+                </ws-form-item>
+                <ws-form-item label="毛重(KG)" span="1" prop="grossWeight">
+                  <ws-input type="number" @mousewheel.native.prevent v-if="index == 0"
+                    v-model="weighingList.grossWeight" @input="calculation(status)" placeholder="未获取到毛重" maxlength="100"
+                    size="small" :disabled="disabled" />
+                  <ws-input type="number" @mousewheel.native.prevent v-else v-model="weighingList.grossWeight"
+                    @input="calculation" placeholder="未获取到毛重" maxlength="100" size="small" disabled />
+                  <el-button class="butCss" @click="openPort" v-if="index == 0">重新获取</el-button>
+                </ws-form-item>
+                <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '皮重'">
+                  <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare" @input="calculation"
+                    placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
+                  <el-button class="butCss" v-if="index != 0" @click="openPort">重新获取</el-button>
+                </ws-form-item>
+                <div class="formItem">
+                  <ws-form-item label="扣重(KG)" span="1" prop="buckleMiscellaneous"
+                    v-if="information == '皮重' && (paramType == '2' || inWarehouseType == 1)">
+                    <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous"
+                      @input="calculation" placeholder="请输入扣重" maxlength="100" size="small" />
+                  </ws-form-item>
+                  <ws-form-item label="净重(KG)" span="1" prop="netWeight" v-if="information == '皮重'">
+                    <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight"
+                      placeholder="自动计算,不可编辑" maxlength="100" size="small" disabled />
+                  </ws-form-item>
+                  <!-- <ws-form-item label="应收卸车过磅费(元)" span="1" prop="receivableWeighingFee" v-if="index == 1">
+                  <ws-input type="number" v-model="weighingList.receivableWeighingFee" placeholder="未获取到卸车过磅费金额"
+                    maxlength="100" size="small" disabled />
+                </ws-form-item>
+                <ws-form-item label="实收卸车过磅费(元)" span="1" prop="actualWeighingFee" v-if="index == 1">
+                  <ws-input type="number" v-model="weighingList.actualWeighingFee" placeholder="输入卸车过磅费" maxlength="100"
+                    size="small" />
+                </ws-form-item> -->
+                </div>
+              </ws-info-table>
+              <div class="but">
+                <!-- <el-button @click="print" type="primary" :disabled="submitAllow">提交</el-button> -->
+                <el-button @click="print" v-if="information == '毛重'" type="primary">保存</el-button>
+                <el-button @click="print" v-if="information == '皮重'" type="primary" :disabled="submitAllow">保存并打印
+                </el-button>
+              </div>
+            </div>
+
+          </div>
+          <div class="car-right">
+            <div class="screen">
+              <el-select v-model="warehouseName" placeholder="请选择仓库名" @change="warehouseNameChange">
+                <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
+                  :value="item.warehouseName">
+                </el-option>
+              </el-select>
+              <!-- <el-checkbox v-model="checked">默认</el-checkbox> -->
+            </div>
+            <div class="screen frame">
+              <div class="screen_left">
+                <div @click="cutstatus(1)" :class="status==1?'select_css':'noselect_css'"
+                  v-if="!(inWarehouseType == 1 && tpyeNo == 2)">未称{{information}}</div>
+                <div @click="cutstatus(2)" :class="status==2?'select_css':'noselect_css'"
+                  v-if="!(inWarehouseType == 1 && tpyeNo == 2)">已称{{information}}</div>
+              </div>
+              <div class="screen_right">
+                <div @click="record" v-hasPermission="`acquisitionManagement.acquisitionWeight.view`" class="jilu">记录
+                </div>
+              </div>
+
+            </div>
+
+            <el-table ref="singleTable" :data="carList" highlight-current-row @current-change="handleCurrentChange"
+              style="width: 100%; overflow-y: scroll !important;; height: calc(100vh - 54vh);margin-top:20px">
+              <el-table-column property="number" label="业务编号">
+              </el-table-column>
+              <el-table-column property="carNumber" label="车牌号">
+              </el-table-column>
+              <el-table-column property="status" label="状态">
+              </el-table-column>
+            </el-table>
+            <div style="text-align: center">
+              <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+                :total="deptBudgetTotal">
+              </el-pagination>
+            </div>
+            <!-- <div class="table-title">
+            <div class="top">
+            <div class="top-item first"></div>
+            <div class="top-item">编号</div>
+            <div class="top-item">车牌号</div>
+          </div>
+              <div class="top">
+            <div></div>
+           <div class="top-item"></div>
+            <div class="top-item">编号</div>
+            <div class="top-item">车牌号</div>
+          </div>
+        </div>
+          <div class="table">
+            <div class="table-content" v-for="(item,index) in 30" :key="index">
+              <div class="table-content-item"><input type="radio"></div>
+              <div class="table-content-item">xxxxxxxxxxxxx</div>
+              <div class="table-content-item">辽A11111</div>
+            </div>
+          </div> -->
+          </div>
+        </ws-form>
+      </div>
+    </div>
+    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单" @opened="opendBtn"
+      @close="closeDialog" :close-on-click-modal="false">
+      <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
+      <div style="text-align: center">
+        <el-button type="primary" @click="closePrint">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    tare,
+    grossWeight,
+    getamount,
+    getPrint,
+    getweighingList,
+    getinspectLookGoods,
+    selectWarehouseSelf,
+    getsettleaccout,
+  } from '@/model/houseSelfCollect/index'
+  import {
+    addstorageputList
+  } from '@/model/warehouse/index'
+  import weightCheckPrint from './component/weightCheckPrint.vue'
+  import BalanceAlert from '@/components/balanceAlert'
+  import html2canvas from 'html2canvas'
+  import axios from 'axios'
+  export default {
+    components: {
+      weightCheckPrint,
+      BalanceAlert,
+    },
+    watch: {
+      weighingList: {
+        //深度监听,可监听到对象、数组的变化
+        handler(val, oldVal) {
+          if (val.tare) {
+            if (this.weighingList.buckleMiscellaneous) {
+              this.weighingList.netWeight =
+                this.weighingList.grossWeight -
+                val.tare -
+                this.weighingList.buckleMiscellaneous
+            } else {
+              this.weighingList.netWeight =
+                this.weighingList.grossWeight - val.tare
+            }
+          }
+        },
+        deep: true, //true 深度监听
+      },
+    },
+    data() {
+      return {
+        isShowBalance: false,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        deptBudgetTotal: 0,
+        pList: [],
+        mList: [],
+        index: 0,
+        status: 1,
+        carList: [],
+        carWeightInfo: {
+          carNumber: '',
+          type: '',
+          weight: '',
+        },
+        currentRow: null,
+        inspect: {},
+        types: 1,
+        information: '',
+        weighingList: {
+          grossWeight: 0,
+          tare: 0,
+          buckleMiscellaneous: 0,
+          netWeight: 0,
+          receivableWeighingFee: '',
+          qualityInspectionManagement: {
+            boxNo: "暂无",
+            boxNoOther: "暂无",
+            titleNo: "暂无",
+            titleNoOther: "暂无",
+          }
+        },
+        deptBudgetList: {},
+        tpyeNo: '1',
+        disabled: true,
+        relationId: '',
+        // warehouseId: '',
+        purchasePriceList: [],
+        isShowPrint: false,
+        tableData: {},
+        reader: null,
+        param: 9600,
+        monitorUrl1: '', //监控地址
+        monitorUrl2: '', //监控地址
+        cangid: '',
+        paramType: '1', //参数类型 1 扣重比 2 降幅
+        warehouseName: '',
+        result1: '00',
+        allowEdit: 0,
+        mListTop: [],
+        mListBottom: [],
+        pListTop: [],
+        carList1: [],
+        pListBottom: [],
+        warehouseList: [], //仓库
+        checked: false,
+        inWarehouseType: 1, //入库类型
+        mListTotal: [],
+        pListTotal: [],
+        submitAllow: false,
+        id: "",
+        inOutDate: {},
+      }
+    },
+    activated() {
+      // if (!this.$route.query.grossWeight) {
+      //   this.$route.query.grossWeight = 0
+      // } else {
+      //   this.weighingList.grossWeight = this.$route.query.grossWeight
+      // }
+      // this.allowEdit = this.$route.query.allowEdit
+      // this.$route.query.automaticWeightAcquisition = 0
+      // if(this.$route.query.automaticWeightAcquisition == '1'){
+      // this.openPort()
+      // this.isShowBalance = true
+      // }
+      //  if (this.$route.query.automaticWeightAcquisition == '1') {
+      this.isShowBalance = true
+      var _saomaData = JSON.parse(localStorage.getItem("saoma_data")) //判断是否扫码进来的
+      // }
+      //仓库
+      selectWarehouseSelf({
+          compId: localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = response
+          if (_saomaData) { //缓存中有值,证明扫码进来的
+            this.warehouseName = _saomaData.warehouseName
+            this.cangid = _saomaData.cangid
+            this.monitorUrl1 = _saomaData.monitorUrl1
+            this.monitorUrl2 = _saomaData.monitorUrl2
+            this.allowEdit = _saomaData.allowEdit
+            this.id = _saomaData.id
+            this.tpyeNo = _saomaData.typeNo
+            this.inWarehouseType = _saomaData.managementType
+            localStorage.removeItem("saoma_data"); //第一次进来结束后清除缓存
+          } else if (localStorage.getItem('ck')) {
+            this.warehouseName = localStorage.getItem('ck')
+            for (var i = 0; i < response.length; i++) {
+              if (this.warehouseName == this.warehouseList[i].warehouseName) {
+                this.cangid = this.warehouseList[i].id
+                this.monitorUrl1 = this.warehouseList[i].monitorUrl1
+                this.monitorUrl2 = this.warehouseList[i].monitorUrl2
+                this.allowEdit = this.warehouseList[i].allowEdit
+                break
+              }
+            }
+          } else {
+            this.warehouseName = this.warehouseList[0].warehouseName
+            localStorage.setItem('ck', this.warehouseName)
+            this.cangid = this.warehouseList[0].id
+            this.allowEdit = this.warehouseList[0].allowEdit
+            this.monitorUrl1 = this.warehouseList[0].monitorUrl1
+            this.monitorUrl2 = this.warehouseList[0].monitorUrl2
+          }
+          if (this.allowEdit == 0) {
+            this.disabled = true
+          } else if (this.allowEdit == 1) {
+            this.disabled = false
+          }
+          if (this.tpyeNo == 1) {
+            this.information = '毛重'
+            this.weighingList.tare = 0
+          } else if (this.tpyeNo == 2) {
+            this.information = '皮重'
+          }
+          this.getList()
+        })
+
+
+    },
+    methods: {
+      warehouseNameChange() {
+        localStorage.setItem('ck', this.warehouseName)
+        this.weighingList.warehouseName = this.warehouseName
+        this.deptBudgetList.warehouseName = this.warehouseName
+        for (var i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseName == this.warehouseList[i].warehouseName) {
+            this.cangid = this.warehouseList[i].id
+            this.monitorUrl1 = this.warehouseList[i].monitorUrl1
+            this.monitorUrl2 = this.warehouseList[i].monitorUrl2
+            this.allowEdit = this.warehouseList[i].allowEdit
+            if (this.allowEdit == 0) {
+              this.disabled = true
+            } else if (this.allowEdit == 1) {
+              this.disabled = false
+            }
+          }
+        }
+        this.getList()
+      },
+      record() {
+        this.$router.push({
+          path: 'weightCheckRecord',
+          query: {
+            inWarehouseType: this.inWarehouseType,
+            warehouseName: this.warehouseName
+          }
+        })
+      },
+      WarehousingType(num) {
+        this.inWarehouseType = num
+        if (this.inWarehouseType == 1 && this.status == 2) {
+          this.status = 1
+        }
+        this.getList()
+      },
+      setVal(data) {
+        if (this.information == '毛重') {
+          this.weighingList.grossWeight = data
+        } else {
+          this.weighingList.tare = data
+        }
+      },
+      openPort() {
+        this.$refs.weightChild.openPort()
+      },
+      cutstatus(status) {
+        this.status = status
+        if (status == 2) {
+          if (this.tpyeNo == 1) {
+            this.carList = this.carList1.filter(function(item) {
+              return item.status == '已称毛重'
+            })
+          } else {
+            this.carList = this.carList1.filter(function(item) {
+              return item.status == '已称皮重'
+            })
+          }
+        } else {
+          if (this.tpyeNo == 1) {
+            // this.mListTop.concat(this.mListBottom)
+            this.carList = this.carList1.filter(function(item) {
+              return item.status == '已质检'
+            })
+          } else {
+            this.carList = this.carList1.filter(function(item) {
+              return item.status == '已称毛重'
+            })
+          }
+        }
+        this.deptBudgetTotal = this.carList.length
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      getList() {
+        // 货名
+        getinspectLookGoods({
+            warehouseId: this.cangid,
+          }).toPromise()
+          .then((response) => {
+            this.purchasePriceList = response
+          })
+
+        getweighingList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchKeyWord: '',
+            warehouseName: this.warehouseName,
+            managementType: 1,
+            serviceManagementType: this.inWarehouseType,
+            // statusType:1
+          })
+          .toPromise()
+          .then((response) => {
+            this.weighingList = response.records
+            this.common.commonWeighingList = response.records
+            this.makeData()
+          })
+          .catch((response) => {
+            // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          })
+      },
+      makeData() {
+        this.mList = []
+        this.pList = []
+        this.mListTop = []
+        this.mListBottom = []
+        this.pListTop = []
+        this.pListBottom = []
+        this.carWeightInfo.carNumber = ''
+        this.weighingList = []
+        let that = this
+        let _list = this.common.commonWeighingList
+        for (let i = 0; i < _list.length; i++) {
+          if (_list[i].paymentManagement) {
+            if (
+              _list[i].paymentManagement.status != '待结算' ||
+              _list[i].paymentManagement.approveStatus
+            ) {
+              continue
+            }
+          }
+          if (_list[i].status == '已质检') {
+            this.mListTop.push(_list[i])
+          }
+          if (_list[i].status == '已称毛重') {
+            this.mListBottom.push(_list[i])
+          }
+          if (_list[i].status == '已称皮重') {
+            this.pListBottom.push(_list[i])
+          }
+          if (_list[i].status == '已称毛重') {
+            this.pListTop.push(_list[i])
+          }
+        }
+        if (this.status == 1) {
+          this.mList = this.mListTop
+          this.pList = this.pListTop
+        } else {
+          this.mList = this.mListBottom
+          this.pList = this.pListBottom
+        }
+        this.mListTotal = this.mListTop.concat(this.mListBottom)
+        this.pListTotal = this.pListTop.concat(this.pListBottom)
+        if (this.information == '毛重') {
+          this.index = 0
+          this.carList = this.mList
+          this.carList1 = this.mListTotal
+          if (this.mList.length != 0) {
+            this.setCurrent(this.mList[0])
+
+            this.weighingList = this.mList[0]
+            this.carWeightInfo = {
+              carNumber: this.mList[0].carNumber,
+              type: this.information,
+              weight: this.weighingList.grossWeight,
+            }
+          }
+        } else {
+          this.index = 1
+          this.carList = this.pList
+          this.carList1 = this.pListTotal
+          if (this.pList.length != 0) {
+            this.setCurrent(this.pList[0])
+
+            this.weighingList = this.pList[0]
+            this.carWeightInfo = {
+              carNumber: this.pList[0].carNumber,
+              type: this.information,
+              weight: this.weighingList.tare
+            }
+          }
+          this.deptBudgetTotal = this.pList.length
+        }
+        this.weighingList.carModel = this.weighingList.qualityInspectionManagement.carModel
+        //已下代码注释保留
+        // if (this.weighingList.carModel == '单拖小柜') {
+        //   this.weighingList.receivableWeighingFee = 80
+        //   this.weighingList.actualWeighingFee = 80
+        // } else if (this.weighingList.carModel == '双拖小柜') {
+        //   this.weighingList.receivableWeighingFee = 160
+        //   this.weighingList.actualWeighingFee = 160
+        // } else if (this.weighingList.carModel == '大柜') {
+        //   if (this.weighingList.grossWeight / 1000 < 50) {
+        //     this.$set(this.weighingList, 'receivableWeighingFee', 120)
+        //     this.weighingList.actualWeighingFee = 120
+        //     this.$forceUpdate()
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 50 ||
+        //     this.weighingList.grossWeight / 1000 < 65
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 150
+        //     this.weighingList.actualWeighingFee = 150
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 65 ||
+        //     this.weighingList.grossWeight / 1000 < 75
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 170
+        //     this.weighingList.actualWeighingFee = 170
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 75 ||
+        //     this.weighingList.grossWeight / 1000 < 80
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 190
+        //     this.weighingList.actualWeighingFee = 190
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 80 ||
+        //     this.weighingList.grossWeight / 1000 < 85
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 210
+        //     this.weighingList.actualWeighingFee = 210
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 85 ||
+        //     this.weighingList.grossWeight / 1000 < 95
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 240
+        //     this.weighingList.actualWeighingFee = 240
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 95 ||
+        //     this.weighingList.grossWeight / 1000 < 105
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 260
+        //     this.weighingList.actualWeighingFee = 260
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 105 ||
+        //     this.weighingList.grossWeight / 1000 < 150
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 300
+        //     this.weighingList.actualWeighingFee = 300
+        //   }
+        // } else if (this.weighingList.carModel == '挂车') {
+        //   if (this.weighingList.grossWeight / 1000 < 50) {
+        //     this.weighingList.receivableWeighingFee = 180
+        //     this.weighingList.actualWeighingFee = 180
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 50 ||
+        //     this.weighingList.grossWeight / 1000 < 65
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 200
+        //     this.weighingList.actualWeighingFee = 200
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 65 ||
+        //     this.weighingList.grossWeight / 1000 < 75
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 250
+        //     this.weighingList.actualWeighingFee = 250
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 75 ||
+        //     this.weighingList.grossWeight / 1000 < 85
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 350
+        //     this.weighingList.actualWeighingFee = 350
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 85 ||
+        //     this.weighingList.grossWeight / 1000 < 95
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 400
+        //     this.weighingList.actualWeighingFee = 400
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 95 ||
+        //     this.weighingList.grossWeight / 1000 < 105
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 450
+        //     this.weighingList.actualWeighingFee = 450
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 105 ||
+        //     this.weighingList.grossWeight / 1000 < 120
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 500
+        //     this.weighingList.actualWeighingFee = 500
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 120 ||
+        //     this.weighingList.grossWeight / 1000 < 130
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 550
+        //     this.weighingList.actualWeighingFee = 550
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 130 ||
+        //     this.weighingList.grossWeight / 1000 < 150
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 700
+        //     this.weighingList.actualWeighingFee = 700
+        //   }
+        // } else if (this.weighingList.carModel == '冷藏箱(不抠箱)') {
+        //   if (this.weighingList.grossWeight / 1000 < 50) {
+        //     this.weighingList.receivableWeighingFee = 120
+        //     this.weighingList.actualWeighingFee = 120
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 50 ||
+        //     this.weighingList.grossWeight / 1000 < 65
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 150
+        //     this.weighingList.actualWeighingFee = 150
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 65 ||
+        //     this.weighingList.grossWeight / 1000 < 75
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 170
+        //     this.weighingList.actualWeighingFee = 170
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 75 ||
+        //     this.weighingList.grossWeight / 1000 < 80
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 190
+        //     this.weighingList.actualWeighingFee = 190
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 80 ||
+        //     this.weighingList.grossWeight / 1000 < 85
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 210
+        //     this.weighingList.actualWeighingFee = 210
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 85 ||
+        //     this.weighingList.grossWeight / 1000 < 95
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 240
+        //     this.weighingList.actualWeighingFee = 240
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 95 ||
+        //     this.weighingList.grossWeight / 1000 < 105
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 260
+        //     this.weighingList.actualWeighingFee = 260
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 105 ||
+        //     this.weighingList.grossWeight / 1000 < 120
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 300
+        //     this.weighingList.actualWeighingFee = 300
+        //   }
+        // } else if (this.weighingList.carModel == '冷藏箱(抠箱)') {
+        //   if (this.weighingList.grossWeight / 1000 < 50) {
+        //     this.weighingList.receivableWeighingFee = 360
+        //     this.weighingList.actualWeighingFee = 360
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 50 ||
+        //     this.weighingList.grossWeight / 1000 < 65
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 390
+        //     this.weighingList.actualWeighingFee = 390
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 65 ||
+        //     this.weighingList.grossWeight / 1000 < 75
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 410
+        //     this.weighingList.actualWeighingFee = 410
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 75 ||
+        //     this.weighingList.grossWeight / 1000 < 80
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 430
+        //     this.weighingList.actualWeighingFee = 430
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 80 ||
+        //     this.weighingList.grossWeight / 1000 < 85
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 450
+        //     this.weighingList.actualWeighingFee = 450
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 85 ||
+        //     this.weighingList.grossWeight / 1000 < 95
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 480
+        //     this.weighingList.actualWeighingFee = 480
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 95 ||
+        //     this.weighingList.grossWeight / 1000 < 105
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 500
+        //     this.weighingList.actualWeighingFee = 500
+        //   } else if (
+        //     this.weighingList.grossWeight / 1000 > 105 ||
+        //     this.weighingList.grossWeight / 1000 < 120
+        //   ) {
+        //     this.weighingList.receivableWeighingFee = 540
+        //     this.weighingList.actualWeighingFee = 540
+        //   }
+        // } else {
+        //   this.weighingList.receivableWeighingFee = ''
+        // }
+      },
+      tabClick(val) {
+        this.mListTop = []
+        this.mListBottom = []
+        this.pListTop = []
+        this.pListBottom = []
+        this.carWeightInfo.carNumber = ''
+        this.weighingList = []
+        this.index = val
+        if (val == 0) {
+          this.information = '毛重'
+          this.tpyeNo = '1'
+        } else {
+          this.tpyeNo = '2'
+          this.information = '皮重'
+        }
+        if (this.tpyeNo == 2 && this.inWarehouseType == 1) { //贸易入库不能二次称皮重(没有已称皮重按钮)
+          this.status = 1 //手动更改未称皮重状态
+        }
+        this.getList()
+      },
+      setCurrent(row) {
+        this.$refs.singleTable.setCurrentRow(row)
+      },
+      handleCurrentChange(val) {
+        this.submitAllow = false
+        if (this.tpyeNo == 2 && this.status == 1 && val && val.qualityInspectionManagement.confirm == 0) {
+          this.submitAllow = true
+          this.$message({
+            message: '该条质检信息未确认',
+            type: 'warning'
+          });
+        }
+        if (val) {
+          this.currentRow = val
+          this.carWeightInfo = {
+            carNumber: val.carNumber,
+            type: this.information,
+            weight: val.grossWeight,
+          }
+          this.weighingList = val
+          if (val.qualityInspectionManagement) {
+            this.weighingList.boxNo = val.qualityInspectionManagement.boxNo
+            this.weighingList.boxNoOther = val.qualityInspectionManagement.boxNoOther
+            this.weighingList.titleNo = val.qualityInspectionManagement.titleNo
+            this.weighingList.titleNoOther = val.qualityInspectionManagement.titleNoOther
+          }
+          this.paramType = val.qualityInspectionManagement.paramType
+        }
+      },
+      cancel() {
+        if (this.reader) {
+          this.reader.cancel()
+        }
+        this.$router.push({
+          path: 'weighingManagement',
+        })
+      },
+      calculation(status) {
+        // if (this.weighingList.grossWeight && this.weighingList.tare) {
+        //   this.weighingList.netWeight = this.weighingList.grossWeight - this.weighingList.tare - parseInt(this.weighingList.buckleMiscellaneous)
+        //   this.weighingList.netWeight = this.weighingList.netWeight.toFixed(2)
+        // }
+      },
+      printSmall() {
+        window.open(
+          '../../../../static/weightCheck.html?type=1&tableData=' +
+          JSON.stringify(this.inspect)
+        )
+      },
+      printBig() {
+        window.open(
+          '../../../../static/weightCheck.html?type=2&tableData=' +
+          JSON.stringify(this.inspect)
+        )
+      },
+      opendBtn() {
+        html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+          let dataURL = canvas.toDataURL('image/png')
+          this.imgUrl = dataURL
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+            let formdata = new FormData()
+            formdata.append('file', b)
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata,
+            }).then((response) => {
+              //编辑接口
+              this.weighingList.pictureAddress = response.data.url
+              tare(this.weighingList)
+                .toPromise()
+                .then((response) => {})
+            })
+          }
+        })
+      },
+      closeDialog() {
+        html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+          let dataURL = canvas.toDataURL('image/png')
+          this.imgUrl = dataURL
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+            let formdata = new FormData()
+            formdata.append('file', b)
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata,
+            }).then((response) => {
+              //编辑接口
+              if (this.inWarehouseType == 1) {
+                this.weighingList = this.inOutDate
+                this.weighingList.pictureAddress = response.data.url
+              } else {
+                this.weighingList.pictureAddress = response.data.url
+              }
+
+              tare(this.weighingList)
+                .toPromise()
+                .then((response) => {})
+            })
+            this.dialogTableVisible = true
+          }
+        })
+        this.isShowPrint = false
+      },
+      closePrint() {
+        this.isShowPrint = false
+      },
+      print() {
+        if (this.reader) {
+          this.reader.cancel()
+        }
+        if (!this.weighingList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.weighingList.grossWeight < 1 ||
+          this.weighingList.grossWeight > 200000
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          String(this.weighingList.grossWeight).indexOf('.') != -1 &&
+          String(this.weighingList.grossWeight).length -
+          (String(this.weighingList.grossWeight).indexOf('.') + 1) >
+          1
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.tpyeNo == 2) {
+          if (!this.weighingList.tare) {
+            this.$message({
+              message: '皮重不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (!this.weighingList.tare) {
+            this.$message({
+              message: '皮重不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (Number(this.weighingList.tare) > Number(this.weighingList.grossWeight)) {
+            this.$message({
+              message: '皮重不能大于毛重',
+              type: 'warning',
+            })
+            return
+          }
+          if (this.weighingList.tare < 1 || this.weighingList.tare > 100000) {
+            this.$message({
+              message: '皮重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            String(this.weighingList.tare).indexOf('.') != -1 &&
+            String(this.weighingList.tare).length -
+            (String(this.weighingList.tare).indexOf('.') + 1) >
+            1
+          ) {
+            this.$message({
+              message: '皮重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+
+          if (Number(this.weighingList.netWeight < 0)) {
+            this.$message({
+              message: '净重不能小于0',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.$confirm('确定保存检斤信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            var that = this
+            var warehousing = {}
+            //贸易入库保存需要再走入库接口
+            if (this.inWarehouseType == 1) {
+              warehousing = this.weighingList
+              warehousing.secretaryWeigher = localStorage.getItem('ws-pf_staffName')
+              warehousing.compId = localStorage.getItem('ws-pf_compId')
+              warehousing.inOutFlag = 2
+              let _data = JSON.parse(
+                localStorage.getItem('winseaview-userInfo')
+              )
+              warehousing.backOffice = _data.content.showCompName + '-' + _data.content.staffName
+              warehousing.grossWeight = this.weighingList.grossWeight
+              warehousing.tare = this.weighingList.tare
+              warehousing.netWeight = this.weighingList.netWeight
+              warehousing.pureWeight = this.weighingList.pureWeight
+              warehousing.deductionAmount = this.weighingList.deductionAmount
+              warehousing.deductionWeight = this.weighingList.deductionWeight
+              warehousing.warehouseInOutDetail = {}
+              warehousing.baseId = this.cangid
+              delete warehousing.qualityInspectionManagement
+            }
+            if (this.tpyeNo == 1) {
+              //毛检保存前进行校验
+              getamount({
+                  compId: localStorage.getItem('ws-pf_compId'),
+                  customerNumberCard: this.weighingList.customerNumberCard,
+                  goodsName: this.weighingList.goodsName,
+                })
+                .toPromise()
+                .then((response) => {
+                  for (let i = 0; i < this.purchasePriceList.length; i++) {
+                    if (
+                      this.weighingList.goodsName ==
+                      this.purchasePriceList[i].goodsName
+                    ) {
+                      //累计售粮超上限不能完成毛检保存
+                      let count = (
+                        this.purchasePriceList[i].saleLimit -
+                        response / 1000
+                      ).toFixed(2)
+                      // console.log(this.weighingList.grossWeight / 1000, '毛重转吨')
+                      // this.weighingList.grossWeight/=1000
+                      if (count - this.weighingList.grossWeight / 1000 < 0) {
+                        this.$alert(
+                          '该客户累计销售' +
+                          this.weighingList.goodsName +
+                          (response / 1000).toFixed(2) +
+                          '吨,还可售粮' +
+                          count +
+                          '吨',
+                          '提示', {
+                            confirmButtonText: '确定',
+                            callback: (action) => {
+                              this.$message({
+                                type: 'info',
+                                message: `累计售粮已超出上限`,
+                              })
+                            },
+                          }
+                        )
+                      } else {
+                        //累计售粮没有超上限完成毛检保存
+                        // this.weighingList.relationId = this.relationId;
+                        grossWeight(this.weighingList)
+                          .toPromise()
+                          .then((response) => {
+                            if (this.reader) {
+                              this.reader.cancel()
+                            }
+                            this.$notify.success({
+                              title: '成功',
+                              message: '保存成功',
+                            })
+                            this.getList()
+                            //贸易入库需要再走入库接口
+                            if (this.inWarehouseType == 1) {
+                              warehousing.grossWeight /= 1000
+                              warehousing.tare /= 1000
+                              warehousing.netWeight /= 1000
+                              warehousing.pureWeight = 1000
+                              warehousing.deductionAmount *= 1000
+                              warehousing.deductionWeight /= 1000
+                              warehousing.statusFlag = 1
+                              warehousing.inOutFlag = 2
+                              addstorageputList(warehousing).toPromise().then((response) => {
+                                // if(response == "OK"){
+                                //   this.getList()
+                                // }
+                              })
+                            }
+                          })
+                          .catch((response) => {
+                            // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                          })
+                      }
+                    }
+                  }
+                })
+            } else if (this.tpyeNo == 2) {
+              this.weighingList.warehouseId = this.cangid;
+              this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
+              console.log(this.weighingList)
+              tare(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
+                  this.$notify.success({
+                    title: '成功',
+                    message: '保存成功',
+                  })
+                  this.getList()
+                  //贸易入库需要再走入库接口
+                  if (this.inWarehouseType == 1) {
+
+                    getsettleaccout({
+                      id: this.weighingList.warehouseInOutId
+                    }).toPromise().then((response) => {
+                      that.inOutDate = response
+                      warehousing.statusFlag = 3
+                      warehousing.grossWeight /= 1000
+                      warehousing.tare /= 1000
+                      warehousing.netWeight /= 1000
+                      warehousing.pureWeight = 1000
+                      warehousing.deductionAmount = Number(warehousing.deductionAmount) * 1000
+                      warehousing.deductionWeight /= 1000
+                      warehousing.inOutFlag = 2
+                      that.inOutDate = Object.assign(inOutDate, warehousing)
+                      addstorageputList(inOutDate).toPromise().then((response) => {})
+                    })
+                  }
+                  getPrint({
+                      id: response,
+                    })
+                    .toPromise()
+                    .then((response) => {
+                      // let printString = localStorage.getItem('ws-pf_compId') + "," + row.qualityNo + "," + this.cangid
+                      //   getQRcode({printString}).toPromise().then((res) => {
+                      this.isShowPrint = true
+                      this.inspect = response
+                      // this.inspect.qrCodeUrl = res
+                      if (response.compName == '黑龙江秋收有限公司') {
+                        this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+                      }
+                      this.inspect.a = '中天'
+                      // })
+                    })
+                    .catch((response) => {
+                      // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                    })
+                })
+                .catch((response) => {
+                  // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                })
+            }
+          })
+          .catch(() => {
+            return false
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.el-pagination {
+    margin-bottom: 0;
+  }
+
+  .center {
+    background: #E8ECF6;
+  }
+
+  .ws-info-table {
+    border: none;
+    // height: 610px;
+    margin-top: 30px;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 100%;
+    border: none;
+  }
+
+  .formItem {
+    width: 100%;
+    display: inline;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 25%;
+    text-align: center;
+    background: #ffffff;
+    font-size: 14px;
+    color: #8890b1;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+  }
+
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    margin: 10px;
+  }
+
+  .substance {
+    padding-bottom: 20px;
+    overflow-x: scroll;
+
+    .active {
+      background: #5878e8;
+      color: white;
+    }
+
+    // background: #ffffff;
+    width: 100%;
+    height: calc(100vh - 125px);
+    border-radius: 4px;
+    margin: 0 auto;
+    display: flex;
+
+    .left {
+      width: 30%;
+      min-width: 560px;
+      position: relative;
+      // padding:0 20px 20px 20px;
+
+      .top {
+        background: black;
+        color: #2aff7c;
+        font-size: 32px;
+        text-align: right;
+        padding: 0 10px 0 20px;
+        border-radius: 10px;
+        margin: 0 20px 20px 20px;
+        position: absolute;
+        top: 130px;
+        width: 91%;
+
+        .zujian {
+          position: relative;
+        }
+
+        .kg-style {
+          font-size: 30px;
+          color: red;
+        }
+
+        .confirmInfo {
+          display: flex;
+
+          .car-type {
+            text-align: left;
+            width: 50%;
+          }
+
+          .car-no {
+            width: 50%;
+            text-align: right;
+          }
+        }
+
+        .confirmWeight {
+          display: flex;
+
+          .titleWeight {
+            width: 35%;
+            text-align: left;
+            line-height: 90px;
+            color: red;
+          }
+
+          .weight {
+            width: 65%;
+            text-align: right;
+            color: red;
+          }
+        }
+      }
+
+      .bottom {
+        // text-align: center;
+        background: white;
+        margin: 20px 20px 0 20px;
+        border-radius: 10px;
+        padding-bottom: 20px;
+
+        .img1,
+        .img2 {
+          width: 200px;
+          padding: 20px;
+        }
+
+        .video-content {
+          width: 100%;
+        }
+
+        .video1 {
+          text-align: center;
+        }
+      }
+    }
+
+    .right {
+      width: 70%;
+      // padding: 20px;
+      height: 750px;
+      border-radius: 10px;
+
+      .tab {
+        display: flex;
+        margin-bottom: 5px;
+
+        .tab-item {
+          padding: 5px 10px;
+          margin-right: 20px;
+          border-radius: 10px;
+        }
+
+        .in_css,
+        .in_cssno,
+        .in_cssno1,
+        .in_css1 {
+          width: 80px;
+          height: 32px;
+          padding: 3px 10px;
+          border-radius: 4px;
+          margin-right: 10px;
+          font-size: 15px;
+          line-height: 28px;
+          text-align: center;
+          font-weight: 600;
+        }
+
+        .in_css:hover,
+        .in_cssno:hover,
+        .in_cssno1:hover,
+        .in_css1:hover {
+          cursor: pointer;
+        }
+
+        .in_css {
+          color: #5878E8;
+          background: #F0F6FF;
+        }
+
+        .in_css1 {
+          color: #5878E8;
+        }
+
+        .in_cssno1 {
+          color: #8890B1;
+        }
+
+        /deep/.el-badge__content.is-fixed {
+          top: 3px;
+          right: 26px;
+        }
+      }
+
+      .weigh_btn {
+        height: 35px;
+        border-bottom: 1px solid #D8DCE6;
+      }
+
+      .table-title {
+        background: red;
+
+        .top {
+          display: inline-block;
+          width: 48%;
+
+          .top-item {
+            display: inline-block;
+          }
+        }
+      }
+
+      .table {
+        background: red;
+
+        .table-content {
+          background: green;
+          display: inline-block;
+          width: 50%;
+
+          .table-content-item {
+            display: inline-block;
+          }
+        }
+      }
+    }
+  }
+
+  /deep/.el-table .el-table__header .cell,
+  /deep/.el-table .el-table__body .cell {
+    text-align: center;
+    font-size: 16px;
+    // background: #f6f7fc;
+  }
+
+  /deep/.el-table td {
+    background: #e7e8ef;
+  }
+
+  /deep/.el-table--enable-row-transition .el-table__body td {
+    text-align: center;
+  }
+
+  .bg-left {
+    height: 60px;
+    background: #F6F7FC;
+    // padding-left: 30px;
+    line-height: 60px;
+  }
+
+  .titleup {
+    position: relative;
+  }
+
+  .titleup::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+    top: 14px;
+  }
+
+  .butCss {
+    // opacity: 0;
+    margin-left: 20px;
+    color: #5473E8;
+    background: #ffffff;
+  }
+
+  /deep/.el-dialog__title {
+    font-size: 24px !important;
+  }
+
+  /deep/.el-dialog__header {
+    text-align: center !important;
+    padding: 10px 0 !important;
+    height: auto !important;
+  }
+
+  .weight {
+    font-size: 68px;
+  }
+
+  .right-content {
+    display: flex;
+    height: calc(100vh - 25vh);
+
+    .left1 {
+      position: relative;
+      background: #ffffff;
+      // padding: 10px;
+      border-radius: 4px;
+      min-width: 355px;
+      width: 40%;
+
+      .but {
+        position: absolute;
+        left: 0;
+        right: 0;
+        margin: auto;
+        justify-content: flex-end;
+        display: flex;
+        margin-right: 17px;
+        bottom: 20px;
+      }
+
+      .weightInfo {
+        padding: 10px;
+      }
+
+      /deep/.el-input.is-disabled .el-input__inner {
+        background: #F5F7FA !important;
+        border: none;
+      }
+    }
+
+    .titlesign::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+      top: 14px;
+    }
+
+    .weightTitle {
+      width: 100%;
+      height: 60px;
+      background: #F6F7FC;
+      margin-bottom: 6px;
+      border-radius: 4px;
+      line-height: 60px;
+    }
+
+    .left {
+      width: 40%;
+    }
+
+    .right {
+      width: 60%;
+    }
+  }
+
+  .car-right {
+    width: 60%;
+    background: #ffffff;
+    padding: 10px;
+    margin-left: 20px;
+    border-radius: 4px;
+  }
+
+  .screen {
+    margin-bottom: 10px;
+    width: 100%;
+    display: flex;
+
+    .screen_left {
+      min-width: 215px;
+      width: 30%;
+      display: flex;
+
+      .select_css,
+      .noselect_css {
+        width: 76px;
+        height: 32px;
+        padding: 3px 10px;
+        border-radius: 4px;
+        margin-right: 10px;
+        font-size: 14px;
+        line-height: 28px;
+        text-align: center;
+      }
+
+      .select_css:hover,
+      .noselect_css:hover {
+        cursor: pointer;
+      }
+
+      .select_css {
+        color: #5878E8;
+        background: #F0F6FF;
+      }
+    }
+
+    .screen_right {
+      width: 70%;
+      justify-content: flex-end;
+      display: flex;
+      margin-right: 30px;
+
+      .jilu {
+        color: #5878E8;
+      }
+
+      .jilu:hover {
+        cursor: pointer;
+      }
+    }
+
+    /deep/.el-select {
+      width: 50%;
+    }
+  }
+
+  .frame {
+    border-bottom: 1px solid #D8DCE6;
+    height: 40px;
+  }
+
+  .word_css {
+    margin-left: 15px;
+    font-size: 18px;
+    font-weight: 600;
+    text-align: left;
+  }
+</style>

+ 33 - 17
src/views/houseSelfCollect/settlement.vue

@@ -56,6 +56,10 @@
               <ws-input type="number" @mousewheel.native.prevent v-model="paymentList.unitDeduction" @input="grainMoney"
                 placeholder="请输入扣单价" maxlength="100" size="small" :disabled="disabled" />
             </ws-form-item>
+            <ws-form-item v-if='paymentList.contractManagement && paymentList.contractManagement.settlementWeightMethod == 1 && this.paymentList.contractManagement.contractType == 2 && this.paymentList.contractManagement.deliverType == 1' label="出库净重(公斤)" span="1" prop="weight">
+              <ws-input type="number" v-model="paymentList.contractManagement.weight" @input="grainMoney"
+                placeholder="自动获取,不可编辑" maxlength="100" size="small" disabled/>
+            </ws-form-item>
           </ws-info-table>
           <div class="titles">质检数据</div>
           <ws-info-table>
@@ -173,12 +177,18 @@
 
           <div class="titles">结算金额(元)</div>
           <ws-info-table>
-            <ws-form-item v-if='paymentList.type=="潮粮"' label="粮款 = 净重 x (净重单价 - 扣单价) =" span="1" prop="waterContent"
+            <ws-form-item v-if='paymentList.type=="潮粮" && !paymentList.contractManagement' label="粮款 = 净重 x (净重单价 - 扣单价) =" span="1" prop="waterContent"
+              class="formItem">
+              <ws-input type="number" @mousewheel.native.prevent @input='grainMoney' v-model="paymentList.grainMoney"
+                placeholder="请输入粮款" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item v-if='paymentList.type=="干粮" && !paymentList.contractManagement' label="粮款 = 净重 x  (干粮单价 - 扣单价)  =" span="1" prop="waterContent"
               class="formItem">
               <ws-input type="number" @mousewheel.native.prevent @input='grainMoney' v-model="paymentList.grainMoney"
                 placeholder="请输入粮款" maxlength="100" size="small" disabled />
             </ws-form-item>
-            <ws-form-item v-if='paymentList.type=="干粮"' label="粮款 = 净重 x  (干粮单价 - 扣单价)  =" span="1" prop="waterContent"
+            <!-- 采购合同 自运 按合同的出库净重计算 -->
+            <ws-form-item v-if='paymentList.contractManagement' label="粮款 = 出库净重 x  (单价 - 扣单价)  =" span="1" prop="waterContent"
               class="formItem">
               <ws-input type="number" @mousewheel.native.prevent @input='grainMoney' v-model="paymentList.grainMoney"
                 placeholder="请输入粮款" maxlength="100" size="small" disabled />
@@ -419,25 +429,30 @@
         this.paymentList.capitalize = this.convertCurrency(e)
       },
       grainMoney() {
-        if (this.paymentList.type == '潮粮') {
-          this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList
-            .unitDeduction) * this.paymentList.weighingManagement.netWeight
-          this.paymentList.solidGrainPrice = (Number(this.paymentList.grainMoney) / Number(this.paymentList.pureWeight))
-            .toFixed(4)
-          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList
-              .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
-            Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList
-            .freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) -
-            Number(this.paymentList.qualityDeduction)
+        if(this.paymentList.contractManagement && this.paymentList.contractManagement.settlementWeightMethod == 1 && this.paymentList.contractManagement.contractType == 2 && this.paymentList.contractManagement.deliverType == 1){//合同收购自运按出库重量结算 (条件:按出库结算&& 采购合同&&自运)
+          if(this.paymentList.type == '潮粮'){
+            this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList.unitDeduction) * this.paymentList.contractManagement.weight
+          }else{
+            this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList.unitDeduction) * this.paymentList.contractManagement.weight
+          }
+          this.paymentList.solidGrainPrice = (Number(this.paymentList.grainMoney) / Number(this.paymentList.pureWeight)).toFixed(4)
+          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
+            Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList.freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) - Number(this.paymentList.qualityDeduction)
+          this.paymentList.calculationPayable = this.paymentList.calculationPayable.toFixed(2)
+          this.paymentList.actualPayment = this.paymentList.calculationPayable
+          this.actualPayment(this.paymentList.actualPayment)
+        }else if (this.paymentList.type == '潮粮') {
+          this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.tidalGrainPrice - this.paymentList.unitDeduction) * this.paymentList.weighingManagement.netWeight
+          this.paymentList.solidGrainPrice = (Number(this.paymentList.grainMoney) / Number(this.paymentList.pureWeight)).toFixed(4)
+          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
+            Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList.freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) - Number(this.paymentList.qualityDeduction)
           this.paymentList.calculationPayable = this.paymentList.calculationPayable.toFixed(2)
 
           this.paymentList.actualPayment = this.paymentList.calculationPayable
           this.actualPayment(this.paymentList.actualPayment)
-        } else {
-          this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList
-            .unitDeduction) * this.paymentList.weighingManagement.netWeight
-          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList
-              .weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
+        } else if(this.paymentList.type == '干粮') {
+          this.paymentList.grainMoney = (this.paymentList.qualityInspectionManagement.dryGrainPrice - this.paymentList.unitDeduction) * this.paymentList.weighingManagement.netWeight
+          this.paymentList.calculationPayable = Number(this.paymentList.grainMoney) + Number(this.paymentList.weighingSubsidy) + Number(this.paymentList.freightSubsidy) + Number(this.paymentList.unloadSubsidy) +
             Number(this.paymentList.otherSubsidy) - Number(this.paymentList.weighingDeduction) - this.paymentList
             .freightDeduction - Number(this.paymentList.unloadDeduction) - Number(this.paymentList.otherDeduction) -
             Number(this.paymentList.qualityDeduction)
@@ -645,6 +660,7 @@
         this.paymentList.id = this.$route.query.id
         this.paymentList.amountIngPayable = this.paymentList.actualPayment
         this.paymentList.settlementClerk = localStorage.getItem('ws-pf_staffName')
+        delete this.paymentList.contractManagement
         postpaymentedit(this.paymentList).toPromise().then((response) => {
           getpaymentexamine({
             id: this.$route.query.id

+ 316 - 0
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -0,0 +1,316 @@
+// 检斤记录
+<template>
+  <div class="container">
+    <el-row class="toptitle">
+      <el-col :span="12">
+        <h2 class="bg-left title">检斤记录</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button type="primary" size="small" @click="returnsales()">
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <div class="center">
+      <el-row>
+        <el-col :span="12">
+            <el-button :type="warehousingType == 1?'primary':''" size="small" @click="changeType(1)" class="btn_css btn_topcss">贸易入库</el-button>
+            <el-button :type="warehousingType == 3?'primary':''" size="small" @click="changeType(3)" class="btn_css btn_topcss">收购入库</el-button>
+        </el-col>
+        <el-col :span="12" class="bg-right">
+          <div style="display:flex">
+            <el-select v-model="warehouseName" placeholder="请选择仓库名" @change="warehouseNameChange">
+              <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
+                :value="item.warehouseName"></el-option>
+            </el-select>
+            <el-input :placeholder="warehousingType == 1 ? '可按业务编号、合同编号/移库编号、车牌号查找':'可按业务编号、车牌号、客户名查找'" clearable v-model="searchKeyWord" class="search_css"></el-input>
+            <!-- <el-input placeholder="可按业务编号、车牌号、客户名查找" clearable v-model="searchKeyWord"></el-input> -->
+            <el-button type="primary" size="small" @click="lookup">查找</el-button>
+          </div>
+        </el-col>
+      </el-row>
+       <el-button :type="choice == ''?'primary':''" size="small" @click="screen()" class="btn_css">全部</el-button>
+          <el-button :type="choice == 2?'primary':''" size="small" @click="screen(2)" class="btn_css">已称毛重</el-button>
+          <el-button :type="choice == 3?'primary':''" size="small" @click="screen(3)" class="btn_css">已称皮重</el-button>
+      <el-table class="forData" :data="weighingRecordList" style="width: 100%; margin-top: 20px" height="780">
+        <el-table-column type="index" label="序号" width="80">
+          <template scope="scope">
+            <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+            <span v-else>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="number" label="业务编号"></el-table-column>
+        <el-table-column prop="contractNo" label="合同编号/移库编号" v-if="warehousingType == 1" width="130">
+        <template scope="scope">
+          <span v-if="scope.row.contractNo">{{scope.row.contractNo}}</span>
+          <span v-else>{{scope.row.moveTaskNo}}</span>
+        </template>
+        
+        </el-table-column>
+        <!--//moveTaskNo -->
+        <el-table-column prop="customer" label="客户" v-if="warehousingType == 3"></el-table-column>
+        <el-table-column prop="carNumber" label="车牌号"></el-table-column>
+        <el-table-column prop="goodsName" label="货名"></el-table-column>
+        <el-table-column prop="grossWeight" label="毛重(公斤)" width="100"></el-table-column>
+        <el-table-column prop="tare" label="皮重(公斤)" width="100"></el-table-column>
+        <el-table-column prop="buckleMiscellaneous" label="扣重(公斤)" width="100"></el-table-column>
+        <el-table-column prop="netWeight" label="净重(公斤)" width="100"></el-table-column>
+        <el-table-column prop="secretaryWeigher" label="司称员"></el-table-column>
+        <el-table-column prop="grossDate" label="检斤时间"></el-table-column>
+        <el-table-column prop="status" label="状态"></el-table-column>
+        <el-table-column label="操作">
+          <template scope="scope">
+            <!-- <el-button size="small" @click="print(scope.row)">打印</el-button> -->
+            <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' || scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div style="text-align: center; padding: 10px">
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单">
+      <weightCheckPrint :tableData="dialogData"></weightCheckPrint>
+      <div style="text-align:center">
+        <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    selectWarehouseSelf,
+    getweighingList,
+    getPrint
+  } from '@/model/houseSelfCollect/index'
+   import weightCheckPrint from './component/weightCheckPrint.vue'
+  export default {
+      components: {
+      weightCheckPrint
+    },
+    data() {
+      return {
+        weighingRecordList: [],
+        warehouseId: '',
+        warehouseName: '',
+        // goodsNameList: [],
+        // goodsNameAllList: [],
+        // binNoList: [],
+        // binNumberId: '', //仓位Id
+        // warehouseType: '',
+        compId: '',
+        //分页
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        deptBudgetTotal: 0,
+        warehouseList: [], //仓库
+        searchKeyWord: "",
+        choice: '',
+        warehousingType: 1,
+        isShowPrint:false,
+        dialogData:{},
+        title:"",
+      }
+    },
+    activated() {
+      //仓库
+      selectWarehouseSelf({
+          compId: localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = response
+        })
+      this.compId = localStorage.getItem('ws-pf_compId')
+      this.warehousingType = this.$route.query.inWarehouseType 
+      this.warehouseName = this.$route.query.warehouseName //仓库名
+      this.getList()
+    },
+    methods: {
+      lookup(){
+        this.getList()
+      },
+      changeType(val) {
+        this.warehousingType = val
+        this.getList()
+      },
+      screen(num) {
+        this.choice = num
+        this.getList()
+      },
+      returnsales() {
+        this.$router.go(-1)
+      },
+     print(row) {
+          getPrint({
+              id: row.id
+            })
+            .toPromise()
+            .then((response) => {
+              this.isShowPrint = true
+              this.dialogData = response
+              if (response.compName == '黑龙江秋收有限公司') {
+                this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
+              }
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+      },
+      printSmall() {
+        window.open('../../../../static/weightCheck.html?type=1&tableData=' + JSON.stringify(this.dialogData))
+      },
+      printBig(type, radioType) {
+        // if (type == 1) {
+        //   localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
+        //   window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
+        // } else if (type == 2) {
+        //   localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
+        //   window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
+        // } else {
+
+          window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogData))
+        // }
+      },
+      warehouseNameChange() {
+        this.getList()
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      getList() {
+        // 列表
+        getweighingList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchKeyWord: this.searchKeyWord,
+            warehouseName: this.warehouseName,
+            managementType: 1,
+            serviceManagementType: this.warehousingType,
+            statusType:this.choice
+          })
+          .toPromise()
+          .then((response) => {
+            this.weighingRecordList = response.records
+            this.deptBudgetTotal = response.total
+          })
+          .catch((response) => {
+            // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          })
+      },
+
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .toptitle {
+    background: #f6f7fc;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .top-title {
+    width: 50%;
+    display: flex;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  .center {
+    margin: auto;
+  }
+
+  .centertitle {
+    display: flex;
+    margin: 10px 0;
+  }
+
+  .temporary {
+    line-height: 80px;
+    font-size: 20px;
+    color: #abaaaa;
+  }
+
+  /deep/.forData .cell {
+    text-align: center;
+  }
+
+  //弹出框
+  .eject-warehouse {
+    font-size: 20px;
+    margin-left: 15px;
+    font-weight: 600;
+  }
+
+  .table_css {
+    margin: 20px auto;
+
+    tr {
+      height: 50px;
+    }
+
+    .table_item {
+      min-width: 70px;
+    }
+
+    td {
+      text-align: center;
+      font-size: 18px;
+      font-weight: 600;
+    }
+
+    .el-select {
+      width: 90%;
+    }
+  }
+  .btn_topcss{
+    margin-top: 15px;
+
+  }
+  .btn_css{
+      width: 90px;
+      margin-left: 10px;
+    }
+    .search_css{
+      margin: 0 20px;
+    }
+</style>

+ 2 - 2
src/views/outboundManagement/collectionManagement.vue

@@ -78,10 +78,10 @@
     <el-dialog width="25%" title="收款" :visible.sync="collectForm" :append-to-body="true">
       <el-form :model="form">
         <el-form-item label="未收金额(元)" :label-width="formLabelWidth">
-          <el-input v-model="allmoney1" autocomplete="off" class="deal"></el-input>
+          <el-input type='number' v-model="allmoney1" autocomplete="off" class="deal"></el-input>
         </el-form-item>
         <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
-          <el-input v-model="collectmoney" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
+          <el-input type='number' v-model="collectmoney" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
         </el-form-item>
         <el-form-item label="收款日期" prop="collectionDate" :label-width="formLabelWidth" class="deal">
           <ws-date-picker v-model="collectionDate" type="date" placeholder="请选择收款日期" value-format="yyyy-MM-dd"

+ 169 - 0
src/views/outboundManagement/component/inspectInfoPrint.vue

@@ -0,0 +1,169 @@
+<!--质检信息-->
+<template>
+  <div class="center">
+    <div class="number">{{ printData.qualityNo }}</div>
+    <table class="table">
+      <tr class="row">
+        <td class="col col-bgc">客户姓名</td>
+        <td class="col" colspan="2">{{ printData.customerName }}</td>
+        <td class="col col-bgc">客户电话</td>
+        <td class="col" colspan="2">{{ printData.customerPhone }}</td>
+        <td class="col col-bgc">车牌号</td>
+        <td class="col">{{ printData.carNumber }}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">箱号-1</td>
+        <td class="col">{{ printData.boxNo }}</td>
+        <td class="col col-bgc">箱号-2</td>
+        <td class="col">{{ printData.boxNoOther }}</td>
+        <td class="col col-bgc">封号-1</td>
+        <td class="col">{{ printData.titleNo }}</td>
+        <td class="col col-bgc">封号-2</td>
+        <td class="col">{{ printData.titleNoOther }}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">收货单位</td>
+        <td class="col" colspan="2">{{ printData.compName }}</td>
+        <td class="col col-bgc">联系人</td>
+        <td class="col" colspan="2">{{ printData.person }}</td>
+        <td class="col col-bgc">联系电话</td>
+        <td class="col">{{printData.personPhone}}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">货名</td>
+        <td class="col">{{ printData.goodsName }}</td>
+        <td class="col col-bgc">类型</td>
+        <td class="col">{{ printData.type }}</td>
+        <td class="col col-bgc">容量(克/升)</td>
+        <td class="col">{{ printData.bulkDensity }}</td>
+        <td class="col col-bgc">不完善粒(%)</td>
+        <td class="col">{{ printData.imperfectGrain }}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">等级</td>
+        <td class="col">{{ printData.grade }}</td>
+        <td class="col col-bgc">水分(%)</td>
+        <td class="col">{{ printData.waterContent }}</td>
+        <td class="col col-bgc">热损伤(%)</td>
+        <td class="col">{{ printData.jiaorenli }}</td>
+        <td v-if="printData.confirm == '1'" class="col col-bgc">单价(元/公斤)</td>
+        <td v-else class="col col-bgc">待定单价(元/公斤)</td>
+        <td v-if="printData.type == '潮粮'" class="col">{{ printData.tidalGrainPrice }}</td>
+        <td v-else class="col">{{ printData.dryGrainPrice }}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">杂质(%)</td>
+        <td class="col">{{ printData.impurity }}</td>
+        <td class="col col-bgc">霉变粒(%)</td>
+        <td class="col">{{ printData.mildewGrain }}</td>
+        <td v-if="printData.paramType == '1'"  class="col col-bgc">扣杂</td>
+        <td v-if="printData.paramType == '1'"  class="col">{{printData.buckleMiscellaneous}}</td>
+        <td v-if="printData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
+        <td v-else class="col col-bgc" colspan="2">购粮性质</td>
+        <td v-if="printData.paramType == '1'" class="col" colspan="1">{{ printData.natureOfGrainPurchase }}</td>
+        <td v-else class="col" colspan="2">{{ printData.natureOfGrainPurchase }}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">仓位号</td>
+        <td class="col">{{ printData.binNumber }}</td>
+        <td class="col col-bgc">囤位号</td>
+        <td class="col">{{ printData.storageTagNo }}</td>
+        <td class="col col-bgc" colspan="2">质检员</td>
+        <td class="col" colspan="2">{{ printData.qualityInspector }}</td>
+      </tr>
+    </table>
+    <div class="bottom">
+      <div class="bottom-row1">
+        <div></div>
+        <div>{{ printData.qualityDate }}</div>
+      </div>
+      <div class="bottom-row2">
+        <div class="left">
+          <img :src="printData.codeUrl" alt="" />
+        </div>
+        <div class="config">收货单位签名或盖章:</div>
+        <div class="">客户签名:</div>
+      </div>
+      <div class="bottom-row3">扫一扫</div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    components: {},
+    props: {
+      printData: {
+        type: Object
+      }
+    },
+    data() {
+      return {
+
+      }
+    },
+    activated() {
+
+    },
+    methods: {
+
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .number {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+
+  table,
+  table tr th,
+  table tr td {
+    border: 2px solid #333333;
+    padding: 5px 0;
+  }
+
+  table {
+    width: 100%;
+    min-height: 25px;
+    line-height: 25px;
+    text-align: center;
+    border-collapse: collapse;
+    border: 3px solid #333333;
+  }
+
+  .col-bgc {
+    background: #f6f7fb;
+  }
+
+  .bottom-row1 {
+    display: flex;
+    justify-content: space-between;
+    margin: 10px 0;
+  }
+
+  .bottom-row2 {
+    display: flex;
+    margin: 10px 0;
+
+    .left {
+      img {
+        width: 120px;
+        height: 120px;
+        margin-right: 118px;
+      }
+    }
+
+    .config {
+      margin-right: 240px;
+    }
+  }
+
+  .bottom-row3 {
+    margin: 10px 0;
+  }
+
+  .bottom-row4 {
+    margin-top: 50px;
+    text-align: center;
+  }
+</style>

+ 155 - 0
src/views/outboundManagement/component/outInspectPrint.vue

@@ -0,0 +1,155 @@
+<!--质检信息-->
+<template>
+  <div class="center">
+    <div class="number">{{ printData.qualityNo }}</div>
+    <table class="table">
+      <tr class="row">
+        <td class="col col-bgc">收货单位</td>
+        <td class="col" colspan="2">{{ printData.contractManagement.buyer }}</td>
+        <td class="col col-bgc">联系电话</td>
+        <td class="col" colspan="2">{{ printData.contractManagement.buyerPhone }}</td>
+        <td class="col col-bgc">车牌号</td>
+        <td class="col">{{ printData.carNumber }}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">发货单位</td>
+        <td class="col" colspan="2">{{ printData.contractManagement.seller }}</td>
+        <td class="col col-bgc">联系人</td>
+        <td class="col" colspan="2">{{ printData.contractManagement.feedbackLeader }}</td>
+        <td class="col col-bgc">联系电话</td>
+        <td class="col">{{ printData.contractManagement.sellerPhone }}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">货名</td>
+        <td class="col">{{ printData.goodsName }}</td>
+        <td class="col col-bgc">类型</td>
+        <td class="col">{{ printData.weighingManagement.type }}</td>
+        <td class="col col-bgc">容量(克/升)</td>
+        <td class="col">{{ printData.bulkDensity }}</td>
+        <td class="col col-bgc">不完善粒(%)</td>
+        <td class="col">{{ printData.imperfectGrain }}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">等级</td>
+        <td class="col">{{ printData.grade }}</td>
+        <td class="col col-bgc">水分(%)</td>
+        <td class="col">{{ printData.waterContent }}</td>
+        <td class="col col-bgc">热损伤(%)</td>
+        <td class="col">{{ printData.jiaorenli }}</td>
+        <td v-if="printData.contractManagement.priceType == '定价销售'" class="col col-bgc">单价(元/公斤)</td>
+        <td v-else class="col col-bgc">待定单价(元/公斤)</td>
+        <!-- <td v-if="printData.type == '潮粮'" class="col">{{ printData.tidalGrainPrice }}</td> -->
+        <td class="col">{{ printData.contractManagement.unitContractPrice }}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">杂质(%)</td>
+        <td class="col">{{ printData.impurity }}</td>
+        <td class="col col-bgc">霉变粒(%)</td>
+        <td class="col">{{ printData.mildewGrain }}</td>
+        <td v-if="printData.paramType == '1'"  class="col col-bgc">扣杂</td>
+        <td v-if="printData.paramType == '1'"  class="col">{{printData.buckleMiscellaneous}}</td>
+        <!-- <td v-if="printData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
+        <td v-else class="col col-bgc" colspan="2">购粮性质</td>
+        <td v-if="printData.paramType == '1'" class="col" colspan="1">{{ printData.natureOfGrainPurchase }}</td>
+        <td v-else class="col" colspan="2">{{ printData.natureOfGrainPurchase }}</td> -->
+        <td colspan="2"></td>
+      </tr>
+    </table>
+    <div class="bottom">
+      <div class="bottom-row1">
+        <div></div>
+        <div>{{ printData.qualityDate }}</div>
+      </div>
+      <div class="bottom-row2">
+        <div class="left">
+          <img :src="printData.codeUrl" alt="" />
+        </div>
+        <div class="config">发货单位签名或盖章:</div>
+        <div class="">客户签名:</div>
+      </div>
+      <div class="bottom-row3">扫一扫</div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    components: {},
+    props: {
+      printData: {
+        type: Object
+      }
+    },
+    data() {
+      return {
+
+      }
+    },
+    activated() {
+
+    },
+    methods: {
+
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .number {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+
+  table,
+  table tr th,
+  table tr td {
+    border: 2px solid #333333;
+    padding: 5px 0;
+  }
+
+  table {
+    width: 100%;
+    min-height: 25px;
+    line-height: 25px;
+    text-align: center;
+    border-collapse: collapse;
+    border: 3px solid #333333;
+  }
+
+  .col-bgc {
+    background: #f6f7fb;
+  }
+
+  .bottom-row1 {
+    display: flex;
+    justify-content: space-between;
+    margin: 10px 0;
+  }
+
+  .bottom-row2 {
+    display: flex;
+    margin: 10px 0;
+
+    .left {
+      img {
+        width: 120px;
+        height: 120px;
+        margin-right: 118px;
+      }
+    }
+
+    .config {
+      margin-right: 240px;
+    }
+  }
+
+  .bottom-row3 {
+    margin: 10px 0;
+  }
+
+  .bottom-row4 {
+    margin-top: 50px;
+    text-align: center;
+  }
+  .center{
+    background: #ffffff !important;
+  }
+</style>

+ 73 - 16
src/views/outboundManagement/component/route.js

@@ -13,18 +13,46 @@ const outboundManagementRouter = {
     },
     children: [
         // 检斤管理
+        // {
+        //     path:'weighingManagement',
+        //     component: () =>
+        //         import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/weighingManagement'),
+        //     name:'weighingManagement',
+        //     meta: {
+        //         title:'weighingManagement',
+        //         shortcutEntrance:'outboundManagement',
+        //         module:'outbound.acquisitionWeightOut.view',
+        //         permissicon: [],
+        //         keepAlive: true
+        //     }
+        // },
         {
-            path:'weighingManagement',
+          path:'weighingManagement',
+          component: () =>
+              import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/weighingManagementNew'),
+          name:'weighingManagement',
+          meta: {
+              title:'weighingManagement',
+              shortcutEntrance:'outboundManagement',
+              module:'outbound.acquisitionWeightOut.view',
+              permissicon: [],
+              keepAlive: false
+          }
+      },
+      // 检斤记录
+      {
+            path:'weighingManagementrecord',
             component: () =>
-                import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/weighingManagement'),
-            name:'weighingManagement',
+                import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/weighingManagementrecord'),
+            name:'weighingManagementrecord',
             meta: {
-                title:'weighingManagement',
+                title:'weighingManagementrecord',
                 shortcutEntrance:'outboundManagement',
                 module:'outbound.acquisitionWeightOut.view',
                 permissicon: [],
                 keepAlive: true
-            }
+            },
+            hidden: true
         },
         //检斤信息
         {
@@ -42,18 +70,47 @@ const outboundManagementRouter = {
             hidden: true
           },
         // 质检管理
+        // {
+        //     path: 'qualityInspectionManagement',
+        //     component: () =>
+        //         import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/qualityInspectionManagement'),
+        //     name:'qualityInspectionManagement',
+        //     meta: {
+        //         title:'qualityInspectionManagement',
+        //         shortcutEntrance:'outboundManagement',
+        //         module:'outbound.acquisitionQualityOut.view',
+        //         permissicon: [],
+        //         keepAlive: true
+        //     }
+        // },
+         // 质检管理
+         {
+          path: 'newQualityInspectionManagement',
+          component: () =>
+              import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/newQualityInspectionManagement'),
+          name:'newQualityInspectionManagement',
+          meta: {
+              title:'newQualityInspectionManagement',
+              shortcutEntrance:'outboundManagement',
+              module:'outbound.acquisitionQualityOut.view',
+              permissicon: [],
+              keepAlive: true
+          }
+        },
+        // 质检记录
         {
-            path: 'qualityInspectionManagement',
-            component: () =>
-                import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/qualityInspectionManagement'),
-            name:'qualityInspectionManagement',
-            meta: {
-                title:'qualityInspectionManagement',
-                shortcutEntrance:'outboundManagement',
-                module:'outbound.acquisitionQualityOut.view',
-                permissicon: [],
-                keepAlive: true
-            }
+          path: 'outInspectRecord',
+          component: () =>
+            import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/outInspectRecord'),
+          name: 'outInspectRecord',
+          meta: {
+            title: 'outInspectRecord',
+            shortcutEntrance: 'outInspectRecord',
+            module: 'outbound.acquisitionQualityOut.edit',
+            permissicon: [],
+            keepAlive: true
+          },
+          hidden: true
         },
         // 查看/编辑质检信息
         {

+ 184 - 0
src/views/outboundManagement/component/weightCheckPrint.vue

@@ -0,0 +1,184 @@
+<template>
+    <div class="center">
+        <!-- <div class="title">粮食检斤单</div> -->
+        <div class="number">{{tableData.number}}</div>
+        <table class="table">
+          <tr class="row">
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户姓名</td>
+            <td class="col" colspan="2" v-if="tableData.serviceManagementType == 3">{{tableData.customer}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">发货单位</td>
+            <td class="col" colspan="2" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户电话</td>
+            <td class="col" v-if="tableData.serviceManagementType == 3">{{tableData.customerPhone}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">联系电话</td>
+            <td class="col" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col" colspan="2">{{tableData.carNumber}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">收货单位</td>
+            <td class="col" colspan="2">{{tableData.compName}}</td>
+            <td class="col col-bgc">联系人</td>
+            <td class="col" >{{tableData.person}}</td>
+            <td class="col col-bgc">联系电话</td>
+            <td class="col" colspan="2">{{tableData.personPhone}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">货名</td>
+            <td class="col">{{tableData.goodsName}}</td>
+            <td class="col col-bgc">类型</td>
+            <td class="col">{{tableData.type}}</td>
+            <td class="col col-bgc">容量(克/升)</td>
+            <td class="col">{{tableData.qualityInspectionManagement.bulkDensity}}</td>
+            <td class="col col-bgc">不完善粒(%)</td>
+            <td class="col">{{tableData.qualityInspectionManagement.imperfectGrain}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">等级</td>
+            <td class="col">{{tableData.qualityInspectionManagement.grade}}</td>
+            <td class="col col-bgc">水分(%)</td>
+            <td class="col">{{tableData.qualityInspectionManagement.waterContent}}</td>
+            <td class="col col-bgc">热损伤(%)</td>
+            <td class="col">{{tableData.qualityInspectionManagement.jiaorenli}}</td>
+            <td class="col col-bgc" colspan="2">质检&nbsp;&nbsp;{{tableData.qualityInspectionManagement.qualityDate}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">杂质(%)</td>
+            <td class="col">{{tableData.qualityInspectionManagement.impurity}}</td>
+            <td class="col col-bgc">霉变粒(%)</td>
+            <td class="col">{{tableData.qualityInspectionManagement.mildewGrain}}</td>
+            <td class="col col-bgc">扣杂</td>
+            <td class="col">{{tableData.qualityInspectionManagement.buckleMiscellaneous}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">毛重(公斤)</td>
+            <td class="col">{{tableData.grossWeight}}</td>
+            <td class="col col-bgc">皮重(公斤)</td>
+            <td class="col">{{tableData.tare}}</td>
+             <td class="col col-bgc">扣重(公斤)</td>
+            <td class="col">{{tableData.buckleMiscellaneous}}</td>
+            <td class="col col-bgc">净重(公斤)</td>
+            <td class="col">{{tableData.netWeight}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc" colspan="2">毛重检斤时间</td>
+            <td class="col" colspan="2">{{tableData.grossDate}}</td>
+            <td class="col col-bgc" colspan="2"> 皮重检斤时间</td>
+            <td class="col" colspan="2">{{tableData.tareDate}}</td>
+          </tr>
+        </table>
+        <div class="bottom">
+          <div class="bottom-row1">
+            <div>毛检:{{tableData.secretaryWeigher}}</div>
+            <div style="margin-left:60px">皮检:{{tableData.skinInspector}}</div>
+            <!-- <div>{{tableData.qualityDate}}</div> -->
+          </div>
+          <div class="bottom-row2">
+            <div class="left">
+              <img :src="tableData.codeUrl" alt="" />
+            </div>
+            <div class="config">收货单位签名或盖章:</div>
+            <div class="autograph">客户签名:</div>
+            <div class="autograph">司机签名:</div>
+          </div>
+          <div class="bottom-row3">扫一扫</div>
+           <!-- <div class="bottom-row4">
+         <el-button type="primary">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button> 
+      </div> -->
+        </div>
+        
+    </div>
+</template>
+<script>
+
+export default{
+    props: {
+      tableData: {
+        type: Object
+      }
+    },
+      data(){
+          return{
+
+          }
+      },
+      methods:{
+        
+            printSmall() {
+      window.location.href =
+        '../../../../static/weightCheck.html?type=1&tableData=' +
+        JSON.stringify(this.tableData)
+    },
+    printBig() {
+      window.location.href =
+        '../../../../static/weightCheck.html?type=2&tableData=' +
+        JSON.stringify(this.tableData)
+    },
+
+      }
+}
+</script>
+<style lang="scss" scoped>
+ .number {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+  table,
+  table tr th,
+  table tr td {
+    border: 2px solid #333333;
+    padding: 5px 0;
+  }
+
+  table {
+    width: 100%;
+    min-height: 25px;
+    line-height: 25px;
+    text-align: center;
+    border-collapse: collapse;
+    border: 3px solid #333333;
+  }
+
+  .col-bgc {
+    background: #f6f7fb;
+  }
+
+  .bottom-row1 {
+    display: flex;
+    // justify-content: space-between;
+    margin: 10px 0;
+  }
+
+  .bottom-row2 {
+    display: flex;
+    margin: 10px 0;
+
+    .left {
+      img {
+        width: 120px;
+        height: 120px;
+        margin-right: 118px;
+      }
+    }
+
+    .config {
+        margin-top: 20px;
+      margin-right: 240px;
+    }
+    .autograph{
+        margin-top: 20px;
+        margin-right: 240px;
+    }
+  }
+
+  .bottom-row3 {
+    margin: 10px 0;
+  }
+
+  .bottom-row4 {
+    margin-top: 50px;
+    text-align: center;
+  }
+</style> 

+ 743 - 0
src/views/outboundManagement/newQualityInspectionManagement.vue

@@ -0,0 +1,743 @@
+<!--质检信息-->
+<template>
+  <div class="center">
+    <div class="substance">
+      <div class="substance-left">
+          <div class="titleTop">
+            <div class="title"></div>
+            <div class="textword">基本信息</div>
+          </div>
+        <ws-form>
+          <ws-info-table>
+            <ws-form-item label="任务编号" span="1" prop="contractNo">
+              <ws-input v-model="inspect.contractNo" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="仓位号" span="1" prop="binNumber">
+              <ws-input v-model="inspect.binNumber" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="业务编号" span="1" prop="number">
+              <ws-input v-model="inspect.weighingManagement.number" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="囤位号" span="1" prop="storageTagNo">
+              <ws-input v-model="inspect.storageTagNo" placeholder="暂无" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="合同/移库编号" span="1" prop="contractNo"><!--moveTaskNo-->
+              <ws-input v-model="inspect.contractNo" placeholder="自动获取,不可编辑" disabled size="small" v-if="inspect.contractNo" />
+              <ws-input v-model="inspect.moveTaskNo" placeholder="自动获取,不可编辑" disabled size="small" v-else/>
+            </ws-form-item>
+            <ws-form-item label="提示" span="1" prop="tips">
+              <ws-input v-model="inspect.weighingManagement.tips" placeholder="暂无" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="货名" span="1" prop="goodsName">
+              <ws-input v-model="inspect.goodsName" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="经办人" span="1" prop="secretaryWeigher">
+              <ws-input v-model="inspect.weighingManagement.secretaryWeigher" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="出库类型" span="1" prop="inOutType">
+              <ws-input v-model="inspect.weighingManagement.inOutType" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="出库日期" span="1" prop="updateDate">
+              <ws-input v-model="inspect.updateDate" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="运输方式" span="1" prop="outType">
+              <ws-input v-model="inspect.weighingManagement.outType" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="车队" span="1" prop="fleet">
+              <ws-input v-model="inspect.fleet" placeholder="非车队车辆" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
+              <ws-input v-model="inspect.carNumber" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+
+            <ws-form-item label="箱号-1" span="1" prop="boxNo">
+              <ws-input v-model="inspect.boxNo" placeholder="暂无" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
+              <ws-input v-model="inspect.boxNoOther" placeholder="暂无" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="封号-1" span="1" prop="titleNo">
+              <ws-input v-model="inspect.titleNo" placeholder="暂无" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="封号-2" span="1" prop="titleNoOther">
+              <ws-input v-model="inspect.titleNoOther" placeholder="暂无" disabled size="small" />
+            </ws-form-item>
+          </ws-info-table>
+        </ws-form>
+      </div>
+      <div class="substance-right">
+        <el-select v-model="warehouseName" placeholder="请选择仓库名" @change="warehouseNameChange">
+          <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
+            :value="item.warehouseName">
+          </el-option>
+        </el-select>
+        <div class="screen">
+          <div class="screen_left">
+            <el-badge :value="noinspectList.length" class="badge_item">
+              <div :class="inspectbtn == 1 ? 'inspect_css':'noinspect_css'" @click="inspectChange(1)">未质检</div>
+            </el-badge>
+            <el-badge :value="inspectList.length" class="badge_item">
+              <div :class="inspectbtn == 2 ? 'inspect_css':'noinspect_css'" @click="inspectChange(2)">已质检</div>
+            </el-badge>
+          </div>
+          <div class="screen_right">
+            <div class="record" @click="record">记录</div>
+          </div>
+        </div>
+
+        <!-- <el-table @cell-click='listclick' :data="inspectList" style="width: 100%; margin-top: 20px" ref="inspect" border>
+          <el-table-column prop="qualityNo" label="业务编号"></el-table-column>
+          <el-table-column prop="carNumber" label="车牌号"></el-table-column>
+          <el-table-column prop="status" label="状态">
+            <template slot-scope="scope">
+              <span v-if='scope.row.confirm=="1"'>
+                已确认
+              </span>
+              <span v-else>
+                {{scope.row.status}}
+              </span>
+            </template>
+          </el-table-column>
+        </el-table> -->
+        <el-table ref="singleTable" :data="switchList" highlight-current-row @current-change="rowChange"
+              style="width: 100%; overflow-y: scroll !important; height: calc(100vh - 54vh);margin-top:14px">
+              <el-table-column property="number" label="业务编号">
+                <span slot-scope="scope">{{scope.row.weighingManagement?scope.row.weighingManagement.number:""}}</span>
+              </el-table-column>
+              <el-table-column property="carNumber" label="车牌号">
+              </el-table-column>
+              <el-table-column property="status" label="状态">
+              </el-table-column>
+            </el-table>
+            <div style="text-align: center">
+              <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+                :total="deptBudgetTotal">
+              </el-pagination>
+            </div>
+      </div>
+    </div>
+    <div class="footer">
+      <div class="titleTop">
+        <div class="title"></div>
+        <div class="textword">质检数据</div>
+      </div>
+      <div class="formList">
+        <ws-form>
+            <ws-info-table>
+          <ws-form-item label="等级" prop="grade">
+            <ws-select v-model="inspect.grade" placeholder="请输入等级" class="typeselect" :disabled="disabled">
+              <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+          <ws-form-item label="杂质(%)" prop="impurity">
+            <el-input v-model="inspect.impurity" placeholder="请输入杂质占比" maxlength="10" size="small" type="number" :disabled="disabled" />
+          </ws-form-item>
+          <ws-form-item label="水分(%)" prop="waterContent">
+            <el-input v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="10" size="small" type="number" :disabled="disabled" />
+          </ws-form-item>
+          <ws-form-item label="霉变粒(%)"  prop="mildewGrain">
+            <el-input v-model="inspect.mildewGrain" placeholder="请输入霉变粒占比" maxlength="10" size="small" type="number" :disabled="disabled" />
+          </ws-form-item>
+          <ws-form-item label="容重(克/升)"  prop="bulkDensity">
+            <el-input v-model="inspect.bulkDensity" placeholder="请输入容重" maxlength="10" size="small" type="number" :disabled="disabled" />
+          </ws-form-item>
+          <ws-form-item label="热损伤(%)"  prop="jiaorenli">
+            <el-input v-model="inspect.jiaorenli" placeholder="请输入热损伤占比" maxlength="10" size="small" type="number" :disabled="disabled" />
+          </ws-form-item>
+          <ws-form-item label="不完善粒(%)"  prop="imperfectGrain">
+            <el-input v-model="inspect.imperfectGrain" placeholder="请输入不完善粒占比" maxlength="10" size="small" type="number" :disabled="disabled" />
+          </ws-form-item>
+          </ws-info-table>
+        </ws-form>
+        <div class="but">
+            <!-- <el-button @click="print" type="primary">提交</el-button> -->
+            <el-button @click="print" type="primary">提交并打印</el-button>
+          </div>
+      </div>
+    </div>
+     <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单"  @close="closeDialog">
+      <!-- <inspectInfoPrint :printData="printData"></inspectInfoPrint> -->
+      <outInspectPrint :printData="printData" ref="saveImg"></outInspectPrint>
+      <div style="text-align:center">
+        <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    addOut,
+    selectWarehouseSelf,
+    getinspectList
+  } from '@/model/outboundManagement/index'
+  import {
+    packList
+  } from '@/model/contarct/index'
+  import html2canvas from 'html2canvas'
+    import axios from 'axios'
+   import outInspectPrint from './component/outInspectPrint.vue'
+  export default {
+    components: {
+      outInspectPrint,
+    },
+    watch: {},
+    data() {
+      return {
+        inspect: {
+          weighingManagement:{}
+        },
+        disabled: false,
+        gradeList: [],
+        cangid: '', //仓库id
+        warehouseName: '',
+        warehouseList: [],
+        inspectbtn: 1,
+        inspectList: [],
+        noinspectList:[],
+        switchList:[],
+        //分页
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        deptBudgetTotal: 0,
+        managementType: 3,
+        isShowPrint:false,
+        printData:{}
+      }
+    },
+    activated() {
+    //   this.cangid = this.$route.query.cangid
+    //   this.warehouseName = this.$route.query.warehouseName
+    //   this.inspect.contractNo = this.$route.query.contractNo
+    //   this.inspect.binNumber = this.$route.query.binNumber
+    //   this.inspect.carNumber = this.$route.query.carNumber
+    //   this.inspect.goodsName = this.$route.query.goodsName
+    //   this.inspect.storageTagNo = this.$route.query.storageTagNo
+    //   let id = this.$route.query.id
+    //   this.cangNo = this.$route.query.warehouseNo
+    //   this.count = Number(this.$route.query.count) + 1
+    // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+      //仓库
+      selectWarehouseSelf({
+          compId: localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = response
+          if (localStorage.getItem('ck')) {
+            this.warehouseName = localStorage.getItem('ck')
+            for (var i = 0; i < response.length; i++) {
+              if (this.warehouseName == this.warehouseList[i].warehouseName) {
+                this.cangid = this.warehouseList[i].id
+                break
+              }
+            }
+          } else {
+            this.warehouseName = this.warehouseList[0].warehouseName
+            localStorage.setItem('ck', this.warehouseName)
+            this.cangid = this.warehouseList[0].id
+          }
+          this.getList()
+        })
+    },
+    methods: {
+      printSmall(){
+        this.inspect.type = 1
+        localStorage.setItem('out-Warehouse_print',JSON.stringify( this.inspect))
+        window.open('../../../static/outInspectionPrint.html')
+      },
+       printBig(){
+         this.inspect.type = 2
+        localStorage.setItem('out-Warehouse_print',JSON.stringify(this.inspect))
+        window.open('../../../static/outInspectionPrint.html')
+       },
+      warehouseNameChange() {
+        this.getList()
+      },
+      record(){
+        this.$router.push({
+          path:'outInspectRecord',
+          query:{warehouseName: this.warehouseName}
+        })
+
+      },
+      inspectChange(num) {
+        this.inspectbtn = num
+        if(num == 1){
+          this.switchList = this.noinspectList
+        }else if(num == 2){
+          this.switchList = this.inspectList
+        }
+        if(this.switchList.length > 0){
+         this.inspect = this.switchList[0]
+         if(!this.inspect.weighingManagement){
+           this.inspect.weighingManagement = {}
+         }
+        }else{
+          this.inspect = {}
+        }
+        
+        this.deptBudgetTotal =  this.switchList.length
+
+      },
+       handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+        handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+       rowChange(val) {
+        // if(this.tpyeNo == 2 && this.status == 1 && val.qualityInspectionManagement.confirm == 0){
+        //    this.$message({
+        //       message: '该条质检信息未确认',
+        //       type: 'warning'
+        //     });
+        // }
+        if(val){
+        this.inspect = val
+        }
+      },
+      getdate() {
+        var date = new Date()
+        var year = date.getFullYear() //获取完整的年份(4位)
+        var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+        var datetime = date.getDate() //获取当前日(1-31)
+        if (mouth < 10) {
+          mouth = '0' + mouth
+        }
+        if (datetime < 10) {
+          datetime = '0' + datetime
+        }
+        return year + '' + mouth + datetime
+      },
+      closeDialog() {
+        html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+          let dataURL = canvas.toDataURL('image/png')
+          this.imgUrl = dataURL
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+            let formdata = new FormData()
+            formdata.append('file', b)
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata,
+            }).then((response) => {
+              //编辑接口
+              this.inspect.pictureAddress = response.data.url
+              addOut(this.inspect)
+              .toPromise()
+              .then((response) => {
+              })
+            })
+          }
+        })
+        this.isShowPrint = false
+      },
+      print() {
+        this.inspect.warehouseName = this.warehouseName
+        // this.inspect.id = this.$route.query.id
+        this.inspect.qualityInspector = localStorage.getItem('ws-pf_staffName')
+        this.inspect.compId = localStorage.getItem('ws-pf_compId')
+        // if (!this.inspect.grade) {
+        //   this.$message({
+        //     message: '等级不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (!this.inspect.impurity) {
+        //   this.$message({
+        //     message: '杂质不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.impurity && (this.inspect.impurity < 0 || this.inspect.impurity > 40)) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.impurity && String(this.inspect.impurity).indexOf('.') != -1 && String(this.inspect.impurity).length - (String(this
+            .inspect.impurity).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '杂质应保留一位小数',
+            type: 'warning',
+          })
+          return
+        }
+
+        
+        // if (!this.inspect.waterContent) {
+        //   this.$message({
+        //     message: '水分不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.waterContent && (this.inspect.waterContent < 0 || this.inspect.waterContent > 40)) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.waterContent && String(this.inspect.waterContent).indexOf('.') != -1 && String(this.inspect.waterContent).length - (String(
+            this.inspect.waterContent).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '水分应保留一位小数',
+            type: 'warning',
+          })
+          return
+        }
+        // if (!this.inspect.mildewGrain) {
+        //   this.$message({
+        //     message: '霉变粒不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.mildewGrain && this.inspect.mildewGrain < 0 || this.inspect.mildewGrain > 40) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.mildewGrain).indexOf('.') != -1 && String(this.inspect.mildewGrain).length - (String(
+            this.inspect.mildewGrain).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '霉变粒应保留一位小数',
+            type: 'warning',
+          })
+          return
+        }
+        // if (!this.inspect.bulkDensity) {
+        //   this.$message({
+        //     message: '容重不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.bulkDensity && this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.bulkDensity && String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect.bulkDensity).length - (String(
+            this.inspect.bulkDensity).indexOf('.') + 1) > 0) {
+          this.$message({
+            message: '容重需输入整数',
+            type: 'warning',
+          })
+          return
+        }
+        // if (!this.inspect.jiaorenli) {
+        //   this.$message({
+        //     message: '热损伤不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.jiaorenli && this.inspect.jiaorenli < 0 || this.inspect.jiaorenli > 40) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.jiaorenli).indexOf('.') != -1 && String(this.inspect.jiaorenli).length - (String(this
+            .inspect.jiaorenli).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '热损伤应保留一位小数',
+            type: 'warning',
+          })
+          return
+        }
+        // if (!this.inspect.imperfectGrain) {
+        //   this.$message({
+        //     message: '不完善粒不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.imperfectGrain && this.inspect.imperfectGrain < 0 || this.inspect.imperfectGrain > 40) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if ( this.inspect.imperfectGrain && String(this.inspect.imperfectGrain).indexOf('.') != -1 && String(this.inspect.imperfectGrain).length - (
+            String(this.inspect.imperfectGrain).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '不完善粒应保留一位小数',
+            type: 'warning',
+          })
+          return
+        }
+        this.$confirm('确定保存质检信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            addOut(this.inspect)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('保存成功')
+                this.printData = this.inspect
+                this.isShowPrint = true
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      cancel() {
+        this.$router.push({
+          path: 'qualityInspectionManagement'
+        })
+      },
+      getList() {
+        
+       getinspectList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            warehouseName: this.warehouseName,
+            managementType: this.managementType,
+             qualityType:1
+          })
+          .toPromise()
+          .then((response) => {
+            this.noinspectList = response.records
+             if(this.inspectbtn == 1 && this.noinspectList.length > 0){
+               this.switchList = this.noinspectList
+                this.inspect = this.noinspectList[0]
+                if(!this.inspect.weighingManagement){
+                   this.inspect.weighingManagement = {}
+                }
+            }else{
+               this.switchList = []
+                this.inspect = {}
+                this.inspect.weighingManagement = {}
+            }
+            this.deptBudgetTotal = this.switchList.length
+          })
+          getinspectList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            warehouseName: this.warehouseName,
+            managementType: this.managementType,
+            qualityType:2
+          })
+          .toPromise()
+          .then((response) => {
+            this.inspectList = response.records
+            if(this.inspectbtn == 2 && this.inspectList.length > 0){
+                this.switchList = this.inspectList
+                this.inspect = this.inspectList[0]
+                  if(!this.inspect.weighingManagement){
+                   this.inspect.weighingManagement = {}
+                }
+            }else{
+              this.switchList = []
+              this.inspect = {}
+                this.inspect.weighingManagement = {}
+            }
+            this.deptBudgetTotal = this.switchList.length
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .center {
+    background: #E8ECF6;
+    overflow-y: scroll;
+  }
+
+  .ws-info-table {
+    border: none;
+    padding: 0 20px;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    text-align: center;
+    background: #ffffff;
+    font-size: 14px;
+    color: #8890B1;
+    min-width: 115px;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+  }
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473E8;
+    margin-right: 10px;
+    margin-top: 15px;
+  }
+
+  .titleTop {
+    display: flex;
+    width: 100%;
+    height: 60px;
+    background: #F6F7FC;
+    line-height: 60px;
+    margin-bottom: 20px;
+    border-radius: 4px;
+    .textword {
+      font-size: 18px;
+      font-weight: 600;
+    }
+  }
+
+  .substance {
+    display: flex;
+    width: 100%;
+    height: 730px;
+
+    .substance-left {
+      width: 59%;
+      background: #ffffff;
+      border-radius: 4px;
+      /deep/.el-input.is-disabled .el-input__inner{
+         background: #F5F7FA;
+         border-radius: 4px;
+            color: #8890B1 !important;
+            border: none;
+      }
+      /deep/.ws-info-table .el-form-item{
+          margin: 10px 0;
+
+      }
+    }
+
+    .substance-right {
+      width: 40%;
+      background: #ffffff;
+      margin-left: 20px;
+      border-radius: 4px;
+      padding: 10px 20px 0;
+
+      /deep/.el-select {
+        width: 50%;
+      }
+
+      .screen {
+        display: flex;
+        width: 100%;
+        margin: 15px 10px 0 0;
+        border-bottom: 1px solid #D8DCE6;
+        height: 45px;
+
+        .screen_left,
+        .screen_right {
+          width: 50%;
+        }
+        .screen_left{
+            min-width: 182px;
+        }
+
+        .badge_item {
+          margin-right: 15px;
+        }
+
+        .inspect_css,
+        .noinspect_css,
+        .record {
+          width: 74px;
+          height: 32px;
+          border-radius: 4px;
+          text-align: center;
+          line-height: 32px;
+          
+        }
+        .record:hover,.inspect_css:hover,.noinspect_css:hover{
+          cursor:pointer;
+        }
+
+        .inspect_css {
+          background: #F0F6FF;
+          color: #5878E8;
+        }
+
+        .screen_right {
+          justify-content: flex-end;
+          display: flex;
+        }
+
+        .record {
+          color: #5878E8;
+        }
+      }
+    }
+  }
+
+  .footer {
+    margin-top: 20px;
+    background: #FFFFFF;
+    border-radius: 4px;
+    height: 300px;
+
+    .formList {
+      width: 90%;
+      margin: auto;
+    }
+
+    /deep/.el-form-item__content {
+      width: 50%;
+    }
+  }
+
+  /deep/.el-table .el-table__header .cell,
+  .el-table .el-table__body .cell {
+    text-align: center;
+  }
+
+  /deep/.el-table--enable-row-transition .el-table__body td {
+    text-align: center;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .but {
+    text-align: center;
+    margin: 20px auto;
+  }
+</style>

+ 264 - 0
src/views/outboundManagement/outInspectRecord.vue

@@ -0,0 +1,264 @@
+<!--质检记录-->
+<template>
+  <div class="center">
+      <el-row class="toptitle">
+      <el-col :span="12">
+        <h2 class="bg-left title">质检记录</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button type="primary" size="small" @click="returnsales()">
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <BaseHeaderLayout :leftSpan="12">
+      <template slot="right">
+        <ws-select style='margin-right:10px;' v-model="warehouseName" placeholder="" @change="selecttaskType"
+          :value="searchType">
+          <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1;" />
+        </ws-select>
+        <div></div>
+        <ws-input class='findinput' @keyup.enter.native="find()" v-model="searchKeyWord" placeholder="可按业务编号、合同编号、车牌号查找"
+          clearable maxlength="500" type="input"></ws-input>
+        <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border height="calc(100vh - 30vh)">
+      <el-table-column type="index" label="序号" width="50">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="number" label="业务编号">
+        <span slot-scope="scope">{{scope.row.weighingManagement?scope.row.weighingManagement.number:""}}</span>
+      </el-table-column>
+      <el-table-column prop="contractNo" label="合同编号/移库编号" width="122"></el-table-column>
+      <el-table-column prop="carNumber" label="车牌号"></el-table-column>
+      <el-table-column prop="goodsName" label="货名"></el-table-column>
+      <el-table-column prop="waterContent" label="水分(%)"></el-table-column>
+      <el-table-column prop="type" label="类型"></el-table-column>
+      <el-table-column prop="binNumber" label="仓位号"></el-table-column>
+      <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
+      <el-table-column prop="updateDate" label="质检时间"></el-table-column>
+      <el-table-column prop="status" label="状态"></el-table-column>
+      <el-table-column width="300" label="操作">
+        <template slot-scope="scope">
+            <!-- v-if="scope.row.status == '已质检'" -->
+          <span v-hasPermission=" `outbound.acquisitionQualityOut.view`">
+            <el-button @click="qualityInspection(scope.row)">查看</el-button>
+          </span>
+           <!-- v-if="scope.row.status == '已称毛重' || !scope.row.status" -->
+          <span  v-hasPermission=" `outbound.acquisitionQualityOut.edit`">
+            <el-button @click="print(scope.row)">打印</el-button>
+          </span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div style="text-align: center;">
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    selectWarehouseSelf,
+    getinspectList,
+  } from '@/model/outboundManagement/index'
+
+  export default {
+    components: {},
+    watch: {},
+    data() {
+      return {
+        //分页
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        deptBudgetTotal: 0,
+        managementType: 3,
+        searchKeyWord: '',
+        taskTypeList: [],
+        searchType: 0,
+        warehouseName: '',
+        inspect: [],
+        warehouseList: [],
+        cangid: '', //仓库id
+      }
+    },
+    activated() {
+      this.selectWarehouse()
+      this.showType = this.isShow
+    },
+    methods: {
+        returnsales(){
+            this.$router.go(-1)
+        },
+      find() {
+        this.getList()
+      },
+      print(row){
+           window.open('../../../static/outInspectionPrint.html?type=2&dataList=' + JSON.stringify(row))
+      },
+      qualityInspection(row) {
+        //查看
+        this.$router.push({
+          path: 'qualityInspection',
+          query: {
+            cangid: this.cangid,
+            id: row.id,
+            warehouseName: this.warehouseName,
+            count: this.warehouseCount,
+            warehouseNo: this.warehouseNo,
+            contractNo: row.contractNo,
+            binNumber: row.binNumber,
+            carNumber: row.carNumber,
+            storageTagNo: row.storageTagNo,
+            goodsName: row.goodsName
+          },
+        })
+      },
+      selecttaskType(e) {
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseList[i].value == e) {
+            this.cangid = this.warehouseList[i].cangid
+          }
+        }
+        this.getList()
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      selectWarehouse() {
+        selectWarehouseSelf({
+            compId: localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList = []
+            for (let i = 0; i < response.length; i++) {
+              this.warehouseList.push({
+                value: response[i].warehouseName,
+                warehouseId: response[i].id,
+              })
+            }
+            if(this.$route.query.warehouseName){
+              this.warehouseName = this.$route.query.warehouseName
+            }else{
+                this.warehouseName = response[0].warehouseName
+            }
+            this.getList()
+          })
+      },
+      getList() {
+        getinspectList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchKeyWord: this.searchKeyWord,
+            warehouseName: this.warehouseName,
+            managementType: this.managementType,
+          })
+          .toPromise()
+          .then((response) => {
+            this.inspect = response.records
+            this.deptBudgetTotal = response.total
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+//   .title {
+//     font-size: 20px;
+//     font-weight: 600;
+//     margin: 20px 0 0 20px;
+//   }
+
+  .tit {
+    font-size: 16px;
+    font-weight: 600;
+    margin: 20px;
+  }
+
+  .ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    text-align: center;
+    background: #ffffff;
+    color: #8890b1;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+  }
+
+  /deep/.el-table .el-table__header .cell,
+  .el-table .el-table__body .cell {
+    text-align: center;
+  }
+
+  /deep/.el-table--enable-row-transition .el-table__body td {
+    text-align: center;
+  }
+
+  /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;
+  }
+  .toptitle {
+    background: #f6f7fc;
+    .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+  }
+</style>

+ 63 - 256
src/views/outboundManagement/qualityInspection.vue

@@ -3,7 +3,7 @@
   <div class="center">
     <el-row>
       <el-col :span="12">
-        <h2 class="bg-left titleup">{{ information }}质检信息</h2>
+        <h2 class="bg-left titleup">查看质检信息</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
@@ -22,50 +22,58 @@
         <div style="width: 50%; margin: 0 auto">
           <div class="title">基本信息</div>
           <ws-info-table>
-            <ws-form-item label="合同编号" span="1" prop="contractNo">
-              <ws-input
-                v-model="inspect.contractNo"
-                placeholder="请输入合同编号"
-                maxlength="100"
-                disabled
-                size="small"
-              />
+            <ws-form-item label="任务编号" span="1" prop="contractNo">
+              <ws-input v-model="inspect.contractNo" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="仓位号" span="1" prop="binNumber">
-              <ws-input
-                v-model="inspect.binNumber"
-                placeholder="请输入仓位号"
-                maxlength="100"
-                disabled
-                size="small"
-              />
+              <ws-input v-model="inspect.binNumber" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="业务编号" span="1" prop="number">
+              <ws-input v-model="inspect.weighingManagement.number" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="囤位号" span="1" prop="storageTagNo">
-             <ws-input
-                v-model="inspect.storageTagNo"
-                placeholder="请输入囤位号"
-                maxlength="100"
-                disabled
-                size="small"
-              />
+              <ws-input v-model="inspect.storageTagNo" placeholder="暂无" disabled size="small" />
             </ws-form-item>
-            <ws-form-item label="车牌号" span="1" prop="carNumber">
-               <ws-input
-                v-model="inspect.carNumber"
-                placeholder="请输入车牌号"
-                maxlength="100"
-                disabled
-                size="small"
-              />
+            <ws-form-item label="合同/移库编号" span="1" prop="contractNo"><!--moveTaskNo-->
+              <ws-input v-model="inspect.contractNo" placeholder="自动获取,不可编辑" disabled size="small" v-if="inspect.contractNo" />
+              <ws-input v-model="inspect.moveTaskNo" placeholder="自动获取,不可编辑" disabled size="small" v-else/>
+            </ws-form-item>
+            <ws-form-item label="提示" span="1" prop="tips">
+              <ws-input v-model="inspect.weighingManagement.tips" placeholder="暂无" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="goodsName">
-              <ws-input
-                v-model="inspect.goodsName"
-                placeholder="请输入货名"
-                maxlength="100"
-                disabled
-                size="small"
-              />
+              <ws-input v-model="inspect.goodsName" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="经办人" span="1" prop="secretaryWeigher">
+              <ws-input v-model="inspect.weighingManagement.secretaryWeigher" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="出库类型" span="1" prop="inOutType">
+              <ws-input v-model="inspect.weighingManagement.inOutType" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="出库日期" span="1" prop="updateDate">
+              <ws-input v-model="inspect.updateDate" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="运输方式" span="1" prop="outType">
+              <ws-input v-model="inspect.weighingManagement.outType" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="车队" span="1" prop="fleet">
+              <ws-input v-model="inspect.fleet" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
+              <ws-input v-model="inspect.carNumber" placeholder="自动获取,不可编辑" disabled size="small" />
+            </ws-form-item>
+
+            <ws-form-item label="箱号-1" span="1" prop="boxNo">
+              <ws-input v-model="inspect.boxNo" placeholder="暂无" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
+              <ws-input v-model="inspect.boxNoOther" placeholder="暂无" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="封号-1" span="1" prop="titleNo">
+              <ws-input v-model="inspect.titleNo" placeholder="暂无" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="封号-2" span="1" prop="titleNoOther">
+              <ws-input v-model="inspect.titleNoOther" placeholder="暂无" disabled size="small" />
             </ws-form-item>
           </ws-info-table>
 
@@ -76,8 +84,7 @@
                 v-model="inspect.grade"
                 placeholder="请输入等级"
                 class="typeselect"
-                @change="waterContentChange"
-                :disabled="disabled"
+                disabled
               >
                 <ws-option
                   v-for="item in gradeList"
@@ -93,7 +100,7 @@
                 placeholder="请输入杂质占比"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                disabled
               />
             </ws-form-item>
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
@@ -102,8 +109,7 @@
                 placeholder="请输入水分占比"
                 maxlength="100"
                 size="small"
-                @change = "waterContentChange"
-                :disabled="disabled"
+                disabled
               />
             </ws-form-item>
             <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
@@ -112,7 +118,7 @@
                 placeholder="请输入霉变粒占比"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                disabled
               />
             </ws-form-item>
             <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
@@ -121,7 +127,7 @@
                 placeholder="请输入容重"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                disabled
               />
             </ws-form-item>
             <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
@@ -130,7 +136,7 @@
                 placeholder="请输入热损伤占比"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                disabled
               />
             </ws-form-item>
             <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
@@ -139,20 +145,18 @@
                 placeholder="请输入不完善粒占比"
                 maxlength="100"
                 size="small"
-                :disabled="disabled"
+                disabled
               />
             </ws-form-item>
           </ws-info-table>
           <div class="but">
-            <el-button @click="cancel" v-if="this.types != 2" type="primary"
+            <!-- <el-button @click="cancel" v-if="this.types != 2" type="primary"
               >取消</el-button
             >
             <el-button @click="print" v-if="this.types != 2" type="primary"
               >提交</el-button
-            >
-            <el-button @click="cancel" v-if="this.types == 2" type="primary"
-              >关闭</el-button
-            >
+            > -->
+            <el-button @click="cancel" type="primary">关闭</el-button>
           </div>
         </div>
       </ws-form>
@@ -173,227 +177,29 @@ export default {
   watch: {},
   data() {
     return {
-      inspect: {},
-      disabled: false,
-      types: '1',
-      information : '添加',
-      goodnameList: [],
-      gradeList: [],
-      customerList: [],
-      getbinNumberList: [],
+      inspect: {
+        weighingManagement:{},
+      },
+      gradeList:[],
       cangid: '', //仓库id
       warehouseName:'',
-       unitPrice:0,
-       count:0,
-       cangNo:'',
     }
   },
   activated() {
-    this.types = this.$route.query.type
-    this.cangid = this.$route.query.cangid
-    this.warehouseName = this.$route.query.warehouseName
-    this.inspect.contractNo = this.$route.query.contractNo
-    this.inspect.binNumber = this.$route.query.binNumber
-    this.inspect.carNumber = this.$route.query.carNumber
-    this.inspect.goodsName = this.$route.query.goodsName
-    this.inspect.storageTagNo = this.$route.query.storageTagNo
     let id = this.$route.query.id
-    this.cangNo = this.$route.query.warehouseNo
-    this.count = Number(this.$route.query.count)+1 
-    if (this.types == 2) {
-      this.disabled = true
-      this.information = '查看'
-    }
     this.getList(id)
   },
   methods: {
-    getdate() {
-      var date = new Date()
-      var year = date.getFullYear() //获取完整的年份(4位)
-      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
-      var datetime = date.getDate() //获取当前日(1-31)
-      if (mouth < 10) {
-        mouth = '0' + mouth
-      }
-      if (datetime < 10) {
-        datetime = '0' + datetime
-      }
-      return year +'' + mouth + datetime
-    },
-    print() {
-      this.inspect.warehouseName = this.warehouseName
-      this.inspect.id = this.$route.query.id
-      this.inspect.qualityInspector = localStorage.getItem('ws-pf_staffName')
-      this.inspect.compId = localStorage.getItem('ws-pf_compId')
-              if (!this.inspect.grade) {
-          this.$message({
-            message: '等级不能为空',
-            type: 'warning',
-          })
-          return
-        }
-        if (!this.inspect.impurity) {
-          this.$message({
-            message: '杂质不能为空',
-            type: 'warning',
-          })
-          return
-        }
-        if (String(this.inspect.impurity).indexOf('.') != -1 && String(this.inspect.impurity).length - (String(this.inspect.impurity).indexOf('.') + 1) > 1) {
-          this.$message({
-            message: '杂质输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        
-         if (this.inspect.impurity < 0 || this.inspect.impurity > 40) {
-          this.$message({
-            message: '杂质输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (!this.inspect.waterContent) {
-          this.$message({
-            message: '水分不能为空',
-            type: 'warning',
-          })
-          return
-        }
-         if (this.inspect.waterContent < 0 || this.inspect.waterContent > 40) {
-          this.$message({
-            message: '水分输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (String(this.inspect.waterContent).indexOf('.') != -1 && String(this.inspect.waterContent).length - (String(this.inspect.waterContent).indexOf('.') + 1) > 1) {
-          this.$message({
-            message: '水分输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (!this.inspect.mildewGrain) {
-          this.$message({
-            message: '霉变粒不能为空',
-            type: 'warning',
-          })
-          return
-        }
-         if (this.inspect.mildewGrain < 0 || this.inspect.mildewGrain > 40) {
-          this.$message({
-            message: '霉变粒输入错误',
-            type: 'warning',
-          })
-          return
-        }
-         if (String(this.inspect.mildewGrain).indexOf('.') != -1 && String(this.inspect.mildewGrain).length - (String(this.inspect.mildewGrain).indexOf('.') + 1) > 1) {
-          this.$message({
-            message: '霉变粒输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (!this.inspect.bulkDensity) {
-          this.$message({
-            message: '容重不能为空',
-            type: 'warning',
-          })
-          return
-        }
-         if (this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
-          this.$message({
-            message: '容重输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect.bulkDensity).length - (String(this.inspect.bulkDensity).indexOf('.') + 1) > 0) {
-          this.$message({
-            message: '容重需输入整数',
-            type: 'warning',
-          })
-          return
-        }
-        if (!this.inspect.jiaorenli) {
-          this.$message({
-            message: '热损伤不能为空',
-            type: 'warning',
-          })
-          return
-        }
-         if (this.inspect.jiaorenli < 0 || this.inspect.jiaorenli > 40) {
-          this.$message({
-            message: '热损伤输入错误',
-            type: 'warning',
-          })
-          return
-        }
-         if (String(this.inspect.jiaorenli).indexOf('.') != -1 && String(this.inspect.jiaorenli).length - (String(this.inspect.jiaorenli).indexOf('.') + 1) > 1) {
-          this.$message({
-            message: '热损伤输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (!this.inspect.imperfectGrain) {
-          this.$message({
-            message: '不完善粒不能为空',
-            type: 'warning',
-          })
-          return
-        }
-         if (this.inspect.imperfectGrain < 0 || this.inspect.imperfectGrain > 40) {
-          this.$message({
-            message: '不完善粒输入错误',
-            type: 'warning',
-          })
-          return
-        }
-           if (String(this.inspect.imperfectGrain).indexOf('.') != -1 && String(this.inspect.imperfectGrain).length - (String(this.inspect.imperfectGrain).indexOf('.') + 1) > 1) {
-          this.$message({
-            message: '不完善粒输入错误',
-            type: 'warning',
-          })
-          return
-        }
-      this.$confirm('确定保存质检信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          addOut(this.inspect)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('保存成功')
-              this.$router.push({ path: 'qualityInspectionManagement' })
-            })
-        })
-        .catch(() => {
-          return false
-        })
-    },
     cancel() {
-      this.$router.push({ path: 'qualityInspectionManagement' })
+      this.$router.go(-1)
     },
     getList(ids) {
-      // 品级
-      packList({ constId: 'CON3' })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-      if (this.types == 2) {
         //查看
         getinspectLook({ id: ids })
           .toPromise()
           .then((response) => {
             this.inspect = response
           })
-      }
     },
   },
 }
@@ -416,6 +222,7 @@ export default {
   background: #ffffff;
   font-size: 14px;
   color: #8890b1;
+  min-width: 113px;
 }
 /deep/.ws-info-table .el-form-item .el-form-item__content {
   border: none;
@@ -442,7 +249,7 @@ export default {
   width: 100%;
   border-radius: 4px;
   margin: 0 auto;
-  padding-top: 20px;
+  padding: 20px;
 }
 /deep/.el-table .el-table__header .cell,
 .el-table .el-table__body .cell {

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

@@ -0,0 +1,1433 @@
+<template>
+	<div class="center">
+		<BaseHeaderLayout :leftSpan="12">
+			<template slot="left">
+				<!-- <ws-button type="primary" @click="weighing(3)" v-hasPermission=" `outbound.acquisitionWeightOut.new`">添加皮重
+				</ws-button>
+				<ws-button type="primary" @click="weighing(4)" v-hasPermission=" `outbound.acquisitionWeightOut.new`">添加毛重
+				</ws-button> -->
+			</template>
+			<!-- <template slot="left"> </template> -->
+			<template slot="right">
+				<ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType">
+				<ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
+					style="color: #8890b1" />
+				</ws-select>
+				<!-- <ws-input class='findinput' @keyup.enter.native="find()" v-model="searchKeyWord" placeholder="可按合同编号、车牌号查找"
+				clearable maxlength="500" type="input">
+				</ws-input>
+				<ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
+					vertical-align: text-top;
+					position: relative;
+					top: 0px;
+					left: -8px;
+					" src="../../../public/img/sousuo.png" alt="" /></ws-button> -->
+			</template>
+		</BaseHeaderLayout>
+		
+		<el-row :gutter="20">
+			<el-col :span="8">
+				<div style='background:#f6f7fc;padding:10px;' class="grid-content bg-purple">
+					<div class="top">
+						<div>{{tpyeNo == 1?'皮重':'毛重'}} </div>
+						<div class="confirmInfo">
+							<div class="car-type">车牌号</div>
+							<div class="car-no">{{ carWeightInfo.carNumber }}</div>
+						</div>
+						<div class="confirmInfo">
+							<div class="car-type">浮动重量</div>
+							<div class="car-no">{{ weighingList.weight }}kg</div>
+						</div>
+						<div class="confirmWeight">
+							<div class="titleWeight">确认重量</div>
+							<div v-if="index == 0" class="weight">
+							{{ weighingList.grossWeight }} <span class="kg-style">kg</span>
+							</div>
+							<div v-else class="weight">
+							{{ weighingList.tare }} <span class="kg-style">kg</span>
+							</div>
+						</div>
+						<el-button @click='weightweight' type="success" plain>确定</el-button>
+					</div>
+					<div class="bg-left titleup"><span class="word_css">实时监控</span></div>
+					<div class="bottom">
+					<div v-if="!monitorUrl1" class="video1">
+						<img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
+						<div>监控视频未连接</div>
+					</div>
+					<div v-else class="video1">
+						<iframe :src="monitorUrl1" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
+						mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
+					</div>
+					<div v-if="!monitorUrl2" class="video1">
+						<img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
+						<div>监控视频未连接</div>
+					</div>
+					<div v-else class="video2">
+						<iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
+						mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
+					</div>
+					</div>
+				</div>
+			</el-col>
+			<el-col :span="8">
+				<div class="grid-content bg-purple">
+					<div class="tab weigh_btn">
+						<el-button :type="tpyeNo == 1 ? 'primary':''">
+						<!-- <el-badge :value="mListTop.length" class="badge_item"> -->
+							<div @click="tabClick(0)">称皮重</div>
+						</el-button>
+						<!-- </el-badge> -->
+						<el-button :type="tpyeNo == 2 ? 'primary':''">
+						<!-- <el-badge :value="pListTop.length" class="badge_item"> -->
+							<div @click="tabClick(1)">称毛重</div>
+						<!-- </el-badge> -->
+						</el-button>
+					</div>
+					<ws-form class="right-content">
+					<div class="left1">
+						<div class="weightInfo">
+							<ws-info-table>
+								<ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+									<el-select v-if='tpyeNo==1' :disabled='recheck' filterable clearable v-model="weighingList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect" @change="contractNoChange">
+										<el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo" :value="item.inOutTaskNo" />
+									</el-select>
+									<ws-input v-else v-model="weighingList.inOutTaskNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+								</ws-form-item>
+								<ws-form-item label="业务编号" span="1" prop="number">
+									<ws-input v-model="weighingList.number" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+								</ws-form-item>
+								<ws-form-item label="合同编号" span="1" prop="contractNo" v-show="inWarehouseType == 1" v-if="weighingList.contractNo&&tpyeNo==1">
+									<ws-input v-model="weighingList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+								</ws-form-item>
+								<ws-form-item label="移库编号" span="1" prop="moveTaskNo" v-show="inWarehouseType == 1" v-if='!weighingList.contractNo&&tpyeNo==1'>
+									<ws-input v-model="weighingList.moveTaskNo" placeholder="自动获取,不可编辑" maxlength="100" size="small" disabled />
+								</ws-form-item>
+								<ws-form-item v-if='tpyeNo==1' label="提示" span="1" prop="tips">
+									<ws-input v-model="weighingList.tips" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+								</ws-form-item>
+								<ws-form-item label="货名" span="1" prop="goodsName">
+									<ws-input v-model="weighingList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
+								</ws-form-item>
+								<ws-form-item v-if='tpyeNo==1' label="仓位号" span="1" prop="inOutTaskNo">
+									<el-select @change='binNumberchange' :disabled='recheck' filterable clearable v-model="weighingList.binNumber" placeholder="请选择仓位号" class="typeselect">
+										<el-option v-for="item in positionInfos" :key="item.id" :label="item.binNumber" :value="item.binNumber" />
+									</el-select>
+								</ws-form-item>
+								<ws-form-item v-if='tpyeNo==1' label="囤位号" span="1" prop="storageNumber">
+									<ws-input :disabled='recheck' v-model="weighingList.storageNumber" placeholder="选填,1-10个字符" maxlength="10" size="small" />
+								</ws-form-item>
+								<ws-form-item v-if='tpyeNo==1' label="出库类型" span="1">
+									<ws-input v-model="weighingList.inOutType" class="right-bottom" :disabled="isSelectType" placeholder="暂无" />
+								</ws-form-item>
+								<ws-form-item v-if='tpyeNo==1' label="出库日期" span="1" prop="inOutDate" class="deliverydate">
+									<ws-date-picker v-model="weighingList.inOutDate" type="date" placeholder="请选择出库日期"
+									value-format="yyyy-MM-dd" />
+								</ws-form-item>
+								<ws-form-item label="运输方式" span="1" prop="outType">
+									<el-select v-model="weighingList.outType" placeholder="请选择运输方式">
+										<el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
+									</el-select>
+								</ws-form-item>
+								<ws-form-item  v-if='fleetNameList.length>0&&tpyeNo==1' label="车队" span="1" prop="fleetName">
+									<el-select  :disabled='recheck' v-model="deptBudgetList.fleet" placeholder="非车队车辆">
+										<el-option v-for="item in fleetNameList" :key="item.value" :label="item.fleetName" :value="item.fleetName" />
+									</el-select>
+								</ws-form-item>
+								<ws-form-item label="车牌号" span="1" prop="carNo"
+									v-if="weighingList.outType == '汽运' || weighingList.outType == '集装箱船'">
+									<ws-input v-if="!carstatus || carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
+									maxlength="7" size="small" />
+									<el-select v-else filterable clearable v-model="weighingList.carNo"
+									placeholder="请选择车牌号" class="typeselect" @change="carChange">
+									<el-option v-for="item in options2" :key="item.constKey"
+										:label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
+									</el-select>
+									<el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{carChange1}}</el-button>
+								</ws-form-item>
+								<ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
+									weighingList.outType == '汽运' ||
+									weighingList.outType == '集装箱船'
+									">
+									<ws-input v-model="weighingList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+								</ws-form-item>
+								<ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
+									weighingList.outType == '汽运' ||
+									weighingList.outType == '集装箱船'
+									">
+									<ws-input v-model="weighingList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
+								</ws-form-item>
+								<ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
+									weighingList.outType == '汽运' ||
+									weighingList.outType == '集装箱船'
+									">
+									<ws-input v-model="weighingList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
+								</ws-form-item>
+								<ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
+									weighingList.outType == '汽运' ||
+									weighingList.outType == '集装箱船'
+									">
+									<ws-input v-model="weighingList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
+								</ws-form-item>
+								<ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="weighingList.outType == '火运'">
+									<ws-input v-model="weighingList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
+								</ws-form-item>
+								<ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="weighingList.outType == '火运'">
+									<ws-input v-model="weighingList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
+								</ws-form-item>
+								<ws-form-item label="船名" span="1" prop="shipName" v-if="weighingList.outType == '散船'">
+									<ws-input v-model="weighingList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+								</ws-form-item>
+								<ws-form-item label="航次" span="1" prop="shipNumber" v-if="weighingList.outType == '散船'">
+									<ws-input v-model="weighingList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+								</ws-form-item>
+								<ws-form-item v-if="tpyeNo == 2" label="毛重(KG)" span="1" prop="grossWeight">
+									<ws-input type="number" @mousewheel.native.prevent v-if="tpyeNo==2"
+										v-model="weighingList.grossWeight" @input="calculation(status)" placeholder="未获取到毛重" maxlength="100"
+										size="small" :disabled="disabled" />
+										<el-button v-if="tpyeNo == 2" @click="openPort">重新获取</el-button>
+								</ws-form-item>
+								<ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '皮重'">
+									<ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare" @input="calculation"
+										placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
+									<el-button v-if="tpyeNo == 1" @click="openPort">重新获取</el-button>
+								</ws-form-item>
+									<div class="formItem">
+										<ws-form-item label="扣重(KG)" span="1" prop="buckleMiscellaneous"
+										v-if="information == '毛重' && (paramType == '2' || inWarehouseType == 1)">
+										<ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous"
+											@input="calculation" placeholder="请输入扣重" maxlength="100" size="small" />
+										</ws-form-item>
+										<ws-form-item label="净重(KG)" span="1" prop="netWeight" v-if="information == '毛重'">
+										<ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight"
+											placeholder="自动计算,不可编辑" maxlength="100" size="small" disabled />
+										</ws-form-item>
+										<!-- <ws-form-item label="应收卸车过磅费(元)" span="1" prop="receivableWeighingFee" v-if="index == 1">
+										<ws-input type="number" v-model="weighingList.receivableWeighingFee" placeholder="未获取到卸车过磅费金额"
+											maxlength="100" size="small" disabled />
+										</ws-form-item>
+										<ws-form-item label="实收卸车过磅费(元)" span="1" prop="actualWeighingFee" v-if="index == 1">
+										<ws-input type="number" v-model="weighingList.actualWeighingFee" placeholder="输入卸车过磅费" maxlength="100"
+											size="small" />
+										</ws-form-item> -->
+									</div>
+								</ws-info-table>
+								<div class="but">
+									<!-- <el-button @click="print" type="primary" :disabled="submitAllow">提交</el-button> -->
+										<el-button @click="print" v-if="information == '毛重'" type="primary">提交</el-button>
+										<el-button @click="print" v-if="information == '皮重'" type="primary" :disabled="submitAllow">提交</el-button>
+								</div>
+									<!-- </div> -->
+									
+								
+							
+						</div>	
+					</div>
+				</ws-form>
+				</div>
+			</el-col>
+			<el-col :span="8">
+				<div style='justify-content: space-between;' class='flex'>
+					<div>
+						<el-button v-if='tpyeNo == 1' @click='add' type="primary">新增</el-button>
+            			<el-button v-if='tpyeNo == 1' @click='deletelist' type="danger">删除</el-button>
+						<el-button v-if='tpyeNo == 2' @click='statustypechangelist(1)' :type="statusType==1?'primary':''">未称毛重</el-button>
+          				<el-button v-if='tpyeNo == 2' @click='statustypechangelist(2)' :type="statusType==2?'primary':''">已称毛重</el-button>
+					</div>
+					<div><el-button @click='record' type="primary">记录</el-button></div>
+				</div>
+				
+				
+				<el-table  @cell-click='listclick' :data="deliveryList" style="width: 100%; margin-top: 20px" ref="deliveryList" border >
+					<el-table-column prop="number" width="120" label="业务编号"></el-table-column>
+					<el-table-column prop="carNumber" label="车牌号"></el-table-column>
+					<el-table-column prop="status" label="状态"></el-table-column>
+				</el-table>
+				<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+					:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+					:total="deptBudgetTotal">
+				</el-pagination>
+			</el-col>
+		</el-row>
+		<el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="粮食检斤单"
+      @opened="opendBtn"
+      @close="closeDialog"
+      :close-on-click-modal="false"
+    >
+      <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
+      <div style="text-align: center">
+        <el-button type="primary" @click="closePrint">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </el-dialog>
+	</div>
+</template>
+<script>
+	import {
+		grossWeight,
+		getbinNumber,
+		contractListWeighing,
+		tareAdd,
+		tareEdit,
+		getweighing,
+		getweighingList,
+		selectWarehouseSelf,
+		
+		delelteWeighing,
+	} from '@/model/outboundManagement/index'
+	import {
+    pullDown,
+    addstorageputList,
+    xialaNo,
+    getstaff,
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
+  import weightCheckPrint from './component/weightCheckPrint.vue'
+  import inspectInfoPrint from './component/inspectInfoPrint.vue'
+   import html2canvas from 'html2canvas'
+	import WsUpload from '@/components/WsUpload'
+	import {EventBus} from 'base-core-lib'
+	export default {
+		components: {
+			WsUpload,
+			inspectInfoPrint,
+			weightCheckPrint
+		},
+		data() {
+			return {
+				isShowPrint:false,
+				warehouseName:'',
+				warehouseList:[],
+				warehouseList1:[],
+				currentPage: 1,
+        		pageSize: 10,
+				submitAllow:false,
+				deliveryList:[],
+				positionInfos:[],
+				searchKeyWord:'',
+				deptBudgetTotal:0,
+				monitorUrl1:'',
+				monitorUrl2:'',
+				index: 0,
+				inspect:{},
+				id:0,
+				options2:[],
+				isSelectType:false,
+				recheck:false,
+				disabled:true,
+				pListTop:[],
+				tpyeNo:1,
+				types:null,
+				information: '皮重',
+				carChange1: '手动填写',
+				inWarehouseType: 1, //入库类型
+				outContractNo: [],
+				mListTop: [],
+				searchType:'',
+				taskNolist:[],
+				storageType:[],
+				fleetNameList:[],
+				carstatus:false,
+				carjudge: false,
+				warehouseCount:0,
+                warehouseNo:'',
+				statusType:'',
+				warehouseType:1,
+				weighingList: {
+					weight:'',
+					grossWeight: 0,
+					tare: 0,
+					tips:'',
+					// contractNo:'',
+					// inOutTaskNo:'',
+					buckleMiscellaneous: 0,
+					netWeight: 0,
+					receivableWeighingFee: '',
+					warehouseInOutDetail: {
+						grade:'',
+						imperfectGrain:'',
+						impurity:'',
+						jiaorenli:'',
+						bulkDensity:'',
+						mildewGrain:'',
+					},
+					qualityInspectionManagement: {
+						boxNo: "暂无",
+						boxNoOther: "暂无",
+						titleNo: "暂无",
+						titleNoOther: "暂无",
+					}
+				},
+				carWeightInfo: {
+					carNumber: '',
+					type: '',
+					weight: '',
+				},
+				multiSelector: [{
+						name: '汽运',
+						value: '0',
+					},
+					{
+						name: '火运',
+						value: '1',
+					},
+					{
+						name: '集装箱船',
+						value: '2',
+					},
+					{
+						name: '散船',
+						value: '3',
+					},
+				],
+			}
+    },
+    mounted() {
+		this.selectWarehouse()
+      	this.showType = this.isShow
+	  	this.openPort()
+	},
+	activated() {
+			
+	},
+	methods: {
+		statustypechangelist(status){
+			this.statusType=status
+			this.getList()
+		},
+		record(){
+			this.$router.push({path: 'weighingManagementrecord' })
+		},
+		printSmall() {
+			localStorage.setItem('inspect',JSON.stringify(this.inspect))
+        window.open('../../../static/weightChecknew.html?type=1' )
+		// window.open('../../../static/weightChecknew.html?type=1&dataList=' + JSON.stringify(this.inspect))
+      },
+      printBig() {
+		  localStorage.setItem('inspect',JSON.stringify(this.inspect))
+        window.open('../../../static/weightChecknew.html?type=2' )
+        // window.open('../../../static/weightChecknew.html?type=2&dataList=' + JSON.stringify(this.inspect))
+      },
+		opendBtn(){
+           html2canvas(this.$refs.saveImg.$el).then(canvas => {
+          let dataURL = canvas.toDataURL('image/png');
+          this.imgUrl = dataURL;
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImg')
+            let formdata = new FormData();
+            formdata.append('file', b);
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata
+            }).then((response) => {
+              //编辑接口
+              this.weighingList.pictureAddress = response.data.url
+              console.log(this.types)
+              if (this.types == 3) {
+                this.weighingList.flag = 0
+              } else if (this.types == 4) {
+                this.weighingList.flag = 1
+              }
+              grossWeight(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  // this.inspect = [] 
+                })
+            })
+          }
+        })
+      },
+      closeDialog() {
+        html2canvas(this.$refs.saveImg.$el).then(canvas => {
+          let dataURL = canvas.toDataURL('image/png');
+          this.imgUrl = dataURL;
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImg')
+            let formdata = new FormData();
+            formdata.append('file', b);
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata
+            }).then((response) => {
+              //编辑接口
+              this.weighingList.pictureAddress = response.data.url
+              console.log(this.types)
+              if (this.types == 3) {
+                this.weighingList.flag = 0
+              } else if (this.types == 4) {
+                this.weighingList.flag = 1
+              }
+              grossWeight(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  // this.inspect = [] 
+                  this.isShowPrint = false
+                })
+            })
+            this.dialogTableVisible = true;
+          }
+        })
+
+      },
+		weightweight(){
+			if(this.tpyeNo==1){
+				this.weighingList.grossWeight=this.weighingList.weight
+			}else{
+				this.weighingList.tare=this.weighingList.weight
+			}
+		},
+		handleSizeChange(val) {
+			console.log(`每页 ${val} 条`)
+			this.pageSize = val
+			this.getList()
+		},
+		handleCurrentChange(val) {
+			this.currentPage = val
+			console.log(`当前页: ${val}`)
+			this.getList()
+		},
+		listclick(row){
+			this.id=row.id
+			getweighing({
+				id: row.id
+				})
+				.toPromise()
+				.then((response) => {
+					console.log(response)
+					this.weighingList=response
+					this.weighingList.warehouseInOutDetail={
+						grade:'',
+						imperfectGrain:'',
+						impurity:'',
+						jiaorenli:'',
+						bulkDensity:'',
+						mildewGrain:'',
+					}
+				})
+			// if(){
+			
+			// }
+			// this.deptBudgetList=row
+			// console.log(row)
+      	},
+		add(){
+        	this.information='皮重'
+        	this.weighingList= {
+				grossWeight: 0,
+				tare: 0,
+				tips:'',
+					// contractNo:'',
+					// inOutTaskNo:'',
+				buckleMiscellaneous: 0,
+				netWeight: 0,
+				receivableWeighingFee: '',
+				warehouseInOutDetail: {
+					grade:'',
+					imperfectGrain:'',
+					impurity:'',
+					jiaorenli:'',
+					bulkDensity:'',
+					mildewGrain:'',
+				},
+				qualityInspectionManagement: {
+					boxNo: "暂无",
+					boxNoOther: "暂无",
+					titleNo: "暂无",
+					titleNoOther: "暂无",
+				}
+			}
+      	},
+		deletelist(){
+			if(this.id){
+			delelteWeighing({
+				id: this.id
+				})
+				.toPromise()
+				.then((response) => {
+				this.$message({
+					message: '删除成功!',
+					type: 'success',
+				})
+				this.weighingList= {
+					grossWeight: 0,
+					tare: 0,
+					tips:'',
+						// contractNo:'',
+						// inOutTaskNo:'',
+					buckleMiscellaneous: 0,
+					netWeight: 0,
+					receivableWeighingFee: '',
+					warehouseInOutDetail: {
+						grade:'',
+						imperfectGrain:'',
+						impurity:'',
+						jiaorenli:'',
+						bulkDensity:'',
+						mildewGrain:'',
+					},
+					qualityInspectionManagement: {
+						boxNo: "暂无",
+						boxNoOther: "暂无",
+						titleNo: "暂无",
+						titleNoOther: "暂无",
+					}
+				}
+				this.getList()
+				})
+			}
+      	},
+		binNumberchange(e){
+			for (let i = 0; i < this.positionInfos.length; i++) {
+				if(this.positionInfos[i].binNumber==e){
+					this.weighingList.positionId=this.positionInfos[i].id
+				}
+				
+			}
+		},
+		print() {
+			this.weighingList.carNumber=this.weighingList.carNo
+			if (this.types == 1 || this.types == 2) {
+				if (!this.weighingList.contractNo) {
+					this.$message({
+						message: '合同编号不能为空',
+						type: 'warning',
+					})
+					return
+				}
+				if (!this.weighingList.binNumber) {
+					this.$message({
+						message: '仓位号不能为空',
+						type: 'warning',
+					})
+					return
+				}
+				if (!this.weighingList.storageNumber) {
+					this.$message({
+						message: '囤位号不能为空',
+						type: 'warning',
+					})
+					return
+				}
+				if (this.weighingList.storageNumber.length < 1 ||this.weighingList.storageNumber.length > 10) {
+					this.$message({
+						message: '囤位号不超过10个字符!',
+						type: 'warning',
+					})
+					return
+				}
+				if (!this.weighingList.carNumber) {
+					this.$message({
+						message: '车牌号不能为空',
+						type: 'warning',
+					})
+					return
+				}
+				if (this.weighingList.carNumber.length != 7) {
+					this.$message({
+						message: '车牌号输入错误',
+						type: 'warning',
+					})
+					return
+				}
+				if (!this.weighingList.inOutType) {
+					this.$message({
+						message: '出库类型不能为空',
+						type: 'warning',
+					})
+					return
+				}
+					// if (!this.weighingList.tare) {
+					// 	this.$message({
+					// 		message: '皮重不能为空',
+					// 		type: 'warning',
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	isNaN(this.weighingList.tare) ||
+					// 	(String(this.weighingList.tare).indexOf('.') != -1 &&
+					// 		String(this.weighingList.tare).length -
+					// 		(String(this.weighingList.tare).indexOf('.') + 1) >
+					// 		1) ||
+					// 	this.weighingList.tare < 1 ||
+					// 	this.weighingList.tare > 100000
+					// ) {
+					// 	this.$message({
+					// 		message: '皮重输入错误!',
+					// 		type: 'warning',
+					// 	})
+					// 	return
+					// }
+			}
+			if (this.types == 1) {
+				if (!this.weighingList.grossWeight) {
+					this.$message({
+						message: '毛重不能为空',
+						type: 'warning',
+					})
+					return
+				}
+				if (
+					isNaN(this.weighingList.grossWeight) ||
+					(String(this.weighingList.grossWeight).indexOf('.') != -1 &&
+					String(this.weighingList.grossWeight).length -
+					(String(this.weighingList.grossWeight).indexOf('.') + 1) >1) ||this.weighingList.grossWeight < 1 ||
+					this.weighingList.grossWeight > 100000
+				) {
+					this.$message({
+						message: '毛重输入错误!',
+						type: 'warning',
+					})
+					return
+				}
+				if (this.weighingList.netWeight < 0){
+					this.$message({
+						message: '净重不能为负',
+						type: 'warning',
+					})
+					return
+				}
+			}
+			this.weighingList.compId=localStorage.getItem('ws-pf_compId')
+			this.weighingList.warehouseName = this.warehouseName
+			this.weighingList.warehouseType=this.warehouseType
+			this.weighingList.secretaryWeigher = localStorage.getItem('ws-pf_staffName')
+			this.$confirm('确定保存检斤信息?', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+			})
+			.then(() => {
+				this.weighingList.inOutFlag = 1
+              	this.weighingList.statusFlag = 3
+				if (this.tpyeNo == 1) {
+					this.weighingList.relationId = this.relationId
+					this.weighingList.warehouseId = this.warehouseId
+					this.weighingList.baseId=this.warehouseId
+					if(this.weighingList.id){
+						tareEdit(this.weighingList)
+						.toPromise()
+						.then((response) => {
+							this.$notify.success({
+								title: '成功',
+								message: '提交成功',
+							})
+							addstorageputList(this.weighingList)
+							.toPromise()
+							.then((response) => {
+								if (this.reader) {
+									this.reader.cancel()
+								}
+								this.inspect=JSON.parse(JSON.stringify(this.weighingList))
+								this.isShowPrint=true
+								this.weighingList= {
+									grossWeight: 0,
+									tare: 0,
+									tips:'',
+										// contractNo:'',
+										// inOutTaskNo:'',
+									buckleMiscellaneous: 0,
+									netWeight: 0,
+									receivableWeighingFee: '',
+									warehouseInOutDetail: {
+										grade:'',
+										imperfectGrain:'',
+										impurity:'',
+										jiaorenli:'',
+										bulkDensity:'',
+										mildewGrain:'',
+									},
+									qualityInspectionManagement: {
+										boxNo: "暂无",
+										boxNoOther: "暂无",
+										titleNo: "暂无",
+										titleNoOther: "暂无",
+									}
+								}
+								this.getList()
+							})
+						})
+						.catch((response) => {})
+					}else{
+						tareAdd(this.weighingList)
+						.toPromise()
+						.then((response) => {
+						this.$notify.success({
+							title: '成功',
+							message: '提交成功',
+						})
+						addstorageputList(this.weighingList)
+						.toPromise()
+						.then((response) => {
+							if (this.reader) {
+								this.reader.cancel()
+							}
+							this.isShowPrint=true
+							this.inspect=JSON.parse(JSON.stringify(this.weighingList))
+							this.weighingList= {
+								grossWeight: 0,
+								tare: 0,
+								tips:'',
+									// contractNo:'',
+									// inOutTaskNo:'',
+								buckleMiscellaneous: 0,
+								netWeight: 0,
+								receivableWeighingFee: '',
+								warehouseInOutDetail: {
+									grade:'',
+									imperfectGrain:'',
+									impurity:'',
+									jiaorenli:'',
+									bulkDensity:'',
+									mildewGrain:'',
+								},
+								qualityInspectionManagement: {
+									boxNo: "暂无",
+									boxNoOther: "暂无",
+									titleNo: "暂无",
+									titleNoOther: "暂无",
+								}
+							}
+							this.getList()
+						})
+						
+					})
+					.catch((response) => {})
+					}
+				} else if (this.tpyeNo == 2) {
+					this.weighingList.warehouseId = this.warehouseId
+					this.weighingList.baseId=this.warehouseId
+					grossWeight(this.weighingList)
+						.toPromise()
+						.then((response) => {
+							this.$notify.success({
+								title: '成功',
+								message: '提交成功',
+							})
+							addstorageputList(this.weighingList)
+							.toPromise()
+							.then((response) => {
+								if (this.reader) {
+									this.reader.cancel()
+								}
+								this.inspect=JSON.parse(JSON.stringify(this.weighingList))
+								this.isShowPrint=true
+								this.weighingList= {
+									grossWeight: 0,
+									tare: 0,
+									tips:'',
+										// contractNo:'',
+										// inOutTaskNo:'',
+									buckleMiscellaneous: 0,
+									netWeight: 0,
+									receivableWeighingFee: '',
+									warehouseInOutDetail: {
+										grade:'',
+										imperfectGrain:'',
+										impurity:'',
+										jiaorenli:'',
+										bulkDensity:'',
+										mildewGrain:'',
+									},
+									qualityInspectionManagement: {
+										boxNo: "暂无",
+										boxNoOther: "暂无",
+										titleNo: "暂无",
+										titleNoOther: "暂无",
+									}
+								}
+								this.getList()
+							})
+						})
+						.catch((response) => {})
+				}
+			})
+			.catch(() => {return false})
+		},
+		carNoTypeChange() {
+			this.carjudge = !this.carjudge
+			if (!this.carjudge) {
+			this.deptBudgetList.selfLoading = '0'
+			this.carChange1 = '手动填写'
+			} else {
+			this.deptBudgetList.selfLoading = '1'
+			this.carChange1 = '识别下拉'
+			}
+		},
+		tabClick(val){
+			this.weighingList = []
+			this.index = val
+			if (val == 0) {
+				this.information = '皮重'
+				this.tpyeNo = '1'
+			} else {
+				this.tpyeNo = '2'
+				this.information = '毛重'
+			}
+			this.getList()
+		},
+			warehouseNameChange(e) {
+				for (let i = 0; i < this.warehouseList.length; i++) {
+				if (this.warehouseList[i].value == e) {
+					this.warehouseId = this.warehouseList[i].warehouseId
+				}
+				}
+				for (let i = 0; i < this.warehouseList1.length; i++) {
+					if(this.warehouseList1[i].warehouseName==e){
+						this.positionInfos=this.warehouseList1[i].positionInfos
+						this.warehouseCount = this.warehouseList1[i].count
+                  		this.warehouseNo = this.warehouseList1[i].commonWarehouseNo
+						  this.warehouseType=this.warehouseList1[i].warehouseType
+					}
+				}
+				this.getList()
+			},
+			async openPort(){
+			 console.log('openPort', navigator)
+        if ('serial' in navigator) {
+        //   if (!this.$store.state.app.reader) {
+            // The Web Serial API is supported.
+            console.log('the Web Serial API is supported.')
+            console.log(this.param)
+            const port = await navigator.serial.requestPort()
+            await port.open({
+              baudRate: this.param,
+            }) // set baud rate
+            this.reader = port.readable.getReader()
+            console.log('beforeReader', port)
+            console.log('beforeReader', this.reader)
+            this.$store.dispatch('app/setReader', this.reader)
+        //   } else {
+        //     console.log('afterport', this.$store.state.app.reader)
+        //     this.reader = this.$store.state.app.reader
+        //   }
+				// 监听来自串行设备的数据
+				while (true) {
+				const { value, done } = await this.reader.read();
+				// console.log("value",value);
+				if (done) {
+					// 允许稍后关闭串口。
+					this.reader.releaseLock();
+					break;
+				}
+				var result='';
+				//2。获取16进制字符串
+				// var receData = HexConvert.ByteToString(value);
+				// console.log("receData",receData);
+				var flag = false;
+				// for(var i=0;i<value.length;i++){
+				// 	var tmp = String.fromCharCode(value[i])
+				// 	if(tmp == '+'){
+				// 	flag = true
+				// 	}
+				// 	if(flag && result.length <6 && tmp != '+'){
+				// 	result += tmp
+				// 	}
+				// }
+				// if(this.tpyeNo != 2){
+				// 	this.weighingList.grossWeight = parseInt(result)
+				// }
+				// else{
+				// 	this.weighingList.tare = parseInt(result) 
+				// }
+				if(this.warehouseName&&(this.warehouseName == '山东诸城迈饶库'||this.warehouseName == '克东千红库')||this.warehouseName == '鲅鱼圈祥腾库'||this.warehouseName == '哈尔滨依兰库'
+				||this.warehouseName == '龙江金信库'){
+					for (var i = 0; i < value.length; i++) {
+						var tmp = String.fromCharCode(value[i])
+						if (tmp == '+') {
+						flag = true
+						}
+						if (flag && result.length < 6 && tmp != '+') {
+						result += tmp
+						}
+					}
+					if (this.tpyeNo != 2) {
+						if(parseInt(result)|| parseInt(result) == 0){
+							this.weighingList.weight = parseInt(result)
+						}
+					} else {
+						if(parseInt(result)|| parseInt(result) == 0){
+							this.weighingList.weight = parseInt(result)
+						}
+					}
+				}
+				else if (this.warehouseName && (this.warehouseName == '顺诚粮库'||this.warehouseName == '鲅鱼圈金信库')) {
+					for (var i = value.length - 1; i >= 0; i--) {
+						var tmp = String.fromCharCode(value[i])
+						console.log(tmp)
+						if (String.fromCharCode(value[0]) == '.') {
+						flag = true
+						}
+						if (flag && result.length < 9 && tmp != '='&& tmp != '.') {
+						result += tmp
+						}
+					}
+					if (this.tpyeNo != 2) {
+						if (parseInt(result) || parseInt(result) == 0) {
+							this.weighingList.weight = parseInt(result)
+						}
+					} else {
+						if (parseInt(result) || parseInt(result) == 0) {
+							this.weighingList.weight = parseInt(result)
+						}
+					}
+				}
+				else{
+					for(var i=0;i<value.length;i++){
+						var tmp = String.fromCharCode(value[i])
+						if(value[0] != 49 && value[0] != 2){
+						break
+						}
+						if (tmp == String.fromCharCode(32) ) {
+						flag = true
+						}
+						if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
+						// if(i-1 >=0 &&tmp == String.fromCharCode(48) && value[i-1] == 32){
+						// 	continue
+						// }
+						// if(i-2 >=0 &&tmp == String.fromCharCode(48) && value[i-2] == 32){
+						// 	continue
+						// }
+						result += tmp
+						}
+					}
+					if (this.tpyeNo != 2) {
+						if(parseInt(result)|| parseInt(result) == 0){
+						this.weighingList.weight = parseInt(result)*100
+						}
+					} else {
+						if(parseInt(result)|| parseInt(result) == 0){
+						this.weighingList.weight = parseInt(result)*100
+						}
+					}
+				}
+				// setTimeout(1000)
+				// value 是一个 Uint8Array
+				}
+				await port.close();
+			}
+			else{
+				console.log('the Web Serial API is not supported.',navigator);
+			}
+			},
+			find() {
+				this.getList()
+			},
+			calculation() {
+				if (this.weighingList.grossWeight && this.weighingList.tare) {
+					let count = 0
+					this.weighingList.netWeight =
+						this.weighingList.grossWeight -
+						this.weighingList.tare
+				}
+			},
+			carChange(e) {
+				for (let i = 0; i < this.tranCarInfoList.length; i++) {
+					if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+						this.weighingList.tranCarNo = this.tranCarInfoList[i].tranCarNo
+						this.weighingList.carId = this.tranCarInfoList[i].id
+					}
+				}
+			},
+			// 获取当前年月日
+			getTime(){
+				var date= new Date()
+				var mouth=date.getMonth()+1
+				var day=date.getDate()
+				if(mouth<10){
+					mouth='0'+mouth
+				}
+				if(day<10){
+					day='0'+day
+				}
+				return date.getFullYear()+mouth+date.getDate()
+			},
+			contractNoChange(e){
+				for (let i = 0; i < this.taskNolist.length; i++) {
+					if (this.taskNolist[i].inOutTaskNo == e) {
+						var data = this.taskNolist[i]
+						if (this.taskNolist[i].contractNo) {
+							// console.log(this.taskNolist[i])
+						this.weighingList.contractNo = this.taskNolist[i].contractNo
+						} else {
+						this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
+						}
+					}
+				}
+				if (!data) return
+				for (var i = 0; i < this.outContractNo.length; i++) {
+					if (this.outContractNo[i].contractNo == this.weighingList.contractNo) {
+						this.weighingList.goodsName = this.outContractNo[i].goodsName
+						this.weighingList.goodsName = this.outContractNo[i].goodsName
+						if (this.weighingList.goodsName == '玉米(潮粮)') {
+							this.weighingList.type = '潮粮'
+						} else {
+							this.weighingList.type = '干粮'
+						}
+						this.weighingList.goodsNameKey = this.outContractNo[i].goodsNameKey
+						this.weighingList.grade = this.outContractNo[i].grade
+						this.weighingList.inOutType = this.outContractNo[i].inOutType
+					if (this.outContractNo[i].inOutType == '销售出库') {
+						this.weighingList.number='XSCK'+this.getTime()+this.warehouseNo+this.warehouseCount
+						this.weighingList.buyer = this.outContractNo[i].buyer
+						this.weighingList.seller = localStorage.getItem('ws-pf_compName')
+						if (!this.outContractNo[i].unitContractPrice) {
+							this.weighingList.tips ='买方' +this.outContractNo[i].buyer
+						} else {
+							this.weighingList.tips ='买方' +
+							this.outContractNo[i].buyer +'( ' +this.outContractNo[i].unitContractPrice +'元/吨)'
+						}
+						this.weighingList.inOutTypeKey = 1
+					} else if (this.outContractNo[i].inOutType == '移库出库') {
+						this.weighingList.number='YKCK'+this.getTime()+this.warehouseNo+this.warehouseCount
+						this.weighingList.buyer = this.outContractNo[i].receiveWarehouse
+						this.weighingList.seller = this.outContractNo[i].sendWarehouse
+						this.weighingList.goodsName = data.goodsName
+						this.weighingList.goodsNameKey = data.goodsNameKey
+						this.weighingList.grade = data.grade
+						if (this.outContractNo[i].unitContractPrice) {
+							this.weighingList.tips ='入货库' +data.receiveWarehouse +'( ' +this.outContractNo[i].unitContractPrice +'元/吨)'
+						} else {
+							this.weighingList.tips = '入货库' + data.receiveWarehouse
+						}
+						this.weighingList.inOutTypeKey = 3
+					} else if (this.outContractNo[i].inOutType == '暂存入库') {
+						this.weighingList.inOutTypeKey = 4
+					} else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+						this.weighingList.inOutTypeKey = 5
+					} else if (this.outContractNo[i].inOutType == '采购出库') {
+						this.weighingList.inOutTypeKey = 6
+					}
+					if (this.outContractNo[i].deliverType == '1') {
+						this.carstatus = true
+					} else {
+						this.carstatus = false
+					}
+					if (this.outContractNo[i].tranCarInfoList) {
+						this.options2 = this.outContractNo[i].tranCarInfoList
+						this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+						this.fleetNameList=this.outContractNo[i].tranCarInfoList1
+						this.carstatus = true
+					}
+				}
+				}
+			},
+			selectWarehouse() {
+				selectWarehouseSelf({
+					compId: localStorage.getItem('ws-pf_compId'),
+				})
+				.toPromise()
+				.then((response) => {
+					this.warehouseList = []
+					for (let i = 0; i < response.length; i++) {
+					this.warehouseList.push({
+						value: response[i].warehouseName,
+						warehouseId: response[i].id,
+					})
+					}
+					this.warehouseList1=response
+					this.warehouseName = this.warehouseList[0].value
+					this.warehouseId = this.warehouseList[0].warehouseId
+					this.positionInfos=response[0].positionInfos
+					this.warehouseCount = response[0].count
+                  	this.warehouseNo = response[0].commonWarehouseNo
+					this.warehouseType=response[0].warehouseType
+					this.getList()
+				})
+			},
+			getList() {
+				// pullDown({
+				// 	constId: 'CON6',
+				// })
+				// .toPromise()
+				// .then((response) => {
+				// 	this.storageType = response
+				// })
+				getReceiptTaskNo({
+					flag: 1,
+					warehouseName: this.warehouseName,
+					agentKey: localStorage.getItem('ws-pf_userId'),
+				})
+				.toPromise()
+				.then((response) => {
+					this.taskNolist = response
+				})
+				//合同编号
+				xialaNo({
+					compId: localStorage.getItem('ws-pf_compId'),
+					flag: 5,
+				})
+				.toPromise()
+				.then((response) => {
+					this.outContractNo = response
+				})
+				getweighingList({
+					compId: localStorage.getItem('ws-pf_compId'),
+					currentPage: this.currentPage,
+					pageSize: this.pageSize,
+					searchKeyWord: this.searchKeyWord,
+					warehouseName: this.warehouseName,
+					managementType: 3,
+					statusType:this.statusType
+				})
+				.toPromise()
+				.then((response) => {
+					this.deliveryList = response.records
+					this.deptBudgetTotal = response.total
+					for (var i = 0; i < response.records.length; i++) {
+					if (response.records[i].addressUrl != null) {
+						if (response.records[i].addressUrl) {
+						response.records[i].addressUrlArray = response.records[i].addressUrl.split(',')
+						}
+					} else {
+						response.records[i].addressUrlArray = []
+					}
+					}
+					for (var i = 0; i < response.records.length; i++) {
+					var arr = new Array()
+					this.addressUrls[i] = new Array()
+					if (this.weighingList.records[i].addressUrl !=
+						null) {
+						arr = this.weighingList.records[i].addressUrl.split(',')
+						this.addressUrls[i] = arr
+					}
+					}
+				})
+				.catch((response) => {
+
+				})
+			},
+		},
+	}
+</script>
+<style lang="scss" scoped>
+	.center {
+		background: #fff;
+	}
+
+	.ws-info-table {
+		border: none;
+	}
+	.base_header_layout{
+		padding:10px;
+		margin-bottom:10px;
+	}
+	.ws-info-table .el-form-item {
+		width: 50%;
+		border: none;
+	}
+
+	.formItem {
+		width: 100%;
+		display: inline;
+	}
+
+	.ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 100%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    text-align: center;
+    background: #ffffff;
+    color: #8890b1;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+  }
+  /deep/.el-textarea__inner{
+    width:92%;
+  }
+  /deep/.ws-info-table .el-form-item.rememo .el-form-item__content{
+  height:76px;
+  }
+
+	.title {
+		font-size: 16px;
+		font-weight: 600;
+		margin: 10px;
+	}
+
+	.titleup {
+		position: relative;
+	}
+
+	.title::before {
+		content: '';
+		display: inline-block;
+		width: 5px;
+		height: 15px;
+		background: #8890b1;
+		margin-right: 5px;
+	}
+
+	.substance {
+		background: #ffffff;
+		width: 100%;
+		border-radius: 4px;
+		margin: 0 auto;
+		padding-top: 20px;
+	}
+
+	/deep/.el-table .el-table__header .cell,
+	.el-table .el-table__body .cell {
+		text-align: center;
+	}
+
+	/deep/.el-table--enable-row-transition .el-table__body td {
+		text-align: center;
+	}
+
+	.bg-left {
+		padding-left: 30px;
+	}
+
+	.bg-right {
+		padding-right: 10px;
+		text-align: right;
+	}
+
+	.bg-bottom {
+		margin: 15px 0px;
+	}
+
+	.titleup {
+		position: relative;
+	}
+
+	/deep/ .substance .bangdan {
+		width: 100%;
+		padding-top: 6%;
+		padding-bottom: 6%;
+	}
+
+	// // .photo2{
+	// //   margin-top: 10px;
+	// // }
+	.el-upload--picture-card {
+		background-color: #fbfdff;
+		border: 1px dashed #c0ccda;
+		border-radius: 6px;
+		box-sizing: border-box;
+		width: 148px;
+		height: 148px;
+		line-height: 146px;
+		vertical-align: top;
+		margin-left: -289px;
+	}
+
+	// .titleup::before {
+	// 	content: '';
+	// 	display: inline-block;
+	// 	width: 5px;
+	// 	height: 30px;
+	// 	background: #5473e8;
+	// 	position: absolute;
+	// 	left: 0;
+	// }
+
+	.but {
+		text-align: center;
+		margin: 20px auto;
+	}
+
+	.butCss {
+		opacity: 0;
+		color:#000;
+	}
+	.center{
+		overflow-y:scroll;
+	}
+	.el-button--success.is-plain{
+		border:1px solid #2aff7c;
+		background:black;
+		color:#2aff7c;
+		width:50%;
+	}
+	.top {
+        background: black;
+        color: #2aff7c;
+        font-size: 32px;
+        text-align: right;
+        padding:20px;
+        // border-radius: 10px;
+        margin: 0 20px 20px 20px;
+
+        .zujian {
+          position: relative;
+        }
+
+        .kg-style {
+          font-size: 30px;
+          color: red;
+        }
+ 
+        .confirmInfo {
+          display: flex;
+			line-height:90px;
+          .car-type {
+            text-align: left;
+            width: 50%;
+          }
+
+          .car-no {
+            width: 50%;
+            text-align: right;
+          }
+        }
+
+        .confirmWeight {
+          	display: flex;
+			align-items: center;
+          .titleWeight {
+            width: 35%;
+            text-align: left;
+            line-height: 90px;
+            color: red;
+          }
+
+          .weight {
+            width: 65%;
+            text-align: right;
+            color: red;
+          }
+        }
+      }
+
+      .bottom {
+        // text-align: center;
+        background: white;
+        margin: 20px 20px 0 20px;
+        // border-radius: 10px;
+        padding-bottom: 20px;
+
+        .img1,
+        .img2 {
+          width: 200px;
+          padding: 20px;
+        }
+
+        .video-content {
+          width: 100%;
+        }
+        .video1{
+          text-align: center;
+        }
+      }
+</style>

+ 434 - 0
src/views/outboundManagement/weighingManagementrecord.vue

@@ -0,0 +1,434 @@
+<!--检斤管理-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="12">
+      <template slot="left">
+      </template>
+      <!-- <template slot="left"> </template> -->
+      <template slot="right">
+        <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType">
+          <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        <ws-input class='findinput' @keyup.enter.native="find()" v-model="searchKeyWord" placeholder="可按业务编号、合同编号、车牌号查找"
+          clearable maxlength="500" type="input">
+        </ws-input>
+        <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table :data="weighingList" style="width: 100%; margin-top: 20px" ref="weighingList" border height="calc(100% - 110px)">
+      <el-table-column type="index" label="序号" width="50">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="number" label="业务编号"></el-table-column>
+      <el-table-column prop="contractNo" width="140" label="合同编号/移库编号">
+        <template scope="scope">
+          <span v-if="scope.row.contractNo">{{ scope.row.contractNo }}</span>
+          <span v-else>{{ scope.row.moveTaskNo }}</span>
+        </template></el-table-column>
+      <el-table-column prop="goodsName" label="货名"></el-table-column>
+      <el-table-column prop="carNumber" label="车牌号"></el-table-column>
+      <el-table-column prop="grossWeight" label="毛重(公斤)"></el-table-column>
+      <el-table-column prop="tare" label="皮重(公斤)"></el-table-column>
+      <el-table-column prop="buckleMiscellaneous" label="扣重(公斤)"></el-table-column>
+      <el-table-column prop="netWeight" label="净重(公斤)"></el-table-column>
+      <!-- <el-table-column prop="binNumber" label="仓位号"></el-table-column>
+      <el-table-column prop="storageNumber" label="囤位号"></el-table-column> -->
+      <el-table-column prop="secretaryWeigher" label="司称员"></el-table-column>
+      <el-table-column prop="grossDate" width="140" label="检斤时间">
+        <template slot-scope="scope">
+          {{scope.row.grossDate}}
+          <span v-if="scope.row.grossDate == null">
+            {{scope.row.tareDate}}
+          </span>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column prop="addressUrl" label="附件">
+        <template slot-scope="scope">
+          <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
+          <span v-if="scope.row.addressUrlArray != null">
+            {{scope.row.addressUrlArray.length == 0? "":scope.row.addressUrlArray.length}}
+          </span>
+        </template>
+      </el-table-column> -->
+      <el-table-column prop="status" label="状态"></el-table-column>
+      <el-table-column width="300" prop="contractNo1" label="操作">
+        <template slot-scope="scope">
+          <!-- <el-button @click="weighing(scope.row, 1)" v-if="scope.row.status != '已质检'"
+            v-hasPermission="`outbound.acquisitionWeightOut.mao`">毛重</el-button>
+          <el-button @click="weighing(scope.row, 2)" v-if="scope.row.status == '已称皮重'"
+            v-hasPermission="`outbound.acquisitionWeightOut.weight`"> 皮重</el-button> -->
+            <el-button @click="dayin(scope.row)"
+            v-hasPermission="`outbound.acquisitionWeightOut.view`">打印</el-button>
+          <el-button @click="del(scope.row)" v-if="scope.row.status == '已称皮重'"
+            v-hasPermission="`outbound.acquisitionWeightOut.view`">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div style="text-align: center">
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+    <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose">
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+    </WinseaContentModal>
+    <el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="粮食检斤单"
+      @opened="opendBtn"
+      @close="closeDialog"
+      :close-on-click-modal="false"
+    >
+      <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
+      <div style="text-align: center">
+        <el-button type="primary" @click="closePrint">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    getweighingList,
+    selectWarehouseSelf,
+    delelteWeighing,
+    getweighing
+  } from '@/model/outboundManagement/index'
+  import {
+    EventBus
+  } from 'base-core-lib'
+  import WsUpload from '@/components/WsUpload'
+  import weightCheckPrint from './component/weightCheckPrint.vue'
+  import inspectInfoPrint from './component/inspectInfoPrint.vue'
+   import html2canvas from 'html2canvas'
+  export default {
+    components: {
+      WsUpload,
+      inspectInfoPrint,
+			weightCheckPrint
+    },
+    data() {
+      return {
+        //分页
+        dialogViewSpareMoney: false,
+        currentPage: 1,
+        pageSize: 10,
+        inspect:{},
+        deptCircularPage: {},
+        deptBudgetTotal: 0,
+        paymentForm: false,
+        isShowPrint:false,
+        paymentForm1: false,
+        weighingList: [],
+        searchKeyWord: '',
+        searchType: [],
+        warehouseName: '',
+        value1: '', //选择时间
+        warehouseList: [],
+        warehouseId: '',
+        accessoryTFs: false,
+        appendixIdss: [],
+        addressUrls: [],
+        compId: localStorage.getItem('ws-pf_compId'),
+      }
+    },
+    activated() {
+      this.selectWarehouse()
+      this.showType = this.isShow
+    },
+    methods: {
+      warehouseNameChange(e) {
+        // this.warehouseName = e
+        console.log(this.warehouseList)
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseList[i].value == e) {
+            this.warehouseId = this.warehouseList[i].warehouseId
+          }
+        }
+        this.getList()
+      },
+      weighing(row, num) {
+        console.log
+        this.$router.push({
+          path: 'weighing',
+          query: {
+            typeNo: num,
+            id: row.id,
+            number: row.number,
+            binNumber: row.binNumber,
+            customer: row.customer,
+            storageNumber: row.storageNumber,
+            carNumber: row.carNumber,
+            goodsName: row.goodsName,
+            grossWeight: row.grossWeight,
+            tare: row.tare,
+            netWeight: row.netWeight,
+            relationId: row.relationId,
+            warehouseId: this.warehouseId,
+            warehouseName: this.warehouseName,
+          },
+        })
+      },
+      // Reacquire() {
+      //   //重新获取
+      // },
+      find() {
+        this.getList()
+      },
+      dayin(row){
+        getweighing({
+          id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.inspect=response
+            this.isShowPrint=true
+          })
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      printSmall() {
+      // window.open(
+      //   '../../../../static/weightCheck.html?type=1&tableData=' +
+      //     JSON.stringify(this.inspect)
+      // )
+      localStorage.setItem('inspect',JSON.stringify(this.inspect))
+        window.open('../../../static/weightChecknew.html?type=1' )
+    },
+    printBig() {
+      localStorage.setItem('inspect',JSON.stringify(this.inspect))
+        window.open('../../../static/weightChecknew.html?type=2' )
+      // window.open(
+      //   '../../../../static/weightCheck.html?type=2&tableData=' +
+      //     JSON.stringify(this.inspect)
+      // )
+    },
+    opendBtn() {
+      html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+        let dataURL = canvas.toDataURL('image/png')
+        this.imgUrl = dataURL
+        if (this.imgUrl !== '') {
+          let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+          let formdata = new FormData()
+          formdata.append('file', b)
+          axios({
+            method: 'post',
+            url: 'https://www.zthymaoyi.com/upload/admin',
+            data: formdata,
+          }).then((response) => {
+            //编辑接口
+            this.weighingList.pictureAddress = response.data.url
+            tare(this.weighingList)
+              .toPromise()
+              .then((response) => {})
+          })
+        }
+      })
+    },
+    closeDialog() {
+      html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+        let dataURL = canvas.toDataURL('image/png')
+        this.imgUrl = dataURL
+        if (this.imgUrl !== '') {
+          let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+          let formdata = new FormData()
+          formdata.append('file', b)
+          axios({
+            method: 'post',
+            url: 'https://www.zthymaoyi.com/upload/admin',
+            data: formdata,
+          }).then((response) => {
+            //编辑接口
+            this.weighingList.pictureAddress = response.data.url
+            tare(this.weighingList)
+              .toPromise()
+              .then((response) => {})
+          })
+          this.dialogTableVisible = true
+        }
+      })
+      this.isShowPrint = false
+      // this.$router.push({
+      //   path: 'weighingManagement'
+      // })
+    },
+    closePrint() {
+      this.isShowPrint = false
+      // this.$router.push({
+      //   path: 'weighingManagement'
+      // })
+    },
+      del(row) {
+        this.$confirm(`检斤信息删除后不可恢复,是否确定删除?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            delelteWeighing({
+                id: row.id
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '删除成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {})
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      selectWarehouse() {
+        selectWarehouseSelf({
+            compId: localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList = []
+            for (let i = 0; i < response.length; i++) {
+              this.warehouseList.push({
+                value: response[i].warehouseName,
+                warehouseId: response[i].id,
+              })
+            }
+            this.warehouseName = this.warehouseList[0].value
+            this.warehouseId = this.warehouseList[0].warehouseId
+            this.getList()
+          })
+      },
+      getList() {
+        getweighingList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchKeyWord: this.searchKeyWord,
+            warehouseName: this.warehouseName,
+            managementType: 3,
+          })
+          .toPromise()
+          .then((response) => {
+            this.weighingList = response.records
+            this.deptBudgetTotal = response.total
+            for (var i = 0; i < response.records.length; i++) {
+              if (response.records[i].addressUrl != null) {
+                if (response.records[i].addressUrl) {
+                  response.records[i].addressUrlArray = response.records[i].addressUrl.split(',')
+                }
+              } else {
+                response.records[i].addressUrlArray = []
+              }
+            }
+            for (var i = 0; i < response.records.length; i++) {
+              var arr = new Array()
+              this.addressUrls[i] = new Array()
+              if (this.weighingList.records[i].addressUrl !=
+                null) {
+                arr = this.weighingList.records[i].addressUrl.split(',')
+                this.addressUrls[i] = arr
+              }
+            }
+          })
+          .catch((response) => {
+
+          })
+      },
+      //附件
+      fujian(row) {
+        if (row.addressUrl === null || row.addressUrl === '') {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        } else {
+          this.accessoryTFs = true
+        }
+        this.appendixIdss = row.addressUrl
+      },
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .title {
+    font-size: 20px;
+    font-weight: 600;
+    margin: 20px;
+  }
+
+  .ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    text-align: center;
+    background: #ffffff;
+    color: #8890b1;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+  }
+
+  /deep/.el-table .el-table__header .cell,
+  .el-table .el-table__body .cell {
+    text-align: center;
+  }
+
+  /deep/.el-table--enable-row-transition .el-table__body td {
+    text-align: center;
+  }
+
+  .formItem {
+    width: 51% !important;
+  }
+
+  /deep/.base_header_layout .find.el-button--primary {
+    width: 30px;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+.findinput{
+  margin-left: 20px;
+}
+  /deep/.base_header_layout .findinput input {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+</style>

+ 926 - 0
src/views/platformaudit/driverAudit.vue

@@ -0,0 +1,926 @@
+<!--采购合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="8">
+      <template slot="left">
+        <ws-button type="primary" @click="handleAdd()"
+        v-hasPermission="
+            `contractManagement.buyContract.buyContractInfo.add`
+          "
+          ><img
+            width="13"
+            height="13"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 2px;
+              left: -4px;
+            "
+            src="../../../public/img/header-add.png"
+            alt=""
+          />添加</ws-button
+        >
+        <ws-button
+          @click="exportlist()"
+          v-hasPermission="
+           `contractManagement.buyContract.buyContractInfo.view`
+          "
+          >导出</ws-button
+        >
+      </template>
+      <template slot="right">
+          <span style="width: 142px; display: inline-block;color: #8890B1;">状态:</span>
+        <ws-select
+          v-model="searchTypeText"
+          placeholder=""
+          class="typeselect"
+          @change="selecttaskType"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890B1;"
+          />
+        </ws-select>
+
+        <el-date-picker
+          v-model="value2"
+          type="daterange"
+          align="right"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions"
+        >
+        </el-date-picker>
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按照合同编号、买方名称、卖方名称进行查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button
+          class="find"
+          type="primary"
+          @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table
+      class="wenzi"
+      :data="contractList.records"
+      style="width: 100%; margin-top: 10px"
+      height="780"
+    >
+      <el-table-column type="index" label="序号">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="contractNo" label="合同编号" width="80">
+      </el-table-column>
+      <el-table-column prop="goodsName" label="货名" width="80">
+      </el-table-column>
+      <el-table-column prop="grade" label="品级">
+        <template slot-scope="scope">
+          <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '等外'" class="substandard">{{
+            scope.row.grade
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
+      <el-table-column prop="unitContractPrice" label="合同单价(元)">
+      </el-table-column>
+      <el-table-column prop="packingMethod" label="包装方式"> </el-table-column>
+      <el-table-column prop="buyer" label="买方"> </el-table-column>
+      <el-table-column prop="seller" label="卖方"> </el-table-column>
+      <el-table-column prop="imperfectGrain" label="已完成(吨)">
+        <template slot-scope="scope">
+          <span style="color: #5473e8; font-weight: 600">{{
+            scope.row.imperfectGrain
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="status" label="状态">
+        <template slot-scope="scope">
+          <el-popover
+            placement="left"
+            :width="285"
+            trigger="click"
+            visible-arrow="false"
+            @show="history(scope.row)"
+          >
+            <template>
+              <span slot="reference">
+                <span
+                  v-if="scope.row.status == '待执行'"
+                  class="executory"
+                ></span>
+                <span
+                  v-if="scope.row.status == '执行中'"
+                  class="inExecution"
+                ></span>
+                <span v-if="scope.row.status == '已完成'" class="done"></span
+                >{{ scope.row.status }}
+              </span>
+            </template>
+            <div>
+              <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+              <div v-for="(item, index) in historyList" :key='index' class="flex">
+                <div class="vertical-text vertical-text-left">
+                  {{ item.updateDate }}
+                </div>
+                <div>
+                  <div class="vertical-circle"></div>
+                  <div
+                    v-if="index != historyList.length - 1"
+                    class="vertical-line"
+                  ></div>
+                </div>
+                <div class="vertical-text">
+                  {{ item.operateUser }}<br />{{ item.dealMsg }}
+                </div>
+              </div>
+            </div>
+          </el-popover>
+          <img
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="editClick(scope.row)"
+            alt=""
+          />
+          <!-- <i class="el-icon-edit" @click="editClick(scope.row)"></i> -->
+        </template>
+      </el-table-column>
+      <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
+      <el-table-column prop="mildewGrain" label="已付款(元)">
+      </el-table-column>
+      <el-table-column prop="addressUrl" label="附件">
+        <template slot-scope="scope">
+          <img
+            width="18"
+            height="20"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png"
+            @click="fujian(scope.row)"
+            alt=""
+          />
+          <span v-if="scope.row.addressUrlArray.length > 0">{{
+            scope.row.addressUrlArray.length
+          }}</span>
+          <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
+        </template>
+      </el-table-column>
+      <el-table-column prop="address" label="操作" width="200">
+        <template slot-scope="scope">
+          <img
+            width="16"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/chakan.png"
+            @click="handleExamine(scope.row)"
+            v-hasPermission="
+           `contractManagement.buyContract.buyContractInfo.view`
+          "
+            alt=""
+          />
+          <img
+            width="17"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/bianji.png"
+            @click="handleEdit(scope.row)"
+            v-hasPermission="
+           `contractManagement.buyContract.buyContractInfo.edit`
+          "
+            alt=""
+          />
+          <img
+            width="16"
+            height="17"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: -1px;
+              margin: 0 6px;
+            "
+            src="../../../public/img/shanchu.png"
+            v-hasPermission="
+           `contractManagement.buyContract.buyContractInfo.delete`
+          "
+            @click="handleDelete(scope.row)"
+            alt=""
+          />
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="deptCircularPage.pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    >
+    </el-pagination>
+    <!-- 附件弹框 -->
+    <WinseaContentModal
+      v-model="accessoryTFs"
+      :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose"
+    >
+      <p>查看附件</p>
+      <ws-upload
+        ref="upload"
+        table-name="maintain_work_order"
+        oss-key="mainPlan"
+        :comp-id="compId"
+        :appendix-ids="appendixIdsAdd"
+        :vesselId="deptBudgetList.addressUrl"
+        :size-limit="size"
+        @uploadSuccess="uploadSuccess"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+      />
+    </WinseaContentModal>
+  </div>
+</template>
+<script>
+import {
+  getList,
+  export1,
+  editstatus,
+  billoperatehis,
+  deletecontract,
+} from '@/model/contarct/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs,  EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      size: 10,
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deliver_type: 1,
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      appendixIdsAdd: '',
+      searchType: 1,
+      searchTypeText: '未完成',
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      // 提交类型
+      submitType: true,
+      deptCircularPage: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {},
+      historyList: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+      taskTypeList: [
+        { value: '未完成', type: 1 },
+        { value: '已完成', type: 2 },
+        { value: '全部合同', type: '' },
+      ],
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: '本周',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              var thisDay = start.getDay()
+              var thisDate = start.getDate()
+              if (thisDay != 0) {
+                start.setDate(thisDate - thisDay)
+              }
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本月',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setDate(1)
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本季度',
+            onClick(picker) {
+              var oDate = new Date()
+
+              var thisYear = oDate.getFullYear()
+              var thisMonth = oDate.getMonth() + 1
+
+              var n = Math.ceil(thisMonth / 3) // 季度
+
+              var Month = n * 3 - 1
+
+              var start = new Date(thisYear, Month - 2, 1)
+              var end = new Date()
+
+              picker.$emit('pick', [start, end])
+            },
+          },
+        ],
+      },
+      value1: '',
+      value2: '',
+    }
+  },
+  activated() {
+    console.log(this.$permission('PERMISSIONS.BUYCONTRACTINFO_ADD'))
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        contractType: this.contractType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        startDate: this.startDate,
+        endDate: this.endDate,
+        contrPage: this.contrPage,
+      })
+        .toPromise()
+        .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            if (response.records[i].addressUrl != null) {
+              response.records[i].addressUrlArray =
+                response.records[i].addressUrl.split(',')
+            } else {
+              response.records[i].addressUrlArray = []
+            }
+          }
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+          this.contractList = response
+        })
+    },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待执行' || row.status == '已完成') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      this.$confirm(`是否将状态改为${status}`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editstatus({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.addressUrl === null ||
+        row.addressUrl === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.addressUrlArray
+    },
+    handleExamine(row) {
+      console.log(row)
+      this.$router.push({
+        name: 'purchaseContractExamine',
+        query: { id: row.id, status: row.status },
+      })
+    },
+    handleAdd() {
+      this.$router.push({ path: 'purchaseContractAdd' })
+    },
+    handleEdit(row) {
+      this.$router.push({
+        name: 'purchaseContractEdit',
+        query: { id: row.id },
+      })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      if (this.value2) {
+        this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+        this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+      } else {
+        this.startDate = ''
+        this.endDate = ''
+      }
+      this.currentPage = 1
+      this.getList()
+    },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+    // deletecontract(){},
+    //删除
+    handleDelete(row) {
+      var text = ''
+      if (row.deliverType == 1) {
+        text =
+          '删除该合同将同时永久删除合同对应的临时仓库相关数据,是否确定删除?'
+      } else {
+        text = '合同删除后不可恢复,是否继续删除?'
+      }
+      this.$confirm(text, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          deletecontract({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {})
+        })
+        .catch(() => {
+          return false
+        })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.flex {
+  display: flex;
+}
+.el-range-editor.el-input__inner {
+  margin-left: 10px;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: -10px;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  border: 1px solid #5473e8;
+  color: #5473e8;
+}
+.warning {
+  width: 100%;
+  height: 2px;
+  background: red;
+}
+.executory,
+.inExecution,
+.done {
+  width: 6px;
+  height: 6px;
+  display: inline-block;
+  border-radius: 50%;
+  position: relative;
+  top: -1px;
+}
+.executory {
+  background: #ff9f24;
+}
+.inExecution {
+  background: #5878e8;
+}
+.done {
+  background: #50cad4;
+}
+.top-grade {
+  background: linear-gradient(90deg, #5678e9, #7993f6);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.second-class {
+  background: linear-gradient(90deg, #50cdd9, #82e2ea);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.third-class {
+  background: linear-gradient(90deg, #ffa735, #ffbf70);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.substandard {
+  background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.wrap {
+  width: 400px;
+  position: absolute;
+  top: 131px;
+  left: 794px;
+  transform-origin: right center;
+  z-index: 2005;
+}
+.vertical-line {
+  height: 100px;
+  border-left: 2px solid #e9ecf7;
+  margin-left: 4px;
+  padding: 0 3px;
+  // border-image: -webkit-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: -moz-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: linear-gradient(#00eba7, #08b8e6) 30 30;
+}
+.el-pagination {
+  padding: 10px 15px;
+  margin-bottom: 0;
+  text-align: center;
+}
+/deep/.el-pager li.active {
+  color: #5878e8;
+  cursor: default;
+}
+/deep/.el-pager li:hover {
+  color: #5878e8;
+  cursor: default;
+}
+.vertical-circle {
+  width: 10px;
+  height: 10px;
+  border: 2px solid #5878e8;
+  background-color: #ffffff;
+  -webkit-border-radius: 100px;
+}
+.vertical-circle:first-child {
+  color: red;
+}
+.vertical-text {
+  margin: 0 10px;
+  color: #8890b1;
+  font-size: 12px;
+  margin-top: -4px;
+}
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  text-align: center;
+}
+.typeselect {
+  width: 500px;
+}
+.padding-xs {
+  padding: 15px;
+  text-align: right;
+}
+.clearfix:after {
+  content: '';
+  display: block;
+  clear: both;
+}
+.el-table {
+  font-size: 16px;
+}
+.taskType {
+  width: 100%;
+  background-color: #fff;
+  margin-top: 2px;
+  margin-bottom: 10px;
+  list-style: none;
+  // padding-bottom: 20px;
+  li {
+    float: left;
+    border: 1px solid #6ea0f3;
+    border-radius: 5px;
+    max-width: 190px;
+    padding: 0 5px;
+    text-align: center;
+    margin: 10px 20px;
+    cursor: pointer;
+    font-size: 14px;
+    p {
+      margin: 8px 0px;
+      span {
+        color: #e74c3c;
+      }
+    }
+  }
+  li:hover {
+    background-color: #e4eeff;
+    color: #1d6ced;
+  }
+}
+.el-date-editor--date {
+  margin: 0 10px;
+}
+.findValue {
+  margin: 0 10px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+/deep/.typeselect .el-input__inner{
+   color: #8890B1;
+}
+</style>

+ 1428 - 0
src/views/platformaudit/purchaseContractAdd.vue

@@ -0,0 +1,1428 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">创建采购合同</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <ws-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList">
+      <div class="remark">
+        <h3>基本信息</h3>
+        <p style="color: #8890b1">
+          注:基本信息和货物信息均为必填项,“*” 标记的条目提交后不可修改。
+        </p>
+      </div>
+      <ws-info-table>
+        <!--合同编号-->
+        <ws-form-item label="合同编号" span="1" prop="contractNo" class="readonly" required>
+          <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="20" size="small" />
+        </ws-form-item>
+
+        <!--运输方式-->
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          <ws-input v-model="deptBudgetList.shippingType" placeholder="请输入运输方式" maxlength="100" size="small" />
+        </ws-form-item>
+        <!--买方-->
+        <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
+          <ws-input v-model="deptBudgetList.buyer" placeholder="请输入买方名称" maxlength="100" size="small" />
+        </ws-form-item>
+
+        <!--结算方式-->
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+          <ws-input v-model="deptBudgetList.settlementMethod" placeholder="请输入结算方式" maxlength="100" size="small" />
+        </ws-form-item>
+
+        <!--卖方-->
+        <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
+          <ws-input v-model="deptBudgetList.seller" placeholder="请输入卖方名称" maxlength="100" size="small" />
+        </ws-form-item>
+        <ws-form-item label="交货方式" span="1" prop="seller" class="readonly">
+          <el-radio v-model="deptBudgetList.deliverType" label="1">我方自提</el-radio>
+          <el-radio v-model="deptBudgetList.deliverType" label="2">对方送货</el-radio>
+        </ws-form-item>
+        <!--买方电话-->
+        <ws-form-item label="买方电话" span="1" prop="contractNo">
+          <ws-input v-model.number="deptBudgetList.buyerPhone" placeholder="请输入买方电话" maxlength="100" size="small" />
+        </ws-form-item>
+        <!--包装方式-->
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          <ws-select v-model="deptBudgetList.packingMethod" placeholder="" class="typeselect" :value="value1"
+            @change="selectpackingMethod">
+            <ws-option v-for="item in packtypeList" :key="item.constKey" :label="item.constValue"
+              :value="item.constValue" />
+          </ws-select>
+        </ws-form-item>
+        <!--卖方电话-->
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          <ws-input v-model="deptBudgetList.sellerPhone" placeholder="请输入卖方电话" maxlength="100" size="small" />
+        </ws-form-item>
+        <!--验收方式-->
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          <el-select v-model="deptBudgetList.acceptanceMethod" placeholder="请选择验收方式" style="width: 100%" filterable
+            @change="selectunitList">
+            <el-option v-for="(item, index) in unitList" :key="item.constValue" :label="item.constValue"
+              :value="item.constValue">
+              <span class="unit-left" style="float: left">
+                <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
+                <!-- 新增文本框 -->
+                <div style="width: 160px" v-if="item.flag !== 'delete'" @click.stop>
+                  <ws-input v-model="item.constValue" clearable maxlength="10" style="width: 100%"></ws-input>
+                </div>
+              </span>
+              <span style="float: right; color: #8492a6; font-size: 13px">
+                <!-- 对号 -->
+                <i class="el-icon-check" style="line-height: 29px; margin-left: 10px" v-if="item.flag !== 'delete'"
+                  @click.stop="saveClick(item, index)"></i>
+                <!-- 编辑 -->
+                <i class="el-icon-edit" style="line-height: 29px; margin-left: 10px" v-if="item.flag == 'delete'"
+                  @click.stop="editClick(item, index)"></i>
+                <!-- 删除 -->
+                <i class="el-icon-delete" style="line-height: 29px" @click.stop="deleteClick(item, index)"></i>
+              </span>
+            </el-option>
+            <!-- 新增按钮 -->
+            <el-option value="" label="">
+              <div style="
+                  text-align: right;
+                  border-top: 1px solid #dcdfe6;
+                  padding: 5px;
+                ">
+                <ws-button type="primary" @click.stop="addClick">{{
+                  $t('button.add')
+                }}</ws-button>
+              </div>
+            </el-option>
+          </el-select>
+        </ws-form-item>
+        <!--重量(吨)-->
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          <ws-input @input="weightchange" v-model="deptBudgetList.weight" placeholder="请输入重量(吨)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+        <!--交货日期(起)-->
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          <ws-date-picker v-model="deptBudgetList.deliveryDateStart" type="date" placeholder="请选择交货日期(起)"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+        <!--溢短装(%)-->
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          <ws-input v-model="deptBudgetList.overShort" placeholder="请输入溢短装比例(%)" maxlength="100" size="small" />
+        </ws-form-item>
+        <!--交货日期(止)-->
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          <ws-date-picker v-model="deptBudgetList.deliveryDateEnd" type="date" placeholder="请选择交货日期(止)"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+        <!--合同单价(元/吨)-->
+        <ws-form-item class="readonly" label="合同单价(元/吨)" span="1" prop="unitContractPrice">
+          <ws-input v-model="deptBudgetList.unitContractPrice" placeholder="请输入合同单价" maxlength="100" size="small" />
+        </ws-form-item>
+
+        <!--合同总价-->
+        <ws-form-item label="合同总价" span="1" prop="totalContractPrice">
+          <ws-input v-model="deptBudgetList.totalContractPrice" placeholder="请输入合同总价" maxlength="100" size="small" />
+        </ws-form-item>
+        <ws-form-item label="货源所在地区" span="1" prop="sourceGoods">
+          <el-cascader :options="options_" v-model="selectedOptions" clearable size="large" placeholder="请选择货源所在地区"
+            style="width: 200%" @change="handleChange" />
+        </ws-form-item>
+        <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+          <ws-input v-model="deptBudgetList.sourceGoods" placeholder="请输入货源详细地址" maxlength="20" size="small" />
+        </ws-form-item>
+        <ws-form-item label="交货所在地区" span="1" prop="sourceGoods">
+          <el-cascader :options="options_" v-model="selectedOptions1" clearable size="large" placeholder="请选择交货所在地区"
+            style="width: 200%" @change="handleChange1" />
+        </ws-form-item>
+        <ws-form-item label="交货详细地址" span="1" prop="placeDelivery">
+          <ws-input v-model="deptBudgetList.placeDelivery" placeholder="请输入交货详细地址" maxlength="20" size="small" />
+        </ws-form-item>
+        <!--签订日期-->
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          <ws-date-picker v-model="deptBudgetList.signingDate" type="date" placeholder="请选择合同签订日期"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+        <ws-form-item label="最终实际成交量(吨)" span="1" prop="finalTradingVolume">
+          <ws-input v-model="deptBudgetList.finalTradingVolume" placeholder="请输入最终实际成交量" maxlength="100" size="small" />
+        </ws-form-item>
+        <ws-form-item v-show="deptBudgetList.deliverType == 1" label="临时仓库负责人" span="1" prop="packingMethod">
+          <el-select v-model="deptBudgetList.personCharge" placeholder="请选择临时仓库负责人" filterable
+            :filter-method="dataFilter" @change="selectstaff">
+            <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
+          </el-select>
+        </ws-form-item>
+      </ws-info-table>
+      <div class="wenzi">
+        <h3>货物信息</h3>
+      </div>
+      <!--货物信息-->
+
+      <ws-info-table>
+        <!--货名-->
+        <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
+          <ws-select v-model="deptBudgetList.contractGoodsInfo.goodsName" placeholder="" class="typeselect"
+            @change="selectgoodsName">
+            <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+              :value="item.constValue" />
+          </ws-select>
+        </ws-form-item>
+
+        <!--水分(%)<=-->
+        <ws-form-item label="水分(%)" span="1" prop="waterContent">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.waterContent" placeholder="请输入水分占比" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--品级-->
+        <ws-form-item label="品级" span="1" prop="grade">
+          <ws-select v-model="deptBudgetList.contractGoodsInfo.grade" placeholder="" class="typeselect"
+            @change="selectgrade">
+            <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+              :value="item.constValue" />
+          </ws-select>
+        </ws-form-item>
+
+        <!--杂质(%)<=-->
+        <ws-form-item label="杂质(%)" span="1" prop="impurity">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.impurity" placeholder="请输入杂质占比(%)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--容量(克/升)>=-->
+        <ws-form-item label="容量(克/升)" span="1" prop="bulkDensity">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.bulkDensity" placeholder="请输入容重" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--霉变粒(%)<=-->
+        <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.mildewGrain" placeholder="请输入霉变粒占比(%)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--热损伤(%)<=-->
+        <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.jiaorenli" placeholder="请输入输入热损伤占比(%)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+        <!--不完整粒(%)<=-->
+        <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完整粒占比(%)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+      </ws-info-table>
+
+      <div class="wenzi">
+        <h3>流程信息</h3>
+      </div>
+      <!--流程信息-->
+
+      <ws-info-table>
+        <!--已付款(元)-->
+        <ws-form-item label="已付款(元)" span="1" prop="goodsNameKey">
+          <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.goodsNameKey" placeholder="请输入已付款(元)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--已开发票(元)-->
+        <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+          <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.goodsName" placeholder="请输入已开发票(元)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--费用支出(元)-->
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+          <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.waterContent" placeholder="请输入费用支出(元)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--未开发票(元)-->
+        <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+          <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.impurity" placeholder="请输入未开发票(元)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+        <!--双章原件回收情况-->
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+          <ws-select v-model="deptBudgetList.contractProcessInfo.grade" placeholder="" class="typeselect"
+            @change="selectChapterTwo">
+            <ws-option v-for="item in ChapterTwoList" :key="item.constKey" :label="item.constValue"
+              :value="item.constValue" />
+          </ws-select>
+        </ws-form-item>
+        <!--已完成发货量(吨)-->
+        <ws-form-item label="已完成发货量(吨)" span="1" prop="imperfectGrain">
+          <ws-input v-model="deptBudgetList.contractProcessInfo.imperfectGrain" placeholder="请输入已完成发货量(吨)"
+            maxlength="100" size="small" />
+        </ws-form-item>
+      </ws-info-table>
+
+      <div class="wenzi">
+        <h3>备注信息</h3>
+      </div>
+      <!--备注信息-->
+      <ws-input v-model="deptBudgetList.remarks" type="textarea" row="3" placeholder="请输入备注信息,不超过200字"
+        maxlength="200" />
+      <ws-upload ref="upload" table-name="maintain_work_order" oss-key="mainPlan" :comp-id="compId"
+        :appendix-ids="appendixIdsAdd" :vesselId="deptBudgetList.addressUrl" :size-limit="size"
+        @uploadSuccess="uploadSuccess" @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+    </ws-form>
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit(deptBudgetList)">提交</el-button>
+    </div>
+  </div>
+</template>
+<script>
+  //  import { getVesselOne } from '@/model/procurement/basic'
+  //  import { dayjs } from 'base-core-lib'
+  import {
+    packList,
+    addList,
+    xiala,
+    addxiala,
+    editxiala,
+    delxiala,
+    getstaff,
+  } from '@/model/contarct/index'
+  import {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  import WsUpload from '@/components/WsUpload'
+
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+    },
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        options_: regionData,
+        selectedOptions: [],
+        selectedOptions1: [],
+        // 提交类型
+        submitType: true,
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+
+        packtypeList: [],
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        rules: {
+          // contractNo: [
+          //   { required: true, message: '请输入合同编号', trigger: 'blur' },
+          //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' },
+          // ],
+        },
+        options: [],
+        staffList: [],
+        appendixIdsAdd: '',
+        size: 10,
+        // uploadSuccess: {},
+        // onChange:{},
+        unitList: [],
+        goodnameList: [],
+        value1: '袋装',
+        value2: '未回收',
+        gradeList: [],
+        ChapterTwoList: [],
+
+        deptBudgetList: {
+          deliverType: '1',
+          finalTradingVolume: 0,
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          contractProcessInfo: {},
+        },
+        acceptanceCheck: {},
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        // selectpackingMethod: {},
+        // selectgrade: {},
+        // selectunitList: {},
+        // selectDuty: {},
+        // isEdited: false,
+        // registered: {},
+        // selectCrtDuty: {},
+        // dutyList: {},
+        // sexList: {},
+        ruleDeptBudget: {
+          contractNo: [{
+              required: true,
+              message: '请输入活动名称',
+              trigger: 'blur'
+            },
+            {
+              min: 6,
+              max: 20,
+              message: '长度在 6 到 20 个字符',
+              trigger: 'blur',
+            },
+          ],
+        },
+        selectIntendedShip: {},
+        interviewTypeList: {},
+      }
+    },
+    activated() {
+      //cg.viewBudget
+      //cg.viewSpareMoney
+      // this.getVesselData();
+      this.deptBudgetList.packingMethod = '散装'
+      this.deptBudgetList.packingMethodKey = 1
+      this.deptBudgetList.contractGoodsInfo.goodsName = '玉米'
+      this.deptBudgetList.contractGoodsInfo.goodsNameKey = 1
+      this.deptBudgetList.contractProcessInfo.grade = '未回收'
+      this.deptBudgetList.contractProcessInfo.gradeKey = 1
+      this.deptBudgetList.contractGoodsInfo.grade = '一等品'
+      this.deptBudgetList.contractGoodsInfo.gradeKey = 1
+      getstaff({
+          compId: sessionStorage.getItem('ws-pf_compId')
+        })
+        .toPromise()
+        .then((response) => {
+          this.options = response
+          this.staffList = response
+        })
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    methods: {
+      dataFilter(val) {
+        this.deptBudgetList.personCharge = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+      },
+      weightchange(e) {
+        this.deptBudgetList.finalTradingVolume = e
+      },
+      returnsales() {
+        this.$router.push({
+          path: 'buyContract'
+        })
+      },
+      loaddata() {
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+      },
+      // 上传附件
+      uploadSuccess(data, files, url) {
+        console.log(data, files, url)
+
+        // this.deptBudgetList.
+        // this.formData.append('files', files)
+        // this.feedbackObj.uploadNameAttachment = data.appendixName
+        // this.feedbackObj.pathUploadAttachment = data.appendixPath
+        // // this.newAppendixs = files
+        // this.onChangeFlag = true
+      },
+      onChange(files) {
+        this.fileNum = files
+        this.$refs.upload.handleSaveBill().then((res) => {
+          console.log(files)
+        })
+      },
+      getUnitList() {
+        xiala({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+
+      submit() {
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '请输入合同编号',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractNo.length < 6 ||
+          this.deptBudgetList.contractNo.length > 20
+        ) {
+          this.$message({
+            message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.shippingType) {
+          this.$message({
+            message: '请输入运输方式!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.shippingType.length < 1 ||
+          this.deptBudgetList.shippingType.length > 20
+        ) {
+          this.$message({
+            message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.buyer) {
+          this.$message({
+            message: '请输入买方名称!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.buyer.length > 30) {
+          this.$message({
+            message: '买方名称长度不符合要求,请输入30个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.seller) {
+          this.$message({
+            message: '请输入卖方名称!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.seller.length > 30) {
+          this.$message({
+            message: '卖方名称长度不符合要求,请输入30个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.buyerPhone) {
+          this.$message({
+            message: '请输入买方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.buyerPhone)) {
+          this.$message({
+            message: '输入买方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.buyerPhone.length < 7 ||
+          this.deptBudgetList.buyerPhone.length > 20
+        ) {
+          this.$message({
+            message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.sellerPhone) {
+          this.$message({
+            message: '请输入卖方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.sellerPhone)) {
+          this.$message({
+            message: '输入卖方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.buyerPhone.length < 7 ||
+          this.deptBudgetList.buyerPhone.length > 20
+        ) {
+          this.$message({
+            message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.settlementMethod) {
+          this.$message({
+            message: '请输入结算方式!',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (!this.deptBudgetList.sourceGoods) {
+          this.$message({
+            message: '请输入货源详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.placeDelivery) {
+          this.$message({
+            message: '请输入交货详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.selectedOptions.length == 0) {
+          this.$message({
+            message: '请选择货源所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.selectedOptions1.length == 0) {
+          this.$message({
+            message: '请选择交货所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.weight) {
+          this.$message({
+            message: '请输入重量!',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (
+          isNaN(this.deptBudgetList.weight) ||
+          (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+          this.deptBudgetList.weight < 0 ||
+          this.deptBudgetList.weight > 200000
+        ) {
+          this.$message({
+            message: '输入重量有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.overShort &&
+          isNaN(this.deptBudgetList.overShort)
+        ) {
+          this.$message({
+            message: '溢短装输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.unitContractPrice &&
+          isNaN(this.deptBudgetList.unitContractPrice)
+        ) {
+          this.$message({
+            message: '合同单价输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.totalContractPrice &&
+          isNaN(this.deptBudgetList.totalContractPrice)
+        ) {
+          this.$message({
+            message: '合同总价输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateStart) {
+          this.$message({
+            message: '请选择交货日期(起)',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateEnd) {
+          this.$message({
+            message: '请选择交货日期(止)',
+            type: 'warning',
+          })
+          return
+        }
+        //时间
+        if (
+          new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+          new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+        ) {
+          this.$message({
+            message: '交货日期(止)选择错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.signingDate) {
+          this.$message({
+            message: '请选择签订日期',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+          this.$message({
+            message: '请选择货名',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+          this.$message({
+            message: '请选择水分',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.grade) {
+          this.$message({
+            message: '请选择品级',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.impurity ||
+          (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+          (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+          (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
+            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+          (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
+            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+          (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
+            (String(
+                this.deptBudgetList.contractGoodsInfo.imperfectGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '不完整粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000 ||
+          this.deptBudgetList.contractProcessInfo.goodsNameKey < 0 ||
+          (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.goodsNameKey
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '合同收入金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractProcessInfo.waterContent > 10000000 ||
+          this.deptBudgetList.contractProcessInfo.waterContent < 0 ||
+          (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.waterContent).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.waterContent
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '费用金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractProcessInfo.goodsName > 1000000000 ||
+          this.deptBudgetList.contractProcessInfo.goodsName < 0 ||
+          (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsName).length -
+            (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '已开发票金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractProcessInfo.impurity > 1000000000 ||
+          this.deptBudgetList.contractProcessInfo.impurity < 0 ||
+          (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.impurity).length -
+            (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '未开发票金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000 ||
+          this.deptBudgetList.contractProcessInfo.imperfectGrain < 0 ||
+          (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
+            .length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.imperfectGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '已完成发运量输入错误',
+            type: 'warning',
+          })
+          return
+        }
+
+        var that = this
+        this.$refs.deptBudgetList.validate((valid) => {
+          if (valid) {
+            this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
+            this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
+            this.deptBudgetList.deliveryProvince = CodeToText[this.selectedOptions1[0]]
+            this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions1[1]]
+            this.deptBudgetList.compId = this.compId
+            this.deptBudgetList.contractType = 2
+            if (this.deptBudgetList.deliveryProvince == "澳门特别行政区" || this.deptBudgetList.deliveryProvince ==
+              "澳门特别行政区") {
+              this.deptBudgetList.deliveryArea = "特别行政区"
+            } else {
+              this.deptBudgetList.deliveryArea = CodeToText[this.selectedOptions1[2]]
+            }
+            if (this.deptBudgetList.sourceProvince == "澳门特别行政区" || this.deptBudgetList.sourceProvince ==
+              "澳门特别行政区") {
+              this.deptBudgetList.sourceArea = "特别行政区"
+            } else {
+              this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
+            }
+
+            addList(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('添加成功')
+                this.deptBudgetList = {
+                  deliverType: '1',
+                  finalTradingVolume: 0,
+                  contractGoodsInfo: {
+                    goodsName: '',
+                  },
+                  contractProcessInfo: {},
+                }
+                this.$router.push({
+                  path: 'buyContract'
+                })
+              })
+              .catch((req) => {
+                EventBus.$emit('error', req.message)
+              })
+          } else {
+            // for (let key in that.rules) {
+            //   EventBus.$emit('error', that.rules[key][0].message)
+            //   return false
+            // }
+            return false
+          }
+        })
+      },
+      resetForm(deptBudgetList) {
+        this.$refs[deptBudgetList].resetFields()
+      },
+      addClick() {
+        // let [flag, constValue, constKey] = ['check', '', '']
+        // let obj = { flag, constValue, constKey }
+        // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
+        // let result = this.unitList.filter((item, val, arr) => {
+        //   return item.id != '1'
+        // })
+        // result.push(obj)
+        // result.push(objAdd)
+        // this.unitList = result
+        this.unitList.push({
+          flag: 'add',
+          constValue: '',
+          constKey: '',
+        })
+      },
+      saveClick(item, index) {
+        console.log(item)
+
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          this.$set(this.unitList, index, {
+            flag: 'check'
+          })
+        } else {
+          this.$set(this.unitList, index, {
+            flag: 'delete'
+          })
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        if (item.flag == 'add') {
+          item.constKey = Math.random() * 20
+          this.acceptanceCheck.compId = this.compId
+          this.acceptanceCheck.constKey = item.constKey
+          this.acceptanceCheck.constCode = 'TYPEYAN'
+          this.acceptanceCheck.constValue = item.constValue
+          this.acceptanceCheck.id = item.id
+          addxiala(this.acceptanceCheck)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        } else if (item.flag == 'check') {
+          this.acceptanceCheck.compId = this.compId
+          this.acceptanceCheck.constKey = item.constKey
+          this.acceptanceCheck.constCode = 'TYPEYAN'
+          this.acceptanceCheck.constValue = item.constValue
+          this.acceptanceCheck.id = item.id
+          editxiala(this.acceptanceCheck)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        }
+      },
+      // selectContract(val) {
+      //   let key = this.unitList.find((item) => item.constValue === val).constKey
+      //   this.pleaseChoose = val
+      // },
+
+      handleExamine() {},
+      approve() {},
+      // returnsales() {
+      //   this.$router.push({ path: 'purchaseContract' })
+      // },
+      selectChapterTwo(e) {
+        for (var i = 0; i < this.ChapterTwoList.length; i++) {
+          if (this.ChapterTwoList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+          }
+        }
+      },
+      selectunitList(e) {
+        for (var i = 0; i < this.unitList.length; i++) {
+          if (this.unitList[i].constValue == e) {
+            this.deptBudgetList.acceptanceMethodKey = this.unitList[i].constKey
+          }
+        }
+      },
+      selectgrade(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+          }
+        }
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          }
+        }
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      // 编辑
+      editClick(item, index) {
+        const map = JSON.parse(JSON.stringify(item))
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          map.flag = 'check'
+          this.$set(this.unitList, index, map)
+        } else {
+          map.flag = 'delete'
+          this.$set(this.unitList, index, map)
+        }
+      },
+      // 删除
+      deleteClick(item, index) {
+        if (Object.is(item.constKey, 1)) {
+          return
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        delxiala({
+            id: this.unitList[index].id
+          })
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+            this.pleaseChoose = ''
+          })
+      },
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  .el-form {
+    padding: 0 15%;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  .button-container {
+    display: flex;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+    align-items: center;
+    background-color: #fff;
+    width: 100%;
+    height: 50px;
+    padding: 0 10px;
+
+    &>div {
+      margin-left: 10px;
+      display: flex;
+      flex-wrap: nowrap;
+      flex-direction: row;
+
+      &>span {
+        line-height: 50px;
+      }
+    }
+
+    /deep/.auditFlow-box {
+      position: unset;
+      margin-left: 10px;
+
+      &/deep/.auditFlow-icon {
+        width: auto;
+        padding-right: 30px;
+      }
+
+      &/deep/.auditFlow-main {
+        position: absolute;
+      }
+    }
+  }
+
+  .box-app {
+    display: inline-block;
+    float: left;
+    margin-left: 30px;
+    line-height: 50px;
+  }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 10px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    width: 70%;
+    margin: 0 auto;
+  }
+
+  .el-form-item {
+    width: 50%;
+  }
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  .ce {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  .hide-sel {
+    .el-input__inner {
+      border: 0px;
+    }
+
+    .el-icon-arrow-up {
+      display: none;
+    }
+
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+    }
+
+    .el-date-editor {
+      i {
+        display: none;
+      }
+    }
+
+    .is-disabled {
+      .el-input__inner:hover {
+        background-color: #fff !important;
+        border: 0;
+      }
+
+      color: #606266;
+
+      .el-input__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+
+      .el-textarea__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+    }
+  }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  .el-textarea {
+    width: 101%;
+  }
+</style>

+ 1385 - 0
src/views/platformaudit/purchaseContractEdit.vue

@@ -0,0 +1,1385 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">修改合同信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />
+          返回</el-button>
+      </el-col>
+    </el-row>
+    <ws-form ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
+      <div class="remark">
+        <h3>基本信息</h3>
+        <p style="color: #8890b1">
+          &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
+          标记的条目提交后不可修改。
+        </p>
+      </div>
+      <ws-info-table>
+        <!-- 合同编号 -->
+        <ws-form-item class="readonly" label="合同编号" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+
+        <!-- 运输方式 -->
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          <ws-input v-model="deptBudgetList.shippingType" maxlength="100" placeholder="请输入运输方式" size="small" />
+        </ws-form-item>
+
+        <!-- 买方 -->
+        <ws-form-item class="readonly" label="买方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <!-- 交货方式 -->
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+          <ws-input v-model="deptBudgetList.settlementMethod" maxlength="100" placeholder="请输入结算方式" size="small" />
+        </ws-form-item>
+        <!-- 卖方 -->
+        <ws-form-item class="readonly" label="卖方" span="1" prop="seller">{{ deptBudgetList.seller }}
+        </ws-form-item>
+
+        <ws-form-item class="readonly" label="交货方式" span="1" prop="sourceGoods">
+          {{ deptBudgetList.deliverType1 }}
+        </ws-form-item>
+        <!-- 买方电话 -->
+        <ws-form-item label="买方电话" span="1" prop="buyerPhone">
+          <ws-input v-model="deptBudgetList.buyerPhone" maxlength="100" size="small" />
+        </ws-form-item>
+        <!-- 包装方式 -->
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          <ws-select v-model="deptBudgetList.packingMethod" placeholder="" class="typeselect"
+            @change="selectpackingMethod">
+            <ws-option v-for="item in packtypeList" :key="item.constKey" :label="item.constValue"
+              :value="item.constValue" />
+          </ws-select>
+        </ws-form-item>
+        <!-- 卖方电话 -->
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          <ws-input v-model="deptBudgetList.sellerPhone" maxlength="100" size="small" placeholder="请输入卖方电话" />
+        </ws-form-item>
+        <!-- 验收方式 -->
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          <el-select v-model="deptBudgetList.acceptanceMethod" placeholder="请选择验收方式" style="width: 100%" filterable
+            @change="selectunitList">
+            <el-option v-for="(item, index) in unitList" :key="item.constValue" :label="item.constValue"
+              :value="item.constValue">
+              <span class="unit-left" style="float: left">
+                <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
+                <!-- 新增文本框 -->
+                <div v-if="item.flag !== 'delete'" @click.stop>
+                  <ws-input v-model="item.constValue" clearable maxlength="10" style="width: 200px"></ws-input>
+                </div>
+              </span>
+              <span style="float: right; color: #8492a6; font-size: 13px">
+                <!-- 对号 -->
+                <i class="el-icon-check" style="line-height: 29px; margin-left: 10px" v-if="item.flag !== 'delete'"
+                  @click.stop="saveClick(item, index)"></i>
+                <!-- 编辑 -->
+                <i class="el-icon-edit" style="line-height: 29px; margin-left: 10px" v-if="item.flag == 'delete'"
+                  @click.stop="editClick(item, index)"></i>
+                <!-- 删除 -->
+                <i class="el-icon-delete" style="line-height: 29px" @click.stop="deleteClick(item, index)"></i>
+              </span>
+            </el-option>
+            <!-- 新增按钮 -->
+            <el-option value="" label="">
+              <div style="
+                  text-align: right;
+                  border-top: 1px solid #dcdfe6;
+                  padding: 5px;
+                ">
+                <ws-button type="primary" @click.stop="addClick">{{
+                  $t('button.add')
+                }}</ws-button>
+              </div>
+            </el-option>
+          </el-select>
+        </ws-form-item>
+        <!-- 重量(吨) -->
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          <ws-input v-model="deptBudgetList.weight" maxlength="100" size="small" placeholder="请输入重量(吨)" />
+        </ws-form-item>
+        <!-- 交货日期(起) -->
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          <ws-date-picker v-model="deptBudgetList.deliveryDateStart" type="date" placeholder="请选择交货日期(起)"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+        <!-- 溢短装(%) -->
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          <ws-input v-model="deptBudgetList.overShort" maxlength="100" size="small" placeholder="请输入溢短装比例(%)" />
+        </ws-form-item>
+        <!-- 交货日期(止) -->
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          <ws-date-picker v-model="deptBudgetList.deliveryDateEnd" type="date" placeholder="请选择交货日期(止)"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+        <!-- 合同单价(元/吨) -->
+        <ws-form-item class="readonly" label="合同单价(元/吨)" span="1" prop="unitContractPrice">
+          <span v-if="deptBudgetList.unitContractPrice != 'null'">{{
+            deptBudgetList.unitContractPrice
+          }}</span>
+        </ws-form-item>
+        <!-- 合同总价(元) -->
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice">
+          <ws-input v-model="deptBudgetList.totalContractPrice" maxlength="100" placeholder="请输入合同单价" size="small" />
+        </ws-form-item>
+        <!-- 货源所在地区 -->
+        <ws-form-item label="货源所在地区" span="1" prop="packingMethod">
+          <el-cascader :options="options_" v-model="selectedOptions" clearable size="large" placeholder="请选择货源所在地区"
+            style="width: 200%" @change="handleChange" />
+        </ws-form-item>
+        <!-- 货源详细地址 -->
+        <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+          <ws-input v-model="deptBudgetList.sourceGoods" maxlength="100" placeholder="请输入货源详细地址" size="small" />
+        </ws-form-item>
+        <!-- 交货地所在地区 -->
+        <ws-form-item label="交货地所在地区" span="1" prop="packingMethod">
+          <el-cascader :options="options_" v-model="selectedOptions1" clearable size="large" placeholder="请选择交货地所在地区"
+            style="width: 200%" @change="handleChange1" />
+        </ws-form-item>
+        <!-- 交货地详细地址 -->
+        <ws-form-item label="交货地详细地址" span="1" prop="placeDelivery">
+          <ws-input v-model="deptBudgetList.placeDelivery" maxlength="100" placeholder="请输入交货地详细地址" size="small" />
+        </ws-form-item>
+
+        <!-- 签订日期 -->
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          <ws-date-picker v-model="deptBudgetList.signingDate" type="date" placeholder="请选择合同签订日期"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+
+        <!-- 最终实际交易量(吨) -->
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="totalContractPrice">
+          <ws-input v-model="deptBudgetList.finalTradingVolume" maxlength="100" placeholder="请输入最终实际交易量" size="small" />
+        </ws-form-item>
+
+        <!-- 临时仓库负责人 -->
+        <ws-form-item label="临时仓库负责人" span="1" prop="packingMethod" v-show="deptBudgetList.deliverType == 1">
+          <el-select v-model="deptBudgetList.personCharge" placeholder="请选择临时仓库负责人" filterable
+            :filter-method="dataFilter" @change="selectstaff">
+            <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
+          </el-select>
+        </ws-form-item>
+      </ws-info-table>
+      <base-card>
+        <!--面试信息-->
+        <div class="remark">
+          <h3>货物信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item class="readonly" label="货名" span="1" prop="waterContent">
+            {{ deptBudgetList.contractGoodsInfo.goodsName }}
+          </ws-form-item>
+          <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.waterContent" placeholder="请输入水分占比" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="品级" span="1" prop="grade">
+            <ws-select v-model="deptBudgetList.contractGoodsInfo.grade" placeholder="" class="typeselect"
+              @change="selectgrade">
+              <ws-option v-for="item in gradeList" :key="item.constValue" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.impurity" placeholder="请输入杂质占比(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="容重(克/升)<=" span="1" prop="bulkDensity">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.bulkDensity" placeholder="请输入容重" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain" class="result">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.mildewGrain" placeholder="请输入霉变粒占比(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.jiaorenli" placeholder="请输入输入热损伤占比(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain" class="result">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完整粒占比(%)"
+              maxlength="100" size="small" />
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>流程信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.mildewGrain" placeholder="请输入已付款(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.goodsName" placeholder="请输入已开发票(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.waterContent" placeholder="请输入费用支出(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.impurity" placeholder="请输入未开发票(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <ws-form-item label="已完成发运量(吨)" span="1" prop="imperfectGrain" class="result">
+            <ws-input v-model="deptBudgetList.contractProcessInfo.imperfectGrain" maxlength="100" size="small" />
+          </ws-form-item>
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+            <ws-select v-model="deptBudgetList.contractProcessInfo.grade" placeholder="" class="typeselect"
+              @change="selectChapterTwo">
+              <ws-option v-for="item in ChapterTwoList" :key="item.constValue" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>备注信息</h3>
+        </div>
+        <ws-input v-model="deptBudgetList.remarks" type="textarea" row="3" placeholder="请输入备注信息,不超过200字"
+          maxlength="200" />
+        <ws-upload ref="upload" table-name="maintain_work_order" oss-key="mainPlan" :comp-id="compId"
+          :appendix-ids="appendixIdsAdd" :vesselId="deptBudgetList.addressUrl" :size-limit="size"
+          @uploadSuccess="uploadSuccess" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+      </base-card>
+    </ws-form>
+    <div style="text-align: right; padding: 10px">
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+  import {
+    packList,
+    addList,
+    xiala,
+    addxiala,
+    editxiala,
+    delxiala,
+    examineList,
+    editInfo,
+    getstaff,
+  } from '@/model/contarct/index'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    EventBus,
+    dayjs
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    components: {
+      WsUpload,
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        size: 10,
+        // 提交类型
+        submitType: true,
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        ruleDeptBudget: [],
+        deptBudgetList: {
+          contractProcessInfo: {},
+          contractGoodsInfo: {},
+        },
+        options_: regionData,
+        selectedOptions: [],
+        selectedOptions1: [],
+        mainReportAdd: {},
+        list: {},
+        unitList: [],
+        options: [],
+        staffList: [],
+        packtypeList: [],
+        goodnameList: [],
+        gradeList: [],
+        ChapterTwoList: [],
+        appendixIdsAdd: '',
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        acceptanceCheck: {},
+        compId: sessionStorage.getItem('ws-pf_compId'),
+      }
+    },
+
+    activated() {
+      getstaff({
+          compId: sessionStorage.getItem('ws-pf_compId')
+        })
+        .toPromise()
+        .then((response) => {
+          this.options = response
+          this.staffList = response
+        })
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    methods: {
+      dataFilter(val) {
+        this.deptBudgetList.personCharge = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+      },
+      loaddata() {
+        // 数据
+        examineList({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            if (response.weight) {
+              response.weight = String(response.weight)
+            }
+            if (response.overShort) {
+              response.overShort = String(response.overShort)
+            }
+            if (response.totalContractPrice) {
+              response.totalContractPrice = String(response.totalContractPrice)
+            }
+            if (response.unitContractPrice) {
+              response.unitContractPrice = String(response.unitContractPrice)
+            }
+            var tmp = []
+            tmp[0] = TextToCode[response.sourceProvince].code
+
+            tmp[1] = TextToCode[response.sourceProvince][response.sourceCity].code
+
+            if (tmp[0] == 810000 || tmp[0] == 820000) {
+              tmp[2] = null
+            } else {
+              tmp[2] =
+                TextToCode[response.sourceProvince][response.sourceCity][
+                  response.sourceArea
+                ].code
+            }
+            this.selectedOptions = tmp
+            var tmp1 = []
+            tmp1[0] = TextToCode[response.deliveryProvince].code
+            tmp1[1] =
+              TextToCode[response.deliveryProvince][response.deliveryCity].code
+
+            if (tmp1[0] == 810000 || tmp1[0] == 820000) {
+              tmp1[2] = null
+            } else {
+              tmp1[2] =
+                TextToCode[response.deliveryProvince][response.deliveryCity][
+                  response.deliveryArea
+                ].code
+            }
+            this.selectedOptions1 = tmp1
+            this.deptBudgetList = response
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方自提'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方送货'
+            }
+          })
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+      },
+      addClick() {
+        // let [flag, constValue, constKey] = ['check', '', '']
+        // let obj = { flag, constValue, constKey }
+        // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
+        // let result = this.unitList.filter((item, val, arr) => {
+        //   return item.id != '1'
+        // })
+        // result.push(obj)
+        // result.push(objAdd)
+        // this.unitList = result
+        this.unitList.push({
+          flag: 'add',
+          constValue: '',
+          constKey: '',
+        })
+      },
+      // 上传附件
+      uploadSuccess(data, files, url) {
+        console.log(data, files, url)
+
+        // this.deptBudgetList.
+        // this.formData.append('files', files)
+        // this.feedbackObj.uploadNameAttachment = data.appendixName
+        // this.feedbackObj.pathUploadAttachment = data.appendixPath
+        // // this.newAppendixs = files
+        // this.onChangeFlag = true
+      },
+      getUnitList() {
+        xiala({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      handleExamine() {},
+      approve() {},
+      returnsales() {
+        this.$router.push({
+          path: 'buyContract'
+        })
+      },
+      selectChapterTwo(e) {
+        for (var i = 0; i < this.ChapterTwoList.length; i++) {
+          if (this.ChapterTwoList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+          }
+        }
+      },
+      selectunitList(e) {
+        for (var i = 0; i < this.unitList.length; i++) {
+          if (this.unitList[i].constValue == e) {
+            this.deptBudgetList.packingMethodKey = this.unitList[i].constKey
+          }
+        }
+      },
+      selectgrade(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+          }
+        }
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.deptBudgetList.acceptanceMethodKey =
+              this.packtypeList[i].constKey
+          }
+        }
+      },
+      saveClick(item, index) {
+        console.log(item)
+
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          this.$set(this.unitList, index, {
+            flag: 'check'
+          })
+        } else {
+          this.$set(this.unitList, index, {
+            flag: 'delete'
+          })
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        if (item.flag == 'add') {
+          item.constKey = Math.random() * 20
+          this.acceptanceCheck.compId = this.compId
+          this.acceptanceCheck.constKey = item.constKey
+          this.acceptanceCheck.constCode = 'TYPEYAN'
+          this.acceptanceCheck.constValue = item.constValue
+          this.acceptanceCheck.id = item.id
+          addxiala(this.acceptanceCheck)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        } else if (item.flag == 'check') {
+          this.acceptanceCheck.compId = this.compId
+          this.acceptanceCheck.constKey = item.constKey
+          this.acceptanceCheck.constCode = 'TYPEYAN'
+          this.acceptanceCheck.constValue = item.constValue
+          this.acceptanceCheck.id = item.id
+          editxiala(this.acceptanceCheck)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        }
+      },
+      // 编辑
+      editClick(item, index) {
+        const map = JSON.parse(JSON.stringify(item))
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          map.flag = 'check'
+          this.$set(this.unitList, index, map)
+        } else {
+          map.flag = 'delete'
+          this.$set(this.unitList, index, map)
+        }
+      },
+      // 删除
+      deleteClick(item, index) {
+        if (Object.is(item.constKey, 1)) {
+          return
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        delxiala({
+            id: this.unitList[index].id
+          })
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+            this.pleaseChoose = ''
+          })
+      },
+      submit() {
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '请输入合同编号',
+            type: 'warning',
+          })
+          return
+        }
+        console.log(this.deptBudgetList.contractNo.length)
+        if (
+          this.deptBudgetList.contractNo.length < 6 ||
+          this.deptBudgetList.contractNo.length > 20
+        ) {
+          this.$message({
+            message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.shippingType) {
+          this.$message({
+            message: '请输入运输方式!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.shippingType.length < 1 ||
+          this.deptBudgetList.shippingType.length > 20
+        ) {
+          this.$message({
+            message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.buyer) {
+          this.$message({
+            message: '请输入买方名称!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.buyer.length > 30) {
+          this.$message({
+            message: '买方名称长度不符合要求,请输入30个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.seller) {
+          this.$message({
+            message: '请输入卖方名称!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.seller.length > 30) {
+          this.$message({
+            message: '卖方名称长度不符合要求,请输入30个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.buyerPhone) {
+          this.$message({
+            message: '请输入买方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.buyerPhone)) {
+          this.$message({
+            message: '输入买方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.buyerPhone.length < 7 ||
+          this.deptBudgetList.buyerPhone.length > 20
+        ) {
+          this.$message({
+            message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.sellerPhone) {
+          this.$message({
+            message: '请输入卖方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.sellerPhone)) {
+          this.$message({
+            message: '输入卖方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.buyerPhone.length < 7 ||
+          this.deptBudgetList.buyerPhone.length > 20
+        ) {
+          this.$message({
+            message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.settlementMethod) {
+          this.$message({
+            message: '请输入结算方式!',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (!this.deptBudgetList.sourceGoods) {
+          this.$message({
+            message: '请输入货源详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.placeDelivery) {
+          this.$message({
+            message: '请输入交货详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.selectedOptions.length == 0) {
+          this.$message({
+            message: '请选择货源所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.selectedOptions1.length == 0) {
+          this.$message({
+            message: '请选择交货所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.weight) {
+          this.$message({
+            message: '请输入重量!',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (
+          isNaN(this.deptBudgetList.weight) ||
+          (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+          this.deptBudgetList.weight < 0 ||
+          this.deptBudgetList.weight > 200000
+        ) {
+          this.$message({
+            message: '输入重量有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.overShort &&
+          isNaN(this.deptBudgetList.overShort)
+        ) {
+          this.$message({
+            message: '溢短装输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.unitContractPrice &&
+          isNaN(this.deptBudgetList.unitContractPrice)
+        ) {
+          this.$message({
+            message: '合同单价输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.totalContractPrice &&
+          isNaN(this.deptBudgetList.totalContractPrice)
+        ) {
+          this.$message({
+            message: '合同总价输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateStart) {
+          this.$message({
+            message: '请选择交货日期(起)',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateEnd) {
+          this.$message({
+            message: '请选择交货日期(止)',
+            type: 'warning',
+          })
+          return
+        }
+        //时间
+        if (
+          new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+          new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+        ) {
+          this.$message({
+            message: '交货日期(止)选择错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.signingDate) {
+          this.$message({
+            message: '请选择签订日期',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+          this.$message({
+            message: '请选择货名',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+          this.$message({
+            message: '请选择水分',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.grade) {
+          this.$message({
+            message: '请选择品级',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.impurity ||
+          (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+          (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+          (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
+            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+          (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
+            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+          (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
+            (String(
+                this.deptBudgetList.contractGoodsInfo.imperfectGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '不完整粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.goodsNameKey
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '合同收入金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+          (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.waterContent).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.waterContent
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '费用金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsName).length -
+            (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '已开发票金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.impurity).length -
+            (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '未开发票金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
+            .length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.imperfectGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '已完成发运量输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        this.$refs.deptBudgetList.validate((valid) => {
+          if (valid) {
+            this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
+            this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
+
+            this.deptBudgetList.deliveryProvince = CodeToText[this.selectedOptions1[0]]
+            this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions1[1]]
+
+            this.deptBudgetList.compId = this.compId
+            this.deptBudgetList.contractType = 2
+            if (this.deptBudgetList.deliveryProvince == "澳门特别行政区" || this.deptBudgetList.deliveryProvince ==
+              "澳门特别行政区") {
+              this.deptBudgetList.deliveryArea = "特别行政区"
+            } else {
+              this.deptBudgetList.deliveryArea = CodeToText[this.selectedOptions1[2]]
+            }
+            if (this.deptBudgetList.sourceProvince == "澳门特别行政区" || this.deptBudgetList.sourceProvince ==
+              "澳门特别行政区") {
+              this.deptBudgetList.sourceArea = "特别行政区"
+            } else {
+              this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
+            }
+            editInfo(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('编辑成功')
+                this.$router.push({
+                  path: 'buyContract'
+                })
+              })
+          } else {
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .el-form {
+    padding: 0 15%;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  .button-container {
+    display: flex;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+    align-items: center;
+    background-color: #fff;
+    width: 100%;
+    height: 50px;
+    padding: 0 10px;
+
+    &>div {
+      margin-left: 10px;
+      display: flex;
+      flex-wrap: nowrap;
+      flex-direction: row;
+
+      &>span {
+        line-height: 50px;
+      }
+    }
+
+    /deep/.auditFlow-box {
+      position: unset;
+      margin-left: 10px;
+
+      &/deep/.auditFlow-icon {
+        width: auto;
+        padding-right: 30px;
+      }
+
+      &/deep/.auditFlow-main {
+        position: absolute;
+      }
+    }
+  }
+
+  .box-app {
+    display: inline-block;
+    float: left;
+    margin-left: 30px;
+    line-height: 50px;
+  }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .wenzi {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 10px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .el-form-item {
+    width: 50%;
+  }
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  .ce {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  .hide-sel {
+    .el-input__inner {
+      border: 0px;
+    }
+
+    .el-icon-arrow-up {
+      display: none;
+    }
+
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+    }
+
+    .el-date-editor {
+      i {
+        display: none;
+      }
+    }
+
+    .is-disabled {
+      .el-input__inner:hover {
+        background-color: #fff !important;
+        border: 0;
+      }
+
+      color: #606266;
+
+      .el-input__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+
+      .el-textarea__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+    }
+  }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  .el-textarea {
+    width: 101%;
+  }
+
+  /deep/.iconclose:before {
+    display: none;
+  }
+
+  /deep/.winsea-card .card__header {
+    font-size: 14px;
+    color: #409eff;
+    padding: 0 0 20px 10px;
+    position: relative;
+    display: none;
+  }
+</style>

+ 558 - 0
src/views/platformaudit/purchaseContractExamine.vue

@@ -0,0 +1,558 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">查看合同详情</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <ws-form ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList"
+      ><div style="margin-top: 20px; font-size: 24px">
+        采购合同<span style="font-size: 16px"
+          >【编号:{{ deptBudgetList.contractNo }}】</span
+        ><span v-if="status == '待执行'" class="status-orange">{{
+          status
+        }}</span>
+        <span v-if="status == '执行中'" class="status-bule">{{ status }}</span>
+        <span v-if="status == '已完成'" class="status-green">{{ status }}</span>
+      </div>
+      <div class="remark">
+        <h3>基本信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          {{ deptBudgetList.shippingType }}
+        </ws-form-item>
+        <ws-form-item label="买方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod"
+          >{{ deptBudgetList.settlementMethod }}
+        </ws-form-item>
+        <ws-form-item label="卖方" span="1" prop="seller"
+          >{{ deptBudgetList.seller }}
+        </ws-form-item>
+        <ws-form-item label="交货方式" span="1" prop="deliverType1"
+          >{{ deptBudgetList.deliverType1 }}
+        </ws-form-item>
+        <ws-form-item label="买方电话" span="1" prop="buyerPhone"
+          >{{ deptBudgetList.buyerPhone }}
+        </ws-form-item>
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          {{ deptBudgetList.packingMethod }}
+        </ws-form-item>
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          {{ deptBudgetList.sellerPhone }}
+        </ws-form-item>
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          {{ deptBudgetList.acceptanceMethod }}
+        </ws-form-item>
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          {{ deptBudgetList.weight }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          {{ deptBudgetList.deliveryDateStart }}
+        </ws-form-item>
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          {{ deptBudgetList.overShort }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          {{ deptBudgetList.deliveryDateEnd }}
+        </ws-form-item>
+        <ws-form-item
+          label="合同单价(元/吨)"
+          span="1"
+          prop="unitContractPrice"
+        >
+          {{ deptBudgetList.unitContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice">
+          {{ deptBudgetList.totalContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="货源所在地区" span="1">
+          {{ deptBudgetList.sourceProvince }}
+          {{ deptBudgetList.sourceCity }}
+          {{ deptBudgetList.sourceArea }}
+        </ws-form-item>
+        <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+          {{ deptBudgetList.sourceGoods }}
+        </ws-form-item>
+        <ws-form-item label="交货地所在地区" span="1">
+          {{ deptBudgetList.deliveryProvince }}
+          {{ deptBudgetList.deliveryCity }}
+          {{ deptBudgetList.deliveryArea }}
+        </ws-form-item>
+        <ws-form-item label="交货地详细地址" span="1" prop=" placeDelivery">
+          {{ deptBudgetList.placeDelivery }}
+        </ws-form-item>
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          {{ deptBudgetList.signingDate }}
+        </ws-form-item>
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="finalTradingVolume">
+          {{ deptBudgetList.finalTradingVolume }}
+        </ws-form-item>
+        <ws-form-item label="临时仓库负责人" span="1" prop="personCharge">
+          {{ deptBudgetList.personCharge }}
+        </ws-form-item>
+      </ws-info-table>
+      <!--面试信息-->
+      <div class="remark">
+        <h3>货物信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="货名" span="1" prop="waterContent">
+          {{ deptBudgetList.contractGoodsInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+          {{ deptBudgetList.contractGoodsInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="品级" span="1" prop="grade">
+          {{ deptBudgetList.contractGoodsInfo.grade }}
+        </ws-form-item>
+        <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+          {{ deptBudgetList.contractGoodsInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item label="容重(克/升)<=" span="1" prop="bulkDensity">
+          {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
+        </ws-form-item>
+        <ws-form-item
+          label="霉变粒(%)<="
+          span="1"
+          prop="mildewGrain"
+          class="result"
+        >
+          {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
+        </ws-form-item>
+        <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+          {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
+        </ws-form-item>
+        <ws-form-item
+          label="不完善粒(%)<="
+          span="1"
+          prop="imperfectGrain"
+          class="result"
+        >
+          {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>流程信息</h3>
+      </div>
+      <ws-info-table>
+         <!--已付款(元)-->
+        <ws-form-item label="已付款(元)" span="1" prop="goodsNameKey">
+          {{deptBudgetList.contractProcessInfo.goodsNameKey}}
+        </ws-form-item>
+        <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+          {{ deptBudgetList.contractProcessInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent"
+          >{{ deptBudgetList.contractProcessInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="未开发票(元)" span="1" prop="impurity"
+          >{{ deptBudgetList.contractProcessInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item
+          label="已完成发运量(吨)"
+          span="1"
+          prop="imperfectGrain"
+          class="result"
+          >{{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+        </ws-form-item>
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade"
+          >{{ deptBudgetList.contractProcessInfo.grade }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>备注信息</h3>
+      </div>
+      {{ deptBudgetList.remarks }}
+      <img :src="deptBudgetList.addressUrl" alt="" />
+    </ws-form>
+    <div style="text-align: right; padding: 10px">
+      <el-button
+        class="bg-bottom"
+        type="primary"
+        size="small"
+        @click="returnsales()"
+        >关闭</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+import {
+  packList,
+  xiala,
+  examineList,
+} from '@/model/contarct/index'
+export default {
+  name: 'viewSpareMoney',
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      status: '',
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+      ruleDeptBudget: [],
+      deptBudgetList: {
+        contractProcessInfo: {},
+        contractGoodsInfo: {},
+      },
+      mainReportAdd: {},
+      list: {},
+    }
+  },
+
+  activated() {
+    this.status = this.$route.query.status
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  methods: {
+    loaddata() {
+      // 数据
+      examineList({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+          if (this.deptBudgetList.deliverType == 1) {
+            this.deptBudgetList.deliverType1 = '我方自提'
+          } else if (this.deptBudgetList.deliverType == 2) {
+            this.deptBudgetList.deliverType1 = '对方送货'
+          }
+        })
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 双章
+      packList({ constId: 'CON4' })
+        .toPromise()
+        .then((response) => {
+          this.ChapterTwoList = response
+        })
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    handleExamine() {},
+    approve() {},
+    returnsales() {
+      this.$router.push({ path: 'buyContract' })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.status-orange,
+.status-bule,
+.status-green {
+  border: 1px solid;
+  border-radius: 30px;
+  padding: 3px 10px;
+  font-size: 16px;
+}
+.status-orange {
+  border-color: #ff9f24;
+  color: #ff9f24;
+  background: #ffedd5;
+}
+.status-bule {
+  border-color: #5473e8;
+  color: #5473e8;
+  background: #f0f3fe;
+}
+.status-green {
+  border-color: #50cad4;
+  color: #50cad4;
+  background: #ecfeff;
+}
+.el-form {
+  padding: 0 15%;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 15px 0px;
+}
+.wenzi {
+  width: 900px;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 10px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 900px;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+.ce {
+  width: 900px;
+  margin: 0 auto;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+  width: 130px;
+}
+</style>

+ 978 - 0
src/views/platformaudit/salesContract.vue

@@ -0,0 +1,978 @@
+
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="8">
+      <template slot="left">
+        <ws-button
+          type="primary"
+          @click="handleAdd()"
+          v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.add`
+          "
+          ><img
+            width="13"
+            height="13"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 2px;
+              left: -4px;
+            "
+            src="../../../public/img/header-add.png"
+            alt=""
+          />添加</ws-button
+        >
+        <ws-button
+          @click="exportlist()"
+          v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.view`
+          "
+          >导出</ws-button
+        >
+      </template>
+      <template slot="right">
+        <span style="width: 142px; display: inline-block;color: #8890B1;">状态:</span>
+        <ws-select
+          v-model="searchTypeText"
+          placeholder=""
+          class="typeselect"
+          @change="selecttaskType"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890B1;"
+          />
+        </ws-select>
+
+        <el-date-picker
+          v-model="value2"
+          type="daterange"
+          align="right"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions"
+        >
+        </el-date-picker>
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按照合同编号、买方名称、卖方名称进行查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button
+          class="find"
+          type="primary"
+          @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table
+      class="wenzi"
+      :data="contractList.records"
+      style="width: 100%; margin-top: 10px"
+      height="780"
+    >
+      <el-table-column type="index" label="序号">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="contractNo" label="合同编号" width="80">
+      </el-table-column>
+      <el-table-column prop="goodsName" label="货名" width="80">
+      </el-table-column>
+      <el-table-column prop="grade" label="品级">
+        <template slot-scope="scope">
+          <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '等外'" class="substandard">{{
+            scope.row.grade
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
+      <el-table-column prop="unitContractPrice" label="合同单价(元)">
+      </el-table-column>
+      <el-table-column prop="packingMethod" label="包装方式"> </el-table-column>
+      <el-table-column prop="buyer" label="买方"> </el-table-column>
+      <el-table-column prop="seller" label="卖方"> </el-table-column>
+      <el-table-column prop="imperfectGrain" label="已完成(吨)">
+        <template slot-scope="scope">
+          <span
+            v-if="scope.row.proportion < 90"
+            style="color: #5473e8; font-weight: 600"
+            >{{ scope.row.imperfectGrain }}</span
+          >
+          <span
+            v-if="scope.row.proportion > 90"
+            style="color: red; font-weight: 600"
+            >{{ scope.row.imperfectGrain }}</span
+          >
+        </template>
+      </el-table-column>
+      <el-table-column prop="status" label="状态">
+        <template slot-scope="scope">
+          <el-popover
+            placement="left"
+            :width="285"
+            trigger="click"
+            visible-arrow="false"
+            @show="history(scope.row)"
+          >
+            <template>
+              <span slot="reference">
+                <span
+                  v-if="scope.row.status == '待执行'"
+                  class="executory"
+                ></span>
+                <span
+                  v-if="scope.row.status == '执行中'"
+                  class="inExecution"
+                ></span>
+                <span v-if="scope.row.status == '已完成'" class="done"></span
+                >{{ scope.row.status }}
+              </span>
+            </template>
+            <div>
+              <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+              <div v-for="(item, index) in historyList" class="flex">
+                <div class="vertical-text vertical-text-left">
+                  {{ item.updateDate }}
+                </div>
+                <div>
+                  <div class="vertical-circle"></div>
+                  <div
+                    v-if="index != historyList.length - 1"
+                    class="vertical-line"
+                  ></div>
+                </div>
+                <div class="vertical-text">
+                  {{ item.operateUser }}<br />{{ item.dealMsg }}
+                </div>
+              </div>
+            </div>
+          </el-popover>
+          <img
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="editClick(scope.row)"
+            alt=""
+          />
+          <!-- <i class="el-icon-edit" @click="editClick(scope.row)"></i> -->
+        </template>
+      </el-table-column>
+      <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
+      <el-table-column prop="mildewGrain" label="未回款(元)">
+      </el-table-column>
+      <el-table-column prop="addressUrl" label="附件">
+        <template slot-scope="scope">
+          <img
+            width="18"
+            height="20"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png"
+            @click="fujian(scope.row)"
+            alt=""
+          />
+          <span v-if="scope.row.addressUrlArray.length > 0">{{
+            scope.row.addressUrlArray.length
+          }}</span>
+          <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
+        </template>
+      </el-table-column>
+      <el-table-column prop="address" label="操作" width="200">
+        <template slot-scope="scope">
+          <img
+            width="16"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/chakan.png"
+            @click="handleExamine(scope.row)"
+            v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.view`
+          "
+            alt=""
+          />
+          <img
+            width="17"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/bianji.png"
+            v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.edit`
+          "
+            @click="handleEdit(scope.row)"
+            alt=""
+          />
+          <img
+            width="16"
+            height="17"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: -1px;
+              margin: 0 6px;
+            "
+            src="../../../public/img/shanchu.png"
+            v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.delete`
+          "
+            @click="handleDelete(scope.row)"
+            alt=""
+          />
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="deptCircularPage.pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    >
+    </el-pagination>
+    <!-- 附件弹框 -->
+    <WinseaContentModal
+      v-model="accessoryTFs"
+      :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose"
+    >
+      <p>查看附件</p>
+      <ws-upload
+        ref="upload"
+        table-name="maintain_work_order"
+        oss-key="mainPlan"
+        :comp-id="compId"
+        :appendix-ids="appendixIdsAdd"
+        :vesselId="deptBudgetList.addressUrl"
+        :size-limit="size"
+        @uploadSuccess="uploadSuccess"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+      />
+    </WinseaContentModal>
+  </div>
+</template>
+<script>
+import {
+  getList,
+  export1,
+  editstatus,
+  billoperatehis,
+  deletecontract,
+} from '@/model/contarct/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      size: 10,
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      appendixIdsAdd: '',
+      searchType: 1,
+      searchTypeText: '未完成',
+      searchKeyWord: '',
+      contractType: 1,
+      startDate: null,
+      endDate: null,
+      // 提交类型
+      submitType: true,
+      contractForm: {},
+      categoryIndex: 0,
+      rulesVendor: {},
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {},
+      historyList: [],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+      taskTypeList: [
+        { value: '未完成', type: 1 },
+        { value: '已完成', type: 2 },
+        { value: '未回款', type: 3 },
+        { value: '全部合同', type: '' },
+      ],
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: '本周',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              var thisDay = start.getDay()
+              var thisDate = start.getDate()
+              if (thisDay != 0) {
+                start.setDate(thisDate - thisDay)
+              }
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本月',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setDate(1)
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本季度',
+            onClick(picker) {
+              var oDate = new Date()
+
+              var thisYear = oDate.getFullYear()
+              var thisMonth = oDate.getMonth() + 1
+
+              var n = Math.ceil(thisMonth / 3) // 季度
+
+              var Month = n * 3 - 1
+
+              var start = new Date(thisYear, Month - 2, 1)
+              var end = new Date()
+
+              picker.$emit('pick', [start, end])
+            },
+          },
+        ],
+      },
+      value1: '',
+      value2: '',
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        contractType: this.contractType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        startDate: this.startDate,
+        endDate: this.endDate,
+        contrPage: this.contrPage,
+      })
+        .toPromise()
+        .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            if (response.records[i].addressUrl != null) {
+              response.records[i].addressUrlArray =
+                response.records[i].addressUrl.split(',')
+            } else {
+              response.records[i].addressUrlArray = []
+            }
+            if (response.records[i].imperfectGrain != null) {
+              response.records[i].proportion =
+                Math.floor(
+                  (response.records[i].imperfectGrain /
+                    response.records[i].weight) *
+                    10000
+                ) / 100
+            } else {
+              response.records[i].proportion = 0
+            }
+          }
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+          this.contractList = response
+        })
+    },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待执行' || row.status == '已完成') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`是否将状态改为${status}`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editstatus({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    // receiveAttachmentPath
+    fujian(row) {
+      if (
+        row.addressUrl === null ||
+        row.addressUrl === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.addressUrl
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    handleAdd() {
+      this.$router.push({ path: 'salesContractAdd' })
+    },
+    handleEdit(row) {
+      this.$router.push({
+        name: 'salesContractEdit',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      if (this.value2) {
+        this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+        this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+      } else {
+        this.startDate = ''
+        this.endDate = ''
+      }
+      this.currentPage = 1
+      this.getList()
+    },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_销售合同`,
+        type: 'xls',
+      })
+    },
+    // deletecontract(){},
+    //删除
+
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+
+    handleDelete(row) {
+      var handleDelete = ' '
+      if (row.handleDelete == '') {
+      }
+      this.$confirm(`此操作永久删除该仓库全部信息,是否确认删除`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          deletecontract({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.flex {
+  display: flex;
+}
+.el-range-editor.el-input__inner {
+  margin-left: 10px;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: -10px;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  border: 1px solid #5473e8;
+  color: #5473e8;
+}
+.warning {
+  width: 100%;
+  height: 2px;
+  background: red;
+}
+.executory,
+.inExecution,
+.done {
+  width: 6px;
+  height: 6px;
+  display: inline-block;
+  border-radius: 50%;
+  position: relative;
+  top: -1px;
+}
+.executory {
+  background: #ff9f24;
+}
+.inExecution {
+  background: #5878e8;
+}
+.done {
+  background: #50cad4;
+}
+.top-grade {
+  background: linear-gradient(90deg, #5678e9, #7993f6);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.second-class {
+  background: linear-gradient(90deg, #50cdd9, #82e2ea);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.third-class {
+  background: linear-gradient(90deg, #ffa735, #ffbf70);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.substandard {
+  background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.wrap {
+  width: 400px;
+  position: absolute;
+  top: 131px;
+  left: 794px;
+  transform-origin: right center;
+  z-index: 2005;
+}
+.vertical-line {
+  height: 100px;
+  border-left: 2px solid #e9ecf7;
+  margin-left: 4px;
+  padding: 0 3px;
+  // border-image: -webkit-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: -moz-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: linear-gradient(#00eba7, #08b8e6) 30 30;
+}
+.el-pagination {
+  padding: 10px 15px;
+  margin-bottom: 0;
+  text-align: center;
+}
+/deep/.el-pager li.active {
+  color: #5878e8;
+  cursor: default;
+}
+/deep/.el-pager li:hover {
+  color: #5878e8;
+  cursor: default;
+}
+.vertical-circle {
+  width: 10px;
+  height: 10px;
+  border: 2px solid #5878e8;
+  background-color: #ffffff;
+  -webkit-border-radius: 100px;
+}
+.vertical-circle:first-child {
+  color: red;
+}
+.vertical-text {
+  margin: 0 10px;
+  color: #8890b1;
+  font-size: 12px;
+  margin-top: -4px;
+}
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  text-align: center;
+}
+.typeselect {
+  width: 500px;
+}
+.padding-xs {
+  padding: 15px;
+  text-align: right;
+}
+.clearfix:after {
+  content: '';
+  display: block;
+  clear: both;
+}
+.el-table {
+  font-size: 16px;
+}
+.taskType {
+  width: 100%;
+  background-color: #fff;
+  margin-top: 2px;
+  margin-bottom: 10px;
+  list-style: none;
+  // padding-bottom: 20px;
+  li {
+    float: left;
+    border: 1px solid #6ea0f3;
+    border-radius: 5px;
+    max-width: 190px;
+    padding: 0 5px;
+    text-align: center;
+    margin: 10px 20px;
+    cursor: pointer;
+    font-size: 14px;
+    p {
+      margin: 8px 0px;
+      span {
+        color: #e74c3c;
+      }
+    }
+  }
+  li:hover {
+    background-color: #e4eeff;
+    color: #1d6ced;
+  }
+}
+.el-date-editor--date {
+  margin: 0 10px;
+}
+.findValue {
+  margin: 0 10px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+  .el-message-box {
+    width: 440px;
+    height: 160px;
+    background: #ffffff;
+    box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
+    border-radius: 4px;
+  }
+  /deep/.el-message-box__message p {
+    width: 351px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #191919;
+    line-height: 20px;
+  }
+  .el-message-box__title {
+    width: 440px;
+    height: 160px;
+    background: #ffffff;
+    box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
+    border-radius: 4px;
+  }
+}
+/deep/.typeselect .el-input__inner{
+   color: #8890B1;
+}
+</style>

+ 1453 - 0
src/views/platformaudit/salesContractAdd.vue

@@ -0,0 +1,1453 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">创建销售合同</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <div class="wenzi">
+      <h3>基本信息</h3>
+      <p>
+        &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
+        标记的条目提交后不可修改。
+      </p>
+    </div>
+    <div class="center">
+      <ws-form ref="deptBudgetList" :model="deptBudgetList">
+        <!--基本信息-->
+
+        <ws-info-table>
+          <!--合同编号-->
+          <ws-form-item label="合同编号" span="1" prop="contractNo" class="readonly">
+            <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="20" size="small"
+              :rules="ruleDeptBudget" />
+          </ws-form-item>
+
+          <!--运输方式-->
+          <ws-form-item label="运输方式" span="1" prop="shippingType">
+            <ws-input v-model="deptBudgetList.shippingType" placeholder="请输入运输方式" maxlength="20" size="small" />
+          </ws-form-item>
+
+          <!--买方-->
+          <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
+            <ws-input v-model="deptBudgetList.buyer" placeholder="请输入买方名称" maxlength="100" size="small" />
+          </ws-form-item>
+
+          <!--结算方式-->
+          <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+            <ws-input v-model="deptBudgetList.settlementMethod" placeholder="请输入结算方式" maxlength="120" size="small" />
+          </ws-form-item>
+          <!--卖方-->
+          <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
+            <ws-input v-model="deptBudgetList.seller" placeholder="请输入卖方名称" maxlength="100" size="small" />
+          </ws-form-item>
+          <ws-form-item label="交货方式" span="1" prop="seller" class="readonly">
+            <el-radio v-model="deptBudgetList.deliverType" label="1">我方自提</el-radio>
+            <el-radio v-model="deptBudgetList.deliverType" label="2">对方送货</el-radio>
+          </ws-form-item>
+
+          <!--买方电话-->
+          <ws-form-item label="买方电话" span="1" prop="contractNo">
+            <ws-input v-model.number="deptBudgetList.buyerPhone" placeholder="请输入买方电话" maxlength="100" size="small" />
+          </ws-form-item>
+          <!--包装方式-->
+          <ws-form-item label="包装方式" span="1" prop="packingMethod">
+            <ws-select v-model="deptBudgetList.packingMethod" placeholder="" class="typeselect"
+              @change="selectpackingMethod">
+              <ws-option v-for="item in packtypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+          <!--卖方电话-->
+          <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+            <ws-input v-model="deptBudgetList.sellerPhone" placeholder="请输入卖方电话" maxlength="100" size="small" />
+          </ws-form-item>
+          <!--验收方式-->
+          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+            <el-select v-model="deptBudgetList.acceptanceMethod" placeholder="请选择验收方式" style="width: 100%" filterable
+              @change="selectunitList">
+              <el-option v-for="(item, index) in unitList" :key="item.constValue" :label="item.constValue"
+                :value="item.constValue">
+                <span class="unit-left" style="float: left">
+                  <span v-if="item.flag == 'delete'">
+                    {{ item.constValue }}</span>
+                  <!-- 新增文本框 -->
+                  <div style="width: 160px" v-if="item.flag !== 'delete'" @click.stop>
+                    <ws-input v-model="item.constValue" clearable maxlength="10" style="width: 100%"></ws-input>
+                  </div>
+                </span>
+                <span style="float: right; color: #8492a6; font-size: 13px">
+                  <!-- 对号 -->
+                  <i class="el-icon-check" style="line-height: 29px; margin-left: 10px" v-if="item.flag !== 'delete'"
+                    @click.stop="saveClick(item, index)"></i>
+                  <!-- 编辑 -->
+                  <i class="el-icon-edit" style="line-height: 29px; margin-left: 10px" v-if="item.flag == 'delete'"
+                    @click.stop="editClick(item, index)"></i>
+                  <!-- 删除 -->
+                  <i class="el-icon-delete" style="line-height: 29px" @click.stop="deleteClick(item, index)"></i>
+                </span>
+              </el-option>
+              <!-- 新增按钮 -->
+              <el-option value="" label="">
+                <div style="
+                    text-align: right;
+                    border-top: 1px solid #dcdfe6;
+                    padding: 5px;
+                  ">
+                  <ws-button type="primary" @click.stop="addClick">{{
+                    $t('button.add')
+                  }}</ws-button>
+                </div>
+              </el-option>
+            </el-select>
+          </ws-form-item>
+
+          <!--重量(吨)-->
+          <ws-form-item label="重量(吨)" span="1" prop="weight">
+            <ws-input v-model="deptBudgetList.weight" placeholder="请输入重量(吨)" maxlength="100" size="small" />
+          </ws-form-item>
+          <!--交货日期(起)-->
+          <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+            <ws-date-picker v-model="deptBudgetList.deliveryDateStart" type="date" placeholder="请选择交货日期(起)"
+              value-format="yyyy-MM-dd" />
+          </ws-form-item>
+          <!--溢短装(%)-->
+          <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+            <ws-input v-model="deptBudgetList.overShort" placeholder="请输入溢短装比例(%)" maxlength="100" size="small" />
+          </ws-form-item>
+          <!--交货日期(止)-->
+          <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+            <ws-date-picker v-model="deptBudgetList.deliveryDateEnd" type="date" placeholder="请选择交货日期(止)"
+              value-format="yyyy-MM-dd" />
+          </ws-form-item>
+
+          <!--合同单价(元/吨)-->
+          <ws-form-item class="readonly" label="合同单价(元/吨)" span="1" prop="unitContractPrice">
+            <ws-input v-model="deptBudgetList.unitContractPrice" placeholder="请输入合同单价" maxlength="100" size="small" />
+          </ws-form-item>
+
+          <!--合同总价-->
+          <ws-form-item label="合同总价" span="1" prop="totalContractPrice">
+            <ws-input v-model="deptBudgetList.totalContractPrice" placeholder="请输入合同总价" maxlength="100" size="small" />
+          </ws-form-item>
+          <ws-form-item label="货源所在地区" span="1" prop="sourceGoods">
+            <el-cascader :options="options_" v-model="selectedOptions" clearable size="large" placeholder="请选择货源所在地区"
+              style="width: 200%" @change="handleChange" />
+          </ws-form-item>
+          <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+            <ws-input v-model="deptBudgetList.sourceGoods" placeholder="请输入货源详细地址" maxlength="20" size="small" />
+          </ws-form-item>
+          <ws-form-item label="交货所在地区" span="1" prop="sourceGoods">
+            <el-cascader :options="options_" v-model="selectedOptions1" clearable size="large" placeholder="请选择交货所在地区"
+              style="width: 200%" @change="handleChange1" />
+          </ws-form-item>
+          <ws-form-item label="交货详细地址" span="1" prop="placeDelivery">
+            <ws-input v-model="deptBudgetList.placeDelivery" placeholder="请输入交货详细地址" maxlength="20" size="small" />
+          </ws-form-item>
+          <!--签订日期-->
+          <ws-form-item label="签订日期" span="1" prop="signingDate">
+            <ws-date-picker v-model="deptBudgetList.signingDate" type="date" placeholder="请选择合同签订日期"
+              value-format="yyyy-MM-dd" />
+          </ws-form-item>
+          <ws-form-item label="最终实际成交量(吨)" span="1" prop="finalTradingVolume">
+            <ws-input v-model="deptBudgetList.finalTradingVolume" placeholder="请输入最终实际成交量" maxlength="100"
+              size="small" />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+    <div class="wenzi">
+      <h3>货物信息</h3>
+    </div>
+    <div class="center">
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+        <!--货物信息-->
+
+        <ws-info-table>
+          <!--货名-->
+          <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
+            <ws-select v-model="deptBudgetList.contractGoodsInfo.goodsName" placeholder="" class="typeselect"
+              @change="selectpackingMethod">
+              <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)" span="1" prop="waterContent">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.waterContent" placeholder="请输入水分占比" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--品级-->
+          <ws-form-item label="品级" span="1" prop="grade" class="readonly">
+            <ws-select v-model="deptBudgetList.contractGoodsInfo.grade" placeholder="" class="typeselect"
+              @change="selectgrade">
+              <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)" span="1" prop="impurity">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.impurity" placeholder="请输入杂质占比(%)" maxlength="40"
+              size="small" />
+          </ws-form-item>
+
+          <!--容量(克/升)>=-->
+          <ws-form-item label="容量(克/升)" span="1" prop="bulkDensity">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.bulkDensity" placeholder="请输入容重" maxlength="40"
+              size="small" />
+          </ws-form-item>
+
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.mildewGrain" placeholder="请输入霉变粒占比(%)" maxlength="40"
+              size="small" />
+          </ws-form-item>
+
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.jiaorenli" placeholder="请输入输入热损伤占比(%)" maxlength="40"
+              size="small" />
+          </ws-form-item>
+          <!--不完整粒(%)<=-->
+          <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完整粒占比(%)"
+              maxlength="40" size="small" />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+
+    <div class="wenzi">
+      <h3>流程信息</h3>
+    </div>
+    <div class="center">
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+        <!--流程信息-->
+
+        <ws-info-table>
+          <!--合同收入(元)-->
+          <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.goodsNameKey" placeholder="请输入合同收入(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--已开发票(元)-->
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.goodsName" placeholder="请输入已开发票(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--费用支出(元)-->
+          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.waterContent" placeholder="请输入费用支出(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--未开发票(元)-->
+          <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.impurity" placeholder="请输入未开发票(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--未回款(元)-->
+          <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.mildewGrain" placeholder="请输入未回款(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--已完成发货量(吨)-->
+          <ws-form-item label="已完成发运量(吨)" span="1" prop="imperfectGrain">
+            <ws-input v-model="deptBudgetList.contractProcessInfo.imperfectGrain" placeholder="请输入已完成发运量(吨)"
+              maxlength="100" size="small" />
+          </ws-form-item>
+          <!--双章原件回收情况-->
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+            <ws-select v-model="deptBudgetList.contractProcessInfo.grade" placeholder="" class="typeselect"
+              @change="selectpackingMethod">
+              <ws-option v-for="item in ChapterTwoList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+
+    <div class="wenzi">
+      <h3>备注信息</h3>
+    </div>
+    <div class="ce">
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+        <!--备注信息-->
+        <ws-input v-model="deptBudgetList.remarks" type="textarea" row="3" placeholder="请输入备注信息,不超过200字"
+          maxlength="200" />
+        <ws-upload ref="upload" table-name="maintain_work_order" oss-key="mainPlan" :comp-id="compId"
+          :appendix-ids="appendixIdsAdd" :vesselId="deptBudgetList.addressUrl" :size-limit="size"
+          @uploadSuccess="uploadSuccess" @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+      </ws-form>
+    </div>
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit(deptBudgetList)">提交</el-button>
+    </div>
+  </div>
+</template>
+<script>
+  //  import { getVesselOne } from '@/model/procurement/basic'
+  //  import { dayjs } from 'base-core-lib'
+  import {
+    packList,
+    addList,
+    xiala,
+    addxiala,
+    editxiala,
+    delxiala,
+  } from '@/model/contarct/index'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+    },
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        options_: regionData,
+        selectedOptions: [],
+        selectedOptions1: [],
+        // 提交类型
+        submitType: true,
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        trainingMethods: {},
+        packtypeList: [],
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        mainReportAdd: {},
+        appendixIdsAdd: '',
+        size: 10,
+        // uploadSuccess: {},
+        // onChange:{},
+        unitList: [],
+        goodnameList: [],
+        gradeList: [],
+        ChapterTwoList: [],
+        deptBudgetList: {
+          deliverType: '1',
+          finalTradingVolume: 0,
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          contractProcessInfo: {},
+        },
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        ruleDeptBudget: {
+          contractNo: [{
+              required: true,
+              message: '请输入活动名称',
+              trigger: 'blur'
+            },
+            {
+              min: 6,
+              max: 20,
+              message: '长度在 6 到 20 个字符',
+              trigger: 'blur',
+            },
+          ],
+        },
+        selectIntendedShip: {},
+        interviewTypeList: {},
+      }
+    },
+    activated() {
+      //cg.viewBudget
+      //cg.viewSpareMoney
+      // this.getVesselData();
+      this.deptBudgetList.packingMethod = '散装'
+      this.deptBudgetList.packingMethodKey = 1
+      this.deptBudgetList.contractGoodsInfo.goodsName = '玉米'
+      this.deptBudgetList.contractGoodsInfo.goodsNameKey = 1
+      this.deptBudgetList.contractProcessInfo.grade = '未回收'
+      this.deptBudgetList.contractProcessInfo.gradeKey = 1
+      this.deptBudgetList.contractGoodsInfo.grade = '一等品'
+      this.deptBudgetList.contractGoodsInfo.gradeKey = 1
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    methods: {
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+      },
+      returnsales() {
+        this.$router.push({
+          path: 'salesContract'
+        })
+      },
+      loaddata() {
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+      },
+      // 上传附件
+      uploadSuccess(data, files, url) {
+        console.log(data, files, url)
+
+        // this.deptBudgetList.
+        // this.formData.append('files', files)
+        // this.feedbackObj.uploadNameAttachment = data.appendixName
+        // this.feedbackObj.pathUploadAttachment = data.appendixPath
+        // // this.newAppendixs = files
+        // this.onChangeFlag = true
+      },
+      onChange(files) {
+        this.fileNum = files
+        this.$refs.upload.handleSaveBill().then((res) => {
+          console.log(files)
+        })
+      },
+      getUnitList() {
+        xiala({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+
+      submit() {
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '请输入合同编号',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractNo.length < 6 ||
+          this.deptBudgetList.contractNo.length > 20
+        ) {
+          this.$message({
+            message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.shippingType) {
+          this.$message({
+            message: '请输入运输方式!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.shippingType.length < 1 ||
+          this.deptBudgetList.shippingType.length > 20
+        ) {
+          this.$message({
+            message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.buyer) {
+          this.$message({
+            message: '请输入买方名称!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.buyer.length > 30) {
+          this.$message({
+            message: '买方名称长度不符合要求,请输入30个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.seller) {
+          this.$message({
+            message: '请输入卖方名称!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.seller.length > 30) {
+          this.$message({
+            message: '卖方名称长度不符合要求,请输入30个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.buyerPhone) {
+          this.$message({
+            message: '请输入买方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.buyerPhone)) {
+          this.$message({
+            message: '输入买方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.buyerPhone.length < 7 ||
+          this.deptBudgetList.buyerPhone.length > 20
+        ) {
+          this.$message({
+            message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.sellerPhone) {
+          this.$message({
+            message: '请输入卖方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.sellerPhone)) {
+          this.$message({
+            message: '输入卖方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.buyerPhone.length < 7 ||
+          this.deptBudgetList.buyerPhone.length > 20
+        ) {
+          this.$message({
+            message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.settlementMethod) {
+          this.$message({
+            message: '请输入结算方式!',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (!this.deptBudgetList.sourceGoods) {
+          this.$message({
+            message: '请输入货源详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.placeDelivery) {
+          this.$message({
+            message: '请输入交货详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.selectedOptions.length == 0) {
+          this.$message({
+            message: '请选择货源所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.selectedOptions1.length == 0) {
+          this.$message({
+            message: '请选择交货所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.weight) {
+          this.$message({
+            message: '请输入重量!',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (
+          isNaN(this.deptBudgetList.weight) ||
+          (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+          this.deptBudgetList.weight < 0 ||
+          this.deptBudgetList.weight > 200000
+        ) {
+          this.$message({
+            message: '输入重量有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.overShort &&
+          isNaN(this.deptBudgetList.overShort)
+        ) {
+          this.$message({
+            message: '溢短装输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.unitContractPrice &&
+          isNaN(this.deptBudgetList.unitContractPrice)
+        ) {
+          this.$message({
+            message: '合同单价输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.totalContractPrice &&
+          isNaN(this.deptBudgetList.totalContractPrice)
+        ) {
+          this.$message({
+            message: '合同总价输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateStart) {
+          this.$message({
+            message: '请选择交货日期(起)',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateEnd) {
+          this.$message({
+            message: '请选择交货日期(止)',
+            type: 'warning',
+          })
+          return
+        }
+        //时间
+        if (
+          new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+          new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+        ) {
+          this.$message({
+            message: '交货日期(止)选择错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.signingDate) {
+          this.$message({
+            message: '请选择签订日期',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+          this.$message({
+            message: '请选择货名',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+          this.$message({
+            message: '请选择水分',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.grade) {
+          this.$message({
+            message: '请选择品级',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.impurity ||
+          (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+          (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+          (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
+            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+          (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
+            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+          (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
+            (String(
+                this.deptBudgetList.contractGoodsInfo.imperfectGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '不完整粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.goodsNameKey
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '合同收入金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+          (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.waterContent).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.waterContent
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '费用金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsName).length -
+            (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '已开发票金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.impurity).length -
+            (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '未开发票金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
+            .length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.imperfectGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '已完成发运量输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.mildewGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '未回款金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        this.$refs.deptBudgetList.validate((valid) => {
+          if (valid) {
+            this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
+            this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
+
+            this.deptBudgetList.deliveryProvince = CodeToText[this.selectedOptions1[0]]
+            this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions1[1]]
+
+            this.deptBudgetList.compId = this.compId
+            this.deptBudgetList.contractType = 1
+
+            if (this.deptBudgetList.deliveryProvince == "澳门特别行政区" || this.deptBudgetList.deliveryProvince ==
+              "澳门特别行政区") {
+              this.deptBudgetList.deliveryArea = "特别行政区"
+            } else {
+
+              this.deptBudgetList.deliveryArea = CodeToText[this.selectedOptions1[2]]
+            }
+            if (this.deptBudgetList.sourceProvince == "澳门特别行政区" || this.deptBudgetList.sourceProvince ==
+              "澳门特别行政区") {
+              this.deptBudgetList.sourceArea = "特别行政区"
+            } else {
+              this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
+            }
+
+            addList(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('添加成功')
+                this.deptBudgetList = {
+                  deliverType: '1',
+                  finalTradingVolume: 0,
+                  contractGoodsInfo: {
+                    goodsName: '',
+                  },
+                  contractProcessInfo: {},
+                }
+
+                this.$router.push({
+                  path: 'salesContract'
+                })
+              })
+          } else {
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
+      },
+      resetForm(deptBudgetList) {
+        this.$refs[deptBudgetList].resetFields()
+      },
+      saveClick(item, index) {
+        console.log(item)
+
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          this.$set(this.unitList, index, {
+            flag: 'check'
+          })
+        } else {
+          this.$set(this.unitList, index, {
+            flag: 'delete'
+          })
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        if (item.flag == 'add') {
+          item.constKey = Math.random() * 20
+          this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
+          this.trainingMethods.constKey = item.constKey
+          this.trainingMethods.constCode = 'TYPEYAN'
+          this.trainingMethods.constValue = item.constValue
+          this.trainingMethods.id = item.id
+          addxiala(this.trainingMethods)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        } else if (item.flag == 'check') {
+          this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
+          this.trainingMethods.constKey = item.constKey
+          this.trainingMethods.constCode = 'TYPEYAN'
+          this.trainingMethods.constValue = item.constValue
+          this.trainingMethods.id = item.id
+          editxiala(this.trainingMethods)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        }
+      },
+      // selectContract(val) {
+      //   let key = this.unitList.find((item) => item.constValue === val).constKey
+      //   this.pleaseChoose = val
+      // },
+
+      handleExamine() {},
+      approve() {},
+      // returnsales() {
+      //   this.$router.push({ path: 'purchaseContract' })
+      // },
+      addClick() {
+        // let [flag, constValue, constKey] = ['check', '', '']
+        // let obj = { flag, constValue, constKey }
+        // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
+        // let result = this.unitList.filter((item, val, arr) => {
+        //   return item.id != '1'
+        // })
+        // result.push(obj)
+        // result.push(objAdd)
+        // this.unitList = result
+        this.unitList.push({
+          flag: 'add',
+          constValue: '',
+          constKey: '',
+        })
+      },
+      selectChapterTwo(e) {
+        for (var i = 0; i < this.ChapterTwoList.length; i++) {
+          if (this.ChapterTwoList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+          }
+        }
+      },
+      selectunitList(e) {
+        for (var i = 0; i < this.unitList.length; i++) {
+          if (this.unitList[i].constValue == e) {
+            this.deptBudgetList.packingMethodKey = this.unitList[i].constKey
+          }
+        }
+      },
+      selectgrade(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+          }
+        }
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          }
+        }
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.deptBudgetList.acceptanceMethodKey =
+              this.packtypeList[i].constKey
+          }
+        }
+      },
+      // 编辑
+      editClick(item, index) {
+        const map = JSON.parse(JSON.stringify(item))
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          map.flag = 'check'
+          this.$set(this.unitList, index, map)
+        } else {
+          map.flag = 'delete'
+          this.$set(this.unitList, index, map)
+        }
+      },
+      // 删除
+      deleteClick(item, index) {
+        if (Object.is(item.constKey, 1)) {
+          return
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        delxiala({
+            id: this.unitList[index].id
+          })
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+            this.pleaseChoose = ''
+          })
+      },
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  .button-container {
+    display: flex;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+    align-items: center;
+    background-color: #fff;
+    width: 100%;
+    height: 50px;
+    padding: 0 10px;
+
+    &>div {
+      margin-left: 10px;
+      display: flex;
+      flex-wrap: nowrap;
+      flex-direction: row;
+
+      &>span {
+        line-height: 50px;
+      }
+    }
+
+    /deep/.auditFlow-box {
+      position: unset;
+      margin-left: 10px;
+
+      &/deep/.auditFlow-icon {
+        width: auto;
+        padding-right: 30px;
+      }
+
+      &/deep/.auditFlow-main {
+        position: absolute;
+      }
+    }
+  }
+
+  .box-app {
+    display: inline-block;
+    float: left;
+    margin-left: 30px;
+    line-height: 50px;
+  }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 16px 0px;
+  }
+
+  .wenzi {
+    width: 70%;
+    margin: 0 auto;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 10px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    width: 70%;
+    margin: 0 auto;
+  }
+
+  .el-form-item {
+    width: 50%;
+  }
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  .ce {
+    width: 70%;
+    margin: 0 auto;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  .hide-sel {
+    .el-input__inner {
+      border: 0px;
+    }
+
+    .el-icon-arrow-up {
+      display: none;
+    }
+
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+    }
+
+    .el-date-editor {
+      i {
+        display: none;
+      }
+    }
+
+    .is-disabled {
+      .el-input__inner:hover {
+        background-color: #fff !important;
+        border: 0;
+      }
+
+      color: #606266;
+
+      .el-input__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+
+      .el-textarea__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+    }
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  //*号
+  .unchangeable {
+    position: absolute;
+    width: 9px;
+    height: 22px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #ff2727;
+    line-height: 22px;
+    display: inline-block;
+    right: 14px;
+  }
+
+  /deep/.el-input,
+  /deep/.el-date-editor {
+    font-size: 13px;
+  }
+
+  /deep/.el-textarea {
+    width: 101%;
+    margin: 0px;
+  }
+
+  /deep/el-date-editor--date {
+    width: 200px;
+  }
+
+  .unchanged {
+    position: absolute;
+    left: 37px;
+    width: 102px;
+    height: 14px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #afb5cb;
+    line-height: 14px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+  }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+</style>

+ 1443 - 0
src/views/platformaudit/salesContractEdit.vue

@@ -0,0 +1,1443 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">修改合同信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <div class="wenzi">
+      <h3>基本信息</h3>
+      <p>
+        &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
+        标记的条目提交后不可修改。
+      </p>
+    </div>
+    <div class="center">
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+        <!--基本信息-->
+        <ws-info-table>
+          <!--合同编号-->
+          <ws-form-item label="合同编号" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.contractNo }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--运输方式-->
+          <ws-form-item label="运输方式" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.shippingType" placeholder="请输入运输方式" maxlength="100" size="small" />
+          </ws-form-item>
+
+          <!--买方-->
+          <ws-form-item label="买方" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.buyer }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--结算方式-->
+          <ws-form-item label="结算方式" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.settlementMethod" placeholder="请输入结算方式" maxlength="100" size="small" />
+          </ws-form-item>
+
+          <!--卖方-->
+          <ws-form-item label="卖方" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.seller }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--交货方式-->
+          <ws-form-item label="交货方式" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.deliverType1 }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--买方电话-->
+          <ws-form-item label="买方电话" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.buyerPhone" placeholder="请输入买方电话" maxlength="100" size="small" />
+          </ws-form-item>
+          <!--包装方式-->
+          <ws-form-item label="包装方式" span="1" prop="packingMethod">
+            <ws-select v-model="deptBudgetList.packingMethod" placeholder="" class="typeselect"
+              @change="selectpackingMethod">
+              <ws-option v-for="item in packtypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+          <!--卖方电话-->
+          <ws-form-item label="卖方电话" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.sellerPhone" placeholder="请输入卖房电话" maxlength="100" size="small" />
+          </ws-form-item>
+          <!--验收方式-->
+          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+            <el-select v-model="deptBudgetList.acceptanceMethod" placeholder="请选择验收方式" style="width: 100%" filterable
+              @change="selectunitList">
+              <el-option v-for="(item, index) in unitList" :key="item.constValue" :label="item.constValue"
+                :value="item.constValue">
+                <span class="unit-left" style="float: left">
+                  <span v-if="item.flag == 'delete'">
+                    {{ item.constValue }}</span>
+                  <!-- 新增文本框 -->
+                  <div style="width: 160px" v-if="item.flag !== 'delete'" @click.stop>
+                    <ws-input v-model="item.constValue" clearable maxlength="10" style="width: 100%"></ws-input>
+                  </div>
+                </span>
+                <span style="float: right; color: #8492a6; font-size: 13px">
+                  <!-- 对号 -->
+                  <i class="el-icon-check" style="line-height: 29px; margin-left: 10px" v-if="item.flag !== 'delete'"
+                    @click.stop="saveClick(item, index)"></i>
+                  <!-- 编辑 -->
+                  <i class="el-icon-edit" style="line-height: 29px; margin-left: 10px" v-if="item.flag == 'delete'"
+                    @click.stop="editClick(item, index)"></i>
+                  <!-- 删除 -->
+                  <i class="el-icon-delete" style="line-height: 29px" @click.stop="deleteClick(item, index)"></i>
+                </span>
+              </el-option>
+              <!-- 新增按钮 -->
+              <el-option value="" label="">
+                <div style="
+                    text-align: right;
+                    border-top: 1px solid #dcdfe6;
+                    padding: 5px;
+                  ">
+                  <ws-button type="primary" @click.stop="addClick">{{
+                    $t('button.add')
+                  }}</ws-button>
+                </div>
+              </el-option>
+            </el-select>
+          </ws-form-item>
+          <!--重量(吨)-->
+          <ws-form-item label="重量(吨)" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.weight" placeholder="请输入重量(吨)" maxlength="100" size="small" />
+          </ws-form-item>
+          <!--交货日期(起)-->
+          <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+            <ws-date-picker v-model="deptBudgetList.deliveryDateStart" type="date" placeholder="请选择交货日期(起)"
+              value-format="yyyy-MM-dd" />
+          </ws-form-item>
+          <!--溢短装(%)-->
+          <ws-form-item label="溢短装(%)" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.overShort" placeholder="请输入溢短装(%)" maxlength="100" size="small" />
+          </ws-form-item>
+          <!--交货日期(止)-->
+          <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+            <ws-date-picker v-model="deptBudgetList.deliveryDateEnd" type="date" placeholder="请选择交货日期(止)"
+              value-format="yyyy-MM-dd" />
+          </ws-form-item>
+
+          <!--合同单价(元/吨)-->
+          <ws-form-item label="合同单价(元/吨)" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.unitContractPrice }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--合同总价-->
+          <ws-form-item label="合同总价" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.totalContractPrice" placeholder="请输入合同总价" maxlength="100" size="small" />
+          </ws-form-item>
+          <!-- 货源所在地区 -->
+          <ws-form-item label="货源所在地区" span="1" prop="packingMethod">
+            <el-cascader :options="options_" v-model="selectedOptions" clearable size="large" placeholder="请选择货源所在地区"
+              style="width: 200%" @change="handleChange" />
+          </ws-form-item>
+          <!-- 货源详细地址 -->
+          <ws-form-item label="货源详细地址" span="1" prop="totalContractPrice">
+            <ws-input v-model="deptBudgetList.totalContractPrice" maxlength="100" placeholder="请输入货源详细地址"
+              size="small" />
+          </ws-form-item>
+          <!-- 交货地所在地区 -->
+          <ws-form-item label="交货地所在地区" span="1" prop="packingMethod">
+            <el-cascader :options="options_" v-model="selectedOptions1" clearable size="large" placeholder="请选择交货地所在地区"
+              style="width: 200%" @change="handleChange1" />
+          </ws-form-item>
+          <!-- 交货地详细地址 -->
+          <ws-form-item label="交货地详细地址" span="1" prop="totalContractPrice">
+            <ws-input v-model="deptBudgetList.totalContractPrice" maxlength="100" placeholder="请输入交货地详细地址"
+              size="small" />
+          </ws-form-item>
+          <!--签订日期-->
+          <ws-form-item label="签订日期" span="1" prop="signingDate">
+            <ws-date-picker v-model="deptBudgetList.signingDate" type="date" placeholder="请选择合同签订日期"
+              value-format="yyyy-MM-dd" />
+          </ws-form-item>
+          <!-- 最终实际交易量(吨) -->
+          <ws-form-item label="最终实际交易量(吨)" span="1" prop="totalContractPrice">
+            <ws-input v-model="deptBudgetList.finalTradingVolume" maxlength="100" placeholder="请输入最终实际交易量"
+              size="small" />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+    <!-- <base-card> -->
+    <div class="wenzi">
+      <h3>货物信息</h3>
+    </div>
+    <div class="center">
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+        <!--货物信息-->
+        <ws-info-table>
+          <!--货名-->
+          <ws-form-item label="货名" span="1" prop="goodsName">
+            <!-- <ws-select
+                v-model="deptBudgetList.contractGoodsInfo.goodsName"
+                placeholder=""
+                class="typeselect"
+                @change="selectpackingMethod"
+              >
+                <ws-option
+                  v-for="item in goodnameList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select> -->
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.goodsName }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.waterContent" placeholder="请输入水分(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--品级-->
+          <ws-form-item label="品级" span="1" prop="grade">
+            <ws-select v-model="deptBudgetList.contractGoodsInfo.grade" placeholder="" class="typeselect"
+              @change="selectgrade">
+              <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.impurity" placeholder="请输入杂质(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--容量(克/升)>=-->
+          <ws-form-item label="容量(克/升)" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.bulkDensity" placeholder="请输入容量(克/升)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.mildewGrain" placeholder="请输入霉变粒(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.jiaorenli" placeholder="请输入热损伤(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <!--不完整粒(%)<=-->
+          <ws-form-item label="不完整粒(%)" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完整粒(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+    <div class="wenzi">
+      <h3>流程信息</h3>
+    </div>
+    <div class="center">
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+        <!--流程信息-->
+
+        <ws-info-table>
+          <!--合同收入(元)-->
+          <ws-form-item label="合同收入(元)" span="1" prop="contractNo">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.goodsNameKey" placeholder="请输入合同收入(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--已开发票(元)-->
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.goodsName" placeholder="请输入已开发票(元))" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--费用支出(元)-->
+          <ws-form-item label="费用支出(元)" span="1" prop="contractNo">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.waterContent" placeholder="请输入费用支出(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--未开发票(元)-->
+          <ws-form-item label="未开发票(元)" span="1" prop="contractNo">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.impurity" placeholder="请输入未开发票(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <!--未回款(元)-->
+          <ws-form-item label="未回款(元)" span="1" prop="contractNo">
+            <ws-input type='number' v-model="deptBudgetList.contractProcessInfo.mildewGrain" placeholder="请输入未回款(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <!--已完成发货量(吨)-->
+          <ws-form-item label="已完成发货量(吨)" span="1" prop="contractNo">
+            <ws-input v-model="deptBudgetList.contractProcessInfo.imperfectGrain" placeholder="请输入已完成发货量(吨)"
+              maxlength="100" size="small" />
+          </ws-form-item>
+          <!--双章原件回收情况-->
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+            <ws-select v-model="deptBudgetList.contractProcessInfo.grade" placeholder="" class="typeselect"
+              @change="selectpackingMethod">
+              <ws-option v-for="item in ChapterTwoList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+
+    <div class="wenzi">
+      <h3>备注信息</h3>
+    </div>
+    <div class="center">
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+        <!--备注信息-->
+        <ws-input v-model="deptBudgetList.remarks" type="textarea" row="3" placeholder="请输入备注信息,不超过200字"
+          maxlength="200" />
+        <ws-upload ref="upload" table-name="maintain_work_order" oss-key="mainPlan" :comp-id="compId"
+          :appendix-ids="appendixIdsAdd" :vesselId="deptBudgetList.addressUrl" :size-limit="size"
+          @uploadSuccess="uploadSuccess" @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+      </ws-form>
+    </div>
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
+    </div>
+  </div>
+</template>
+<script>
+  // import { getVesselOne } from '@/model/procurement/basic'
+  // import { dayjs } from 'base-core-lib'
+  import {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    examineList,
+    editInfo,
+    packList,
+    xiala,
+    addxiala,
+    editxiala,
+    delxiala,
+  } from '@/model/contarct/index'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+    },
+    watch: {
+      vesselId(val) {
+        this.loaddata()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        // 提交类型
+        submitType: true,
+        options_: regionData,
+        selectedOptions: [],
+        selectedOptions1: [],
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        // selectpackingMethod:{},
+        selectunitList: {},
+        //change:{},
+        onChange: {},
+        uploadSuccess: {},
+        selectgrade: {},
+        goodnameList: {},
+        selectpackingMethod: {},
+        unitList: {},
+        packtypeList: [],
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        appendixIdsAdd: '',
+        size: 10,
+        deptBudgetList: {
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          contractProcessInfo: {},
+        },
+        // selectpackingMethod:{},
+        //  change:{},
+        ruleDeptBudget: {},
+        trainingMethods: {},
+        isEdited: false,
+        registered: {},
+        selectCrtDuty: {},
+        dutyList: {},
+        sexList: {},
+        selectDuty: {},
+        gradeList: {},
+        ChapterTwoList: {},
+        selectIntendedShip: {},
+        interviewTypeList: {},
+      }
+    },
+    activated() {
+      //cg.viewBudget
+      //cg.viewSpareMoney
+      // this.getVesselData();
+      this.loaddata()
+      this.editInfo()
+      this.showType = this.isShow
+      // console.log(this.$route.params)
+      this.showType = this.isShow
+    },
+    methods: {
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      returnsales() {
+        this.deptBudgetList = {}
+        this.$router.push({
+          path: 'salesContract'
+        })
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+      },
+      loaddata() {
+        // 数据
+        examineList({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            var tmp = []
+            tmp[0] = TextToCode[response.sourceProvince].code
+            tmp[1] = TextToCode[response.sourceProvince][response.sourceCity].code
+            if (tmp[0] == 810000 || tmp[0] == 820000) {
+              tmp[2] = null
+            } else {
+              tmp[2] =
+                TextToCode[response.sourceProvince][response.sourceCity][
+                  response.sourceArea
+                ].code
+            }
+            this.selectedOptions = tmp
+            var tmp1 = []
+            tmp1[0] = TextToCode[response.deliveryProvince].code
+            tmp1[1] =
+              TextToCode[response.deliveryProvince][response.deliveryCity].code
+            if (tmp1[0] == 810000 || tmp1[0] == 820000) {
+              tmp1[2] = null
+            } else {
+              tmp1[2] =
+                TextToCode[response.deliveryProvince][response.deliveryCity][
+                  response.deliveryArea
+                ].code
+            }
+
+            this.selectedOptions1 = tmp1
+            this.deptBudgetList = response
+          })
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+      },
+
+      getUnitList() {
+        xiala({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方自提'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方送货'
+            }
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+      // 编辑
+      editClick(item, index) {
+        const map = JSON.parse(JSON.stringify(item))
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          map.flag = 'check'
+          this.$set(this.unitList, index, map)
+        } else {
+          map.flag = 'delete'
+          this.$set(this.unitList, index, map)
+        }
+      },
+      // 删除
+      deleteClick(item, index) {
+        if (Object.is(item.constKey, 1)) {
+          return
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        delxiala({
+            id: this.unitList[index].id
+          })
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+            this.pleaseChoose = ''
+          })
+      },
+      saveClick(item, index) {
+        //  console.log(item)
+
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          this.$set(this.unitList, index, {
+            flag: 'check'
+          })
+        } else {
+          this.$set(this.unitList, index, {
+            flag: 'delete'
+          })
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        if (item.flag == 'add') {
+          item.constKey = Math.random() * 20
+          this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
+          this.trainingMethods.constKey = item.constKey
+          this.trainingMethods.constCode = 'TYPEYAN'
+          this.trainingMethods.constValue = item.constValue
+          this.trainingMethods.id = item.id
+          addxiala(this.trainingMethods)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        } else if (item.flag == 'check') {
+          this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
+          this.trainingMethods.constKey = item.constKey
+          this.trainingMethods.constCode = 'TYPEYAN'
+          this.trainingMethods.constValue = item.constValue
+          this.trainingMethods.id = item.id
+          editxiala(this.trainingMethods)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        }
+      },
+      addClick() {
+        // let [flag, constValue, constKey] = ['check', '', '']
+        // let obj = { flag, constValue, constKey }
+        // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
+        // let result = this.unitList.filter((item, val, arr) => {
+        //   return item.id != '1'
+        // })
+        // result.push(obj)
+        // result.push(objAdd)
+        // this.unitList = result
+        this.unitList.push({
+          flag: 'add',
+          constValue: '',
+          constKey: '',
+        })
+      },
+      submit() {
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '请输入合同编号',
+            type: 'warning',
+          })
+          return
+        }
+        console.log(this.deptBudgetList.contractNo.length)
+        if (
+          this.deptBudgetList.contractNo.length < 6 ||
+          this.deptBudgetList.contractNo.length > 20
+        ) {
+          this.$message({
+            message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.shippingType) {
+          this.$message({
+            message: '请输入运输方式!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.shippingType.length < 1 ||
+          this.deptBudgetList.shippingType.length > 20
+        ) {
+          this.$message({
+            message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.buyer) {
+          this.$message({
+            message: '请输入买方名称!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.buyer.length > 30) {
+          this.$message({
+            message: '买方名称长度不符合要求,请输入30个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.seller) {
+          this.$message({
+            message: '请输入卖方名称!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.seller.length > 30) {
+          this.$message({
+            message: '卖方名称长度不符合要求,请输入30个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.buyerPhone) {
+          this.$message({
+            message: '请输入买方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.buyerPhone)) {
+          this.$message({
+            message: '输入买方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.buyerPhone.length < 7 ||
+          this.deptBudgetList.buyerPhone.length > 20
+        ) {
+          this.$message({
+            message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.sellerPhone) {
+          this.$message({
+            message: '请输入卖方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.sellerPhone)) {
+          this.$message({
+            message: '输入卖方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.buyerPhone.length < 7 ||
+          this.deptBudgetList.buyerPhone.length > 20
+        ) {
+          this.$message({
+            message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.settlementMethod) {
+          this.$message({
+            message: '请输入结算方式!',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (!this.deptBudgetList.sourceGoods) {
+          this.$message({
+            message: '请输入货源详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.placeDelivery) {
+          this.$message({
+            message: '请输入交货详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.selectedOptions.length == 0) {
+          this.$message({
+            message: '请选择货源所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.selectedOptions1.length == 0) {
+          this.$message({
+            message: '请选择交货所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.weight) {
+          this.$message({
+            message: '请输入重量!',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (
+          isNaN(this.deptBudgetList.weight) ||
+          (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+          this.deptBudgetList.weight < 0 ||
+          this.deptBudgetList.weight > 200000
+        ) {
+          this.$message({
+            message: '输入重量有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.overShort &&
+          isNaN(this.deptBudgetList.overShort)
+        ) {
+          this.$message({
+            message: '溢短装输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.unitContractPrice &&
+          isNaN(this.deptBudgetList.unitContractPrice)
+        ) {
+          this.$message({
+            message: '合同单价输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.totalContractPrice &&
+          isNaN(this.deptBudgetList.totalContractPrice)
+        ) {
+          this.$message({
+            message: '合同总价输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateStart) {
+          this.$message({
+            message: '请选择交货日期(起)',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateEnd) {
+          this.$message({
+            message: '请选择交货日期(止)',
+            type: 'warning',
+          })
+          return
+        }
+        //时间
+        if (
+          new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+          new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+        ) {
+          this.$message({
+            message: '交货日期(止)选择错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.signingDate) {
+          this.$message({
+            message: '请选择签订日期',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+          this.$message({
+            message: '请选择货名',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+          this.$message({
+            message: '请选择水分',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.grade) {
+          this.$message({
+            message: '请选择品级',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.impurity ||
+          (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+          (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+          (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
+            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+          (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
+            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+          (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
+            (String(
+                this.deptBudgetList.contractGoodsInfo.imperfectGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '不完整粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.goodsNameKey
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '合同收入金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+          (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.waterContent).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.waterContent
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '费用金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsName).length -
+            (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '已开发票金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.impurity).length -
+            (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '未开发票金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
+            .length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.imperfectGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '已完成发运量输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+          (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
+            (String(
+                this.deptBudgetList.contractProcessInfo.mildewGrain
+              ).indexOf('.') +
+              1) >
+            2)
+        ) {
+          this.$message({
+            message: '未回款金额输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        this.$refs.deptBudgetList.validate((valid) => {
+          if (valid) {
+            this.deptBudgetList.sourceProvince =
+              CodeToText[this.selectedOptions[0]]
+            this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
+
+            this.deptBudgetList.deliveryProvince =
+              CodeToText[this.selectedOptions1[0]]
+            this.deptBudgetList.deliveryCity =
+              CodeToText[this.selectedOptions1[1]]
+
+            this.deptBudgetList.compId = this.compId
+            this.deptBudgetList.contractType = 1
+
+            if (
+              this.deptBudgetList.deliveryProvince == '澳门特别行政区' ||
+              this.deptBudgetList.deliveryProvince == '澳门特别行政区'
+            ) {
+              this.deptBudgetList.deliveryArea = '特别行政区'
+            } else {
+              this.deptBudgetList.deliveryArea =
+                CodeToText[this.selectedOptions1[2]]
+            }
+            if (
+              this.deptBudgetList.sourceProvince == '澳门特别行政区' ||
+              this.deptBudgetList.sourceProvince == '澳门特别行政区'
+            ) {
+              this.deptBudgetList.sourceArea = '特别行政区'
+            } else {
+              this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
+            }
+            editInfo(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('编辑成功')
+                this.deptBudgetList = {}
+                this.$router.push({
+                  path: 'salesContract'
+                })
+              })
+          } else {
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
+      },
+      editInfo() {
+        editInfo({})
+      },
+      // getList(){}
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  .button-container {
+    display: flex;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+    align-items: center;
+    background-color: #fff;
+    width: 100%;
+    height: 50px;
+    padding: 0 10px;
+
+    &>div {
+      margin-left: 10px;
+      display: flex;
+      flex-wrap: nowrap;
+      flex-direction: row;
+
+      &>span {
+        line-height: 50px;
+      }
+    }
+
+    /deep/.auditFlow-box {
+      position: unset;
+      margin-left: 10px;
+
+      &/deep/.auditFlow-icon {
+        width: auto;
+        padding-right: 30px;
+      }
+
+      &/deep/.auditFlow-main {
+        position: absolute;
+      }
+    }
+  }
+
+  .box-app {
+    display: inline-block;
+
+    margin-left: 30px;
+    line-height: 50px;
+  }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 6px 0px;
+  }
+
+  .wenzi {
+    width: 70%;
+    margin: 0 auto;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 30px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    width: 70%;
+    margin: 0 auto;
+  }
+
+  .el-form-item {
+    width: 50%;
+  }
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  .hide-sel {
+    .el-input__inner {
+      border: 0px;
+    }
+
+    .el-icon-arrow-up {
+      display: none;
+    }
+
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+    }
+
+    .el-date-editor {
+      i {
+        display: none;
+      }
+    }
+
+    .is-disabled {
+      .el-input__inner:hover {
+        background-color: #fff !important;
+        border: 0;
+      }
+
+      color: #606266;
+
+      .el-input__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+
+      .el-textarea__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+    }
+  }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  //*号
+  .unchangeable {
+    position: absolute;
+    width: 9px;
+    height: 22px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #ff2727;
+    line-height: 22px;
+    display: inline-block;
+    right: 14px;
+  }
+
+  /deep/.el-input,
+  /deep/.el-date-editor {
+    font-size: 13px;
+  }
+
+  /deep/.el-textarea {
+    width: 101%;
+    margin: 0px;
+  }
+
+  /deep/el-date-editor--date {
+    width: 200px;
+  }
+
+  .unchanged {
+    position: absolute;
+    left: 37px;
+    width: 102px;
+    height: 14px;
+    font-size: 14px;
+    font-weight: 400;
+    color: #afb5cb;
+    line-height: 14px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+  }
+</style>

+ 733 - 0
src/views/platformaudit/salesContractExamine.vue

@@ -0,0 +1,733 @@
+
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">查看合同详情</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertion-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <div class="state">
+      <h2>销售合同</h2>
+      <p>【编号:{{ deptBudgetList.contractNo }}】</p>
+      <span class="icon">&nbsp;&nbsp;{{ deptBudgetList.status }}</span>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="mainReportAdd"
+        :model="deptBudgetList"
+      >
+        <div class="remark">
+          <h3>基本信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="合同编号" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.contractNo }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          <ws-form-item label="运输方式" span="1" prop="shippingType">
+            <div class="unchanged">
+              {{ deptBudgetList.shippingType }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="买方" span="1" prop="buyer">
+            <div class="unchanged">
+              {{ deptBudgetList.buyer }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.settlementMethod }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="卖方" span="1" prop="seller">
+            <div class="unchanged">
+              {{ deptBudgetList.seller }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          <ws-form-item label="交货方式" span="1" prop="deliverType">
+            <div class="unchanged">
+              {{ deptBudgetList.deliverType1 }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="买方电话" span="1" prop="buyerPhone">
+            <div class="unchanged">
+              {{ deptBudgetList.buyerPhone }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="包装方式" span="1" prop="packingMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.packingMethod }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+            <div class="unchanged">
+              {{ deptBudgetList.sellerPhone }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.acceptanceMethod }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="重量(吨)" span="1" prop="weight">
+            <div class="unchanged">
+              {{ deptBudgetList.weight }}
+            </div>
+          </ws-form-item>
+         <ws-form-item
+            label="交货日期(起)"
+            span="1"
+            prop="deliveryDateStart"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.deliveryDateStart }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+            <div class="unchanged">
+              {{ deptBudgetList.overShort }}
+            </div>
+          </ws-form-item>
+         <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+            <div class="unchanged">
+              {{ deptBudgetList.deliveryDateEnd }}
+            </div>
+          </ws-form-item>
+          <ws-form-item
+            label="合同单价(元/吨)"
+            span="1"
+            prop="unitContractPrice"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.unitContractPrice }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          
+          <ws-form-item
+            label="合同总价(元)"
+            span="1"
+            prop="totalContractPrice"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.totalContractPrice }}
+            </div>
+          </ws-form-item>
+          
+          <ws-form-item label="货源所在地区" span="1" >
+            <div class="unchanged">
+                {{deptBudgetList. sourceProvince}}
+                {{deptBudgetList. sourceCity}}
+                {{deptBudgetList. sourceArea}}
+
+            </div>
+          </ws-form-item>
+          
+          <ws-form-item label="货源详细地址" span ="1" prop = "sourceGoods">
+            <div class = "unchanged">
+                {{deptBudgetList.sourceGoods}}
+            </div>
+          </ws-form-item>
+          
+          <ws-form-item label="交货地所在地区" span="1" >
+              <div class="unchanged">
+                  {{deptBudgetList. deliveryProvince}}
+                  {{deptBudgetList.deliveryCity}}
+                  {{deptBudgetList.deliveryArea}}
+              </div>
+          </ws-form-item>
+          
+          <ws-form-item label="交货地详细地址" span="1" prop="placeDelivery">
+            <div class = "unchanged">
+                {{deptBudgetList.placeDelivery}}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="签订日期" span="1" prop="signingDate">
+            <div class="unchanged">
+              {{ deptBudgetList.signingDate }}
+            </div>
+          </ws-form-item>
+          
+          <ws-form-item label="最终实际交易量 (吨)" span="1" prop="finalTradingVolume">
+            <div class="unchanged">
+              {{deptBudgetList.finalTradingVolume}}
+            </div>
+          </ws-form-item>
+        </ws-info-table>
+
+        <!-- </base-card> -->
+
+        <!--面试信息-->
+        <div class="remark">
+          <h3>货物信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="货名" span="1" prop="waterContent">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.goodsName }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.waterContent }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="品级" span="1" prop="grade">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.grade }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.impurity }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="容重(克/升)<=" span="1" prop="bulkDensity">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
+            </div>
+          </ws-form-item>
+          <ws-form-item
+            label="霉变粒(%)<="
+            span="1"
+            prop="mildewGrain"
+            class="result"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
+            </div>
+          </ws-form-item>
+          <ws-form-item
+            label="不完善粒(%)<="
+            span="1"
+            prop="imperfectGrain"
+            class="result"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
+            </div>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>流程信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.goodsNameKey }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.goodsName }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.waterContent }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.impurity }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.mildewGrain }}
+            </div>
+          </ws-form-item>
+          <ws-form-item
+            label="已完成发运量(吨)"
+            span="1"
+            prop="imperfectGrain"
+            class="result"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+            </div>
+          </ws-form-item>
+          <!-- <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+          <div class="unchanged">
+            {{ deptBudgetList.contractProcessInfo.grade }}
+          </div>
+
+          >{{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+        </ws-form-item> -->
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.grade }}
+            </div>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>备注信息</h3>
+          <div class=" beizhu">
+          {{ deptBudgetList.remarks }}
+        </div>
+
+        </div>
+
+        
+        <img :src="deptBudgetList.addressUrl" alt="" />
+
+        <!-- </base-card> -->
+      </ws-form>
+      <div style="text-align: right; padding: 10px">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          >关闭</el-button
+        >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {
+  packList,
+  xiala,
+  examineList,
+} from '@/model/contarct/index'
+import { dayjs } from 'base-core-lib'
+import WsUpload from '@/components/WsUpload'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+  },
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      // 提交类型
+      submitType: true,
+      tableData: [],
+      ruleDeptBudget: [],
+      deptBudgetList: {
+        contractProcessInfo: {},
+        contractGoodsInfo: {},
+      },
+      mainReportAdd: {},
+      list: {},
+      
+    }
+  },
+
+  activated() {
+    this.status = this.$route.query.status
+    this.loaddata()
+    this.showType = this.isShow
+    // this.examineList()
+  },
+  methods: {
+    loaddata() {
+      // 数据
+      examineList({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+          if(this.deptBudgetList.deliverType == 1){
+            this.deptBudgetList.deliverType1 = "我方自提"
+          }else if(this.deptBudgetList.deliverType == 2){
+            this.deptBudgetList.deliverType1 = "对方送货" 
+          }
+        })
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 双章
+      packList({ constId: 'CON4' })
+        .toPromise()
+        .then((response) => {
+          this.ChapterTwoList = response
+        })
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    handleExamine() {},
+    approve() {},
+    returnsales() {
+      this.$router.push({ path: 'salesContract' })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 6px 0px;
+}
+.wenzi {
+  width: 900px;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 30px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 900px;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 10px 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+.state {
+  width: 900px;
+  margin: 0 auto;
+}
+.state h2,
+.state p {
+  display: inline-block;
+}
+.state p {
+  display: inline-block;
+  margin-left: 10px;
+  width: 170px;
+  height: 20px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #000000;
+  line-height: 20px;
+}
+.icon {
+  display: inline-block;
+  width: 60px;
+  height: 24px;
+  background: #ecfeff;
+  border-radius: 12px;
+  border: 1px solid #50cad4;
+  position: relative;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-size: 14px;
+  color: #50cad4;
+  line-height: 24px;
+}
+
+//*号
+.unchangeable {
+  position: absolute;
+  width: 9px;
+  height: 22px;
+  font-size: 16px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #ff2727;
+  line-height: 22px;
+  display: inline-block;
+  right: 14px;
+}
+/deep/.el-input,
+/deep/.el-date-editor {
+  font-size: 13px;
+  width: 232px;
+  left: 21px;
+}
+/deep/.el-textarea {
+  width: 900px;
+  margin: 0px;
+}
+/deep/el-date-editor--date {
+  width: 200px;
+}
+/deep/.beizhu {
+  margin: 0 auto;
+  font-size: 14px;
+  color: #afb5cb;
+  margin-left: 20px;
+}
+.unchanged {
+  position: absolute;
+  left: 37px;
+  width: 900px;
+  height: 14px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #afb5cb;
+  line-height: 14px;
+}
+/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+  width: 130px;
+}
+/deep/.el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  width: 232px;
+}
+</style>

+ 970 - 1017
src/views/purchasingManagement/procurementPlanAdd.vue

@@ -7,13 +7,8 @@
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
-          <img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt
-          />返回
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt />返回
         </el-button>
       </el-col>
     </el-row>
@@ -22,175 +17,89 @@
         <div class="small-title">
           <h3>基本信息</h3>
         </div>
-         <el-form ref="dataList" :model="dataList" label-width="140px">
-          <ws-form-item label="标题" span="1" prop="title" >
+        <el-form ref="dataList" :model="dataList" label-width="140px">
+          <ws-form-item label="标题" span="1" prop="title">
             <el-input v-model="dataList.title" maxlength="16" class="typeselect" placeholder="标题须包含企业简称,不超过16个字" />
-              <span class="unchangeable">*</span>
+            <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="货名" span="1" prop="goodsName" >
-            <ws-select
-              v-model="dataList.goodsName"
-              placeholder
-              class="typeselect"
-              @change="selectgoodsName"
-            >
-              <ws-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+          <ws-form-item label="货名" span="1" prop="goodsName">
+            <ws-select v-model="dataList.goodsName" placeholder class="typeselect" @change="selectgoodsName">
+              <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="计划采购量(吨)" span="1" prop="plannedPurchaseVolume" >
-            <el-input
-              v-model="dataList.plannedPurchaseVolume"
-              class="typeselect"
-              placeholder="请输入计划采购量"
-            />
+          <ws-form-item label="计划采购量(吨)" span="1" prop="plannedPurchaseVolume">
+            <el-input v-model="dataList.plannedPurchaseVolume" class="typeselect" placeholder="请输入计划采购量" />
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume" >
+          <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
             <el-input v-model="dataList.minimumVolume" class="typeselect" placeholder="请输入最小成交量" />
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="类型" span="1" prop="procurementPlanType" >
-            <ws-select
-              v-model="dataList.procurementPlanType"
-              placeholder
-              class="typeselect"
-              @change="selectprocurementPlanType"
-            >
-              <ws-option
-                v-for="item in procurementPlanTypeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+          <ws-form-item label="类型" span="1" prop="procurementPlanType">
+            <ws-select v-model="dataList.procurementPlanType" placeholder class="typeselect"
+              @change="selectprocurementPlanType">
+              <ws-option v-for="item in procurementPlanTypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
             <span class="unchangeable">*</span>
           </ws-form-item>
-         <ws-form-item label="价格类型" span="1" prop="priceType">
+          <ws-form-item label="价格类型" span="1" prop="priceType">
             <el-input v-model="dataList.priceType" disabled />
           </ws-form-item>
-           <ws-form-item
-            v-show="dataList.procurementPlanType=='期货'"
-            label="基差(元/吨)"
-            span="1"
-            prop="basisPrice"
-          >
+          <ws-form-item v-show="dataList.procurementPlanType=='期货'" label="基差(元/吨)" span="1" prop="basisPrice">
             <el-input v-model="dataList.basisPrice" placeholder="请输入基差" />
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item
-            v-show="dataList.procurementPlanType=='现货'"
-            label="采购价格(元)"
-            span="1"
-            prop="procurementPrice"
-          >
-            <el-input
-              v-model="dataList.procurementPrice"
-              maxlength="120"
-              class="typeselect"
-              placeholder="请输入采购价格"
-            />
+          <ws-form-item v-show="dataList.procurementPlanType=='现货'" label="采购价格(元)" span="1" prop="procurementPrice">
+            <el-input type='number' v-model="dataList.procurementPrice" maxlength="120" class="typeselect"
+              placeholder="请输入采购价格" />
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="收货库" span="1" prop="receiveWarehouse" >
-            <ws-select
-              v-model="dataList.receiveWarehouse"
-              placeholder
-              class="typeselect"
-              @change="sendWarehousechange"
-            >
-              <ws-option
-                v-for="item in warehouseList"
-                :key="item.id"
-              :label="item.warehouseName"
-              :value="item.warehouseName"
-              />
+          <ws-form-item label="收货库" span="1" prop="receiveWarehouse">
+            <ws-select v-model="dataList.receiveWarehouse" placeholder class="typeselect" @change="sendWarehousechange">
+              <ws-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
+                :value="item.warehouseName" />
             </ws-select>
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="收货库所在地区" span="1" prop="receiveArea" > 
-            <el-cascader
-              :options="options_"
-              v-model="selectedOptions"
-              class="typeselect"
-              clearable
-              placeholder="请选择收货库所在地区"
-              @change="handleChange"
-              style="width:200%"
-            />
+          <ws-form-item label="收货库所在地区" span="1" prop="receiveArea">
+            <el-cascader :options="options_" v-model="selectedOptions" class="typeselect" clearable
+              placeholder="请选择收货库所在地区" @change="handleChange" style="width:200%" />
             <span class="unchangeable">*</span>
           </ws-form-item>
           <ws-form-item label="运费承担方" span="1" prop="freightPayer">
-            <ws-select
-              v-model="dataList.freightPayer"
-              placeholder
-              class="typeselect"
-              @change="selectfreightPayer"
-            >
-              <ws-option
-                v-for="item in freightPayerList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.freightPayer" placeholder class="typeselect" @change="selectfreightPayer">
+              <ws-option v-for="item in freightPayerList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
-          <ws-form-item label="包装方式" span="1" prop="packingType" > 
-            <ws-select
-              v-model="dataList.packingType"
-              placeholder
-              class="typeselect"
-              @change="selectpackingType"
-            >
-              <ws-option
-                v-for="item in packingTypeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+          <ws-form-item label="包装方式" span="1" prop="packingType">
+            <ws-select v-model="dataList.packingType" placeholder class="typeselect" @change="selectpackingType">
+              <ws-option v-for="item in packingTypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
             <span class="unchangeable">*</span>
           </ws-form-item>
           <el-form-item v-if="dataList.packingType!='散装'" label="装袋备注" span="1" prop="baggingNotes">
-            <el-input
-            maxlength='30'
-              v-model="dataList.baggingNotes"
-              class="typeselect"
-              placeholder="请输入装袋要求如:98斤,王中王彩袋"
-            />
+            <el-input maxlength='30' v-model="dataList.baggingNotes" class="typeselect"
+              placeholder="请输入装袋要求如:98斤,王中王彩袋" />
           </el-form-item>
-          <ws-form-item label="买方" span="1" prop="buyer" >
+          <ws-form-item label="买方" span="1" prop="buyer">
             <el-input maxlength='25' v-model="dataList.buyer" class="typeselect" placeholder="请输入买方名称" />
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <el-form-item label="买方电话" span="1" prop="buyerPhone" >
-            <el-input
-              v-model="dataList.buyerPhone"
-              filterable
-              class="typeselect"
-              clearable
-              placeholder="请输入买方电话"
-            ></el-input>
+          <el-form-item label="买方电话" span="1" prop="buyerPhone">
+            <el-input v-model="dataList.buyerPhone" filterable class="typeselect" clearable placeholder="请输入买方电话">
+            </el-input>
             <span class="unchangeable">*</span>
           </el-form-item>
-          <el-form-item label="发票费(个人)" span="1" prop="invoiceFeePerson" >
-            <el-input
-              v-model="dataList.invoiceFeePerson"
-              placeholder="请输入发票费(个人)"
-              class="typeselect"
-            ></el-input>
+          <el-form-item label="发票费(个人)" span="1" prop="invoiceFeePerson">
+            <el-input v-model="dataList.invoiceFeePerson" placeholder="请输入发票费(个人)" class="typeselect"></el-input>
           </el-form-item>
-          <el-form-item label="发票费(企业)" span="1" prop="invoiceFeeCompany" >
-            <el-input
-              v-model="dataList.invoiceFeeCompany"
-              placeholder="请输入发票费(企业)"
-              class="typeselect"
-            ></el-input>
+          <el-form-item label="发票费(企业)" span="1" prop="invoiceFeeCompany">
+            <el-input v-model="dataList.invoiceFeeCompany" placeholder="请输入发票费(企业)" class="typeselect"></el-input>
           </el-form-item>
           <div class="small-title"></div>
         </el-form>
@@ -200,11 +109,11 @@
           <h3>货物要求</h3>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
-          <el-form-item label="水分(%)<=" span="1" prop="waterContent" >
+          <el-form-item label="水分(%)<=" span="1" prop="waterContent">
             <el-input v-model="dataList.waterContent" class="typeselect" placeholder="请输入水分占比" />
             <span class="unchangeable">*</span>
           </el-form-item>
-          <el-form-item label="容重(g/l)>=" span="1" prop="bulkDensity" >
+          <el-form-item label="容重(g/l)>=" span="1" prop="bulkDensity">
             <el-input v-model="dataList.bulkDensity" class="typeselect" placeholder="请输入容重" />
             <span class="unchangeable">*</span>
           </el-form-item>
@@ -224,58 +133,24 @@
             <el-input v-model="dataList.protein" class="typeselect" placeholder="请输入蛋白占比" />
           </el-form-item>
           <ws-form-item label="粒型" span="1" prop="grain">
-            <ws-select
-              v-model="dataList.grain"
-              placeholder
-              class="typeselect"
-              @change="selectgrain"
-            >
-              <ws-option
-                v-for="item in grainList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.grain" placeholder class="typeselect" @change="selectgrain">
+              <ws-option v-for="item in grainList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <ws-form-item label="品级" span="1" prop="grade">
-            <ws-select
-              v-model="dataList.grade"
-              placeholder
-              class="typeselect"
-              @change="selectgrade"
-            >
-              <ws-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.grade" placeholder class="typeselect" @change="selectgrade">
+              <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <ws-form-item label="产地" span="1" prop="unitPrice">
-            <el-cascader
-              :options="options1_"
-              v-model="selectedOptions1"
-              class="typeselect"
-              clearable
-              size="large"
-              placeholder="请选择产地"
-              @change="handleChange1"
-              style="width:200%"
-            />
+            <el-cascader :options="options1_" v-model="selectedOptions1" class="typeselect" clearable size="large"
+              placeholder="请选择产地" @change="handleChange1" style="width:200%" />
           </ws-form-item>
           <el-form-item label="产出年份" span="1" prop="outputYear">
-            <el-date-picker
-              v-model="dataList.outputYear"
-              class="typeselect"
-              type="year"
-              align="right"
-              unlink-panels
-              value-format='yyyy'
-              range-separator="至"
-              placeholder="产出年份"
-            ></el-date-picker>
+            <el-date-picker v-model="dataList.outputYear" class="typeselect" type="year" align="right" unlink-panels
+              value-format='yyyy' range-separator="至" placeholder="产出年份"></el-date-picker>
           </el-form-item>
         </el-form>
       </div>
@@ -287,893 +162,971 @@
   </div>
 </template>
 <script>
-import { procurementAdd } from '@/model/purchasingManagement/index'
-import { regionData,provinceAndCityData, CodeToText, TextToCode } from 'element-china-area-data'
-import { packList } from '@/model/contarct/index'
-import { getwarehousename } from '@/model/tasksport/index'
-import Pagination from '@/components/Pagination'
-import WsUpload from '@/components/WsUpload'
-// import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination
-  },
-  watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
-    isShow(val) {
-      this.showType = val
-    }
-  },
-  computed: {
+  import {
+    procurementAdd
+  } from '@/model/purchasingManagement/index'
+  import {
+    regionData,
+    provinceAndCityData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+  import {
+    packList
+  } from '@/model/contarct/index'
+  import {
+    getwarehousename
+  } from '@/model/tasksport/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination
+    },
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
+      }
+    },
+    computed: {
 
-  },
-  data() {
-    return {
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 是否显示
-      showType: true,
-      // 年
-      year: '',
-      options_: regionData,
-      options1_:provinceAndCityData,
-      packingTypeList: '',
-      procurementPlanTypeList: '',
-      freightPayerList: '',
-      searchTypeText: '',
-      selectedOptions: [],
-      selectedOptions1: [],
-      contractNoList: [],
-      deptBudgetTotal: 0,
-      readonly: true,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      searchKeyWord: '',
-      radio: '1',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      goodnameList: {},
-      grainList: [],
-      checked: true,
-      form: {},
-      pcFlag: 1,
-      staffList: [],
-      options: [],
-      storageType: [],
-      storageType1: [],
-      outContractNo: [],
-      // 提交类型
-      submitType: true,
-      status: [],
-      unitPricechange: [],
-      warehouseNameList: [],
-      warehouseNameList1: [],
-      waterContentchange: [],
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      warehouseList: [],
-      warehouseInOutDetail: {},
-      onChange: {},
-      deptBudgetList1: [],
-      gradeList: [],
-      rules: {
-        netWeight: [
-          {
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        options_: regionData,
+        options1_: provinceAndCityData,
+        packingTypeList: '',
+        procurementPlanTypeList: '',
+        freightPayerList: '',
+        searchTypeText: '',
+        selectedOptions: [],
+        selectedOptions1: [],
+        contractNoList: [],
+        deptBudgetTotal: 0,
+        readonly: true,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        radio: '1',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        grainList: [],
+        checked: true,
+        form: {},
+        pcFlag: 1,
+        staffList: [],
+        options: [],
+        storageType: [],
+        storageType1: [],
+        outContractNo: [],
+        // 提交类型
+        submitType: true,
+        status: [],
+        unitPricechange: [],
+        warehouseNameList: [],
+        warehouseNameList1: [],
+        waterContentchange: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        warehouseList: [],
+        warehouseInOutDetail: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        rules: {
+          netWeight: [{
             required: true,
             type: 'number',
             message: '请输入活动名称',
             trigger: 'blur'
+          }]
+        },
+        outputYear: [],
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM')
+        },
+        contractList: [],
+        inOutTaskNo: '',
+        dataList: {
+          taskTypeKey: '1',
+          goodsName: '玉米',
+          goodsNameKey: 1,
+          procurementPlanType: '现货',
+          procurementPlanTypeKey: 2,
+          priceType: '定价采购',
+          priceTypeKey: 2,
+          packingType: '散装',
+          packingTypeKey: 1
+        },
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: time => {
+            return time.getTime() > Date.now()
           }
-        ]
+        },
+        accessoryTFs: false
+      }
+    },
+    activated() {
+      this.loaddata()
+    },
+    mounted() {},
+    methods: {
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
       },
-      outputYear: [],
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      deptCircularPage: {},
-      packtypeList: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM')
+      returnsales() {
+        this.dataList = {}
+        // this.selectedOptions = ''
+        this.$router.push({
+          path: 'procurementPlanList'
+        })
       },
-      contractList: [],
-      inOutTaskNo: '',
-      dataList: { taskTypeKey: '1',goodsName:'玉米',goodsNameKey:1,procurementPlanType:'现货',procurementPlanTypeKey:2,priceType:'定价采购',priceTypeKey:2,packingType:'散装',
-      packingTypeKey:1 },
-      historyList: [],
-      pickerBeginDateBefore: {
-        disabledDate: time => {
-          return time.getTime() > Date.now()
+      // 获取当前年月日
+      getdate() {
+        var date = new Date()
+        var year = date.getFullYear() //获取完整的年份(4位)
+        var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+        var datetime = date.getDate() //获取当前日(1-31)
+        if (mouth < 10) {
+          mouth = '0' + mouth
+        }
+        if (datetime < 10) {
+          datetime = '0' + datetime
         }
+        return year + '' + mouth + datetime
       },
-      accessoryTFs: false
-    }
-  },
-  activated() {
-    this.loaddata()
-  },
-  mounted() {},
-  methods: {
-    //返回按钮
-    revert() {
-      this.$router.go(-1)
-    },
-    returnsales() {
-      this.dataList = {}
-      // this.selectedOptions = ''
-      this.$router.push({ path: 'procurementPlanList' })
-    },
-    // 获取当前年月日
-    getdate() {
-      var date = new Date()
-      var year = date.getFullYear() //获取完整的年份(4位)
-      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
-      var datetime = date.getDate() //获取当前日(1-31)
-      if (mouth < 10) {
-        mouth = '0' + mouth
-      }
-      if (datetime < 10) {
-        datetime = '0' + datetime
-      }
-      return year +'' + mouth + datetime
-    },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function() {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
-
-      return arr.join('')
-    },
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.deptBudgetList.staffList = val
-      if (val) {
-        //val存在
-        this.options = this.staffList.filter(item => {
-          if (
-            !!~item.staffName.indexOf(val) ||
-            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
-          }
+      // 随机验证码
+      verifyinit() {
+        var arr = []
+        for (var i = 48; i < 123; i++) {
+          if (i > 57 && i < 65) continue
+          if (i > 90) continue
+          arr.push(String.fromCharCode(i))
+        }
+        arr.sort(function() {
+          return Math.random() - 0.5
         })
-      } else {
-        //val为空时,还原数组
-        this.options = this.staffList
-      }
-    },
+        arr.length = 4
 
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
+        return arr.join('')
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter(item => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
         }
-      }
-    },
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList.agentKey = this.staffList[i].staffId
+      },
+
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
         }
-      }
-    },
-    selectstaff1(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList1.agentKey = this.staffList[i].staffId
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectgrain(e) {
-      for (var i = 0; i < this.grainList.length; i++) {
-        if (this.grainList[i].constValue == e) {
-          this.dataList.grainKey = this.grainList[i].constKey
+      },
+      selectstaff1(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList1.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectpackingType(e) {
-      for (var i = 0; i < this.packingTypeList.length; i++) {
-        if (this.packingTypeList[i].constValue == e) {
-          this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+      },
+      selectgrain(e) {
+        for (var i = 0; i < this.grainList.length; i++) {
+          if (this.grainList[i].constValue == e) {
+            this.dataList.grainKey = this.grainList[i].constKey
+          }
         }
-      }
-    },
-    selectfreightPayer(e) {
-      for (var i = 0; i < this.freightPayerList.length; i++) {
-        if (this.freightPayerList[i].constValue == e) {
-          this.dataList.freightPayerKey = this.freightPayerList[i].constKey
+      },
+      selectpackingType(e) {
+        for (var i = 0; i < this.packingTypeList.length; i++) {
+          if (this.packingTypeList[i].constValue == e) {
+            this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+          }
         }
-      }
-    },
-    selectgrade(e) {
-      for (var i = 0; i < this.gradeList.length; i++) {
-        if (this.gradeList[i].constValue == e) {
-          this.dataList.gradeKey = this.gradeList[i].constKey
+      },
+      selectfreightPayer(e) {
+        for (var i = 0; i < this.freightPayerList.length; i++) {
+          if (this.freightPayerList[i].constValue == e) {
+            this.dataList.freightPayerKey = this.freightPayerList[i].constKey
+          }
         }
-      }
-    },
-    selectprocurementPlanType(e) {
-      if(e=='现货'){
-        this.dataList.priceType='定价采购'
-        this.dataList.priceTypeKey=2
-      }else{
-        this.dataList.priceType='期货盘面价+基差'
-        this.dataList.priceTypeKey=1
-      }
-      for (var i = 0; i < this.procurementPlanTypeList.length; i++) {
-        if (this.procurementPlanTypeList[i].constValue == e) {
-          this.dataList.procurementPlanTypekey = this.procurementPlanTypeList[
-            i
-          ].constKey
+      },
+      selectgrade(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.dataList.gradeKey = this.gradeList[i].constKey
+          }
         }
-      }
-    },
-    handleChange(value) {
-      this.selectedOptions = value
-      this.dataList.receivePrivate = CodeToText[value[0]]
-      this.dataList.receiveCity = CodeToText[value[1]]
-      this.dataList.receiveArea = CodeToText[value[2]]
-    },
-    handleChange1(value) {
-      this.selectedOptions1 = value
-      this.dataList.outputPrivate = CodeToText[value[0]]
-      // this.dataList.outputCity = CodeToText[value[1]]
-    },
-    sendWarehousechange(e) {
-          console.log('sendWarehousechange',e)
-
-      for (let i = 0; i < this.warehouseList.length; i++) {
-        if (this.warehouseList[i].warehouseName == e) {
-          var tmp = []
-          tmp[0] = TextToCode[this.warehouseList[i].warehousePrivate].code
-          tmp[1] =
-            TextToCode[this.warehouseList[i].warehousePrivate][
-              this.warehouseList[i].warehouseCity
-            ].code
-          tmp[2] =
-            TextToCode[this.warehouseList[i].warehousePrivate][
-              this.warehouseList[i].warehouseCity
-            ][this.warehouseList[i].warehouseArea].code
-          this.selectedOptions = tmp
-          console.log('sendWarehousechange',this.warehouseList[i])
-          this.dataList.receiveWarehouseId = this.warehouseList[i].id
+      },
+      selectprocurementPlanType(e) {
+        if (e == '现货') {
+          this.dataList.priceType = '定价采购'
+          this.dataList.priceTypeKey = 2
+        } else {
+          this.dataList.priceType = '期货盘面价+基差'
+          this.dataList.priceTypeKey = 1
         }
-      }
-    },
-    //关闭
-    close() {
-      this.$router.push({ path: 'procurementPlanList' })
-    },
+        for (var i = 0; i < this.procurementPlanTypeList.length; i++) {
+          if (this.procurementPlanTypeList[i].constValue == e) {
+            this.dataList.procurementPlanTypekey = this.procurementPlanTypeList[
+              i
+            ].constKey
+          }
+        }
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+        this.dataList.receivePrivate = CodeToText[value[0]]
+        this.dataList.receiveCity = CodeToText[value[1]]
+        this.dataList.receiveArea = CodeToText[value[2]]
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+        this.dataList.outputPrivate = CodeToText[value[0]]
+        // this.dataList.outputCity = CodeToText[value[1]]
+      },
+      sendWarehousechange(e) {
+        console.log('sendWarehousechange', e)
 
-    loaddata() {
-      getwarehousename({
-        compId: this.compId,
-        warehouseType: 1,
-      })
-        .toPromise()
-        .then(response => {
-          console.log(response)
-          this.warehouseList = response
-        })
-      // 货名
-      packList({ constId: 'CON2' })
-        .toPromise()
-        .then(response => {
-          this.goodnameList = response
-        })
-      // 品级
-      packList({ constId: 'CON3' })
-        .toPromise()
-        .then(response => {
-          this.gradeList = response
-        })
-      //粒形
-      packList({ constId: 'PRO4' })
-        .toPromise()
-        .then(response => {
-          this.grainList = response
-        })
-      //类型
-      packList({ constId: 'PRO1' })
-        .toPromise()
-        .then(response => {
-          this.procurementPlanTypeList = response
-        })
-      //包装方式
-      packList({ constId: 'PRO2' })
-        .toPromise()
-        .then(response => {
-          this.packingTypeList = response
-        })
-      //运费承担方
-      packList({ constId: 'PRO3' })
-        .toPromise()
-        .then(response => {
-          this.freightPayerList = response
-        })
-    },
-    MathRand()
-{
-var Num='';
-for(var i=0;i<4;i++)
-{
-Num+=Math.floor(Math.random()*10);
-}
-return Num
-},
-    submit() {
-      if (!this.dataList.title) {
-        this.$message({
-          message: '标题不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.title.length>16) {
-        this.$message({
-          message: '标题输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (!this.dataList.plannedPurchaseVolume) {
-        this.$message({
-          message: '计划采购量不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.plannedPurchaseVolume>10000000||this.dataList.plannedPurchaseVolume<1) {
-        this.$message({
-          message: '计划采购量输入错误!',
-          type: 'warning'
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseList[i].warehouseName == e) {
+            var tmp = []
+            tmp[0] = TextToCode[this.warehouseList[i].warehousePrivate].code
+            tmp[1] =
+              TextToCode[this.warehouseList[i].warehousePrivate][
+                this.warehouseList[i].warehouseCity
+              ].code
+            tmp[2] =
+              TextToCode[this.warehouseList[i].warehousePrivate][
+                this.warehouseList[i].warehouseCity
+              ][this.warehouseList[i].warehouseArea].code
+            this.selectedOptions = tmp
+            console.log('sendWarehousechange', this.warehouseList[i])
+            this.dataList.receiveWarehouseId = this.warehouseList[i].id
+          }
+        }
+      },
+      //关闭
+      close() {
+        this.$router.push({
+          path: 'procurementPlanList'
         })
-        return
-      }
-      if (this.dataList.plannedPurchaseVolume.indexOf('.')!=-1) {
-        if(this.dataList.plannedPurchaseVolume.split('.')[1].length>2){
+      },
+
+      loaddata() {
+        getwarehousename({
+            compId: this.compId,
+            warehouseType: 1,
+          })
+          .toPromise()
+          .then(response => {
+            console.log(response)
+            this.warehouseList = response
+          })
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then(response => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then(response => {
+            this.gradeList = response
+          })
+        //粒形
+        packList({
+            constId: 'PRO4'
+          })
+          .toPromise()
+          .then(response => {
+            this.grainList = response
+          })
+        //类型
+        packList({
+            constId: 'PRO1'
+          })
+          .toPromise()
+          .then(response => {
+            this.procurementPlanTypeList = response
+          })
+        //包装方式
+        packList({
+            constId: 'PRO2'
+          })
+          .toPromise()
+          .then(response => {
+            this.packingTypeList = response
+          })
+        //运费承担方
+        packList({
+            constId: 'PRO3'
+          })
+          .toPromise()
+          .then(response => {
+            this.freightPayerList = response
+          })
+      },
+      MathRand() {
+        var Num = '';
+        for (var i = 0; i < 4; i++) {
+          Num += Math.floor(Math.random() * 10);
+        }
+        return Num
+      },
+      submit() {
+        if (!this.dataList.title) {
+          this.$message({
+            message: '标题不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.title.length > 16) {
+          this.$message({
+            message: '标题输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.dataList.plannedPurchaseVolume) {
+          this.$message({
+            message: '计划采购量不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.plannedPurchaseVolume > 10000000 || this.dataList.plannedPurchaseVolume < 1) {
           this.$message({
             message: '计划采购量输入错误!',
             type: 'warning'
           })
           return
         }
-      }
-      if (!this.dataList.minimumVolume) {
-        this.$message({
-          message: '最小成交量不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.minimumVolume>10000000||this.dataList.minimumVolume<1) {
-        this.$message({
-          message: '最小成交量输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.minimumVolume.indexOf('.') != -1 &&this.dataList.minimumVolume.split('.')[1].length >2) {
-        this.$message({
-          message: '最小成交量输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.basisPrice&&String(this.dataList.basisPrice).indexOf('.') != -1 &&
+        if (this.dataList.plannedPurchaseVolume.indexOf('.') != -1) {
+          if (this.dataList.plannedPurchaseVolume.split('.')[1].length > 2) {
+            this.$message({
+              message: '计划采购量输入错误!',
+              type: 'warning'
+            })
+            return
+          }
+        }
+        if (!this.dataList.minimumVolume) {
+          this.$message({
+            message: '最小成交量不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.minimumVolume > 10000000 || this.dataList.minimumVolume < 1) {
+          this.$message({
+            message: '最小成交量输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.minimumVolume.indexOf('.') != -1 && this.dataList.minimumVolume.split('.')[1].length > 2) {
+          this.$message({
+            message: '最小成交量输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.basisPrice && String(this.dataList.basisPrice).indexOf('.') != -1 &&
           String(dataList.basisPrice).length -
-            (String(this.dataList.basisPrice).indexOf('.') + 1) >
-            2||this.dataList.basisPrice>10000||this.dataList.basisPrice<-10000){
-        this.$message({
-          message: '基差输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.procurementPrice > 100000 ||
-        this.dataList.procurementPrice < 0 ||
-        (String(this.dataList.procurementPrice).indexOf(
-          '.'
-        ) != -1 &&
-          String(this.dataList.procurementPrice).length -
-            (String(this.dataList.procurementPrice).indexOf(
+          (String(this.dataList.basisPrice).indexOf('.') + 1) >
+          2 || this.dataList.basisPrice > 10000 || this.dataList.basisPrice < -10000) {
+          this.$message({
+            message: '基差输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.procurementPrice > 100000 ||
+          this.dataList.procurementPrice < 0 ||
+          (String(this.dataList.procurementPrice).indexOf(
               '.'
-            ) +
+            ) != -1 &&
+            String(this.dataList.procurementPrice).length -
+            (String(this.dataList.procurementPrice).indexOf(
+                '.'
+              ) +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '采购价格输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.receiveWarehouse) {
-        this.$message({
-          message: '请选择收货库',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.buyer) {
-        this.$message({
-          message: '买方不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.buyer.length>25||this.dataList.buyer.length<1) {
-        this.$message({
-          message: '买方输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (!this.dataList.buyerPhone) {
-        this.$message({
-          message: '请输入买方电话!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.buyerPhone.length > 15 || this.dataList.buyerPhone.length < 6) {
-        this.$message({
-          message: '买方电话输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (!this.dataList.waterContent) {
-        this.$message({
-          message: '水分不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.waterContent>40||this.dataList.waterContent<0) {
-        this.$message({
-          message: '水分输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (String(this.dataList.waterContent).indexOf('.') != -1 &&
+        ) {
+          this.$message({
+            message: '采购价格输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.receiveWarehouse) {
+          this.$message({
+            message: '请选择收货库',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.buyer) {
+          this.$message({
+            message: '买方不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.buyer.length > 25 || this.dataList.buyer.length < 1) {
+          this.$message({
+            message: '买方输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.dataList.buyerPhone) {
+          this.$message({
+            message: '请输入买方电话!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.buyerPhone.length > 15 || this.dataList.buyerPhone.length < 6) {
+          this.$message({
+            message: '买方电话输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.dataList.waterContent) {
+          this.$message({
+            message: '水分不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.waterContent > 40 || this.dataList.waterContent < 0) {
+          this.$message({
+            message: '水分输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (String(this.dataList.waterContent).indexOf('.') != -1 &&
           String(this.dataList.waterContent).length -
-            (String(this.dataList.waterContent).indexOf('.') + 1) >
-            2) {
-        this.$message({
-          message: '水分输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (!this.dataList.bulkDensity) {
-        this.$message({
-          message: '容重不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.bulkDensity&&String(this.dataList.bulkDensity).indexOf('.') != -1 &&
+          (String(this.dataList.waterContent).indexOf('.') + 1) >
+          2) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.dataList.bulkDensity) {
+          this.$message({
+            message: '容重不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.bulkDensity && String(this.dataList.bulkDensity).indexOf('.') != -1 &&
           String(this.dataList.bulkDensity).length -
-            (String(this.dataList.bulkDensity).indexOf('.') + 1) >
-            2||this.dataList.bulkDensity>1000||this.dataList.bulkDensity<0){
-        this.$message({
-          message: '容重输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.protein&&String(this.dataList.protein).indexOf('.') != -1 &&
+          (String(this.dataList.bulkDensity).indexOf('.') + 1) >
+          2 || this.dataList.bulkDensity > 1000 || this.dataList.bulkDensity < 0) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.protein && String(this.dataList.protein).indexOf('.') != -1 &&
           String(this.dataList.protein).length -
-            (String(this.dataList.protein).indexOf('.') + 1) >
-            2||this.dataList.protein&&this.dataList.protein>80||this.dataList.protein&&this.dataList.protein<0){
-        this.$message({
-          message: '蛋白占比输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.impurity&&String(this.dataList.impurity).indexOf('.') != -1 &&
+          (String(this.dataList.protein).indexOf('.') + 1) >
+          2 || this.dataList.protein && this.dataList.protein > 80 || this.dataList.protein && this.dataList.protein < 0
+          ) {
+          this.$message({
+            message: '蛋白占比输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.impurity && String(this.dataList.impurity).indexOf('.') != -1 &&
           String(this.dataList.impurity).length -
-            (String(this.dataList.impurity).indexOf('.') + 1) >2
-            ||this.dataList.impurity&&this.dataList.impurity>40||this.dataList.impurity&&this.dataList.impurity<0) {
-        this.$message({
-          message: '杂质输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.mildewGrain&&String(this.dataList.mildewGrain).indexOf('.') != -1 &&
+          (String(this.dataList.impurity).indexOf('.') + 1) > 2 ||
+          this.dataList.impurity && this.dataList.impurity > 40 || this.dataList.impurity && this.dataList.impurity < 0
+          ) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.mildewGrain && String(this.dataList.mildewGrain).indexOf('.') != -1 &&
           String(this.dataList.mildewGrain).length -
-            (String(this.dataList.mildewGrain).indexOf('.') + 1) >
-            2||this.dataList.mildewGrain&&this.dataList.mildewGrain>40||this.dataList.mildewGrain&&this.dataList.mildewGrain<0) {
-        this.$message({
-          message: '霉变粒输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.jiaorenli&&String(this.dataList.jiaorenli).indexOf('.') != -1 &&
+          (String(this.dataList.mildewGrain).indexOf('.') + 1) >
+          2 || this.dataList.mildewGrain && this.dataList.mildewGrain > 40 || this.dataList.mildewGrain && this.dataList
+          .mildewGrain < 0) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.jiaorenli && String(this.dataList.jiaorenli).indexOf('.') != -1 &&
           String(this.dataList.jiaorenli).length -
-            (String(this.dataList.jiaorenli).indexOf('.') + 1) >
-            2||this.dataList.jiaorenli&&this.dataList.jiaorenli>40||this.dataList.jiaorenli&&this.dataList.jiaorenli<0) {
-        this.$message({
-          message: '热损伤输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.imperfectGrain&&String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
+          (String(this.dataList.jiaorenli).indexOf('.') + 1) >
+          2 || this.dataList.jiaorenli && this.dataList.jiaorenli > 40 || this.dataList.jiaorenli && this.dataList
+          .jiaorenli < 0) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.imperfectGrain && String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
           String(this.dataList.imperfectGrain).length -
-            (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
-            2||this.dataList.imperfectGrain&&this.dataList.imperfectGrain>40||this.dataList.imperfectGrain&&this.dataList.imperfectGrain<0) {
-        this.$message({
-          message: '不完善粒输入错误',
-          type: 'warning'
-        })
-        return
-      }
+          (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
+          2 || this.dataList.imperfectGrain && this.dataList.imperfectGrain > 40 || this.dataList.imperfectGrain && this
+          .dataList.imperfectGrain < 0) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning'
+          })
+          return
+        }
 
-      this.dataList.id = this.$route.query.id
-      this.$confirm(`提交后该采购信息将发布到交易平台,是否确定提交?`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning'
-      })
-        .then(() => {
-          this.$refs.dataList.validate(valid => {
-            if (valid) {
-              console.log(this.dataList)
-              this.dataList.procurementPlanNo='CGJH'+this.getdate()+this.MathRand()
-              this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
-              this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
-              this.dataList.receivePrivate =  CodeToText[this.selectedOptions[0]]
-              this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
-              this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
-              this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
-               this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
-              // this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
-              // if(this.dataList.procurementPlanType=='期货'){
-              //   this.dataList.basisPrice='-'+Math.abs(this.dataList.basisPrice)
-              // }
-              this.dataList.compId = this.compId
-              this.dataList.unitPrice=this.dataList.procurementPrice
-              
-              // this.dataList.contractType = 1
-              // this.dataList.goodsType = 1
-              this.dataList.pcFlag = 1
-              this.dataList.compId = localStorage.getItem('ws-pf_compId')
-              console.log(this.dataList,'查看添加对象')
-              procurementAdd(this.dataList)
-                .toPromise()
-                .then(response => {
-                  this.$message.success('添加成功')
-                  ;(this.outputYear = ''),
-                    this.$router.push({ path: 'procurementPlanList' })
-                })
-            } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
-            }
+        this.dataList.id = this.$route.query.id
+        this.$confirm(`提交后该采购信息将发布到交易平台,是否确定提交?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning'
           })
-        })
-        .catch(() => {
-          return false
-        })
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList.goodsNameKey = this.goodnameList[i].constKey
+          .then(() => {
+            this.$refs.dataList.validate(valid => {
+              if (valid) {
+                console.log(this.dataList)
+                this.dataList.procurementPlanNo = 'CGJH' + this.getdate() + this.MathRand()
+                this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
+                this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
+                this.dataList.receivePrivate = CodeToText[this.selectedOptions[0]]
+                this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
+                this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
+                this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
+                this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
+                // this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
+                // if(this.dataList.procurementPlanType=='期货'){
+                //   this.dataList.basisPrice='-'+Math.abs(this.dataList.basisPrice)
+                // }
+                this.dataList.compId = this.compId
+                this.dataList.unitPrice = this.dataList.procurementPrice
+
+                // this.dataList.contractType = 1
+                // this.dataList.goodsType = 1
+                this.dataList.pcFlag = 1
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                console.log(this.dataList, '查看添加对象')
+                procurementAdd(this.dataList)
+                  .toPromise()
+                  .then(response => {
+                    this.$message.success('添加成功');
+                    (this.outputYear = ''),
+                    this.$router.push({
+                      path: 'procurementPlanList'
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[i].constKey
+          }
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    selectpackingMethod1(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+      },
+      selectpackingMethod1(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.storageType.length; i++) {
-        if (this.storageType[i].constValue == e) {
-          this.dataList.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.storageType.length; i++) {
+          if (this.storageType[i].constValue == e) {
+            this.dataList.inOutTypeKey = this.storageType[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType1(e) {
-      for (var i = 0; i < this.storageType1.length; i++) {
-        if (this.storageType1[i].constValue == e) {
-          this.dataList1.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectstorageType1(e) {
+        for (var i = 0; i < this.storageType1.length; i++) {
+          if (this.storageType1[i].constValue == e) {
+            this.dataList1.inOutTypeKey = this.storageType[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    tasktypechange() {
-      this.tasknumber()
-    },
-    GetRandomNum(Min, Max) {
-      var Range = Max - Min
-      var Rand = Math.random()
-      return Min + Math.round(Rand * Range)
-    },
-    // deletecontract(){},
-    //删除
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {}
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      tasktypechange() {
+        this.tasknumber()
+      },
+      GetRandomNum(Min, Max) {
+        var Range = Max - Min
+        var Rand = Math.random()
+        return Min + Math.round(Rand * Range)
+      },
+      // deletecontract(){},
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {}
+    }
   }
-}
 </script>
 <style lang="scss" scoped>
-/deep/.basicInformation {
-  .el-info-table {
-    border: none;
+  /deep/.basicInformation {
+    .el-info-table {
+      border: none;
+      position: relative;
+    }
+
+    .el-form-item {
+      width: 33.3333%;
+      border: none;
+      margin: 0;
+
+      .el-form-item__label {
+        text-align: left;
+        font-size: 14px;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #8890b1;
+      }
+
+      .el-form-item__content {
+        padding-left: 0px;
+        padding-right: 10px;
+        // background: #fff;
+        white-space: nowrap;
+        height: 40px;
+        display: flex;
+        -webkit-box-align: center;
+        align-items: center;
+        text-align: left;
+        overflow: hidden;
+      }
+    }
+  }
+
+  /deep/.el-radio {
+    color: #606266;
+    font-weight: 500;
+    line-height: 1;
+    cursor: pointer;
+    white-space: nowrap;
+    outline: 0;
+    margin-right: 30px;
+    margin-top: 15px;
+  }
+
+  /deep/.el-radio__inner {
+    border: 1px solid #dcdfe6;
+    border-radius: 100%;
+    width: 14px;
+    height: 14px;
+    background-color: #fff;
+    cursor: pointer;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    margin-left: 100px;
+  }
+
+  /deep/.el-radio__input {
+    white-space: nowrap;
+    cursor: pointer;
+    outline: 0;
+    line-height: 1;
+    vertical-align: middle;
+    margin-top: -1px;
+  }
+
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 15%;
+    display: flex;
+    flex-wrap: wrap;
+    margin-left: -50px;
+    margin-top: 15px;
+    width: 110%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    margin: 0 auto;
+    margin-right: 180px;
+  }
+
+  /deep/.el-form-item__label {
+    width: 160px;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  /deep/.el-form-item--small .el-form-item__label,
+  .el-form-item--small .el-form-item__content {
+    text-align: left;
+  }
+
+  /deep/.el-input--small {
+    font-size: 13px;
+    position: relative;
+    display: inline-block;
+  }
+
+  .center1 .small-title {
+    margin-left: 323px;
+  }
+
+  .center1 {
+    width: 90%;
+    margin: 0 auto;
+    margin-left: 10px;
+    margin-top: 25px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+  }
+
+  /deep/.el-select {
+    display: inline-block;
     position: relative;
+    width: 100%;
+  }
+
+  .annu {
+    height: 81px;
+    background: #ffffff;
+    border-radius: 4px;
   }
-  .el-form-item {
-    width: 33.3333%;
+
+  .basicInformation .el-form-item {
+    width: 50.3333%;
     border: none;
     margin: 0;
-    .el-form-item__label {
-      text-align: left;
-      font-size: 14px;
-      font-family: PingFangSC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #8890b1;
-    }
-    .el-form-item__content {
-      padding-left: 0px;
-      padding-right: 10px;
-      // background: #fff;
-      white-space: nowrap;
-      height: 40px;
-      display: flex;
-      -webkit-box-align: center;
-      align-items: center;
-      text-align: left;
-      overflow: hidden;
-    }
   }
-}
-/deep/.el-radio {
-  color: #606266;
-  font-weight: 500;
-  line-height: 1;
-  cursor: pointer;
-  white-space: nowrap;
-  outline: 0;
-  margin-right: 30px;
-  margin-top: 15px;
-}
-/deep/.el-radio__inner {
-  border: 1px solid #dcdfe6;
-  border-radius: 100%;
-  width: 14px;
-  height: 14px;
-  background-color: #fff;
-  cursor: pointer;
-  -webkit-box-sizing: border-box;
-  box-sizing: border-box;
-  margin-left: 100px;
-}
-/deep/.el-radio__input {
-  white-space: nowrap;
-  cursor: pointer;
-  outline: 0;
-  line-height: 1;
-  vertical-align: middle;
-  margin-top: -1px;
-}
-.title {
-  position: relative;
-  padding-left: 10px;
-}
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
-.el-form {
-  padding: 0 15%;
-  display: flex;
-  flex-wrap: wrap;
-  margin-left: -50px;
-  margin-top: 15px;
-  width: 110%;
-}
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-}
-.el-col {
-  background: #f6f7fc;
-}
-.bg-right {
-  text-align: right;
-  padding: 16px 20px;
-}
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  margin: 0 auto;
-  margin-right: 180px;
-}
-/deep/.el-form-item__label {
-  width: 160px;
-}
-.inspector {
-  width: 50%;
-}
-/deep/.el-form-item--small .el-form-item__label,
-.el-form-item--small .el-form-item__content {
-  text-align: left;
-}
-/deep/.el-input--small {
-  font-size: 13px;
-  position: relative;
-  display: inline-block;
-}
-.center1 .small-title {
-  margin-left: 323px;
-}
-.center1 {
-  width: 90%;
-  margin: 0 auto;
-  margin-left: 10px;
-  margin-top: 25px;
-}
-/deep/.el-input--small .el-input__inner {
-  height: 32px;
-  line-height: 32px;
-}
-/deep/.el-select {
-  display: inline-block;
-  position: relative;
-  width: 100%;
-}
-.annu {
-  height: 81px;
-  background: #ffffff;
-  border-radius: 4px;
-}
-.basicInformation .el-form-item {
-  width: 50.3333%;
-  border: none;
-  margin: 0;
-}
-.el-form {
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 16px;
-  margin-left: 130px;
-}
-.a {
-  margin-left: -32px;
-}
-.el-radio-group {
-  margin-left: 80px;
-}
-.ding {
-  height: 23px;
-  background: #e8ecf6;
-  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
-}
-.nav2 {
-  height: 25px;
-  background: #e8ecf6;
-  margin-top: 15px;
-}
-.ziti {
-  width: 72px;
-  height: 20px;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 20px;
-  margin-left: 314px;
-  /* margin-top: 112px; */
-}
-/deep/.ziti1 {
-  height: 40px;
-  font-size: 16px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #262626;
-  line-height: 20px;
-  margin-left: 381px;
-  margin-top: -21px;
-  width: 100px;
-}
-.winseaview-view {
-  padding: 0 0 20px;
-}
-.container {
-  overflow: scroll;
-  height: 93vh;
-}
-/deep/.basicInformation .el-form-item .el-form-item__content {
-  padding-left: 0px;
-  padding-right: 10px;
-  white-space: nowrap;
-  height: 40px;
-  display: -webkit-box;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-box-align: center;
-  -ms-flex-align: center;
-  align-items: center;
-  text-align: left;
-  overflow: hidden;
-  font-size: 12px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #232323;
-  line-height: 14px;
-}
-.nav {
-  width: 400px;
-  height: 20px;
-}
-/deep/.typeselect .el-input__inner {
-  color: #8890b1;
-}
-//*号
-.unchangeable {
-  position: absolute;
-  width: 9px;
-  height: 22px;
-  font-size: 16px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #ff2727;
-  line-height: 22px;
-  display: inline-block;
-  right: -1px;
-}
+
+  .el-form {
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+    margin-left: 130px;
+  }
+
+  .a {
+    margin-left: -32px;
+  }
+
+  .el-radio-group {
+    margin-left: 80px;
+  }
+
+  .ding {
+    height: 23px;
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .nav2 {
+    height: 25px;
+    background: #e8ecf6;
+    margin-top: 15px;
+  }
+
+  .ziti {
+    width: 72px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 20px;
+    margin-left: 314px;
+    /* margin-top: 112px; */
+  }
+
+  /deep/.ziti1 {
+    height: 40px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #262626;
+    line-height: 20px;
+    margin-left: 381px;
+    margin-top: -21px;
+    width: 100px;
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.basicInformation .el-form-item .el-form-item__content {
+    padding-left: 0px;
+    padding-right: 10px;
+    white-space: nowrap;
+    height: 40px;
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-align: center;
+    -ms-flex-align: center;
+    align-items: center;
+    text-align: left;
+    overflow: hidden;
+    font-size: 12px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #232323;
+    line-height: 14px;
+  }
+
+  .nav {
+    width: 400px;
+    height: 20px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
+
+  //*号
+  .unchangeable {
+    position: absolute;
+    width: 9px;
+    height: 22px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #ff2727;
+    line-height: 22px;
+    display: inline-block;
+    right: -1px;
+  }
 </style>

+ 940 - 1056
src/views/purchasingManagement/procurementPlanEdit.vue

@@ -6,19 +6,9 @@
         <h2 class="bg-left title">编辑采购计划</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
-        <el-button
-          class="bg-bottom"
-          type="primary"
-          size="small"
-          @click="returnsales()"
-        >
-          <img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt
-          />返回
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt />返回
         </el-button>
       </el-col>
     </el-row>
@@ -31,65 +21,29 @@
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <!-- 标题 -->
           <ws-form-item label="标题" span="1" prop="title">
-            <el-input
-              v-model="dataList.title"
-              maxlength="16"
-              class="typeselect"
-              placeholder="标题须包含企业简称,不超过16个字"
-            />
+            <el-input v-model="dataList.title" maxlength="16" class="typeselect" placeholder="标题须包含企业简称,不超过16个字" />
           </ws-form-item>
           <!-- 货名 -->
           <ws-form-item label="货名" span="1" prop="goodsName">
-            <ws-select
-              disabled
-              v-model="dataList.goodsName"
-              placeholder
-              class="typeselect"
-              @change="selectgoodsName"
-            >
-              <ws-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select disabled v-model="dataList.goodsName" placeholder class="typeselect" @change="selectgoodsName">
+              <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!-- 计划采购量(吨) -->
-          <ws-form-item
-            label="计划采购量(吨)"
-            span="1"
-            prop="plannedPurchaseVolume"
-          >
-            <el-input
-              v-model="dataList.plannedPurchaseVolume"
-              class="typeselect"
-              placeholder="请输入计划采购量"
-            />
+          <ws-form-item label="计划采购量(吨)" span="1" prop="plannedPurchaseVolume">
+            <el-input v-model="dataList.plannedPurchaseVolume" class="typeselect" placeholder="请输入计划采购量" />
           </ws-form-item>
           <!-- 最小成交量 -->
           <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
-            <el-input
-              v-model="dataList.minimumVolume"
-              placeholder="请输入最小成交量"
-              class="typeselect"
-            />
+            <el-input v-model="dataList.minimumVolume" placeholder="请输入最小成交量" class="typeselect" />
           </ws-form-item>
           <!--类型-->
           <ws-form-item label="类型" span="1" prop="procurementPlanType">
-            <ws-select
-              disabled
-              v-model="dataList.procurementPlanType"
-              placeholder
-              class="typeselect"
-              @change="selectprocurementPlanType"
-            >
-              <ws-option
-                v-for="item in procurementPlanTypeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select disabled v-model="dataList.procurementPlanType" placeholder class="typeselect"
+              @change="selectprocurementPlanType">
+              <ws-option v-for="item in procurementPlanTypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!-- 价格类型 -->
@@ -97,137 +51,59 @@
             <el-input v-model="dataList.priceType" class="typeselect" disabled />
           </ws-form-item>
           <!-- 基差 -->
-          <ws-form-item
-            v-show="dataList.procurementPlanType == '期货'"
-            label="基差(元/吨)"
-            span="1"
-            prop="basisPrice"
-          >
+          <ws-form-item v-show="dataList.procurementPlanType == '期货'" label="基差(元/吨)" span="1" prop="basisPrice">
             <el-input v-model="dataList.basisPrice" class="typeselect" placeholder="请输入基差" />
           </ws-form-item>
           <!--采购价格(元)-->
-          <ws-form-item
-            v-show="dataList.procurementPlanType == '现货'"
-            label="采购价格(元)"
-            span="1"
-            prop="procurementPrice"
-          >
-            <el-input
-              v-model="dataList.procurementPrice"
-              maxlength="120"
-              size="small"
-              class="typeselect"
-              placeholder="请输入采购价格"
-            />
+          <ws-form-item v-show="dataList.procurementPlanType == '现货'" label="采购价格(元)" span="1" prop="procurementPrice">
+            <el-input type='number' v-model="dataList.procurementPrice" maxlength="120" size="small" class="typeselect"
+              placeholder="请输入采购价格" />
           </ws-form-item>
           <!--收货库-->
           <ws-form-item label="收货库" span="1" prop="receiveWarehouse">
-            <el-select
-              disabled
-              v-model="dataList.receiveWarehouse"
-              maxlength="120"
-              class="typeselect"
-              size="small"
-              filterable clearable
-            />
-            <el-option
-              v-for="item in warehouseList1"
-              :key="item.constKey"
-              :label="item.warehouseName"
-              :value="item.warehouseName"
-            ></el-option>
+            <el-select disabled v-model="dataList.receiveWarehouse" maxlength="120" class="typeselect" size="small"
+              filterable clearable />
+            <el-option v-for="item in warehouseList1" :key="item.constKey" :label="item.warehouseName"
+              :value="item.warehouseName"></el-option>
           </ws-form-item>
           <!--收货库所在地区-->
           <ws-form-item label="收货库所在地区" span="1" prop="receiveArea">
-            <el-cascader
-              :options="options_"
-              v-model="selectedOptions"
-              clearable
-              size="large"
-              class="typeselect"
-              placeholder="请选择收货库所在地区"
-              @change="handleChange"
-              style="width: 200%"
-            />
+            <el-cascader :options="options_" v-model="selectedOptions" clearable size="large" class="typeselect"
+              placeholder="请选择收货库所在地区" @change="handleChange" style="width: 200%" />
           </ws-form-item>
           <!--运费承担方-->
           <ws-form-item label="运费承担方" span="1" prop="freightPayer">
-            <ws-select
-              v-model="dataList.freightPayer"
-              placeholder
-              class="typeselect"
-              @change="selectfreightPayer"
-            >
-              <ws-option
-                v-for="item in freightPayerList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.freightPayer" placeholder class="typeselect" @change="selectfreightPayer">
+              <ws-option v-for="item in freightPayerList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!--包装方式-->
           <ws-form-item label="包装方式" span="1" prop="packingType">
-            <ws-select
-              v-model="dataList.packingType"
-              placeholder
-              class="typeselect"
-              @change="selectpackingType"
-            >
-              <ws-option
-                v-for="item in packingTypeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.packingType" placeholder class="typeselect" @change="selectpackingType">
+              <ws-option v-for="item in packingTypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!--装袋备注=-->
-          <el-form-item
-            v-if="dataList.packingType != '散装'"
-            label="装袋备注"
-            span="1"
-            prop="baggingNotes"
-          >
-            <el-input
-              v-model="dataList.baggingNotes"
-              size="small"
-              class="typeselect"
-              placeholder="请输入装袋要求如:98斤,王中王彩袋"
-            />
+          <el-form-item v-if="dataList.packingType != '散装'" label="装袋备注" span="1" prop="baggingNotes">
+            <el-input v-model="dataList.baggingNotes" size="small" class="typeselect"
+              placeholder="请输入装袋要求如:98斤,王中王彩袋" />
           </el-form-item>
           <!-- 买方 -->
           <ws-form-item label="买方" span="1" prop="buyer">
-            <el-input
-              v-model="dataList.buyer"
-              maxlength="120"
-              placeholder="请输入买方名称"
-              class="typeselect"
-            />
+            <el-input v-model="dataList.buyer" maxlength="120" placeholder="请输入买方名称" class="typeselect" />
           </ws-form-item>
           <!-- 买方电话 -->
           <el-form-item label="买方电话" span="1" prop="buyerPhone">
-            <el-input
-              v-model="dataList.buyerPhone"
-              filterable
-              clearable
-              placeholder="请输入买方电话"
-              class="typeselect"
-            ></el-input>
+            <el-input v-model="dataList.buyerPhone" filterable clearable placeholder="请输入买方电话" class="typeselect">
+            </el-input>
           </el-form-item>
-          <el-form-item label="发票费(个人)" span="1" prop="invoiceFeePerson" >
-            <el-input
-              v-model="dataList.invoiceFeePerson"
-              placeholder="请输入发票费(个人)"
-              class="typeselect"
-            ></el-input>
+          <el-form-item label="发票费(个人)" span="1" prop="invoiceFeePerson">
+            <el-input v-model="dataList.invoiceFeePerson" placeholder="请输入发票费(个人)" class="typeselect"></el-input>
           </el-form-item>
-          <el-form-item label="发票费(企业)" span="1" prop="invoiceFeeCompany" >
-            <el-input
-              v-model="dataList.invoiceFeeCompany"
-              placeholder="请输入发票费(企业)"
-              class="typeselect"
-            ></el-input>
+          <el-form-item label="发票费(企业)" span="1" prop="invoiceFeeCompany">
+            <el-input v-model="dataList.invoiceFeeCompany" placeholder="请输入发票费(企业)" class="typeselect"></el-input>
           </el-form-item>
           <div class="small-title"></div>
         </el-form>
@@ -238,993 +114,1001 @@
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <el-form-item label="水分(%)<=" span="1" prop="waterContent">
-            <el-input
-              v-model="dataList.waterContent"
-              class="typeselect"
-              placeholder="请输入水分占比"
-            />
+            <el-input v-model="dataList.waterContent" class="typeselect" placeholder="请输入水分占比" />
           </el-form-item>
 
           <!-- 容重 -->
           <el-form-item label="容重(g/l)>=" span="1" prop="bulkDensity">
-            <el-input
-              v-model="dataList.bulkDensity"
-              class="typeselect"
-              placeholder="请输入容重"
-            />
+            <el-input v-model="dataList.bulkDensity" class="typeselect" placeholder="请输入容重" />
           </el-form-item>
           <!-- 热损伤 -->
           <el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
-            <el-input
-              v-model="dataList.jiaorenli"
-              class="typeselect"
-              placeholder="请输入热损伤占比"
-            />
+            <el-input v-model="dataList.jiaorenli" class="typeselect" placeholder="请输入热损伤占比" />
           </el-form-item>
           <!-- 杂质 -->
           <el-form-item label="杂质(%)<=" span="1" prop="impurity">
-            <el-input
-              v-model="dataList.impurity"
-              class="typeselect"
-              placeholder="请输入杂质占比"
-            />
+            <el-input v-model="dataList.impurity" class="typeselect" placeholder="请输入杂质占比" />
           </el-form-item>
           <!-- 霉变粒 -->
           <el-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
-            <el-input
-              v-model="dataList.mildewGrain"
-              placeholder="请输入霉变粒占比"
-              class="typeselect"
-            />
+            <el-input v-model="dataList.mildewGrain" placeholder="请输入霉变粒占比" class="typeselect" />
           </el-form-item>
           <!--不完善粒(%)<=-->
           <el-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
-            <el-input
-              v-model="dataList.imperfectGrain"
-              maxlength="120"
-              placeholder="请输入不完善粒占比"
-              class="typeselect"
-            />
+            <el-input v-model="dataList.imperfectGrain" maxlength="120" placeholder="请输入不完善粒占比" class="typeselect" />
           </el-form-item>
           <!-- 蛋白(%)>= -->
           <el-form-item label="蛋白(%)>=" span="1" prop="protein">
-            <el-input
-              v-model="dataList.protein"
-              class="typeselect"
-              placeholder="请输入蛋白占比"
-            />
+            <el-input v-model="dataList.protein" class="typeselect" placeholder="请输入蛋白占比" />
           </el-form-item>
           <!--粒型-->
           <ws-form-item label="粒型" span="1" prop="grain">
-            <ws-select
-              v-model="dataList.grain"
-              placeholder
-              class="typeselect"
-              @change="selectgrain"
-            >
-              <ws-option
-                v-for="item in grainList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.grain" placeholder class="typeselect" @change="selectgrain">
+              <ws-option v-for="item in grainList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!--品级-->
           <ws-form-item label="品级" span="1" prop="grade">
-            <ws-select
-              v-model="dataList.grade"
-              placeholder
-              class="typeselect"
-              @change="selectgrade"
-            >
-              <ws-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.grade" placeholder class="typeselect" @change="selectgrade">
+              <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!--产地-->
           <ws-form-item label="产地" span="1" prop="unitPrice">
-            <el-cascader
-              :options="options1_"
-              v-model="selectedOptions1"
-              clearable
-              class="typeselect"
-              placeholder="请选择产地"
-              @change="handleChange1"
-              style="width: 200%"
-            />
+            <el-cascader :options="options1_" v-model="selectedOptions1" clearable class="typeselect"
+              placeholder="请选择产地" @change="handleChange1" style="width: 200%" />
           </ws-form-item>
           <!--产出年份-->
           <el-form-item label="产出年份" span="1" prop="outputYear">
-            <el-date-picker
-              v-model="dataList.outputYear"
-              type="year"
-              align="right"
-              unlink-panels
-              class="typeselect"
-              value-format='yyyy'
-              range-separator="至"
-              placeholder="产出年份"
-            ></el-date-picker>
+            <el-date-picker v-model="dataList.outputYear" type="year" align="right" unlink-panels class="typeselect"
+              value-format='yyyy' range-separator="至" placeholder="产出年份"></el-date-picker>
           </el-form-item>
         </el-form>
       </div>
     </div>
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
-      <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
-        >提交</el-button
-      >
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
     </div>
   </div>
 </template>
 <script>
-import {
-  procurementLook,
-  procurementEdit,
-} from '@/model/purchasingManagement/index'
-import {
-  regionData,
-  CodeToText,
-  TextToCode,
-  provinceAndCityData,
-} from 'element-china-area-data'
-import { packList } from '@/model/contarct/index'
-import Pagination from '@/components/Pagination'
-import { mapActions, mapGetters, mapState } from 'vuex'
-import WsUpload from '@/components/WsUpload'
-// import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination,
-  },
-  watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
-    isShow(val) {
-      this.showType = val
+  import {
+    procurementLook,
+    procurementEdit,
+  } from '@/model/purchasingManagement/index'
+  import {
+    regionData,
+    CodeToText,
+    TextToCode,
+    provinceAndCityData,
+  } from 'element-china-area-data'
+  import {
+    packList
+  } from '@/model/contarct/index'
+  import Pagination from '@/components/Pagination'
+  import {
+    mapActions,
+    mapGetters,
+    mapState
+  } from 'vuex'
+  import WsUpload from '@/components/WsUpload'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
     },
-  },
-  computed: {
-    ...mapGetters(['dataList']),
-  },
-  data() {
-    return {
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-      // 是否显示
-      showType: true,
-      // 年
-      year: '',
-      options1_: provinceAndCityData,
-      options_: regionData,
-      packingTypeList: '',
-      procurementPlanTypeList: '',
-      freightPayerList: '',
-      searchTypeText: '',
-      selectedOptions: [],
-      selectedOptions1: [],
-      contractNoList: [],
-      deptBudgetTotal: 0,
-      readonly: true,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      warehouseList1: [],
-      searchKeyWord: '',
-      radio: '1',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      goodnameList: {},
-      grainList: [],
-      checked: true,
-      form: {},
-      pcFlag: 1,
-      staffList: [],
-      options: [],
-      storageType: [],
-      storageType1: [],
-      outContractNo: [],
-      // 提交类型
-      submitType: true,
-      status: [],
-      unitPricechange: [],
-      warehouseNameList: [],
-      warehouseNameList1: [],
-      waterContentchange: [],
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      warehouseInOutDetail: {},
-      onChange: {},
-      deptBudgetList1: [],
-      gradeList: [],
-      rules: {
-        netWeight: [
-          {
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    computed: {
+      ...mapGetters(['dataList']),
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        options1_: provinceAndCityData,
+        options_: regionData,
+        packingTypeList: '',
+        procurementPlanTypeList: '',
+        freightPayerList: '',
+        searchTypeText: '',
+        selectedOptions: [],
+        selectedOptions1: [],
+        contractNoList: [],
+        deptBudgetTotal: 0,
+        readonly: true,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        warehouseList1: [],
+        searchKeyWord: '',
+        radio: '1',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        grainList: [],
+        checked: true,
+        form: {},
+        pcFlag: 1,
+        staffList: [],
+        options: [],
+        storageType: [],
+        storageType1: [],
+        outContractNo: [],
+        // 提交类型
+        submitType: true,
+        status: [],
+        unitPricechange: [],
+        warehouseNameList: [],
+        warehouseNameList1: [],
+        waterContentchange: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        warehouseInOutDetail: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        rules: {
+          netWeight: [{
             required: true,
             type: 'number',
             message: '请输入活动名称',
             trigger: 'blur',
-          },
-        ],
-      },
+          }, ],
+        },
 
-      outputYear: [],
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      deptCircularPage: {},
-      packtypeList: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM'),
-      },
-      contractList: [],
-      inOutTaskNo: '',
-      dataList: { taskTypeKey: '1' },
-      dataList1: { taskTypeKey: '1' },
-      historyList: [],
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
+        outputYear: [],
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
         },
-      },
-      accessoryTFs: false,
-    }
-  },
-  activated() {
-    this.loaddata()
-    this.showType = this.isShow
-  },
-  mounted() {},
-  methods: {
-    //返回按钮
-    revert() {
-      this.$router.go(-1)
-    },
-    returnsales() {
-      this.dataList = {}
-      // this.selectedOptions = ''
-      this.$router.go(-1)
-    },
-    // 获取当前年月日
-    getdate() {
-      var date = new Date()
-      var year = date.getFullYear() //获取完整的年份(4位)
-      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
-      var datetime = date.getDate() //获取当前日(1-31)
-      if (mouth < 10) {
-        mouth = '0' + mouth
-      }
-      if (datetime < 10) {
-        datetime = '0' + datetime
+        contractList: [],
+        inOutTaskNo: '',
+        dataList: {
+          taskTypeKey: '1'
+        },
+        dataList1: {
+          taskTypeKey: '1'
+        },
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
       }
-      return year +'' + mouth + datetime
     },
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.deptBudgetList.staffList = val
-      if (val) {
-        //val存在
-        this.options = this.staffList.filter((item) => {
-          if (
-            !!~item.staffName.indexOf(val) ||
-            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
-          }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options = this.staffList
-      }
+    activated() {
+      this.loaddata()
+      this.showType = this.isShow
     },
+    mounted() {},
+    methods: {
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
+      },
+      returnsales() {
+        this.dataList = {}
+        // this.selectedOptions = ''
+        this.$router.go(-1)
+      },
+      // 获取当前年月日
+      getdate() {
+        var date = new Date()
+        var year = date.getFullYear() //获取完整的年份(4位)
+        var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+        var datetime = date.getDate() //获取当前日(1-31)
+        if (mouth < 10) {
+          mouth = '0' + mouth
+        }
+        if (datetime < 10) {
+          datetime = '0' + datetime
+        }
+        return year + '' + mouth + datetime
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
 
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
         }
-      }
-    },
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList.agentKey = this.staffList[i].staffId
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectstaff1(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList1.agentKey = this.staffList[i].staffId
+      },
+      selectstaff1(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList1.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectgrain(e) {
-      for (var i = 0; i < this.grainList.length; i++) {
-        if (this.grainList[i].constValue == e) {
-          this.dataList.grainKey = this.grainList[i].constKey
+      },
+      selectgrain(e) {
+        for (var i = 0; i < this.grainList.length; i++) {
+          if (this.grainList[i].constValue == e) {
+            this.dataList.grainKey = this.grainList[i].constKey
+          }
         }
-      }
-    },
-    selectpackingType(e) {
-      for (var i = 0; i < this.packingTypeList.length; i++) {
-        if (this.packingTypeList[i].constValue == e) {
-          this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+      },
+      selectpackingType(e) {
+        for (var i = 0; i < this.packingTypeList.length; i++) {
+          if (this.packingTypeList[i].constValue == e) {
+            this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+          }
         }
-      }
-    },
-    selectfreightPayer(e) {
-      for (var i = 0; i < this.freightPayerList.length; i++) {
-        if (this.freightPayerList[i].constValue == e) {
-          this.dataList.freightPayerKey = this.freightPayerList[i].constKey
+      },
+      selectfreightPayer(e) {
+        for (var i = 0; i < this.freightPayerList.length; i++) {
+          if (this.freightPayerList[i].constValue == e) {
+            this.dataList.freightPayerKey = this.freightPayerList[i].constKey
+          }
         }
-      }
-    },
-    selectgrade(e) {
-      for (var i = 0; i < this.gradeList.length; i++) {
-        if (this.gradeList[i].constValue == e) {
-          this.dataList.gradeKey = this.gradeList[i].constKey
+      },
+      selectgrade(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.dataList.gradeKey = this.gradeList[i].constKey
+          }
         }
-      }
-    },
-    selectprocurementPlanType(e) {
-      for (var i = 0; i < this.procurementPlanTypeList.length; i++) {
-        if (this.procurementPlanTypeList[i].constValue == e) {
-          this.dataList.procurementPlanTypekey =
-            this.procurementPlanTypeList[i].constKey
+      },
+      selectprocurementPlanType(e) {
+        for (var i = 0; i < this.procurementPlanTypeList.length; i++) {
+          if (this.procurementPlanTypeList[i].constValue == e) {
+            this.dataList.procurementPlanTypekey =
+              this.procurementPlanTypeList[i].constKey
+          }
         }
-      }
-    },
-    handleChange(value) {
-      this.selectedOptions = value
-      this.dataList.receivePrivate = CodeToText[value[0]]
-      this.dataList.receiveCity = CodeToText[value[1]]
-      this.dataList.receiveArea = CodeToText[value[2]]
-    },
-    handleChange1(value) {
-      this.selectedOptions1 = value
-      this.dataList.outputPrivate = CodeToText[value[0]]
-      // this.dataList.outputCity = CodeToText[value[1]]
-    },
-    submit() {
-      if (this.outputYear) {
-        this.startDate = this.dateFormat('YYYY-mm-dd', this.outputYear[0])
-        this.endDate = this.dateFormat('YYYY-mm-dd', this.outputYear[1])
-      } else {
-        this.startDate = ''
-        this.endDate = ''
-      }
-      // this.getList()
-    },
-    //关闭
-    close() {
-      this.$router.push({ path: 'procurementPlanList' })
-    },
-
-    loaddata() {
-      procurementLook({ id: this.$route.query.id })
-        .toPromise()
-        .then((response) => {
-          this.dataList = response
-          var tmp = []
-          tmp[0] = TextToCode[this.dataList.receivePrivate].code
-          tmp[1] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity].code
-          tmp[2] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity][this.dataList.receiveArea].code
-          this.selectedOptions = tmp
-          var tmp1 = []
-          tmp1[0] = TextToCode[this.dataList.outputPrivate].code
-          tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
-          // tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
-          this.selectedOptions1 = tmp1
-        })
-      // 货名
-      packList({ constId: 'CON2' })
-        .toPromise()
-        .then((response) => {
-          this.goodnameList = response
-        })
-      // 品级
-      packList({ constId: 'CON3' })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-      //粒形
-      packList({ constId: 'PRO4' })
-        .toPromise()
-        .then((response) => {
-          this.grainList = response
-        })
-      //类型
-      packList({ constId: 'PRO1' })
-        .toPromise()
-        .then((response) => {
-          this.procurementPlanTypeList = response
-        })
-      //包装方式
-      packList({ constId: 'PRO2' })
-        .toPromise()
-        .then((response) => {
-          this.packingTypeList = response
-        })
-      //运费承担方
-      packList({ constId: 'PRO3' })
-        .toPromise()
-        .then((response) => {
-          this.freightPayerList = response
-        })
-    },
-    submit() {
-      if (!this.dataList.title) {
-        this.$message({
-          message: '标题不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.title.length>16) {
-        this.$message({
-          message: '标题输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (!this.dataList.plannedPurchaseVolume) {
-        this.$message({
-          message: '计划采购量不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.plannedPurchaseVolume>10000000||this.dataList.plannedPurchaseVolume<1) {
-        this.$message({
-          message: '计划采购量输入错误!',
-          type: 'warning'
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+        this.dataList.receivePrivate = CodeToText[value[0]]
+        this.dataList.receiveCity = CodeToText[value[1]]
+        this.dataList.receiveArea = CodeToText[value[2]]
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+        this.dataList.outputPrivate = CodeToText[value[0]]
+        // this.dataList.outputCity = CodeToText[value[1]]
+      },
+      submit() {
+        if (this.outputYear) {
+          this.startDate = this.dateFormat('YYYY-mm-dd', this.outputYear[0])
+          this.endDate = this.dateFormat('YYYY-mm-dd', this.outputYear[1])
+        } else {
+          this.startDate = ''
+          this.endDate = ''
+        }
+        // this.getList()
+      },
+      //关闭
+      close() {
+        this.$router.push({
+          path: 'procurementPlanList'
         })
-        return
-      }
-      if (this.dataList.plannedPurchaseVolume.toString().indexOf('.')!=-1) {
-        if(this.dataList.plannedPurchaseVolume.toString().split('.')[1].length>2){
+      },
+
+      loaddata() {
+        procurementLook({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.dataList = response
+            var tmp = []
+            tmp[0] = TextToCode[this.dataList.receivePrivate].code
+            tmp[1] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity].code
+            tmp[2] = TextToCode[this.dataList.receivePrivate][this.dataList.receiveCity][this.dataList.receiveArea]
+              .code
+            this.selectedOptions = tmp
+            var tmp1 = []
+            tmp1[0] = TextToCode[this.dataList.outputPrivate].code
+            tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
+            // tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
+            this.selectedOptions1 = tmp1
+          })
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        //粒形
+        packList({
+            constId: 'PRO4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.grainList = response
+          })
+        //类型
+        packList({
+            constId: 'PRO1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.procurementPlanTypeList = response
+          })
+        //包装方式
+        packList({
+            constId: 'PRO2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packingTypeList = response
+          })
+        //运费承担方
+        packList({
+            constId: 'PRO3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.freightPayerList = response
+          })
+      },
+      submit() {
+        if (!this.dataList.title) {
+          this.$message({
+            message: '标题不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.title.length > 16) {
+          this.$message({
+            message: '标题输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.dataList.plannedPurchaseVolume) {
+          this.$message({
+            message: '计划采购量不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.plannedPurchaseVolume > 10000000 || this.dataList.plannedPurchaseVolume < 1) {
           this.$message({
             message: '计划采购量输入错误!',
             type: 'warning'
           })
           return
         }
-      }
-      if (!this.dataList.minimumVolume) {
-        this.$message({
-          message: '最小成交量不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.minimumVolume>10000000||this.dataList.minimumVolume<1) {
-        this.$message({
-          message: '最小成交量输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.minimumVolume.toString().indexOf('.') != -1 &&this.dataList.minimumVolume.toString().split('.')[1].length >2) {
-        this.$message({
-          message: '最小成交量输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.procurementPrice > 100000 ||
-        this.dataList.procurementPrice < 0 ||
-        (String(this.dataList.procurementPrice).indexOf(
-          '.'
-        ) != -1 &&
-          String(this.dataList.procurementPrice).length -
-            (String(this.dataList.procurementPrice).indexOf(
+        if (this.dataList.plannedPurchaseVolume.toString().indexOf('.') != -1) {
+          if (this.dataList.plannedPurchaseVolume.toString().split('.')[1].length > 2) {
+            this.$message({
+              message: '计划采购量输入错误!',
+              type: 'warning'
+            })
+            return
+          }
+        }
+        if (!this.dataList.minimumVolume) {
+          this.$message({
+            message: '最小成交量不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.minimumVolume > 10000000 || this.dataList.minimumVolume < 1) {
+          this.$message({
+            message: '最小成交量输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.minimumVolume.toString().indexOf('.') != -1 && this.dataList.minimumVolume.toString().split(
+            '.')[1].length > 2) {
+          this.$message({
+            message: '最小成交量输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.procurementPrice > 100000 ||
+          this.dataList.procurementPrice < 0 ||
+          (String(this.dataList.procurementPrice).indexOf(
               '.'
-            ) +
+            ) != -1 &&
+            String(this.dataList.procurementPrice).length -
+            (String(this.dataList.procurementPrice).indexOf(
+                '.'
+              ) +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '采购价格输入错误',
-          type: 'warning',
-        })
-        return
-      }
+        ) {
+          this.$message({
+            message: '采购价格输入错误',
+            type: 'warning',
+          })
+          return
+        }
         if (
-        this.dataList.basisPrice&&String(this.dataList.basisPrice).indexOf('.') != -1 &&
+          this.dataList.basisPrice && String(this.dataList.basisPrice).indexOf('.') != -1 &&
           String(dataList.basisPrice).length -
-            (String(this.dataList.basisPrice).indexOf('.') + 1) >
-            2||this.dataList.basisPrice>10000||this.dataList.basisPrice<-10000){
-        this.$message({
-          message: '基差输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (!this.dataList.buyer) {
-        this.$message({
-          message: '买方不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.buyer.length>25||this.dataList.buyer.length<1) {
-        this.$message({
-          message: '买方输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (!this.dataList.buyerPhone) {
-        this.$message({
-          message: '请输入买方电话!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.buyerPhone.length!=11) {
-        this.$message({
-          message: '买方电话输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (!this.dataList.waterContent) {
-        this.$message({
-          message: '水分不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (this.dataList.waterContent>40||this.dataList.waterContent<0) {
-        this.$message({
-          message: '水分输入错误!',
-          type: 'warning'
-        })
-        return
-      }
-      if (String(this.dataList.waterContent).indexOf('.') != -1 &&
+          (String(this.dataList.basisPrice).indexOf('.') + 1) >
+          2 || this.dataList.basisPrice > 10000 || this.dataList.basisPrice < -10000) {
+          this.$message({
+            message: '基差输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.dataList.buyer) {
+          this.$message({
+            message: '买方不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.buyer.length > 25 || this.dataList.buyer.length < 1) {
+          this.$message({
+            message: '买方输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.dataList.buyerPhone) {
+          this.$message({
+            message: '请输入买方电话!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.buyerPhone.length != 11) {
+          this.$message({
+            message: '买方电话输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.dataList.waterContent) {
+          this.$message({
+            message: '水分不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.dataList.waterContent > 40 || this.dataList.waterContent < 0) {
+          this.$message({
+            message: '水分输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        if (String(this.dataList.waterContent).indexOf('.') != -1 &&
           String(this.dataList.waterContent).length -
-            (String(this.dataList.waterContent).indexOf('.') + 1) >
-            2) {
-        this.$message({
-          message: '水分输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (!this.dataList.bulkDensity) {
-        this.$message({
-          message: '容重不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.bulkDensity&&String(this.dataList.bulkDensity).indexOf('.') != -1 &&
+          (String(this.dataList.waterContent).indexOf('.') + 1) >
+          2) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.dataList.bulkDensity) {
+          this.$message({
+            message: '容重不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.bulkDensity && String(this.dataList.bulkDensity).indexOf('.') != -1 &&
           String(this.dataList.bulkDensity).length -
-            (String(this.dataList.bulkDensity).indexOf('.') + 1) >
-            2||this.dataList.bulkDensity>1000||this.dataList.bulkDensity<0){
-        this.$message({
-          message: '容重输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.protein&&String(this.dataList.protein).indexOf('.') != -1 &&
+          (String(this.dataList.bulkDensity).indexOf('.') + 1) >
+          2 || this.dataList.bulkDensity > 1000 || this.dataList.bulkDensity < 0) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.protein && String(this.dataList.protein).indexOf('.') != -1 &&
           String(this.dataList.protein).length -
-            (String(this.dataList.protein).indexOf('.') + 1) >
-            2||this.dataList.protein&&this.dataList.protein>80||this.dataList.protein&&this.dataList.protein<0){
-        this.$message({
-          message: '蛋白占比输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.impurity&&String(this.dataList.impurity).indexOf('.') != -1 &&
+          (String(this.dataList.protein).indexOf('.') + 1) >
+          2 || this.dataList.protein && this.dataList.protein > 80 || this.dataList.protein && this.dataList.protein < 0
+          ) {
+          this.$message({
+            message: '蛋白占比输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.impurity && String(this.dataList.impurity).indexOf('.') != -1 &&
           String(this.dataList.impurity).length -
-            (String(this.dataList.impurity).indexOf('.') + 1) >2
-            ||this.dataList.impurity&&this.dataList.impurity>40||this.dataList.impurity&&this.dataList.impurity<0) {
-        this.$message({
-          message: '杂质输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.mildewGrain&&String(this.dataList.mildewGrain).indexOf('.') != -1 &&
+          (String(this.dataList.impurity).indexOf('.') + 1) > 2 ||
+          this.dataList.impurity && this.dataList.impurity > 40 || this.dataList.impurity && this.dataList.impurity < 0
+          ) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.mildewGrain && String(this.dataList.mildewGrain).indexOf('.') != -1 &&
           String(this.dataList.mildewGrain).length -
-            (String(this.dataList.mildewGrain).indexOf('.') + 1) >
-            2||this.dataList.mildewGrain&&this.dataList.mildewGrain>40||this.dataList.mildewGrain&&this.dataList.mildewGrain<0) {
-        this.$message({
-          message: '霉变粒输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.jiaorenli&&String(this.dataList.jiaorenli).indexOf('.') != -1 &&
+          (String(this.dataList.mildewGrain).indexOf('.') + 1) >
+          2 || this.dataList.mildewGrain && this.dataList.mildewGrain > 40 || this.dataList.mildewGrain && this.dataList
+          .mildewGrain < 0) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.jiaorenli && String(this.dataList.jiaorenli).indexOf('.') != -1 &&
           String(this.dataList.jiaorenli).length -
-            (String(this.dataList.jiaorenli).indexOf('.') + 1) >
-            2||this.dataList.jiaorenli&&this.dataList.jiaorenli>40||this.dataList.jiaorenli&&this.dataList.jiaorenli<0) {
-        this.$message({
-          message: '热损伤输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.imperfectGrain&&String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
+          (String(this.dataList.jiaorenli).indexOf('.') + 1) >
+          2 || this.dataList.jiaorenli && this.dataList.jiaorenli > 40 || this.dataList.jiaorenli && this.dataList
+          .jiaorenli < 0) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.imperfectGrain && String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
           String(this.dataList.imperfectGrain).length -
-            (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
-            2||this.dataList.imperfectGrain&&this.dataList.imperfectGrain>40||this.dataList.imperfectGrain&&this.dataList.imperfectGrain<0) {
-        this.$message({
-          message: '不完善粒输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      this.dataList.id = this.$route.query.id
-      this.$confirm(`提交后该采购信息将发布到交易平台,是否确定提交?`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.dataList.validate((valid) => {
-            if (valid) {
-              this.dataList.receivePrivate = CodeToText[this.selectedOptions[0]]
-              this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
-              this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
-              this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
-              this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
-              // this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
-              // if(this.dataList.procurementPlanType=='期货'){
-              //   this.dataList.basisPrice='-'+Math.abs(this.dataList.basisPrice)
-              // }
-              this.dataList.compId = this.compId
-              // this.dataList.pcFlag = 1
-              this.dataList.compId = localStorage.getItem('ws-pf_compId')
-              this.dataList.unitPrice=this.dataList.procurementPrice
-              procurementEdit(this.dataList)
-                .toPromise()
-                .then((response) => {
-                  this.$message.success('编辑成功')
+          (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
+          2 || this.dataList.imperfectGrain && this.dataList.imperfectGrain > 40 || this.dataList.imperfectGrain && this
+          .dataList.imperfectGrain < 0) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        this.dataList.id = this.$route.query.id
+        this.$confirm(`提交后该采购信息将发布到交易平台,是否确定提交?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.dataList.validate((valid) => {
+              if (valid) {
+                this.dataList.receivePrivate = CodeToText[this.selectedOptions[0]]
+                this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
+                this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
+                this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
+                this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
+                // this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
+                // if(this.dataList.procurementPlanType=='期货'){
+                //   this.dataList.basisPrice='-'+Math.abs(this.dataList.basisPrice)
+                // }
+                this.dataList.compId = this.compId
+                // this.dataList.pcFlag = 1
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                this.dataList.unitPrice = this.dataList.procurementPrice
+                procurementEdit(this.dataList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('编辑成功')
 
-                  this.$router.push({ path: 'procurementPlanList' })
-                })
-            } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
-            }
+                    this.$router.push({
+                      path: 'procurementPlanList'
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
           })
-        })
-        .catch(() => {
-          console.log(3523543534)
-          return false
-        })
-    },
+          .catch(() => {
+            console.log(3523543534)
+            return false
+          })
+      },
 
-    selectwarehouseName() {},
-    tarechange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    grossWeightchange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList.goodsNameKey = this.goodnameList[i].constKey
+      selectwarehouseName() {},
+      tarechange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+      },
+      grossWeightchange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectpackingMethod1(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.storageType.length; i++) {
-        if (this.storageType[i].constValue == e) {
-          this.dataList.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType1(e) {
-      for (var i = 0; i < this.storageType1.length; i++) {
-        if (this.storageType1[i].constValue == e) {
-          this.dataList1.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectpackingMethod1(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    tasktypechange() {
-      this.tasknumber()
-    },
-    GetRandomNum(Min, Max) {
-      var Range = Max - Min
-      var Rand = Math.random()
-      return Min + Math.round(Rand * Range)
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.storageType.length; i++) {
+          if (this.storageType[i].constValue == e) {
+            this.dataList.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      selectstorageType1(e) {
+        for (var i = 0; i < this.storageType1.length; i++) {
+          if (this.storageType1[i].constValue == e) {
+            this.dataList1.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      tasktypechange() {
+        this.tasknumber()
+      },
+      GetRandomNum(Min, Max) {
+        var Range = Max - Min
+        var Rand = Math.random()
+        return Min + Math.round(Rand * Range)
+      },
+      // deletecontract(){},
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {},
     },
-    // deletecontract(){},
-    //删除
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {},
-  },
-}
+  }
 </script>
 <style lang="scss" scoped>
-/deep/.basicInformation {
-  .el-info-table {
-    border: none;
+  /deep/.basicInformation {
+    .el-info-table {
+      border: none;
+      position: relative;
+    }
+
+    .el-form-item {
+      width: 33.3333%;
+      border: none;
+      margin: 0;
+
+      .el-form-item__label {
+        text-align: left;
+        font-size: 14px;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #8890b1;
+      }
+
+      .el-form-item__content {
+        padding-left: 0px;
+        padding-right: 10px;
+        // background: #fff;
+        white-space: nowrap;
+        height: 40px;
+        display: flex;
+        -webkit-box-align: center;
+        align-items: center;
+        text-align: left;
+        overflow: hidden;
+      }
+    }
+  }
+
+  /deep/.el-radio {
+    color: #606266;
+    font-weight: 500;
+    line-height: 1;
+    cursor: pointer;
+    white-space: nowrap;
+    outline: 0;
+    margin-right: 30px;
+    margin-top: 15px;
+  }
+
+  /deep/.el-radio__inner {
+    border: 1px solid #dcdfe6;
+    border-radius: 100%;
+    width: 14px;
+    height: 14px;
+    background-color: #fff;
+    cursor: pointer;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    margin-left: 100px;
+  }
+
+  /deep/.el-radio__input {
+    white-space: nowrap;
+    cursor: pointer;
+    outline: 0;
+    line-height: 1;
+    vertical-align: middle;
+    margin-top: -1px;
+  }
+
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 15%;
+    display: flex;
+    flex-wrap: wrap;
+    margin-left: -50px;
+    margin-top: 15px;
+    width: 110%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+    margin-right: 180px;
+  }
+
+  /deep/.el-form-item__label {
+    width: 160px;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  /deep/.el-form-item--small .el-form-item__label,
+  .el-form-item--small .el-form-item__content {
+    text-align: left;
+  }
+
+  /deep/.el-input--small {
+    font-size: 14px;
+    position: relative;
+    display: inline-block;
+  }
+
+  .center1 .small-title {
+    margin-left: 323px;
+  }
+
+  .center1 {
+    width: 90%;
+    margin: 0 auto;
+    margin-left: 10px;
+    margin-top: 25px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+  }
+
+  /deep/.el-select {
+    display: inline-block;
     position: relative;
+    width: 100%;
+  }
+
+  .annu {
+    height: 81px;
+    background: #ffffff;
+    border-radius: 4px;
   }
-  .el-form-item {
-    width: 33.3333%;
+
+  .basicInformation .el-form-item {
+    width: 50.3333%;
     border: none;
     margin: 0;
-    .el-form-item__label {
-      text-align: left;
-      font-size: 14px;
-      font-family: PingFangSC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #8890b1;
-    }
-    .el-form-item__content {
-      padding-left: 0px;
-      padding-right: 10px;
-      // background: #fff;
-      white-space: nowrap;
-      height: 40px;
-      display: flex;
-      -webkit-box-align: center;
-      align-items: center;
-      text-align: left;
-      overflow: hidden;
-    }
   }
-}
-/deep/.el-radio {
-  color: #606266;
-  font-weight: 500;
-  line-height: 1;
-  cursor: pointer;
-  white-space: nowrap;
-  outline: 0;
-  margin-right: 30px;
-  margin-top: 15px;
-}
-/deep/.el-radio__inner {
-  border: 1px solid #dcdfe6;
-  border-radius: 100%;
-  width: 14px;
-  height: 14px;
-  background-color: #fff;
-  cursor: pointer;
-  -webkit-box-sizing: border-box;
-  box-sizing: border-box;
-  margin-left: 100px;
-}
-/deep/.el-radio__input {
-  white-space: nowrap;
-  cursor: pointer;
-  outline: 0;
-  line-height: 1;
-  vertical-align: middle;
-  margin-top: -1px;
-}
-.title {
-  position: relative;
-  padding-left: 10px;
-}
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
-.el-form {
-  padding: 0 15%;
-  display: flex;
-  flex-wrap: wrap;
-  margin-left: -50px;
-  margin-top: 15px;
-  width: 110%;
-}
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-}
-.el-col {
-  background: #f6f7fc;
-}
-.bg-right {
-  text-align: right;
-  padding: 16px 20px;
-}
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  height: 2000px;
-  margin: 0 auto;
-  margin-right: 180px;
-}
-/deep/.el-form-item__label {
-  width: 160px;
-}
-.inspector {
-  width: 50%;
-}
-/deep/.el-form-item--small .el-form-item__label,
-.el-form-item--small .el-form-item__content {
-  text-align: left;
-}
-/deep/.el-input--small {
-  font-size: 14px;
-  position: relative;
-  display: inline-block;
-}
-.center1 .small-title {
-  margin-left: 323px;
-}
-.center1 {
-  width: 90%;
-  margin: 0 auto;
-  margin-left: 10px;
-  margin-top: 25px;
-}
-/deep/.el-input--small .el-input__inner {
-  height: 32px;
-  line-height: 32px;
-}
-/deep/.el-select {
-  display: inline-block;
-  position: relative;
-  width: 100%;
-}
-.annu {
-  height: 81px;
-  background: #ffffff;
-  border-radius: 4px;
-}
-.basicInformation .el-form-item {
-  width: 50.3333%;
-  border: none;
-  margin: 0;
-}
-.el-form {
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 16px;
-  margin-left: 130px;
-}
-.a {
-  margin-left: -32px;
-}
-.el-radio-group {
-  margin-left: 80px;
-}
-.ding {
-  height: 23px;
-  background: #e8ecf6;
-  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
-}
-.nav2 {
-  height: 25px;
-  background: #e8ecf6;
-  margin-top: 15px;
-}
-.ziti {
-  width: 72px;
-  height: 20px;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 20px;
-  margin-left: 314px;
-  /* margin-top: 112px; */
-}
-/deep/.ziti1 {
-  height: 40px;
-  font-size: 16px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #262626;
-  line-height: 20px;
-  margin-left: 381px;
-  margin-top: -21px;
-  width: 100px;
-}
-.winseaview-view {
-  padding: 0 0 20px;
-}
-.container {
-  overflow: scroll;
-  height: 93vh;
-}
-/deep/.basicInformation .el-form-item .el-form-item__content {
-  padding-left: 0px;
-  padding-right: 10px;
-  white-space: nowrap;
-  height: 40px;
-  display: -webkit-box;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-box-align: center;
-  -ms-flex-align: center;
-  align-items: center;
-  text-align: left;
-  overflow: hidden;
-  font-size: 12px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #232323;
-  line-height: 14px;
-}
-.nav {
-  width: 400px;
-  height: 20px;
-}
-.readonly :after {
-  content: '*';
-  color: #ff2727;
-  position: absolute;
-  right: 8px;
-  z-index: 10;
-  top: 21%;
-  font-size: 20px;
-}
-/deep/.typeselect .el-input__inner {
-  color: #8890b1;
-}
+
+  .el-form {
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+    margin-left: 130px;
+  }
+
+  .a {
+    margin-left: -32px;
+  }
+
+  .el-radio-group {
+    margin-left: 80px;
+  }
+
+  .ding {
+    height: 23px;
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .nav2 {
+    height: 25px;
+    background: #e8ecf6;
+    margin-top: 15px;
+  }
+
+  .ziti {
+    width: 72px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 20px;
+    margin-left: 314px;
+    /* margin-top: 112px; */
+  }
+
+  /deep/.ziti1 {
+    height: 40px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #262626;
+    line-height: 20px;
+    margin-left: 381px;
+    margin-top: -21px;
+    width: 100px;
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.basicInformation .el-form-item .el-form-item__content {
+    padding-left: 0px;
+    padding-right: 10px;
+    white-space: nowrap;
+    height: 40px;
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-align: center;
+    -ms-flex-align: center;
+    align-items: center;
+    text-align: left;
+    overflow: hidden;
+    font-size: 12px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #232323;
+    line-height: 14px;
+  }
+
+  .nav {
+    width: 400px;
+    height: 20px;
+  }
+
+  .readonly :after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
 </style>

+ 530 - 503
src/views/purchasingManagement/procurementPlanLook.vue

@@ -7,13 +7,8 @@
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
-          <img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt
-          />返回
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt />返回
         </el-button>
       </el-col>
     </el-row>
@@ -49,16 +44,11 @@
             <el-input v-model="dataList.priceType" placeholder class="typeselect" disabled></el-input>
           </el-form-item>
           <ws-form-item v-show="dataList.procurementPlanType=='期货'" label="基差(元/吨)" span="1" prop="basisPrice">
-            <el-input v-model="dataList.basisPrice" disabled   maxlength="120" size="small" />
+            <el-input v-model="dataList.basisPrice" disabled maxlength="120" size="small" />
           </ws-form-item>
           <!--采购价格(元)-->
-         <ws-form-item v-show="dataList.procurementPlanType=='现货'" label="采购价格(元)" span="1" prop="procurementPrice">
-            <el-input
-            disabled
-              v-model="dataList.procurementPrice"
-              maxlength="120"
-              size="small"
-            />
+          <ws-form-item v-show="dataList.procurementPlanType=='现货'" label="采购价格(元)" span="1" prop="procurementPrice">
+            <el-input type='number' disabled v-model="dataList.procurementPrice" maxlength="120" size="small" />
           </ws-form-item>
           <!--收货库-->
           <el-form-item label="收货库" span="1">
@@ -67,7 +57,7 @@
           <!--收货库所在地区-->
           <el-form-item label="收货库所在地区" span="1">
             <div class="forlist">
-           {{dataList.receivePrivate}}{{dataList.receiveCity}}{{dataList.receiveArea}}
+              {{dataList.receivePrivate}}{{dataList.receiveCity}}{{dataList.receiveArea}}
             </div>
           </el-form-item>
           <!--运费承担方-->
@@ -136,20 +126,13 @@
           <!--产地-->
           <el-form-item label="产地" span="1">
             <div class="forlist">
-            {{dataList.outputPrivate}}{{dataList.outputCity}}
+              {{dataList.outputPrivate}}{{dataList.outputCity}}
             </div>
           </el-form-item>
           <!--产出年份-->
           <el-form-item label="产出年份" span="1">
-             <el-date-picker
-              disabled
-              v-model="dataList.outputYear"
-              type="year"
-              align="right"
-              unlink-panels
-              range-separator="至"
-              placeholder="产出年份"
-            ></el-date-picker>
+            <el-date-picker disabled v-model="dataList.outputYear" type="year" align="right" unlink-panels
+              range-separator="至" placeholder="产出年份"></el-date-picker>
           </el-form-item>
         </el-form>
       </div>
@@ -161,508 +144,552 @@
   </div>
 </template>
 <script>
-import {
-
-  procurementLook,
-} from '@/model/purchasingManagement/index'
-import Pagination from '@/components/Pagination'
-import WsUpload from '@/components/WsUpload'
-// import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination
-  },
-  watch: {
-    isShow(val) {
-      this.showType = val
-    }
-  },
-  computed: {
-    ...mapGetters(['deptBudgetList'])
-  },
-  data() {
-    return {
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-      // 是否显示
-      showType: true,
-      // 年
-      year: '',
-      contractNoList: [],
-      deptBudgetTotal: 0,
-      readonly: true,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      searchKeyWord: '',
-      radio: '1',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      goodnameList: [],
-      checked: true,
-      form: {},
-
-      staffList: [],
-      options: [],
-      storageType: [],
-      storageType1: [],
-      outContractNo: [],
-      // 提交类型
-      submitType: true,
-      status: [],
-      unitPricechange: [],
-      warehouseNameList: [],
-      warehouseNameList1: [],
-      waterContentchange: [],
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      warehouseInOutDetail: {},
-      onChange: {},
-      deptBudgetList1: [],
-      gradeList: [],
-      rules: {
-        netWeight: [
-          {
+  import {
+
+    procurementLook,
+  } from '@/model/purchasingManagement/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination
+    },
+    watch: {
+      isShow(val) {
+        this.showType = val
+      }
+    },
+    computed: {
+      ...mapGetters(['deptBudgetList'])
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        contractNoList: [],
+        deptBudgetTotal: 0,
+        readonly: true,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        radio: '1',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: [],
+        checked: true,
+        form: {},
+
+        staffList: [],
+        options: [],
+        storageType: [],
+        storageType1: [],
+        outContractNo: [],
+        // 提交类型
+        submitType: true,
+        status: [],
+        unitPricechange: [],
+        warehouseNameList: [],
+        warehouseNameList1: [],
+        waterContentchange: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        warehouseInOutDetail: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        rules: {
+          netWeight: [{
             required: true,
             type: 'number',
             message: '请输入活动名称',
             trigger: 'blur'
+          }]
+        },
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM')
+        },
+        contractList: [],
+        inOutTaskNo: '',
+        inOutTaskNo1: '',
+        dataList: {
+          taskTypeKey: '1'
+        },
+        dataList1: {
+          taskTypeKey: '1'
+        },
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: time => {
+            return time.getTime() > Date.now()
           }
-        ]
-      },
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      deptCircularPage: {},
-      packtypeList: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM')
-      },
-      contractList: [],
-      inOutTaskNo: '',
-      inOutTaskNo1: '',
-      dataList: { taskTypeKey: '1' },
-      dataList1: { taskTypeKey: '1' },
-      historyList: [],
-      pickerBeginDateBefore: {
-        disabledDate: time => {
-          return time.getTime() > Date.now()
-        }
-      },
-      accessoryTFs: false
-    }
-  },
-  activated() {
-    this.getList()
-    this.showType = this.isShow
-  },
-  mounted() {
-      this.dataList.id = this.$route.query.id
-  },
-  methods: {
-    //返回按钮
-    returnsales() {
-      this.$router.go(-1)
-    },
-    // 获取当前年月日
-    getdate() {
-      var date = new Date()
-      var year = date.getFullYear() //获取完整的年份(4位)
-      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
-      var datetime = date.getDate() //获取当前日(1-31)
-      if (mouth < 10) {
-        mouth = '0' + mouth
+        },
+        accessoryTFs: false
       }
-      if (datetime < 10) {
-        datetime = '0' + datetime
-      }
-      return year +'' + mouth + datetime
     },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function() {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
-
-      return arr.join('')
+    activated() {
+      this.getList()
+      this.showType = this.isShow
     },
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.deptBudgetList.staffList = val
-      if (val) {
-        //val存在
-        this.options = this.staffList.filter(item => {
-          if (
-            !!~item.staffName.indexOf(val) ||
-            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
-          }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options = this.staffList
-      }
+    mounted() {
+      this.dataList.id = this.$route.query.id
     },
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList.agentKey = this.staffList[i].staffId
+    methods: {
+      //返回按钮
+      returnsales() {
+        this.$router.go(-1)
+      },
+      // 获取当前年月日
+      getdate() {
+        var date = new Date()
+        var year = date.getFullYear() //获取完整的年份(4位)
+        var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+        var datetime = date.getDate() //获取当前日(1-31)
+        if (mouth < 10) {
+          mouth = '0' + mouth
         }
-      }
-    },
-    selectstaff1(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList1.agentKey = this.staffList[i].staffId
+        if (datetime < 10) {
+          datetime = '0' + datetime
         }
-      }
-    },
-    requestadd(list, status) {
-      this.$refs.dataList.validate(valid => {
-        if (valid) {
-          list.compId = localStorage.getItem('ws-pf_compId')
-          list.publisher =
-            localStorage.getItem('ws-pf_roleName') +
-            localStorage.getItem('ws-pf_staffName')
-          addoreditoutput(list)
-            .toPromise()
-            .then(response => {
-              this.$message.success('添加成功')
-              this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
-            })
+        return year + '' + mouth + datetime
+      },
+      // 随机验证码
+      verifyinit() {
+        var arr = []
+        for (var i = 48; i < 123; i++) {
+          if (i > 57 && i < 65) continue
+          if (i > 90) continue
+          arr.push(String.fromCharCode(i))
+        }
+        arr.sort(function() {
+          return Math.random() - 0.5
+        })
+        arr.length = 4
+
+        return arr.join('')
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter(item => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
         } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          return false
+          //val为空时,还原数组
+          this.options = this.staffList
         }
-      })
-    },
-    //关闭
-    close() {
-      this.$router.push({ path: 'procurementPlanList' })
-    },
-    tarechange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    grossWeightchange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList.goodsNameKey = this.goodnameList[i].constKey
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectgoodsName1(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList1.goodsNameKey = this.goodnameList[i].constKey
+      },
+      selectstaff1(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList1.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+      },
+      requestadd(list, status) {
+        this.$refs.dataList.validate(valid => {
+          if (valid) {
+            list.compId = localStorage.getItem('ws-pf_compId')
+            list.publisher =
+              localStorage.getItem('ws-pf_roleName') +
+              localStorage.getItem('ws-pf_staffName')
+            addoreditoutput(list)
+              .toPromise()
+              .then(response => {
+                this.$message.success('添加成功')
+                this.$router.push({
+                  path: 'tranManagementWarehouseInOutTask'
+                })
+              })
+          } else {
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
+      },
+      //关闭
+      close() {
+        this.$router.push({
+          path: 'procurementPlanList'
+        })
+      },
+      tarechange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectpackingMethod1(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+      },
+      grossWeightchange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.storageType.length; i++) {
-        if (this.storageType[i].constValue == e) {
-          this.dataList.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType1(e) {
-      for (var i = 0; i < this.storageType1.length; i++) {
-        if (this.storageType1[i].constValue == e) {
-          this.dataList1.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectgoodsName1(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList1.goodsNameKey = this.goodnameList[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    tasktypechange() {
-      this.tasknumber()
-    },
-    GetRandomNum(Min, Max) {
-      var Range = Max - Min
-      var Rand = Math.random()
-      return Min + Math.round(Rand * Range)
-    },
-    getList(){
-      procurementLook({
-        id: this.$route.query.id
-      })
-      .toPromise()
-        .then(response => {
-          this.dataList = response
-        })
-    },
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      selectpackingMethod1(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.storageType.length; i++) {
+          if (this.storageType[i].constValue == e) {
+            this.dataList.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      selectstorageType1(e) {
+        for (var i = 0; i < this.storageType1.length; i++) {
+          if (this.storageType1[i].constValue == e) {
+            this.dataList1.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      tasktypechange() {
+        this.tasknumber()
+      },
+      GetRandomNum(Min, Max) {
+        var Range = Max - Min
+        var Rand = Math.random()
+        return Min + Math.round(Rand * Range)
+      },
+      getList() {
+        procurementLook({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then(response => {
+            this.dataList = response
+          })
+      },
+    }
   }
-}
 </script>
 <style lang="scss" scoped>
-/deep/.basicInformation {
-  .el-info-table {
-    border: none;
+  /deep/.basicInformation {
+    .el-info-table {
+      border: none;
+      position: relative;
+    }
+
+    .el-form-item {
+      width: 33.3333%;
+      border: none;
+      margin: 0;
+
+      .el-form-item__label {
+        text-align: left;
+        font-size: 14px;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #8890b1;
+      }
+
+      .el-form-item__content {
+        padding-left: 0px;
+        padding-right: 10px;
+        // background: #fff;
+        white-space: nowrap;
+        height: 40px;
+        display: flex;
+        -webkit-box-align: center;
+        align-items: center;
+        text-align: left;
+        overflow: hidden;
+      }
+    }
+  }
+
+  /deep/.el-radio {
+    color: #606266;
+    font-weight: 500;
+    line-height: 1;
+    cursor: pointer;
+    white-space: nowrap;
+    outline: 0;
+    margin-right: 30px;
+    margin-top: 15px;
+  }
+
+  /deep/.el-radio__inner {
+    border: 1px solid #dcdfe6;
+    border-radius: 100%;
+    width: 14px;
+    height: 14px;
+    background-color: #fff;
+    cursor: pointer;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    margin-left: 100px;
+  }
+
+  /deep/.el-radio__input {
+    white-space: nowrap;
+    cursor: pointer;
+    outline: 0;
+    line-height: 1;
+    vertical-align: middle;
+    margin-top: -1px;
+  }
+
+  .title {
     position: relative;
+    padding-left: 10px;
   }
-  .el-form-item {
-    width: 33.3333%;
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 15%;
+    display: flex;
+    flex-wrap: wrap;
+    margin-left: -50px;
+    margin-top: 15px;
+    width: 110%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+    margin-right: 180px;
+  }
+
+  /deep/.el-form-item__label {
+    width: 160px;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  /deep/.el-form-item--small .el-form-item__label,
+  .el-form-item--small .el-form-item__content {
+    text-align: left;
+  }
+
+  /deep/.el-input--small {
+    font-size: 13px;
+    position: relative;
+    display: inline-block;
+  }
+
+  .center1 .small-title {
+    margin-left: 323px;
+  }
+
+  .center1 {
+    width: 90%;
+    margin: 0 auto;
+    margin-left: 10px;
+    margin-top: 25px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+  }
+
+  /deep/.el-select {
+    display: inline-block;
+    position: relative;
+    width: 100%;
+  }
+
+  .annu {
+    height: 81px;
+    background: #ffffff;
+    border-radius: 4px;
+  }
+
+  .basicInformation .el-form-item {
+    width: 50.3333%;
     border: none;
     margin: 0;
-    .el-form-item__label {
-      text-align: left;
-      font-size: 14px;
-      font-family: PingFangSC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #8890b1;
-    }
-    .el-form-item__content {
-      padding-left: 0px;
-      padding-right: 10px;
-      // background: #fff;
-      white-space: nowrap;
-      height: 40px;
-      display: flex;
-      -webkit-box-align: center;
-      align-items: center;
-      text-align: left;
-      overflow: hidden;
-    }
   }
-}
-/deep/.el-radio {
-  color: #606266;
-  font-weight: 500;
-  line-height: 1;
-  cursor: pointer;
-  white-space: nowrap;
-  outline: 0;
-  margin-right: 30px;
-  margin-top: 15px;
-}
-/deep/.el-radio__inner {
-  border: 1px solid #dcdfe6;
-  border-radius: 100%;
-  width: 14px;
-  height: 14px;
-  background-color: #fff;
-  cursor: pointer;
-  -webkit-box-sizing: border-box;
-  box-sizing: border-box;
-  margin-left: 100px;
-}
-/deep/.el-radio__input {
-  white-space: nowrap;
-  cursor: pointer;
-  outline: 0;
-  line-height: 1;
-  vertical-align: middle;
-  margin-top: -1px;
-}
-.title {
-  position: relative;
-  padding-left: 10px;
-}
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
-.el-form {
-  padding: 0 15%;
-  display: flex;
-  flex-wrap: wrap;
-  margin-left: -50px;
-  margin-top: 15px;
-  width: 110%;
-}
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-}
-.el-col {
-  background: #f6f7fc;
-}
-.bg-right {
-  text-align: right;
-  padding: 16px 20px;
-}
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  height: 2000px;
-  margin: 0 auto;
-  margin-right: 180px;
-}
-/deep/.el-form-item__label {
-  width: 160px;
-}
-.inspector {
-  width: 50%;
-}
-/deep/.el-form-item--small .el-form-item__label,
-.el-form-item--small .el-form-item__content {
-  text-align: left;
-}
-/deep/.el-input--small {
-  font-size: 13px;
-  position: relative;
-  display: inline-block;
-}
-.center1 .small-title {
-  margin-left: 323px;
-}
-.center1 {
-  width: 90%;
-  margin: 0 auto;
-  margin-left: 10px;
-  margin-top: 25px;
-}
-/deep/.el-input--small .el-input__inner {
-  height: 32px;
-  line-height: 32px;
-}
-/deep/.el-select {
-  display: inline-block;
-  position: relative;
-  width: 100%;
-}
-.annu {
-  height: 81px;
-  background: #ffffff;
-  border-radius: 4px;
-}
-.basicInformation .el-form-item {
-  width: 50.3333%;
-  border: none;
-  margin: 0;
-}
-.el-form {
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 16px;
-  margin-left: 130px;
-}
-.a {
-  margin-left: -32px;
-}
-.el-radio-group {
-  margin-left: 80px;
-}
-.ding {
-  height: 23px;
-  background: #e8ecf6;
-  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
-}
-.nav2 {
-  height: 25px;
-  background: #e8ecf6;
-  margin-top: 15px;
-}
-.ziti {
-  width: 72px;
-  height: 20px;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 20px;
-  margin-left: 314px;
-  /* margin-top: 112px; */
-}
-/deep/.ziti1 {
-  height: 40px;
-  font-size: 16px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #262626;
-  line-height: 20px;
-  margin-left: 381px;
-  margin-top: -21px;
-  width: 100px;
-}
-.winseaview-view {
-  padding: 0 0 20px;
-}
-.container {
-  overflow: scroll;
-  height: 93vh;
-}
-/deep/.basicInformation .el-form-item .el-form-item__content {
-  padding-left: 0px;
-  padding-right: 10px;
-  white-space: nowrap;
-  height: 40px;
-  display: -webkit-box;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-box-align: center;
-  -ms-flex-align: center;
-  align-items: center;
-  text-align: left;
-  overflow: hidden;
-  font-size: 12px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #232323;
-  line-height: 14px;
-}
-.nav {
-  width: 400px;
-  height: 20px;
-}
-.forlist{
-  background-color: #F5F7FA;
-  border-radius: 10px;
-  width: 100%;
-  padding-left: 15px;
-  height: 35px;
-  line-height: 35px;
-  color: #C0C4CC;
-  font-size: 14px;
-}
+
+  .el-form {
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+    margin-left: 130px;
+  }
+
+  .a {
+    margin-left: -32px;
+  }
+
+  .el-radio-group {
+    margin-left: 80px;
+  }
+
+  .ding {
+    height: 23px;
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .nav2 {
+    height: 25px;
+    background: #e8ecf6;
+    margin-top: 15px;
+  }
+
+  .ziti {
+    width: 72px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 20px;
+    margin-left: 314px;
+    /* margin-top: 112px; */
+  }
+
+  /deep/.ziti1 {
+    height: 40px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #262626;
+    line-height: 20px;
+    margin-left: 381px;
+    margin-top: -21px;
+    width: 100px;
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.basicInformation .el-form-item .el-form-item__content {
+    padding-left: 0px;
+    padding-right: 10px;
+    white-space: nowrap;
+    height: 40px;
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-align: center;
+    -ms-flex-align: center;
+    align-items: center;
+    text-align: left;
+    overflow: hidden;
+    font-size: 12px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #232323;
+    line-height: 14px;
+  }
+
+  .nav {
+    width: 400px;
+    height: 20px;
+  }
+
+  .forlist {
+    background-color: #F5F7FA;
+    border-radius: 10px;
+    width: 100%;
+    padding-left: 15px;
+    height: 35px;
+    line-height: 35px;
+    color: #C0C4CC;
+    font-size: 14px;
+  }
 </style>

+ 1007 - 1134
src/views/salesManagement/salesPlanAdd.vue

@@ -6,96 +6,48 @@
         <h2 class="bg-left title">创建销售计划</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
-        <el-button
-          class="bg-bottom"
-          type="primary"
-          size="small"
-          @click="returnsales()"
-        >
-          <img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt
-          />返回
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt />返回
         </el-button>
       </el-col>
     </el-row>
     <div class="basicInformation">
-      <el-radio-group
-        @change="tasktypechange"
-        v-model="dataList.taskTypeKey"
-      ></el-radio-group>
+      <el-radio-group @change="tasktypechange" v-model="dataList.taskTypeKey"></el-radio-group>
       <div class="center1">
         <div class="small-title">
           <h3>基本信息</h3>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <!-- 标题 -->
-          <el-form-item label="标题" span="1" prop="title" >
-            <el-input
-              v-model="dataList.title"
-              maxlength="16"
-              class="typeselect"
-              placeholder="标题须包含企业简称,不超过16个字"
-            />
+          <el-form-item label="标题" span="1" prop="title">
+            <el-input v-model="dataList.title" maxlength="16" class="typeselect" placeholder="标题须包含企业简称,不超过16个字" />
             <span class="unchangeable">*</span>
           </el-form-item>
           <!-- 货名 -->
-          <ws-form-item label="货名" span="1" prop="goodsName" >
-            <ws-select
-               style="font-size: 14px"
-              v-model="dataList.goodsName"
-              placeholder
-              class="typeselect"
-              @change="selectgoodsName"
-            >
-              <ws-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+          <ws-form-item label="货名" span="1" prop="goodsName">
+            <ws-select style="font-size: 14px" v-model="dataList.goodsName" placeholder class="typeselect"
+              @change="selectgoodsName">
+              <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
             <span class="unchangeable">*</span>
           </ws-form-item>
           <!-- 计划销售量(吨) -->
-          <el-form-item
-            label="计划销售量(吨)"
-            span="1"
-            prop="plannedSaleVolume"
-          >
-            <el-input
-              v-model="dataList.plannedSaleVolume"
-              class="typeselect"
-              placeholder="请输入计划销售量"
-            />
+          <el-form-item label="计划销售量(吨)" span="1" prop="plannedSaleVolume">
+            <el-input v-model="dataList.plannedSaleVolume" class="typeselect" placeholder="请输入计划销售量" />
             <span class="unchangeable">*</span>
           </el-form-item>
           <!-- 最小成交量 -->
-          <el-form-item label="最小成交量(吨)" span="1" prop="minimumVolume" >
-            <el-input
-              v-model="dataList.minimumVolume"
-              placeholder="请输入最小成交量"
-              class="typeselect"
-            />
+          <el-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
+            <el-input v-model="dataList.minimumVolume" placeholder="请输入最小成交量" class="typeselect" />
             <span class="unchangeable">*</span>
           </el-form-item>
           <!--类型-->
-          <ws-form-item label="类型" span="1" prop="salePlanType" >
-            <ws-select
-              v-model="dataList.salePlanType"
-              placeholder
-              class="typeselect"
-              @change="selectsalePlanType"
-            >
-              <ws-option
-                v-for="item in salePlanTypeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+          <ws-form-item label="类型" span="1" prop="salePlanType">
+            <ws-select v-model="dataList.salePlanType" placeholder class="typeselect" @change="selectsalePlanType">
+              <ws-option v-for="item in salePlanTypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
             <span class="unchangeable">*</span>
           </ws-form-item>
@@ -103,137 +55,59 @@
           <ws-form-item label="价格类型" span="1" prop="priceType">
             <el-input v-model="dataList.priceType" class="typeselect" disabled />
           </ws-form-item>
-           <ws-form-item
-            v-show="dataList.salePlanType=='期货'"
-            label="基差(元/吨)"
-            span="1"
-            prop="basisPrice"
-          >
+          <ws-form-item v-show="dataList.salePlanType=='期货'" label="基差(元/吨)" span="1" prop="basisPrice">
             <el-input v-model="dataList.basisPrice" class="typeselect" placeholder="请输入基差" />
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item
-            v-show="dataList.salePlanType == '现货'"
-            label="销售价格(元)"
-            span="1"
-            prop="salePrice"
-          >
-            <el-input
-              v-model="dataList.salePrice"
-              maxlength="120"
-              size="small"
-              class="typeselect"
-              placeholder="请输入销售价格"
-            />
+          <ws-form-item v-show="dataList.salePlanType == '现货'" label="销售价格(元)" span="1" prop="salePrice">
+            <el-input type='number' v-model="dataList.salePrice" maxlength="120" size="small" class="typeselect"
+              placeholder="请输入销售价格" />
             <span class="unchangeable">*</span>
           </ws-form-item>
           <!--出货库-->
-          <ws-form-item label="出货库" span="1" prop="sendWarehouse" >
-            <ws-select
-              v-model="dataList.sendWarehouse"
-              placeholder
-              class="typeselect"
-              @change="sendWarehousechange"
-            >
-              <ws-option
-                v-for="item in warehouseList"
-                :key="item.warehouseName"
-                :label="item.warehouseName"
-                :value="item.warehouseName"
-              />
+          <ws-form-item label="出货库" span="1" prop="sendWarehouse">
+            <ws-select v-model="dataList.sendWarehouse" placeholder class="typeselect" @change="sendWarehousechange">
+              <ws-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName"
+                :value="item.warehouseName" />
             </ws-select>
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="出货库所在地区" span="1" prop="sendArea" > 
-            <el-cascader
-              :options="options_"
-              v-model="selectedOptions"
-              clearable
-              class="typeselect"
-              placeholder="请选择出货库所在地区"
-              @change="handleChange"
-              style="width: 200%"
-            />
+          <ws-form-item label="出货库所在地区" span="1" prop="sendArea">
+            <el-cascader :options="options_" v-model="selectedOptions" clearable class="typeselect"
+              placeholder="请选择出货库所在地区" @change="handleChange" style="width: 200%" />
             <span class="unchangeable">*</span>
           </ws-form-item>
           <ws-form-item label="运费承担方" span="1" prop="freightPayer">
-            <ws-select
-              v-model="dataList.freightPayer"
-              placeholder
-              class="typeselect"
-              @change="selectfreightPayer"
-            >
-              <ws-option
-                v-for="item in freightPayerList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.freightPayer" placeholder class="typeselect" @change="selectfreightPayer">
+              <ws-option v-for="item in freightPayerList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
-          <ws-form-item label="包装方式" span="1" prop="packingType" >
-            <ws-select
-              v-model="dataList.packingType"
-              placeholder
-              class="typeselect"
-              @change="selectpackingType"
-            >
-              <ws-option
-                v-for="item in packingTypeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+          <ws-form-item label="包装方式" span="1" prop="packingType">
+            <ws-select v-model="dataList.packingType" placeholder class="typeselect" @change="selectpackingType">
+              <ws-option v-for="item in packingTypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <el-form-item
-            v-if="dataList.packingType != '散装'"
-            label="装袋备注"
-            span="1"
-            prop="baggingNotes"
-          >
-            <el-input
-              maxlength="30"
-              v-model="dataList.baggingNotes"
-              size="small"
-              class="typeselect"
-              placeholder="请输入装袋要求如:98斤,王中王彩袋"
-            />
+          <el-form-item v-if="dataList.packingType != '散装'" label="装袋备注" span="1" prop="baggingNotes">
+            <el-input maxlength="30" v-model="dataList.baggingNotes" size="small" class="typeselect"
+              placeholder="请输入装袋要求如:98斤,王中王彩袋" />
           </el-form-item>
-          <ws-form-item label="卖方" span="1" prop="seller" >
-            <el-input
-              maxlength="25"
-              v-model="dataList.seller"
-              size="small"
-              class="typeselect"
-              placeholder="请输入卖方名称"
-            />
+          <ws-form-item label="卖方" span="1" prop="seller">
+            <el-input maxlength="25" v-model="dataList.seller" size="small" class="typeselect" placeholder="请输入卖方名称" />
             <span class="unchangeable">*</span>
           </ws-form-item>
-          <el-form-item label="卖方电话" span="1" prop="sellerPhone" >
-            <el-input
-              v-model="dataList.sellerPhone"
-              filterable
-              class="typeselect"
-              clearable
-              placeholder="请输入卖方电话"
-            ></el-input>
+          <el-form-item label="卖方电话" span="1" prop="sellerPhone">
+            <el-input v-model="dataList.sellerPhone" filterable class="typeselect" clearable placeholder="请输入卖方电话">
+            </el-input>
             <span class="unchangeable">*</span>
           </el-form-item>
-             <el-form-item label="发票费(个人)" span="1" prop="invoiceFeePerson" >
-            <el-input
-              v-model="dataList.invoiceFeePerson"
-              placeholder="请输入发票费(个人)"
-              class="typeselect"
-            ></el-input>
+          <el-form-item label="发票费(个人)" span="1" prop="invoiceFeePerson">
+            <el-input v-model="dataList.invoiceFeePerson" placeholder="请输入发票费(个人)" class="typeselect"></el-input>
           </el-form-item>
-          <el-form-item label="发票费(企业)" span="1" prop="invoiceFeeCompany" >
-            <el-input
-              v-model="dataList.invoiceFeeCompany"
-              placeholder="请输入发票费(企业)"
-              class="typeselect"
-            ></el-input>
+          <el-form-item label="发票费(企业)" span="1" prop="invoiceFeeCompany">
+            <el-input v-model="dataList.invoiceFeeCompany" placeholder="请输入发票费(企业)" class="typeselect"></el-input>
           </el-form-item>
           <div class="small-title"></div>
         </el-form>
@@ -243,1056 +117,1055 @@
           <h3>货物要求</h3>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
-          <el-form-item label="水分(%)<=" span="1" prop="waterContent" >
-            <el-input
-              v-model="dataList.waterContent"
-              class="typeselect"
-              placeholder="请输入水分占比"
-            />
+          <el-form-item label="水分(%)<=" span="1" prop="waterContent">
+            <el-input v-model="dataList.waterContent" class="typeselect" placeholder="请输入水分占比" />
             <span class="unchangeable">*</span>
           </el-form-item>
-          <el-form-item label="容重(g/l)>=" span="1" prop="bulkDensity" >
-            <el-input
-              v-model="dataList.bulkDensity"
-              class="typeselect"
-              placeholder="请输入容重"
-            />
+          <el-form-item label="容重(g/l)>=" span="1" prop="bulkDensity">
+            <el-input v-model="dataList.bulkDensity" class="typeselect" placeholder="请输入容重" />
             <span class="unchangeable">*</span>
           </el-form-item>
           <el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
-            <el-input
-              v-model="dataList.jiaorenli"
-              class="typeselect"
-              placeholder="请输入热损伤占比"
-            />
+            <el-input v-model="dataList.jiaorenli" class="typeselect" placeholder="请输入热损伤占比" />
           </el-form-item>
           <el-form-item label="杂质(%)<=" span="1" prop="impurity">
-            <el-input
-              v-model="dataList.impurity"
-              class="typeselect"
-              placeholder="请输入杂质占比"
-            />
+            <el-input v-model="dataList.impurity" class="typeselect" placeholder="请输入杂质占比" />
           </el-form-item>
           <el-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
-            <el-input
-              v-model="dataList.mildewGrain"
-              placeholder="请输入霉变粒占比"
-              class="typeselect"
-            />
+            <el-input v-model="dataList.mildewGrain" placeholder="请输入霉变粒占比" class="typeselect" />
           </el-form-item>
           <el-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
-            <el-input
-              v-model="dataList.imperfectGrain"
-              maxlength="120"
-              placeholder="请输入不完善粒占比"
-              class="typeselect"
-            />
+            <el-input v-model="dataList.imperfectGrain" maxlength="120" placeholder="请输入不完善粒占比" class="typeselect" />
           </el-form-item>
           <el-form-item label="蛋白(%)>=" span="1" prop="protein">
-            <el-input
-              v-model="dataList.protein"
-              class="typeselect"
-              placeholder="请输入蛋白占比"
-            />
+            <el-input v-model="dataList.protein" class="typeselect" placeholder="请输入蛋白占比" />
           </el-form-item>
           <ws-form-item label="粒型" span="1" prop="grain">
-            <ws-select
-              v-model="dataList.grain"
-              placeholder
-              class="typeselect"
-              @change="selectgrain"
-            >
-              <ws-option
-                v-for="item in grainList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.grain" placeholder class="typeselect" @change="selectgrain">
+              <ws-option v-for="item in grainList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <ws-form-item label="品级" span="1" prop="grade">
-            <ws-select
-              v-model="dataList.grade"
-              placeholder
-              class="typeselect"
-              @change="selectgrade"
-            >
-              <ws-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.grade" placeholder class="typeselect" @change="selectgrade">
+              <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <ws-form-item label="产地" span="1" prop="unitPrice">
-            <el-cascader
-              :options="options1_"
-              v-model="selectedOptions1"
-              clearable
-              size="large"
-              placeholder="请选择产地"
-              @change="handleChange1"
-              style="width: 200%"
-              class="typeselect"
-            />
+            <el-cascader :options="options1_" v-model="selectedOptions1" clearable size="large" placeholder="请选择产地"
+              @change="handleChange1" style="width: 200%" class="typeselect" />
           </ws-form-item>
           <el-form-item label="产出年份" span="1" prop="outputYear">
-            <el-date-picker
-              v-model="dataList.outputYear"
-              type="year"
-              align="right"
-              unlink-panels
-              value-format='yyyy'
-              range-separator="至"
-              placeholder="产出年份"
-              class="typeselect"
-            ></el-date-picker>
+            <el-date-picker v-model="dataList.outputYear" type="year" align="right" unlink-panels value-format='yyyy'
+              range-separator="至" placeholder="产出年份" class="typeselect"></el-date-picker>
           </el-form-item>
         </el-form>
       </div>
     </div>
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
-      <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
-        >提交</el-button
-      >
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
     </div>
   </div>
 </template>
 <script>
-import { saleAdd } from '@/model/salesManagement/index'
-import {
-  regionData,
-  provinceAndCityData,
-  CodeToText,
-  TextToCode,
-} from 'element-china-area-data'
-import { packList } from '@/model/contarct/index'
-import { getwarehousename } from '@/model/tasksport/index'
-import Pagination from '@/components/Pagination'
-import WsUpload from '@/components/WsUpload'
-// import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination,
-  },
-  watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
-    isShow(val) {
-      this.showType = val
+  import {
+    saleAdd
+  } from '@/model/salesManagement/index'
+  import {
+    regionData,
+    provinceAndCityData,
+    CodeToText,
+    TextToCode,
+  } from 'element-china-area-data'
+  import {
+    packList
+  } from '@/model/contarct/index'
+  import {
+    getwarehousename
+  } from '@/model/tasksport/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
     },
-  },
-  computed: {},
-  data() {
-    return {
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 是否显示
-      showType: true,
-      // 年
-      year: '',
-      options_: regionData,
-      options1_: provinceAndCityData,
-      packingTypeList: '',
-      salePlanTypeList: '',
-      freightPayerList: '',
-      searchTypeText: '',
-      selectedOptions: [],
-      selectedOptions1: [],
-      contractNoList: [],
-      deptBudgetTotal: 0,
-      readonly: true,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      searchKeyWord: '',
-      radio: '1',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      goodnameList: {},
-      grainList: [],
-      checked: true,
-      form: {},
-      pcFlag: 1,
-      staffList: [],
-      options: [],
-      storageType: [],
-      storageType1: [],
-      outContractNo: [],
-      // 提交类型
-      submitType: true,
-      status: [],
-      unitPricechange: [],
-      warehouseNameList: [],
-      warehouseNameList1: [],
-      waterContentchange: [],
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      warehouseList: [],
-      warehouseInOutDetail: {},
-      onChange: {},
-      deptBudgetList1: [],
-      gradeList: [],
-      rules: {
-        netWeight: [
-          {
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    computed: {},
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        options_: regionData,
+        options1_: provinceAndCityData,
+        packingTypeList: '',
+        salePlanTypeList: '',
+        freightPayerList: '',
+        searchTypeText: '',
+        selectedOptions: [],
+        selectedOptions1: [],
+        contractNoList: [],
+        deptBudgetTotal: 0,
+        readonly: true,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        radio: '1',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        grainList: [],
+        checked: true,
+        form: {},
+        pcFlag: 1,
+        staffList: [],
+        options: [],
+        storageType: [],
+        storageType1: [],
+        outContractNo: [],
+        // 提交类型
+        submitType: true,
+        status: [],
+        unitPricechange: [],
+        warehouseNameList: [],
+        warehouseNameList1: [],
+        waterContentchange: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        warehouseList: [],
+        warehouseInOutDetail: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        rules: {
+          netWeight: [{
             required: true,
             type: 'number',
             message: '请输入活动名称',
             trigger: 'blur',
+          }, ],
+        },
+        outputYear: [],
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        inOutTaskNo: '',
+        dataList: {
+          taskTypeKey: '1',
+          goodsName: '玉米',
+          goodsNameKey: 1,
+          salePlanType: '现货',
+          salePlanTypeKey: 2,
+          priceType: '定价销售',
+          priceTypeKey: 2,
+          packingType: '散装',
+          packingTypeKey: 1,
+        },
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
           },
-        ],
-      },
-      outputYear: [],
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      deptCircularPage: {},
-      packtypeList: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM'),
-      },
-      contractList: [],
-      inOutTaskNo: '',
-      dataList: {
-        taskTypeKey: '1',
-        goodsName: '玉米',
-        goodsNameKey: 1,
-        salePlanType: '现货',
-        salePlanTypeKey: 2,
-        priceType: '定价销售',
-        priceTypeKey: 2,
-        packingType: '散装',
-        packingTypeKey: 1,
-      },
-      historyList: [],
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
         },
-      },
-      accessoryTFs: false,
-    }
-  },
-  activated() {
-    this.loaddata()
-  },
-  mounted() {},
-  methods: {
-    //返回按钮
-    revert() {
-      this.$router.go(-1)
-    },
-    returnsales() {
-      this.dataList = {}
-      // this.selectedOptions = ''
-      this.$router.push({ path: 'salesPlanList' })
-    },
-    // 获取当前年月日
-    getdate() {
-      var date = new Date()
-      var year = date.getFullYear() //获取完整的年份(4位)
-      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
-      var datetime = date.getDate() //获取当前日(1-31)
-      if (mouth < 10) {
-        mouth = '0' + mouth
-      }
-      if (datetime < 10) {
-        datetime = '0' + datetime
+        accessoryTFs: false,
       }
-      return year +'' + mouth + datetime
     },
-MathRand()
-{
-var Num='';
-for(var i=0;i<4;i++)
-{
-Num+=Math.floor(Math.random()*10);
-}
-return Num
-},
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.deptBudgetList.staffList = val
-      if (val) {
-        //val存在
-        this.options = this.staffList.filter((item) => {
-          if (
-            !!~item.staffName.indexOf(val) ||
-            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
-          }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options = this.staffList
-      }
+    activated() {
+      this.loaddata()
     },
+    mounted() {},
+    methods: {
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
+      },
+      returnsales() {
+        this.dataList = {}
+        // this.selectedOptions = ''
+        this.$router.push({
+          path: 'salesPlanList'
+        })
+      },
+      // 获取当前年月日
+      getdate() {
+        var date = new Date()
+        var year = date.getFullYear() //获取完整的年份(4位)
+        var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+        var datetime = date.getDate() //获取当前日(1-31)
+        if (mouth < 10) {
+          mouth = '0' + mouth
+        }
+        if (datetime < 10) {
+          datetime = '0' + datetime
+        }
+        return year + '' + mouth + datetime
+      },
+      MathRand() {
+        var Num = '';
+        for (var i = 0; i < 4; i++) {
+          Num += Math.floor(Math.random() * 10);
+        }
+        return Num
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
 
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
         }
-      }
-    },
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList.agentKey = this.staffList[i].staffId
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectstaff1(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList1.agentKey = this.staffList[i].staffId
+      },
+      selectstaff1(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList1.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectgrain(e) {
-      for (var i = 0; i < this.grainList.length; i++) {
-        if (this.grainList[i].constValue == e) {
-          this.dataList.grainKey = this.grainList[i].constKey
+      },
+      selectgrain(e) {
+        for (var i = 0; i < this.grainList.length; i++) {
+          if (this.grainList[i].constValue == e) {
+            this.dataList.grainKey = this.grainList[i].constKey
+          }
         }
-      }
-    },
-    selectpackingType(e) {
-      for (var i = 0; i < this.packingTypeList.length; i++) {
-        if (this.packingTypeList[i].constValue == e) {
-          this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+      },
+      selectpackingType(e) {
+        for (var i = 0; i < this.packingTypeList.length; i++) {
+          if (this.packingTypeList[i].constValue == e) {
+            this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+          }
         }
-      }
-    },
-    selectfreightPayer(e) {
-      for (var i = 0; i < this.freightPayerList.length; i++) {
-        if (this.freightPayerList[i].constValue == e) {
-          this.dataList.freightPayerKey = this.freightPayerList[i].constKey
+      },
+      selectfreightPayer(e) {
+        for (var i = 0; i < this.freightPayerList.length; i++) {
+          if (this.freightPayerList[i].constValue == e) {
+            this.dataList.freightPayerKey = this.freightPayerList[i].constKey
+          }
         }
-      }
-    },
-    selectgrade(e) {
-      for (var i = 0; i < this.gradeList.length; i++) {
-        if (this.gradeList[i].constValue == e) {
-          this.dataList.gradeKey = this.gradeList[i].constKey
+      },
+      selectgrade(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.dataList.gradeKey = this.gradeList[i].constKey
+          }
         }
-      }
-    },
-    selectsalePlanType(e) {
-      if (e == '现货') {
-        this.dataList.priceType = '定价销售'
-        this.dataList.priceTypeKey = 2
-      } else {
-        this.dataList.priceType = '期货盘面价+基差'
-        this.dataList.priceTypeKey = 1
-      }
-      for (var i = 0; i < this.salePlanTypeList.length; i++) {
-        if (this.salePlanTypeList[i].constValue == e) {
-          this.dataList.procurementPlanTypekey =
-            this.salePlanTypeList[i].constKey
+      },
+      selectsalePlanType(e) {
+        if (e == '现货') {
+          this.dataList.priceType = '定价销售'
+          this.dataList.priceTypeKey = 2
+        } else {
+          this.dataList.priceType = '期货盘面价+基差'
+          this.dataList.priceTypeKey = 1
         }
-      }
-    },
-    handleChange(value) {
-      this.selectedOptions = value
-      this.dataList.sendPrivate = CodeToText[value[0]]
-      this.dataList.sendCity = CodeToText[value[1]]
-      this.dataList.sendArea = CodeToText[value[2]]
-    },
-    handleChange1(value) {
-      this.selectedOptions1 = value
-      this.dataList.outputPrivate = CodeToText[value[0]]
-      // this.dataList.outputCity = CodeToText[value[1]]
-    },
-    sendWarehousechange(e) {
-      for (let i = 0; i < this.warehouseList.length; i++) {
-        if (this.warehouseList[i].warehouseName == e) {
-          var tmp = []
-          tmp[0] = TextToCode[this.warehouseList[i].warehousePrivate].code
-          tmp[1] =
-            TextToCode[this.warehouseList[i].warehousePrivate][
-              this.warehouseList[i].warehouseCity
-            ].code
-          tmp[2] =
-            TextToCode[this.warehouseList[i].warehousePrivate][
-              this.warehouseList[i].warehouseCity
-            ][this.warehouseList[i].warehouseArea].code
-          this.selectedOptions = tmp
-          this.dataList.sendWarehouseId = this.warehouseList[i].id
+        for (var i = 0; i < this.salePlanTypeList.length; i++) {
+          if (this.salePlanTypeList[i].constValue == e) {
+            this.dataList.procurementPlanTypekey =
+              this.salePlanTypeList[i].constKey
+          }
         }
-      }
-    },
-    //关闭
-    close() {
-      this.$router.push({ path: 'procurementPlanList' })
-    },
-
-    loaddata() {
-      getwarehousename({
-        compId: this.compId,
-        warehouseType: 1,
-      })
-        .toPromise()
-        .then((response) => {
-          console.log(response)
-          this.warehouseList = response
-        })
-      // 货名
-      packList({ constId: 'CON2' })
-        .toPromise()
-        .then((response) => {
-          this.goodnameList = response
-        })
-      // 品级
-      packList({ constId: 'CON3' })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-      //粒形
-      packList({ constId: 'PRO4' })
-        .toPromise()
-        .then((response) => {
-          this.grainList = response
-        })
-      //类型
-      packList({ constId: 'PRO1' })
-        .toPromise()
-        .then((response) => {
-          this.salePlanTypeList = response
-        })
-      //包装方式
-      packList({ constId: 'PRO2' })
-        .toPromise()
-        .then((response) => {
-          this.packingTypeList = response
-        })
-      //运费承担方
-      packList({ constId: 'PRO3' })
-        .toPromise()
-        .then((response) => {
-          this.freightPayerList = response
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+        this.dataList.sendPrivate = CodeToText[value[0]]
+        this.dataList.sendCity = CodeToText[value[1]]
+        this.dataList.sendArea = CodeToText[value[2]]
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+        this.dataList.outputPrivate = CodeToText[value[0]]
+        // this.dataList.outputCity = CodeToText[value[1]]
+      },
+      sendWarehousechange(e) {
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseList[i].warehouseName == e) {
+            var tmp = []
+            tmp[0] = TextToCode[this.warehouseList[i].warehousePrivate].code
+            tmp[1] =
+              TextToCode[this.warehouseList[i].warehousePrivate][
+                this.warehouseList[i].warehouseCity
+              ].code
+            tmp[2] =
+              TextToCode[this.warehouseList[i].warehousePrivate][
+                this.warehouseList[i].warehouseCity
+              ][this.warehouseList[i].warehouseArea].code
+            this.selectedOptions = tmp
+            this.dataList.sendWarehouseId = this.warehouseList[i].id
+          }
+        }
+      },
+      //关闭
+      close() {
+        this.$router.push({
+          path: 'procurementPlanList'
         })
-    },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function () {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
+      },
 
-      return arr.join('')
-    },
-    submit() {
-      if (!this.dataList.title) {
-        this.$message({
-          message: '标题不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.title.length > 16) {
-        this.$message({
-          message: '标题输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.plannedSaleVolume) {
-        this.$message({
-          message: '计划销售量不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.plannedSaleVolume > 10000000 ||
-        this.dataList.plannedSaleVolume < 1
-      ) {
-        this.$message({
-          message: '计划销售量输入错误!',
-          type: 'warning',
+      loaddata() {
+        getwarehousename({
+            compId: this.compId,
+            warehouseType: 1,
+          })
+          .toPromise()
+          .then((response) => {
+            console.log(response)
+            this.warehouseList = response
+          })
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        //粒形
+        packList({
+            constId: 'PRO4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.grainList = response
+          })
+        //类型
+        packList({
+            constId: 'PRO1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.salePlanTypeList = response
+          })
+        //包装方式
+        packList({
+            constId: 'PRO2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packingTypeList = response
+          })
+        //运费承担方
+        packList({
+            constId: 'PRO3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.freightPayerList = response
+          })
+      },
+      // 随机验证码
+      verifyinit() {
+        var arr = []
+        for (var i = 48; i < 123; i++) {
+          if (i > 57 && i < 65) continue
+          if (i > 90) continue
+          arr.push(String.fromCharCode(i))
+        }
+        arr.sort(function() {
+          return Math.random() - 0.5
         })
-        return
-      }
-      if (this.dataList.plannedSaleVolume.indexOf('.') != -1) {
-        if (this.dataList.plannedSaleVolume.split('.')[1].length > 2) {
+        arr.length = 4
+
+        return arr.join('')
+      },
+      submit() {
+        if (!this.dataList.title) {
+          this.$message({
+            message: '标题不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.title.length > 16) {
+          this.$message({
+            message: '标题输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.plannedSaleVolume) {
+          this.$message({
+            message: '计划销售量不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.plannedSaleVolume > 10000000 ||
+          this.dataList.plannedSaleVolume < 1
+        ) {
           this.$message({
             message: '计划销售量输入错误!',
             type: 'warning',
           })
           return
         }
-      }
-      if (!this.dataList.minimumVolume) {
-        this.$message({
-          message: '最小成交量不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.minimumVolume > 10000000 ||
-        this.dataList.minimumVolume < 1
-      ) {
-        this.$message({
-          message: '最小成交量输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.minimumVolume.indexOf('.') != -1 &&
-        this.dataList.minimumVolume.split('.')[1].length > 2
-      ) {
-        this.$message({
-          message: '最小成交量输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.basisPrice > 100000 ||
-        this.dataList.basisPrice < 0 ||
-        (String(this.dataList.basisPrice).indexOf(
-          '.'
-        ) != -1 &&
-          String(this.dataList.basisPrice).length -
-            (String(this.dataList.basisPrice).indexOf(
+        if (this.dataList.plannedSaleVolume.indexOf('.') != -1) {
+          if (this.dataList.plannedSaleVolume.split('.')[1].length > 2) {
+            this.$message({
+              message: '计划销售量输入错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (!this.dataList.minimumVolume) {
+          this.$message({
+            message: '最小成交量不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.minimumVolume > 10000000 ||
+          this.dataList.minimumVolume < 1
+        ) {
+          this.$message({
+            message: '最小成交量输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.minimumVolume.indexOf('.') != -1 &&
+          this.dataList.minimumVolume.split('.')[1].length > 2
+        ) {
+          this.$message({
+            message: '最小成交量输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.basisPrice > 100000 ||
+          this.dataList.basisPrice < 0 ||
+          (String(this.dataList.basisPrice).indexOf(
               '.'
-            ) +
+            ) != -1 &&
+            String(this.dataList.basisPrice).length -
+            (String(this.dataList.basisPrice).indexOf(
+                '.'
+              ) +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '基差输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.salePrice > 100000 ||
-        this.dataList.salePrice < 0 ||
-        (String(this.dataList.salePrice).indexOf(
-          '.'
-        ) != -1 &&
-          String(this.dataList.salePrice).length -
-            (String(this.dataList.salePrice).indexOf(
+        ) {
+          this.$message({
+            message: '基差输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.salePrice > 100000 ||
+          this.dataList.salePrice < 0 ||
+          (String(this.dataList.salePrice).indexOf(
               '.'
-            ) +
+            ) != -1 &&
+            String(this.dataList.salePrice).length -
+            (String(this.dataList.salePrice).indexOf(
+                '.'
+              ) +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '销售价格输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.sendWarehouse) {
-        this.$message({
-          message: '请选择出货库',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.selectedOptions.length == 0) {
-        this.$message({
-          message: '请选择出货库所在地区!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.seller) {
-        this.$message({
-          message: '卖方不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.seller.length > 25 || this.dataList.seller.length < 1) {
-        this.$message({
-          message: '卖方输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.sellerPhone) {
-        this.$message({
-          message: '请输入卖方电话!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.sellerPhone.length > 15 || this.dataList.sellerPhone.length < 6) {
-        this.$message({
-          message: '卖方电话输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.waterContent) {
-        this.$message({
-          message: '水分不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.waterContent > 40 || this.dataList.waterContent < 0) {
-        this.$message({
-          message: '水分输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        String(this.dataList.waterContent).indexOf('.') != -1 &&
-        String(this.dataList.waterContent).length -
+        ) {
+          this.$message({
+            message: '销售价格输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.sendWarehouse) {
+          this.$message({
+            message: '请选择出货库',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.selectedOptions.length == 0) {
+          this.$message({
+            message: '请选择出货库所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.seller) {
+          this.$message({
+            message: '卖方不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.seller.length > 25 || this.dataList.seller.length < 1) {
+          this.$message({
+            message: '卖方输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.sellerPhone) {
+          this.$message({
+            message: '请输入卖方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.sellerPhone.length > 15 || this.dataList.sellerPhone.length < 6) {
+          this.$message({
+            message: '卖方电话输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.waterContent) {
+          this.$message({
+            message: '水分不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.waterContent > 40 || this.dataList.waterContent < 0) {
+          this.$message({
+            message: '水分输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          String(this.dataList.waterContent).indexOf('.') != -1 &&
+          String(this.dataList.waterContent).length -
           (String(this.dataList.waterContent).indexOf('.') + 1) >
           2
-      ) {
-        this.$message({
-          message: '水分输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.bulkDensity) {
-        this.$message({
-          message: '容重不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        (this.dataList.bulkDensity &&
-          String(this.dataList.bulkDensity).indexOf('.') != -1 &&
-          String(this.dataList.bulkDensity).length -
+        ) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.bulkDensity) {
+          this.$message({
+            message: '容重不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          (this.dataList.bulkDensity &&
+            String(this.dataList.bulkDensity).indexOf('.') != -1 &&
+            String(this.dataList.bulkDensity).length -
             (String(this.dataList.bulkDensity).indexOf('.') + 1) >
             2) ||
-        this.dataList.bulkDensity > 1000 ||
-        this.dataList.bulkDensity < 0
-      ) {
-        this.$message({
-          message: '容重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.protein&&String(this.dataList.protein).indexOf('.') != -1 &&
+          this.dataList.bulkDensity > 1000 ||
+          this.dataList.bulkDensity < 0
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.protein && String(this.dataList.protein).indexOf('.') != -1 &&
           String(this.dataList.protein).length -
-            (String(this.dataList.protein).indexOf('.') + 1) >
-            2||this.dataList.protein&&this.dataList.protein>80||this.dataList.protein&&this.dataList.protein<0){
-        this.$message({
-          message: '蛋白占比输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.impurity&&String(this.dataList.impurity).indexOf('.') != -1 &&
+          (String(this.dataList.protein).indexOf('.') + 1) >
+          2 || this.dataList.protein && this.dataList.protein > 80 || this.dataList.protein && this.dataList.protein < 0
+          ) {
+          this.$message({
+            message: '蛋白占比输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.impurity && String(this.dataList.impurity).indexOf('.') != -1 &&
           String(this.dataList.impurity).length -
-            (String(this.dataList.impurity).indexOf('.') + 1) >2
-            ||this.dataList.impurity&&this.dataList.impurity>40||this.dataList.impurity&&this.dataList.impurity<0) {
-        this.$message({
-          message: '杂质输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.mildewGrain&&String(this.dataList.mildewGrain).indexOf('.') != -1 &&
+          (String(this.dataList.impurity).indexOf('.') + 1) > 2 ||
+          this.dataList.impurity && this.dataList.impurity > 40 || this.dataList.impurity && this.dataList.impurity < 0
+          ) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.mildewGrain && String(this.dataList.mildewGrain).indexOf('.') != -1 &&
           String(this.dataList.mildewGrain).length -
-            (String(this.dataList.mildewGrain).indexOf('.') + 1) >
-            2||this.dataList.mildewGrain&&this.dataList.mildewGrain>40||this.dataList.mildewGrain&&this.dataList.mildewGrain<0) {
-        this.$message({
-          message: '霉变粒输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.jiaorenli&&String(this.dataList.jiaorenli).indexOf('.') != -1 &&
+          (String(this.dataList.mildewGrain).indexOf('.') + 1) >
+          2 || this.dataList.mildewGrain && this.dataList.mildewGrain > 40 || this.dataList.mildewGrain && this.dataList
+          .mildewGrain < 0) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.jiaorenli && String(this.dataList.jiaorenli).indexOf('.') != -1 &&
           String(this.dataList.jiaorenli).length -
-            (String(this.dataList.jiaorenli).indexOf('.') + 1) >
-            2||this.dataList.jiaorenli&&this.dataList.jiaorenli>40||this.dataList.jiaorenli&&this.dataList.jiaorenli<0) {
-        this.$message({
-          message: '热损伤输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.imperfectGrain&&String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
+          (String(this.dataList.jiaorenli).indexOf('.') + 1) >
+          2 || this.dataList.jiaorenli && this.dataList.jiaorenli > 40 || this.dataList.jiaorenli && this.dataList
+          .jiaorenli < 0) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.imperfectGrain && String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
           String(this.dataList.imperfectGrain).length -
-            (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
-            2||this.dataList.imperfectGrain&&this.dataList.imperfectGrain>40||this.dataList.imperfectGrain&&this.dataList.imperfectGrain<0) {
-        this.$message({
-          message: '不完善粒输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      this.dataList.id = this.$route.query.id
-      this.$confirm(`提交后该销售信息将发布到交易平台,是否确定提交?`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.dataList.validate((valid) => {
-            if (valid) {
-              this.dataList.salePlanNo = 'XSJH' + this.getdate() + this.MathRand()
-              this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
-              this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
-              this.dataList.sendPrivate = CodeToText[this.selectedOptions[0]]
-              this.dataList.sendCity = CodeToText[this.selectedOptions[1]]
-              this.dataList.sendArea = CodeToText[this.selectedOptions[2]]
-              this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
-              // this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
-              this.dataList.unitPrice=this.dataList.salePrice
+          (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
+          2 || this.dataList.imperfectGrain && this.dataList.imperfectGrain > 40 || this.dataList.imperfectGrain && this
+          .dataList.imperfectGrain < 0) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        this.dataList.id = this.$route.query.id
+        this.$confirm(`提交后该销售信息将发布到交易平台,是否确定提交?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.dataList.validate((valid) => {
+              if (valid) {
+                this.dataList.salePlanNo = 'XSJH' + this.getdate() + this.MathRand()
+                this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
+                this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
+                this.dataList.sendPrivate = CodeToText[this.selectedOptions[0]]
+                this.dataList.sendCity = CodeToText[this.selectedOptions[1]]
+                this.dataList.sendArea = CodeToText[this.selectedOptions[2]]
+                this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
+                // this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
+                this.dataList.unitPrice = this.dataList.salePrice
 
-              this.dataList.compId = this.compId
-              this.dataList.pcFlag = 1
-              this.dataList.compId = localStorage.getItem('ws-pf_compId')
-              console.log(this.dataList, '查看添加对象')
-              saleAdd(this.dataList)
-                .toPromise()
-                .then((response) => {
-                  this.$message.success('添加成功')
-                  ;(this.outputYear = ''),
-                    this.$router.push({ path: 'salesPlanList' })
-                })
-            } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
-            }
+                this.dataList.compId = this.compId
+                this.dataList.pcFlag = 1
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                console.log(this.dataList, '查看添加对象')
+                saleAdd(this.dataList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('添加成功');
+                    (this.outputYear = ''),
+                    this.$router.push({
+                      path: 'salesPlanList'
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
           })
-        })
-        .catch(() => {
-          return false
-        })
-    },
+          .catch(() => {
+            return false
+          })
+      },
 
-    selectwarehouseName() {},
-    tarechange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    grossWeightchange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList.goodsNameKey = this.goodnameList[i].constKey
+      selectwarehouseName() {},
+      tarechange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+      },
+      grossWeightchange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectpackingMethod1(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.storageType.length; i++) {
-        if (this.storageType[i].constValue == e) {
-          this.dataList.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType1(e) {
-      for (var i = 0; i < this.storageType1.length; i++) {
-        if (this.storageType1[i].constValue == e) {
-          this.dataList1.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectpackingMethod1(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    tasktypechange() {
-      this.tasknumber()
-    },
-    GetRandomNum(Min, Max) {
-      var Range = Max - Min
-      var Rand = Math.random()
-      return Min + Math.round(Rand * Range)
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.storageType.length; i++) {
+          if (this.storageType[i].constValue == e) {
+            this.dataList.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      selectstorageType1(e) {
+        for (var i = 0; i < this.storageType1.length; i++) {
+          if (this.storageType1[i].constValue == e) {
+            this.dataList1.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      tasktypechange() {
+        this.tasknumber()
+      },
+      GetRandomNum(Min, Max) {
+        var Range = Max - Min
+        var Rand = Math.random()
+        return Min + Math.round(Rand * Range)
+      },
+      // deletecontract(){},
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {},
     },
-    // deletecontract(){},
-    //删除
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {},
-  },
-}
+  }
 </script>
 <style lang="scss" scoped>
-/deep/.basicInformation {
-  .el-info-table {
-    border: none;
+  /deep/.basicInformation {
+    .el-info-table {
+      border: none;
+      position: relative;
+    }
+
+    .el-form-item {
+      width: 33.3333%;
+      border: none;
+      margin: 0;
+
+      .el-form-item__label {
+        text-align: left;
+        font-size: 14px;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #8890b1;
+      }
+
+      .el-form-item__content {
+        padding-left: 0px;
+        padding-right: 10px;
+        // background: #fff;
+        white-space: nowrap;
+        height: 40px;
+        display: flex;
+        -webkit-box-align: center;
+        align-items: center;
+        text-align: left;
+        overflow: hidden;
+      }
+    }
+  }
+
+  /deep/.el-radio {
+    color: #606266;
+    font-weight: 500;
+    line-height: 1;
+    cursor: pointer;
+    white-space: nowrap;
+    outline: 0;
+    margin-right: 30px;
+    margin-top: 15px;
+  }
+
+  /deep/.el-radio__inner {
+    border: 1px solid #dcdfe6;
+    border-radius: 100%;
+    width: 14px;
+    height: 14px;
+    background-color: #fff;
+    cursor: pointer;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    margin-left: 100px;
+  }
+
+  /deep/.el-radio__input {
+    white-space: nowrap;
+    cursor: pointer;
+    outline: 0;
+    line-height: 1;
+    vertical-align: middle;
+    margin-top: -1px;
+  }
+
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 15%;
+    display: flex;
+    flex-wrap: wrap;
+    margin-left: -50px;
+    margin-top: 15px;
+    width: 110%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
     position: relative;
+    top: 50px;
+    width: 40%;
+    margin: 0 auto;
+    margin-right: 180px;
   }
-  .el-form-item {
-    width: 33.3333%;
+
+  /deep/.el-form-item__label {
+    width: 160px;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  /deep/.el-form-item--small .el-form-item__label,
+  .el-form-item--small .el-form-item__content {
+    text-align: left;
+  }
+
+  /deep/.el-input--small {
+    font-size: 14px;
+    position: relative;
+    display: inline-block;
+  }
+
+  .center1 .small-title {
+    margin-left: 323px;
+  }
+
+  .center1 {
+    width: 90%;
+    margin: 0 auto;
+    margin-left: 10px;
+    margin-top: 25px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+  }
+
+  /deep/.el-select {
+    display: inline-block;
+    position: relative;
+    width: 100%;
+  }
+
+  .annu {
+    height: 81px;
+    background: #ffffff;
+    border-radius: 4px;
+  }
+
+  .basicInformation .el-form-item {
+    width: 50.3333%;
     border: none;
     margin: 0;
-    .el-form-item__label {
-      text-align: left;
-      font-size: 14px;
-      font-family: PingFangSC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #8890b1;
-    }
-    .el-form-item__content {
-      padding-left: 0px;
-      padding-right: 10px;
-      // background: #fff;
-      white-space: nowrap;
-      height: 40px;
-      display: flex;
-      -webkit-box-align: center;
-      align-items: center;
-      text-align: left;
-      overflow: hidden;
-    }
   }
-}
-/deep/.el-radio {
-  color: #606266;
-  font-weight: 500;
-  line-height: 1;
-  cursor: pointer;
-  white-space: nowrap;
-  outline: 0;
-  margin-right: 30px;
-  margin-top: 15px;
-}
-/deep/.el-radio__inner {
-  border: 1px solid #dcdfe6;
-  border-radius: 100%;
-  width: 14px;
-  height: 14px;
-  background-color: #fff;
-  cursor: pointer;
-  -webkit-box-sizing: border-box;
-  box-sizing: border-box;
-  margin-left: 100px;
-}
-/deep/.el-radio__input {
-  white-space: nowrap;
-  cursor: pointer;
-  outline: 0;
-  line-height: 1;
-  vertical-align: middle;
-  margin-top: -1px;
-}
-.title {
-  position: relative;
-  padding-left: 10px;
-}
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
-.el-form {
-  padding: 0 15%;
-  display: flex;
-  flex-wrap: wrap;
-  margin-left: -50px;
-  margin-top: 15px;
-  width: 110%;
-}
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-}
-.el-col {
-  background: #f6f7fc;
-}
-.bg-right {
-  text-align: right;
-  padding: 16px 20px;
-}
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  margin: 0 auto;
-  margin-right: 180px;
-}
-/deep/.el-form-item__label {
-  width: 160px;
-}
-.inspector {
-  width: 50%;
-}
-/deep/.el-form-item--small .el-form-item__label,
-.el-form-item--small .el-form-item__content {
-  text-align: left;
-}
-/deep/.el-input--small {
-  font-size: 14px;
-  position: relative;
-  display: inline-block;
-}
-.center1 .small-title {
-  margin-left: 323px;
-}
-.center1 {
-  width: 90%;
-  margin: 0 auto;
-  margin-left: 10px;
-  margin-top: 25px;
-}
-/deep/.el-input--small .el-input__inner {
-  height: 32px;
-  line-height: 32px;
-}
-/deep/.el-select {
-  display: inline-block;
-  position: relative;
-  width: 100%;
-}
-.annu {
-  height: 81px;
-  background: #ffffff;
-  border-radius: 4px;
-}
-.basicInformation .el-form-item {
-  width: 50.3333%;
-  border: none;
-  margin: 0;
-}
-.el-form {
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 16px;
-  margin-left: 130px;
-}
-.a {
-  margin-left: -32px;
-}
-.el-radio-group {
-  margin-left: 80px;
-}
-.ding {
-  height: 23px;
-  background: #e8ecf6;
-  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
-}
-.nav2 {
-  height: 25px;
-  background: #e8ecf6;
-  margin-top: 15px;
-}
-.ziti {
-  width: 72px;
-  height: 20px;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 20px;
-  margin-left: 314px;
-  /* margin-top: 112px; */
-}
-/deep/.ziti1 {
-  height: 40px;
-  font-size: 16px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #262626;
-  line-height: 20px;
-  margin-left: 381px;
-  margin-top: -21px;
-  width: 100px;
-}
-.winseaview-view {
-  padding: 0 0 20px;
-}
-.container {
-  overflow: scroll;
-  height: 93vh;
-}
-/deep/.basicInformation .el-form-item .el-form-item__content {
-  padding-left: 0px;
-  padding-right: 10px;
-  white-space: nowrap;
-  height: 40px;
-  display: -webkit-box;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-box-align: center;
-  -ms-flex-align: center;
-  align-items: center;
-  text-align: left;
-  overflow: hidden;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #232323;
-  line-height: 14px;
-}
-.nav {
-  width: 400px;
-  height: 20px;
-}
-//*号
-.unchangeable {
-  position: absolute;
-  width: 9px;
-  height: 22px;
-  font-size: 16px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #ff2727;
-  line-height: 22px;
-  display: inline-block;
-  right: -1px;
-}
-/deep/.typeselect .el-input__inner {
-  color: #8890b1;
-}
+
+  .el-form {
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+    margin-left: 130px;
+  }
+
+  .a {
+    margin-left: -32px;
+  }
+
+  .el-radio-group {
+    margin-left: 80px;
+  }
+
+  .ding {
+    height: 23px;
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .nav2 {
+    height: 25px;
+    background: #e8ecf6;
+    margin-top: 15px;
+  }
+
+  .ziti {
+    width: 72px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 20px;
+    margin-left: 314px;
+    /* margin-top: 112px; */
+  }
+
+  /deep/.ziti1 {
+    height: 40px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #262626;
+    line-height: 20px;
+    margin-left: 381px;
+    margin-top: -21px;
+    width: 100px;
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.basicInformation .el-form-item .el-form-item__content {
+    padding-left: 0px;
+    padding-right: 10px;
+    white-space: nowrap;
+    height: 40px;
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-align: center;
+    -ms-flex-align: center;
+    align-items: center;
+    text-align: left;
+    overflow: hidden;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #232323;
+    line-height: 14px;
+  }
+
+  .nav {
+    width: 400px;
+    height: 20px;
+  }
+
+  //*号
+  .unchangeable {
+    position: absolute;
+    width: 9px;
+    height: 22px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #ff2727;
+    line-height: 22px;
+    display: inline-block;
+    right: -1px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
 </style>

+ 950 - 1005
src/views/salesManagement/salesPlanEdit.vue

@@ -7,13 +7,8 @@
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
-          <img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt
-          />返回
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt />返回
         </el-button>
       </el-col>
     </el-row>
@@ -30,28 +25,14 @@
           </ws-form-item>
           <!-- 货名 -->
           <ws-form-item label="货名" span="1" prop="goodsName">
-            <ws-select
-              disabled
-              v-model="dataList.goodsName"
-              placeholder
-              class="typeselect"
-              @change="selectgoodsName"
-            >
-              <ws-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select disabled v-model="dataList.goodsName" placeholder class="typeselect" @change="selectgoodsName">
+              <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!-- 计划销售量(吨) -->
           <ws-form-item label="计划销售量(吨)" span="1" prop="plannedSaleVolume">
-            <el-input
-              v-model="dataList.plannedSaleVolume"
-              class="typeselect"
-              placeholder="请输入计划采购量"
-            />
+            <el-input v-model="dataList.plannedSaleVolume" class="typeselect" placeholder="请输入计划采购量" />
           </ws-form-item>
           <!-- 最小成交量 -->
           <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
@@ -59,19 +40,10 @@
           </ws-form-item>
           <!--类型-->
           <ws-form-item label="类型" span="1" prop="salePlanType">
-            <ws-select
-              disabled
-              v-model="dataList.salePlanType"
-              placeholder
-              class="typeselect"
-              @change="selectsalePlanType"
-            >
-              <ws-option
-                v-for="item in salePlanTypeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select disabled v-model="dataList.salePlanType" placeholder class="typeselect"
+              @change="selectsalePlanType">
+              <ws-option v-for="item in salePlanTypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!-- 价格类型 -->
@@ -79,99 +51,44 @@
             <el-input v-model="dataList.priceType" class="typeselect" disabled />
           </ws-form-item>
           <!-- 基差 -->
-          <ws-form-item
-            v-show="dataList.salePlanType=='期货'"
-            label="基差(元/吨)"
-            span="1"
-            prop="basisPrice"
-          >
+          <ws-form-item v-show="dataList.salePlanType=='期货'" label="基差(元/吨)" span="1" prop="basisPrice">
             <el-input v-model="dataList.basisPrice" class="typeselect" placeholder="请输入基差" />
           </ws-form-item>
           <!--销售价格(元)-->
-          <ws-form-item
-            v-show="dataList.salePlanType=='现货'"
-            label="销售价格(元)"
-            span="1"
-            prop="salePrice"
-          >
-            <el-input
-              v-model="dataList.salePrice"
-              maxlength="120"
-              size="small"
-              class="typeselect"
-              placeholder="请输入销售价格"
-            />
+          <ws-form-item v-show="dataList.salePlanType=='现货'" label="销售价格(元)" span="1" prop="salePrice">
+            <el-input type='number' v-model="dataList.salePrice" maxlength="120" size="small" class="typeselect"
+              placeholder="请输入销售价格" />
           </ws-form-item>
           <!--出货库-->
           <ws-form-item label="出货库" span="1" prop="sendWarehouse">
-            <el-select
-              disabled
-              v-model="dataList.sendWarehouse"
-              maxlength="120"
-              size="small"
-              class="typeselect"
-              filterable clearable
-            />
-            <el-option
-              v-for="item in warehouseList1"
-              :key="item.constKey"
-              :label="item.warehouseName"
-              :value="item.warehouseName"
-            ></el-option>
+            <el-select disabled v-model="dataList.sendWarehouse" maxlength="120" size="small" class="typeselect"
+              filterable clearable />
+            <el-option v-for="item in warehouseList1" :key="item.constKey" :label="item.warehouseName"
+              :value="item.warehouseName"></el-option>
           </ws-form-item>
           <!--出货库所在地区-->
-          <ws-form-item label="出货库所在地区" span="1" >
-            <el-cascader
-              :options="options_"
-              v-model="selectedOptions"
-              clearable
-              size="large"
-              class="typeselect"
-              placeholder="请选择出货库所在地区"
-              @change="handleChange"
-              style="width:200%"
-            />
+          <ws-form-item label="出货库所在地区" span="1">
+            <el-cascader :options="options_" v-model="selectedOptions" clearable size="large" class="typeselect"
+              placeholder="请选择出货库所在地区" @change="handleChange" style="width:200%" />
           </ws-form-item>
           <!--运费承担方-->
           <ws-form-item label="运费承担方" span="1" prop="freightPayer">
-            <ws-select
-              v-model="dataList.freightPayer"
-              placeholder
-              class="typeselect"
-              @change="selectfreightPayer"
-            >
-              <ws-option
-                v-for="item in freightPayerList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.freightPayer" placeholder class="typeselect" @change="selectfreightPayer">
+              <ws-option v-for="item in freightPayerList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!--包装方式-->
           <ws-form-item label="包装方式" span="1" prop="packingType">
-            <ws-select
-              v-model="dataList.packingType"
-              placeholder
-              class="typeselect"
-              @change="selectpackingType"
-            >
-              <ws-option
-                v-for="item in packingTypeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.packingType" placeholder class="typeselect" @change="selectpackingType">
+              <ws-option v-for="item in packingTypeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!--装袋备注=-->
           <el-form-item v-if="dataList.packingType != '散装'" label="装袋备注" span="1" prop="baggingNotes">
-            <el-input
-              v-model="dataList.baggingNotes"
-              size="small"
-              class="typeselect"
-              placeholder="请输入装袋要求如:98斤,王中王彩袋"
-            />
+            <el-input v-model="dataList.baggingNotes" size="small" class="typeselect"
+              placeholder="请输入装袋要求如:98斤,王中王彩袋" />
           </el-form-item>
           <!-- 卖方 -->
           <ws-form-item label="卖方" span="1" prop="seller">
@@ -179,27 +96,14 @@
           </ws-form-item>
           <!-- 卖方电话 -->
           <el-form-item label="卖方电话" span="1" prop="sellerPhone">
-            <el-input
-              v-model="dataList.sellerPhone"
-              filterable
-              clearable
-              class="typeselect"
-              placeholder="请输入卖方电话"
-            ></el-input>
+            <el-input v-model="dataList.sellerPhone" filterable clearable class="typeselect" placeholder="请输入卖方电话">
+            </el-input>
           </el-form-item>
-          <el-form-item label="发票费(个人)" span="1" prop="invoiceFeePerson" >
-            <el-input
-              v-model="dataList.invoiceFeePerson"
-              placeholder="请输入发票费(个人)"
-              class="typeselect"
-            ></el-input>
+          <el-form-item label="发票费(个人)" span="1" prop="invoiceFeePerson">
+            <el-input v-model="dataList.invoiceFeePerson" placeholder="请输入发票费(个人)" class="typeselect"></el-input>
           </el-form-item>
-          <el-form-item label="发票费(企业)" span="1" prop="invoiceFeeCompany" >
-            <el-input
-              v-model="dataList.invoiceFeeCompany"
-              placeholder="请输入发票费(企业)"
-              class="typeselect"
-            ></el-input>
+          <el-form-item label="发票费(企业)" span="1" prop="invoiceFeeCompany">
+            <el-input v-model="dataList.invoiceFeeCompany" placeholder="请输入发票费(企业)" class="typeselect"></el-input>
           </el-form-item>
           <div class="small-title"></div>
         </el-form>
@@ -239,62 +143,28 @@
           </el-form-item>
           <!--粒型-->
           <ws-form-item label="粒型" span="1" prop="grain">
-            <ws-select
-              v-model="dataList.grain"
-              placeholder
-              class="typeselect"
-              @change="selectgrain"
-            >
-              <ws-option
-                v-for="item in grainList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.grain" placeholder class="typeselect" @change="selectgrain">
+              <ws-option v-for="item in grainList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!--品级-->
           <ws-form-item label="品级" span="1" prop="grade">
-            <ws-select
-              v-model="dataList.grade"
-              placeholder
-              class="typeselect"
-              @change="selectgrade"
-            >
-              <ws-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <ws-select v-model="dataList.grade" placeholder class="typeselect" @change="selectgrade">
+              <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </ws-select>
           </ws-form-item>
           <!--产地-->
-          <ws-form-item label="产地" span="1" >
-            <el-cascader
-              :options="options1_"
-              v-model="selectedOptions1"
-              clearable
-              size="large"
-              class="typeselect"
-              placeholder="请选择产地"
-              @change="handleChange1"
-              style="width:200%"
-            />
+          <ws-form-item label="产地" span="1">
+            <el-cascader :options="options1_" v-model="selectedOptions1" clearable size="large" class="typeselect"
+              placeholder="请选择产地" @change="handleChange1" style="width:200%" />
           </ws-form-item>
           <!--产出年份-->
           <el-form-item label="产出年份" span="1" prop="outputYear">
 
-        <el-date-picker
-              v-model="dataList.outputYear"
-              type="year"
-              align="right"
-              unlink-panels
-              value-format='yyyy'
-              range-separator="至"
-              placeholder="产出年份"
-              class="typeselect"
-            ></el-date-picker>
+            <el-date-picker v-model="dataList.outputYear" type="year" align="right" unlink-panels value-format='yyyy'
+              range-separator="至" placeholder="产出年份" class="typeselect"></el-date-picker>
           </el-form-item>
         </el-form>
       </div>
@@ -306,890 +176,965 @@
   </div>
 </template>
 <script>
-import {
-  saleLook,
-  saleEdit,
-} from '@/model/salesManagement/index'
-import { regionData, CodeToText, TextToCode ,provinceAndCityData} from 'element-china-area-data'
-import Pagination from '@/components/Pagination'
-import { packList } from '@/model/contarct/index'
-import { mapActions, mapGetters, mapState } from 'vuex'
-import WsUpload from '@/components/WsUpload'
-// import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination
-  },
-  watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
-    isShow(val) {
-      this.showType = val
-    }
-  },
-  computed: {
-    ...mapGetters(['deptBudgetList'])
-  },
-  data() {
-    return {
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-      // 是否显示
-      showType: true,
-      // 年
-      year: '',
-      options1_: provinceAndCityData,
-      options_: regionData,
-      contractNoList: [],
-      deptBudgetTotal: 0,
-      readonly: true,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      searchKeyWord: '',
-      radio: '1',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      goodnameList: [],
-      checked: true,
-      form: {},
+  import {
+    saleLook,
+    saleEdit,
+  } from '@/model/salesManagement/index'
+  import {
+    regionData,
+    CodeToText,
+    TextToCode,
+    provinceAndCityData
+  } from 'element-china-area-data'
+  import Pagination from '@/components/Pagination'
+  import {
+    packList
+  } from '@/model/contarct/index'
+  import {
+    mapActions,
+    mapGetters,
+    mapState
+  } from 'vuex'
+  import WsUpload from '@/components/WsUpload'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination
+    },
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
+      }
+    },
+    computed: {
+      ...mapGetters(['deptBudgetList'])
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        options1_: provinceAndCityData,
+        options_: regionData,
+        contractNoList: [],
+        deptBudgetTotal: 0,
+        readonly: true,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        radio: '1',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: [],
+        checked: true,
+        form: {},
 
-      staffList: [],
-      options: [],
-      storageType: [],
-      storageType1: [],
-      outContractNo: [],
-      // 提交类型
-      submitType: true,
-      status: [],
-      unitPricechange: [],
-      warehouseNameList: [],
-      warehouseNameList1: [],
-      waterContentchange: [],
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      warehouseInOutDetail: {},
-      onChange: {},
-      deptBudgetList1: [],
-      gradeList: [],
-      rules: {
-        netWeight: [
-          {
+        staffList: [],
+        options: [],
+        storageType: [],
+        storageType1: [],
+        outContractNo: [],
+        // 提交类型
+        submitType: true,
+        status: [],
+        unitPricechange: [],
+        warehouseNameList: [],
+        warehouseNameList1: [],
+        waterContentchange: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        warehouseInOutDetail: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        rules: {
+          netWeight: [{
             required: true,
             type: 'number',
             message: '请输入活动名称',
             trigger: 'blur'
+          }]
+        },
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM')
+        },
+        contractList: [],
+        inOutTaskNo: '',
+        inOutTaskNo1: '',
+        freightPayerList: '',
+        packingTypeList: '',
+        dataList: {
+          taskTypeKey: '1'
+        },
+        dataList1: {
+          taskTypeKey: '1'
+        },
+        historyList: [],
+        salePlanTypeList: [],
+        selectedOptions: [],
+        selectedOptions1: [],
+        grainList: [],
+        warehouseNameList: [],
+        warehouseNameList1: [],
+        warehouseList1: [],
+        pickerBeginDateBefore: {
+          disabledDate: time => {
+            return time.getTime() > Date.now()
           }
-        ]
+        },
+        accessoryTFs: false
+      }
+    },
+    activated() {
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    mounted() {},
+    methods: {
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
       },
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      deptCircularPage: {},
-      packtypeList: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM')
+      returnsales() {
+        this.dataList = {}
+        // this.selectedOptions = ''
+        this.$router.go(-1)
       },
-      contractList: [],
-      inOutTaskNo: '',
-      inOutTaskNo1: '',
-      freightPayerList: '',
-      packingTypeList: '',
-      dataList: { taskTypeKey: '1' },
-      dataList1: { taskTypeKey: '1' },
-      historyList: [],
-      salePlanTypeList:[],
-      selectedOptions:[],
-      selectedOptions1: [],
-      grainList: [],
-      warehouseNameList: [],
-      warehouseNameList1: [],
-      warehouseList1: [],
-      pickerBeginDateBefore: {
-        disabledDate: time => {
-          return time.getTime() > Date.now()
+      // 获取当前年月日
+      getdate() {
+        var date = new Date()
+        var year = date.getFullYear() //获取完整的年份(4位)
+        var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+        var datetime = date.getDate() //获取当前日(1-31)
+        if (mouth < 10) {
+          mouth = '0' + mouth
+        }
+        if (datetime < 10) {
+          datetime = '0' + datetime
         }
+        return year + '' + mouth + datetime
       },
-      accessoryTFs: false
-    }
-  },
-  activated() {
-    this.loaddata()
-    this.showType = this.isShow
-  },
-  mounted() {},
-  methods: {
-    //返回按钮
-    revert() {
-      this.$router.go(-1)
-    },
-    returnsales() {
-      this.dataList = {}
-      // this.selectedOptions = ''
-      this.$router.go(-1)
-    },
-    // 获取当前年月日
-    getdate() {
-      var date = new Date()
-      var year = date.getFullYear() //获取完整的年份(4位)
-      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
-      var datetime = date.getDate() //获取当前日(1-31)
-      if (mouth < 10) {
-        mouth = '0' + mouth
-      }
-      if (datetime < 10) {
-        datetime = '0' + datetime
-      }
-      return year +'' + mouth + datetime
-    },
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.deptBudgetList.staffList = val
-      if (val) {
-        //val存在
-        this.options = this.staffList.filter(item => {
-          if (
-            !!~item.staffName.indexOf(val) ||
-            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter(item => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
           }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options = this.staffList
-      }
-    },
-    
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
         }
-      }
-    },
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList.agentKey = this.staffList[i].staffId
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectstaff1(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList1.agentKey = this.staffList[i].staffId
+      },
+      selectstaff1(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList1.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectgrain(e) {
-      for (var i = 0; i < this.grainList.length; i++) {
-        if (this.grainList[i].constValue == e) {
-          this.dataList.grainKey = this.grainList[i].constKey
+      },
+      selectgrain(e) {
+        for (var i = 0; i < this.grainList.length; i++) {
+          if (this.grainList[i].constValue == e) {
+            this.dataList.grainKey = this.grainList[i].constKey
+          }
         }
-      }
-    },
-    selectpackingType(e) {
-      for (var i = 0; i < this.packingTypeList.length; i++) {
-        if (this.packingTypeList[i].constValue == e) {
-          this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+      },
+      selectpackingType(e) {
+        for (var i = 0; i < this.packingTypeList.length; i++) {
+          if (this.packingTypeList[i].constValue == e) {
+            this.dataList.packingTypeKey = this.packingTypeList[i].constKey
+          }
         }
-      }
-    },
-    selectfreightPayer(e) {
-      for (var i = 0; i < this.freightPayerList.length; i++) {
-        if (this.freightPayerList[i].constValue == e) {
-          this.dataList.freightPayerKey = this.freightPayerList[i].constKey
+      },
+      selectfreightPayer(e) {
+        for (var i = 0; i < this.freightPayerList.length; i++) {
+          if (this.freightPayerList[i].constValue == e) {
+            this.dataList.freightPayerKey = this.freightPayerList[i].constKey
+          }
         }
-      }
-    },
-    selectgrade(e) {
-      for (var i = 0; i < this.gradeList.length; i++) {
-        if (this.gradeList[i].constValue == e) {
-          this.dataList.gradeKey = this.gradeList[i].constKey
+      },
+      selectgrade(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.dataList.gradeKey = this.gradeList[i].constKey
+          }
         }
-      }
-    },
-    selectsalePlanType(e) {
-      for (var i = 0; i < this.salePlanTypeList.length; i++) {
-        if (this.salePlanTypeList[i].constValue == e) {
-          this.dataList.salePlanTypeKey = this.salePlanTypeList[
-            i
-          ].constKey
+      },
+      selectsalePlanType(e) {
+        for (var i = 0; i < this.salePlanTypeList.length; i++) {
+          if (this.salePlanTypeList[i].constValue == e) {
+            this.dataList.salePlanTypeKey = this.salePlanTypeList[
+              i
+            ].constKey
+          }
         }
-      }
-    },
-    handleChange(value) {
-      this.selectedOptions = value
-      this.dataList.sendPrivate = CodeToText[value[0]]
-      this.dataList.sendCity = CodeToText[value[1]]
-      this.dataList.sendArea = CodeToText[value[2]]
-    },
-    handleChange1(value) {
-      this.selectedOptions1 = value
-      this.dataList.outputPrivate = CodeToText[value[0]]
-      // this.dataList.outputCity = CodeToText[value[1]]
-    },
-    submit() {
-      if (this.outputYear) {
-        this.startDate = this.dateFormat('YYYY-mm-dd', this.outputYear[0])
-        this.endDate = this.dateFormat('YYYY-mm-dd', this.outputYear[1])
-      } else {
-        this.startDate = ''
-        this.endDate = ''
-      }
-      // this.getList()
-    },
-    //关闭
-    close() {
-      this.$router.push({ path: 'procurementPlanList' })
-    },
-    
-    loaddata() {
-       saleLook({ id: this.$route.query.id })
-        .toPromise()
-        .then((response) => {
-          this.dataList = response
-          var tmp = []
-          tmp[0] = TextToCode[this.dataList.sendPrivate].code
-          tmp[1] = TextToCode[this.dataList.sendPrivate][this.dataList.sendCity].code
-          tmp[2] = TextToCode[this.dataList.sendPrivate][this.dataList.sendCity][this.dataList.sendArea].code
-          this.selectedOptions = tmp
-          var tmp1 = []
-          tmp1[0] = TextToCode[this.dataList.outputPrivate].code
-          // tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
-          this.selectedOptions1 = tmp1
-        })
-      // 货名
-      packList({ constId: 'CON2' })
-        .toPromise()
-        .then(response => {
-          this.goodnameList = response
-        })
-      // 品级
-      packList({ constId: 'CON3' })
-        .toPromise()
-        .then(response => {
-          this.gradeList = response
-        })
-      //粒形
-      packList({ constId: 'PRO4' })
-        .toPromise()
-        .then(response => {
-          this.grainList = response
-        })
-      //类型
-      packList({ constId: 'PRO1' })
-        .toPromise()
-        .then(response => {
-          this.salePlanTypeList = response
-        })
-      //包装方式
-      packList({ constId: 'PRO2' })
-        .toPromise()
-        .then(response => {
-          this.packingTypeList = response
-        })
-      //运费承担方
-      packList({ constId: 'PRO3' })
-        .toPromise()
-        .then(response => {
-          this.freightPayerList = response
-        })
-    },
-    submit() {
-      if (!this.dataList.title) {
-        this.$message({
-          message: '标题不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.title.length > 16) {
-        this.$message({
-          message: '标题输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.plannedSaleVolume) {
-        this.$message({
-          message: '计划销售量不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.plannedSaleVolume > 10000000 ||
-        this.dataList.plannedSaleVolume < 1
-      ) {
-        this.$message({
-          message: '计划销售量输入错误!',
-          type: 'warning',
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+        this.dataList.sendPrivate = CodeToText[value[0]]
+        this.dataList.sendCity = CodeToText[value[1]]
+        this.dataList.sendArea = CodeToText[value[2]]
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+        this.dataList.outputPrivate = CodeToText[value[0]]
+        // this.dataList.outputCity = CodeToText[value[1]]
+      },
+      submit() {
+        if (this.outputYear) {
+          this.startDate = this.dateFormat('YYYY-mm-dd', this.outputYear[0])
+          this.endDate = this.dateFormat('YYYY-mm-dd', this.outputYear[1])
+        } else {
+          this.startDate = ''
+          this.endDate = ''
+        }
+        // this.getList()
+      },
+      //关闭
+      close() {
+        this.$router.push({
+          path: 'procurementPlanList'
         })
-        return
-      }
-      if (this.dataList.plannedSaleVolume.toString().indexOf('.') != -1) {
-        if (this.dataList.plannedSaleVolume.toString().split('.')[1].length > 2) {
+      },
+
+      loaddata() {
+        saleLook({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.dataList = response
+            var tmp = []
+            tmp[0] = TextToCode[this.dataList.sendPrivate].code
+            tmp[1] = TextToCode[this.dataList.sendPrivate][this.dataList.sendCity].code
+            tmp[2] = TextToCode[this.dataList.sendPrivate][this.dataList.sendCity][this.dataList.sendArea].code
+            this.selectedOptions = tmp
+            var tmp1 = []
+            tmp1[0] = TextToCode[this.dataList.outputPrivate].code
+            // tmp1[1] = TextToCode[this.dataList.outputPrivate][this.dataList.outputCity].code
+            this.selectedOptions1 = tmp1
+          })
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then(response => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then(response => {
+            this.gradeList = response
+          })
+        //粒形
+        packList({
+            constId: 'PRO4'
+          })
+          .toPromise()
+          .then(response => {
+            this.grainList = response
+          })
+        //类型
+        packList({
+            constId: 'PRO1'
+          })
+          .toPromise()
+          .then(response => {
+            this.salePlanTypeList = response
+          })
+        //包装方式
+        packList({
+            constId: 'PRO2'
+          })
+          .toPromise()
+          .then(response => {
+            this.packingTypeList = response
+          })
+        //运费承担方
+        packList({
+            constId: 'PRO3'
+          })
+          .toPromise()
+          .then(response => {
+            this.freightPayerList = response
+          })
+      },
+      submit() {
+        if (!this.dataList.title) {
+          this.$message({
+            message: '标题不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.title.length > 16) {
+          this.$message({
+            message: '标题输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.plannedSaleVolume) {
+          this.$message({
+            message: '计划销售量不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.plannedSaleVolume > 10000000 ||
+          this.dataList.plannedSaleVolume < 1
+        ) {
           this.$message({
             message: '计划销售量输入错误!',
             type: 'warning',
           })
           return
         }
-      }
-      if (!this.dataList.minimumVolume) {
-        this.$message({
-          message: '最小成交量不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.minimumVolume > 10000000 ||
-        this.dataList.minimumVolume < 1
-      ) {
-        this.$message({
-          message: '最小成交量输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.minimumVolume.toString().indexOf('.') != -1 &&
-        this.dataList.minimumVolume.toString().split('.')[1].length > 2
-      ) {
-        this.$message({
-          message: '最小成交量输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.basisPrice > 100000 ||
-        this.dataList.basisPrice < 0 ||
-        (String(this.dataList.basisPrice).indexOf(
-          '.'
-        ) != -1 &&
-          String(this.dataList.basisPrice).length -
-            (String(this.dataList.basisPrice).indexOf(
+        if (this.dataList.plannedSaleVolume.toString().indexOf('.') != -1) {
+          if (this.dataList.plannedSaleVolume.toString().split('.')[1].length > 2) {
+            this.$message({
+              message: '计划销售量输入错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (!this.dataList.minimumVolume) {
+          this.$message({
+            message: '最小成交量不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.minimumVolume > 10000000 ||
+          this.dataList.minimumVolume < 1
+        ) {
+          this.$message({
+            message: '最小成交量输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.minimumVolume.toString().indexOf('.') != -1 &&
+          this.dataList.minimumVolume.toString().split('.')[1].length > 2
+        ) {
+          this.$message({
+            message: '最小成交量输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.basisPrice > 100000 ||
+          this.dataList.basisPrice < 0 ||
+          (String(this.dataList.basisPrice).indexOf(
               '.'
-            ) +
+            ) != -1 &&
+            String(this.dataList.basisPrice).length -
+            (String(this.dataList.basisPrice).indexOf(
+                '.'
+              ) +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '基差输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.salePrice > 100000 ||
-        this.dataList.salePrice < 0 ||
-        (String(this.dataList.salePrice).indexOf(
-          '.'
-        ) != -1 &&
-          String(this.dataList.salePrice).length -
-            (String(this.dataList.salePrice).indexOf(
+        ) {
+          this.$message({
+            message: '基差输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.salePrice > 100000 ||
+          this.dataList.salePrice < 0 ||
+          (String(this.dataList.salePrice).indexOf(
               '.'
-            ) +
+            ) != -1 &&
+            String(this.dataList.salePrice).length -
+            (String(this.dataList.salePrice).indexOf(
+                '.'
+              ) +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '销售价格输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.sendWarehouse) {
-        this.$message({
-          message: '请选择出货库',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.seller) {
-        this.$message({
-          message: '卖方不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.seller.length > 25 || this.dataList.seller.length < 1) {
-        this.$message({
-          message: '卖方输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.sellerPhone) {
-        this.$message({
-          message: '请输入卖方电话!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.sellerPhone.length != 11) {
-        this.$message({
-          message: '卖方电话输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.waterContent) {
-        this.$message({
-          message: '水分不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.waterContent > 40 || this.dataList.waterContent < 0) {
-        this.$message({
-          message: '水分输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        String(this.dataList.waterContent).indexOf('.') != -1 &&
-        String(this.dataList.waterContent).length -
+        ) {
+          this.$message({
+            message: '销售价格输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.sendWarehouse) {
+          this.$message({
+            message: '请选择出货库',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.seller) {
+          this.$message({
+            message: '卖方不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.seller.length > 25 || this.dataList.seller.length < 1) {
+          this.$message({
+            message: '卖方输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.sellerPhone) {
+          this.$message({
+            message: '请输入卖方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.sellerPhone.length != 11) {
+          this.$message({
+            message: '卖方电话输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.waterContent) {
+          this.$message({
+            message: '水分不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.waterContent > 40 || this.dataList.waterContent < 0) {
+          this.$message({
+            message: '水分输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          String(this.dataList.waterContent).indexOf('.') != -1 &&
+          String(this.dataList.waterContent).length -
           (String(this.dataList.waterContent).indexOf('.') + 1) >
           2
-      ) {
-        this.$message({
-          message: '水分输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.bulkDensity) {
-        this.$message({
-          message: '容重不能为空!',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        (this.dataList.bulkDensity &&
-          String(this.dataList.bulkDensity).indexOf('.') != -1 &&
-          String(this.dataList.bulkDensity).length -
+        ) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.bulkDensity) {
+          this.$message({
+            message: '容重不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          (this.dataList.bulkDensity &&
+            String(this.dataList.bulkDensity).indexOf('.') != -1 &&
+            String(this.dataList.bulkDensity).length -
             (String(this.dataList.bulkDensity).indexOf('.') + 1) >
             2) ||
-        this.dataList.bulkDensity > 1000 ||
-        this.dataList.bulkDensity < 0
-      ) {
-        this.$message({
-          message: '容重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.protein&&String(this.dataList.protein).indexOf('.') != -1 &&
+          this.dataList.bulkDensity > 1000 ||
+          this.dataList.bulkDensity < 0
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.protein && String(this.dataList.protein).indexOf('.') != -1 &&
           String(this.dataList.protein).length -
-            (String(this.dataList.protein).indexOf('.') + 1) >
-            2||this.dataList.protein&&this.dataList.protein>80||this.dataList.protein&&this.dataList.protein<0){
-        this.$message({
-          message: '蛋白占比输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.impurity&&String(this.dataList.impurity).indexOf('.') != -1 &&
+          (String(this.dataList.protein).indexOf('.') + 1) >
+          2 || this.dataList.protein && this.dataList.protein > 80 || this.dataList.protein && this.dataList.protein < 0
+          ) {
+          this.$message({
+            message: '蛋白占比输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.impurity && String(this.dataList.impurity).indexOf('.') != -1 &&
           String(this.dataList.impurity).length -
-            (String(this.dataList.impurity).indexOf('.') + 1) >2
-            ||this.dataList.impurity&&this.dataList.impurity>40||this.dataList.impurity&&this.dataList.impurity<0) {
-        this.$message({
-          message: '杂质输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.mildewGrain&&String(this.dataList.mildewGrain).indexOf('.') != -1 &&
+          (String(this.dataList.impurity).indexOf('.') + 1) > 2 ||
+          this.dataList.impurity && this.dataList.impurity > 40 || this.dataList.impurity && this.dataList.impurity < 0
+          ) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.mildewGrain && String(this.dataList.mildewGrain).indexOf('.') != -1 &&
           String(this.dataList.mildewGrain).length -
-            (String(this.dataList.mildewGrain).indexOf('.') + 1) >
-            2||this.dataList.mildewGrain&&this.dataList.mildewGrain>40||this.dataList.mildewGrain&&this.dataList.mildewGrain<0) {
-        this.$message({
-          message: '霉变粒输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.jiaorenli&&String(this.dataList.jiaorenli).indexOf('.') != -1 &&
+          (String(this.dataList.mildewGrain).indexOf('.') + 1) >
+          2 || this.dataList.mildewGrain && this.dataList.mildewGrain > 40 || this.dataList.mildewGrain && this.dataList
+          .mildewGrain < 0) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.jiaorenli && String(this.dataList.jiaorenli).indexOf('.') != -1 &&
           String(this.dataList.jiaorenli).length -
-            (String(this.dataList.jiaorenli).indexOf('.') + 1) >
-            2||this.dataList.jiaorenli&&this.dataList.jiaorenli>40||this.dataList.jiaorenli&&this.dataList.jiaorenli<0) {
-        this.$message({
-          message: '热损伤输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      if (
-        this.dataList.imperfectGrain&&String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
+          (String(this.dataList.jiaorenli).indexOf('.') + 1) >
+          2 || this.dataList.jiaorenli && this.dataList.jiaorenli > 40 || this.dataList.jiaorenli && this.dataList
+          .jiaorenli < 0) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        if (
+          this.dataList.imperfectGrain && String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
           String(this.dataList.imperfectGrain).length -
-            (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
-            2||this.dataList.imperfectGrain&&this.dataList.imperfectGrain>40||this.dataList.imperfectGrain&&this.dataList.imperfectGrain<0) {
-        this.$message({
-          message: '不完善粒输入错误',
-          type: 'warning'
-        })
-        return
-      }
-      this.dataList.id = this.$route.query.id
-      this.$confirm(`提交后该销售信息将发布到交易平台,是否确定提交?`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning'
-      })
-        .then(() => {
-          this.$refs.dataList.validate((valid) => {
-            if (valid) {
-              // this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
-              // this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
-              this.dataList.sendPrivate = CodeToText[this.selectedOptions[0]]
-              this.dataList.sendCity = CodeToText[this.selectedOptions[1]]
-              this.dataList.sendArea = CodeToText[this.selectedOptions[2]]
-              this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
-              // this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
+          (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
+          2 || this.dataList.imperfectGrain && this.dataList.imperfectGrain > 40 || this.dataList.imperfectGrain && this
+          .dataList.imperfectGrain < 0) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning'
+          })
+          return
+        }
+        this.dataList.id = this.$route.query.id
+        this.$confirm(`提交后该销售信息将发布到交易平台,是否确定提交?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+          .then(() => {
+            this.$refs.dataList.validate((valid) => {
+              if (valid) {
+                // this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
+                // this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
+                this.dataList.sendPrivate = CodeToText[this.selectedOptions[0]]
+                this.dataList.sendCity = CodeToText[this.selectedOptions[1]]
+                this.dataList.sendArea = CodeToText[this.selectedOptions[2]]
+                this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
+                // this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
 
-              this.dataList.compId = this.compId
-              this.dataList.compId = localStorage.getItem('ws-pf_compId')
-              this.dataList.unitPrice=this.dataList.salePrice
-              saleEdit(this.dataList)
-                .toPromise()
-                .then((response) => {
-                  this.$message.success('编辑成功')
-                  ;(this.outputYear = ''),
-                    this.$router.push({ path: 'salesPlanList' })
-                })
-            } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
-            }
+                this.dataList.compId = this.compId
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                this.dataList.unitPrice = this.dataList.salePrice
+                saleEdit(this.dataList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('编辑成功');
+                    (this.outputYear = ''),
+                    this.$router.push({
+                      path: 'salesPlanList'
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
           })
-        })
-        .catch(() => {
-          return false
-        })
-    },
+          .catch(() => {
+            return false
+          })
+      },
 
-    selectwarehouseName() {},
-    tarechange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    grossWeightchange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList.goodsNameKey = this.goodnameList[i].constKey
+      selectwarehouseName() {},
+      tarechange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+      },
+      grossWeightchange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectpackingMethod1(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.storageType.length; i++) {
-        if (this.storageType[i].constValue == e) {
-          this.dataList.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType1(e) {
-      for (var i = 0; i < this.storageType1.length; i++) {
-        if (this.storageType1[i].constValue == e) {
-          this.dataList1.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectpackingMethod1(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    tasktypechange() {
-      this.tasknumber()
-    },
-    GetRandomNum(Min, Max) {
-      var Range = Max - Min
-      var Rand = Math.random()
-      return Min + Math.round(Rand * Range)
-    },
-    // deletecontract(){},
-    //删除
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {}
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.storageType.length; i++) {
+          if (this.storageType[i].constValue == e) {
+            this.dataList.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      selectstorageType1(e) {
+        for (var i = 0; i < this.storageType1.length; i++) {
+          if (this.storageType1[i].constValue == e) {
+            this.dataList1.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      tasktypechange() {
+        this.tasknumber()
+      },
+      GetRandomNum(Min, Max) {
+        var Range = Max - Min
+        var Rand = Math.random()
+        return Min + Math.round(Rand * Range)
+      },
+      // deletecontract(){},
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {}
+    }
   }
-}
 </script>
 <style lang="scss" scoped>
-/deep/.basicInformation {
-  .el-info-table {
-    border: none;
+  /deep/.basicInformation {
+    .el-info-table {
+      border: none;
+      position: relative;
+    }
+
+    .el-form-item {
+      width: 33.3333%;
+      border: none;
+      margin: 0;
+
+      .el-form-item__label {
+        text-align: left;
+        font-size: 14px;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #8890b1;
+      }
+
+      .el-form-item__content {
+        padding-left: 0px;
+        padding-right: 10px;
+        // background: #fff;
+        white-space: nowrap;
+        height: 40px;
+        display: flex;
+        -webkit-box-align: center;
+        align-items: center;
+        text-align: left;
+        overflow: hidden;
+
+      }
+    }
+  }
+
+  /deep/.el-radio {
+    color: #606266;
+    font-weight: 500;
+    line-height: 1;
+    cursor: pointer;
+    white-space: nowrap;
+    outline: 0;
+    margin-right: 30px;
+    margin-top: 15px;
+  }
+
+  /deep/.el-radio__inner {
+    border: 1px solid #dcdfe6;
+    border-radius: 100%;
+    width: 14px;
+    height: 14px;
+    background-color: #fff;
+    cursor: pointer;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    margin-left: 100px;
+  }
+
+  /deep/.el-radio__input {
+    white-space: nowrap;
+    cursor: pointer;
+    outline: 0;
+    line-height: 1;
+    vertical-align: middle;
+    margin-top: -1px;
+  }
+
+  .title {
     position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
   }
-  .el-form-item {
-    width: 33.3333%;
+
+  .el-form {
+    padding: 0 15%;
+    display: flex;
+    flex-wrap: wrap;
+    margin-left: -50px;
+    margin-top: 15px;
+    width: 110%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+    margin-right: 180px;
+  }
+
+  /deep/.el-form-item__label {
+    width: 160px;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  /deep/.el-form-item--small .el-form-item__label,
+  .el-form-item--small .el-form-item__content {
+    text-align: left;
+  }
+
+  /deep/.el-input--small {
+    font-size: 14px;
+    position: relative;
+    display: inline-block;
+  }
+
+  .center1 .small-title {
+    margin-left: 323px;
+  }
+
+  .center1 {
+    width: 90%;
+    margin: 0 auto;
+    margin-left: 10px;
+    margin-top: 25px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+  }
+
+  /deep/.el-select {
+    display: inline-block;
+    position: relative;
+    width: 100%;
+  }
+
+  .annu {
+    height: 81px;
+    background: #ffffff;
+    border-radius: 4px;
+  }
+
+  .basicInformation .el-form-item {
+    width: 50.3333%;
     border: none;
     margin: 0;
-    .el-form-item__label {
-      text-align: left;
-      font-size: 14px;
-      font-family: PingFangSC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #8890b1;
-    }
-    .el-form-item__content {
-      padding-left: 0px;
-      padding-right: 10px;
-      // background: #fff;
-      white-space: nowrap;
-      height: 40px;
-      display: flex;
-      -webkit-box-align: center;
-      align-items: center;
-      text-align: left;
-      overflow: hidden;
-      
-    }
   }
-}
-/deep/.el-radio {
-  color: #606266;
-  font-weight: 500;
-  line-height: 1;
-  cursor: pointer;
-  white-space: nowrap;
-  outline: 0;
-  margin-right: 30px;
-  margin-top: 15px;
-}
-/deep/.el-radio__inner {
-  border: 1px solid #dcdfe6;
-  border-radius: 100%;
-  width: 14px;
-  height: 14px;
-  background-color: #fff;
-  cursor: pointer;
-  -webkit-box-sizing: border-box;
-  box-sizing: border-box;
-  margin-left: 100px;
-}
-/deep/.el-radio__input {
-  white-space: nowrap;
-  cursor: pointer;
-  outline: 0;
-  line-height: 1;
-  vertical-align: middle;
-  margin-top: -1px;
-}
-.title {
-  position: relative;
-  padding-left: 10px;
-}
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
-.el-form {
-  padding: 0 15%;
-  display: flex;
-  flex-wrap: wrap;
-  margin-left: -50px;
-  margin-top: 15px;
-  width: 110%;
-}
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-}
-.el-col {
-  background: #f6f7fc;
-}
-.bg-right {
-  text-align: right;
-  padding: 16px 20px;
-}
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  height: 2000px;
-  margin: 0 auto;
-  margin-right: 180px;
-}
-/deep/.el-form-item__label {
-  width: 160px;
-}
-.inspector {
-  width: 50%;
-}
-/deep/.el-form-item--small .el-form-item__label,
-.el-form-item--small .el-form-item__content {
-  text-align: left;
-}
-/deep/.el-input--small {
-  font-size: 14px;
-  position: relative;
-  display: inline-block;
-}
-.center1 .small-title {
-  margin-left: 323px;
-}
-.center1 {
-  width: 90%;
-  margin: 0 auto;
-  margin-left: 10px;
-  margin-top: 25px;
-}
-/deep/.el-input--small .el-input__inner {
-  height: 32px;
-  line-height: 32px;
-}
-/deep/.el-select {
-  display: inline-block;
-  position: relative;
-  width: 100%;
-}
-.annu {
-  height: 81px;
-  background: #ffffff;
-  border-radius: 4px;
-}
-.basicInformation .el-form-item {
-  width: 50.3333%;
-  border: none;
-  margin: 0;
-}
-.el-form {
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 16px;
-  margin-left: 130px;
-}
-.a {
-  margin-left: -32px;
-}
-.el-radio-group {
-  margin-left: 80px;
-}
-.ding {
-  height: 23px;
-  background: #e8ecf6;
-  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
-}
-.nav2 {
-  height: 25px;
-  background: #e8ecf6;
-  margin-top: 15px;
-}
-.ziti {
-  width: 72px;
-  height: 20px;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 20px;
-  margin-left: 314px;
-  /* margin-top: 112px; */
-}
-/deep/.ziti1 {
-  height: 40px;
-  font-size: 16px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #262626;
-  line-height: 20px;
-  margin-left: 381px;
-  margin-top: -21px;
-  width: 100px;
-}
-.winseaview-view {
-  padding: 0 0 20px;
-}
-.container {
-  overflow: scroll;
-  height: 93vh;
-}
-/deep/.basicInformation .el-form-item .el-form-item__content {
-  padding-left: 0px;
-  padding-right: 10px;
-  white-space: nowrap;
-  height: 40px;
-  display: -webkit-box;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-box-align: center;
-  -ms-flex-align: center;
-  align-items: center;
-  text-align: left;
-  overflow: hidden;
-  font-size: 12px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #232323;
-  line-height: 14px;
-}
-.nav {
-  width: 400px;
-  height: 20px;
-}
-.readonly :after {
-  content: '*';
-  color: #ff2727;
-  position: absolute;
-  right: 8px;
-  z-index: 10;
-  top: 21%;
-  font-size: 20px;
-}
-/deep/.typeselect .el-input__inner {
-  color: #8890b1;
-}
+
+  .el-form {
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+    margin-left: 130px;
+  }
+
+  .a {
+    margin-left: -32px;
+  }
+
+  .el-radio-group {
+    margin-left: 80px;
+  }
+
+  .ding {
+    height: 23px;
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .nav2 {
+    height: 25px;
+    background: #e8ecf6;
+    margin-top: 15px;
+  }
+
+  .ziti {
+    width: 72px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 20px;
+    margin-left: 314px;
+    /* margin-top: 112px; */
+  }
+
+  /deep/.ziti1 {
+    height: 40px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #262626;
+    line-height: 20px;
+    margin-left: 381px;
+    margin-top: -21px;
+    width: 100px;
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.basicInformation .el-form-item .el-form-item__content {
+    padding-left: 0px;
+    padding-right: 10px;
+    white-space: nowrap;
+    height: 40px;
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-align: center;
+    -ms-flex-align: center;
+    align-items: center;
+    text-align: left;
+    overflow: hidden;
+    font-size: 12px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #232323;
+    line-height: 14px;
+  }
+
+  .nav {
+    width: 400px;
+    height: 20px;
+  }
+
+  .readonly :after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
 </style>

+ 541 - 514
src/views/salesManagement/salesPlanLook.vue

@@ -7,13 +7,8 @@
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
-          <img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt
-          />返回
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt />返回
         </el-button>
       </el-col>
     </el-row>
@@ -49,16 +44,11 @@
             <el-input v-model="dataList.priceType" placeholder class="typeselect" disabled></el-input>
           </el-form-item>
           <ws-form-item v-show="dataList.salePlanType=='期货'" label="基差(元/吨)" span="1" prop="basisPrice">
-            <el-input v-model="dataList.basisPrice" disabled   maxlength="120" size="small" />
+            <el-input v-model="dataList.basisPrice" disabled maxlength="120" size="small" />
           </ws-form-item>
           <!--销售价格(元)-->
-         <ws-form-item v-show="dataList.salePlanType=='现货'" label="销售价格(元)" span="1" prop="salePrice">
-            <el-input
-            disabled
-              v-model="dataList.salePrice"
-              maxlength="120"
-              size="small"
-            />
+          <ws-form-item v-show="dataList.salePlanType=='现货'" label="销售价格(元)" span="1" prop="salePrice">
+            <el-input type='number' disabled v-model="dataList.salePrice" maxlength="120" size="small" />
           </ws-form-item>
           <!--出货库-->
           <el-form-item label="出货库" span="1">
@@ -67,7 +57,7 @@
           <!--出货库所在地区-->
           <el-form-item label="出货库所在地区" span="1">
             <div class="forlist">
-           {{dataList.sendPrivate}}{{dataList.sendCity}}{{dataList.sendArea}}
+              {{dataList.sendPrivate}}{{dataList.sendCity}}{{dataList.sendArea}}
             </div>
           </el-form-item>
           <!--运费承担方-->
@@ -136,20 +126,13 @@
           <!--产地-->
           <el-form-item label="产地" span="1">
             <div class="forlist">
-            {{dataList.outputPrivate}}{{dataList.outputCity}}
+              {{dataList.outputPrivate}}{{dataList.outputCity}}
             </div>
           </el-form-item>
           <!--产出年份-->
-           <el-form-item label="产出年份" span="1" prop="outputYear">
-           <el-date-picker
-              disabled
-              v-model="dataList.outputYear"
-              type="year"
-              align="right"
-              unlink-panels
-              range-separator="至"
-              placeholder="产出年份"
-            ></el-date-picker>
+          <el-form-item label="产出年份" span="1" prop="outputYear">
+            <el-date-picker disabled v-model="dataList.outputYear" type="year" align="right" unlink-panels
+              range-separator="至" placeholder="产出年份"></el-date-picker>
           </el-form-item>
         </el-form>
       </div>
@@ -161,519 +144,563 @@
   </div>
 </template>
 <script>
-import {
-  saleLook,
-} from '@/model/salesManagement/index'
-import Pagination from '@/components/Pagination'
-import WsUpload from '@/components/WsUpload'
-// import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination
-  },
-  watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
-    isShow(val) {
-      this.showType = val
-    }
-  },
-  computed: {
-    ...mapGetters(['deptBudgetList'])
-  },
-  data() {
-    return {
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-      // 是否显示
-      showType: true,
-      // 年
-      year: '',
-      contractNoList: [],
-      deptBudgetTotal: 0,
-      readonly: true,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      searchKeyWord: '',
-      radio: '1',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      goodnameList: [],
-      checked: true,
-      form: {},
-
-      staffList: [],
-      options: [],
-      storageType: [],
-      storageType1: [],
-      outContractNo: [],
-      // 提交类型
-      submitType: true,
-      status: [],
-      unitPricechange: [],
-      warehouseNameList: [],
-      warehouseNameList1: [],
-      waterContentchange: [],
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      warehouseInOutDetail: {},
-      onChange: {},
-      deptBudgetList1: [],
-      gradeList: [],
-      rules: {
-        netWeight: [
-          {
+  import {
+    saleLook,
+  } from '@/model/salesManagement/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination
+    },
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
+      }
+    },
+    computed: {
+      ...mapGetters(['deptBudgetList'])
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        contractNoList: [],
+        deptBudgetTotal: 0,
+        readonly: true,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        radio: '1',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: [],
+        checked: true,
+        form: {},
+
+        staffList: [],
+        options: [],
+        storageType: [],
+        storageType1: [],
+        outContractNo: [],
+        // 提交类型
+        submitType: true,
+        status: [],
+        unitPricechange: [],
+        warehouseNameList: [],
+        warehouseNameList1: [],
+        waterContentchange: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        warehouseInOutDetail: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        rules: {
+          netWeight: [{
             required: true,
             type: 'number',
             message: '请输入活动名称',
             trigger: 'blur'
+          }]
+        },
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM')
+        },
+        contractList: [],
+        inOutTaskNo: '',
+        inOutTaskNo1: '',
+        dataList: {
+          taskTypeKey: '1'
+        },
+        dataList1: {
+          taskTypeKey: '1'
+        },
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: time => {
+            return time.getTime() > Date.now()
           }
-        ]
-      },
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      deptCircularPage: {},
-      packtypeList: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM')
-      },
-      contractList: [],
-      inOutTaskNo: '',
-      inOutTaskNo1: '',
-      dataList: { taskTypeKey: '1' },
-      dataList1: { taskTypeKey: '1' },
-      historyList: [],
-      pickerBeginDateBefore: {
-        disabledDate: time => {
-          return time.getTime() > Date.now()
-        }
-      },
-      accessoryTFs: false
-    }
-  },
-  activated() {
-    this.getList()
-    this.showType = this.isShow
-  },
-  mounted() {
-    this.dataList.id = this.$route.query.id
-  },
-  methods: {
-    //返回按钮
-    returnsales() {
-      this.$router.go(-1)
-    },
-    // 获取当前年月日
-    getdate() {
-      var date = new Date()
-      var year = date.getFullYear() //获取完整的年份(4位)
-      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
-      var datetime = date.getDate() //获取当前日(1-31)
-      if (mouth < 10) {
-        mouth = '0' + mouth
-      }
-      if (datetime < 10) {
-        datetime = '0' + datetime
+        },
+        accessoryTFs: false
       }
-      return year +'' + mouth + datetime
     },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function() {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
-
-      return arr.join('')
+    activated() {
+      this.getList()
+      this.showType = this.isShow
     },
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.deptBudgetList.staffList = val
-      if (val) {
-        //val存在
-        this.options = this.staffList.filter(item => {
-          if (
-            !!~item.staffName.indexOf(val) ||
-            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
-          }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options = this.staffList
-      }
+    mounted() {
+      this.dataList.id = this.$route.query.id
     },
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList.agentKey = this.staffList[i].staffId
+    methods: {
+      //返回按钮
+      returnsales() {
+        this.$router.go(-1)
+      },
+      // 获取当前年月日
+      getdate() {
+        var date = new Date()
+        var year = date.getFullYear() //获取完整的年份(4位)
+        var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+        var datetime = date.getDate() //获取当前日(1-31)
+        if (mouth < 10) {
+          mouth = '0' + mouth
         }
-      }
-    },
-    selectstaff1(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList1.agentKey = this.staffList[i].staffId
+        if (datetime < 10) {
+          datetime = '0' + datetime
         }
-      }
-    },
-    requestadd(list, status) {
-      this.$refs.dataList.validate(valid => {
-        if (valid) {
-          list.compId = localStorage.getItem('ws-pf_compId')
-          list.publisher =
-            localStorage.getItem('ws-pf_roleName') +
-            localStorage.getItem('ws-pf_staffName')
-          addoreditoutput(list)
-            .toPromise()
-            .then(response => {
-              this.$message.success('添加成功')
-              this.$router.push({ path: 'salesPlanList' })
-            })
+        return year + '' + mouth + datetime
+      },
+      // 随机验证码
+      verifyinit() {
+        var arr = []
+        for (var i = 48; i < 123; i++) {
+          if (i > 57 && i < 65) continue
+          if (i > 90) continue
+          arr.push(String.fromCharCode(i))
+        }
+        arr.sort(function() {
+          return Math.random() - 0.5
+        })
+        arr.length = 4
+
+        return arr.join('')
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter(item => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
         } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          return false
+          //val为空时,还原数组
+          this.options = this.staffList
         }
-      })
-    },
-    //关闭
-    close() {
-      this.$router.push({ path: 'salesPlanList' })
-    },
-    selectwarehouseName() {},
-    tarechange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    grossWeightchange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList.goodsNameKey = this.goodnameList[i].constKey
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectgoodsName1(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList1.goodsNameKey = this.goodnameList[i].constKey
+      },
+      selectstaff1(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList1.agentKey = this.staffList[i].staffId
+          }
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+      },
+      requestadd(list, status) {
+        this.$refs.dataList.validate(valid => {
+          if (valid) {
+            list.compId = localStorage.getItem('ws-pf_compId')
+            list.publisher =
+              localStorage.getItem('ws-pf_roleName') +
+              localStorage.getItem('ws-pf_staffName')
+            addoreditoutput(list)
+              .toPromise()
+              .then(response => {
+                this.$message.success('添加成功')
+                this.$router.push({
+                  path: 'salesPlanList'
+                })
+              })
+          } else {
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
+      },
+      //关闭
+      close() {
+        this.$router.push({
+          path: 'salesPlanList'
+        })
+      },
+      selectwarehouseName() {},
+      tarechange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectpackingMethod1(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+      },
+      grossWeightchange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.storageType.length; i++) {
-        if (this.storageType[i].constValue == e) {
-          this.dataList.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType1(e) {
-      for (var i = 0; i < this.storageType1.length; i++) {
-        if (this.storageType1[i].constValue == e) {
-          this.dataList1.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectgoodsName1(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList1.goodsNameKey = this.goodnameList[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    tasktypechange() {
-      this.tasknumber()
-    },
-    GetRandomNum(Min, Max) {
-      var Range = Max - Min
-      var Rand = Math.random()
-      return Min + Math.round(Rand * Range)
-    },
-    getList(){
-      saleLook({
-        id: this.$route.query.id
-      })
-      .toPromise()
-        .then(response => {
-          this.dataList = response
-        })
-    },
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      selectpackingMethod1(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.storageType.length; i++) {
+          if (this.storageType[i].constValue == e) {
+            this.dataList.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      selectstorageType1(e) {
+        for (var i = 0; i < this.storageType1.length; i++) {
+          if (this.storageType1[i].constValue == e) {
+            this.dataList1.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      tasktypechange() {
+        this.tasknumber()
+      },
+      GetRandomNum(Min, Max) {
+        var Range = Max - Min
+        var Rand = Math.random()
+        return Min + Math.round(Rand * Range)
+      },
+      getList() {
+        saleLook({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then(response => {
+            this.dataList = response
+          })
+      },
 
-    // deletecontract(){},
-    //删除
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {}
+      // deletecontract(){},
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {}
+    }
   }
-}
 </script>
 <style lang="scss" scoped>
-/deep/.basicInformation {
-  .el-info-table {
-    border: none;
+  /deep/.basicInformation {
+    .el-info-table {
+      border: none;
+      position: relative;
+    }
+
+    .el-form-item {
+      width: 33.3333%;
+      border: none;
+      margin: 0;
+
+      .el-form-item__label {
+        text-align: left;
+        font-size: 14px;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #8890b1;
+      }
+
+      .el-form-item__content {
+        padding-left: 0px;
+        padding-right: 10px;
+        // background: #fff;
+        white-space: nowrap;
+        height: 40px;
+        display: flex;
+        -webkit-box-align: center;
+        align-items: center;
+        text-align: left;
+        overflow: hidden;
+      }
+    }
+  }
+
+  /deep/.el-radio {
+    color: #606266;
+    font-weight: 500;
+    line-height: 1;
+    cursor: pointer;
+    white-space: nowrap;
+    outline: 0;
+    margin-right: 30px;
+    margin-top: 15px;
+  }
+
+  /deep/.el-radio__inner {
+    border: 1px solid #dcdfe6;
+    border-radius: 100%;
+    width: 14px;
+    height: 14px;
+    background-color: #fff;
+    cursor: pointer;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    margin-left: 100px;
+  }
+
+  /deep/.el-radio__input {
+    white-space: nowrap;
+    cursor: pointer;
+    outline: 0;
+    line-height: 1;
+    vertical-align: middle;
+    margin-top: -1px;
+  }
+
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 15%;
+    display: flex;
+    flex-wrap: wrap;
+    margin-left: -50px;
+    margin-top: 15px;
+    width: 110%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+    margin-right: 180px;
+  }
+
+  /deep/.el-form-item__label {
+    width: 160px;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  /deep/.el-form-item--small .el-form-item__label,
+  .el-form-item--small .el-form-item__content {
+    text-align: left;
+  }
+
+  /deep/.el-input--small {
+    font-size: 13px;
+    position: relative;
+    display: inline-block;
+  }
+
+  .center1 .small-title {
+    margin-left: 323px;
+  }
+
+  .center1 {
+    width: 90%;
+    margin: 0 auto;
+    margin-left: 10px;
+    margin-top: 25px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+  }
+
+  /deep/.el-select {
+    display: inline-block;
     position: relative;
+    width: 100%;
+  }
+
+  .annu {
+    height: 81px;
+    background: #ffffff;
+    border-radius: 4px;
   }
-  .el-form-item {
-    width: 33.3333%;
+
+  .basicInformation .el-form-item {
+    width: 50.3333%;
     border: none;
     margin: 0;
-    .el-form-item__label {
-      text-align: left;
-      font-size: 14px;
-      font-family: PingFangSC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #8890b1;
-    }
-    .el-form-item__content {
-      padding-left: 0px;
-      padding-right: 10px;
-      // background: #fff;
-      white-space: nowrap;
-      height: 40px;
-      display: flex;
-      -webkit-box-align: center;
-      align-items: center;
-      text-align: left;
-      overflow: hidden;
-    }
   }
-}
-/deep/.el-radio {
-  color: #606266;
-  font-weight: 500;
-  line-height: 1;
-  cursor: pointer;
-  white-space: nowrap;
-  outline: 0;
-  margin-right: 30px;
-  margin-top: 15px;
-}
-/deep/.el-radio__inner {
-  border: 1px solid #dcdfe6;
-  border-radius: 100%;
-  width: 14px;
-  height: 14px;
-  background-color: #fff;
-  cursor: pointer;
-  -webkit-box-sizing: border-box;
-  box-sizing: border-box;
-  margin-left: 100px;
-}
-/deep/.el-radio__input {
-  white-space: nowrap;
-  cursor: pointer;
-  outline: 0;
-  line-height: 1;
-  vertical-align: middle;
-  margin-top: -1px;
-}
-.title {
-  position: relative;
-  padding-left: 10px;
-}
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
-.el-form {
-  padding: 0 15%;
-  display: flex;
-  flex-wrap: wrap;
-  margin-left: -50px;
-  margin-top: 15px;
-  width: 110%;
-}
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-}
-.el-col {
-  background: #f6f7fc;
-}
-.bg-right {
-  text-align: right;
-  padding: 16px 20px;
-}
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  height: 2000px;
-  margin: 0 auto;
-  margin-right: 180px;
-}
-/deep/.el-form-item__label {
-  width: 160px;
-}
-.inspector {
-  width: 50%;
-}
-/deep/.el-form-item--small .el-form-item__label,
-.el-form-item--small .el-form-item__content {
-  text-align: left;
-}
-/deep/.el-input--small {
-  font-size: 13px;
-  position: relative;
-  display: inline-block;
-}
-.center1 .small-title {
-  margin-left: 323px;
-}
-.center1 {
-  width: 90%;
-  margin: 0 auto;
-  margin-left: 10px;
-  margin-top: 25px;
-}
-/deep/.el-input--small .el-input__inner {
-  height: 32px;
-  line-height: 32px;
-}
-/deep/.el-select {
-  display: inline-block;
-  position: relative;
-  width: 100%;
-}
-.annu {
-  height: 81px;
-  background: #ffffff;
-  border-radius: 4px;
-}
-.basicInformation .el-form-item {
-  width: 50.3333%;
-  border: none;
-  margin: 0;
-}
-.el-form {
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 16px;
-  margin-left: 130px;
-}
-.a {
-  margin-left: -32px;
-}
-.el-radio-group {
-  margin-left: 80px;
-}
-.ding {
-  height: 23px;
-  background: #e8ecf6;
-  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
-}
-.nav2 {
-  height: 25px;
-  background: #e8ecf6;
-  margin-top: 15px;
-}
-.ziti {
-  width: 72px;
-  height: 20px;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 20px;
-  margin-left: 314px;
-  /* margin-top: 112px; */
-}
-/deep/.ziti1 {
-  height: 40px;
-  font-size: 16px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #262626;
-  line-height: 20px;
-  margin-left: 381px;
-  margin-top: -21px;
-  width: 100px;
-}
-.winseaview-view {
-  padding: 0 0 20px;
-}
-.container {
-  overflow: scroll;
-  height: 93vh;
-}
-/deep/.basicInformation .el-form-item .el-form-item__content {
-  padding-left: 0px;
-  padding-right: 10px;
-  white-space: nowrap;
-  height: 40px;
-  display: -webkit-box;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-box-align: center;
-  -ms-flex-align: center;
-  align-items: center;
-  text-align: left;
-  overflow: hidden;
-  font-size: 12px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #232323;
-  line-height: 14px;
-}
-.nav {
-  width: 400px;
-  height: 20px;
-}
-.forlist{
-  background-color: #F5F7FA;
-  border-radius: 10px;
-  width: 100%;
-  padding-left: 15px;
-  height: 35px;
-  line-height: 35px;
-  color: #C0C4CC;
-  font-size: 14px;
-}
+
+  .el-form {
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+    margin-left: 130px;
+  }
+
+  .a {
+    margin-left: -32px;
+  }
+
+  .el-radio-group {
+    margin-left: 80px;
+  }
+
+  .ding {
+    height: 23px;
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .nav2 {
+    height: 25px;
+    background: #e8ecf6;
+    margin-top: 15px;
+  }
+
+  .ziti {
+    width: 72px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 20px;
+    margin-left: 314px;
+    /* margin-top: 112px; */
+  }
+
+  /deep/.ziti1 {
+    height: 40px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #262626;
+    line-height: 20px;
+    margin-left: 381px;
+    margin-top: -21px;
+    width: 100px;
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.basicInformation .el-form-item .el-form-item__content {
+    padding-left: 0px;
+    padding-right: 10px;
+    white-space: nowrap;
+    height: 40px;
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-align: center;
+    -ms-flex-align: center;
+    align-items: center;
+    text-align: left;
+    overflow: hidden;
+    font-size: 12px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #232323;
+    line-height: 14px;
+  }
+
+  .nav {
+    width: 400px;
+    height: 20px;
+  }
+
+  .forlist {
+    background-color: #F5F7FA;
+    border-radius: 10px;
+    width: 100%;
+    padding-left: 15px;
+    height: 35px;
+    line-height: 35px;
+    color: #C0C4CC;
+    font-size: 14px;
+  }
 </style>

File diff ditekan karena terlalu besar
+ 905 - 1191
src/views/statisticalReport/autoSettlementList.vue


File diff ditekan karena terlalu besar
+ 897 - 1070
src/views/statisticalReport/huoyunList.vue


+ 5 - 5
src/views/statisticalReport/purchaseClosingCashierList.vue

@@ -1,6 +1,6 @@
 //采购平仓报表
 <template>
-  <div class="">
+  <div class="container">
     <el-scrollbar style="height: 100%">
       <el-row>
         <el-col style="padding-left: 15px" :span="16">
@@ -65,10 +65,10 @@
     <el-dialog width="25%" title="付款" :visible.sync="dialogFormVisible1" :append-to-body="true">
       <el-form :model="form">
         <el-form-item label="未付金额(元)" :label-width="formLabelWidth">
-          <el-input v-model="allmoney" autocomplete="off" class="deal"></el-input>
+          <el-input type='number' v-model="allmoney" autocomplete="off" class="deal"></el-input>
         </el-form-item>
         <el-form-item label="本次付款金额(元)" :label-width="formLabelWidth">
-          <el-input v-model="money" autocomplete="off" placeholder="请输入付款金额" class="deal"></el-input>
+          <el-input type='number' v-model="money" autocomplete="off" placeholder="请输入付款金额" class="deal"></el-input>
         </el-form-item>
         <el-form-item label="付款日期" prop="submissionDate" :label-width="formLabelWidth" class="deal">
           <ws-date-picker v-model="paymentDate" type="date" placeholder="请选择付款日期" value-format="yyyy-MM-dd"
@@ -93,10 +93,10 @@
     <el-dialog width="25%" title="收款" :visible.sync="dialogFormVisible2" :append-to-body="true">
       <el-form :model="form">
         <el-form-item label="未收金额(元)" :label-width="formLabelWidth">
-          <el-input v-model="allmoney1" autocomplete="off" class="deal"></el-input>
+          <el-input type='number' v-model="allmoney1" autocomplete="off" class="deal"></el-input>
         </el-form-item>
         <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
-          <el-input v-model="collectmoney" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
+          <el-input type='number' v-model="collectmoney" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
         </el-form-item>
         <el-form-item label="收款日期" prop="submissionDate" :label-width="formLabelWidth" class="deal">
           <ws-date-picker v-model="collectionDate" type="date" placeholder="请选择收款日期" value-format="yyyy-MM-dd"

+ 3 - 3
src/views/statisticalReport/purchaseReceiptStatisticsList.vue

@@ -1,6 +1,6 @@
 //采购入库报表
 <template>
-  <div class="">
+  <div class="container">
     <el-scrollbar style="height: 100%">
       <el-row>
         <el-col style="padding-left: 15px" :span="16">
@@ -104,7 +104,7 @@
           </template>
         </el-form-item>
         <el-form-item label="本次付款金额" :label-width="formLabelWidth">
-          <el-input v-model="money" autocomplete="off" placeholder="请输入本次付款金额" class="deal"></el-input>
+          <el-input type='number' v-model="money" autocomplete="off" placeholder="请输入本次付款金额" class="deal"></el-input>
         </el-form-item>
         <el-form-item label="付款日期" prop="paymentDate" :label-width="formLabelWidth" class="deal">
           <ws-date-picker v-model="paymentDate" type="date" placeholder="请选择付款日期" value-format="yyyy-MM-dd"
@@ -152,7 +152,7 @@
           {{ amountEdPayable }}
         </el-form-item>
         <el-form-item label="实际发票金额(元)" :label-width="formLabelWidth">
-          <el-input v-model="alreadyInvoice" autocomplete="off" class="deal"></el-input>
+          <el-input type='number' v-model="alreadyInvoice" autocomplete="off" class="deal"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">

File diff ditekan karena terlalu besar
+ 646 - 808
src/views/statisticalReport/salesClosingCashierList.vue


File diff ditekan karena terlalu besar
+ 792 - 1026
src/views/statisticalReport/salesDeliveryReportList.vue


+ 1236 - 1378
src/views/statisticalReport/shippingList.vue

@@ -4,47 +4,16 @@
     <el-scrollbar style="height: 100%">
       <el-row>
         <el-col style="padding-left: 15px" :span="10">
-          <ws-button
-            :type="searchType == 1 ? 'primary' : ''"
-            @click="handlestatus(1)"
-            >待审核</ws-button
-          >
-          <ws-button
-            :type="searchType == 2 ? 'primary' : ''"
-            @click="handlestatus(2)"
-            >待结算</ws-button
-          >
-          <ws-button
-            :type="searchType == 3 ? 'primary' : ''"
-            @click="handlestatus(3)"
-            >已结算</ws-button
-          >
-          <ws-button
-            :type="searchType == '' ? 'primary' : ''"
-            @click="handlestatus('')"
-            >全部</ws-button
-          >
-          <ws-button
-            type="primary"
-            v-hasPermission="`report.transportationReport.view`"
-            @click="handlepass()"
-            v-if="processNo"
-            >通过</ws-button
-          >
-          <ws-button
-            type="primary"
-            v-hasPermission="`report.transportationReport.view`"
-            @click="handlereject()"
-            v-if="processNo"
-            >驳回</ws-button
-          >
-          <ws-button
-            type="primary"
-            v-hasPermission="`report.transportationReport.payment`"
-            @click="handlepayment"
-            v-if="processNo"
-            >付款</ws-button
-          >
+          <ws-button :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(1)">待审核</ws-button>
+          <ws-button :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(2)">待结算</ws-button>
+          <ws-button :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(3)">已结算</ws-button>
+          <ws-button :type="searchType == '' ? 'primary' : ''" @click="handlestatus('')">全部</ws-button>
+          <ws-button type="primary" v-hasPermission="`report.transportationReport.view`" @click="handlepass()"
+            v-if="processNo">通过</ws-button>
+          <ws-button type="primary" v-hasPermission="`report.transportationReport.view`" @click="handlereject()"
+            v-if="processNo">驳回</ws-button>
+          <ws-button type="primary" v-hasPermission="`report.transportationReport.payment`" @click="handlepayment"
+            v-if="processNo">付款</ws-button>
           <!-- <ws-button
             type="primary"
             v-hasPermission="`report.transportationReport.draw`"
@@ -52,60 +21,20 @@
             >开发票</ws-button
           > -->
         </el-col>
-        <el-col
-          style="text-align: right; line-height: 60px; padding-right: 10px"
-          :span="14"
-        >
-          <el-select
-            v-model="contractNo"
-            placeholder="请选择合同"
-            clearable
-            filterable
-            @change="contractchange"
-            maxlength="500"
-            type="input"
-            class="findValue"
-          >
-            <el-option
-              v-for="item in options"
-              :key="item.constKey"
-              :label="item.contractNo"
-              :value="item.contractNo"
-            />
+        <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="14">
+          <el-select v-model="contractNo" placeholder="请选择合同" clearable filterable @change="contractchange"
+            maxlength="500" type="input" class="findValue">
+            <el-option v-for="item in options" :key="item.constKey" :label="item.contractNo" :value="item.contractNo" />
           </el-select>
-          <el-select
-            v-model="taskNo"
-            placeholder="请选择运输任务编号"
-            clearable
-            filterable
-            @change="taskNochange"
-            maxlength="500"
-            type="input"
-            class="findValue"
-          >
-            <el-option
-              v-for="item in taskNoList"
-              :key="item.taskNoKey"
-              :label="item.taskNoValue"
-              :value="item.taskNoValue"
-            />
+          <el-select v-model="taskNo" placeholder="请选择运输任务编号" clearable filterable @change="taskNochange"
+            maxlength="500" type="input" class="findValue">
+            <el-option v-for="item in taskNoList" :key="item.taskNoKey" :label="item.taskNoValue"
+              :value="item.taskNoValue" />
           </el-select>
-          <el-select
-            v-model="processNo"
-            placeholder="请选择运输阶段编号"
-            clearable
-            filterable
-            @change="processNochange"
-            maxlength="500"
-            type="input"
-            class="findValue"
-          >
-            <el-option
-              v-for="item in processNoList"
-              :key="item.processNoKey"
-              :label="item.processNoValue"
-              :value="item.processNoValue"
-            />
+          <el-select v-model="processNo" placeholder="请选择运输阶段编号" clearable filterable @change="processNochange"
+            maxlength="500" type="input" class="findValue">
+            <el-option v-for="item in processNoList" :key="item.processNoKey" :label="item.processNoValue"
+              :value="item.processNoValue" />
           </el-select>
         </el-col>
       </el-row>
@@ -113,125 +42,53 @@
         <div style="display: flex; width: 200px; line-height: 30px">
           预计运费(元):{{ tranPriceIng }}元
         </div>
-        <span style="display: flex; line-height: 30px"
-          >实际运费(元):<el-input
-            type="text"
-            maxlength="70"
-            size="small"
-            v-model="actualFreight"
-            v-show="textShow"
-          /><span v-show="!textShow">{{
+        <span style="display: flex; line-height: 30px">实际运费(元):
+          <el-input type="text" maxlength="70" size="small" v-model="actualFreight" v-show="textShow" /><span
+            v-show="!textShow">{{
             actualFreight ? actualFreight : tranPriceIng
-          }}</span
-          >元</span
-        >
-        <i
-          @click="actualFreightchange"
-          class="iconfont icon-dui"
-          v-show="textShow"
-          style="margin-top: 10px"
-        ></i>
-        <img
-          width="17"
-          height="18"
-          style="vertical-align: text-top; position: relative; top: 6px"
-          src="../../../public/img/edit.png"
-          @click="textShow = true"
-          alt=""
-          v-show="!textShow"
-        />
-        <span class="span_text"
-          >已付:{{ amountEdPayable }}元
-          <img
-            width="18"
-            height="20"
-            style="vertical-align: text-top; position: relative; top: -1px"
-            src="../../../public/img/fujian.png"
-            @click="fujian()"
-            alt=""
-          />{{
+          }}</span>元
+        </span>
+        <i @click="actualFreightchange" class="iconfont icon-dui" v-show="textShow" style="margin-top: 10px"></i>
+        <img width="17" height="18" style="vertical-align: text-top; position: relative; top: 6px"
+          src="../../../public/img/edit.png" @click="textShow = true" alt="" v-show="!textShow" />
+        <span class="span_text">已付:{{ amountEdPayable }}元
+          <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png" @click="fujian()" alt="" />{{
             paymentScreenshotList.length == 0
               ? '暂无附件'
               : paymentScreenshotList.length
-          }}</span
-        >
+          }}</span>
         <span class="span_text">未付:{{ alreadyInvoice }}元</span>
 
         <span class="span_text">{{ priceStatus }}</span>
       </div>
 
-      <el-table
-        class="wenzi"
-        :data="warehouseList.records"
-        style="width: 100%; margin-top: 20px"
-        ref="warehouseList.records"
-        border
-        @row-click="handleRowClick"
-        @selection-change="handleSelectionChange"
-      >
+      <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px"
+        ref="warehouseList.records" border @row-click="handleRowClick" @selection-change="handleSelectionChange">
         <!-- <el-table-column
           :selectable="selectInit"
           type="selection"
           width="55"
         ></el-table-column> -->
         <el-table-column type="index" label="序号" width="50"></el-table-column>
-        <el-table-column
-          class="table_td"
-          prop="contractNo"
-          label="合同编号"
-        ></el-table-column>
-        <el-table-column
-          class="table_td"
-          prop="taskNo"
-          label="运输任务"
-        ></el-table-column>
-        <el-table-column
-          class="table_td"
-          prop="processNo"
-          label="运输阶段"
-        ></el-table-column>
-        <el-table-column
-          class="table_td"
-          prop="shipType"
-          label="类型"
-        ></el-table-column>
-        <el-table-column
-          class="boxNo"
-          prop="boxNo"
-          label="箱号/仓位号"
-        ></el-table-column>
-        <el-table-column
-          class="table_td"
-          prop="loadingWeight"
-          label="装车净重(吨)"
-        ></el-table-column>
-        <el-table-column
-          class="table_td"
-          prop="unloadingWeight"
-          label="卸车净重(吨)"
-        >
+        <el-table-column class="table_td" prop="contractNo" label="合同编号"></el-table-column>
+        <el-table-column class="table_td" prop="taskNo" label="运输任务"></el-table-column>
+        <el-table-column class="table_td" prop="processNo" label="运输阶段"></el-table-column>
+        <el-table-column class="table_td" prop="shipType" label="类型"></el-table-column>
+        <el-table-column class="boxNo" prop="boxNo" label="箱号/仓位号"></el-table-column>
+        <el-table-column class="table_td" prop="loadingWeight" label="装车净重(吨)"></el-table-column>
+        <el-table-column class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
         </el-table-column>
         <el-table-column class="table_td" prop="lossWeight" label="损耗(吨)">
         </el-table-column>
       </el-table>
 
       <!-- 页数 -->
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="currentPage"
-        :page-size="pageSize"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="deptBudgetTotal"
-      ></el-pagination>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
     </el-scrollbar>
     <!-- 付款 -->
-    <el-dialog
-      width="25%"
-      title="付款"
-      :visible.sync="dialogFormVisible1"
-      :append-to-body="true"
-    >
+    <el-dialog width="25%" title="付款" :visible.sync="dialogFormVisible1" :append-to-body="true">
       <el-form :model="form">
         <el-form-item label="未付金额(元)" :label-width="formLabelWidth">
           <template>
@@ -239,35 +96,15 @@
           </template>
         </el-form-item>
         <el-form-item label="本次付款金额" :label-width="formLabelWidth">
-          <el-input
-            v-model="money"
-            autocomplete="off"
-            placeholder="请输入本次付款金额"
-            class="deal"
-          ></el-input>
+          <el-input type='number' v-model="money" autocomplete="off" placeholder="请输入本次付款金额" class="deal"></el-input>
         </el-form-item>
-        <el-form-item
-          label="付款日期"
-          prop="paymentDate"
-          :label-width="formLabelWidth"
-          class="deal"
-        >
-          <ws-date-picker
-            v-model="paymentDate"
-            type="date"
-            placeholder="请选择付款日期"
-            value-format="yyyy-MM-dd"
-            class="deal"
-          />
+        <el-form-item label="付款日期" prop="paymentDate" :label-width="formLabelWidth" class="deal">
+          <ws-date-picker v-model="paymentDate" type="date" placeholder="请选择付款日期" value-format="yyyy-MM-dd"
+            class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
-            list-type="picture-card"
-            :on-success="handlePictureCardPreview"
-            :on-remove="handleRemove"
-            class="photo2"
-          >
+          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+            :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
         </el-form-item>
@@ -278,12 +115,7 @@
       </div>
     </el-dialog>
     <!-- 批量开发票 -->
-    <el-dialog
-      width="30%"
-      title="批量开发票"
-      :visible.sync="dialogFormVisible2"
-      :append-to-body="true"
-    >
+    <el-dialog width="30%" title="批量开发票" :visible.sync="dialogFormVisible2" :append-to-body="true">
       <el-form :model="form">
         <el-form-item label="发票金额(元)" :label-width="formLabelWidth">
           <span> {{ amountEdPayable }}</span>
@@ -291,28 +123,17 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible2 = false">取 消</el-button>
-        <el-button type="primary" @click="submitBatchInvoice()"
-          >提 交</el-button
-        >
+        <el-button type="primary" @click="submitBatchInvoice()">提 交</el-button>
       </div>
     </el-dialog>
     <!-- 开发票 -->
-    <el-dialog
-      width="30%"
-      title="开发票"
-      :visible.sync="dialogFormVisible3"
-      :append-to-body="true"
-    >
+    <el-dialog width="30%" title="开发票" :visible.sync="dialogFormVisible3" :append-to-body="true">
       <el-form :model="form">
         <el-form-item label="可开发票金额(元)" :label-width="formLabelWidth1">
           {{ amountEdPayable }}
         </el-form-item>
         <el-form-item label="实际发票金额(元)" :label-width="formLabelWidth1">
-          <el-input
-            v-model="alreadyInvoice"
-            autocomplete="off"
-            class="deal"
-          ></el-input>
+          <el-input type='number' v-model="alreadyInvoice" autocomplete="off" class="deal"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -321,12 +142,7 @@
       </div>
     </el-dialog>
     <!--账户-->
-    <el-dialog
-      width="30%"
-      title="账户信息"
-      :visible.sync="dialogFormVisible8"
-      :append-to-body="true"
-    >
+    <el-dialog width="30%" title="账户信息" :visible.sync="dialogFormVisible8" :append-to-body="true">
       <h3 style="margin-left: 30px">{{ driverPayeeList.payeeName }}的账户</h3>
       <div v-for="(item, index) in driverPayeeList" :key="index">
         <h4 style="margin-left: 30px">账户-{{ index + 1 }}</h4>
@@ -348,25 +164,13 @@
           <el-form-item label="开户支行" :label-width="formLabelWidth">
             {{ item.bankDepositBranch }}
           </el-form-item>
-          <el-form-item
-            label="收款人姓名"
-            :label-width="formLabelWidth"
-            v-if="item.accountTypeFlag == 1"
-          >
+          <el-form-item label="收款人姓名" :label-width="formLabelWidth" v-if="item.accountTypeFlag == 1">
             {{ item.payeeName }}
           </el-form-item>
-          <el-form-item
-            label="收款人身份证号"
-            :label-width="formLabelWidth"
-            v-if="item.accountTypeFlag == 1"
-          >
+          <el-form-item label="收款人身份证号" :label-width="formLabelWidth" v-if="item.accountTypeFlag == 1">
             {{ item.payeeNumberCard }}
           </el-form-item>
-          <el-form-item
-            v-if="item.accountTypeFlag == 2"
-            label="企业名称"
-            :label-width="formLabelWidth"
-          >
+          <el-form-item v-if="item.accountTypeFlag == 2" label="企业名称" :label-width="formLabelWidth">
             {{ item.compName }}
           </el-form-item>
         </el-form>
@@ -384,31 +188,20 @@
       <p>查看装车磅单</p>
         <img width="100" height="100" :src="loadingImg1" alt="" />
     </WinseaContentModal> -->
-    <WinseaContentModal
-      v-model="accesscard"
-      title="磅单信息"
-      @on-cancel="handleClose1"
-    >
+    <WinseaContentModal v-model="accesscard" title="磅单信息" @on-cancel="handleClose1">
       <p>查看卸车磅单</p>
       <img width="100" height="100" :src="unloadingImg1" alt="" />
     </WinseaContentModal>
     <!--付款截图 -->
-    <WinseaContentModal
-      v-model="paymentImg"
-      title="付款截图信息"
-      @on-cancel="handleClose2"
-    >
+    <WinseaContentModal v-model="paymentImg" title="付款截图信息" @on-cancel="handleClose2">
       <p>查看付款截图</p>
       <div v-for="item in paymentScreenshot1">
         <img style="width: 100px; height: 100px" :src="item" alt="" />
       </div>
     </WinseaContentModal>
 
-    <WinseaContentModal
-      v-model="accessoryTFs"
-      :title="$t('system.noticeCircular.information')"
-      @on-cancel="accessoryTFs = false"
-    >
+    <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+      @on-cancel="accessoryTFs = false">
       <div v-for="(item, index) in paymentScreenshotList" :key="index">
         <!-- <ws-upload ref="upload" :comp-id="compId" :appendix-ids="item" :editable="false"
 				accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" /> -->
@@ -419,1208 +212,1273 @@
   <!-- </div> -->
 </template>
 <script>
-import {
-  autoList,
-  editauto,
-  autocontract,
-  autopaymoney,
-  openinvoicelist,
-  getYunShuXiaLa,
-  getYunShuNumber,
-  SetYunShuPrice,
-} from '@/model/statisticalReport/index'
-import { posthandle } from '@/model/purchasingManagement/index'
-import { workflowcontent } from '@/model/houseSelfCollect/index'
-import { downloadFile } from '@/utils/batchDown'
-import Pagination from '@/components/Pagination'
-import WsUpload from '@/components/WsUpload'
-import { EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination,
-  },
-  watch: {
-    vesselId(val) {
-      this.getList()
-    },
-    isShow(val) {
-      this.showType = val
+  import {
+    autoList,
+    editauto,
+    autocontract,
+    autopaymoney,
+    openinvoicelist,
+    getYunShuXiaLa,
+    getYunShuNumber,
+    SetYunShuPrice,
+  } from '@/model/statisticalReport/index'
+  import {
+    posthandle
+  } from '@/model/purchasingManagement/index'
+  import {
+    workflowcontent
+  } from '@/model/houseSelfCollect/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
     },
-  },
-
-  data() {
-    return {
-      checked: true,
-      alreadyInvoice: '',
-      needReapply: true,
-      dialogFormVisible1: false,
-      dialogFormVisible2: false,
-      dialogFormVisible3: false,
-      dialogFormVisible4: false,
-      dialogFormVisible5: false,
-      dialogFormVisible6: false,
-      dialogFormVisible7: false,
-      dialogFormVisible8: false,
-      dialogFormVisible11: false,
-      dialogVisible: false,
-
-      form: {
-        transactionPrice: '',
-        transactionsNumber: '',
-        basis: '',
+    watch: {
+      vesselId(val) {
+        this.getList()
       },
-      currect: true,
-      formLabelWidth: '120px',
-      formLabelWidth1: '140px',
-      barWidth: 0,
-      barHeight: 0,
-      retioX: 1,
-      ratioY: 1,
-      isTaped: false,
-      isHover: false,
-      settlementWeightchange: false,
-      deductionAmountchange: false,
-      isShow: !this.autohide,
-      //弹出框
-      dialogViewSpareMoney: false,
-      contractNoList: [],
-      // 是否显示
-      showType: true,
-      // 年
-      year: '',
-      options: [],
-      id: '',
-      pickerOptions: {},
-      value2: '',
-      deptBudgetTotal: 0,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: '1',
-      manualFlag: '',
-      searchTypeText: '未完成',
-      searchKeyWord: '',
-      driverPayeeList: {
-        radio: '1',
+      isShow(val) {
+        this.showType = val
       },
-      contractType: 2,
-      accessoryTFs: false,
-      accesscard: false,
-      paymentImg: false,
-      enter: {
-        closePositionList: [],
-      },
-      taskNoList: [],
-      processNoList: [],
-      taskNo: '',
-      processNo: '',
-      textShow: false,
-      actualFreight: '',
-      processNoId: '',
-      tranPriceIng: '',
-
-      // 提交类型
-      submitType: true,
-      size: 10,
-      spanArr: [],
-      contractNo: '全部合同',
-      inOutTaskNo: '',
-      compId: localStorage.getItem('ws-pf_compId'),
-      roleId: localStorage.getItem('ws-pf_roleId'),
-      deptCircularPage: {},
-      warehouseList: [],
-      orderList: {},
-      deptBudgetList: {},
-      id: '',
-
-      pcFlag: 1,
-      carryoverlist: {},
-      modification: [],
-      loadingImg1: [],
-      unloadingImg1: [],
-      paymentScreenshot1: [],
-      amendlist: {},
-      roleFlag: 1,
-      alreadyInvoice1: 0,
-      money: '',
-      paymentDate: '',
-      tranSettlementReportList: [],
-      autoSettlementReport: {
-        tranSettlementReportList: [],
+    },
+
+    data() {
+      return {
+        checked: true,
+        alreadyInvoice: '',
+        needReapply: true,
+        dialogFormVisible1: false,
+        dialogFormVisible2: false,
+        dialogFormVisible3: false,
+        dialogFormVisible4: false,
+        dialogFormVisible5: false,
+        dialogFormVisible6: false,
+        dialogFormVisible7: false,
+        dialogFormVisible8: false,
+        dialogFormVisible11: false,
+        dialogVisible: false,
+
+        form: {
+          transactionPrice: '',
+          transactionsNumber: '',
+          basis: '',
+        },
+        currect: true,
+        formLabelWidth: '120px',
+        formLabelWidth1: '140px',
+        barWidth: 0,
+        barHeight: 0,
+        retioX: 1,
+        ratioY: 1,
+        isTaped: false,
+        isHover: false,
+        settlementWeightchange: false,
+        deductionAmountchange: false,
+        isShow: !this.autohide,
+        //弹出框
+        dialogViewSpareMoney: false,
+        contractNoList: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        options: [],
+        id: '',
+        pickerOptions: {},
+        value2: '',
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: '1',
+        manualFlag: '',
+        searchTypeText: '未完成',
+        searchKeyWord: '',
+        driverPayeeList: {
+          radio: '1',
+        },
+        contractType: 2,
+        accessoryTFs: false,
+        accesscard: false,
+        paymentImg: false,
+        enter: {
+          closePositionList: [],
+        },
+        taskNoList: [],
+        processNoList: [],
+        taskNo: '',
+        processNo: '',
+        textShow: false,
+        actualFreight: '',
+        processNoId: '',
+        tranPriceIng: '',
+
+        // 提交类型
+        submitType: true,
+        size: 10,
+        spanArr: [],
+        contractNo: '全部合同',
+        inOutTaskNo: '',
+        compId: localStorage.getItem('ws-pf_compId'),
+        roleId: localStorage.getItem('ws-pf_roleId'),
+        deptCircularPage: {},
+        warehouseList: [],
+        orderList: {},
+        deptBudgetList: {},
+        id: '',
+
+        pcFlag: 1,
+        carryoverlist: {},
+        modification: [],
+        loadingImg1: [],
+        unloadingImg1: [],
+        paymentScreenshot1: [],
+        amendlist: {},
+        roleFlag: 1,
+        alreadyInvoice1: 0,
         money: '',
-        amountNotPayable: 0,
-        amountEdPayable: 0,
         paymentDate: '',
-        paymentScreenshot: '',
-        id: '',
-      },
+        tranSettlementReportList: [],
+        autoSettlementReport: {
+          tranSettlementReportList: [],
+          money: '',
+          amountNotPayable: 0,
+          amountEdPayable: 0,
+          paymentDate: '',
+          paymentScreenshot: '',
+          id: '',
+        },
 
-      amountNotPayable: 0,
-      amountEdPayable: 0,
-      paymentScreenshotUrls: [],
-      carryovercontractnolist: [],
-      historyList: [],
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
+        amountNotPayable: 0,
+        amountEdPayable: 0,
+        paymentScreenshotUrls: [],
+        carryovercontractnolist: [],
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
         },
-      },
-      amountEdPayable: '', //已付金额
-      alreadyInvoice: '', //未付金额
-      priceStatus: '', //状态
-      paymentScreenshotList: [], //付款截图
-    }
-  },
-  activated() {
-    this.getList()
-    this.showType = this.isShow
-  },
-  methods: {
-    fujian() {
-      if (this.paymentScreenshotList.length == 0) {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      } else {
-        this.accessoryTFs = true
+        amountEdPayable: '', //已付金额
+        alreadyInvoice: '', //未付金额
+        priceStatus: '', //状态
+        paymentScreenshotList: [], //付款截图
       }
-      // this.appendixIdss = row.addressUrl
     },
-    cur(status) {
-      if (status == 0) {
-        this.currect = true
-      } else {
-        var that = this
-        this.currect = false
-        getselectctcontractno({
-          customerName: this.modification[0].customerName,
-          contractNo: this.modification[0].contractNo,
-        })
-          .toPromise()
-          .then((response) => {
-            that.carryovercontractnolist = response
-            for (var i = 0; i < that.carryovercontractnolist.length; i++) {
-              if (that.carryovercontractnolist[i].amountNotPayable > 0) {
-                that.carryovercontractnolist[i].closeaccountstatus = '待结算'
-              } else {
-                that.carryovercontractnolist[i].closeaccountstatus = '已结算'
-              }
-            }
-          })
-          .catch((response) => {
-            console.log(response)
-            EventBus.$emit('error', response.message)
-          })
-      }
+    activated() {
+      this.getList()
+      this.showType = this.isShow
     },
-    handleRowClick(row) {
-      if (row.approveStatus == null) {
-        this.$refs.warehouseList.toggleRowSelection(row)
-        return true
-      } else if (row.approveStatus != null) {
-        if (row.taskId == null) {
-          return false
+    methods: {
+      fujian() {
+        if (this.paymentScreenshotList.length == 0) {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
         } else {
-          this.$refs.warehouseList.toggleRowSelection(row)
-          return true
+          this.accessoryTFs = true
         }
-      }
-    },
-    selectInit(row) {
-      //在这里一定要记得类型匹配的上。
-      if (row.approveStatus == null) {
-        return true
-      } else if (row.approveStatus != null) {
-        if (row.taskId == null) {
-          return false
+        // this.appendixIdss = row.addressUrl
+      },
+      cur(status) {
+        if (status == 0) {
+          this.currect = true
         } else {
+          var that = this
+          this.currect = false
+          getselectctcontractno({
+              customerName: this.modification[0].customerName,
+              contractNo: this.modification[0].contractNo,
+            })
+            .toPromise()
+            .then((response) => {
+              that.carryovercontractnolist = response
+              for (var i = 0; i < that.carryovercontractnolist.length; i++) {
+                if (that.carryovercontractnolist[i].amountNotPayable > 0) {
+                  that.carryovercontractnolist[i].closeaccountstatus = '待结算'
+                } else {
+                  that.carryovercontractnolist[i].closeaccountstatus = '已结算'
+                }
+              }
+            })
+            .catch((response) => {
+              console.log(response)
+              EventBus.$emit('error', response.message)
+            })
+        }
+      },
+      handleRowClick(row) {
+        if (row.approveStatus == null) {
+          this.$refs.warehouseList.toggleRowSelection(row)
           return true
+        } else if (row.approveStatus != null) {
+          if (row.taskId == null) {
+            return false
+          } else {
+            this.$refs.warehouseList.toggleRowSelection(row)
+            return true
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    handleClose1() {
-      this.accesscard = false
-    },
-    handleClose2() {
-      this.paymentImg = false
-    },
-    //账户
-    look(item) {
-      this.dialogFormVisible8 = true
-      if (item.driverPayeeInfoList) {
-        this.driverPayeeList = item.driverPayeeInfoList
-        this.driverPayeeList.payeeName = item.driverPayeeInfoList[0].payeeName
-        for (var i = 0; i < item.driverPayeeInfoList.length; i++) {
-          if (item.driverPayeeInfoList[i].bankCard == item.cardNo) {
-            this.driverPayeeList[i].radio = '1'
+      },
+      selectInit(row) {
+        //在这里一定要记得类型匹配的上。
+        if (row.approveStatus == null) {
+          return true
+        } else if (row.approveStatus != null) {
+          if (row.taskId == null) {
+            return false
           } else {
-            this.driverPayeeList[i].radio = '2'
+            return true
           }
         }
-        this.id = item.id
-      }
-    },
-    //付款
-    handlepayment() {
-      this.amountNotPayable =
-        this.warehouseList.records[0].tranSettlementReportList //未付金额
-      // this.money = this.money
-      this.tranSettlementReportList =
-        this.warehouseList.records[0].tranSettlementReportList
-      this.amountEdPayable = this.warehouseList.records[0].amountEdPayable
-      // this.paymentDate = this.paymentDate
-      if (this.warehouseList.records.length == 0) {
-        this.$message.warning('付款的条目为空')
-      } else {
-        for (var i = 0; i < this.warehouseList.records.length; i++) {
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleClose1() {
+        this.accesscard = false
+      },
+      handleClose2() {
+        this.paymentImg = false
+      },
+      //账户
+      look(item) {
+        this.dialogFormVisible8 = true
+        if (item.driverPayeeInfoList) {
+          this.driverPayeeList = item.driverPayeeInfoList
+          this.driverPayeeList.payeeName = item.driverPayeeInfoList[0].payeeName
+          for (var i = 0; i < item.driverPayeeInfoList.length; i++) {
+            if (item.driverPayeeInfoList[i].bankCard == item.cardNo) {
+              this.driverPayeeList[i].radio = '1'
+            } else {
+              this.driverPayeeList[i].radio = '2'
+            }
+          }
+          this.id = item.id
+        }
+      },
+      //付款
+      handlepayment() {
+        this.amountNotPayable =
+          this.warehouseList.records[0].tranSettlementReportList //未付金额
+        // this.money = this.money
+        this.tranSettlementReportList =
+          this.warehouseList.records[0].tranSettlementReportList
+        this.amountEdPayable = this.warehouseList.records[0].amountEdPayable
+        // this.paymentDate = this.paymentDate
+        if (this.warehouseList.records.length == 0) {
+          this.$message.warning('付款的条目为空')
+        } else {
+          for (var i = 0; i < this.warehouseList.records.length; i++) {
+            if (
+              this.warehouseList.records[i].status != '已通过' &&
+              this.warehouseList.records[i].status != '部分付款'
+            ) {
+              this.$message.warning('只有已通过或部分付款的条目才可进行付款操作')
+              return
+            }
+            this.amountNotPayable += Number(this.modification[i].amountNotPayable)
+          }
+          this.dialogFormVisible1 = true
+        }
+      },
+      submitMoney() {
+        this.autoSettlementReport.money = this.money
+        this.autoSettlementReport.paymentDate = this.paymentDate
+        if (this.warehouseList.records.length == 0) {
+          this.$message.warning('请选择一条要付款的条目')
+        } else {
           if (
-            this.warehouseList.records[i].status != '已通过' &&
-            this.warehouseList.records[i].status != '部分付款'
+            this.money < 0 ||
+            (String(this.money).indexOf('.') != -1 &&
+              String(this.money).length - (String(this.money).indexOf('.') + 1) >
+              2)
           ) {
-            this.$message.warning('只有已通过或部分付款的条目才可进行付款操作')
+            this.$message({
+              message: '付款金额输入错误',
+              type: 'warning',
+            })
             return
           }
-          this.amountNotPayable += Number(this.modification[i].amountNotPayable)
-        }
-        this.dialogFormVisible1 = true
-      }
-    },
-    submitMoney() {
-      this.autoSettlementReport.money = this.money
-      this.autoSettlementReport.paymentDate = this.paymentDate
-      if (this.warehouseList.records.length == 0) {
-        this.$message.warning('请选择一条要付款的条目')
-      } else {
-        if (
-          this.money < 0 ||
-          (String(this.money).indexOf('.') != -1 &&
-            String(this.money).length - (String(this.money).indexOf('.') + 1) >
-              2)
-        ) {
-          this.$message({
-            message: '付款金额输入错误',
+          if (this.money) {
+            if (isNaN(this.money)) {
+              this.$message({
+                message: '付款金额非数字!',
+                type: 'warning',
+              })
+              return
+            }
+          }
+          if (!this.money) {
+            this.$message({
+              message: '付款金额不能为空!',
+              type: 'warning',
+            })
+            return
+          }
+          if (Number(this.money) > Number(this.alreadyInvoice)) {
+            this.$message({
+              message: '付款金额不能大于未付金额!',
+              type: 'warning',
+            })
+            return
+          }
+          this.$confirm(`确定提交付款信息?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
             type: 'warning',
+          }).then(() => {
+            autopaymoney({
+                tranSettlementReportList: this.warehouseList.records,
+                // amountEdPayable: this.modification[0].amountEdPayable,
+                // amountNotPayable: this.modification[0].amountNotPayable,
+                tranTypeKey: 3,
+                money: this.money,
+                paymentDate: this.paymentDate,
+                paymentScreenshot: this.paymentScreenshot,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '付款成功',
+                })
+                this.tranSettlementReportList = {}
+                this.money = ''
+                this.paymentDate = ''
+                this.dialogFormVisible1 = false
+                this.getList()
+              })
+              .catch((response) => {
+                EventBus.$emit('error', response.message)
+              })
           })
-          return
         }
-        if (this.money) {
-          if (isNaN(this.money)) {
+      },
+      //开发票
+      editClickInvoice(row) {
+        this.id = row.id
+        this.alreadyInvoice1 = row.alreadyInvoice
+        this.amountEdPayable = row.amountEdPayable
+        this.amountNotPayable = row.amountNotPayable
+        this.dialogFormVisible3 = 'true'
+      },
+      submitInvoice() {
+        if (this.amountEdPayable < 0) {
+          this.$message.warning('请选择一条已付款的条目')
+        } else {
+          if (
+            this.alreadyInvoice < 0 ||
+            this.alreadyInvoice > this.amountEdPayable - this.alreadyInvoice1 ||
+            (String(this.alreadyInvoice).indexOf('.') != -1 &&
+              String(this.alreadyInvoice).length -
+              (String(this.alreadyInvoice).indexOf('.') + 1) >
+              2)
+          ) {
+            this.$message({
+              message: '金额输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (this.alreadyInvoice) {
+            if (isNaN(this.alreadyInvoice)) {
+              this.$message({
+                message: '金额非数字!',
+                type: 'warning',
+              })
+              return
+            }
+          }
+          if (!this.alreadyInvoice) {
             this.$message({
-              message: '付款金额非数字!',
+              message: '金额不能为空!',
               type: 'warning',
             })
             return
           }
+          this.$confirm(`确定提交发票信息?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          }).then(() => {
+            editauto({
+                id: this.id,
+                flag: 2,
+                alreadyInvoice: this.alreadyInvoice,
+                amountEdPayable: this.amountEdPayable,
+                amountNotPayable: this.amountNotPayable,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '提交成功',
+                })
+                this.dialogFormVisible3 = false
+                this.getList()
+              })
+              .catch((response) => {
+                console.log(response)
+                EventBus.$emit('error', response.message)
+              })
+          })
         }
-        if (!this.money) {
-          this.$message({
-            message: '付款金额不能为空!',
+      },
+      //批量开发票
+      handleninvoice() {
+        this.amountEdPayable = 0
+        this.tranSettlementReportList =
+          this.warehouseList.records[0].tranSettlementReportList
+        for (var i = 0; i < this.modification.length; i++) {
+          this.amountEdPayable += this.modification[i].amountEdPayable
+        }
+        this.dialogFormVisible2 = true
+      },
+      submitBatchInvoice() {
+        if (this.modification.length == 0) {
+          this.$message.warning('请选择一条要开发票的条目')
+        } else if (this.modification[0].amountEdPayable < 0) {
+          this.$message.warning('请选择一条已付款的条目')
+        } else {
+          this.$confirm(`确定提交发票信息?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
             type: 'warning',
+          }).then(() => {
+            openinvoicelist({
+                tranSettlementReportList: this.modification,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '提交成功',
+                })
+                this.dialogFormVisible2 = false
+                this.getList()
+              })
+              .catch((response) => {
+                console.log(response)
+                EventBus.$emit('error', response.message)
+              })
           })
-          return
         }
-        if (Number(this.money) > Number(this.alreadyInvoice)) {
+      },
+      //修改结算重量
+      changesettlementWeight(item) {
+        if (!this.settlementWeight) {
           this.$message({
-            message: '付款金额不能大于未付金额!',
+            message: '结算重量不能为空!',
             type: 'warning',
           })
           return
         }
-        this.$confirm(`确定提交付款信息?`, {
-          cancelButtonText: '取消',
-          confirmButtonText: '确定',
-          type: 'warning',
-        }).then(() => {
-          autopaymoney({
-            tranSettlementReportList: this.warehouseList.records,
-            // amountEdPayable: this.modification[0].amountEdPayable,
-            // amountNotPayable: this.modification[0].amountNotPayable,
-            tranTypeKey: 3,
-            money: this.money,
-            paymentDate: this.paymentDate,
-            paymentScreenshot: this.paymentScreenshot,
-          })
-            .toPromise()
-            .then((response) => {
-              this.$notify.success({
-                title: '成功',
-                message: '付款成功',
-              })
-              this.tranSettlementReportList = {}
-              this.money = ''
-              this.paymentDate = ''
-              this.dialogFormVisible1 = false
-              this.getList()
-            })
-            .catch((response) => {
-              EventBus.$emit('error', response.message)
-            })
-        })
-      }
-    },
-    //开发票
-    editClickInvoice(row) {
-      this.id = row.id
-      this.alreadyInvoice1 = row.alreadyInvoice
-      this.amountEdPayable = row.amountEdPayable
-      this.amountNotPayable = row.amountNotPayable
-      this.dialogFormVisible3 = 'true'
-    },
-    submitInvoice() {
-      if (this.amountEdPayable < 0) {
-        this.$message.warning('请选择一条已付款的条目')
-      } else {
         if (
-          this.alreadyInvoice < 0 ||
-          this.alreadyInvoice > this.amountEdPayable - this.alreadyInvoice1 ||
-          (String(this.alreadyInvoice).indexOf('.') != -1 &&
-            String(this.alreadyInvoice).length -
-              (String(this.alreadyInvoice).indexOf('.') + 1) >
-              2)
+          (this.settlementWeight &&
+            String(this.settlementWeight).indexOf('.') != -1 &&
+            String(this.settlementWeight).length -
+            (String(this.settlementWeight).indexOf('.') + 1) >
+            2) ||
+          (this.settlementWeight && this.settlementWeight > 100) ||
+          (this.settlementWeight && this.settlementWeight < 1)
         ) {
           this.$message({
-            message: '金额输入错误',
+            message: '结算重量输入错误',
             type: 'warning',
           })
           return
         }
-        if (this.alreadyInvoice) {
-          if (isNaN(this.alreadyInvoice)) {
-            this.$message({
-              message: '金额非数字!',
-              type: 'warning',
-            })
-            return
-          }
+        editauto({
+            settlementWeight: Math.abs(this.settlementWeight),
+            id: item.id,
+            flag: 0,
+          })
+          .toPromise()
+          .then((response) => {
+            this.$message.success('修改结算重量成功')
+            this.getList()
+          })
+          .catch((req) => {
+            this.$message.warning('修改结算重量失败')
+          })
+      },
+      //设置本次账户
+      bankCard(item, id) {
+        editauto({
+            cardNo: item.bankCard,
+            id: id,
+            flag: 3,
+          })
+          .toPromise()
+          .then((response) => {
+            this.$message.success('成功')
+            this.dialogFormVisible8 = false
+            this.getList()
+          })
+          .catch((req) => {
+            this.$message.warning('失败')
+          })
+      },
+      editsettlementWeight(item) {
+        this.settlementWeight = item.settlementWeight
+        item.settlementWeightchange = true
+      },
+      //修改扣款
+      changedeductionAmount(item) {
+        if (!this.deductionAmount) {
+          this.$message({
+            message: '扣款金额不能为空!',
+            type: 'warning',
+          })
+          return
         }
-        if (!this.alreadyInvoice) {
+        if (
+          (this.deductionAmount &&
+            String(this.deductionAmount).indexOf('.') != -1 &&
+            String(this.deductionAmount).length -
+            (String(this.deductionAmount).indexOf('.') + 1) >
+            2) ||
+          (this.deductionAmount && this.deductionAmount > 100000) ||
+          (this.deductionAmount && this.deductionAmount < 1)
+        ) {
           this.$message({
-            message: '金额不能为空!',
+            message: '扣款金额输入错误',
             type: 'warning',
           })
           return
         }
-        this.$confirm(`确定提交发票信息?`, {
-          cancelButtonText: '取消',
-          confirmButtonText: '确定',
-          type: 'warning',
-        }).then(() => {
-          editauto({
-            id: this.id,
-            flag: 2,
-            alreadyInvoice: this.alreadyInvoice,
-            amountEdPayable: this.amountEdPayable,
-            amountNotPayable: this.amountNotPayable,
+        editauto({
+            deductionAmount: Math.abs(this.deductionAmount),
+            id: item.id,
+            flag: 1,
           })
-            .toPromise()
-            .then((response) => {
-              this.$notify.success({
-                title: '成功',
-                message: '提交成功',
-              })
-              this.dialogFormVisible3 = false
-              this.getList()
-            })
-            .catch((response) => {
-              console.log(response)
-              EventBus.$emit('error', response.message)
-            })
-        })
-      }
-    },
-    //批量开发票
-    handleninvoice() {
-      this.amountEdPayable = 0
-      this.tranSettlementReportList =
-        this.warehouseList.records[0].tranSettlementReportList
-      for (var i = 0; i < this.modification.length; i++) {
-        this.amountEdPayable += this.modification[i].amountEdPayable
-      }
-      this.dialogFormVisible2 = true
-    },
-    submitBatchInvoice() {
-      if (this.modification.length == 0) {
-        this.$message.warning('请选择一条要开发票的条目')
-      } else if (this.modification[0].amountEdPayable < 0) {
-        this.$message.warning('请选择一条已付款的条目')
-      } else {
-        this.$confirm(`确定提交发票信息?`, {
-          cancelButtonText: '取消',
-          confirmButtonText: '确定',
-          type: 'warning',
-        }).then(() => {
-          openinvoicelist({
-            tranSettlementReportList: this.modification,
+          .toPromise()
+          .then((response) => {
+            this.$message.success('修改扣款成功')
+            this.getList()
+          })
+          .catch((req) => {
+            this.$message.warning('修改扣款失败')
           })
+      },
+      editdeductionAmount(item) {
+        this.deductionAmount = item.deductionAmount
+        item.deductionAmountchange = true
+      },
+      //装车磅单
+      lookloadingImg(row) {
+        if (row.loadingImg == null || row.loadingImg == '') {
+          EventBus.$emit(this.$message.warning('暂无磅单信息'))
+        } else {
+          this.accessoryTFs = true
+        }
+        this.loadingImg1 = row.loadingImg
+      },
+      //卸车磅单
+      lookunloadingImg(row) {
+        if (row.unloadingImg === null || row.unloadingImg === '') {
+          EventBus.$emit(this.$message.warning('暂无磅单信息'))
+        } else {
+          this.accesscard = true
+        }
+        this.unloadingImg1 = row.unloadingImg
+      },
+      //付款截图
+      lookpaymentScreenshot(row) {
+        if (row.paymentScreenshot == null || row.paymentScreenshot == '') {
+          EventBus.$emit(this.$message.warning('暂无付款截图信息'))
+        } else {
+          this.paymentImg = true
+        }
+        this.paymentScreenshot1 = row.paymentScreenshot.split('$')
+      },
+      //审核
+      audit(item, index, status, status2, reason) {
+        if (index < this.warehouseList.records.length) {
+          posthandle({
+              taskId: item.taskId,
+              approved: status,
+              auditMind: reason != undefined ? '已驳回' : '34',
+              needReapply: status2 != undefined ? true : false,
+            })
             .toPromise()
             .then((response) => {
-              this.$notify.success({
-                title: '成功',
-                message: '提交成功',
-              })
-              this.dialogFormVisible2 = false
-              this.getList()
+              workflowcontent({
+                  workflowId: item.workflowId,
+                  businessKey: item.id,
+                  type: '船运结算报表'
+                }).toPromise()
+                .then((response1) => {
+                  this.audit(this.warehouseList.records[index + 1], index + 1, status)
+                })
+
             })
-            .catch((response) => {
-              console.log(response)
-              EventBus.$emit('error', response.message)
+            .catch((req) => {
+              this.$message.warning(req.message)
             })
-        })
-      }
-    },
-    //修改结算重量
-    changesettlementWeight(item) {
-      if (!this.settlementWeight) {
-        this.$message({
-          message: '结算重量不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.settlementWeight &&
-          String(this.settlementWeight).indexOf('.') != -1 &&
-          String(this.settlementWeight).length -
-            (String(this.settlementWeight).indexOf('.') + 1) >
-            2) ||
-        (this.settlementWeight && this.settlementWeight > 100) ||
-        (this.settlementWeight && this.settlementWeight < 1)
-      ) {
-        this.$message({
-          message: '结算重量输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      editauto({
-        settlementWeight: Math.abs(this.settlementWeight),
-        id: item.id,
-        flag: 0,
-      })
-        .toPromise()
-        .then((response) => {
-          this.$message.success('修改结算重量成功')
-          this.getList()
-        })
-        .catch((req) => {
-          this.$message.warning('修改结算重量失败')
-        })
-    },
-    //设置本次账户
-    bankCard(item, id) {
-      editauto({
-        cardNo: item.bankCard,
-        id: id,
-        flag: 3,
-      })
-        .toPromise()
-        .then((response) => {
-          this.$message.success('成功')
-          this.dialogFormVisible8 = false
-          this.getList()
-        })
-        .catch((req) => {
-          this.$message.warning('失败')
-        })
-    },
-    editsettlementWeight(item) {
-      this.settlementWeight = item.settlementWeight
-      item.settlementWeightchange = true
-    },
-    //修改扣款
-    changedeductionAmount(item) {
-      if (!this.deductionAmount) {
-        this.$message({
-          message: '扣款金额不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deductionAmount &&
-          String(this.deductionAmount).indexOf('.') != -1 &&
-          String(this.deductionAmount).length -
-            (String(this.deductionAmount).indexOf('.') + 1) >
-            2) ||
-        (this.deductionAmount && this.deductionAmount > 100000) ||
-        (this.deductionAmount && this.deductionAmount < 1)
-      ) {
-        this.$message({
-          message: '扣款金额输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      editauto({
-        deductionAmount: Math.abs(this.deductionAmount),
-        id: item.id,
-        flag: 1,
-      })
-        .toPromise()
-        .then((response) => {
-          this.$message.success('修改扣款成功')
-          this.getList()
-        })
-        .catch((req) => {
-          this.$message.warning('修改扣款失败')
-        })
-    },
-    editdeductionAmount(item) {
-      this.deductionAmount = item.deductionAmount
-      item.deductionAmountchange = true
-    },
-    //装车磅单
-    lookloadingImg(row) {
-      if (row.loadingImg == null || row.loadingImg == '') {
-        EventBus.$emit(this.$message.warning('暂无磅单信息'))
-      } else {
-        this.accessoryTFs = true
-      }
-      this.loadingImg1 = row.loadingImg
-    },
-    //卸车磅单
-    lookunloadingImg(row) {
-      if (row.unloadingImg === null || row.unloadingImg === '') {
-        EventBus.$emit(this.$message.warning('暂无磅单信息'))
-      } else {
-        this.accesscard = true
-      }
-      this.unloadingImg1 = row.unloadingImg
-    },
-    //付款截图
-    lookpaymentScreenshot(row) {
-      if (row.paymentScreenshot == null || row.paymentScreenshot == '') {
-        EventBus.$emit(this.$message.warning('暂无付款截图信息'))
-      } else {
-        this.paymentImg = true
-      }
-      this.paymentScreenshot1 = row.paymentScreenshot.split('$')
-    },
-    //审核
-    audit(item, index, status, status2, reason) {
-      if (index < this.warehouseList.records.length) {
-        posthandle({
-          taskId: item.taskId,
-          approved: status,
-          auditMind: reason != undefined ? '已驳回' : '34',
-          needReapply: status2 != undefined ? true : false,
-        })
+        } else {
+          if (status == true) {
+            this.$message.success('通过成功')
+            this.getList()
+          } else if (status == false) {
+            this.$message.success('驳回成功')
+            this.getList()
+          }
+        }
+      },
+      handlereject(status) {
+        var that = this
+        if (this.warehouseList.records.length == 0) {
+          this.$message.warning('请选择要驳回的条目')
+        } else {
+          this.$confirm(`是否确定驳回?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          }).then(() => {
+            that.audit(this.warehouseList.records[0], 0, false, true, '已驳回')
+          })
+        }
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.contractNo = val
+        if (val) {
+          //val存在
+          this.options = this.contractNoList.filter((item) => {
+            if (
+              !!~item.contractNo.indexOf(val) ||
+              !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.contractNoList
+        }
+      },
+      handlepass() {
+        var that = this
+        if (this.warehouseList.records.length == 0) {
+          this.$message.warning('没有要审核的!')
+        } else {
+          this.$confirm(`是否确定通过?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          }).then(() => {
+            that.audit(this.warehouseList.records[0], 0, true, 2)
+          })
+        }
+      },
+      handleSelectionChange(val) {
+        this.modification = val
+      },
+      handlestatus(status) {
+        this.searchType = status
+        this.getList()
+      },
+      contractchange(e) {
+        this.contractNo = e
+        this.taskNoList = []
+        this.taskNo = ''
+        this.processNoList = []
+        this.processNo = ''
+        getYunShuNumber({
+            contractNo: this.contractNo,
+            flag: 1,
+          })
           .toPromise()
           .then((response) => {
-             workflowcontent({workflowId:item.workflowId,businessKey:item.id,type:'船运结算报表'}).toPromise()
-            .then((response1) => {
-               this.audit(this.warehouseList.records[index + 1], index + 1, status)
-            })
-           
-          })
-          .catch((req) => {
-            this.$message.warning(req.message)
+            for (let i = 0; i < response.length; i++) {
+              this.taskNoList.push({
+                taskNoKey: i,
+                taskNoValue: response[i].taskNo,
+                processNo: response[i].tranProcessInfoList,
+              })
+            }
           })
-      } else {
-        if (status == true) {
-          this.$message.success('通过成功')
-          this.getList()
-        } else if (status == false) {
-          this.$message.success('驳回成功')
-          this.getList()
+      },
+      taskNochange(e) {
+        this.taskNo = e
+        this.processNoList = []
+        this.processNo = ''
+        for (let i = 0; i < this.taskNoList.length; i++) {
+          if (e == this.taskNoList[i].taskNoValue) {
+            for (let j = 0; j < this.taskNoList.length; j++) {
+              this.processNoList.push({
+                processNoKey: i,
+                processNoValue: this.taskNoList[i].processNo[j].processNo,
+                actualFreight: this.taskNoList[i].processNo[j].actualFreight,
+                id: this.taskNoList[i].processNo[j].id,
+                tranPriceIng: this.taskNoList[i].processNo[j].tranPrice,
+                priceStatus: this.taskNoList[i].processNo[j].priceStatus,
+              })
+            }
+          }
         }
-      }
-    },
-    handlereject(status) {
-      var that = this
-      if (this.warehouseList.records.length == 0) {
-        this.$message.warning('请选择要驳回的条目')
-      } else {
-		  for(let i =0;i<this.warehouseList.records.length;i++){
-		    if(!this.warehouseList.records[i].taskId){
-		  	 this.$message.warning('勾选数据中存在超出账号权限的审核条目,请重新勾选!')
-		  	 return
-		    }
-		  }
-        this.$confirm(`是否确定驳回?`, {
-          cancelButtonText: '取消',
-          confirmButtonText: '确定',
-          type: 'warning',
-        }).then(() => {
-          that.audit(this.warehouseList.records[0], 0, false, true, '已驳回')
-        })
-      }
-    },
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.contractNo = val
-      if (val) {
-        //val存在
-        this.options = this.contractNoList.filter((item) => {
-          if (
-            !!~item.contractNo.indexOf(val) ||
-            !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
+      },
+      processNochange(e) {
+        this.processNo = e
+        for (let i = 0; i < this.processNoList.length; i++) {
+          if (this.processNoList[i].processNoValue == e) {
+            this.actualFreight = this.processNoList[i].actualFreight
+            this.processNoId = this.processNoList[i].id
+            this.tranPriceIng = this.processNoList[i].tranPriceIng
+            this.priceStatus = this.processNoList[i].priceStatus
           }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options = this.contractNoList
-      }
-    },
-    handlepass() {
-      var that = this
-      if (this.warehouseList.records.length == 0) {
-        this.$message.warning('没有要审核的!')
-      } else {
-        this.$confirm(`是否确定通过?`, {
+        }
+        this.getList()
+      },
+      actualFreightchange() {
+        // this.actualFreight
+        this.$confirm(`是否提交实际总价?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
           type: 'warning',
         }).then(() => {
-          that.audit(this.warehouseList.records[0], 0, true, 2)
-        })
-      }
-    },
-    handleSelectionChange(val) {
-      this.modification = val
-    },
-    handlestatus(status) {
-      this.searchType = status
-      this.getList()
-    },
-    contractchange(e) {
-      this.contractNo = e
-      this.taskNoList = []
-      this.taskNo = ''
-      this.processNoList = []
-      this.processNo = ''
-      getYunShuNumber({
-        contractNo: this.contractNo,
-        flag: 1,
-      })
-        .toPromise()
-        .then((response) => {
-          for (let i = 0; i < response.length; i++) {
-            this.taskNoList.push({
-              taskNoKey: i,
-              taskNoValue: response[i].taskNo,
-              processNo: response[i].tranProcessInfoList,
+          SetYunShuPrice({
+              actualFreight: this.actualFreight,
+              id: this.processNoId,
+              flag: 3,
             })
-          }
-        })
-    },
-    taskNochange(e) {
-      this.taskNo = e
-      this.processNoList = []
-      this.processNo = ''
-      for (let i = 0; i < this.taskNoList.length; i++) {
-        if (e == this.taskNoList[i].taskNoValue) {
-          for (let j = 0; j < this.taskNoList.length; j++) {
-            this.processNoList.push({
-              processNoKey: i,
-              processNoValue: this.taskNoList[i].processNo[j].processNo,
-              actualFreight: this.taskNoList[i].processNo[j].actualFreight,
-              id: this.taskNoList[i].processNo[j].id,
-              tranPriceIng: this.taskNoList[i].processNo[j].tranPrice,
-              priceStatus: this.taskNoList[i].processNo[j].priceStatus,
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '实际运费总价设置成功',
+              })
+              this.textShow = false
             })
-          }
-        }
-      }
-    },
-    processNochange(e) {
-      this.processNo = e
-      for (let i = 0; i < this.processNoList.length; i++) {
-        if (this.processNoList[i].processNoValue == e) {
-          this.actualFreight = this.processNoList[i].actualFreight
-          this.processNoId = this.processNoList[i].id
-          this.tranPriceIng = this.processNoList[i].tranPriceIng
-          this.priceStatus = this.processNoList[i].priceStatus
-        }
-      }
-      this.getList()
-    },
-    actualFreightchange() {
-      // this.actualFreight
-      this.$confirm(`是否提交实际总价?`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      }).then(() => {
-        SetYunShuPrice({
-          actualFreight: this.actualFreight,
-          id: this.processNoId,
-          flag: 3,
         })
+      },
+      updated() {
+        this.$nextTick(() => {
+          this.$refs.warehouseList.doLayout()
+        })
+      },
+      //合计
+      // getSummaries(param) {
+      //   const { columns, data } = param
+      //   const sums = []
+      //   columns.forEach((column, index) => {
+      //     if (index === 0) {
+      //       sums[index] = '合计'
+      //     } else if (
+      //       index === 13 ||
+      //       index === 14 ||
+      //       index === 15 ||
+      //       index === 16
+      //     ) {
+      //       const values = data.map((item) => Number(item[column.property]))
+      //       if (!values.every((value) => isNaN(value))) {
+      //         sums[index] = values.reduce((prev, curr) => {
+      //           const value = Number(curr)
+      //           if (!isNaN(value)) {
+      //             return prev + curr
+      //           } else {
+      //             return prev
+      //           }
+      //         }, 0)
+      //       } else {
+      //         sums[index] = '元'
+      //       }
+      //     } else {
+      //       sums[index] = '--'
+      //     }
+      //   })
+      //   return sums
+      // },
+      //列表
+      getList() {
+        autoList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            tranTypeKey: 3,
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType,
+            contractNo: this.contractNo,
+            manualFlag: this.manualFlag,
+            taskNo: this.taskNo,
+            processNo: this.processNo,
+          })
           .toPromise()
           .then((response) => {
-            this.$notify.success({
-              title: '成功',
-              message: '实际运费总价设置成功',
-            })
-            this.textShow = false
-          })
-      })
-    },
-    updated() {
-      this.$nextTick(() => {
-        this.$refs.warehouseList.doLayout()
-      })
-    },
-    //合计
-    // getSummaries(param) {
-    //   const { columns, data } = param
-    //   const sums = []
-    //   columns.forEach((column, index) => {
-    //     if (index === 0) {
-    //       sums[index] = '合计'
-    //     } else if (
-    //       index === 13 ||
-    //       index === 14 ||
-    //       index === 15 ||
-    //       index === 16
-    //     ) {
-    //       const values = data.map((item) => Number(item[column.property]))
-    //       if (!values.every((value) => isNaN(value))) {
-    //         sums[index] = values.reduce((prev, curr) => {
-    //           const value = Number(curr)
-    //           if (!isNaN(value)) {
-    //             return prev + curr
-    //           } else {
-    //             return prev
-    //           }
-    //         }, 0)
-    //       } else {
-    //         sums[index] = '元'
-    //       }
-    //     } else {
-    //       sums[index] = '--'
-    //     }
-    //   })
-    //   return sums
-    // },
-    //列表
-    getList() {
-      autoList({
-        compId: localStorage.getItem('ws-pf_compId'),
-        tranTypeKey: 3,
-        currentPage: this.currentPage,
-        pageSize: this.pageSize,
-        searchType: this.searchType,
-        contractNo: this.contractNo,
-        manualFlag: this.manualFlag,
-        taskNo: this.taskNo,
-        processNo: this.processNo,
-      })
-        .toPromise()
-        .then((response) => {
-          for (var i = 0; i < response.records.length; i++) {
-            response.records[i].settlementWeightchange = false
-            response.records[i].deductionAmountchange = false
-            response.records[i].amountNotPayable =
-              response.records[i].amountIngPayable -
-              response.records[i].amountEdPayable
-            if (this.processNo) {
-              if (response.records[0].paymentScreenshot) {
-                this.paymentScreenshotList =
-                  response.records[0].paymentScreenshot.split(',') //附件地址取运输阶段第一条
-                this.paymentScreenshot = response.records[0].paymentScreenshot
+            for (var i = 0; i < response.records.length; i++) {
+              response.records[i].settlementWeightchange = false
+              response.records[i].deductionAmountchange = false
+              response.records[i].amountNotPayable =
+                response.records[i].amountIngPayable -
+                response.records[i].amountEdPayable
+              if (this.processNo) {
+                if (response.records[0].paymentScreenshot) {
+                  this.paymentScreenshotList =
+                    response.records[0].paymentScreenshot.split(',') //附件地址取运输阶段第一条
+                  this.paymentScreenshot = response.records[0].paymentScreenshot
+                }
               }
             }
-          }
-          if(response.records.length > 0){
+            if (response.records.length > 0) {
               this.amountEdPayable = response.records[0].amountEdPayable // 已付
-               this.alreadyInvoice = response.records[0].amountNotPayable //未付
-          }
-          this.deptBudgetTotal = response.total
-          this.warehouseList = response
-        })
-      this.contractNoList = []
-      getYunShuXiaLa({
-        flag: 1,
-      })
-        .toPromise()
-        .then((response) => {
-          for (let i = 0; i < response.length; i++) {
-            this.contractNoList.push({
-              constKey: i,
-              contractNo: response[i],
+              this.alreadyInvoice = response.records[0].amountNotPayable //未付
+            }
+            this.deptBudgetTotal = response.total
+            this.warehouseList = response
+          })
+        this.contractNoList = []
+        getYunShuXiaLa({
+            flag: 1,
+          })
+          .toPromise()
+          .then((response) => {
+            for (let i = 0; i < response.length; i++) {
+              this.contractNoList.push({
+                constKey: i,
+                contractNo: response[i],
+              })
+            }
+            this.contractNoList.unshift({
+              contractNo: '全部合同'
             })
-          }
-          this.contractNoList.unshift({ contractNo: '全部合同' })
-          this.options = this.contractNoList
-        })
-    },
-    handleRemove(file) {
-      console.log(file)
-    },
-    handlePictureCardPreview(file) {
-      if (this.paymentScreenshot) {
-        this.paymentScreenshot += ',' + file.url
-      } else {
-        this.paymentScreenshot = file.url
-      }
-      this.dialogVisible = true
-    },
-    handleDownload(file) {
-      console.log(file)
-    },
-    getSpanArr(data) {
-      let that = this
+            this.options = this.contractNoList
+          })
+      },
+      handleRemove(file) {
+        console.log(file)
+      },
+      handlePictureCardPreview(file) {
+        if (this.paymentScreenshot) {
+          this.paymentScreenshot += ',' + file.url
+        } else {
+          this.paymentScreenshot = file.url
+        }
+        this.dialogVisible = true
+      },
+      handleDownload(file) {
+        console.log(file)
+      },
+      getSpanArr(data) {
+        let that = this
 
-      //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
 
-      that.spanArr = []
+        that.spanArr = []
 
-      that.pos = 0
+        that.pos = 0
 
-      // //遍历数据
+        // //遍历数据
 
-      data.forEach((item, index) => {
-        //判断是否是第一项
+        data.forEach((item, index) => {
+          //判断是否是第一项
 
-        if (index === 0) {
-          this.spanArr.push(1)
-          this.pos = 0
-        } else {
-          //不是第一项时,就根据标识去存储
-          if (data[index].warehouseNumViewList.length > 1) {
-            查找到符合条件的数据时每次要把之前存储的数据 + 1
-            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
-            this.spanArr.push(0)
-          } else {
-            // 没有符合的数据时,要记住当前的index
+          if (index === 0) {
             this.spanArr.push(1)
-            this.pos = index
+            this.pos = 0
+          } else {
+            //不是第一项时,就根据标识去存储
+            if (data[index].warehouseNumViewList.length > 1) {
+              查找到符合条件的数据时每次要把之前存储的数据 + 1
+              this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+              this.spanArr.push(0)
+            } else {
+              // 没有符合的数据时,要记住当前的index
+              this.spanArr.push(1)
+              this.pos = index
+            }
           }
+        })
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
         }
-      })
-    },
-    dateFormat(fmt, date) {
-      let ret
-      const opt = {
-        'Y+': date.getFullYear().toString(), // 年
-        'm+': (date.getMonth() + 1).toString(), // 月
-        'd+': date.getDate().toString(), // 日
-        'H+': date.getHours().toString(), // 时
-        // "M+": date.getMinutes().toString(),         // 分
-        // "S+": date.getSeconds().toString()          // 秒
-        // 有其他格式化字符需求可以继续添加,必须转化成字符串
-      }
-      for (let k in opt) {
-        ret = new RegExp('(' + k + ')').exec(fmt)
-        if (ret) {
-          fmt = fmt.replace(
-            ret[1],
-            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
-          )
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
         }
-      }
-      return fmt
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
-    // 关闭 dialog时 处理文件url 初始化upload组件
-    handleCloe() {
-      this.dialogViewSpareMoney = false
-    },
-    history(row) {
-      billoperatehis({ id: row.id })
-        .toPromise()
-        .then((response) => {
-          this.historyList = response
-        })
-    },
+        return fmt
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        billoperatehis({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
 
-    total() {},
-  },
-}
+      total() {},
+    },
+  }
 </script>
 <style lang="scss" scoped>
-.connert {
-  width: 90%;
-  margin: 0 auto;
-}
-.vertical-text-left {
-  width: 62px;
-  text-align: right;
-}
-//分页
-.el-pagination {
-  padding: 10px 15px;
-  margin-bottom: 0;
-  text-align: center;
-}
-/deep/.el-pager li.active {
-  color: #5878e8;
-  cursor: default;
-}
-/deep/.el-pager li:hover {
-  color: #5878e8;
-  cursor: default;
-}
-.el-button--default {
-  color: #8890b1;
-  border-color: #e8eaf1;
-}
-/deep/.base_header_layout .grid-content.right .find.el-button--primary {
-  width: 30px;
-  margin-left: 0;
-  border-top-left-radius: 0px;
-  border-bottom-left-radius: 0px;
-}
-.completed.el-button--default {
-  border-color: #5878e8;
-  background-color: #f6f7fc;
-  color: #5878e8;
-}
-.putstorage.el-button--default,
-.deliverystorage.el-button--default {
-  border-color: #8890b1;
-  background-color: #fff;
-  color: #8890b1;
-}
-/deep/.el-table td,
-/deep/.el-table th.is-leaf {
-  border-right: 1px solid #e9ecf7;
-  text-align: center;
-}
-/deep/.el-table tr td:first-child,
-/deep/.el-table tr th.is-leaf:first-child {
-  border-left: 1px solid #e9ecf7;
-}
-.record,
-.adjustment {
-  display: inline-block;
-  color: #5878e8;
-  padding: 0 4px !important;
-  position: relative;
-}
-.record:after {
-  position: absolute;
-  content: '';
-  display: block;
-  top: 5px;
-  right: -2px;
-  width: 1px;
-  height: 12px;
-  background: #e9ecf7;
-}
-.anniu {
-  margin-left: 40%;
-  margin-top: -7%;
-  margin-bottom: 6%;
-}
-// .el-row{
-//     height: 150px;
-// }
-.base_header_layout .grid-content {
-  margin-top: 80px;
-}
-.el-input--small .el-input__inner {
-  margin-left: 20px;
-}
-.el-range-editor--small.el-input__inner {
-  height: 32px;
-  margin-left: -20%;
-}
-//执行样式
-.executory,
-.inExecution,
-.done {
-  width: 6px;
-  height: 6px;
-  display: inline-block;
-  border-radius: 50%;
-  position: relative;
-  top: -1px;
-  font-size: 14px;
-}
-.executory {
-  background: #ff9f24;
-}
-.inExecution {
-  background: #5878e8;
-}
-.done {
-  background: #50cad4;
-}
-.record,
-.adjustment {
-  display: inline-block;
-  color: #5878e8;
-  padding: 0 4px !important;
-  position: relative;
-  font-size: 14px;
-}
-.container {
-  overflow: scroll;
-  height: 93vh;
-}
-.button-container {
-  display: flex;
-  flex-wrap: nowrap;
-  justify-content: space-between;
-  align-items: center;
-  background-color: #fff;
-  width: 100%;
-  height: 50px;
-  padding: 0 10px;
-  & > div {
-    margin-left: 10px;
+  .connert {
+    width: 90%;
+    margin: 0 auto;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  //分页
+  .el-pagination {
+    padding: 10px 15px;
+    margin-bottom: 0;
+    text-align: center;
+  }
+
+  /deep/.el-pager li.active {
+    color: #5878e8;
+    cursor: default;
+  }
+
+  /deep/.el-pager li:hover {
+    color: #5878e8;
+    cursor: default;
+  }
+
+  .el-button--default {
+    color: #8890b1;
+    border-color: #e8eaf1;
+  }
+
+  /deep/.base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    margin-left: 0;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+
+  .completed.el-button--default {
+    border-color: #5878e8;
+    background-color: #f6f7fc;
+    color: #5878e8;
+  }
+
+  .putstorage.el-button--default,
+  .deliverystorage.el-button--default {
+    border-color: #8890b1;
+    background-color: #fff;
+    color: #8890b1;
+  }
+
+  /deep/.el-table td,
+  /deep/.el-table th.is-leaf {
+    border-right: 1px solid #e9ecf7;
+    text-align: center;
+  }
+
+  /deep/.el-table tr td:first-child,
+  /deep/.el-table tr th.is-leaf:first-child {
+    border-left: 1px solid #e9ecf7;
+  }
+
+  .record,
+  .adjustment {
+    display: inline-block;
+    color: #5878e8;
+    padding: 0 4px !important;
+    position: relative;
+  }
+
+  .record:after {
+    position: absolute;
+    content: '';
+    display: block;
+    top: 5px;
+    right: -2px;
+    width: 1px;
+    height: 12px;
+    background: #e9ecf7;
+  }
+
+  .anniu {
+    margin-left: 40%;
+    margin-top: -7%;
+    margin-bottom: 6%;
+  }
+
+  // .el-row{
+  //     height: 150px;
+  // }
+  .base_header_layout .grid-content {
+    margin-top: 80px;
+  }
+
+  .el-input--small .el-input__inner {
+    margin-left: 20px;
+  }
+
+  .el-range-editor--small.el-input__inner {
+    height: 32px;
+    margin-left: -20%;
+  }
+
+  //执行样式
+  .executory,
+  .inExecution,
+  .done {
+    width: 6px;
+    height: 6px;
+    display: inline-block;
+    border-radius: 50%;
+    position: relative;
+    top: -1px;
+    font-size: 14px;
+  }
+
+  .executory {
+    background: #ff9f24;
+  }
+
+  .inExecution {
+    background: #5878e8;
+  }
+
+  .done {
+    background: #50cad4;
+  }
+
+  .record,
+  .adjustment {
+    display: inline-block;
+    color: #5878e8;
+    padding: 0 4px !important;
+    position: relative;
+    font-size: 14px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  .button-container {
     display: flex;
     flex-wrap: nowrap;
-    flex-direction: row;
-    & > span {
-      line-height: 50px;
+    justify-content: space-between;
+    align-items: center;
+    background-color: #fff;
+    width: 100%;
+    height: 50px;
+    padding: 0 10px;
+
+    &>div {
+      margin-left: 10px;
+      display: flex;
+      flex-wrap: nowrap;
+      flex-direction: row;
+
+      &>span {
+        line-height: 50px;
+      }
     }
-  }
 
-  /deep/.auditFlow-box {
-    position: unset;
-    margin-left: 10px;
-    &/deep/.auditFlow-icon {
-      width: auto;
-      padding-right: 30px;
+    /deep/.auditFlow-box {
+      position: unset;
+      margin-left: 10px;
+
+      &/deep/.auditFlow-icon {
+        width: auto;
+        padding-right: 30px;
+      }
+
+      &/deep/.auditFlow-main {
+        position: absolute;
+      }
     }
-    &/deep/.auditFlow-main {
-      position: absolute;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+    // margin-left: 85%;
+    margin-top: 13px;
+  }
+
+  //导航条样式
+  .el-col-12 {
+    width: 50%;
+    height: 60px;
+    background: #f6f7fc;
+    border-radius: 4px 4px 1px 1px;
+  }
+
+  .el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+    width: 385px;
+    margin-top: 10px;
+  }
+
+  .bg-bottom {
+    margin-left: 85%;
+  }
+
+  .but {
+    margin-left: 30%;
+    /* margin-top: -32px; */
+    overflow: auto;
+    /* float: left; */
+    /* margin-left: 1px; */
+    margin-left: -10px;
+  }
+
+  .look .el-form-item {
+    border-bottom: 1px solid #ccc;
+  }
+
+  // .el-input--small {
+  //   font-size: 13px;
+  //   width: 390px;
+  //   margin-left: 74%;
+  // }
+  /deep/.el-table .el-table__header .cell,
+  .el-table .el-table__body .cell {
+    text-align: center;
+  }
+
+  .el-scrollbar__wrap {
+    overflow-y: hidden;
+  }
+
+  /deep/.deal {
+    margin-left: 0%;
+    width: 64%;
+  }
+
+  .photo {
+    padding: 0% 34%;
+  }
+
+  .photo1 {
+    padding: 0 10%;
+  }
+
+  .photo2 {
+    padding: 0 12%;
+  }
+
+  /deep/.el-form-item--small .el-form-item__label,
+  .el-form-item--small .el-form-item__content {
+    text-align: center;
+  }
+
+  hr {
+    width: 91%;
+  }
+
+  /deep/.deaal {
+    width: 66%;
+    margin-left: 9%;
+  }
+
+  .el-date-editor.el-input,
+  .el-date-editor.el-input__inner,
+  .el-input-number--small {
+    width: 123% !important;
+  }
+
+  /deep/.el-table td,
+  .el-table th.is-leaf {
+    border-right: 1px solid #e9ecf7;
+    text-align: center;
+    height: 40px;
+  }
+
+  /deep/.freightSet .el-input__inner {
+    width: 100px;
+  }
+
+  .freightSet {
+    margin: 10px 0 0 20px;
+    display: flex;
+    width: 800px;
+
+    .span_text {
+      margin-left: 20px;
+      line-height: 30px;
     }
   }
-}
-.bg-left {
-  padding-left: 30px;
-}
-.title {
-  position: relative;
-}
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-  // margin-left: 85%;
-  margin-top: 13px;
-}
-//导航条样式
-.el-col-12 {
-  width: 50%;
-  height: 60px;
-  background: #f6f7fc;
-  border-radius: 4px 4px 1px 1px;
-}
-.el-input--small .el-input__inner {
-  height: 32px;
-  line-height: 32px;
-  width: 385px;
-  margin-top: 10px;
-}
-.bg-bottom {
-  margin-left: 85%;
-}
-.but {
-  margin-left: 30%;
-  /* margin-top: -32px; */
-  overflow: auto;
-  /* float: left; */
-  /* margin-left: 1px; */
-  margin-left: -10px;
-}
-.look .el-form-item {
-  border-bottom: 1px solid #ccc;
-}
-// .el-input--small {
-//   font-size: 13px;
-//   width: 390px;
-//   margin-left: 74%;
-// }
-/deep/.el-table .el-table__header .cell,
-.el-table .el-table__body .cell {
-  text-align: center;
-}
-.el-scrollbar__wrap {
-  overflow-y: hidden;
-}
-/deep/.deal {
-  margin-left: 0%;
-  width: 64%;
-}
-.photo {
-  padding: 0% 34%;
-}
-.photo1 {
-  padding: 0 10%;
-}
-.photo2 {
-  padding: 0 12%;
-}
-/deep/.el-form-item--small .el-form-item__label,
-.el-form-item--small .el-form-item__content {
-  text-align: center;
-}
-hr {
-  width: 91%;
-}
-/deep/.deaal {
-  width: 66%;
-  margin-left: 9%;
-}
-.el-date-editor.el-input,
-.el-date-editor.el-input__inner,
-.el-input-number--small {
-  width: 123% !important;
-}
-/deep/.el-table td,
-.el-table th.is-leaf {
-  border-right: 1px solid #e9ecf7;
-  text-align: center;
-  height: 40px;
-}
-/deep/.freightSet .el-input__inner {
-  width: 100px;
-}
-.freightSet {
-  margin: 10px 0 0 20px;
-  display: flex;
-  width: 800px;
-  .span_text {
-    margin-left: 20px;
-    line-height: 30px;
+
+  /deep/.freightSet .el-input {
+    width: 44%;
+  }
+
+  .findValue {
+    width: 300px;
+    margin-left: 5px;
+  }
+
+  /deep/.freightSet .el-input {
+    width: 44%;
+  }
+
+  .findValue {
+    width: 300px;
+    margin-left: 5px;
+  }
+
+  .img_css {
+    width: 200px;
+    height: 200px;
   }
-}
-/deep/.freightSet .el-input {
-  width: 44%;
-}
-.findValue {
-  width: 300px;
-  margin-left: 5px;
-}
-/deep/.freightSet .el-input {
-  width: 44%;
-}
-.findValue {
-  width: 300px;
-  margin-left: 5px;
-}
-.img_css {
-  width: 200px;
-  height: 200px;
-}
 </style>

File diff ditekan karena terlalu besar
+ 790 - 994
src/views/statisticalReport/stockPurchaseReceiptReportList.vue


+ 243 - 167
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -1,7 +1,7 @@
 //现货销售出库报表
 <template>
-  <div class="">
-    <div style="height: 100%" class="content">
+  <div class="container">
+    <div style="height: 100%" class="">
       <el-row class="content1">
         <el-col style="padding-left: 15px; width:40%" :span="16">
           <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.carry`" @click="adopt()">备注
@@ -14,17 +14,18 @@
           </ws-button>
         </el-col>
         <el-col style="text-align: right; line-height: 60px;  width:400px" :span="8">
-        <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'
-          type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="起始时间"
-          end-placeholder="截止时间">
-        </el-date-picker></el-col>
+          <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'
+            type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="起始时间"
+            end-placeholder="截止时间">
+          </el-date-picker>
+        </el-col>
         <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="8">
           <el-select v-model="contractNo" placeholder="请选择合同" clearable filterable @change="contractchange"
             maxlength="500" type="input" class="findValue">
-            <el-option  v-for="item in options" v-if="item.reportStatus" :key="item.constKey"
+            <el-option v-for="item in options" v-if="item.reportStatus" :key="item.constKey"
               :label="item.contractNo + '(' + item.reportStatus + ')'" :value="item.contractNo" />
-            <el-option  v-for="item in options" v-if="!item.reportStatus" :key="item.constKey"
-							:label="item.contractNo" :value="item.contractNo" />
+            <el-option v-for="item in options" v-if="!item.reportStatus" :key="item.constKey" :label="item.contractNo"
+              :value="item.contractNo" />
           </el-select>
         </el-col>
       </el-row>
@@ -46,7 +47,8 @@
             <span v-else>合同重量: 0 吨</span>
             <span v-if="outboundVolume">出库量: {{ outboundVolume.toFixed(3)}} 吨</span>
             <span v-else>出库量: 0 吨</span>
-            <span v-if="orderList.unitContractPrice&&this.tranType!='随行就市'">合同单价: {{ orderList.unitContractPrice.toFixed(3) }} 元/吨</span>
+            <span v-if="orderList.unitContractPrice&&this.tranType!='随行就市'">合同单价:
+              {{ orderList.unitContractPrice.toFixed(3) }} 元/吨</span>
             <span v-else>合同单价: 0 元/吨</span>
             <span v-if="amountReceivable">应收: {{ amountReceivable.toFixed(3)}} 元</span>
             <span v-else>应收: 0 元</span>
@@ -107,8 +109,8 @@
           v-if="this.tranType=='汽运'||this.tranType=='火运'"></el-table-column>
         <el-table-column v-else-if="this.tranType=='散船'||this.tranType=='箱船'" class="table_td" prop="unloadingWeight"
           label="卸船净重(吨)"></el-table-column>
-          <el-table-column width='120' class="table_td" prop="feedbackWeight" label="反馈重量(吨)">
-            <template slot-scope="scope">
+        <el-table-column width='120' class="table_td" prop="feedbackWeight" label="反馈重量(吨)">
+          <template slot-scope="scope">
             <div class="inputChenge">
               <el-input v-model="scope.row.feedbackWeight" v-if="scope.row.identification2 == 'true'">
               </el-input>
@@ -125,10 +127,10 @@
             <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
               v-if="scope.row.identification2 == 'true'" @click="weightsave(scope.row,4)"></i>
           </template>
-          </el-table-column>
+        </el-table-column>
         <el-table-column width='120' class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
         <el-table-column class="table_td" prop="settlementPrice" width='130' label="结算单价(元/吨)">
-        <template slot-scope="scope">
+          <template slot-scope="scope">
             <div class="inputChenge">
               <el-input v-model="scope.row.settlementPrice" v-if="scope.row.identification1 == 'true'">
               </el-input>
@@ -144,21 +146,23 @@
 
             <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
               v-if="scope.row.identification1 == 'true'" @click="weightClick(scope.row,2)"></i>
-          </template></el-table-column>
+          </template>
+        </el-table-column>
         <el-table-column width='120' class="table_td" prop="amountIngReceivable" label="应收金额(元)"></el-table-column>
         <el-table-column width='120' class="table_td" prop="amountEdReceivable" label="已收金额(元)">
         </el-table-column>
-        <el-table-column  width='120' class="table_td" prop="alreadyInvoice" label=" 已开发票(元)">
-           <template slot-scope="scope">
+        <el-table-column width='120' class="table_td" prop="amountNotReceivable" label="未收金额(元)">
+        </el-table-column>
+        <el-table-column width='120' class="table_td" prop="alreadyInvoice" label=" 已开发票(元)">
+          <template slot-scope="scope">
             <div class="inputChenge">
               <div class="inputs">
                 <span>{{scope.row.alreadyInvoice}}</span>
               </div>
             </div>
             <div style='display:inline-block;'>
-              <img  width="17" height="18"
-                style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
-                @click="invoiceedit(scope.row)" alt="" />
+              <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                src="../../../public/img/edit.png" @click="invoiceedit(scope.row)" alt="" />
             </div>
           </template>
         </el-table-column>
@@ -190,7 +194,7 @@
             <span @click='fujian2(scope.row)' v-if="scope.row.returnFlag == null">{{scope.row.netWeight }}</span>
           </template>
         </el-table-column>
-        
+
         <el-table-column class="table_td" prop="settlementWeight" label="结算重量(吨)">
           <template slot-scope="scope">
             <div class="inputChenge">
@@ -221,9 +225,8 @@
               </div>
             </div>
             <div style='display:inline-block;' v-if="scope.row.identification2 == 'false'">
-              <img  width="17" height="18"
-                style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
-                @click="weightedit(scope.row)" alt="" />
+              <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                src="../../../public/img/edit.png" @click="weightedit(scope.row)" alt="" />
             </div>
 
             <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
@@ -231,7 +234,7 @@
           </template>
         </el-table-column>
         <el-table-column class="table_td" prop="settlementPrice" width='130' label="结算单价(元/吨)">
-        <template slot-scope="scope">
+          <template slot-scope="scope">
             <div class="inputChenge">
               <el-input v-model="scope.row.settlementPrice" v-if="scope.row.identification1 == 'true'">
               </el-input>
@@ -247,7 +250,8 @@
 
             <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
               v-if="scope.row.identification1 == 'true'" @click="weightClick(scope.row,2)"></i>
-          </template></el-table-column>
+          </template>
+        </el-table-column>
         <el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)">
           <template slot-scope="scope">
             <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
@@ -263,17 +267,16 @@
             <span v-if="scope.row.returnFlag == null">{{scope.row.amountNotReceivable.toFixed(2) }}</span>
           </template>
         </el-table-column>
-        <el-table-column  width='120' class="table_td" prop="alreadyInvoice" label=" 已开发票(元)">
-           <template slot-scope="scope">
+        <el-table-column width='120' class="table_td" prop="alreadyInvoice" label=" 已开发票(元)">
+          <template slot-scope="scope">
             <div class="inputChenge">
               <div class="inputs">
                 <span>{{scope.row.alreadyInvoice}}</span>
               </div>
             </div>
             <div style='display:inline-block;'>
-              <img  width="17" height="18"
-                style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
-                @click="invoiceedit(scope.row)" alt="" />
+              <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                src="../../../public/img/edit.png" @click="invoiceedit(scope.row)" alt="" />
             </div>
           </template>
         </el-table-column>
@@ -286,7 +289,8 @@
 
       <!-- 页数 -->
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
+        :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"></el-pagination>
     </div>
     <!-- 定金弹窗 -->
     <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
@@ -312,7 +316,8 @@
           <span>{{ uncollectedAmount1 }}</span>
         </el-form-item>
         <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
-          <el-input v-model="money" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
+          <el-input type='number' step="0.01" v-model="money" autocomplete="off" placeholder="请输入本次收款金额" class="deal">
+          </el-input>
         </el-form-item>
         <el-form-item label="收款日期" prop="collectionDate" :label-width="formLabelWidth" class="deal">
           <ws-date-picker v-model="collectionDate" type="date" placeholder="请选择收款日期" value-format="yyyy-MM-dd"
@@ -335,12 +340,11 @@
       @on-cancel="handleClose">
       <img width="100" height="100" :src="appendixIdss2" alt="">
     </WinseaContentModal>
-    <WinseaContentModal v-model="show" title="批量开发票"
-      @on-cancel="handleClose">
+    <WinseaContentModal v-model="show" title="批量开发票" @on-cancel="handleClose">
       <div>本次合计发票金额{{invoicemoney}}元</div>
-       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible1 = false">取 消</el-button>
-        <el-button  type="primary" @click="invoicesave()">提 交
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="show = false">取 消</el-button>
+        <el-button type="primary" @click="invoicesave()">提 交
         </el-button>
       </div>
     </WinseaContentModal>
@@ -351,12 +355,12 @@
           <span>{{ activeinvoice }}</span>
         </el-form-item>
         <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
-          <el-input v-model="invoice" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
+          <el-input type='number' v-model="invoice" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible3 = false">取 消</el-button>
-        <el-button  type="primary" @click="Invoicing()">提 交
+        <el-button type="primary" @click="Invoicing()">提 交
         </el-button>
       </div>
     </el-dialog>
@@ -436,14 +440,14 @@
         deptBudgetList: {},
         //分页
         currentPage: 1,
-        invoice:'',
+        invoice: '',
         pageSize: 10,
-        invoicemoney:0,
-        show:false,
+        invoicemoney: 0,
+        show: false,
         allmoney1: 0,
-        dialogFormVisible3:false,
+        dialogFormVisible3: false,
         deptCircularPage: {},
-        identification2:false,
+        identification2: false,
         deptBudgetTotal: 0,
         uncollectedAmount1: 0,
         stockSaleReceiptReportList: [],
@@ -465,7 +469,7 @@
         contractNo: '',
         dialogVisible: false,
         form: {},
-        id:0,
+        id: 0,
         compId: localStorage.getItem('ws-pf_compId'),
         collectForm: false,
         collectForm1: false,
@@ -504,13 +508,15 @@
         modification: [],
         accessoryTFs: false,
         appendixIdss: [],
-        activeinvoice:0,
+        activeinvoice: 0,
         accessoryTFs1: false,
         appendixIdss1: [],
         appendixIdss2: '',
         accessoryTFs2: false,
         addressUrlArray: [],
         addressUrlArray1: [],
+        money: "",
+        weight: ""
       }
     },
     activated() {
@@ -519,100 +525,108 @@
       var month = now.getMonth(); //得到月份
       var date = now.getDate(); //得到日期
       month = month + 1;
-      month = month.toString().padStart(2, "0");
-      date = date.toString().padStart(2, "0");
+      month = month.toString().padStart(2, '0');
+      date = date.toString().padStart(2, '0');
       this.collectionDate = `${year}-${month}-${date}`;
       this.getList()
       this.showType = this.isShow
     },
     methods: {
-      invoicesave(){
-        editinvoice({stockSaleReceiptReportList:this.modification}).toPromise()
-              .then((response) => {
-                this.$message({
-                  message: '提交成功',
-                  type: 'success',
-                })
-                this.show=false
-                this.getList(this.orderList.deliverType)
-              }).catch((response) => {
-                this.$message({
-                  message: '提交失败',
-                  type: 'warning',
-                })
-              })
+      invoicesave() {
+        editinvoice({
+            stockSaleReceiptReportList: this.modification
+          }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '提交成功',
+              type: 'success',
+            })
+            this.show = false
+            this.getList(this.orderList.deliverType)
+          }).catch((response) => {
+            this.$message({
+              message: '提交失败',
+              type: 'warning',
+            })
+          })
       },
       datechange() {
-        if(this.value2){
-        this.startDate = this.value2[0]
-        this.endDate = this.value2[1]
-        }
-        else{
+        if (this.value2) {
+          this.startDate = this.value2[0]
+          this.endDate = this.value2[1]
+        } else {
           this.startDate = ''
           this.endDate = ''
         }
         this.getList()
       },
 
-      handleinvoice(){
-        if(this.modification.length==0){
+      handleinvoice() {
+        if (this.modification.length == 0) {
           this.$message({
             message: '请选择要开发票的条目',
             type: 'warning',
           })
-        }else{
-          var num=''
+        } else {
+          var num = 0
           for (let i = 0; i < this.modification.length; i++) {
-            if(this.modification[i].status!='全部收款'&&this.modification[i].status!='部分收款'){
-              this.$message({
-                message: '请选择已付款的条目',
-                type: 'warning',
-              })
-              return
-              
-              
-            }
-            num=(Number(this.modification[i].amountEdReceivable)-Number(this.modification[i].alreadyInvoice))+Number(num)
+            // if (this.modification[i].status != '全部收款' && this.modification[i].status != '部分收款') {
+            //   this.$message({
+            //     message: '请选择已付款的条目',
+            //     type: 'warning',
+            //   })
+            //   return
+            // }
+            num = (Number(this.modification[i].amountEdReceivable) - Number(this.modification[i].alreadyInvoice)) +
+              Number(num)
           }
-          this.invoicemoney=num
-          this.show=true
+          this.invoicemoney = num
+          this.show = true
         }
       },
-      invoiceedit(item){
-        this.activeinvoice=item.amountEdReceivable-item.alreadyInvoice
-        this.id=item.id
-        this.dialogFormVisible3=true
+      invoiceedit(item) {
+        this.activeinvoice = item.amountEdReceivable - item.alreadyInvoice
+        this.id = item.id
+        this.dialogFormVisible3 = true
       },
-      Invoicing(){
-        editSettlementWeightStock({flag:3,alreadyInvoice:invoice,id:item.id}).toPromise()
-              .then((response) => {
-                this.$message({
-                  message: '提交成功',
-                  type: 'success',
-                })
-                this.dialogFormVisible3=false
-                this.getList(this.orderList.deliverType)
-              }).catch((response) => {
-                this.$message({
-                  message: '提交失败',
-                  type: 'warning',
-                })
-              })
-        
+      Invoicing() {
+        editSettlementWeightStock({
+            flag: 3,
+            alreadyInvoice: this.invoice,
+            id: this.id
+          }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '提交成功',
+              type: 'success',
+            })
+            this.dialogFormVisible3 = false
+            this.getList(this.orderList.deliverType)
+          }).catch((response) => {
+            this.$message({
+              message: '提交失败',
+              type: 'warning',
+            })
+          })
+
       },
-      weightedit(item){
-        item.identification2='true'
+      weightedit(item) {
+        item.identification2 = 'true'
       },
-      weightsave(item,flag){
-        editSettlementWeightStock({flag:flag,feedbackWeight:item.feedbackWeight,id:item.id}).toPromise()
-              .then((response) => {
-                  this.$notify.success({
-                  title: '成功',
-                  message: '修改重量修改成功',
-                })
-                item.identification2=false
-                this.getList(this.orderList.deliverType)
-              })
+      weightsave(item, flag) {
+        editSettlementWeightStock({
+            flag: flag,
+            feedbackWeight: item.feedbackWeight,
+            id: item.id
+          }).toPromise()
+          .then((response) => {
+            this.$notify.success({
+              title: '成功',
+              message: '修改重量修改成功',
+            })
+            item.identification2 = false
+            this.getList(this.orderList.deliverType)
+          })
       },
       tableRowClassName({
         row,
@@ -647,26 +661,27 @@
         this.currentPage = 1
         this.pageSize = 10
         this.tranProcessInfo = []
+        this.activeName = ""
         console.log('type', this.activeName)
         for (var i = 0; i < this.contractNoList.length; i++) {
           if (this.contractNoList[i].contractNo == e) {
             this.orderList = this.contractNoList[i]
-            if(this.orderList.tranTaskInfoList){
+            if (this.orderList.tranTaskInfoList) {
               for (let i = 0; i < this.orderList.tranTaskInfoList.length; i++) {
-              if (this.orderList.tranTaskInfoList[i].tranProcessInfo) {
-                this.tranProcessInfo.push({
-                  label: this.orderList.tranTaskInfoList[i].taskNo + '(' + this.orderList.tranTaskInfoList[i]
-                    .tranProcessInfo.tranType + ')',
-                  name: this.orderList.tranTaskInfoList[i].tranProcessInfo.processNo,
-                  tranType: this.orderList.tranTaskInfoList[i].tranProcessInfo.tranType
-                })
+                if (this.orderList.tranTaskInfoList[i].tranProcessInfo) {
+                  this.tranProcessInfo.push({
+                    label: this.orderList.tranTaskInfoList[i].taskNo + '(' + this.orderList.tranTaskInfoList[i]
+                      .tranProcessInfo.tranType + ')',
+                    name: this.orderList.tranTaskInfoList[i].tranProcessInfo.processNo,
+                    tranType: this.orderList.tranTaskInfoList[i].tranProcessInfo.tranType
+                  })
+                }
+              }
+              if (this.tranProcessInfo.length > 0) {
+                this.activeName = this.tranProcessInfo[0].name
+                this.tranType = this.tranProcessInfo[0].tranType
               }
             }
-            this.activeName = this.tranProcessInfo[0].name
-            this.tranType = this.tranProcessInfo[0].tranType
-            }
-            
-            
             if (this.contractNoList[i].depositUrl) {
               this.addressUrlArray = this.contractNoList[i].depositUrl.split(',')
             } else {
@@ -697,15 +712,15 @@
         }
       },
       //修改结算重量
-      whether(row,flag) {
-        if(flag==1){
+      whether(row, flag) {
+        if (flag == 1) {
           row.identification = 'true'
-        }else{
+        } else {
           row.identification1 = 'true'
         }
-        
+
       },
-      weightClick(row,flag) {
+      weightClick(row, flag) {
         if (
           row.settlementWeight > 200 ||
           row.settlementWeight < 1 ||
@@ -725,22 +740,22 @@
           })
           return
         }
-        var title=''
-        var data={}
-        if(flag==1){
-          title='确定要修改结算重量?'
-          data={
-                settlementWeight: row.settlementWeight,
-                id: row.id,
-                flag:flag
-              }
-        }else{
-          title='确定要修改结算单价?'
-          data={
-                settlementPrice: row.settlementPrice,
-                id: row.id,
-                flag:flag
-              }
+        var title = ''
+        var data = {}
+        if (flag == 1) {
+          title = '确定要修改结算重量?'
+          data = {
+            settlementWeight: row.settlementWeight,
+            id: row.id,
+            flag: flag
+          }
+        } else {
+          title = '确定要修改结算单价?'
+          data = {
+            settlementPrice: row.settlementPrice,
+            id: row.id,
+            flag: flag
+          }
         }
         this.$confirm(title, {
             confirmButtonText: '确定',
@@ -751,18 +766,18 @@
             saleEditSettlementWeight(data)
               .toPromise()
               .then((response) => {
-                if(flag==1){
+                if (flag == 1) {
                   this.$notify.success({
-                  title: '成功',
-                  message: '结算重量修改成功',
-                })
-                }else{
+                    title: '成功',
+                    message: '结算重量修改成功',
+                  })
+                } else {
                   this.$notify.success({
-                  title: '成功',
-                  message: '结算单价修改成功',
-                })
+                    title: '成功',
+                    message: '结算单价修改成功',
+                  })
                 }
-                
+
                 this.getList(this.orderList.deliverType)
               })
               .catch(() => {
@@ -829,13 +844,10 @@
             if (index === 0) {
               sums[index] = '合计'
             } else if (
-              index === 7 ||
+              // index === 10 ||
               index === 8 ||
-              index === 9 ||
-              index === 10 ||
               index === 11 ||
               index === 13 ||
-              index === 14 ||
               index === 12
             ) {
               const values = data.map((item) => Number(item[column.property]))
@@ -848,9 +860,24 @@
                     return prev
                   }
                 }, 0)
+                if (index == 11) {
+                  this.money = sums[index]
+                }
+                if (index == 8) {
+                  this.weight = sums[index]
+                }
               } else {
                 sums[index] = '元'
               }
+            } else if (index === 10) {
+              const values = data.map((item) => Number(item[column.property]))
+              if (!values.every((value) => isNaN(value))) {
+                if (this.money == 0 || this.weight == 0) {
+                  sums[index] = 0
+                } else {
+                  sums[index] = Number(this.money / this.weight).toFixed(2)
+                }
+              }
             } else {
               sums[index] = '--'
             }
@@ -860,7 +887,7 @@
                 sums[index] = '合计'
               } else if (
                 index === 11 ||
-                index === 9 ||
+                // index === 9 ||
                 index === 10 ||
                 index === 8
               ) {
@@ -874,9 +901,25 @@
                       return prev
                     }
                   }, 0)
+                  if (index == 8) {
+                    this.weight = sums[index]
+                  }
+                  if (index == 10) {
+                    this.money = sums[index]
+                  }
                 } else {
                   sums[index] = '元'
                 }
+              } else if (index === 9) {
+                const values = data.map((item) => Number(item[column.property]))
+                if (!values.every((value) => isNaN(value))) {
+                  if (this.money == 0 || this.weight == 0) {
+                    sums[index] = 0
+                  } else {
+                    sums[index] = Number(this.money / this.weight).toFixed(2)
+                  }
+                }
+
               } else {
                 sums[index] = '--'
               }
@@ -885,7 +928,9 @@
                 sums[index] = '合计'
               } else if (
                 index === 11 ||
-                index === 10 ||
+                index === 7 ||
+                index === 8 ||
+                // index === 10 ||
                 index === 13 ||
                 index === 12
               ) {
@@ -899,9 +944,24 @@
                       return prev
                     }
                   }, 0)
+                  if (index == 8) {
+                    this.weight = sums[index]
+                  }
+                  if (index == 11) {
+                    this.money = sums[index]
+                  }
                 } else {
                   sums[index] = '元'
                 }
+              } else if (index === 10) {
+                const values = data.map((item) => Number(item[column.property]))
+                if (!values.every((value) => isNaN(value))) {
+                  if (this.money == 0 || this.weight == 0) {
+                    sums[index] = 0
+                  } else {
+                    sums[index] = Number(this.money / this.weight).toFixed(2)
+                  }
+                }
               } else {
                 sums[index] = '--'
               }
@@ -911,7 +971,7 @@
               } else if (
                 index === 11 ||
                 index === 12 ||
-                index === 10 ||
+                // index === 10 ||
                 index === 9
               ) {
                 const values = data.map((item) => Number(item[column.property]))
@@ -924,9 +984,25 @@
                       return prev
                     }
                   }, 0)
+                  if (index == 9) {
+                    this.weight = sums[index]
+                  }
+                  if (index = 11) {
+                    this.money = sums[index]
+                  }
                 } else {
                   sums[index] = '元'
                 }
+              } else if (index == 10) {
+                const values = data.map((item) => Number(item[column.property]))
+                if (!values.every((value) => isNaN(value))) {
+                  if (this.money == 0 || this.weight == 0) {
+                    sums[index] = 0
+                  } else {
+                    sums[index] = Number(this.money / this.weight).toFixed(2)
+                  }
+
+                }
               } else {
                 sums[index] = '--'
               }

+ 176 - 176
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -502,7 +502,7 @@
 			},
 			returnsales() {
 				this.dataList = {
-								taskTypeKey: '1'
+								taskTypeKey: 1
 							}
 				this.$router.push({
 					path: 'tranManagementWarehouseInOuttask'
@@ -630,7 +630,7 @@
 				if (this.dataList.taskTypeKey != 3) {
 					for (let i = 0; i < this.contractNoList.length; i++) {
 						if (this.contractNoList[i].contractNo == e) {
-							if(this.contractNoList[i].priceType == "随行就市"){
+							if(this.contractNoList[i].priceType == '随行就市'){
 								this.Pricetype = false
 							}else{
 								this.Pricetype = true
@@ -711,7 +711,7 @@
 				if (this.dataList1.taskTypeKey != 3) {
 					for (let i = 0; i < this.contractNoList.length; i++) {
 						if (this.contractNoList[i].contractNo == e) {
-							if(this.contractNoList[i].priceType == "随行就市"){
+							if(this.contractNoList[i].priceType == '随行就市'){
 								this.Pricetype = false
 							}else{
 								this.Pricetype = true
@@ -765,7 +765,7 @@
 						this.$message.success('添加成功')
 						setTimeout(function() {
 							that.dataList = {
-								taskTypeKey: '1'
+								taskTypeKey: 1
 							}
 							that.dataList1 = {}
 							that.$router.push({
@@ -813,61 +813,61 @@
 						})
 						return
 					}
-					if (!this.dataList.bulkDensity) {
-						this.$message({
-							message: '容重不能为空!',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						this.dataList.bulkDensity < 0 ||
-						this.dataList.bulkDensity > 1000
-					) {
-						this.$message({
-							message: '容重输入错误',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						String(this.dataList.bulkDensity).indexOf('.') != -1 &&
-						String(this.dataList.bulkDensity).length -
-						(String(this.dataList.bulkDensity).indexOf('.') + 1) >
-						0
-					) {
-						this.$message({
-							message: '容重需输入整数',
-							type: 'warning'
-						})
-						return
-					}
-					if (!this.dataList.waterContent) {
-						this.$message({
-							message: '水分不能为空!',
-							type: 'warning'
-						})
-						return
-					}
-					if (this.dataList.waterContent < 0 || this.dataList.waterContent > 40) {
-						this.$message({
-							message: '水分输入错误',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						String(this.dataList.waterContent).indexOf('.') != -1 &&
-						String(this.dataList.waterContent).length -
-						(String(this.dataList.waterContent).indexOf('.') + 1) >
-						1
-					) {
-						this.$message({
-							message: '水分输入错误',
-							type: 'warning'
-						})
-						return
-					}
+					// if (!this.dataList.bulkDensity) {
+					// 	this.$message({
+					// 		message: '容重不能为空!',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	this.dataList.bulkDensity < 0 ||
+					// 	this.dataList.bulkDensity > 1000
+					// ) {
+					// 	this.$message({
+					// 		message: '容重输入错误',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	String(this.dataList.bulkDensity).indexOf('.') != -1 &&
+					// 	String(this.dataList.bulkDensity).length -
+					// 	(String(this.dataList.bulkDensity).indexOf('.') + 1) >
+					// 	0
+					// ) {
+					// 	this.$message({
+					// 		message: '容重需输入整数',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (!this.dataList.waterContent) {
+					// 	this.$message({
+					// 		message: '水分不能为空!',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (this.dataList.waterContent < 0 || this.dataList.waterContent > 40) {
+					// 	this.$message({
+					// 		message: '水分输入错误',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	String(this.dataList.waterContent).indexOf('.') != -1 &&
+					// 	String(this.dataList.waterContent).length -
+					// 	(String(this.dataList.waterContent).indexOf('.') + 1) >
+					// 	1
+					// ) {
+					// 	this.$message({
+					// 		message: '水分输入错误',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
 					if(this.Pricetype){
 						if (!this.dataList.unitPrice) {
 						this.$message({
@@ -961,64 +961,64 @@
 						})
 						return
 					}
-					if (!this.dataList1.bulkDensity) {
-						this.$message({
-							message: '容重不能为空!',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						this.dataList1.bulkDensity < 500 ||
-						this.dataList1.bulkDensity > 1000
-					) {
-						this.$message({
-							message: '容重输入错误',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						String(this.dataList1.bulkDensity).indexOf('.') != -1 &&
-						String(this.dataList1.bulkDensity).length -
-						(String(this.dataList1.bulkDensity).indexOf('.') + 1) >
-						0
-					) {
-						this.$message({
-							message: '容重需输入整数',
-							type: 'warning'
-						})
-						return
-					}
-					if (!this.dataList1.waterContent) {
-						this.$message({
-							message: '水分不能为空!',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						this.dataList1.waterContent < 0 ||
-						this.dataList1.waterContent > 40
-					) {
-						this.$message({
-							message: '水分输入错误',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						String(this.dataList1.waterContent).indexOf('.') != -1 &&
-						String(this.dataList1.waterContent).length -
-						(String(this.dataList1.waterContent).indexOf('.') + 1) >
-						1
-					) {
-						this.$message({
-							message: '水分输入错误',
-							type: 'warning'
-						})
-						return
-					}
+					// if (!this.dataList1.bulkDensity) {
+					// 	this.$message({
+					// 		message: '容重不能为空!',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	this.dataList1.bulkDensity < 500 ||
+					// 	this.dataList1.bulkDensity > 1000
+					// ) {
+					// 	this.$message({
+					// 		message: '容重输入错误',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	String(this.dataList1.bulkDensity).indexOf('.') != -1 &&
+					// 	String(this.dataList1.bulkDensity).length -
+					// 	(String(this.dataList1.bulkDensity).indexOf('.') + 1) >
+					// 	0
+					// ) {
+					// 	this.$message({
+					// 		message: '容重需输入整数',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (!this.dataList1.waterContent) {
+					// 	this.$message({
+					// 		message: '水分不能为空!',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	this.dataList1.waterContent < 0 ||
+					// 	this.dataList1.waterContent > 40
+					// ) {
+					// 	this.$message({
+					// 		message: '水分输入错误',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	String(this.dataList1.waterContent).indexOf('.') != -1 &&
+					// 	String(this.dataList1.waterContent).length -
+					// 	(String(this.dataList1.waterContent).indexOf('.') + 1) >
+					// 	1
+					// ) {
+					// 	this.$message({
+					// 		message: '水分输入错误',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
 					if(this.Pricetype){
 						if (!this.dataList1.unitPrice) {
 						this.$message({
@@ -1212,64 +1212,64 @@
 						})
 						return
 					}
-					if (!this.dataList1.bulkDensity) {
-						this.$message({
-							message: '容重不能为空!',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						this.dataList1.bulkDensity < 500 ||
-						this.dataList1.bulkDensity > 1000
-					) {
-						this.$message({
-							message: '容重输入错误',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						String(this.dataList1.bulkDensity).indexOf('.') != -1 &&
-						String(this.dataList1.bulkDensity).length -
-						(String(this.dataList1.bulkDensity).indexOf('.') + 1) >
-						0
-					) {
-						this.$message({
-							message: '容重需输入整数',
-							type: 'warning'
-						})
-						return
-					}
-					if (!this.dataList1.waterContent) {
-						this.$message({
-							message: '水分不能为空!',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						this.dataList1.waterContent < 0 ||
-						this.dataList1.waterContent > 40
-					) {
-						this.$message({
-							message: '水分输入错误',
-							type: 'warning'
-						})
-						return
-					}
-					if (
-						String(this.dataList1.waterContent).indexOf('.') != -1 &&
-						String(this.dataList1.waterContent).length -
-						(String(this.dataList1.waterContent).indexOf('.') + 1) >
-						1
-					) {
-						this.$message({
-							message: '水分输入错误',
-							type: 'warning'
-						})
-						return
-					}
+					// if (!this.dataList1.bulkDensity) {
+					// 	this.$message({
+					// 		message: '容重不能为空!',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	this.dataList1.bulkDensity < 500 ||
+					// 	this.dataList1.bulkDensity > 1000
+					// ) {
+					// 	this.$message({
+					// 		message: '容重输入错误',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	String(this.dataList1.bulkDensity).indexOf('.') != -1 &&
+					// 	String(this.dataList1.bulkDensity).length -
+					// 	(String(this.dataList1.bulkDensity).indexOf('.') + 1) >
+					// 	0
+					// ) {
+					// 	this.$message({
+					// 		message: '容重需输入整数',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (!this.dataList1.waterContent) {
+					// 	this.$message({
+					// 		message: '水分不能为空!',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	this.dataList1.waterContent < 0 ||
+					// 	this.dataList1.waterContent > 40
+					// ) {
+					// 	this.$message({
+					// 		message: '水分输入错误',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
+					// if (
+					// 	String(this.dataList1.waterContent).indexOf('.') != -1 &&
+					// 	String(this.dataList1.waterContent).length -
+					// 	(String(this.dataList1.waterContent).indexOf('.') + 1) >
+					// 	1
+					// ) {
+					// 	this.$message({
+					// 		message: '水分输入错误',
+					// 		type: 'warning'
+					// 	})
+					// 	return
+					// }
 					if(this.Pricetype){
 						if (!this.dataList1.unitPrice) {
 						this.$message({
@@ -1602,7 +1602,7 @@
 							})
 							.toPromise()
 							.then(response => {
-								console.log("查仓库sss",response)
+								console.log('查仓库sss',response)
 								for (var i = 0; i < response.length; i++) {
 									this.warehouseNameList.push(response[i])
 								}

+ 483 - 628
src/views/tradeServicesManagement/approveWarehouseReceipt.vue

@@ -6,274 +6,131 @@
         <h2 class="bg-left titleup">审批仓单</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
-        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
-          ><img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt=""
-          />返回
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
       </el-col>
     </el-row>
 
-    <el-form
-      ref="deptBudgetList"
-      :rules="rules"
-      :model="deptBudgetList"
-      class="content2"
-      :inline="true"
-      label-position="right"
-      label-width="120px"
-    >
+    <el-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList" class="content2" :inline="true"
+      label-position="right" label-width="120px">
       <!-- <ws-info-table class="el-table"> -->
       <div class="title1">申请信息</div>
       <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
-        <el-input
-          v-model="deptBudgetList.billNo"
-          placeholder="请输入任务编号"
-          maxlength="20"
-          size="small"
-          disabled
-        ></el-input>
+        <el-input v-model="deptBudgetList.billNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled></el-input>
       </el-form-item>
       <el-form-item label="名头" span="1" prop="taskNo" class="renown">
-        <el-select
-          v-model="deptBudgetList.renown"
-          placeholder="请选择名头"
-          disabled
-          filterable clearable
-        >
-          <el-option
-            :label="item.compName"
-            :value="item.compId"
-            v-for="(item, index) in compOptionList"
-            :Key="index"
-          ></el-option>
+        <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" disabled filterable clearable>
+          <el-option :label="item.compName" :value="item.compId" v-for="(item, index) in compOptionList" :Key="index">
+          </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item
-        label="仓库名称"
-        span="1"
-        prop="warehouseName"
-        class="forlist"
-      >
-        <el-select
-          v-model="deptBudgetList.warehouseName"
-          placeholder="请选择仓库"
-          disabled
-          filterable clearable
-        >
-          <el-option
-            :label="item.warehouseName"
-            :value="item.id"
-            v-for="(item, index) in warehouseList"
-            :key="index"
-          ></el-option>
+      <el-form-item label="仓库名称" span="1" prop="warehouseName" class="forlist">
+        <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" disabled filterable clearable>
+          <el-option :label="item.warehouseName" :value="item.id" v-for="(item, index) in warehouseList" :key="index">
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
-        <el-select
-          v-model="deptBudgetList.warehouseNo"
-          placeholder="请选择仓位号"
-          disabled
-          filterable clearable
-        >
-          <el-option
-            :label="item.binNumber"
-            :value="item.id"
-            v-for="(item, index) in cwNumberList"
-            :key="index"
-          ></el-option>
+        <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号" disabled filterable clearable>
+          <el-option :label="item.binNumber" :value="item.id" v-for="(item, index) in cwNumberList" :key="index">
+          </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item
-        label="仓库地址"
-        span="1"
-        prop="warehouseAddress"
-        class="forlist"
-      >
-        <el-input
-          disabled
-          v-model="deptBudgetList.warehouseAddress"
-          placeholder="请输入仓库地址"
-          size="small"
-        ></el-input>
+      <el-form-item label="仓库地址" span="1" prop="warehouseAddress" class="forlist">
+        <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
       </el-form-item>
       <el-form-item prop="goodsName" label="货名" span="1">
-        <el-select
-          v-model="deptBudgetList.goodsName"
-          placeholder="请选择货名"
-          disabled
-          filterable clearable
-        >
-          <el-option
-            v-for="(item, index) in goodsList"
-            :key="index"
-            :label="item.goodsName"
-            :value="item.id"
-          >
+        <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" disabled filterable clearable>
+          <el-option v-for="(item, index) in goodsList" :key="index" :label="item.goodsName" :value="item.id">
           </el-option>
         </el-select>
       </el-form-item>
       <el-form-item prop="grade" label="品级" span="1">
-        <el-select
-          v-model="deptBudgetList.grade"
-          placeholder="请选择品级"
-          disabled
-          filterable clearable
-        >
+        <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled filterable clearable>
           <el-option label="一等" value="一等"></el-option>
           <el-option label="二等" value="二等"></el-option>
           <el-option label="三等" value="三等"></el-option>
           <el-option label="等外" value="等外"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item
-        label="现有储量"
-        span="1"
-        prop="nowWeight"
-        class="forlist"
-        disabled
-      >
-        <el-input
-          disabled
-          v-model="deptBudgetList.nowWeight"
-          placeholder="请输入现有储量"
-          size="small"
-		  class="existing"
-        ></el-input>
-		<el-button  type="primary" @click="poundList">磅单</el-button>
+      <el-form-item label="现有储量" span="1" prop="nowWeight" class="forlist" disabled>
+        <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small" class="existing">
+        </el-input>
+        <el-button type="primary" @click="poundList">磅单</el-button>
       </el-form-item>
-      <el-form-item
-        label="可用储量(吨)"
-        span="1"
-        prop="useWeight"
-        class="forlist"
-      >
-        <el-input
-          disabled
-          v-model="deptBudgetList.useWeight"
-          placeholder="请输入可用储量"
-          size="small"
-        ></el-input>
+      <el-form-item label="可用储量(吨)" span="1" prop="useWeight" class="forlist">
+        <el-input disabled v-model="deptBudgetList.useWeight" placeholder="请输入可用储量" size="small"></el-input>
       </el-form-item>
-      <el-form-item
-        label="本单重量(吨)"
-        span="1"
-        prop="weight"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.weight"
-          placeholder="输入本次仓单申请所需的重量"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="本单重量(吨)" span="1" prop="weight" class="forlist">
+        <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" disabled></el-input>
       </el-form-item>
-      <el-form-item
-        label="单价(元/吨)"
-        span="1"
-        prop="unitPrice"
-        class="forlist"
-        disabled
-      >
-        <el-input
-          v-model="deptBudgetList.unitPrice"
-          placeholder="输入粮食单价"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="单价(元/吨)" span="1" prop="unitPrice" class="forlist" disabled>
+        <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" disabled></el-input>
       </el-form-item>
-      <el-form-item
-        label="总价值(元)"
-        span="1"
-        prop="totalValue"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.totalValue"
-          disabled
-          placeholder="自动计算,不可编辑"
-          size="small"
-        ></el-input>
+      <el-form-item label="总价值(元)" span="1" prop="totalValue" class="forlist">
+        <el-input type='number' v-model="deptBudgetList.totalValue" disabled placeholder="自动计算,不可编辑" size="small">
+        </el-input>
       </el-form-item>
-      <el-form-item
-        label="申请比例(%)"
-        span="1"
-        prop="applicationProportion"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.applicationProportion"
-          placeholder="输入申请比例"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="申请比例(%)" span="1" prop="applicationProportion" class="forlist">
+        <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small" disabled></el-input>
       </el-form-item>
-      <el-form-item
-        label="申请金额(元)"
-        span="1"
-        prop="interest"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.interest"
-          placeholder="输入申请金额"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="申请金额(元)" span="1" prop="interest" class="forlist">
+        <el-input type="number" v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small" disabled></el-input>
       </el-form-item>
       <div>附件</div>
-      <ws-upload
-        ref="upload"
-        :comp-id="compId"
-        :appendix-ids="deptBudgetList.appendix"
-        :size-limit="size"
-        @onChange="onChange"
-        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-        :editable="false"
-      />
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"
+        @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" :editable="false" />
       <div class="title1">发放信息</div>
       <el-form-item prop="contractNo" label="合同编号" span="1">
-        <el-input
-          v-model="deptBudgetList.contractNo"
-          placeholder="请输入合同编号"
-          size="small"
-        ></el-input>
+        <el-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" size="small"></el-input>
       </el-form-item>
       <el-form-item label="发放金额" span="1" prop="taskNo">
-        <el-input
-          v-model="deptBudgetList.paymentAmount"
-          placeholder="请输入发放金额"
-          @input="customEdit"
-          type="number"
-          size="small"
-        ></el-input>
+        <el-input v-model="deptBudgetList.paymentAmount" placeholder="请输入发放金额" @input="customEdit" type="number"
+          size="small"></el-input>
       </el-form-item>
-	
-	 <div class="custom">
-		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense1" :disabled="costOne" maxlength="8" ></el-input></div>
-		  <div class="custom2"><el-input type="number" v-model="deptBudgetList.applicationAmount" placeholder="请输入金额" :disabled="costOne" @input="customEdit" ></el-input></div>
-		  <span @click="switch1(1)" class="span_text">{{deptBudgetList.applicationAmountFlag}}</span>
-	  </div>
-	   <div class="custom">
-		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense2" :disabled="costTwo"  maxlength="8"></el-input></div>
-		  <div class="custom2"><el-input type="number" v-model="deptBudgetList.supervisionFee" placeholder="请输入金额"  :disabled="costTwo" @input="customEdit"></el-input></div>
-		  <span @click="switch1(2)" class="span_text">{{deptBudgetList.supervisionFeeFlag}}</span>
-	  </div>
-	   <div class="custom">
-		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense3"  :disabled="costThree"  maxlength="8"></el-input></div>
-		  <div class="custom2"><el-input type="number" v-model="deptBudgetList.insurancePremium" placeholder="请输入金额" :disabled="costThree" @input="customEdit"></el-input></div>
-		  <span @click="switch1(3)" class="span_text">{{deptBudgetList.insurancePremiumFlag}}</span>
-	  </div>
-	   <div class="custom">
-		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense4"  :disabled="costFour"  maxlength="8"></el-input></div>
-		  <div class="custom2"><el-input type="number" v-model="deptBudgetList.otherFee" placeholder="请输入金额"  :disabled="costFour" @input="customEdit"></el-input></div>
-		  <span @click="switch1(4)" class="span_text">{{deptBudgetList.otherFeeFlag}}</span>
-	  </div>
-	  <!-- <el-form-item label="利息" span="1" prop="taskNo">
+
+      <div class="custom">
+        <div class="custom1">
+          <el-input type="text" v-model="deptBudgetList.modifyExpense1" :disabled="costOne" maxlength="8"></el-input>
+        </div>
+        <div class="custom2">
+          <el-input type="number" v-model="deptBudgetList.applicationAmount" placeholder="请输入金额" :disabled="costOne"
+            @input="customEdit"></el-input>
+        </div>
+        <span @click="switch1(1)" class="span_text">{{deptBudgetList.applicationAmountFlag}}</span>
+      </div>
+      <div class="custom">
+        <div class="custom1">
+          <el-input type="text" v-model="deptBudgetList.modifyExpense2" :disabled="costTwo" maxlength="8"></el-input>
+        </div>
+        <div class="custom2">
+          <el-input type="number" v-model="deptBudgetList.supervisionFee" placeholder="请输入金额" :disabled="costTwo"
+            @input="customEdit"></el-input>
+        </div>
+        <span @click="switch1(2)" class="span_text">{{deptBudgetList.supervisionFeeFlag}}</span>
+      </div>
+      <div class="custom">
+        <div class="custom1">
+          <el-input type="text" v-model="deptBudgetList.modifyExpense3" :disabled="costThree" maxlength="8"></el-input>
+        </div>
+        <div class="custom2">
+          <el-input type="number" v-model="deptBudgetList.insurancePremium" placeholder="请输入金额" :disabled="costThree"
+            @input="customEdit"></el-input>
+        </div>
+        <span @click="switch1(3)" class="span_text">{{deptBudgetList.insurancePremiumFlag}}</span>
+      </div>
+      <div class="custom">
+        <div class="custom1">
+          <el-input type="text" v-model="deptBudgetList.modifyExpense4" :disabled="costFour" maxlength="8"></el-input>
+        </div>
+        <div class="custom2">
+          <el-input type="number" v-model="deptBudgetList.otherFee" placeholder="请输入金额" :disabled="costFour"
+            @input="customEdit"></el-input>
+        </div>
+        <span @click="switch1(4)" class="span_text">{{deptBudgetList.otherFeeFlag}}</span>
+      </div>
+      <!-- <el-form-item label="利息" span="1" prop="taskNo">
         <el-input
           v-model="deptBudgetList.paymentAmount"
           placeholder="请输入金额"
@@ -301,13 +158,8 @@
           size="small"
         ></el-input>
       </el-form-item> -->
-	   <el-form-item label="合计应还(元)" span="1" prop="amountDue">
-        <el-input
-          v-model="deptBudgetList.amountDue"
-          placeholder="自动计算,不可编辑"
-          size="small"
-		  disabled
-        ></el-input>
+      <el-form-item label="合计应还(元)" span="1" prop="amountDue">
+        <el-input v-model="deptBudgetList.amountDue" placeholder="自动计算,不可编辑" size="small" disabled></el-input>
       </el-form-item>
       <div>
         <el-button @click="outerVisible = true" type="primary">驳回</el-button>
@@ -322,8 +174,8 @@
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="审核结果">
           <template scope="scope">
-            <span v-if="scope.row.approved" >通过</span>
-            <span v-if="!scope.row.approved" >驳回</span>
+            <span v-if="scope.row.approved">通过</span>
+            <span v-if="!scope.row.approved">驳回</span>
           </template>
         </el-table-column>
         <el-table-column prop="endTime" label="审核时间"></el-table-column>
@@ -331,35 +183,15 @@
       </el-table>
       <!-- </ws-info-table> -->
     </el-form>
-    <WinseaContentModal
-      v-model="outerVisible"
-      title="驳回原因"
-      @on-cancel="handleClose"
-    >
-      <el-input
-        type="textarea"
-        :rows="2"
-        maxlength="50"
-        placeholder="请输入驳回原因,1~50个字"
-        v-model="rejectText"
-      ></el-input>
+    <WinseaContentModal v-model="outerVisible" title="驳回原因" @on-cancel="handleClose">
+      <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入驳回原因,1~50个字" v-model="rejectText"></el-input>
       <div class="dialog-footer">
         <el-button @click="outerVisible = false">取 消</el-button>
         <el-button type="primary" @click="rejectSubmit">确定</el-button>
       </div>
     </WinseaContentModal>
-    <WinseaContentModal
-      v-model="outerVisible1"
-      title="审核意见"
-      @on-cancel="handleClose"
-    >
-      <el-input
-        type="textarea"
-        :rows="2"
-        maxlength="50"
-        placeholder="请输入审核意见,1~50个字"
-        v-model="adoptText"
-      ></el-input>
+    <WinseaContentModal v-model="outerVisible1" title="审核意见" @on-cancel="handleClose">
+      <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入审核意见,1~50个字" v-model="adoptText"></el-input>
       <div class="dialog-footer">
         <el-button @click="outerVisible1 = false">取 消</el-button>
         <el-button type="primary" @click="adoptSubmit">确定</el-button>
@@ -368,127 +200,137 @@
   </div>
 </template>
 <script>
-import { getcompList } from '@/model/signIn/index'
-import { woekflowhandle } from '@/model/tasksport/index'
-import {
-  getWarehouseReceiptLook,
-  getWarehouseReceiptExamine,
-  WarehouseReceiptUpdate,
-} from '@/model/tradeServicesManagement/index'
-import { selectWarehouseSelf } from '@/model/houseSelfCollect/index'
-import WsUpload from '@/components/WsUpload'
-export default {
-  components: {
-    WsUpload,
-  },
-  data() {
-    return {
-      deptBudgetList: {},
-      costOne:true,
-      costTwo:true,
-      costThree:true,
-      costFour:true,
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      compOptionList: [],
-      taskhistories: [],
-      warehouseList: [],
-      cwNumberList: [],
-      goodsList: [],
-      rules: {
-        // unitPrice: [
-        //   { required: true, message: '单价不能为空!', trigger: 'blur' },
-        //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
-        // ],
-      },
-      outerVisible: false, //驳回
-      outerVisible1: false, //通过
-      rejectText: '', //驳回原因
-      adoptText: '', //审核意见
-    }
-  },
-  activated() {
-    // this.id = this.$route.query.id
-    this.getList(this.$route.query.id)
-    this.getcompList()
-  },
-  methods: {
-	  switch1(num){  
-		  if(num == 1){
-			  this.costOne = !this.costOne
-        this.deptBudgetList.applicationAmount = ""
-			  if(this.costOne){
-				   this.deptBudgetList.applicationAmountFlag = "隐藏中"
-			  }else{
-				  this.deptBudgetList.applicationAmountFlag = "显示中"
-			  }
-		  }else if(num == 2){
-				this.costTwo = !this.costTwo
-        this.deptBudgetList.supervisionFee = ""
-				  if(this.costTwo){
-				   this.deptBudgetList.supervisionFeeFlag = "隐藏中"
-			  }else{
-				  this.deptBudgetList.supervisionFeeFlag = "显示中"
-			  }
-		  }else if(num == 3){
-			  this.costThree = !this.costThree
-          this.deptBudgetList.insurancePremium = ""
-			    if(this.costThree){
-				   this.deptBudgetList.insurancePremiumFlag = "隐藏中"
-			  }else{
-				  this.deptBudgetList.insurancePremiumFlag = "显示中"
-			  }
-		  }else if(num == 4){
-         this.costFour = !this.costFour
-          this.deptBudgetList.otherFee = ""
-			    if(this.costFour){
-				    this.deptBudgetList.otherFeeFlag = "隐藏中"
-			  }else{
-				    this.deptBudgetList.otherFeeFlag = "显示中"
-			  }
-		  }
-      this.customEdit()
-	  },
-	  customEdit(){
-		  this.deptBudgetList.amountDue = Number(this.deptBudgetList.paymentAmount) + Number(this.deptBudgetList.applicationAmount ? this.deptBudgetList.applicationAmount : 0) + Number(this.deptBudgetList.supervisionFee ? this.deptBudgetList.supervisionFee : 0) + Number(this.deptBudgetList.insurancePremium ? this.deptBudgetList.insurancePremium : 0) + Number(this.deptBudgetList.otherFee? this.deptBudgetList.otherFee : 0)
-	  },
-    //返回
-    cancel() {
-      this.$router.push({
-        path: 'warehouseReceiptRegulation',
-      })
+  import {
+    getcompList
+  } from '@/model/signIn/index'
+  import {
+    woekflowhandle
+  } from '@/model/tasksport/index'
+  import {
+    getWarehouseReceiptLook,
+    getWarehouseReceiptExamine,
+    WarehouseReceiptUpdate,
+  } from '@/model/tradeServicesManagement/index'
+  import {
+    selectWarehouseSelf
+  } from '@/model/houseSelfCollect/index'
+  import WsUpload from '@/components/WsUpload'
+  export default {
+    components: {
+      WsUpload,
     },
-    handleClose() {
-      if (this.outerVisible) {
-        this.outerVisible = false
-      }
-      if (this.outerVisible1) {
-        this.outerVisible1 = false
+    data() {
+      return {
+        deptBudgetList: {},
+        costOne: true,
+        costTwo: true,
+        costThree: true,
+        costFour: true,
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        compOptionList: [],
+        taskhistories: [],
+        warehouseList: [],
+        cwNumberList: [],
+        goodsList: [],
+        rules: {
+          // unitPrice: [
+          //   { required: true, message: '单价不能为空!', trigger: 'blur' },
+          //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+          // ],
+        },
+        outerVisible: false, //驳回
+        outerVisible1: false, //通过
+        rejectText: '', //驳回原因
+        adoptText: '', //审核意见
       }
     },
-    //驳回
-    rejectSubmit() {
-      if (!this.rejectText || this.rejectText.length > 50) {
-        this.$message.error('驳回原因不能为空且不能超出50字')
-        return
-      } else {
-        woekflowhandle({
-          taskId: this.deptBudgetList.taskId,
-          approved: false,
-          auditMind: this.rejectText,
-          needReapply: true,
-        })
-          .toPromise()
-          .then((response) => {
-            this.$message.success('驳回成功')
-            this.handleClose()
-            this.$router.push({
-          path: 'warehouseReceiptRegulation'
-        })
-          })
-      }
+    activated() {
+      // this.id = this.$route.query.id
+      this.getList(this.$route.query.id)
+      this.getcompList()
     },
-    validate() {
+    methods: {
+      switch1(num) {
+        if (num == 1) {
+          this.costOne = !this.costOne
+          this.deptBudgetList.applicationAmount = ""
+          if (this.costOne) {
+            this.deptBudgetList.applicationAmountFlag = "隐藏中"
+          } else {
+            this.deptBudgetList.applicationAmountFlag = "显示中"
+          }
+        } else if (num == 2) {
+          this.costTwo = !this.costTwo
+          this.deptBudgetList.supervisionFee = ""
+          if (this.costTwo) {
+            this.deptBudgetList.supervisionFeeFlag = "隐藏中"
+          } else {
+            this.deptBudgetList.supervisionFeeFlag = "显示中"
+          }
+        } else if (num == 3) {
+          this.costThree = !this.costThree
+          this.deptBudgetList.insurancePremium = ""
+          if (this.costThree) {
+            this.deptBudgetList.insurancePremiumFlag = "隐藏中"
+          } else {
+            this.deptBudgetList.insurancePremiumFlag = "显示中"
+          }
+        } else if (num == 4) {
+          this.costFour = !this.costFour
+          this.deptBudgetList.otherFee = ""
+          if (this.costFour) {
+            this.deptBudgetList.otherFeeFlag = "隐藏中"
+          } else {
+            this.deptBudgetList.otherFeeFlag = "显示中"
+          }
+        }
+        this.customEdit()
+      },
+      customEdit() {
+        this.deptBudgetList.amountDue = Number(this.deptBudgetList.paymentAmount) + Number(this.deptBudgetList
+          .applicationAmount ? this.deptBudgetList.applicationAmount : 0) + Number(this.deptBudgetList
+          .supervisionFee ? this.deptBudgetList.supervisionFee : 0) + Number(this.deptBudgetList.insurancePremium ?
+          this.deptBudgetList.insurancePremium : 0) + Number(this.deptBudgetList.otherFee ? this.deptBudgetList
+          .otherFee : 0)
+      },
+      //返回
+      cancel() {
+        this.$router.push({
+          path: 'warehouseReceiptRegulation',
+        })
+      },
+      handleClose() {
+        if (this.outerVisible) {
+          this.outerVisible = false
+        }
+        if (this.outerVisible1) {
+          this.outerVisible1 = false
+        }
+      },
+      //驳回
+      rejectSubmit() {
+        if (!this.rejectText || this.rejectText.length > 50) {
+          this.$message.error('驳回原因不能为空且不能超出50字')
+          return
+        } else {
+          woekflowhandle({
+              taskId: this.deptBudgetList.taskId,
+              approved: false,
+              auditMind: this.rejectText,
+              needReapply: true,
+            })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('驳回成功')
+              this.handleClose()
+              this.$router.push({
+                path: 'warehouseReceiptRegulation'
+              })
+            })
+        }
+      },
+      validate() {
         function _Validate(min, max, saveNum, type, inputVal) {
           let _val1 = inputVal
           let _pointVal1 = _val1.toString().split('.')[1]
@@ -499,7 +341,8 @@ export default {
           }
           return true
         }
-        if (!this.deptBudgetList.contractNo || this.deptBudgetList.contractNo.length < 6 || this.deptBudgetList.contractNo.length > 30) {
+        if (!this.deptBudgetList.contractNo || this.deptBudgetList.contractNo.length < 6 || this.deptBudgetList
+          .contractNo.length > 30) {
           this.$message.error('合同编号不能为空且长度为6-30个字符!');
           return false
         }
@@ -511,291 +354,303 @@ export default {
           }
           return false
         }
-        
-        if(!this.costOne){
-          if (!this.deptBudgetList.applicationAmount || _Validate(1, 100000000, 2, '', this.deptBudgetList.applicationAmount)) {
-          if (!this.deptBudgetList.applicationAmount) {
-            this.$message.error(this.deptBudgetList.modifyExpense1 + '不能为空!');
-          } else {
-            this.$message.error(this.deptBudgetList.modifyExpense1 + '输入错误,1-1000000000之间,最多保留2位小数!');
+
+        if (!this.costOne) {
+          if (!this.deptBudgetList.applicationAmount || _Validate(1, 100000000, 2, '', this.deptBudgetList
+              .applicationAmount)) {
+            if (!this.deptBudgetList.applicationAmount) {
+              this.$message.error(this.deptBudgetList.modifyExpense1 + '不能为空!');
+            } else {
+              this.$message.error(this.deptBudgetList.modifyExpense1 + '输入错误,1-1000000000之间,最多保留2位小数!');
+            }
+            return false
           }
-          return false
-         }
         }
-         if(!this.costTwo){
-          if (!this.deptBudgetList.supervisionFee || _Validate(1, 100000000, 2, '', this.deptBudgetList.supervisionFee)) {
-          if (!this.deptBudgetList.supervisionFee) {
-            this.$message.error(this.deptBudgetList.modifyExpense2 + '不能为空!');
-          } else {
-            this.$message.error(this.deptBudgetList.modifyExpense2 + '输入错误,1-1000000000之间,最多保留2位小数!');
+        if (!this.costTwo) {
+          if (!this.deptBudgetList.supervisionFee || _Validate(1, 100000000, 2, '', this.deptBudgetList
+            .supervisionFee)) {
+            if (!this.deptBudgetList.supervisionFee) {
+              this.$message.error(this.deptBudgetList.modifyExpense2 + '不能为空!');
+            } else {
+              this.$message.error(this.deptBudgetList.modifyExpense2 + '输入错误,1-1000000000之间,最多保留2位小数!');
+            }
+            return false
           }
-          return false
-         }
         }
-         if(!this.costThree){
-          if (!this.deptBudgetList.insurancePremium || _Validate(1, 100000000, 2, '', this.deptBudgetList.insurancePremium)) {
-          if (!this.deptBudgetList.insurancePremium) {
-            this.$message.error(this.deptBudgetList.modifyExpense3 + '不能为空!');
-          } else {
-            this.$message.error(this.deptBudgetList.modifyExpense3 + '输入错误,1-1000000000之间,最多保留2位小数!');
+        if (!this.costThree) {
+          if (!this.deptBudgetList.insurancePremium || _Validate(1, 100000000, 2, '', this.deptBudgetList
+              .insurancePremium)) {
+            if (!this.deptBudgetList.insurancePremium) {
+              this.$message.error(this.deptBudgetList.modifyExpense3 + '不能为空!');
+            } else {
+              this.$message.error(this.deptBudgetList.modifyExpense3 + '输入错误,1-1000000000之间,最多保留2位小数!');
+            }
+            return false
           }
-          return false
-         }
         }
-         if(!this.costFour){
+        if (!this.costFour) {
           if (!this.deptBudgetList.otherFee || _Validate(1, 100000000, 2, '', this.deptBudgetList.otherFee)) {
-          if (!this.deptBudgetList.otherFee) {
-            this.$message.error(this.deptBudgetList.modifyExpense4 + '不能为空!');
-          } else {
-            this.$message.error(this.deptBudgetList.modifyExpense4 + '输入错误,1-1000000000之间,最多保留2位小数!');
+            if (!this.deptBudgetList.otherFee) {
+              this.$message.error(this.deptBudgetList.modifyExpense4 + '不能为空!');
+            } else {
+              this.$message.error(this.deptBudgetList.modifyExpense4 + '输入错误,1-1000000000之间,最多保留2位小数!');
+            }
+            return false
           }
-          return false
-         }
         }
         return true
       },
-      submit(){
+      submit() {
         let isValidate = false
         isValidate = this.validate()
-        if(isValidate){
+        if (isValidate) {
           this.outerVisible1 = true
         }
       },
-    // 提交
-    adoptSubmit() {
-        
-      if (!this.adoptText || this.adoptText.length > 50) {
-        this.$message.error('审核意见不能为空且不能超出50字')
-      } else {
-        this.deptBudgetList.amountToRepaid = this.deptBudgetList.amountDue//设置待还金额
-		WarehouseReceiptUpdate(this.deptBudgetList)
-        .toPromise()
-        .then((response) => {
-          //  this.$message.success('提交成功')
-		woekflowhandle({
-          taskId: this.deptBudgetList.taskId,
-          approved: true,
-          auditMind: this.adoptText,
-          needReapply: false,
-        })
+      // 提交
+      adoptSubmit() {
+
+        if (!this.adoptText || this.adoptText.length > 50) {
+          this.$message.error('审核意见不能为空且不能超出50字')
+        } else {
+          this.deptBudgetList.amountToRepaid = this.deptBudgetList.amountDue //设置待还金额
+          WarehouseReceiptUpdate(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              //  this.$message.success('提交成功')
+              woekflowhandle({
+                  taskId: this.deptBudgetList.taskId,
+                  approved: true,
+                  auditMind: this.adoptText,
+                  needReapply: false,
+                })
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('审批成功')
+                  this.handleClose()
+                  this.$router.push({
+                    path: 'warehouseReceiptRegulation'
+                  })
+                })
+            })
+            .catch((req) => {
+              this.$message.success('提交失败')
+            })
+        }
+      },
+      getcompList() {
+        getcompList()
+          .toPromise()
+          .then((res) => {
+            this.compOptionList = res
+            this.deptBudgetList.renown = res[0].compName
+          })
+          .catch((err) => {})
+      },
+      getWarehouse() {
+        //获取仓库
+        selectWarehouseSelf({
+            compId: this.compId,
+          })
           .toPromise()
           .then((response) => {
-            this.$message.success('审批成功')
-            this.handleClose()
-            this.$router.push({
-          path: 'warehouseReceiptRegulation'
-        })
+            this.warehouseList = response
+            this.deptBudgetList.warehouseName = response[0].warehouseName
+            this.cwNumberList = response[0].positionInfos
+            this.deptBudgetList.warehouseNo =
+              response[0].positionInfos.length != 0 ?
+              response[0].positionInfos[0].binNumber :
+              ''
+            this.deptBudgetList.baseId =
+              response[0].positionInfos.length != 0 ?
+              response[0].positionInfos[0].baseId :
+              ''
+            this.deptBudgetList.warehouseAddress =
+              response[0].warehousePrivate +
+              response[0].warehouseCity +
+              response[0].warehouseArea +
+              response[0].detailedAddress
+            this.goodsList = response[0].goodsNameInfos
+            this.deptBudgetList.nowWeight =
+              response[0].goodsNameInfos.length != 0 ?
+              response[0].goodsNameInfos[0].storage :
+              ''
+            // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
+            this.deptBudgetList.useWeight = '10'
+            this.deptBudgetList.goodsName =
+              response[0].goodsNameInfos.length != 0 ?
+              response[0].goodsNameInfos[0].goodsName :
+              ''
+            this.deptBudgetList.warehouseId = response[0].id
+            if (!this.deptBudgetList.renown)
+              this.deptBudgetList.renown = this.compOptionList[0].compName
+            if (!this.deptBudgetList.renownId)
+              this.deptBudgetList.renownId = this.compOptionList[0].compId
+            this.deptBudgetList.bankId = 'bankId'
+            this.deptBudgetList.threeId = 'threeId'
+            this.deptBudgetList.warehouseNoId =
+              response[0].positionInfos.length != 0 ?
+              response[0].positionInfos[0].id :
+              ''
+            this.deptBudgetList.goodsNameKey =
+              response[0].goodsNameInfos.length != 0 ?
+              response[0].goodsNameInfos[0].goodsNameKey :
+              ''
           })
-        })
-        .catch((req) => {
-          this.$message.success('提交失败')
-        }) 
-      }
-    },
-    getcompList() {
-      getcompList()
-        .toPromise()
-        .then((res) => {
-          this.compOptionList = res
-          this.deptBudgetList.renown = res[0].compName
-        })
-        .catch((err) => {})
-    },
-    getWarehouse() {
-      //获取仓库
-      selectWarehouseSelf({
-        compId: this.compId,
-      })
-        .toPromise()
-        .then((response) => {
-          this.warehouseList = response
-          this.deptBudgetList.warehouseName = response[0].warehouseName
-          this.cwNumberList = response[0].positionInfos
-          this.deptBudgetList.warehouseNo =
-            response[0].positionInfos.length != 0
-              ? response[0].positionInfos[0].binNumber
-              : ''
-          this.deptBudgetList.baseId =
-            response[0].positionInfos.length != 0
-              ? response[0].positionInfos[0].baseId
-              : ''
-          this.deptBudgetList.warehouseAddress =
-            response[0].warehousePrivate +
-            response[0].warehouseCity +
-            response[0].warehouseArea +
-            response[0].detailedAddress
-          this.goodsList = response[0].goodsNameInfos
-          this.deptBudgetList.nowWeight =
-            response[0].goodsNameInfos.length != 0
-              ? response[0].goodsNameInfos[0].storage
-              : ''
-          // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
-          this.deptBudgetList.useWeight = '10'
-          this.deptBudgetList.goodsName =
-            response[0].goodsNameInfos.length != 0
-              ? response[0].goodsNameInfos[0].goodsName
-              : ''
-          this.deptBudgetList.warehouseId = response[0].id
-          if (!this.deptBudgetList.renown)
-            this.deptBudgetList.renown = this.compOptionList[0].compName
-          if (!this.deptBudgetList.renownId)
-            this.deptBudgetList.renownId = this.compOptionList[0].compId
-          this.deptBudgetList.bankId = 'bankId'
-          this.deptBudgetList.threeId = 'threeId'
-          this.deptBudgetList.warehouseNoId =
-            response[0].positionInfos.length != 0
-              ? response[0].positionInfos[0].id
-              : ''
-          this.deptBudgetList.goodsNameKey =
-            response[0].goodsNameInfos.length != 0
-              ? response[0].goodsNameInfos[0].goodsNameKey
-              : ''
-        })
-    },
-    getList(id) {
-      //审核记录
-      getWarehouseReceiptExamine({
-        businessKey: id,
-        workflowId: this.$route.query.workflowId,
-      })
-        .toPromise()
-        .then((response) => {
-          this.taskhistories = response
-        })
-      getWarehouseReceiptLook({ id: id })
-        .toPromise()
-        .then((response) => {
-          this.deptBudgetList = response
-		      this.deptBudgetList.modifyExpense1="利息"
-		      this.deptBudgetList.modifyExpense2="监管费"
-		      this.deptBudgetList.modifyExpense3="保险费"
-		      this.deptBudgetList.modifyExpense4="其他费用"
-		      this.deptBudgetList.applicationAmountFlag="隐藏中"
-		      this.deptBudgetList.supervisionFeeFlag="隐藏中"
-		      this.deptBudgetList.insurancePremiumFlag="隐藏中"
-		      this.deptBudgetList.otherFeeFlag="隐藏中"
-          this.deptBudgetList.applicationAmount = ""
-         this.deptBudgetList.supervisionFee = ""
-          this.deptBudgetList.insurancePremium = ""
-           this.deptBudgetList.otherFee = ""
-            this.costOne=true
-            this.costTwo=true
-            this.costThree=true
-            this.costFour=true
-        })
-        .catch((req) => {
-          
-        })
-    },
+      },
+      getList(id) {
+        //审核记录
+        getWarehouseReceiptExamine({
+            businessKey: id,
+            workflowId: this.$route.query.workflowId,
+          })
+          .toPromise()
+          .then((response) => {
+            this.taskhistories = response
+          })
+        getWarehouseReceiptLook({
+            id: id
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList = response
+            this.deptBudgetList.modifyExpense1 = "利息"
+            this.deptBudgetList.modifyExpense2 = "监管费"
+            this.deptBudgetList.modifyExpense3 = "保险费"
+            this.deptBudgetList.modifyExpense4 = "其他费用"
+            this.deptBudgetList.applicationAmountFlag = "隐藏中"
+            this.deptBudgetList.supervisionFeeFlag = "隐藏中"
+            this.deptBudgetList.insurancePremiumFlag = "隐藏中"
+            this.deptBudgetList.otherFeeFlag = "隐藏中"
+            this.deptBudgetList.applicationAmount = ""
+            this.deptBudgetList.supervisionFee = ""
+            this.deptBudgetList.insurancePremium = ""
+            this.deptBudgetList.otherFee = ""
+            this.costOne = true
+            this.costTwo = true
+            this.costThree = true
+            this.costFour = true
+          })
+          .catch((req) => {
 
-    // 附件改变事件
-    onChange() {
-      this.$refs.upload
-        .handleSaveBill()
-        .then(async (response) => {
-          this.deptBudgetList.appendix = response
-        })
-        .catch((res) => {
-          EventBus.$emit('error', (JSON.parse(res) || {}).message)
-          this.$refs.upload.clearFiles()
-        })
-    },
-	//磅单跳转
-	poundList(){
-		 this.$router.push({
+          })
+      },
+
+      // 附件改变事件
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async (response) => {
+            this.deptBudgetList.appendix = response
+          })
+          .catch((res) => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      //磅单跳转
+      poundList() {
+        this.$router.push({
           name: 'inOutRecord',
-		  query: {
+          query: {
             baseId: this.deptBudgetList.baseId,
             positionId: this.deptBudgetList.warehouseNoId,
             warehouseName: this.deptBudgetList.warehouseName,
-            nowWeight:this.deptBudgetList.nowWeight,
-            warehouseNo:this.deptBudgetList.warehouseNo
+            nowWeight: this.deptBudgetList.nowWeight,
+            warehouseNo: this.deptBudgetList.warehouseNo
           }
         })
-	}
-  },
-}
+      }
+    },
+  }
 </script>
 <style lang="scss" scoped>
-/deep/.el-form-item__content {
-  width: 400px;
-}
+  /deep/.el-form-item__content {
+    width: 400px;
+  }
+
+  /deep/.el-select {
+    width: 100%;
+  }
+
+  .el-form {
+    overflow: scroll;
+    height: 94vh;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
 
-/deep/.el-select {
-  width: 100%;
-}
+  .bg-bottom {
+    margin: 15px 0px;
+  }
 
-.el-form {
-  overflow: scroll;
-  height: 94vh;
-}
+  .titleup {
+    position: relative;
+  }
 
-.bg-left {
-  padding-left: 30px;
-}
+  .titleup::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
 
-.bg-bottom {
-  margin: 15px 0px;
-}
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
 
-.titleup {
-  position: relative;
-}
+  .center {
+    background: #f6f7fc;
+  }
 
-.titleup::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
+  .content2 {
+    background: white;
+    // padding:0 200px;
+    // text-align: center;
+    padding-left: 40px;
+  }
 
-.bg-right {
-  padding-right: 10px;
-  text-align: right;
-}
+  .title1 {
+    font-size: 20px;
+    font-weight: 600;
+    margin: 20px 0;
+  }
 
-.center {
-  background: #f6f7fc;
-}
+  .existing {
+    width: 330px;
+  }
 
-.content2 {
-  background: white;
-  // padding:0 200px;
-  // text-align: center;
-  padding-left: 40px;
-}
+  .custom {
+    width: 520px;
+    margin-bottom: 20px;
+    display: flex;
 
-.title1 {
-  font-size: 20px;
-  font-weight: 600;
-  margin: 20px 0;
-}
-.existing{
-	width: 330px;
-}
-.custom{
-	width: 520px;
-	margin-bottom: 20px;
-	display: flex;
-	.custom1{
-		width: 120px;
-	}
-	/deep/.custom1 .el-input__inner{
-		text-align: right;
-	}
-	.custom2{
-		width: 345px;
-	}
-	/deep/.custom2 .el-input__inner{
-		width: 100%;
-	}
-	.span_text{
-		line-height: 32px;
-		color: #5878e8;
-    margin-left: 10px;
-	}
-}
-</style>
+    .custom1 {
+      width: 120px;
+    }
+
+    /deep/.custom1 .el-input__inner {
+      text-align: right;
+    }
+
+    .custom2 {
+      width: 345px;
+    }
+
+    /deep/.custom2 .el-input__inner {
+      width: 100%;
+    }
+
+    .span_text {
+      line-height: 32px;
+      color: #5878e8;
+      margin-left: 10px;
+    }
+  }
+</style>

+ 288 - 463
src/views/tradeServicesManagement/reviewWarehouseReceipt.vue

@@ -6,252 +6,88 @@
         <h2 class="bg-left titleup">审核仓单</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
-        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
-          ><img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt=""
-          />返回
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
       </el-col>
     </el-row>
 
-    <el-form
-      ref="deptBudgetList"
-      :rules="rules"
-      :model="deptBudgetList"
-      class="content2"
-      :inline="true"
-      label-position="right"
-      label-width="120px"
-    >
+    <el-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList" class="content2" :inline="true"
+      label-position="right" label-width="120px">
       <!-- <ws-info-table class="el-table"> -->
       <div class="title1">申请信息</div>
       <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
-        <el-input
-          v-model="deptBudgetList.billNo"
-          placeholder="请输入任务编号"
-          maxlength="20"
-          size="small"
-          disabled
-        ></el-input>
+        <el-input v-model="deptBudgetList.billNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled></el-input>
       </el-form-item>
       <el-form-item label="名头" span="1" prop="taskNo" class="renown">
-        <el-select
-          v-model="deptBudgetList.renown"
-          placeholder="请选择名头"
-          disabled
-          filterable clearable
-        >
-          <el-option
-            :label="item.compName"
-            :value="item.compId"
-            v-for="(item, index) in compOptionList"
-            :Key="index"
-          ></el-option>
+        <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" disabled filterable clearable>
+          <el-option :label="item.compName" :value="item.compId" v-for="(item, index) in compOptionList" :Key="index">
+          </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item
-        label="仓库名称"
-        span="1"
-        prop="warehouseName"
-        class="forlist"
-      >
-        <el-select
-          v-model="deptBudgetList.warehouseName"
-          placeholder="请选择仓库"
-          disabled
-          filterable clearable
-        >
-          <el-option
-            :label="item.warehouseName"
-            :value="item.id"
-            v-for="(item, index) in warehouseList"
-            :key="index"
-          ></el-option>
+      <el-form-item label="仓库名称" span="1" prop="warehouseName" class="forlist">
+        <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" disabled filterable clearable>
+          <el-option :label="item.warehouseName" :value="item.id" v-for="(item, index) in warehouseList" :key="index">
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
-        <el-select
-          v-model="deptBudgetList.warehouseNo"
-          placeholder="请选择仓位号"
-          disabled
-          filterable clearable
-        >
-          <el-option
-            :label="item.binNumber"
-            :value="item.id"
-            v-for="(item, index) in cwNumberList"
-            :key="index"
-          ></el-option>
+        <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号" disabled filterable clearable>
+          <el-option :label="item.binNumber" :value="item.id" v-for="(item, index) in cwNumberList" :key="index">
+          </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item
-        label="仓库地址"
-        span="1"
-        prop="warehouseAddress"
-        class="forlist"
-      >
-        <el-input
-          disabled
-          v-model="deptBudgetList.warehouseAddress"
-          placeholder="请输入仓库地址"
-          size="small"
-        ></el-input>
+      <el-form-item label="仓库地址" span="1" prop="warehouseAddress" class="forlist">
+        <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
       </el-form-item>
       <el-form-item prop="goodsName" label="货名" span="1">
-        <el-select
-          v-model="deptBudgetList.goodsName"
-          placeholder="请选择货名"
-          disabled
-          filterable clearable
-        >
-          <el-option
-            v-for="(item, index) in goodsList"
-            :key="index"
-            :label="item.goodsName"
-            :value="item.id"
-          >
+        <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" disabled filterable clearable>
+          <el-option v-for="(item, index) in goodsList" :key="index" :label="item.goodsName" :value="item.id">
           </el-option>
         </el-select>
       </el-form-item>
       <el-form-item prop="grade" label="品级" span="1">
-        <el-select
-          v-model="deptBudgetList.grade"
-          placeholder="请选择品级"
-          disabled
-          filterable clearable
-        >
+        <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled filterable clearable>
           <el-option label="一等" value="一等"></el-option>
           <el-option label="二等" value="二等"></el-option>
           <el-option label="三等" value="三等"></el-option>
           <el-option label="等外" value="等外"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item
-        label="现有储量"
-        span="1"
-        prop="nowWeight"
-        class="forlist"
-        disabled
-      >
-        <el-input
-          disabled
-          v-model="deptBudgetList.nowWeight"
-          placeholder="请输入现有储量"
-          size="small"
-        ></el-input>
+      <el-form-item label="现有储量" span="1" prop="nowWeight" class="forlist" disabled>
+        <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small"></el-input>
       </el-form-item>
-      <el-form-item
-        label="可用储量(吨)"
-        span="1"
-        prop="useWeight"
-        class="forlist"
-      >
-        <el-input
-          disabled
-          v-model="deptBudgetList.useWeight"
-          placeholder="请输入可用储量"
-          size="small"
-        ></el-input>
+      <el-form-item label="可用储量(吨)" span="1" prop="useWeight" class="forlist">
+        <el-input disabled v-model="deptBudgetList.useWeight" placeholder="请输入可用储量" size="small"></el-input>
       </el-form-item>
-      <el-form-item
-        label="本单重量(吨)"
-        span="1"
-        prop="weight"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.weight"
-          placeholder="输入本次仓单申请所需的重量"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="本单重量(吨)" span="1" prop="weight" class="forlist">
+        <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" disabled></el-input>
       </el-form-item>
-      <el-form-item
-        label="单价(元/吨)"
-        span="1"
-        prop="unitPrice"
-        class="forlist"
-        disabled
-      >
-        <el-input
-          v-model="deptBudgetList.unitPrice"
-          placeholder="输入粮食单价"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="单价(元/吨)" span="1" prop="unitPrice" class="forlist" disabled>
+        <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" disabled></el-input>
       </el-form-item>
-      <el-form-item
-        label="总价值(元)"
-        span="1"
-        prop="totalValue"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.totalValue"
-          disabled
-          placeholder="自动计算,不可编辑"
-          size="small"
-        ></el-input>
+      <el-form-item label="总价值(元)" span="1" prop="totalValue" class="forlist">
+        <el-input type='number' v-model="deptBudgetList.totalValue" disabled placeholder="自动计算,不可编辑" size="small">
+        </el-input>
       </el-form-item>
-      <el-form-item
-        label="申请比例(%)"
-        span="1"
-        prop="applicationProportion"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.applicationProportion"
-          placeholder="输入申请比例"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="申请比例(%)" span="1" prop="applicationProportion" class="forlist">
+        <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small" disabled></el-input>
       </el-form-item>
-      <el-form-item
-        label="申请金额(元)"
-        span="1"
-        prop="interest"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.interest"
-          placeholder="输入申请金额"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="申请金额(元)" span="1" prop="interest" class="forlist">
+        <el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small" disabled></el-input>
       </el-form-item>
       <div>附件</div>
-      <ws-upload
-        ref="upload"
-        :comp-id="compId"
-        :appendix-ids="deptBudgetList.appendix"
-        :size-limit="size"
-        @onChange="onChange"
-        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-        :editable="false"
-      />
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"
+        @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" :editable="false" />
       <div>外审部门</div>
       <el-form-item prop="bank" label="银行" span="1">
-        <el-select
-          v-model="deptBudgetList.bank"
-          placeholder="请选择银行"
-          disabled
-          filterable clearable
-        >
+        <el-select v-model="deptBudgetList.bank" placeholder="请选择银行" disabled filterable clearable>
           <el-option label="区域一" value="shanghai"></el-option>
           <el-option label="区域二" value="beijing"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
-        <el-input
-          v-model="deptBudgetList.three"
-          placeholder="无"
-          size="small"
-          disabled
-        ></el-input>
+        <el-input v-model="deptBudgetList.three" placeholder="无" size="small" disabled></el-input>
       </el-form-item>
       <div>
         <el-button @click="outerVisible = true" type="primary">驳回</el-button>
@@ -266,8 +102,8 @@
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="审核结果">
           <template scope="scope">
-            <span v-if="scope.row.approved" >通过</span>
-            <span v-if="!scope.row.approved" >驳回</span>
+            <span v-if="scope.row.approved">通过</span>
+            <span v-if="!scope.row.approved">驳回</span>
           </template>
         </el-table-column>
         <el-table-column prop="endTime" label="审核时间"></el-table-column>
@@ -275,36 +111,15 @@
       </el-table>
       <!-- </ws-info-table> -->
     </el-form>
-    <WinseaContentModal
-      v-model="outerVisible"
-      title="驳回原因"
-      @on-cancel="handleClose"
-    >
-      <el-input
-        type="textarea"
-        :rows="2"
-        maxlength="50"
-        placeholder="请输入驳回原因,1~50个字"
-        v-model="rejectText"
-      ></el-input>
+    <WinseaContentModal v-model="outerVisible" title="驳回原因" @on-cancel="handleClose">
+      <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入驳回原因,1~50个字" v-model="rejectText"></el-input>
       <div class="dialog-footer">
         <el-button @click="outerVisible = false">取 消</el-button>
         <el-button type="primary" @click="rejectSubmit">确定</el-button>
       </div>
     </WinseaContentModal>
-    <WinseaContentModal
-      v-model="outerVisible1"
-      title="审核意见"
-      @on-cancel="handleClose"
-      class="sh-content"
-    >
-      <el-input
-        type="textarea"
-        :rows="2"
-        maxlength="50"
-        placeholder="请输入审核意见,1~50个字"
-        v-model="adoptText"
-      ></el-input>
+    <WinseaContentModal v-model="outerVisible1" title="审核意见" @on-cancel="handleClose" class="sh-content">
+      <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入审核意见,1~50个字" v-model="adoptText"></el-input>
       <div class="dialog-footer">
         <el-button @click="outerVisible1 = false">取 消</el-button>
         <el-button type="primary" @click="adoptSubmit">确定</el-button>
@@ -313,260 +128,269 @@
   </div>
 </template>
 <script>
-import { getcompList } from '@/model/signIn/index'
-import { woekflowhandle } from '@/model/tasksport/index'
-import {
-  getWarehouseReceiptLook,
-  getWarehouseReceiptExamine,
-} from '@/model/tradeServicesManagement/index'
-import { selectWarehouseSelf } from '@/model/houseSelfCollect/index'
-import WsUpload from '@/components/WsUpload'
-export default {
-  components: {
-    WsUpload,
-  },
-  data() {
-    return {
-      deptBudgetList: {},
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      compOptionList: [],
-      taskhistories: [],
-      warehouseList: [],
-      cwNumberList: [],
-      goodsList: [],
-      rules: {
-        // unitPrice: [
-        //   { required: true, message: '单价不能为空!', trigger: 'blur' },
-        //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
-        // ],
-      },
-      outerVisible: false, //驳回
-      outerVisible1: false, //通过
-      rejectText: '', //驳回原因
-      adoptText: '', //审核意见
-    }
-  },
-  activated() {
-    // this.id = this.$route.query.id
-    this.getList(this.$route.query.id)
-    this.getcompList()
-  },
-  methods: {
-    //返回
-    cancel() {
-      this.$router.push({
-        path: 'warehouseReceiptRegulation',
-      })
+  import {
+    getcompList
+  } from '@/model/signIn/index'
+  import {
+    woekflowhandle
+  } from '@/model/tasksport/index'
+  import {
+    getWarehouseReceiptLook,
+    getWarehouseReceiptExamine,
+  } from '@/model/tradeServicesManagement/index'
+  import {
+    selectWarehouseSelf
+  } from '@/model/houseSelfCollect/index'
+  import WsUpload from '@/components/WsUpload'
+  export default {
+    components: {
+      WsUpload,
     },
-    handleClose() {
-      if (this.outerVisible) {
-        this.outerVisible = false
-      }
-      if (this.outerVisible1) {
-        this.outerVisible1 = false
+    data() {
+      return {
+        deptBudgetList: {},
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        compOptionList: [],
+        taskhistories: [],
+        warehouseList: [],
+        cwNumberList: [],
+        goodsList: [],
+        rules: {
+          // unitPrice: [
+          //   { required: true, message: '单价不能为空!', trigger: 'blur' },
+          //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+          // ],
+        },
+        outerVisible: false, //驳回
+        outerVisible1: false, //通过
+        rejectText: '', //驳回原因
+        adoptText: '', //审核意见
       }
     },
-    //驳回
-    rejectSubmit() {
-      if (!this.rejectText || this.rejectText.length > 50) {
-        this.$message.error('驳回原因不能为空且不能超出50字')
-        return
-      } else {
-        woekflowhandle({
-          taskId: this.deptBudgetList.taskId,
-          approved: false,
-          auditMind: this.rejectText,
-          needReapply: true,
+    activated() {
+      // this.id = this.$route.query.id
+      this.getList(this.$route.query.id)
+      this.getcompList()
+    },
+    methods: {
+      //返回
+      cancel() {
+        this.$router.push({
+          path: 'warehouseReceiptRegulation',
         })
+      },
+      handleClose() {
+        if (this.outerVisible) {
+          this.outerVisible = false
+        }
+        if (this.outerVisible1) {
+          this.outerVisible1 = false
+        }
+      },
+      //驳回
+      rejectSubmit() {
+        if (!this.rejectText || this.rejectText.length > 50) {
+          this.$message.error('驳回原因不能为空且不能超出50字')
+          return
+        } else {
+          woekflowhandle({
+              taskId: this.deptBudgetList.taskId,
+              approved: false,
+              auditMind: this.rejectText,
+              needReapply: true,
+            })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('驳回成功')
+              this.handleClose()
+              this.$router.push({
+                path: 'warehouseReceiptRegulation'
+              })
+            })
+        }
+      },
+      // 提交
+      adoptSubmit() {
+        if (!this.adoptText || this.adoptText.length > 50) {
+          this.$message.error('审核意见不能为空且不能超出50字')
+        } else {
+          woekflowhandle({
+              taskId: this.deptBudgetList.taskId,
+              approved: true,
+              auditMind: this.adoptText,
+              needReapply: false,
+            })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('审核成功')
+              this.handleClose()
+              this.$router.push({
+                path: 'warehouseReceiptRegulation'
+              })
+            })
+        }
+      },
+      getcompList() {
+        getcompList()
+          .toPromise()
+          .then((res) => {
+            this.compOptionList = res
+            this.deptBudgetList.renown = res[0].compName
+          })
+          .catch((err) => {})
+      },
+      getWarehouse() {
+        //获取仓库
+        selectWarehouseSelf({
+            compId: this.compId,
+          })
           .toPromise()
           .then((response) => {
-            this.$message.success('驳回成功')
-            this.handleClose()
-            this.$router.push({
-          path: 'warehouseReceiptRegulation'
-        })
+            console.log('仓库信息', response)
+            this.warehouseList = response
+            this.deptBudgetList.warehouseName = response[0].warehouseName
+            this.cwNumberList = response[0].positionInfos
+            this.deptBudgetList.warehouseNo =
+              response[0].positionInfos.length != 0 ?
+              response[0].positionInfos[0].binNumber :
+              ''
+            this.deptBudgetList.baseId =
+              response[0].positionInfos.length != 0 ?
+              response[0].positionInfos[0].baseId :
+              ''
+            this.deptBudgetList.warehouseAddress =
+              response[0].warehousePrivate +
+              response[0].warehouseCity +
+              response[0].warehouseArea +
+              response[0].detailedAddress
+            this.goodsList = response[0].goodsNameInfos
+            this.deptBudgetList.nowWeight =
+              response[0].goodsNameInfos.length != 0 ?
+              response[0].goodsNameInfos[0].storage :
+              ''
+            // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
+            this.deptBudgetList.useWeight = '10'
+            this.deptBudgetList.goodsName =
+              response[0].goodsNameInfos.length != 0 ?
+              response[0].goodsNameInfos[0].goodsName :
+              ''
+            this.deptBudgetList.warehouseId = response[0].id
+            if (!this.deptBudgetList.renown)
+              this.deptBudgetList.renown = this.compOptionList[0].compName
+            if (!this.deptBudgetList.renownId)
+              this.deptBudgetList.renownId = this.compOptionList[0].compId
+            this.deptBudgetList.bankId = 'bankId'
+            this.deptBudgetList.threeId = 'threeId'
+            this.deptBudgetList.warehouseNoId =
+              response[0].positionInfos.length != 0 ?
+              response[0].positionInfos[0].id :
+              ''
+            this.deptBudgetList.goodsNameKey =
+              response[0].goodsNameInfos.length != 0 ?
+              response[0].goodsNameInfos[0].goodsNameKey :
+              ''
+          })
+      },
+      getList(id) {
+        //审核记录
+        getWarehouseReceiptExamine({
+            businessKey: id,
+            workflowId: this.$route.query.workflowId,
           })
-      }
-    },
-    // 提交
-    adoptSubmit() {
-      if (!this.adoptText || this.adoptText.length > 50) {
-        this.$message.error('审核意见不能为空且不能超出50字')
-      } else {
-        woekflowhandle({
-          taskId: this.deptBudgetList.taskId,
-          approved: true,
-          auditMind: this.adoptText,
-          needReapply: false,
-        })
           .toPromise()
           .then((response) => {
-            this.$message.success('审核成功')
-            this.handleClose()
-            this.$router.push({
-          path: 'warehouseReceiptRegulation'
-        })
+            this.taskhistories = response
           })
-      }
-    },
-    getcompList() {
-      getcompList()
-        .toPromise()
-        .then((res) => {
-          this.compOptionList = res
-          this.deptBudgetList.renown = res[0].compName
-        })
-        .catch((err) => {})
-    },
-    getWarehouse() {
-      //获取仓库
-      selectWarehouseSelf({
-        compId: this.compId,
-      })
-        .toPromise()
-        .then((response) => {
-          console.log('仓库信息', response)
-          this.warehouseList = response
-          this.deptBudgetList.warehouseName = response[0].warehouseName
-          this.cwNumberList = response[0].positionInfos
-          this.deptBudgetList.warehouseNo =
-            response[0].positionInfos.length != 0
-              ? response[0].positionInfos[0].binNumber
-              : ''
-          this.deptBudgetList.baseId =
-            response[0].positionInfos.length != 0
-              ? response[0].positionInfos[0].baseId
-              : ''
-          this.deptBudgetList.warehouseAddress =
-            response[0].warehousePrivate +
-            response[0].warehouseCity +
-            response[0].warehouseArea +
-            response[0].detailedAddress
-          this.goodsList = response[0].goodsNameInfos
-          this.deptBudgetList.nowWeight =
-            response[0].goodsNameInfos.length != 0
-              ? response[0].goodsNameInfos[0].storage
-              : ''
-          // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
-          this.deptBudgetList.useWeight = '10'
-          this.deptBudgetList.goodsName =
-            response[0].goodsNameInfos.length != 0
-              ? response[0].goodsNameInfos[0].goodsName
-              : ''
-          this.deptBudgetList.warehouseId = response[0].id
-          if (!this.deptBudgetList.renown)
-            this.deptBudgetList.renown = this.compOptionList[0].compName
-          if (!this.deptBudgetList.renownId)
-            this.deptBudgetList.renownId = this.compOptionList[0].compId
-          this.deptBudgetList.bankId = 'bankId'
-          this.deptBudgetList.threeId = 'threeId'
-          this.deptBudgetList.warehouseNoId =
-            response[0].positionInfos.length != 0
-              ? response[0].positionInfos[0].id
-              : ''
-          this.deptBudgetList.goodsNameKey =
-            response[0].goodsNameInfos.length != 0
-              ? response[0].goodsNameInfos[0].goodsNameKey
-              : ''
-        })
-    },
-    getList(id) {
-      //审核记录
-      getWarehouseReceiptExamine({
-        businessKey: id,
-        workflowId: this.$route.query.workflowId,
-      })
-        .toPromise()
-        .then((response) => {
-          this.taskhistories = response
-        })
-      getWarehouseReceiptLook({ id: id })
-        .toPromise()
-        .then((response) => {
-          console.log('mdl;sgjkdl', response)
-          this.deptBudgetList = response
-        })
-        .catch((req) => {
-          // this.tableData = response.records
-          this.$message.success('提交失败')
-        })
-    },
+        getWarehouseReceiptLook({
+            id: id
+          })
+          .toPromise()
+          .then((response) => {
+            console.log('mdl;sgjkdl', response)
+            this.deptBudgetList = response
+          })
+          .catch((req) => {
+            // this.tableData = response.records
+            this.$message.success('提交失败')
+          })
+      },
 
-    // 附件改变事件
-    onChange() {
-      this.$refs.upload
-        .handleSaveBill()
-        .then(async (response) => {
-          this.deptBudgetList.appendix = response
-          console.log('dfvbgf', this.deptBudgetList.appendix)
-        })
-        .catch((res) => {
-          EventBus.$emit('error', (JSON.parse(res) || {}).message)
-          this.$refs.upload.clearFiles()
-        })
+      // 附件改变事件
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async (response) => {
+            this.deptBudgetList.appendix = response
+            console.log('dfvbgf', this.deptBudgetList.appendix)
+          })
+          .catch((res) => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
     },
-  },
-}
+  }
 </script>
 <style lang="scss" scoped>
-/deep/.el-form-item__content {
-  width: 400px;
-}
+  /deep/.el-form-item__content {
+    width: 400px;
+  }
 
-/deep/.el-select {
-  width: 100%;
-}
+  /deep/.el-select {
+    width: 100%;
+  }
 
-.el-form {
-  overflow: scroll;
-  height: 94vh;
-}
+  .el-form {
+    overflow: scroll;
+    height: 94vh;
+  }
 
-.bg-left {
-  padding-left: 30px;
-}
+  .bg-left {
+    padding-left: 30px;
+  }
 
-.bg-bottom {
-  margin: 15px 0px;
-}
+  .bg-bottom {
+    margin: 15px 0px;
+  }
 
-.titleup {
-  position: relative;
-}
+  .titleup {
+    position: relative;
+  }
 
-.titleup::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
+  .titleup::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
 
-.bg-right {
-  padding-right: 10px;
-  text-align: right;
-}
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
 
-.center {
-  background: #f6f7fc;
-}
+  .center {
+    background: #f6f7fc;
+  }
 
-.content2 {
-  background: white;
-  // padding:0 200px;
-  // text-align: center;
-  padding-left: 40px;
-}
+  .content2 {
+    background: white;
+    // padding:0 200px;
+    // text-align: center;
+    padding-left: 40px;
+  }
 
-.title1 {
-  font-size: 20px;
-  font-weight: 600;
-  margin: 20px 0;
-}
-/deep/.winsea__content-modal .winsea__content-modal__win-wrap{
+  .title1 {
+    font-size: 20px;
+    font-weight: 600;
+    margin: 20px 0;
+  }
+
+  /deep/.winsea__content-modal .winsea__content-modal__win-wrap {
     width: 30%;
     position: absolute;
     top: 0;
@@ -576,9 +400,10 @@ export default {
     margin: auto;
     height: 210px;
     border-radius: 10px;
-    .dialog-footer{
+
+    .dialog-footer {
       text-align: center;
       margin-top: 30px;
     }
-}
-</style>
+  }
+</style>

+ 2 - 2
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -70,13 +70,13 @@
         <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" @input='inputChange'></el-input>
       </el-form-item>
       <el-form-item label="总价值(元)" prop="totalValue" class="forlist">
-        <el-input disabled v-model="deptBudgetList.totalValue" placeholder="自动计算,不可编辑" size="small"></el-input>
+        <el-input type='number' disabled v-model="deptBudgetList.totalValue" placeholder="自动计算,不可编辑" size="small"></el-input>
       </el-form-item>
       <el-form-item label="申请比例(%)" prop="applicationProportion" class="forlist">
         <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small"></el-input>
       </el-form-item>
       <el-form-item label="申请金额(元)" prop="interest" class="forlist">
-        <el-input v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small"></el-input>
+        <el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small"></el-input>
       </el-form-item>
       <div>附件</div>
       <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"

+ 199 - 260
src/views/tradeServicesManagement/warehouseReceiptEdit.vue

@@ -6,69 +6,52 @@
         <h2 class="bg-left titleup">修改仓单</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
-        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
-          ><img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt=""
-          />返回
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
       </el-col>
     </el-row>
 
-    <el-form
-      ref="deptBudgetList"
-      :rules="rules"
-      :model="deptBudgetList"
-      class="content2"
-      :inline="true"
-      label-position="right"
-      label-width="120px"
-    >
+    <el-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList" class="content2" :inline="true"
+      label-position="right" label-width="120px">
       <!-- <ws-info-table class="el-table"> -->
       <div class="title1">申请信息</div>
       <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
-        <el-input
-          v-model="deptBudgetList.billNo"
-          placeholder="请输入任务编号"
-          maxlength="20"
-          size="small"
-          disabled
-        ></el-input>
+        <el-input v-model="deptBudgetList.billNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled></el-input>
       </el-form-item>
       <el-form-item label="名头" span="1" prop="taskNo" class="renown">
-        <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" @change="changeCompOptionList" filterable clearable>
-          <el-option :label="item.compName" :value="item.compId" v-for="(item,index) in compOptionList" :Key="index"></el-option>
+        <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" @change="changeCompOptionList" filterable
+          clearable>
+          <el-option :label="item.compName" :value="item.compId" v-for="(item,index) in compOptionList" :Key="index">
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓库名称" span="1" prop="warehouseName" class="forlist">
-        <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" @change="changeWarehouse" filterable clearable>
-          <el-option :label="item.warehouseName" :value="item.id" v-for="(item,index) in warehouseList" :key="index"></el-option>
+        <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" @change="changeWarehouse" filterable
+          clearable>
+          <el-option :label="item.warehouseName" :value="item.id" v-for="(item,index) in warehouseList" :key="index">
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
-        <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号"  @change="changeWarehouseNo" filterable clearable>
-           <el-option :label="item.binNumber" :value="item.id" v-for="(item,index) in cwNumberList" :key='index'></el-option>
+        <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号" @change="changeWarehouseNo" filterable
+          clearable>
+          <el-option :label="item.binNumber" :value="item.id" v-for="(item,index) in cwNumberList" :key='index'>
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓库地址" span="1" prop="warehouseAddress" class="forlist">
-        <el-input
-          disabled
-          v-model="deptBudgetList.warehouseAddress"
-          placeholder="请输入仓库地址"
-          size="small"
-        ></el-input>
+        <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
       </el-form-item>
       <el-form-item prop="goodsName" label="货名" span="1">
-           <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="changeGoodsName" filterable clearable>
+        <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="changeGoodsName" filterable
+          clearable>
           <el-option v-for="(item,index) in goodsList" :key='index' :label="item.goodsName" :value="item.id">
           </el-option>
         </el-select>
       </el-form-item>
       <el-form-item prop="grade" label="品级" span="1">
-      <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" filterable clearable>
+        <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" filterable clearable>
           <el-option label="一等" value="一等"></el-option>
           <el-option label="二等" value="二等"></el-option>
           <el-option label="三等" value="三等"></el-option>
@@ -76,102 +59,42 @@
         </el-select>
       </el-form-item>
       <el-form-item label="现有储量" span="1" prop="nowWeight" class="forlist">
-        <el-input
-          disabled
-          v-model="deptBudgetList.nowWeight"
-          placeholder="请输入现有储量"
-          size="small"
-        ></el-input>
+        <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small"></el-input>
       </el-form-item>
-      <el-form-item
-        label="可用储量(吨)"
-        span="1"
-        prop="useWeight"
-        class="forlist"
-      >
-        <el-input
-          disabled
-          v-model="deptBudgetList.useWeight"
-          placeholder="请输入可用储量"
-          size="small"
-        ></el-input>
+      <el-form-item label="可用储量(吨)" span="1" prop="useWeight" class="forlist">
+        <el-input disabled v-model="deptBudgetList.useWeight" placeholder="请输入可用储量" size="small"></el-input>
       </el-form-item>
-      <el-form-item
-        label="本单重量(吨)"
-        span="1"
-        prop="weight"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.weight"
-          placeholder="输入本次仓单申请所需的重量"
-          size="small"
-          @input='inputChange'
-        ></el-input>
+      <el-form-item label="本单重量(吨)" span="1" prop="weight" class="forlist">
+        <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" @input='inputChange'>
+        </el-input>
       </el-form-item>
-      <el-form-item
-        label="单价(元/吨)"
-        span="1"
-        prop="unitPrice"
-        class="forlist"
-        @input='inputChange'
-      >
-        <el-input
-          v-model="deptBudgetList.unitPrice"
-          placeholder="输入粮食单价"
-          size="small"
-        ></el-input>
+      <el-form-item label="单价(元/吨)" span="1" prop="unitPrice" class="forlist" @input='inputChange'>
+        <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small"></el-input>
       </el-form-item>
       <el-form-item label="总价值(元)" span="1" prop="totalValue" class="forlist">
-        <el-input
-          v-model="deptBudgetList.totalValue"
-          disabled
-          placeholder="自动计算,不可编辑"
-          size="small"
-        ></el-input>
+        <el-input type='number' v-model="deptBudgetList.totalValue" disabled placeholder="自动计算,不可编辑" size="small">
+        </el-input>
       </el-form-item>
-      <el-form-item
-        label="申请比例(%)"
-        span="1"
-        prop="applicationProportion"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.applicationProportion"
-          placeholder="输入申请比例"
-          size="small"
-        ></el-input>
+      <el-form-item label="申请比例(%)" span="1" prop="applicationProportion" class="forlist">
+        <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small"></el-input>
       </el-form-item>
-      <el-form-item
-        label="申请金额(元)"
-        span="1"
-        prop="interest"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.interest"
-          placeholder="输入申请金额"
-          size="small"
-        ></el-input>
+      <el-form-item label="申请金额(元)" span="1" prop="interest" class="forlist">
+        <el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small"></el-input>
       </el-form-item>
       <div>附件</div>
-      <ws-upload
-        ref="upload"
-        :comp-id="compId"
-        :appendix-ids="deptBudgetList.appendix"
-        :size-limit="size"
-        @onChange="onChange"
-        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-      />
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"
+        @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
       <div class="title1">外审部门</div>
       <el-form-item prop="bank" label="银行" span="1">
         <el-select v-model="deptBudgetList.bank" placeholder="请选择银行" @change="bankChange" filterable clearable>
-         <el-option :label="item.constValue" :value="item.constValue" v-for="(item,index) in bankList" :key="index"></el-option>
+          <el-option :label="item.constValue" :value="item.constValue" v-for="(item,index) in bankList" :key="index">
+          </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="第三方" span="1" prop="taskNo" class="forlist" >
-          <el-select v-model="deptBudgetList.three" placeholder="无" @change="threeChange" filterable clearable>
-        <el-option :label="item1.constValue" :value="item1.constValue" v-for="(item1,index) in threeList" :key="index"></el-option>
+      <el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
+        <el-select v-model="deptBudgetList.three" placeholder="无" @change="threeChange" filterable clearable>
+          <el-option :label="item1.constValue" :value="item1.constValue" v-for="(item1,index) in threeList"
+            :key="index"></el-option>
         </el-select>
       </el-form-item>
       <div>
@@ -187,8 +110,8 @@
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="审核结果">
           <template scope="scope">
-            <span v-if="scope.row.approved" >通过</span>
-            <span v-if="!scope.row.approved" >驳回</span>
+            <span v-if="scope.row.approved">通过</span>
+            <span v-if="!scope.row.approved">驳回</span>
           </template>
         </el-table-column>
         <el-table-column prop="endTime" label="审核时间"></el-table-column>
@@ -199,87 +122,90 @@
   </div>
 </template>
 <script>
-import {
+  import {
     getcompList,
   } from '@/model/signIn/index'
-import {
-  getwarehousewarrantList,
-  getWarehouseReceiptLook,
-  editList,
-  WarehouseReceiptUpdate,
-  getWarehouseReceiptExamine,//审核记录
-  WarehouseReceiptBankList ,
-} from '@/model/tradeServicesManagement/index'
-import {
+  import {
+    getwarehousewarrantList,
+    getWarehouseReceiptLook,
+    editList,
+    WarehouseReceiptUpdate,
+    getWarehouseReceiptExamine, //审核记录
+    WarehouseReceiptBankList,
+  } from '@/model/tradeServicesManagement/index'
+  import {
     selectWarehouseSelf,
   } from '@/model/houseSelfCollect/index'
-import WsUpload from '@/components/WsUpload'
-import { lastEachIterate } from 'xe-utils/methods'
-export default {
-  components: {
-    WsUpload,
-  },
-  data() {
-    return {
-      deptBudgetList: {},
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-         rules: {
+  import WsUpload from '@/components/WsUpload'
+  import {
+    lastEachIterate
+  } from 'xe-utils/methods'
+  export default {
+    components: {
+      WsUpload,
+    },
+    data() {
+      return {
+        deptBudgetList: {},
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        rules: {
           // unitPrice: [
           //   { required: true, message: '单价不能为空!', trigger: 'blur' },
           //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
           // ],
         },
-      compOptionList:[],
-      taskhistories:[],
-      warehouseList: [],
-      cwNumberList:[],
-      goodsList:[],
-      bankList:[],
-      threeList:[],
-    }
-  },
-  activated() {
-     localStorage.removeItem("pageUp")//删除出入库跳返回时数据刷新的问题
-    this.getList()
-    this.getcompList()
-    this.getWarehouse()
-  },
-  methods: {
+        compOptionList: [],
+        taskhistories: [],
+        warehouseList: [],
+        cwNumberList: [],
+        goodsList: [],
+        bankList: [],
+        threeList: [],
+      }
+    },
+    activated() {
+      localStorage.removeItem("pageUp") //删除出入库跳返回时数据刷新的问题
+      this.getList()
+      this.getcompList()
+      this.getWarehouse()
+    },
+    methods: {
       inputChange(e) {
         if (this.deptBudgetList.unitPrice && this.deptBudgetList.weight) {
           this.deptBudgetList.totalValue = this.deptBudgetList.unitPrice * this.deptBudgetList.weight
         }
       },
       //银行改变
-      bankChange(e){ 
-           this.deptBudgetList.bank = e
+      bankChange(e) {
+        this.deptBudgetList.bank = e
       },
       //第三方
-      threeChange(e){
-             this.deptBudgetList.three = e
+      threeChange(e) {
+        this.deptBudgetList.three = e
       },
-    //返回
-    cancel() {
-      this.$router.push({
+      //返回
+      cancel() {
+        this.$router.push({
           path: 'warehouseReceiptRegulation'
         })
-    },
-    //出入库记录
-    inoutput() {
-      this.$router.push({ name: 'inOutRecord',
-      query:{ 
-        baseId: this.deptBudgetList.baseId,
-        positionId: this.deptBudgetList.warehouseNoId,
-        warehouseName: this.deptBudgetList.warehouseName,
-        warehouseNo:this.deptBudgetList.warehouseNo,
-        nowWeight:this.deptBudgetList.nowWeight
-        }
-      })
-    },
-    //名头改变
-    changeCompOptionList(val){
-       let _data = this.compOptionList
+      },
+      //出入库记录
+      inoutput() {
+        this.$router.push({
+          name: 'inOutRecord',
+          query: {
+            baseId: this.deptBudgetList.baseId,
+            positionId: this.deptBudgetList.warehouseNoId,
+            warehouseName: this.deptBudgetList.warehouseName,
+            warehouseNo: this.deptBudgetList.warehouseNo,
+            nowWeight: this.deptBudgetList.nowWeight
+          }
+        })
+      },
+      //名头改变
+      changeCompOptionList(val) {
+        let _data = this.compOptionList
         for (let i = 0; i < _data.length; i++) {
           if (_data[i].compId == val) {
             this.deptBudgetList.renownId = _data[i].compId
@@ -288,7 +214,7 @@ export default {
             this.getWarehouse()
           }
         }
-    },
+      },
       //货名切换
       changeGoodsName(val) {
         let _data = this.goodsList
@@ -297,31 +223,35 @@ export default {
             this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
             this.deptBudgetList.goodsName = _data[i].goodsName
             this.deptBudgetList.nowWeight = _data[i].storage
-            this.deptBudgetList.useWeight =  _data[i].useStorage
-             return
+            this.deptBudgetList.useWeight = _data[i].useStorage
+            return
           }
         }
       },
-    //仓库切换
-    changeWarehouse(val) {
+      //仓库切换
+      changeWarehouse(val) {
         let _data = this.warehouseList
         for (let i = 0; i < _data.length; i++) {
           if (_data[i].id == val) {
             this.deptBudgetList.warehouseName = _data[i].warehouseName
             this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
-            this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber : ''
-            this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity + _data[i].warehouseArea + _data[i].detailedAddress
+            this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber :
+              ''
+            this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity + _data[i]
+              .warehouseArea + _data[i].detailedAddress
             // this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
-            this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage : ''
-            this.deptBudgetList.useWeight =  _data[i].goodsNameInfos[0].useStorage
+            this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage :
+              ''
+            this.deptBudgetList.useWeight = _data[i].goodsNameInfos[0].useStorage
             this.deptBudgetList.warehouseId = _data[i].id
-            this.deptBudgetList.goodsNameKey = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsNameKey : ''
+            this.deptBudgetList.goodsNameKey = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0]
+              .goodsNameKey : ''
             this.deptBudgetList.warehouseNoId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].id : ''
             this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].baseId : ''
           }
         }
       },
-       //仓位号切换
+      //仓位号切换
       changeWarehouseNo(val) {
         let _data = this.cwNumberList
         for (let i = 0; i < _data.length; i++) {
@@ -332,38 +262,38 @@ export default {
           }
         }
         this.goodsList = []
-        for(let j = 0 ; j < this.warehouseList.length ; j++){
-          if(this.deptBudgetList.warehouseName == this.warehouseList[j].warehouseName){
-            for(let _num = 0 ; _num < this.warehouseList[j].goodsNameInfos.length; _num++ ){
-              if( this.deptBudgetList.warehouseNo == this.warehouseList[j].goodsNameInfos[_num].binNumber){
+        for (let j = 0; j < this.warehouseList.length; j++) {
+          if (this.deptBudgetList.warehouseName == this.warehouseList[j].warehouseName) {
+            for (let _num = 0; _num < this.warehouseList[j].goodsNameInfos.length; _num++) {
+              if (this.deptBudgetList.warehouseNo == this.warehouseList[j].goodsNameInfos[_num].binNumber) {
                 this.goodsList.push(this.warehouseList[j].goodsNameInfos[_num])
               }
             }
           }
         }
-        if(this.goodsList.length == 0){
+        if (this.goodsList.length == 0) {
           this.deptBudgetList.goodsName = ""
-             this.deptBudgetList.nowWeight = ''
-            this.deptBudgetList.useWeight = ""
-        }else{
-           this.deptBudgetList.goodsName = this.goodsList[0].goodsName
-            this.deptBudgetList.nowWeight = this.goodsList[0].storage
-            this.deptBudgetList.useWeight = this.goodsList[0].useStorage
+          this.deptBudgetList.nowWeight = ''
+          this.deptBudgetList.useWeight = ""
+        } else {
+          this.deptBudgetList.goodsName = this.goodsList[0].goodsName
+          this.deptBudgetList.nowWeight = this.goodsList[0].storage
+          this.deptBudgetList.useWeight = this.goodsList[0].useStorage
         }
       },
-    getcompList(){
-      //公司名下拉
-       getcompList()
+      getcompList() {
+        //公司名下拉
+        getcompList()
           .toPromise()
           .then((res) => {
             this.compOptionList = res
             // this.deptBudgetList.renown = res[0].compName
-              this.changeCompOptionList(res[0].compId)
+            this.changeCompOptionList(res[0].compId)
           })
           .catch((err) => {})
-    },
-    getWarehouse(){
-      //获取仓库
+      },
+      getWarehouse() {
+        //获取仓库
         selectWarehouseSelf({
             compId: this.compId
           }).toPromise()
@@ -371,60 +301,69 @@ export default {
             this.warehouseList = response
             this.changeWarehouse(this.deptBudgetList.warehouseId)
           })
-    },
-    getList() {
-      WarehouseReceiptBankList({constId:"BANK1"}).toPromise().then((response) => {
+      },
+      getList() {
+        WarehouseReceiptBankList({
+          constId: "BANK1"
+        }).toPromise().then((response) => {
           this.bankList = response
         })
-         WarehouseReceiptBankList({constId:"THREE1"}).toPromise().then((response) => {
+        WarehouseReceiptBankList({
+          constId: "THREE1"
+        }).toPromise().then((response) => {
           this.threeList = response
         })
-   
-       getWarehouseReceiptLook({id:this.$route.query.id,workflowId:this.$route.query.workflowId})
-        .toPromise()
-        .then((response) => {
-         this.deptBudgetList = response
-        })
-        .catch((req) => {
-        })
-           //审核记录
-      getWarehouseReceiptExamine({businessKey: this.$route.query.id,workflowId: this.$route.query.workflowId}).toPromise()
+
+        getWarehouseReceiptLook({
+            id: this.$route.query.id,
+            workflowId: this.$route.query.workflowId
+          })
+          .toPromise()
           .then((response) => {
-            this.taskhistories=response
+            this.deptBudgetList = response
           })
-    },
-    submit() {
-      let isValidate = false
+          .catch((req) => {})
+        //审核记录
+        getWarehouseReceiptExamine({
+            businessKey: this.$route.query.id,
+            workflowId: this.$route.query.workflowId
+          }).toPromise()
+          .then((response) => {
+            this.taskhistories = response
+          })
+      },
+      submit() {
+        let isValidate = false
         isValidate = this.validate()
-        if(isValidate){
-           WarehouseReceiptUpdate(this.deptBudgetList)
-        .toPromise()
-        .then((response) => {
-           this.$message.success('提交成功')
-             this.$router.push({
+        if (isValidate) {
+          WarehouseReceiptUpdate(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('提交成功')
+              this.$router.push({
                 path: 'warehouseReceiptRegulation'
               })
-        //  this.deptBudgetList = response
-        })
-        .catch((req) => {
-          // this.tableData = response.records
-          this.$message.error('提交失败')
-        })
+              //  this.deptBudgetList = response
+            })
+            .catch((req) => {
+              // this.tableData = response.records
+              this.$message.error('提交失败')
+            })
         }
-    },
-    // 附件改变事件
-    onChange() {
-      this.$refs.upload
-        .handleSaveBill()
-        .then(async (response) => {
-          this.deptBudgetList.appendix = response
-        })
-        .catch((res) => {
-          EventBus.$emit('error', (JSON.parse(res) || {}).message)
-          this.$refs.upload.clearFiles()
-        })
-    },
-    validate() {
+      },
+      // 附件改变事件
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async (response) => {
+            this.deptBudgetList.appendix = response
+          })
+          .catch((res) => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      validate() {
         function _Validate(min, max, saveNum, type, inputVal) {
           let _val1 = inputVal
           let _pointVal1 = _val1.toString().split('.')[1]
@@ -492,11 +431,11 @@ export default {
         // }
         return true
       },
-  },
-}
+    },
+  }
 </script>
 <style lang="scss" scoped>
-/deep/.el-form-item__content {
+  /deep/.el-form-item__content {
     width: 400px;
   }
 
@@ -552,4 +491,4 @@ export default {
     font-weight: 600;
     margin: 20px 0;
   }
-</style>
+</style>

+ 166 - 281
src/views/tradeServicesManagement/warehouseReceiptLook.vue

@@ -6,66 +6,45 @@
         <h2 class="bg-left titleup">查看仓单</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
-        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
-          ><img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt=""
-          />返回
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
       </el-col>
     </el-row>
 
-     <!-- <el-carousel indicator-position="outside">
+    <!-- <el-carousel indicator-position="outside">
     <el-carousel-item v-for="item in 4" :key="item">
       <h3>{{ item }}</h3>
     </el-carousel-item>
   </el-carousel> -->
 
-    <el-form
-      ref="deptBudgetList"
-      :rules="rules"
-      :model="deptBudgetList"
-      class="content2"
-      :inline="true"
-      label-position="right"
-      label-width="120px"
-    >
+    <el-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList" class="content2" :inline="true"
+      label-position="right" label-width="120px">
       <!-- <ws-info-table class="el-table"> -->
       <div class="title1">申请信息</div>
       <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
-        <el-input
-          v-model="deptBudgetList.billNo"
-          placeholder="请输入任务编号"
-          maxlength="20"
-          size="small"
-          disabled
-        ></el-input>
+        <el-input v-model="deptBudgetList.billNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled></el-input>
       </el-form-item>
       <el-form-item label="名头" span="1" prop="taskNo" class="renown">
-        <el-select v-model="deptBudgetList.renown" placeholder="请选择名头"  disabled>
-          <el-option :label="item.compName" :value="item.compId" v-for="(item,index) in compOptionList" :Key="index"></el-option>
+        <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" disabled>
+          <el-option :label="item.compName" :value="item.compId" v-for="(item,index) in compOptionList" :Key="index">
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓库名称" span="1" prop="warehouseName" class="forlist">
         <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" @change="changeWarehouse" disabled>
-          <el-option :label="item.warehouseName" :value="item.id" v-for="(item,index) in warehouseList" :key="index"></el-option>
+          <el-option :label="item.warehouseName" :value="item.id" v-for="(item,index) in warehouseList" :key="index">
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
-        <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号"  @change="changeWarehouseNo" disabled>
-           <el-option :label="item.binNumber" :value="item.id" v-for="(item,index) in cwNumberList" :key='index'></el-option>
+        <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号" @change="changeWarehouseNo" disabled>
+          <el-option :label="item.binNumber" :value="item.id" v-for="(item,index) in cwNumberList" :key='index'>
+          </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓库地址" span="1" prop="warehouseAddress" class="forlist">
-        <el-input
-          disabled
-          v-model="deptBudgetList.warehouseAddress"
-          placeholder="请输入仓库地址"
-          size="small"
-        ></el-input>
+        <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
       </el-form-item>
       <el-form-item prop="goodsName" label="货名" span="1">
         <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" disabled>
@@ -74,7 +53,7 @@
         </el-select>
       </el-form-item>
       <el-form-item prop="grade" label="品级" span="1">
-      <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled>
+        <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled>
           <el-option label="一等" value="一等"></el-option>
           <el-option label="二等" value="二等"></el-option>
           <el-option label="三等" value="三等"></el-option>
@@ -82,173 +61,73 @@
         </el-select>
       </el-form-item>
       <el-form-item label="现有储量" span="1" prop="nowWeight" class="forlist" disabled>
-        <el-input
-          disabled
-          v-model="deptBudgetList.nowWeight"
-          placeholder="请输入现有储量"
-          size="small"
-          class="existing"
-        ></el-input>
-          <el-button  type="primary" @click="poundList">磅单</el-button>
+        <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small" class="existing">
+        </el-input>
+        <el-button type="primary" @click="poundList">磅单</el-button>
       </el-form-item>
-      <el-form-item
-        label="可用储量(吨)"
-        span="1"
-        prop="useWeight"
-        class="forlist"
-      >
-        <el-input
-          disabled
-          v-model="deptBudgetList.useWeight"
-          placeholder="请输入可用储量"
-          size="small"
-        ></el-input>
+      <el-form-item label="可用储量(吨)" span="1" prop="useWeight" class="forlist">
+        <el-input disabled v-model="deptBudgetList.useWeight" placeholder="请输入可用储量" size="small"></el-input>
       </el-form-item>
-      <el-form-item
-        label="本单重量(吨)"
-        span="1"
-        prop="weight"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.weight"
-          placeholder="输入本次仓单申请所需的重量"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="本单重量(吨)" span="1" prop="weight" class="forlist">
+        <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" disabled></el-input>
       </el-form-item>
-      <el-form-item
-        label="单价(元/吨)"
-        span="1"
-        prop="unitPrice"
-        class="forlist"
-        disabled
-      >
-        <el-input
-          v-model="deptBudgetList.unitPrice"
-          placeholder="输入粮食单价"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="单价(元/吨)" span="1" prop="unitPrice" class="forlist" disabled>
+        <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" disabled></el-input>
       </el-form-item>
       <el-form-item label="总价值(元)" span="1" prop="totalValue" class="forlist">
-        <el-input
-          v-model="deptBudgetList.totalValue"
-          disabled
-          placeholder="自动计算,不可编辑"
-          size="small"
-        ></el-input>
+        <el-input type='number' v-model="deptBudgetList.totalValue" disabled placeholder="自动计算,不可编辑" size="small">
+        </el-input>
       </el-form-item>
-      <el-form-item
-        label="申请比例(%)"
-        span="1"
-        prop="applicationProportion"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.applicationProportion"
-          placeholder="输入申请比例"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="申请比例(%)" span="1" prop="applicationProportion" class="forlist">
+        <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small" disabled></el-input>
       </el-form-item>
-      <el-form-item
-        label="申请金额(元)"
-        span="1"
-        prop="interest"
-        class="forlist"
-      >
-        <el-input
-          v-model="deptBudgetList.interest"
-          placeholder="输入申请金额"
-          size="small"
-          disabled
-        ></el-input>
+      <el-form-item label="申请金额(元)" span="1" prop="interest" class="forlist">
+        <el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small" disabled></el-input>
       </el-form-item>
       <div>附件</div>
-      <ws-upload
-        ref="upload"
-        :comp-id="compId"
-        :appendix-ids="deptBudgetList.appendix"
-        :size-limit="size"
-        @onChange="onChange"
-        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-        :editable="false"
-      />
-      <div  v-if="deptBudgetList.status == '待还款'">
-      <div class="title1">发放信息</div>
-       <el-form-item prop="contractNo" label="合同编号" span="1">
-        <el-input
-          v-model="deptBudgetList.contractNo"
-          placeholder="请输入合同编号"
-          size="small"
-          disabled
-        ></el-input>
-      </el-form-item>
-      <el-form-item label="发放金额(元)" span="1" prop="taskNo">
-        <el-input
-          v-model="deptBudgetList.paymentAmount"
-          placeholder="请输入发放金额"
-          size="small"
-          disabled
-        ></el-input>
-      </el-form-item>
-      <el-form-item :label="deptBudgetList.modifyExpense1" span="1" prop="taskNo" v-if="deptBudgetList.applicationAmountFlag == '显示中'">
-        <el-input
-          v-model="deptBudgetList.applicationAmount"
-          placeholder="请输入发放金额"
-          size="small"
-          disabled
-        ></el-input>
-      </el-form-item>
-      <el-form-item :label="deptBudgetList.modifyExpense2" span="1" prop="taskNo" v-if="deptBudgetList.supervisionFeeFlag == '显示中'">
-        <el-input
-          v-model="deptBudgetList.supervisionFee"
-          placeholder="请输入发放金额"
-          size="small"
-          disabled
-        ></el-input>
-      </el-form-item>
-     <el-form-item :label="deptBudgetList.modifyExpense3" span="1" prop="taskNo" v-if="deptBudgetList.insurancePremiumFlag == '显示中'">
-        <el-input
-          v-model="deptBudgetList.insurancePremium"
-          placeholder="请输入发放金额"
-          size="small"
-          disabled
-        ></el-input>
-      </el-form-item>
-      <el-form-item :label="deptBudgetList.modifyExpense4" span="1" prop="taskNo" v-if="deptBudgetList.otherFeeFlag == '显示中'">
-        <el-input
-          v-model="deptBudgetList.otherFee"
-          placeholder="请输入发放金额"
-          size="small"
-          disabled
-        ></el-input>
-      </el-form-item>
-      <el-form-item label="合计应还(元)" span="1" prop="amountDue">
-        <el-input
-          v-model="deptBudgetList.amountDue"
-          placeholder="请输入发放金额"
-          size="small"
-          disabled
-        ></el-input>
-      </el-form-item>
-      <el-form-item label="已还(元)" span="1" prop="amountRepaid">
-        <el-input
-          v-model="deptBudgetList.amountRepaid"
-          placeholder="请输入发放金额"
-          size="small"
-          disabled
-        ></el-input>
-      </el-form-item>
-      <el-form-item label="未还(元)" span="1" prop="taskNo">
-        <el-input
-          v-model="deptBudgetList.amountToRepaid"
-          placeholder="请输入发放金额"
-          size="small"
-          disabled
-        ></el-input>
-      </el-form-item>
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"
+        @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" :editable="false" />
+      <div v-if="deptBudgetList.status == '待还款'">
+        <div class="title1">发放信息</div>
+        <el-form-item prop="contractNo" label="合同编号" span="1">
+          <el-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" size="small" disabled></el-input>
+        </el-form-item>
+        <el-form-item label="发放金额(元)" span="1" prop="taskNo">
+          <el-input type='number' v-model="deptBudgetList.paymentAmount" placeholder="请输入发放金额" size="small" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item :label="deptBudgetList.modifyExpense1" span="1" prop="taskNo"
+          v-if="deptBudgetList.applicationAmountFlag == '显示中'">
+          <el-input type='number' v-model="deptBudgetList.applicationAmount" placeholder="请输入发放金额" size="small"
+            disabled></el-input>
+        </el-form-item>
+        <el-form-item :label="deptBudgetList.modifyExpense2" span="1" prop="taskNo"
+          v-if="deptBudgetList.supervisionFeeFlag == '显示中'">
+          <el-input type='number' v-model="deptBudgetList.supervisionFee" placeholder="请输入发放金额" size="small" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item :label="deptBudgetList.modifyExpense3" span="1" prop="taskNo"
+          v-if="deptBudgetList.insurancePremiumFlag == '显示中'">
+          <el-input type='number' v-model="deptBudgetList.insurancePremium" placeholder="请输入发放金额" size="small" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item :label="deptBudgetList.modifyExpense4" span="1" prop="taskNo"
+          v-if="deptBudgetList.otherFeeFlag == '显示中'">
+          <el-input type='number' v-model="deptBudgetList.otherFee" placeholder="请输入发放金额" size="small" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item label="合计应还(元)" span="1" prop="amountDue">
+          <el-input type='number' v-model="deptBudgetList.amountDue" placeholder="请输入发放金额" size="small" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item label="已还(元)" span="1" prop="amountRepaid">
+          <el-input type='number' v-model="deptBudgetList.amountRepaid" placeholder="请输入发放金额" size="small" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item label="未还(元)" span="1" prop="taskNo">
+          <el-input type='number' v-model="deptBudgetList.amountToRepaid" placeholder="请输入发放金额" size="small" disabled>
+          </el-input>
+        </el-form-item>
       </div>
       <div class="title1">审核记录</div>
       <el-table class="wenzi" :data="taskhistories" style="width: 100%">
@@ -271,53 +150,53 @@
   </div>
 </template>
 <script>
-import {
+  import {
     getcompList,
   } from '@/model/signIn/index'
-import {
-  getWarehouseReceiptLook,
-  getWarehouseReceiptExamine
-} from '@/model/tradeServicesManagement/index'
-import {
+  import {
+    getWarehouseReceiptLook,
+    getWarehouseReceiptExamine
+  } from '@/model/tradeServicesManagement/index'
+  import {
     selectWarehouseSelf,
   } from '@/model/houseSelfCollect/index'
-import WsUpload from '@/components/WsUpload'
-export default {
-  components: {
-    WsUpload,
-  },
-  data() {
-    return {
-      deptBudgetList: {},
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-         rules: {
+  import WsUpload from '@/components/WsUpload'
+  export default {
+    components: {
+      WsUpload,
+    },
+    data() {
+      return {
+        deptBudgetList: {},
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        rules: {
           // unitPrice: [
           //   { required: true, message: '单价不能为空!', trigger: 'blur' },
           //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
           // ],
         },
-      compOptionList:[],
-      taskhistories:[],
+        compOptionList: [],
+        taskhistories: [],
         warehouseList: [],
-        cwNumberList:[],
-        goodsList:[],
-    }
-  },
-  activated() {
-    localStorage.removeItem("pageUp")
-    this.getList(this.$route.query.id)
-    // this.getcompList()
-  },
-  methods: {
-    //返回
-    cancel() {
-      this.$router.push({
+        cwNumberList: [],
+        goodsList: [],
+      }
+    },
+    activated() {
+      localStorage.removeItem("pageUp")
+      this.getList(this.$route.query.id)
+      // this.getcompList()
+    },
+    methods: {
+      //返回
+      cancel() {
+        this.$router.push({
           path: 'warehouseReceiptRegulation'
         })
-    },
-    //仓库切换
-    changeWarehouse(val) {
+      },
+      //仓库切换
+      changeWarehouse(val) {
         console.log('切换后仓库数据', val)
         let _data = this.warehouseList
         for (let i = 0; i < _data.length; i++) {
@@ -338,14 +217,14 @@ export default {
             this.deptBudgetList.warehouseId = _data[i].id
             this.deptBudgetList.goodsNameKey = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0]
               .goodsNameKey : ''
-              this.deptBudgetList.warehouseNoId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
-                .id : ''
-                this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
-                  .baseId : ''
+            this.deptBudgetList.warehouseNoId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
+              .id : ''
+            this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
+              .baseId : ''
           }
         }
       },
-       //仓位号切换
+      //仓位号切换
       changeWarehouseNo(val) {
         let _data = this.cwNumberList
         for (let i = 0; i < _data.length; i++) {
@@ -356,30 +235,30 @@ export default {
           }
         }
       },
-    getcompList(){
-       getcompList()
+      getcompList() {
+        getcompList()
           .toPromise()
           .then((res) => {
             this.compOptionList = res
             this.deptBudgetList.renown = res[0].compName
           })
           .catch((err) => {})
-    },
-    	//磅单跳转
-	poundList(){
-		 this.$router.push({
+      },
+      //磅单跳转
+      poundList() {
+        this.$router.push({
           name: 'inOutRecord',
-		  query: {
+          query: {
             baseId: this.deptBudgetList.baseId,
             positionId: this.deptBudgetList.warehouseNoId,
             warehouseName: this.deptBudgetList.warehouseName,
-            nowWeight:this.deptBudgetList.nowWeight,
-            warehouseNo:this.deptBudgetList.warehouseNo
+            nowWeight: this.deptBudgetList.nowWeight,
+            warehouseNo: this.deptBudgetList.warehouseNo
           }
         })
-	},
-    getWarehouse(){
-      //获取仓库
+      },
+      getWarehouse() {
+        //获取仓库
         selectWarehouseSelf({
             compId: this.compId
           }).toPromise()
@@ -411,41 +290,46 @@ export default {
             this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
               .goodsNameKey : ''
           })
-    },
-    getList(id) {
+      },
+      getList(id) {
         //审核记录
-      getWarehouseReceiptExamine({businessKey: id,workflowId: this.$route.query.workflowId}).toPromise()
+        getWarehouseReceiptExamine({
+            businessKey: id,
+            workflowId: this.$route.query.workflowId
+          }).toPromise()
           .then((response) => {
-            this.taskhistories=response
+            this.taskhistories = response
           })
-       getWarehouseReceiptLook({id:id})
-        .toPromise()
-        .then((response) => {
-         this.deptBudgetList = response
-        })
-        .catch((req) => {
-          // this.tableData = response.records
-          // this.$message.success('提交失败')
-        })
-    },
+        getWarehouseReceiptLook({
+            id: id
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList = response
+          })
+          .catch((req) => {
+            // this.tableData = response.records
+            // this.$message.success('提交失败')
+          })
+      },
 
-    // 附件改变事件
-    onChange() {
-      this.$refs.upload
-        .handleSaveBill()
-        .then(async (response) => {
-          this.deptBudgetList.appendix = response
-        })
-        .catch((res) => {
-          EventBus.$emit('error', (JSON.parse(res) || {}).message)
-          this.$refs.upload.clearFiles()
-        })
+      // 附件改变事件
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async (response) => {
+            this.deptBudgetList.appendix = response
+          })
+          .catch((res) => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
     },
-  },
-}
+  }
 </script>
 <style lang="scss" scoped>
-/deep/.el-form-item__content {
+  /deep/.el-form-item__content {
     width: 400px;
   }
 
@@ -501,6 +385,7 @@ export default {
     font-weight: 600;
     margin: 20px 0;
   }
+
   //轮播图
   .el-carousel__item h3 {
     color: #475669;
@@ -509,16 +394,16 @@ export default {
     line-height: 200px;
     margin: 0;
   }
-  
+
   .el-carousel__item:nth-child(2n) {
     background-color: #99a9bf;
   }
-  
+
   .el-carousel__item:nth-child(2n+1) {
     background-color: #d3dce6;
   }
-  .existing{
-	width: 330px;
-}
 
-</style>
+  .existing {
+    width: 330px;
+  }
+</style>

+ 372 - 97
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -84,26 +84,47 @@
               </el-form-item>
             </el-col>
           </el-row>
-          <div class="small-title" style="font-size: 16px">派车</div>
+          <div class="small-title" style="font-size: 16px">派车
+            <!-- <el-radio-group @change='pricetypechange' v-model="pricetype">
+              <el-radio label="1">元/吨计费</el-radio>
+              <el-radio label="2">元/车计费</el-radio>
+            </el-radio-group> -->
+            </div>
+          
           <div class="myTest">
-            <el-form-item label="当前运输单价(元/吨):" prop="tranPrice" label-width="150px" class="input-item-margin">
+            
+            <el-form-item v-if='pricetype==1' label="当前运输单价(元/吨):" prop="tranPrice" label-width="150px" class="input-item-margin">
               <el-input v-model="deptBudgetList.tranPrice" maxlength="70" disabled />
             </el-form-item>
-            <el-form-item label="审核中的运输总价(元/吨):" prop="tranPriceIng" label-width="180px" class="input-item-margin">
+            <el-form-item v-else label="当前运输单价(元/车):" prop="tranPrice" label-width="150px" class="input-item-margin">
+              <el-input v-model="deptBudgetList.tranPriceCar" maxlength="70" disabled />
+            </el-form-item>
+            <el-form-item v-if='pricetype==1' label="审核中的运输总价(元/吨):" prop="tranPriceIng" label-width="180px" class="input-item-margin">
               <el-input v-if="deptBudgetList.priceStatus=='审核中'" :disabled="readonly"
                 v-model="deptBudgetList.tranPriceIng" maxlength="70" />
               <el-input v-else v-model="deptBudgetList.tranPriceIng" maxlength="70" />
             </el-form-item>
+            <el-form-item v-else label="审核中的运输总价(元/车):" prop="tranPriceIng" label-width="180px" class="input-item-margin">
+              <el-input v-if="deptBudgetList.priceStatusCar=='审核中'" :disabled="readonly"
+                v-model="deptBudgetList.tranPriceIngCar" maxlength="70" />
+              <el-input v-else v-model="deptBudgetList.tranPriceIngCar" maxlength="70" />
+            </el-form-item>
             <div class="input-item-margin">
-              <div v-if="deptBudgetList.priceStatus=='审核中'">
+              <div v-if="deptBudgetList.priceStatus=='审核中'&&pricetype==1">
+                <el-button type="primary" v-hasPermission="`tranManager.vehicleDispatching.reprice`" size="small"
+                  @click="examine(1)">审核中
+                </el-button>
+              </div>
+              <el-button v-if="deptBudgetList.priceStatus!='审核中'&&pricetype==1" type="primary" @click="priceSubmit(1)">提交</el-button>
+              <div v-if="deptBudgetList.priceStatusCar=='审核中'&&pricetype==2">
                 <el-button type="primary" v-hasPermission="`tranManager.vehicleDispatching.reprice`" size="small"
-                  @click="examine()">审核中
+                  @click="examine(2)">审核中
                 </el-button>
               </div>
-              <el-button v-else type="primary" @click="priceSubmit()">提交</el-button>
+              <el-button v-if="deptBudgetList.priceStatusCar!='审核中'&&pricetype==2" type="primary" @click="priceSubmit(2)">提交</el-button>
             </div>
           </div>
-          <div class="content3" v-for="(item, index) in deptBudgetList.tranCarInfoList" :key="index">
+          <div class="content3" v-for="(item, index) in driverlist" :key="index">
             <div class="content3-item1">
 
               <div class="">
@@ -196,12 +217,38 @@
                 </el-form-item>
               </el-col>
               <el-col :span="8">
-                <el-form-item label="运输单价(元/吨):" span="1" prop="carModel" label-width="125px">
+                <el-form-item v-if='item.billingMethod==1' label="运输单价(元/吨):" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
+                </el-form-item>
+                <el-form-item v-else label="运输单价(元/车):" span="1" prop="carModel" label-width="125px">
                   <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
                 </el-form-item>
               </el-col>
               <span v-if="item.status == '未装车'||item.temporaryDriverFlag!=0" width="22" height="22" class="del"
-                @click="del(index, item)" src="../../../public/img/del.png" alt="">×</span>
+                @click="del(index, item,0)" src="../../../public/img/del.png" alt="">×</span>
+            </div>
+
+
+          </div>
+          <div class="contentitem" v-for="(item, index) in teamlist" :key="'team'+index">
+            <div class="content3-item1">
+              <el-col :span="8">
+                <!-- <span style="margin-left: 30px;font-weight: 600;">车队-{{ index + 1 }}</span> -->
+                 <el-form-item  :label="'车队-'+(index + 1 )" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="item.id?true:false" v-model="item.fleetName" size="small" />
+                </el-form-item>
+              </el-col>
+              
+              <el-col :span="8">
+                <el-form-item v-if='item.billingMethod==1' label="运输单价(元/吨):" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
+                </el-form-item>
+                <el-form-item v-else label="运输单价(元/车):" span="1" prop="carModel" label-width="125px">
+                  <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
+                </el-form-item>
+              </el-col>
+              <span v-if="!item.id" width="22" height="22" class="del"
+                @click="del(index, item,1)" src="../../../public/img/del.png" alt="">×</span>
             </div>
 
 
@@ -213,6 +260,9 @@
             <!-- <img width="22" height="22" src="../../../public/img/add.png" alt="" /> -->
             <div class="spans">添加司机</div>
           </el-button>
+          <!-- <el-button class="add" type="primary" size="small" @click="addteam()">
+            <div class="spans">添加车队</div>
+          </el-button> -->
           <div style="text-align: right; padding: 10px">
             <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
           </div>
@@ -230,7 +280,8 @@
     arrange,
     dispatchCat,
     delhaulagestage,
-    setUpTranPrice
+    setUpTranPrice,
+    setUpTranPriceCar
   } from '@/model/transport/index'
   // import { dayjs, fmoney, EventBus } from 'base-core-lib'
   import {
@@ -260,6 +311,7 @@
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 10,
+        pricetype:'1',
         searchType: 1,
         startDate: null,
         endDate: null,
@@ -293,15 +345,56 @@
         if (this.deptBudgetList.tranCarInfoList.length > 0) {
           var maxStorage = 0
           for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-            maxStorage += Number(
-              this.deptBudgetList.tranCarInfoList[i].loadWeight
-            )
+            if(this.deptBudgetList.tranCarInfoList[i].loadWeight){
+              maxStorage += Number(
+                this.deptBudgetList.tranCarInfoList[i].loadWeight
+              )
+            }
+            
           }
           return maxStorage
         }
       },
+      teamlist: function() {
+        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+          var arr = []
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+            if(this.deptBudgetList.tranCarInfoList[i].fleetFlag==1){
+              arr.push(this.deptBudgetList.tranCarInfoList[i])
+            }
+          }
+          return arr
+        }
+      },
+      driverlist: function() {
+        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+          var arr = []
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+            if(this.deptBudgetList.tranCarInfoList[i].fleetFlag==0){
+              arr.push(this.deptBudgetList.tranCarInfoList[i])
+            }
+          }
+          return arr
+        }
+      },
     },
     methods: {
+      pricetypechange(e){
+        console.log(e)
+        this.deptBudgetList.billingMethod=e
+        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+           if(!this.deptBudgetList.tranCarInfoList[i].id){
+             this.deptBudgetList.tranCarInfoList[i].billingMethod=e
+             if(e==1){
+               this.deptBudgetList.tranCarInfoList[i].tranPrice=this.deptBudgetList.tranPrice
+             }else{
+               this.deptBudgetList.tranCarInfoList[i].tranPrice=this.deptBudgetList.tranPriceCar
+             }
+           }
+          }
+        }
+      },
       clearBlur(e) {
         let k = this.$refs.driverSelect
         if (!e) {
@@ -314,21 +407,35 @@
       revert() {
         this.$router.go(-1)
       },
-      del(index, row) {
+      del(index, row,status) {
         if (row.status == null) {
-          if (this.deptBudgetList.tranCarInfoList.length > 1) {
-            this.deptBudgetList.tranCarInfoList.splice(index, 1)
-            for (let i = index; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-              let number = Number(this.deptBudgetList.tranCarInfoList[i].tranCarNo.split('C')[1]) - 1
-              if (number < 10) {
-                this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C00" + number
-              } else if (number < 100) {
-                this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C0" + number
-              } else {
-                this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C" + number
+          if(status==1){
+            if (this.deptBudgetList.tranCarInfoList.length > 1) {
+              for (let i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+                console.log(this.deptBudgetList.tranCarInfoList[i])
+                if(this.deptBudgetList.tranCarInfoList[i].index){
+                  if(this.deptBudgetList.tranCarInfoList[i].index==row.index){
+                    this.deptBudgetList.tranCarInfoList.splice(i, 1)
+                  }
+                }
+              }
+            }
+          }else{
+            if (this.deptBudgetList.tranCarInfoList.length > 1) {
+              this.deptBudgetList.tranCarInfoList.splice(index, 1)
+              for (let i = index; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+                let number = Number(this.deptBudgetList.tranCarInfoList[i].tranCarNo.split('C')[1]) - 1
+                if (number < 10) {
+                  this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C00" + number
+                } else if (number < 100) {
+                  this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C0" + number
+                } else {
+                  this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C" + number
+                }
               }
             }
           }
+          
         } else {
           this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
             confirmButtonText: '确定',
@@ -349,78 +456,200 @@
           })
         }
       },
+      addteam(){
+        if(this.pricetype==1){
+          if (!this.deptBudgetList.tranPrice) {
+            this.$message({
+              message: '请设置运输单价(元/吨)!',
+              type: 'warning',
+            })
+          } else {
+              this.deptBudgetList.tranCarInfoList.push({
+                fleetName:'',
+                fleetFlag:1,
+                index:this.deptBudgetList.tranCarInfoList.length,
+                billingMethod:this.pricetype,
+                tranPrice:this.deptBudgetList.tranPrice,
+                tranType: '1',
+              })
+          }
+        }else{
+          if (!this.deptBudgetList.tranPriceCar) {
+            this.$message({
+              message: '请设置运输单价(元/车)!',
+              type: 'warning',
+            })
+          } else {
+              this.deptBudgetList.tranCarInfoList.push({
+                fleetName:'',
+                fleetFlag:1,
+                index:this.deptBudgetList.tranCarInfoList.length,
+                billingMethod:this.pricetype,
+                tranPrice:this.deptBudgetList.tranPriceCar,
+                tranType: '1',
+              })
+          }
+        }
+         
+      },
       add() {
-        if (!this.deptBudgetList.tranPrice) {
-          this.$message({
-            message: '请设置运输单价!',
-            type: 'warning',
-          })
-        } else {
-          var tmp1 = 'C00'
-          this.deptBudgetList.count++
-          if (this.deptBudgetList.tranCarInfoList.length < 10) {
-            this.deptBudgetList.tranCarInfoList.push({
-              driverName: '',
-              driverPhone: '',
-              carLength: 0,
-              carLengthKey: '',
-              loadWeight: null,
-              carModel: '',
-              carModelKey: '',
-              carNumber: '',
-              disabled: false,
-              tranType: '1',
-              // tranCarNo: tmp1+(this.deptBudgetList.count),
-              tranCarNo: "C00" + (this.deptBudgetList.tranCarInfoList.length + 1),
-              tranPrice: this.deptBudgetList.tranPrice
+        if(this.pricetype==1){
+          if (!this.deptBudgetList.tranPrice) {
+            this.$message({
+              message: '请设置运输单价(元/吨)!',
+              type: 'warning',
             })
-          } else if (this.deptBudgetList.tranCarInfoList.length < 100 && this.deptBudgetList.tranCarInfoList.length >=
-            10) {
-            tmp1 = 'C0'
+          } else {
+            var tmp1 = 'C00'
             this.deptBudgetList.count++
-            this.deptBudgetList.tranCarInfoList.push({
-              driverName: '',
-              driverPhone: '',
-              carLength: 0,
-              carLengthKey: '',
-              loadWeight: null,
-              carModel: '',
-              carModelKey: '',
-              carNumber: '',
-              disabled: false,
-              tranType: '1',
-              // tranCarNo: tmp1+(this.deptBudgetList.count),
-              tranCarNo: "C0" + (this.deptBudgetList.tranCarInfoList.length + 1),
-              tranPrice: this.deptBudgetList.tranPrice
+            if (this.deptBudgetList.tranCarInfoList.length < 10) {
+              this.deptBudgetList.tranCarInfoList.push({
+                driverName: '',
+                driverPhone: '',
+                carLength: 0,
+                carLengthKey: '',
+                loadWeight: null,
+                carModel: '',
+                carModelKey: '',
+                carNumber: '',
+                disabled: false,
+                tranType: '1',
+                fleetFlag:0,
+                tranPriceCar:this.deptBudgetList.tranPriceCar,
+                billingMethod:this.pricetype,
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C00" + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranPrice: this.deptBudgetList.tranPrice
+              })
+            } else if (this.deptBudgetList.tranCarInfoList.length < 100 && this.deptBudgetList.tranCarInfoList.length >=
+              10) {
+              tmp1 = 'C0'
+              this.deptBudgetList.count++
+              this.deptBudgetList.tranCarInfoList.push({
+                driverName: '',
+                driverPhone: '',
+                carLength: 0,
+                carLengthKey: '',
+                loadWeight: null,
+                carModel: '',
+                carModelKey: '',
+                carNumber: '',
+                disabled: false,
+                fleetFlag:0,
+                tranType: '1',
+                tranPriceCar:this.deptBudgetList.tranPriceCar,
+                billingMethod:this.pricetype,
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C0" + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranPrice: this.deptBudgetList.tranPrice
+              })
+            } else if (this.deptBudgetList.tranCarInfoList.length < 1000 && this.deptBudgetList.tranCarInfoList.length >=
+              100) {
+              tmp1 = 'C'
+              this.deptBudgetList.count++
+              this.deptBudgetList.tranCarInfoList.push({
+                driverName: '',
+                driverPhone: '',
+                carLength: 0,
+                carLengthKey: '',
+                loadWeight: null,
+                carModel: '',
+                carModelKey: '',
+                carNumber: '',
+                disabled: false,
+                fleetFlag:0,
+                tranType: '1',
+                billingMethod:this.pricetype,
+                tranPriceCar:this.deptBudgetList.tranPriceCar,
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C" + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranPrice: this.deptBudgetList.tranPrice
+              })
+            }
+          }
+        }else{
+          if (!this.deptBudgetList.tranPriceCar) {
+            this.$message({
+              message: '请设置运输单价(元/车)!',
+              type: 'warning',
             })
-          } else if (this.deptBudgetList.tranCarInfoList.length < 1000 && this.deptBudgetList.tranCarInfoList.length >=
-            100) {
-            tmp1 = 'C'
+          } else {
+            var tmp1 = 'C00'
             this.deptBudgetList.count++
-            this.deptBudgetList.tranCarInfoList.push({
-              driverName: '',
-              driverPhone: '',
-              carLength: 0,
-              carLengthKey: '',
-              loadWeight: null,
-              carModel: '',
-              carModelKey: '',
-              carNumber: '',
-              disabled: false,
-              tranType: '1',
-              // tranCarNo: tmp1+(this.deptBudgetList.count),
-              tranCarNo: "C" + (this.deptBudgetList.tranCarInfoList.length + 1),
-              tranPrice: this.deptBudgetList.tranPrice
-            })
+            if (this.deptBudgetList.tranCarInfoList.length < 10) {
+              this.deptBudgetList.tranCarInfoList.push({
+                driverName: '',
+                driverPhone: '',
+                carLength: 0,
+                carLengthKey: '',
+                loadWeight: null,
+                carModel: '',
+                carModelKey: '',
+                carNumber: '',
+                disabled: false,
+                tranType: '1',
+                fleetFlag:0,
+                tranPriceCar:this.deptBudgetList.tranPriceCar,
+                billingMethod:this.pricetype,
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C00" + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranPrice: this.deptBudgetList.tranPrice
+              })
+            } else if (this.deptBudgetList.tranCarInfoList.length < 100 && this.deptBudgetList.tranCarInfoList.length >=
+              10) {
+              tmp1 = 'C0'
+              this.deptBudgetList.count++
+              this.deptBudgetList.tranCarInfoList.push({
+                driverName: '',
+                driverPhone: '',
+                carLength: 0,
+                carLengthKey: '',
+                loadWeight: null,
+                carModel: '',
+                carModelKey: '',
+                carNumber: '',
+                disabled: false,
+                fleetFlag:0,
+                tranType: '1',
+                tranPriceCar:this.deptBudgetList.tranPriceCar,
+                billingMethod:this.pricetype,
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C0" + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranPrice: this.deptBudgetList.tranPrice
+              })
+            } else if (this.deptBudgetList.tranCarInfoList.length < 1000 && this.deptBudgetList.tranCarInfoList.length >=
+              100) {
+              tmp1 = 'C'
+              this.deptBudgetList.count++
+              this.deptBudgetList.tranCarInfoList.push({
+                driverName: '',
+                driverPhone: '',
+                carLength: 0,
+                carLengthKey: '',
+                loadWeight: null,
+                carModel: '',
+                carModelKey: '',
+                carNumber: '',
+                disabled: false,
+                fleetFlag:0,
+                tranType: '1',
+                billingMethod:this.pricetype,
+                tranPriceCar:this.deptBudgetList.tranPriceCar,
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C" + (this.deptBudgetList.tranCarInfoList.length + 1),
+                tranPrice: this.deptBudgetList.tranPrice
+              })
+            }
           }
         }
+        
       },
       //审核
-      examine() {
+      examine(status) {
         this.$prompt('运输单价审核', {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
-          inputValue: this.deptBudgetList.tranPriceIng
+          inputValue: status==1?this.deptBudgetList.tranPriceIng:this.deptBudgetList.tranPriceIngCar
         }).then(({
           value
         }) => {
@@ -429,21 +658,32 @@
             localStorage.getItem('ws-pf_staffName')
           tranProcessInfo.id = this.deptBudgetList.id
           tranProcessInfo.flag = "2"
-          tranProcessInfo.tranPriceIng = value
           tranProcessInfo.tranTypeKey = 1
-          setUpTranPrice(tranProcessInfo)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('审核成功')
-              this.getList()
-            });
+          tranProcessInfo.billingMethod= this.deptBudgetList.billingMethod
+          if(this.deptBudgetList.billingMethod==2){
+             tranProcessInfo.tranPriceIngCar=value
+              setUpTranPriceCar(tranProcessInfo)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('提交成功')
+                this.getList()
+              })
+            }else{
+              tranProcessInfo.tranPriceIng = value
+              setUpTranPrice(tranProcessInfo)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('审核成功')
+                  this.getList()
+                });
+            }
         }).catch(() => {
           this.$message.warning(
             '取消审核'
           );
         });
       },
-      priceSubmit() {
+      priceSubmit(status) {
         this.$confirm(`运输单价将发送给决策人审核,确定提交?`, {
             cancelButtonText: '取消',
             confirmButtonText: '确定',
@@ -455,12 +695,24 @@
             tranProcessInfo.flag = "1"
             tranProcessInfo.tranTypeKey = 1
             tranProcessInfo.tranPriceIng = this.deptBudgetList.tranPriceIng
-            setUpTranPrice(tranProcessInfo)
+            tranProcessInfo.billingMethod= this.deptBudgetList.billingMethod
+            tranProcessInfo.tranPriceIngCar = this.deptBudgetList.tranPriceIngCar
+            if(status==2){
+              setUpTranPriceCar(tranProcessInfo)
               .toPromise()
               .then((response) => {
                 this.$message.success('提交成功')
                 this.getList()
               })
+            }else{
+              setUpTranPrice(tranProcessInfo)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('提交成功')
+                this.getList()
+              })
+            }
+            
           })
           .catch(() => {
             return false
@@ -475,13 +727,27 @@
           })
         } else {
           for (var i = this.index; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-            if (!this.deptBudgetList.tranCarInfoList[i].driver) {
+            if (!this.deptBudgetList.tranCarInfoList[i].driver&&this.deptBudgetList.tranCarInfoList[i].fleetFlag==0) {
               this.$message({
                 message: '姓名不能为空!',
                 type: 'warning',
               })
               return
             }
+            if (!this.deptBudgetList.tranCarInfoList[i].fleetName&&this.deptBudgetList.tranCarInfoList[i].fleetFlag==1) {
+              this.$message({
+                message: '车队名称不能为空!',
+                type: 'warning',
+              })
+              return
+            }
+            if (this.deptBudgetList.tranCarInfoList[i].fleetName&&this.deptBudgetList.tranCarInfoList[i].fleetName.length<1&&this.deptBudgetList.tranCarInfoList[i].fleetFlag==1||this.deptBudgetList.tranCarInfoList[i].fleetName&&this.deptBudgetList.tranCarInfoList[i].fleetName.length>10&&this.deptBudgetList.tranCarInfoList[i].fleetFlag==1) {
+              this.$message({
+                message: '车队名称1-10个字!',
+                type: 'warning',
+              })
+              return
+            }
             for (var j = 0; j < this.carList.length; j++) {
               if (this.carList[j].driverName == this.deptBudgetList.tranCarInfoList[i].driver && this.carList[j]
                 .disableStatusFlag == 1) {
@@ -506,6 +772,7 @@
                   tranCarInfo.processNo = this.deptBudgetList.processNo
                   tranCarInfo.tranPrice = this.deptBudgetList.tranPrice
                   tranCarInfo.infoId = this.deptBudgetList.infoId
+                  tranCarInfo.billingMethod=this.pricetype
                   tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
                   dispatchCat(tranCarInfo)
                     .toPromise()
@@ -543,7 +810,9 @@
                 }
               }
             }
-
+            if(response.billingMethod){
+              this.pricetype=response.billingMethod
+            }
             this.deptBudgetList = response
             this.fhaddress = response.sendPrivate + response.sendCity + response.sendArea + response
               .sendDetailedAddress
@@ -563,8 +832,10 @@
                 carModelKey: '',
                 carNumber: '',
                 disabled: false,
+                fleetFlag:0,
                 tranType: '1',
                 tranCarNo: 'C001',
+                billingMethod:1,
                 tranPrice: this.deptBudgetList.tranPrice
               }, ]
             }
@@ -949,7 +1220,7 @@
     width: 33.333%;
   }
 
-  .content3 {
+  .content3 ,.contentitem{
     width: calc(100% + 20px);
 
     .content3-item1 {
@@ -963,7 +1234,11 @@
       margin-top: 20px;
     }
   }
-
+.contentitem{
+    .content3-item1 {
+      height: 90px;
+    }
+}
   .content4 {
     background: #F5F7FA;
     display: flex;

+ 44 - 1
src/views/tranManagement/tranManagementVehicleLook.vue

@@ -105,7 +105,7 @@
       <div
         style="width: 100%"
         class="driver"
-        v-for="(item, index) in deptBudgetList.tranCarInfoList"
+        v-for="(item, index) in driverlist"
         :key="index"
       >
         <ws-info-table>
@@ -247,6 +247,25 @@
           ></ws-form-item> -->
         </ws-info-table>
       </div>
+       <div
+        style="width: 100%"
+        class="driver"
+        v-for="(item, index) in teamlist"
+        :key="'team'+index"
+      >
+        <ws-info-table>
+          <el-form-item  :label="'车队-'+(index + 1 )" span="1" prop="carModel" label-width="125px">
+            <el-input :disabled="item.id?true:false" v-model="item.fleetName" size="small" />
+          </el-form-item>
+          <el-form-item v-if='item.billingMethod==1' label="运输单价(元/吨):" span="1" prop="carModel" label-width="125px">
+            <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
+          </el-form-item>
+          <el-form-item v-else label="运输单价(元/车):" span="1" prop="carModel" label-width="125px">
+            <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
+          </el-form-item>
+        </ws-info-table>
+      </div>
+
     </ws-form>
     <div style="text-align: right; padding: 10px">
       <el-button
@@ -331,6 +350,30 @@ export default {
   activated() {
     this.getList()
   },
+  computed: {
+      teamlist: function() {
+        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+          var arr = []
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+            if(this.deptBudgetList.tranCarInfoList[i].fleetFlag==1){
+              arr.push(this.deptBudgetList.tranCarInfoList[i])
+            }
+          }
+          return arr
+        }
+      },
+      driverlist: function() {
+        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+          var arr = []
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+            if(this.deptBudgetList.tranCarInfoList[i].fleetFlag==0){
+              arr.push(this.deptBudgetList.tranCarInfoList[i])
+            }
+          }
+          return arr
+        }
+      },
+    },
   methods: {
     //返回按钮
     revert() {

+ 9 - 9
src/views/warehouse/warehouseManagementDelivery.vue

@@ -702,7 +702,7 @@ export default {
         type:'干粮',
         addressUrl:'',
         warehouseInOutDetail: {},
-         selfLoading:"0",
+         selfLoading:'0',
       },
       historyList: [],
 
@@ -713,7 +713,7 @@ export default {
       },
       accessoryTFs: false,
       deptBudgetList1:[],
-      carChange1:"手动填写",
+      carChange1:'手动填写',
       carjudge:false
     }
   },
@@ -732,11 +732,11 @@ export default {
       carNoTypeChange(){
          this.carjudge = !this.carjudge
         if(!this.carjudge){
-            this.deptBudgetList.selfLoading = "0"
-            this.carChange1="手动填写"
+            this.deptBudgetList.selfLoading = '0'
+            this.carChange1='手动填写'
         }else{
-            this.deptBudgetList.selfLoading = "1"
-            this.carChange1="识别下拉"
+            this.deptBudgetList.selfLoading = '1'
+            this.carChange1='识别下拉'
         }
       },
     imgBig(item){
@@ -904,7 +904,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare <= 0 ||
         this.deptBudgetList.tare > 10000 ||
         (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
           String(this.deptBudgetList.tare).length -
@@ -1220,7 +1220,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare <= 0 ||
         this.deptBudgetList.tare > 10000 ||
         (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
           String(this.deptBudgetList.tare).length -
@@ -1602,7 +1602,7 @@ export default {
         }
       }
       if(!this.carstatus){//若自运的合同该字段置空
-          this.deptBudgetList.selfLoading = ""
+          this.deptBudgetList.selfLoading = ''
         }
       this.$confirm(`确定提交出库信息`, {
         cancelButtonText: '取消',

+ 64 - 53
src/views/warehouse/warehouseManagementGross.vue

@@ -251,12 +251,15 @@
                   deptBudgetList.outType == '汽运' ||
                   deptBudgetList.outType == '集装箱船'
                 ">
-                <ws-input v-if="options2.length == 0" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
+                <ws-input v-if="options2.length == 0 && deptBudgetList.inOutType != '移库入库'" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
                   size="small" />
-                <el-select v-if="carstatus && options2.length > 0" filterable clearable :filter-method="dataFilter2"
+                <el-select v-if="carstatus && options2.length == 0&&deptBudgetList.inOutType=='移库入库'" filterable clearable :filter-method="dataFilter2"
                   v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
-                  <el-option v-for="item in options2" :key="item.constKey"
-                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
+                  <el-option v-for="item in options2" :key="item.constKey" :label="item.carNo" :value="item.carNo" />
+                </el-select>
+                <el-select v-if="carstatus && options2.length > 0" filterable clearable v-model="deptBudgetList.carNoCopy" placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="(item,index) in options2" :key="index"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="index" />
                 </el-select>
                 <el-select v-if="!carstatus && options2.length > 0" filterable clearable :filter-method="dataFilter2"
                   v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
@@ -601,6 +604,7 @@
       // }
     },
     methods: {
+    // 获取当前年月日
       // 千丰自动计算扣款
       automaticCalculation() {
         let _price = 0
@@ -663,23 +667,23 @@
           this.options1 = this.outContractNo
         }
       },
-      dataFilter2(val) {
-        this.deptBudgetList.carNo = val
-        if (val) {
-          //val存在
-          this.options1 = this.outContractNo1.filter((item) => {
-            if (
-              !!~item.carNo.indexOf(val) ||
-              !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
-            ) {
-              return true
-            }
-          })
-        } else {
-          //val为空时,还原数组
-          this.options2 = this.tranCarInfoList
-        }
-      },
+      // dataFilter2(val) {
+      //   this.deptBudgetList.carNo = val
+      //   if (val) {
+      //     //val存在
+      //     this.options1 = this.outContractNo1.filter((item) => {
+      //       if (
+      //         !!~item.carNo.indexOf(val) ||
+      //         !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
+      //       ) {
+      //         return true
+      //       }
+      //     })
+      //   } else {
+      //     //val为空时,还原数组
+      //     this.options2 = this.tranCarInfoList
+      //   }
+      // },
       editClick(status) {
         this.isGetCost = false
         if (status == 1) {
@@ -696,7 +700,9 @@
       },
       carChange(e) {
         for (let i = 0; i < this.tranCarInfoList.length; i++) {
-          if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+          if (i==e) {
+            this.deptBudgetList.carNo =  this.tranCarInfoList[i].carNo
+             this.deptBudgetList.carNoCopy =  this.tranCarInfoList[i].carNo + '(' + this.tranCarInfoList[i].tranCarNo + ')'
             this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
             this.deptBudgetList.carId = this.tranCarInfoList[i].id
             this.deptBudgetList.freight = Math.round(
@@ -779,7 +785,7 @@
           return
         }
         if (
-          this.deptBudgetList.tare < 0 ||
+          this.deptBudgetList.tare <= 0 ||
           this.deptBudgetList.tare > 5000000 ||
           (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
             String(this.deptBudgetList.tare).length -
@@ -1305,9 +1311,9 @@
                 this.deptBudgetList.deductionWeight = (
                   this.deptBudgetList.deductionWeight / 1000
                 ).toFixed(2)
-                this.deptBudgetList.deductionAmount = Math.round(
-                  this.deptBudgetList.deductionAmount * 1000
-                )
+                // this.deptBudgetList.deductionAmount = Math.round(
+                //   this.deptBudgetList.deductionAmount * 1000
+                // )
                 // this.deptBudgetList.grossWeight /= 1000
                 //   this.deptBudgetList.tare /= 1000
                 //   this.deptBudgetList.netWeight /= 1000
@@ -1399,7 +1405,7 @@
         }
         if (
           this.information == '皮重检斤' &&
-          (this.deptBudgetList.tare < 0 ||
+          (this.deptBudgetList.tare <= 0 ||
             this.deptBudgetList.tare > 1000000 ||
             (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
               String(this.deptBudgetList.tare).length -
@@ -1850,8 +1856,9 @@
                 this.deptBudgetList.tare /= 1000
                 this.deptBudgetList.netWeight /= 1000
                 this.deptBudgetList.pureWeight /= 1000
-                this.deptBudgetList.deductionAmount *= 1000
+                // this.deptBudgetList.deductionAmount *= 1000
                 this.deptBudgetList.deductionWeight /= 1000
+                delete this.deptBudgetList.carNoCopy
                 addstorageputList(this.deptBudgetList)
                   .toPromise()
                   .then((response) => {
@@ -1874,18 +1881,22 @@
           })
       },
       tarechange(e) {
-        if (
-          this.deptBudgetList.grossWeight &&
-          this.deptBudgetList.tare &&
-          (this.deptBudgetList.deductionWeight ||
-            this.deptBudgetList.deductionWeight == 0)
-        ) {
-          this.deptBudgetList.netWeight = Number(
-            this.deptBudgetList.grossWeight -
-            this.deptBudgetList.tare -
-            this.deptBudgetList.deductionWeight
-          ).toFixed(2)
+        if(this.deptBudgetList.grossWeight){
+          this.deptBudgetList.netWeight = Number(this.deptBudgetList.grossWeight) - Number(this.deptBudgetList.tare) - Number(this.deptBudgetList.deductionWeight)
         }
+          this.deptBudgetList.netWeight = this.deptBudgetList.netWeight.toFixed(2)
+        // if (
+        //   this.deptBudgetList.grossWeight &&
+        //   (this.deptBudgetList.tare || !this.deptBudgetList.tare) &&
+        //   (this.deptBudgetList.deductionWeight ||
+        //     this.deptBudgetList.deductionWeight == 0)
+        // ) {
+        //   this.deptBudgetList.netWeight = Number(
+        //     this.deptBudgetList.grossWeight -
+        //     this.deptBudgetList.tare -
+        //     this.deptBudgetList.deductionWeight
+        //   ).toFixed(2)
+        // }
       },
       grossWeightchange(e) {
         this.grossWeight = this.deptBudgetList.grossWeight
@@ -2088,20 +2099,20 @@
             return false
           })
       },
-      tarechange(e) {
-        if (
-          this.deptBudgetList.grossWeight &&
-          this.deptBudgetList.tare &&
-          (this.deptBudgetList.deductionWeight ||
-            this.deptBudgetList.deductionWeight == 0)
-        ) {
-          this.deptBudgetList.netWeight = Number(
-            this.deptBudgetList.grossWeight -
-            this.deptBudgetList.tare -
-            this.deptBudgetList.deductionWeight
-          ).toFixed(2)
-        }
-      },
+      // tarechange(e) {
+      //   if (
+      //     this.deptBudgetList.grossWeight &&
+      //     this.deptBudgetList.tare &&
+      //     (this.deptBudgetList.deductionWeight ||
+      //       this.deptBudgetList.deductionWeight == 0)
+      //   ) {
+      //     this.deptBudgetList.netWeight = Number(
+      //       this.deptBudgetList.grossWeight -
+      //       this.deptBudgetList.tare -
+      //       this.deptBudgetList.deductionWeight
+      //     ).toFixed(2)
+      //   }
+      // },
       grossWeightchange(e) {
         this.grossWeight = this.deptBudgetList.grossWeight
         if (

+ 26 - 18
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -422,7 +422,7 @@
         //深度监听,可监听到对象、数组的变化
         handler(val, oldVal) {
           if (val.tare) {
-            this.dataList.netWeight = this.dataList.grossWeight - val.tare
+            this.dataList.netWeight = this.dataList.grossWeight - val.tare - val.deductionWeight
           }
         },
         deep: true, //true 深度监听
@@ -583,6 +583,7 @@
       this.dataList.titleNo = this.$route.query.titleNo
       this.dataList.titleNoOther = this.$route.query.titleNoOther
       this.dataList.carNo = this.$route.query.carNo
+      this.dataList.tranCarNo = this.$route.query.tranCarNo
       this.dataList.carId = this.$route.query.carId
       this.dataList.inOutDate = this.$route.query.inOutDate
       this.dataList.contractNo = this.$route.query.contractNo
@@ -749,13 +750,15 @@
             }
             this.dataList.goodsName = this.outContractNo[i].goodsName
             this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
-            this.cost = this.outContractNo[i].contractPrice
-            if (this.cost) {
-              this.isGetCost = true
-              this.dataList.cost = this.cost - this.dataList.deductionAmount
-            } else {
-              this.isGetCost = false
-              this.dataList.cost = this.dataList.cost
+            if(!this.dataList.cost){
+              this.cost = this.outContractNo[i].contractPrice
+              if (this.cost) {
+                this.isGetCost = true
+                this.dataList.cost = this.cost - this.dataList.deductionAmount
+              } else {
+                this.isGetCost = false
+                this.dataList.cost = this.dataList.cost
+              }
             }
             this.dataList.inOutType = this.outContractNo[i].inOutType
             if (this.outContractNo[i].inOutType == '移库入库') {
@@ -915,7 +918,7 @@
         }
 
         if (
-          this.dataList.tare < 0 ||
+          this.dataList.tare <= 0 ||
           this.dataList.tare > 200000 ||
           (String(this.dataList.tare).indexOf('.') != -1 &&
             String(this.dataList.tare).length -
@@ -1422,10 +1425,8 @@
                         })
                         .toPromise()
                         .then((response) => {
-                          window.open(
-                            '../../../../static/weightCheckInOut.html?type=2&tableData=' +
-                            JSON.stringify(response)
-                          )
+                          localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
                         })
                     }).catch(() => {
                         return false
@@ -1482,16 +1483,23 @@
       },
       tarechange(e) {
         this.tare = this.dataList.tare
-        if (this.dataList.grossWeight && this.dataList.tare) {
-          this.dataList.netWeight = Number(
-            this.dataList.grossWeight - this.dataList.tare
-          ).toFixed(2)
+        if(this.dataList.grossWeight){
+            this.dataList.netWeight = Number(this.dataList.grossWeight) - Number(this.dataList.tare) - Number(this.dataList.deductionWeight)
         }
+        this.dataList.netWeight = this.dataList.netWeight.toFixed(2)
+        // if (this.dataList.grossWeight && this.dataList.tare) {
+        //   this.dataList.netWeight = Number(
+        //     this.dataList.grossWeight - this.dataList.tare - this.dataList.deductionWeight
+        //   ).toFixed(2)
+        // }
       },
       grossWeightchange(e) {
+         if(!this.dataList.deductionWeight){
+          this.dataList.deductionWeight = 0
+        }
         if (this.dataList.grossWeight && this.dataList.tare) {
           this.dataList.netWeight = Number(
-            this.dataList.grossWeight - this.dataList.tare
+            this.dataList.grossWeight - this.dataList.tare - this.dataList.deductionWeight
           ).toFixed(2)
         }
       },

+ 16 - 17
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -474,7 +474,7 @@
           inOutDate: '',
           inOutType: '',
           goodsName: '',
-          selfLoading: "0",
+          selfLoading: '0',
           warehouseInOutDetail: {
             qualityInspector: '',
           },
@@ -500,8 +500,8 @@
         param: 9600,
         allowEdit: true,
         result1: '00',
-        grossWeight: "", //显示的毛重
-        carChange1: "手动填写",
+        grossWeight: '', //显示的毛重
+        carChange1: '手动填写',
         carjudge: false
       }
     },
@@ -559,11 +559,11 @@
       carNoTypeChange() {
         this.carjudge = !this.carjudge
         if (!this.carjudge) {
-          this.dataList.selfLoading = "0"
-          this.carChange1 = "手动填写"
+          this.dataList.selfLoading = '0'
+          this.carChange1 = '手动填写'
         } else {
-          this.dataList.selfLoading = "1"
-          this.carChange1 = "识别下拉"
+          this.dataList.selfLoading = '1'
+          this.carChange1 = '识别下拉'
         }
       },
       setVal(data) {
@@ -790,7 +790,7 @@
           return
         }
         if (
-          this.dataList.tare < 0 ||
+          this.dataList.tare <= 0 ||
           this.dataList.tare > 200000 ||
           (String(this.dataList.tare).indexOf('.') != -1 &&
             String(this.dataList.tare).length -
@@ -1163,7 +1163,7 @@
           }
         }
         if (!this.carstatus) { //若自运的合同该字段置空
-          this.deptBudgetList.selfLoading = ""
+          this.deptBudgetList.selfLoading = ''
         }
         this.$confirm(`确定提交毛重检斤`, {
             cancelButtonText: '取消',
@@ -1182,7 +1182,7 @@
                 this.dataList.tare /= 1000
                 this.dataList.netWeight /= 1000
                 this.dataList.pureWeight /= 1000
-                this.dataList.deductionAmount *= 1000
+                // this.dataList.deductionAmount *= 1000
                 this.dataList.deductionWeight /= 1000
                 addstorageputList(this.dataList)
                   .toPromise()
@@ -1202,10 +1202,9 @@
                           })
                           .toPromise()
                           .then((response) => {
-                            window.open(
-                              '../../../../static/weightCheckInOut.html?type=2&tableData=' +
-                              JSON.stringify(response)
-                            )
+                                    localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
                           })
                         this.$router.push({
                           path: 'warehouseManagementList',
@@ -1226,9 +1225,9 @@
                     this.dataList.pureWeight = Math.round(
                       this.dataList.pureWeight * 1000
                     )
-                    this.dataList.deductionAmount = Math.round(
-                      this.dataList.deductionAmount / 1000
-                    )
+                    // this.dataList.deductionAmount = Math.round(
+                    //   this.dataList.deductionAmount / 1000
+                    // )
                     this.dataList.deductionWeight = Math.round(
                       this.dataList.deductionWeight * 1000
                     )

+ 8 - 8
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -677,7 +677,7 @@ export default {
         pureWeight:'',
         deductionAmount:'',
         deductionWeigh:'',
-        selfLoading:"0"
+        selfLoading:'0'
       },
       historyList: [],
 
@@ -687,7 +687,7 @@ export default {
         },
       },
       accessoryTFs: false,
-        carChange1:"手动填写",
+        carChange1:'手动填写',
         carjudge:false
     }
   },
@@ -732,11 +732,11 @@ export default {
       carNoTypeChange(){
         this.carjudge = !this.carjudge
         if(!this.carjudge){
-            this.dataList.selfLoading = "0"
-            this.carChange1="手动填写"
+            this.dataList.selfLoading = '0'
+            this.carChange1='手动填写'
         }else{
-            this.dataList.selfLoading = "1"
-            this.carChange1="识别下拉"
+            this.dataList.selfLoading = '1'
+            this.carChange1='识别下拉'
         }
       },
     imgBig(item){
@@ -870,7 +870,7 @@ export default {
         return
       }
       if (
-        this.dataList.tare < 0 ||
+        this.dataList.tare <= 0 ||
         this.dataList.tare > 10000 ||
         (String(this.dataList.tare).indexOf('.') != -1 &&
           String(this.dataList.tare).length -
@@ -1230,7 +1230,7 @@ export default {
         }
       }
       if(!this.carstatus){//若自运的合同该字段置空
-          this.dataList.selfLoading = ""
+          this.dataList.selfLoading = ''
         }
       this.$refs.dataList.validate((valid) => {
         if (valid) {

+ 1 - 1
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -1075,7 +1075,7 @@ export default {
       }
 
       if (
-        this.dataList.tare < 0 ||
+        this.dataList.tare <= 0 ||
         this.dataList.tare > 10000 ||
         (String(this.dataList.tare).indexOf('.') != -1 &&
           String(this.dataList.tare).length -

+ 2 - 2
src/views/warehouse/warehouseManagementPut.vue

@@ -713,7 +713,7 @@
           return
         }
         if (
-          this.deptBudgetList.tare < 0 ||
+          this.deptBudgetList.tare <= 0 ||
           this.deptBudgetList.tare > 10000 ||
           (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
             String(this.deptBudgetList.tare).length -
@@ -1258,7 +1258,7 @@
           return
         }
         if (
-          this.deptBudgetList.tare < 0 ||
+          this.deptBudgetList.tare <= 0 ||
           this.deptBudgetList.tare > 10000 ||
           (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
             String(this.deptBudgetList.tare).length -

+ 0 - 1
src/views/warehouse/warehouseManagementPutOutLook.vue

@@ -347,7 +347,6 @@ export default {
     //返回按钮
     revert() {
       this.$router.go(-1)
-      
     },
     // returnsales() {
     //   this.$router.push({ path: 'warehouseManagementPutOut' })

+ 3 - 1
src/views/warehouse/warehouseManagementRecord.vue

@@ -532,7 +532,9 @@
                       })
                         .toPromise()
                         .then((response) => {
-                            window.open( '../../../../static/weightCheckInOut.html?type=2&tableData=' +encodeURIComponent(JSON.stringify(response)))
+                                      localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
                         })
 			},
 			//返回按钮

+ 22 - 23
src/views/warehouse/warehouseManagementTare.vue

@@ -409,7 +409,7 @@
           grossWeight: '',
           tare: '',
           inOutDate: '',
-          selfLoading: "0",
+          selfLoading: '0',
         },
         weightbills: {},
         historyList: [],
@@ -441,8 +441,8 @@
             value: '3',
           },
         ],
-        tare: "0", //显示的皮重
-        carChange1: "手动填写",
+        tare: '0', //显示的皮重
+        carChange1: '手动填写',
         carjudge: false,
         options2: [],
       }
@@ -484,11 +484,11 @@
       carNoTypeChange() {
         this.carjudge = !this.carjudge
         if (!this.carjudge) {
-          this.deptBudgetList.selfLoading = "0"
-          this.carChange1 = "手动填写"
+          this.deptBudgetList.selfLoading = '0'
+          this.carChange1 = '手动填写'
         } else {
-          this.deptBudgetList.selfLoading = "1"
-          this.carChange1 = "识别下拉"
+          this.deptBudgetList.selfLoading = '1'
+          this.carChange1 = '识别下拉'
         }
       },
       setVal(data) {
@@ -708,7 +708,7 @@
         if (
           this.information == '毛重检斤' &&
           (this.deptBudgetList.grossWeight <= 0 ||
-            this.deptBudgetList.grossWeight > 200000 ||
+            this.deptBudgetList.grossWeight > 800000000 ||
             (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
               String(this.deptBudgetList.grossWeight).length -
               (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
@@ -729,8 +729,8 @@
         }
         if (
           this.information == '皮重检斤' &&
-          (this.deptBudgetList.tare < 0 ||
-            this.deptBudgetList.tare > 200000 ||
+          (this.deptBudgetList.tare <= 0 ||
+            this.deptBudgetList.tare > 8000000 ||
             (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
               String(this.deptBudgetList.tare).length -
               (String(this.deptBudgetList.tare).indexOf('.') + 1) >
@@ -1022,7 +1022,7 @@
         }
         if (
           this.deptBudgetList.grossWeight <= 0 ||
-          this.deptBudgetList.grossWeight > 5000000 ||
+          this.deptBudgetList.grossWeight > 800000000 ||
           (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
             String(this.deptBudgetList.grossWeight).length -
             (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
@@ -1042,8 +1042,8 @@
           return
         }
         if (
-          this.deptBudgetList.tare < 0 ||
-          this.deptBudgetList.tare > 500000 ||
+          this.deptBudgetList.tare <= 0 ||
+          this.deptBudgetList.tare > 800000 ||
           (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
             String(this.deptBudgetList.tare).length -
             (String(this.deptBudgetList.tare).indexOf('.') + 1) >
@@ -1064,7 +1064,7 @@
         }
         if (
           this.deptBudgetList.netWeight <= 0 ||
-          this.deptBudgetList.netWeight >= 5000000
+          this.deptBudgetList.netWeight >= 5000000000
         ) {
           this.$message({
             message: '净重输入错误!',
@@ -1442,7 +1442,7 @@
           }
         }
         if (!this.carstatus) { //若自运的合同该字段置空
-          this.deptBudgetList.selfLoading = ""
+          this.deptBudgetList.selfLoading = ''
         }
         this.$confirm(`确定提交出库信息`, {
           cancelButtonText: '取消',
@@ -1455,7 +1455,7 @@
               this.deptBudgetList.tare /= 1000
               this.deptBudgetList.netWeight /= 1000
               this.deptBudgetList.pureWeight /= 1000
-              this.deptBudgetList.deductionAmount *= 1000
+              // this.deptBudgetList.deductionAmount *= 1000
               this.deptBudgetList.deductionWeight /= 1000
               this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
               this.deptBudgetList.skinInspector =
@@ -1486,10 +1486,9 @@
 
                     var date = new Date()
                     this.weightbills.updateDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' +
-                      date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date
-                      .getSeconds()
-                    window.open('../../../../static/weightCheckOut.html?type=2&tableData=' +
-                      encodeURIComponent(JSON.stringify(this.weightbills)))
+                      date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()
+                      localStorage.setItem('ck_bd_printData1',JSON.stringify(this.weightbills))
+                      window.open('../../../../static/weightCheckOut.html?type=2')
                   }
                   this.$router.push({
                     path: 'warehouseManagementList',
@@ -1508,9 +1507,9 @@
                   this.deptBudgetList.pureWeight = Math.round(
                     this.deptBudgetList.pureWeight * 1000
                   )
-                  this.deptBudgetList.deductionAmount = Math.round(
-                    this.deptBudgetList.deductionAmount / 1000
-                  )
+                  // this.deptBudgetList.deductionAmount = Math.round(
+                  //   this.deptBudgetList.deductionAmount / 1000
+                  // )
                   this.deptBudgetList.deductionWeight = Math.round(
                     this.deptBudgetList.deductionWeight * 1000
                   )

File diff ditekan karena terlalu besar
+ 448 - 467
src/views/warehouse/weightedsubsidiary.vue


+ 9 - 9
src/views/warehousenew/warehouseManagementDelivery.vue

@@ -702,7 +702,7 @@ export default {
         type:'干粮',
         addressUrl:'',
         warehouseInOutDetail: {},
-         selfLoading:"0",
+         selfLoading:'0',
       },
       historyList: [],
 
@@ -713,7 +713,7 @@ export default {
       },
       accessoryTFs: false,
       deptBudgetList1:[],
-      carChange1:"手动填写",
+      carChange1:'手动填写',
       carjudge:false
     }
   },
@@ -732,11 +732,11 @@ export default {
       carNoTypeChange(){
          this.carjudge = !this.carjudge
         if(!this.carjudge){
-            this.deptBudgetList.selfLoading = "0"
-            this.carChange1="手动填写"
+            this.deptBudgetList.selfLoading = '0'
+            this.carChange1='手动填写'
         }else{
-            this.deptBudgetList.selfLoading = "1"
-            this.carChange1="识别下拉"
+            this.deptBudgetList.selfLoading = '1'
+            this.carChange1='识别下拉'
         }
       },
     imgBig(item){
@@ -904,7 +904,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare <= 0 ||
         this.deptBudgetList.tare > 10000 ||
         (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
           String(this.deptBudgetList.tare).length -
@@ -1220,7 +1220,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare <= 0 ||
         this.deptBudgetList.tare > 10000 ||
         (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
           String(this.deptBudgetList.tare).length -
@@ -1602,7 +1602,7 @@ export default {
         }
       }
       if(!this.carstatus){//若自运的合同该字段置空
-          this.deptBudgetList.selfLoading = ""
+          this.deptBudgetList.selfLoading = ''
         }
       this.$confirm(`确定提交出库信息`, {
         cancelButtonText: '取消',

+ 5 - 6
src/views/warehousenew/warehouseManagementNoWeightIn.vue

@@ -551,7 +551,7 @@
             value: '3',
           },
         ],
-        tare: "",
+        tare: '',
       }
     },
     mounted() {},
@@ -895,7 +895,7 @@
         }
 
         if (
-          this.dataList.tare < 0 ||
+          this.dataList.tare <= 0 ||
           this.dataList.tare > 200000 ||
           (String(this.dataList.tare).indexOf('.') != -1 &&
             String(this.dataList.tare).length -
@@ -1402,10 +1402,9 @@
                         })
                         .toPromise()
                         .then((response) => {
-                          window.open(
-                            '../../../../static/weightCheckInOut.html?type=2&tableData=' +
-                            JSON.stringify(response)
-                          )
+                               localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
                         })
                     })
                     this.$router

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini