Ver código fonte

合并分支

gjy 3 anos atrás
pai
commit
d469386376
100 arquivos alterados com 32625 adições e 21865 exclusões
  1. 2 0
      Sortable.min.js
  2. 1 0
      axios.min.js
  3. 21 0
      echarts.min.js
  4. 0 0
      index.js
  5. 35 25
      public/static/inspection.html
  6. 39 32
      public/static/payprint.html
  7. 289 279
      public/static/print.html
  8. 184 181
      public/static/tradeServicesPrint.html
  9. 167 35
      public/static/warehouseBatchPrint.html
  10. 2 2
      public/static/warehousePrint.html
  11. 178 34
      public/static/weightCheck.html
  12. 46 29
      public/static/weightCheckInOut.html
  13. 16 9
      public/static/weightCheckOut.html
  14. 1 0
      sockjs.min.js
  15. 14 1
      src/api/V2/contract/index.js
  16. 7 0
      src/api/V2/houseSelfCollect/index.js
  17. 2 2
      src/api/V2/notice/index.js
  18. 18 0
      src/api/V2/profitable/index.js
  19. 1 2
      src/api/V2/statisticalReport/index.js
  20. 3 1
      src/api/V2/transport/index.js
  21. 5 0
      src/api/V2/warehouse/index.js
  22. 8 5
      src/components/balanceAlert.vue
  23. 15 1
      src/lang/zh.js
  24. 21 15
      src/layout/index/top/index.vue
  25. 19 1
      src/model/contarct/index.js
  26. 10 1
      src/model/houseSelfCollect/index.js
  27. 31 0
      src/model/profitable/index.js
  28. 2 3
      src/model/statisticalReport/index.js
  29. 5 2
      src/model/transport/index.js
  30. 6 0
      src/model/warehouse/index.js
  31. 11 9
      src/views/contractManagement/collectionContractRecord.vue
  32. 31 1
      src/views/contractManagement/component/routers/route.js
  33. 132 41
      src/views/contractManagement/purchaseContract.vue
  34. 74 5
      src/views/contractManagement/purchaseContractAdd.vue
  35. 804 0
      src/views/contractManagement/purchaseContractCost.vue
  36. 65 79
      src/views/contractManagement/purchaseContractEdit.vue
  37. 129 40
      src/views/contractManagement/salesContract.vue
  38. 28 15
      src/views/contractManagement/salesContractAdd.vue
  39. 802 0
      src/views/contractManagement/salesContractCost.vue
  40. 65 36
      src/views/contractManagement/salesContractEdit.vue
  41. 14 0
      src/views/contractManagement/storageContractAdd.vue
  42. 115 97
      src/views/home/index.vue
  43. 0 1
      src/views/houseSelfCollect/component/inspectInfoPrint.vue
  44. 4 1
      src/views/houseSelfCollect/component/weightCheckPrint.vue
  45. 7 0
      src/views/houseSelfCollect/customerManagementAdd.vue
  46. 148 142
      src/views/houseSelfCollect/inspectInfo.vue
  47. 1 1
      src/views/houseSelfCollect/inspectionManagement.vue
  48. 246 56
      src/views/houseSelfCollect/paymentManagement.vue
  49. 238 13
      src/views/houseSelfCollect/weighingManagement.vue
  50. 2 2
      src/views/houseSelfCollect/weightCheck.vue
  51. 2 2
      src/views/outboundManagement/collectionManagement.vue
  52. 1147 1336
      src/views/platformAudit/purchaseContractAdd.vue
  53. 1116 1291
      src/views/platformAudit/purchaseContractEdit.vue
  54. 1154 1354
      src/views/platformAudit/salesContractAdd.vue
  55. 1104 1263
      src/views/platformAudit/salesContractEdit.vue
  56. 926 0
      src/views/platformaudit/driverAudit.vue
  57. 1428 0
      src/views/platformaudit/purchaseContractAdd.vue
  58. 1385 0
      src/views/platformaudit/purchaseContractEdit.vue
  59. 558 0
      src/views/platformaudit/purchaseContractExamine.vue
  60. 978 0
      src/views/platformaudit/salesContract.vue
  61. 1453 0
      src/views/platformaudit/salesContractAdd.vue
  62. 1443 0
      src/views/platformaudit/salesContractEdit.vue
  63. 733 0
      src/views/platformaudit/salesContractExamine.vue
  64. 64 0
      src/views/profitable/component/routers/route.js
  65. 706 0
      src/views/profitable/contractOtherMoney.vue
  66. 359 0
      src/views/profitable/earningsLook.vue
  67. 238 0
      src/views/profitable/inOutDetailed.vue
  68. 970 1017
      src/views/purchasingManagement/procurementPlanAdd.vue
  69. 940 1056
      src/views/purchasingManagement/procurementPlanEdit.vue
  70. 530 503
      src/views/purchasingManagement/procurementPlanLook.vue
  71. 1007 1134
      src/views/salesManagement/salesPlanAdd.vue
  72. 950 1005
      src/views/salesManagement/salesPlanEdit.vue
  73. 541 514
      src/views/salesManagement/salesPlanLook.vue
  74. 906 1188
      src/views/statisticalReport/autoSettlementList.vue
  75. 902 1071
      src/views/statisticalReport/huoyunList.vue
  76. 26 17
      src/views/statisticalReport/purchaseClosingCashierList.vue
  77. 19 12
      src/views/statisticalReport/purchaseReceiptStatisticsList.vue
  78. 649 808
      src/views/statisticalReport/salesClosingCashierList.vue
  79. 796 1026
      src/views/statisticalReport/salesDeliveryReportList.vue
  80. 1238 1378
      src/views/statisticalReport/shippingList.vue
  81. 784 994
      src/views/statisticalReport/stockPurchaseReceiptReportList.vue
  82. 301 169
      src/views/statisticalReport/stockSaleOutReportList.vue
  83. 176 176
      src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue
  84. 1058 1403
      src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue
  85. 483 628
      src/views/tradeServicesManagement/approveWarehouseReceipt.vue
  86. 39 45
      src/views/tradeServicesManagement/inOutRecord.vue
  87. 288 463
      src/views/tradeServicesManagement/reviewWarehouseReceipt.vue
  88. 44 23
      src/views/tradeServicesManagement/warehouseReceiptAdd.vue
  89. 199 260
      src/views/tradeServicesManagement/warehouseReceiptEdit.vue
  90. 168 283
      src/views/tradeServicesManagement/warehouseReceiptLook.vue
  91. 372 97
      src/views/tranManagement/tranManagementVehicleDispatching.vue
  92. 44 1
      src/views/tranManagement/tranManagementVehicleLook.vue
  93. 4 13
      src/views/warehouse/warehouseManagementDelete.vue
  94. 30 17
      src/views/warehouse/warehouseManagementDelivery.vue
  95. 89 56
      src/views/warehouse/warehouseManagementGross.vue
  96. 111 7
      src/views/warehouse/warehouseManagementNoWeight.vue
  97. 36 19
      src/views/warehouse/warehouseManagementNoWeightIn.vue
  98. 37 20
      src/views/warehouse/warehouseManagementNoWeightOut.vue
  99. 29 16
      src/views/warehouse/warehouseManagementPerfectDelivery.vue
  100. 1 1
      src/views/warehouse/warehouseManagementPerfectput.vue

Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
Sortable.min.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
axios.min.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 21 - 0
echarts.min.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
index.js


+ 35 - 25
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>
@@ -234,6 +239,10 @@
           <div>客户姓名:</div>
           <div>{{tableData.customerName}}</div>
         </div>
+        <div class="small-row">
+          <div>客户身份证:</div>
+          <div>{{tableData.customerNumberCard}}</div>
+        </div>
         <div class="small-row">
           <div>客户电话:</div>
           <div>{{tableData.customerPhone}}</div>
@@ -242,6 +251,10 @@
           <div>车牌号:</div>
           <div>{{tableData.carNumber}}</div>
         </div>
+        <div class="small-row">
+          <div>仓位号:</div>
+          <div>{{tableData.binNumber}}</div>
+        </div>
         <div class="small-row">
           <div>收货单位:</div>
           <div>{{tableData.compName}}</div>
@@ -285,7 +298,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 == '干粮'">
@@ -320,13 +333,10 @@
         <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({
@@ -336,7 +346,7 @@
         name: "",
         bigContent: false,
         smallContent: false,
-        printData :{},
+        printData: {},
       },
       computed: {},
       methods: {
@@ -378,7 +388,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)

+ 39 - 32
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;
@@ -292,7 +296,9 @@
                   <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">
@@ -416,14 +422,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>
@@ -533,13 +539,13 @@
                 </div>
                 <img :src="customerList1[index].imgURl.imageUrl1" class="avatar" />
               </div>
-              <div class="sfcard-content">
+         <!--     <div class="sfcard-content">
                 <div class="sfcard-title">
                   {{
                   printData1[index].customerName}}{{printData1[index].identityAuthenticationInfo.customerNumberCard}}
                 </div>
                 <img :src="customerList1[index].imgURl.imageUrl2" class="avatar" />
-              </div>
+              </div> -->
             </div>
             <div class="bankcard" v-if="isShowPrintType2">
 
@@ -549,12 +555,12 @@
                 </div>
                 <img :src="customerList1[index].imgURl.imageUrl3" class="avatar" />
               </div>
-              <div class="sfcard-content part2">
+    <!--          <div class="sfcard-content part2">
                 <div class="sfcard-title">
                   {{printData1[index].identityAuthenticationInfo.bankDeposit}}{{printData1[index].identityAuthenticationInfo.bankCard}}
                 </div>
                 <img :src="customerList1[index].imgURl.imageUrl4" class="avatar" />
-              </div>
+              </div> -->
             </div>
           </div>
         </div>
@@ -744,13 +750,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 +1070,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 +1080,7 @@
         isShowPrintType2: false,
         isShowPrintType3: false,
         isShowPrintType4: false,
-        isShowPrintType5:false,
+        isShowPrintType5: false,
         showType: [],
         printData: {},
         printData1: [],
@@ -1135,7 +1141,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
@@ -1199,10 +1206,10 @@
           let _lsit = this.showType.split(',')
           for (let i = 0; i < _lsit.length; i++) {
             switch (_lsit[i]) {
-              case '打印身份证(正反面)':
+              case '打印身份证':
                 this.isShowPrintType1 = !this.isShowPrintType1
                 break
-              case '打印银行卡(正反面)':
+              case '打印银行卡':
                 this.isShowPrintType2 = !this.isShowPrintType2
                 break
               case '打印结算凭证':
@@ -1211,9 +1218,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) {

+ 167 - 35
public/static/warehouseBatchPrint.html

@@ -5,24 +5,24 @@
     <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: 55px;
+        padding: 5px;
+        height: 37px;
+        box-sizing: border-box;
       }
 
       #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) ;
+        font-size: 18px;
+        height: calc(100vh - 7.5vh);
         top: 0;
         bottom: 0;
         left: 0;
@@ -43,19 +43,25 @@
       .bottom-row1 {
         display: flex;
         /* justify-content: space-between; */
-        margin-top: 5px 0;
+        margin-top: 10px;
       }
 
       .bottom-row2 {
         display: flex;
       }
+     .number {
+        text-align: right;
+        margin-bottom: 10px;
+        margin-top: 20px;
+      }
       .config {
         margin-top: 10px;
         margin-right: 240px;
       }
-      .autograph{
+
+      .autograph {
         margin-top: 10px;
-     }
+      }
 
       .title {
         text-align: center;
@@ -67,36 +73,71 @@
   </head>
   <body>
     <div id="app">
-      <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 class="content" v-for="(item,index) in tableData"  v-if="!isDDPrint||isEWPrint">
+        <!--        <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></div>
         <div v-if="item.inOutFlag == '2'" class="title">入库检斤单</div>
         <div v-else class="title">出库检斤单</div>
+        <div class="number">{{item.contractManagementInfo?item.contractManagementInfo.contractNo:''}}</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 col-bgc">出货单位</td>
+            <td class="col" colspan="">
+              {{item.contractManagementInfo?item.contractManagementInfo.seller:item.warehouseName}}
+              <!-- {{item.companyName}} -->
+            </td>
             <td class="col col-bgc">车牌号</td>
-            <td class="col" colspan="1">{{item.carNo}}</td>
+            <td class="col" colspan="">{{item.carNo}}</td>
             <td class="col col-bgc">货名</td>
-            <td class="col" colspan="1">{{item.goodsName}}</td>
+            <td class="col" colspan="3">{{item.goodsName}}</td>
           </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="">
+              <!-- {{item.contractManagementInfo?item.contractManagementInfo.buyer:item.receiveWarehouse}} -->
+              {{item.companyName}}
+            </td>
             <td class="col col-bgc">类型</td>
-            <td class="col"colspan="1">{{item.type}}</td>
+            <td class="col" colspan="">{{item.type}}</td>
+            <td class="col col-bgc">等级</td>
+            <td class="col"  colspan="3">{{item.qualityInspectionManagement?item.qualityInspectionManagement.grade:''}}</td>
+          </tr>
+          <tr class="row">
             <td class="col col-bgc">检斤时间</td>
-            <td class="col" colspan="1">{{item.updateDate}}</td>
+            <td class="col" colspan="">{{item.updateDate}}</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" colspan="3">{{item.qualityInspectionManagement?item.qualityInspectionManagement.jiaorenli:''}}</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.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" colspan="2">{{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="2">{{item.netWeight}}</td>
+            <td class="col col-bgc" colspan="">毛重(吨)</td>
+            <td class="col" colspan="">{{item.grossWeight}}</td>
+            <td class="col col-bgc" colspan="">皮重(吨)</td>
+            <td class="col" colspan="">{{item.tare}}</td>
+            <td class="col col-bgc" colspan="">扣重(吨)</td>
+            <td class="col" colspan="">{{item.deductionWeight ? item.deductionWeight : '0'}}</td>
+            <td class="col col-bgc" colspan="">净重(吨)</td>
+            <td class="col" colspan="">{{item.netWeight}}</td>
           </tr>
+
         </table>
         <div class="bottom">
           <div class="bottom-row1">
@@ -104,21 +145,102 @@
           </div>
           <div class="bottom-row2">
             <div class="config">收货单位签名或盖章:</div>
-            <div class="autograph">客户签名:</div>
+            <div class="config">客户签名:</div>
+            <div class="autograph">司机签名:</div>
+          </div>
+        </div>
+      </div>
+      <!-- 打印额外 -->
+      <div class="content" v-for="(item,index) in tableDataEW"  v-if="isDDPrint||isEWPrint">
+        <!--        <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></div>
+        <div v-if="item.inOutFlag == '2'" class="title">入库检斤单</div>
+        <div v-else class="title">出库检斤单</div>
+        <div class="number">{{item.contractManagementInfo?item.contractManagementInfo.contractNo:''}}</div>
+        <table class="table">
+          <tr class="row">
+            <td class="col col-bgc">出货单位</td>
+            <td class="col" colspan="">
+              <!-- {{item.contractManagementInfo?item.contractManagementInfo.seller:item.warehouseName}} -->
+              {{item.customer}}
+            </td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col" colspan="">{{item.carNo}}</td>
+            <td class="col col-bgc">货名</td>
+            <td class="col" colspan="3">{{item.goodsName}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">收货单位</td>
+            <td class="col" colspan="">
+              <!-- {{item.contractManagementInfo?item.contractManagementInfo.buyer:item.receiveWarehouse}} -->
+              {{item.companyName}}
+            </td>
+            <td class="col col-bgc">类型</td>
+            <td class="col" colspan="">{{item.type}}</td>
+            <td class="col col-bgc">等级</td>
+            <td class="col"  colspan="3">{{item.qualityInspectionManagement?item.qualityInspectionManagement.grade:''}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">检斤时间</td>
+            <td class="col" colspan="">{{item.updateDate}}</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" colspan="3">{{item.qualityInspectionManagement?item.qualityInspectionManagement.jiaorenli:''}}</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.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" colspan="">毛重(吨)</td>
+            <td class="col" colspan="">{{item.grossWeight}}</td>
+            <td class="col col-bgc" colspan="">皮重(吨)</td>
+            <td class="col" colspan="">{{item.tare}}</td>
+            <td class="col col-bgc" colspan="">扣重(吨)</td>
+            <td class="col" colspan="">{{item.deductionWeight ? item.deductionWeight : '0'}}</td>
+            <td class="col col-bgc" colspan="">净重(吨)</td>
+            <td class="col" colspan="">{{item.netWeight}}</td>
+          </tr>
+
+        </table>
+        <div class="bottom">
+          <div class="bottom-row1">
+            <div>检斤员:{{item.backOffice}}</div>
+          </div>
+          <div class="bottom-row2">
+            <div class="config">收货单位签名或盖章:</div>
+            <div class="config">客户签名:</div>
+            <div class="autograph">司机签名:</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: {
-        tableData: {
-        },
+        tableData: {},
+        tableDataEW: [],
         name: "",
+        isDDPrint :false,
+        isEWPrint:false,
       },
       computed: {},
       methods: {
@@ -147,14 +269,24 @@
         printSmall() {},
         printBig() {},
       },
-      mounted() {
+      mounted() {debugger
+        let _ew = decodeURIComponent(this.getQueryVariable("selectEW"))
+        let _ewdd = decodeURIComponent(this.getQueryVariable("selectEWDD"))
+        if(_ew== 'true'){
+           this.tableDataEW = JSON.parse(localStorage.getItem('ewWarehouseBatchPrint'))
+             this.isEWPrint = true
+        }
+        if(_ewdd== 'true'){
+           this.tableDataEW = JSON.parse(localStorage.getItem('ewWarehouseBatchPrint'))
+          this.isDDPrint = true
+        }
         this.tableData = JSON.parse(localStorage.getItem("warehouseBatchPrint"))
         console.log("打印数据", this.tableData)
         document.title = "粮食检斤单"
-        window.print()
-        window.onafterprint = function(event) {
-          window.history.back(-1)
-        };
+        // window.print()
+        // window.onafterprint = function(event) {
+        //   window.history.back(-1)
+        // };
       },
       watch: {}
     })

+ 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

+ 178 - 34
public/static/weightCheck.html

@@ -10,7 +10,10 @@
       table tr td {
         border: 2px solid #333333;
         padding: 5px 0;
-        height: 43px;
+        height: 37px;
+      }
+      body{
+        margin: 0;
       }
 
       #app {
@@ -22,7 +25,8 @@
         width: 1000px;
         padding: 30px 20px 20px 20px;
         font-size: 18px;
-        height: 660px;
+        height: 570px;
+         position: relative;
       }
 
       .a5-content {
@@ -50,12 +54,13 @@
         display: flex;
       }
 
-      img,.left{
+      img,
+      .left {
         width: 120px;
         height: 120px;
         position: absolute;
-        right: 20px;
-        top: 12px;
+           left: 12px;
+           top: 10px;
       }
 
       .config {
@@ -65,6 +70,7 @@
 
       .autograph {
         margin-top: 10px;
+        margin-right: 170px;
       }
 
       .bottom-row3 {
@@ -76,6 +82,7 @@
         font-size: 36px;
         font-weight: 500;
         position: relative;
+        /* margin-top: 47px; */
       }
 
       .number {
@@ -108,10 +115,12 @@
         justify-content: space-between;
         align-items: center;
       }
-       .numberNo{
-          font-size: 36px;
-          margin: auto;
-        }
+
+      .numberNo {
+        font-size: 36px;
+        margin: auto;
+      }
+
       .small-row {
         display: flex;
         justify-content: space-between;
@@ -125,18 +134,19 @@
       .sign {
         margin-right: 100px;
       }
-      .small-code{
+
+      .small-code {
         position: relative;
-        left:calc(50% - 55px)
+        left: calc(50% - 55px)
       }
     </style>
   </head>
   <body>
     <div id="app">
       <div v-if="selectPrint">
-        <div v-for="(item,index) in tableData1" :key="index">
+        <div v-for="(item,index) in tableData1" :key="index" v-if="!isDDPrint||isEWPrint">
           <div class="content" :class="pageType=='A5'?'a5-content':''">
-            <div class="title">{{item.compName}}</div>
+            <!-- <div class="title">{{item.compName}}</div> -->
             <div class="title">入库检斤单</div>
             <div class="left">
               <img :src="item.codeUrl" alt="">
@@ -165,27 +175,33 @@
                 <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">{{item.qualityInspectionManagement?item.qualityInspectionManagement.bulkDensity:''}}
+                </td>
                 <td class="col col-bgc">不完善粒(%)</td>
-                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.imperfectGrain:''}}</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">{{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>
+                <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">{{item.qualityInspectionManagement?item.qualityInspectionManagement.mildewGrain:''}}
+                </td>
                 <td class="col col-bgc">扣杂</td>
-                <td class="col">{{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
+                <td class="col">
+                  {{item.qualityInspectionManagement?item.qualityInspectionManagement.buckleMiscellaneous:''}}</td>
                 <td class="col " colspan="2"></td>
               </tr>
               <tr class="row">
@@ -219,6 +235,105 @@
               </div> -->
                 <div class="config">收货单位签名或盖章:</div>
                 <div class="autograph">客户签名:</div>
+                <div class="autograph">司机签名:</div>
+              </div>
+              <!-- <div class="bottom-row3">扫一扫</div> -->
+            </div>
+          </div>
+        </div>
+        <!-- 打印额外 -->
+        <div v-for="(item,index) in tableDataEW" :key="index" v-if="isDDPrint||isEWPrint">
+          <div class="content" :class="pageType=='A5'?'a5-content':''">
+            <!-- <div class="title">{{item.customer}}</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">客户姓名</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">车牌号</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>
@@ -257,27 +372,37 @@
               <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">
+                {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.bulkDensity:''}}</td>
               <td class="col col-bgc">不完善粒(%)</td>
-              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.imperfectGrain:''}}</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">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.grade:''}}
+              </td>
               <td class="col col-bgc">水分(%)</td>
-              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.waterContent:''}}</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">
+                {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.jiaorenli:''}}</td>
               <td class="col col-bgc">质检时间</td>
-              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.qualityDate:''}}</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">
+                {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.impurity:''}}</td>
               <td class="col col-bgc">霉变粒(%)</td>
-              <td class="col">{{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.mildewGrain:''}}</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">
+                {{tableData.qualityInspectionManagement?tableData.qualityInspectionManagement.buckleMiscellaneous:''}}
+              </td>
               <td class="col " colspan="2"></td>
             </tr>
             <tr class="row">
@@ -311,6 +436,7 @@
               </div> -->
               <div class="config">收货单位签名或盖章:</div>
               <div class="autograph">客户签名:</div>
+              <div class="autograph">司机签名:</div>
             </div>
             <!-- <div class="bottom-row3">扫一扫</div> -->
           </div>
@@ -319,7 +445,7 @@
 
       <div class="small-content" v-if="smallContent">
         <div class="small-title">
-          <div  class="numberNo">{{tableData.number.substring(tableData.number.length - 3)}}</div>
+          <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">
@@ -331,6 +457,10 @@
           <div>客户姓名</div>
           <div>{{tableData.customer}}</div>
         </div>
+        <div class="small-row">
+          <div>客户身份证:</div>
+          <div>{{tableData.customerNumberCard}}</div>
+        </div>
         <div class="small-row">
           <div>客户电话</div>
           <div>{{tableData.customerPhone}}</div>
@@ -339,6 +469,10 @@
           <div>车牌号</div>
           <div>{{tableData.carNumber}}</div>
         </div>
+        <div class="small-row">
+          <div>仓位号:</div>
+          <div>{{tableData.binNumber}}</div>
+        </div>
         <div class="small-row">
           <div>收货单位</div>
           <div>{{tableData.compName}}</div>
@@ -387,13 +521,10 @@
         <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({
@@ -403,11 +534,14 @@
           // qualityInspectionManagement:{}
         },
         tableData1: [],
+        tableDataEW: [],
         selectPrint: false,
         name: "",
         bigContent: false,
         smallContent: false,
-        pageType: ''
+        pageType: '',
+        isDDPrint:false,
+         isEWPrint:false,
       },
       computed: {},
       methods: {
@@ -439,6 +573,8 @@
       mounted() {
         let _data = decodeURIComponent(this.getQueryVariable("tableData"))
         let _type = decodeURIComponent(this.getQueryVariable("type"))
+        let _ew = decodeURIComponent(this.getQueryVariable("selectEW"))
+        let _ewdd = decodeURIComponent(this.getQueryVariable("selectEWDD"))
         this.pageType = decodeURIComponent(this.getQueryVariable("radioType"))
         if (_type == 2) {
           this.bigContent = true
@@ -450,6 +586,14 @@
         if (_data == 'false') {
           this.selectPrint = true;
           this.tableData1 = JSON.parse(localStorage.getItem('selectPrint_jjSelectPrintList'))
+          if(_ew== 'true'){
+             this.tableDataEW = JSON.parse(localStorage.getItem('selectPrint_EWjjSelectPrintList'))
+               this.isEWPrint = true
+          }
+          if(_ewdd== 'true'){
+             this.tableDataEW = JSON.parse(localStorage.getItem('selectPrint_EWjjSelectPrintList'))
+            this.isDDPrint = true
+          }
         } else {
           this.tableData = JSON.parse(_data)
           console.log(this.tableData)

+ 46 - 29
public/static/weightCheckInOut.html

@@ -47,7 +47,7 @@
       }
 
       .bottom-row2 {
-        display: flex;
+        display: flex;margin-top: 5px 0;
       }
 
       img {
@@ -58,11 +58,16 @@
 
       .config {
         margin-top: 10px;
-        margin-right: 240px;
       }
-      .autograph{
-    margin-top: 10px;
-     }
+
+      .autograph {
+        margin-top: 10px;
+        margin-left: 180px;
+      }
+      .autograph1 {
+        margin-top: 10px;
+        margin-left: 200px;
+      }
       .bottom-row3 {
         margin: 10px 0;
       }
@@ -79,7 +84,6 @@
         margin-bottom: 10px;
         margin-top: 20px;
       }
-
       .small-row {
         display: flex;
       }
@@ -115,7 +119,8 @@
       .small-img {
         margin-right: 0;
       }
-      .sign{
+
+      .sign {
         margin-right: 100px;
       }
     </style>
@@ -123,14 +128,17 @@
   <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>
+        <div class="number">{{tableData.contractManagementInfo?tableData.contractManagementInfo.contractNo:''}}</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 col-bgc">出货单位</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,42 +146,50 @@
           </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 col-bgc" colspan="2">毛重(吨)</td>
             <td class="col" colspan="2">{{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 col-bgc" colspan="2">皮重(吨)</td>
+            <td class="col" colspan="3">{{tableData.tare}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc" colspan="2">扣重(吨)</td>
+            <td class="col"colspan="2" >{{tableData.deductionWeight ? tableData.deductionWeight : '0'}}</td>
+            <td class="col col-bgc" colspan="2">净重(吨)</td>
+            <td class="col" colspan="3">{{tableData.netWeight}}</td>
           </tr>
         </table>
         <div class="bottom">
           <div class="bottom-row1">
-            <div>检斤员:{{tableData.backOffice}}</div>
+            <div class="config" >检斤员:{{tableData.backOffice}}</div>
           </div>
           <div class="bottom-row2">
             <div class="config">收货单位签名或盖章:</div>
             <div class="autograph">客户签名:</div>
+            <div class="autograph">司机签名:</div>
           </div>
+          <!-- <div v-if='tableData.inOutType!="移库入库"&&tableData.inOutType!="移库出库"' class="bottom-row2">
+            <div style='color:transparent;' class="config">收货单位签名或盖章:</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: {
-        tableData: {
-          // qualityInspectionManagement:{}
-        },
+        tableData: {},
         name: "",
         bigContent: false,
         smallContent: false
@@ -206,9 +222,12 @@
         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'))
+        console.log(_data)
+        let _type = this.getQueryVariable("type")
         if (_type == 2) {
           this.bigContent = true
           this.smallContent = false
@@ -216,9 +235,7 @@
           this.smallContent = true
           this.bigContent = false
         }
-        console.log(_data,"sddsd")
-        this.tableData = JSON.parse(_data)
-        console.log(this.tableData)
+        this.tableData = _data
         document.title = "粮食检斤单"
         window.print()
         window.onafterprint = function(event) {

+ 16 - 9
public/static/weightCheckOut.html

@@ -162,10 +162,12 @@
             <td class="col col-bgc" v-if='tableData.outType=="集装箱船"||tableData.outType=="汽运"'>箱号</td>
             <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>
+            <td class="col" colspan="2" v-if='(tableData.outType=="集装箱船"||tableData.outType=="汽运"'>
+              {{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>
@@ -174,11 +176,15 @@
             <div class="config">收货单位签名或盖章:</div>
             <div class="autograph">客户签名:</div>
           </div>
+          <div v-if='tableData.inOutType!="移库出库"' class="bottom-row2">
+            <div style='width:220px;' class="config"></div>
+            <div class="autograph">司机签名:</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({
@@ -219,9 +225,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 +237,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)
         };

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
sockjs.min.js


+ 14 - 1
src/api/V2/contract/index.js

@@ -99,4 +99,17 @@ export const API_GET_FEERECORD = '/storageFeeRecordCharge/feeRecord'
 export const API_POST_STOP = '/storageFeeRecord/editInfo'
 
 // 代储费导出
-export const API_POST_STORAGEFEERECORDEXPORT = '/storageFeeRecord/export'
+
+export const API_POST_STORAGEFEERECORDEXPORT = '/storageFeeRecord/export'
+// 合同费用列表
+export const API_CONTRACTCOST = '/contractCostInfo/selectInfo'
+// 合同编号
+export const API_GET_CONTRACT ='/warehouseBaseInfo/selectContractNoList'
+// 请款收款
+export const API_ADD_CONTRACT ='/contractCostInfo/api/addInfo'
+// 编辑请款收款
+export const API_EDIT_CONTRACT ='/contractCostInfo/editInfo'
+// 删除请款收款
+export const API_DELETE_CONTRACT ='/contractCostInfo/deleteInfo'
+// 付款
+export const API_PAYMENT ='/contractCostInfo/payment'

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

@@ -56,6 +56,8 @@ export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWe
 export const API_POST_WEIGHTCHECK_TARE= '/weighingManagement/api/editTare'
 //毛重检斤保存
 export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
+//检斤管理删除
+export const API_POST_INSPECT_GETWEIGHTDELETE = '/weighingManagement/api/deleteWeightcheck'
 //付款查看
 export const API_GET_PAYMENT = '/paymentManagement/getInfo'
 // 付款结算
@@ -97,3 +99,8 @@ 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_POST_SUSPENDINSTANCE ='/api/suspendInstance'
+export const API_POST_SUSPENDINSTANCE ='/paymentManagement/api/ReSettlement'
+//导入
+export const API_POST_IMPORT ='/qualityInspectionManagement/api/importQuality'

+ 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`

+ 18 - 0
src/api/V2/profitable/index.js

@@ -0,0 +1,18 @@
+//收支明细
+export const API_GET_INOUTDETAILED = '/reveExpeInfo/selectReveExpe'
+//合同外费用
+export const API_GET_OUTMONEY = '/nonContractExpenses/selectInfo'
+//请款
+export const API_POST_PLEASEMONEY = '/nonContractExpenses/api/addInfo'
+//付款
+export const API_POST_PAYMENT = '/nonContractExpenses/payment'
+//删除
+export const API_POST_DELDATA = '/nonContractExpenses/deleteInfo'
+//编辑
+export const API_POST_EDITINFO = '/nonContractExpenses/editInfo'
+//查看
+export const API_GET_LOOKINFO = '/nonContractExpenses/getInfo'
+//审核
+export const API_POST_WORKFLOW_API_HANDLE = '/workflow/api/handle'
+//审核记录
+export const API_POST_AUDITRECORD = '/billOperateHis/query/commonBillOperateHis'

+ 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'
 // 导入

+ 5 - 0
src/api/V2/warehouse/index.js

@@ -104,3 +104,8 @@ export const API_GET_WAREHOUSE_RESPONSIBLE = '/staff/query/getPost'
 export const API_POST_WAREHOUSE_INWEIGHT = '/warehouseInOutInfo/updateStockQuantity'
 //查看全部仓库
 export const API_GET_WAREHOUSE_ALL = '/warehouseBaseInfo/allWarehouse'
+//退回
+export const API_SEND_BACK ='/warehouseInOutInfo/returnWarehouse'
+//删除
+export const API_DELETE_WAREHOUSE ='/warehouseInOutInfo/api/deleteWarehouse'
+

+ 8 - 5
src/components/balanceAlert.vue

@@ -58,7 +58,9 @@ export default {
           const port = await navigator.serial.requestPort()
           if (this.deptBudgetList.warehouseName == '白城内陆港'||this.deptBudgetList.warehouseName == '肇东金信库') {
             this.param = 1200
-          } else {
+          } else if(this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库') {
+            this.param = 2400
+          }else {
             this.param = 9600
           }
           console.log(this.param)
@@ -76,7 +78,7 @@ export default {
         // 监听来自串行设备的数据
         while (true) {
           const { value, done } = await this.reader.read()
-          // console.log("value",value);
+          // console.log('value',value);
           if (done) {
             // 允许稍后关闭串口。
             this.reader.releaseLock()
@@ -107,7 +109,7 @@ export default {
           //   }
           // }
           
-          if(value.length > 3){
+          if(value.length > 3 ){
              if(value.length <= 6){
               continue
              }
@@ -119,7 +121,7 @@ export default {
             }
             console.log('value23:', value)
           }
-          else if(this.deptBudgetList.warehouseName == '白城内陆港'){
+          else if(this.deptBudgetList.warehouseName == '白城内陆港' ||this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'){
             console.log('value:', value)
             var start = (new Date()).getTime();
             while((new Date()).getTime() - start < 400) {
@@ -135,7 +137,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])

+ 15 - 1
src/lang/zh.js

@@ -495,19 +495,22 @@ export default {
     purchaseContract: '现货采购合同',
     collectionContract: '代收合同',
     purchaseContractAdd: '现货采购合同  /  添加',
+    purchaseContractcost:'现货采购合同  /  费用',
     collectionContractAdd: '代收合同  /  添加',
     purchaseContractEdit: '现货采购合同  /  编辑',
     collectionContractEdit: '代收合同  /  编辑',
     collectionContractExamine:'代收合同  /  查看',
     collectionContractRecord:'代收合同  /  记录',
-    storageContract: '代储合同',
+    storageContract:'代储合同',
     storageContractAdd: '代储合同  /  添加',
     storageContractEdit: '代储合同  /  编辑',
     storageContractExamine: '代储合同  /  查看',
     storageContractRecord:'代储合同  /  代储费',
+    storageContractRecord:'代储合同  /  记录',
     purchaseContractExamine: '现货采购合同  /  查看',
     salesContract: '现货销售合同',
     salesContractEdit: '现货销售合同  /  编辑',
+    salesContractcost: '现货销售合同  /  费用',
     salesContractExamine: '现货销售合同  /  查看',
     salesContractAudit: '现货销售合同  /  审核',
     salesContractAdd: '现货销售合同  /  添加',
@@ -1059,6 +1062,11 @@ export default {
     settlement: '结算',
     inspectInfo: '质检信息',
     weightCheck: '检斤',
+    //利润核算
+    profitable:'利润核算',
+    contractOtherMoney: '合同外费用',
+    earningsLook: '盈收概览',
+    inOutDetailed: '收支明细',
 
     //出库管理
     outboundManagement: '出库管理',
@@ -7491,6 +7499,12 @@ export default {
     qualityInspectionManagement: '质检管理',
     qualityInspection: '质检信息',
     collectionManagement: '收款管理',
+  },
+  //利润核算
+  profitable: {
+    contractOtherMoney: '合同外费用',
+    earningsLook: '盈收概览',
+    inOutDetailed: '收支明细',
   }
 
 }

+ 21 - 15
src/layout/index/top/index.vue

@@ -29,22 +29,23 @@
         <el-dialog title="扫描二维码" :visible.sync="smAlert"  :before-close="cancel">
           <div class="btn-list">
             <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`"
-                v-if="btnStatus.status1||btnStatus.status2" @click="goToPage(1)" class="btn_css">去初检
+                v-if="btnStatus.status1" @click="goToPage(1)" class="btn_css">去初检
               </el-button>
               <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.con`"
-                v-if="btnStatus.status3||btnStatus.status4" v-show="toPageData.qualityInspectionManagement.confirm != '1'"  @click="goToPage(2)" class="btn_css">去确认质检
+                v-if="btnStatus.status2" v-show="toPageData.qualityInspectionManagement.confirm != '1'"  @click="goToPage(2)" class="btn_css">去确认质检
               </el-button>
               <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.again`"
-                v-if="btnStatus.status1||btnStatus.status2||btnStatus.status3||btnStatus.status4" v-show="toPageData.qualityInspectionManagement.confirm != '1'" @click="goToPage(3)" class="btn_css">去复检
+                v-if="btnStatus.status3" v-show="toPageData.qualityInspectionManagement.confirm != '1'" @click="goToPage(3)" class="btn_css">去复检
               </el-button>
               <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`"
-                v-if="btnStatus.status1||btnStatus.status2||btnStatus.status3" @click="goToPage(4)" class="btn_css">去称毛重
+                v-if="btnStatus.status4" @click="goToPage(4)" class="btn_css" >去称毛重
               </el-button>
-              <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.status5" @click="goToPage(6)" class="btn_css">去称皮重
               </el-button>
+              <el-button v-hasPermission="`acquisitionManagement.acquisitionPay.add`" v-if="btnStatus.status6"
+                @click="goToPage(5)" class="btn_css">去结算</el-button>
               <el-button @click="cancel" class="btn" >关闭</el-button>
           </div>
         </el-dialog>
@@ -409,7 +410,7 @@
         //  this.barCode = ''
         //判断当前账号公司是否是二维码上公司
         if (this.userINfo.userCompany != _userCompId) {
-          console.log("请切换公司在试!")
+          console.log('请切换公司在试!')
           this.$message.error('当前身份不可操作');
            this.barCode = ''
           return
@@ -556,7 +557,7 @@
                   //扫码枪扫码后显示弹框
                    this.getQRCodeData(this.tmp)
               }else{
-                console.log("你没有该权限,不可操作")
+                console.log('你没有该权限,不可操作')
                  this.$message.error('当前身份不可操作');
                  this.barCode = ''
                  return
@@ -580,15 +581,20 @@
             let _status3 = response.paymentManagement?response.paymentManagement.status:''
             if (_status2 == '已初检' && _status1 == '已质检') {
               this.btnStatus.status1 = true
-            } else if (_status2 == '已初检' && (_status1 == '已称毛重' || _status1 == '已质检')) {
+            } 
+            if ((_status1 == '已称毛重' || _status1 == '已质检')) {
               this.btnStatus.status2 = true
-            } else if (_status2 == '已复检' && (_status1 == '已称毛重' || _status1 == '已质检')) {
+            } 
+            if (this.toPageData.qualityInspectionManagement.confirm != '1' && (_status1 == '已称毛重' || _status1 == '已质检')) {
               this.btnStatus.status3 = true
-            } else if (_status2 == '已复检' && this.toPageData.qualityInspectionManagement.confirm != '1' && (_status1 == '已称皮重' || _status1 == '已质检')) {
+            } 
+            if (  (_status1 == '已称毛重' || _status1 == '已质检')) {
               this.btnStatus.status4 = true
-            } else if (_status2 == '已复检' && _status1 == '已称皮重' && _status3 == '待结算') {
+            } 
+            if ( this.toPageData.qualityInspectionManagement.confirm != '0' &&  (_status1 == '已称毛重' || _status1 == '已称皮重') && _status3 == '') {
               this.btnStatus.status5 = true
-            } else if (_status3 == '已结算') {
+            } 
+            if ( this.toPageData.qualityInspectionManagement.confirm != '0' &&   _status1 == '已称皮重' && _status3 == '待结算')  {
               this.btnStatus.status6 = true
             }
             if (_status3 == '已结算') {
@@ -610,7 +616,7 @@
         this.isOpenCodeGun = true
       },
       blur(e) {
-         e.target.setAttribute("readonly", 'true');
+         e.target.setAttribute('readonly', 'true');
 
         console.log('当前已失去焦点状态')
         this.isOpenCodeGun = false

+ 19 - 1
src/model/contarct/index.js

@@ -42,7 +42,13 @@ import {
     API_POST_STORAGEFEERECORDCHARGE,
     API_GET_FEERECORD,
     API_POST_STOP,
-    API_POST_STORAGEFEERECORDEXPORT
+    API_POST_STORAGEFEERECORDEXPORT,
+    API_CONTRACTCOST,
+    API_GET_CONTRACT,
+    API_ADD_CONTRACT,
+    API_EDIT_CONTRACT,
+    API_DELETE_CONTRACT,
+    API_PAYMENT
 } from '@/api/V2/contract'
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
@@ -144,3 +150,15 @@ export const stopStorageFeeRecord = appRx.post(API_POST_STOP, errorCatcher, erro
 
 // 代储费导出
 export const exportStorageFee = appRx.post(API_POST_STORAGEFEERECORDEXPORT)
+// 合同费用列表
+export const contractcost = appRx.get(API_CONTRACTCOST, errorCatcher, errorHandle, filter)
+// 合同编号
+export const getcontract = appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
+// 请款收款
+export const addcontractcost = appRx.post(API_ADD_CONTRACT, errorCatcher, errorHandle, filter)
+// 编辑请款收款
+export const editcontractcost = appRx.post(API_EDIT_CONTRACT, errorCatcher, errorHandle, filter)
+// 删除请款收款
+export const delcontractcost = appRx.post(API_DELETE_CONTRACT, errorCatcher, errorHandle, filter)
+// 付款
+export const payment = appRx.post(API_PAYMENT, errorCatcher, errorHandle, filter)

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

@@ -50,7 +50,10 @@ import {
   API_GAT_QRCODE,
   API_GAT_GETQRCODE,
   API_GAT_INFO,
-  API_POST_WORKFLOW_TASK
+  API_POST_WORKFLOW_TASK,
+  API_POST_INSPECT_GETWEIGHTDELETE,
+  API_POST_SUSPENDINSTANCE,
+  API_POST_IMPORT
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -110,6 +113,8 @@ export const getweighingList = appRx.get(API_GET_WEIGHTCHECK_GETWEIGHINGLIST, er
 export const tare = appRx.post(API_POST_WEIGHTCHECK_TARE, errorCatcher, errorHandle, filter)
 //毛重检斤保存
 export const grossWeight = appRx.post(API_POST_WEIGHTCHECK_GROSSWEIGHT, errorCatcher, errorHandle, filter)
+//检斤删除
+export const getweighingDelete = appRx.post(API_POST_INSPECT_GETWEIGHTDELETE, errorCatcher, errorHandle, filter)
 //付款信息查看
 export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorHandle, filter)
 //付款信息结算
@@ -152,3 +157,7 @@ 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 suspendinstance = appRx.post(API_POST_SUSPENDINSTANCE, errorCatcher, errorHandle, filter)
+// 导入
+export const importWord = appRx.post(API_POST_IMPORT, errorCatcher, errorHandle, filter)

+ 31 - 0
src/model/profitable/index.js

@@ -0,0 +1,31 @@
+import { errorCatcher, errorHandle, filter } from 'base-core-lib'
+import { appRx } from '../defalutConfig/indexRx'
+import {
+  API_GET_INOUTDETAILED,
+  API_GET_OUTMONEY,
+  API_POST_PLEASEMONEY,
+  API_POST_PAYMENT,
+  API_POST_DELDATA,
+  API_GET_LOOKINFO, 
+  API_POST_EDITINFO,
+  API_POST_WORKFLOW_API_HANDLE,
+  API_POST_AUDITRECORD,
+} from '@/api/V2/profitable'
+//收支明细列表
+export const getInOutDetailed = appRx.get(API_GET_INOUTDETAILED, errorCatcher, errorHandle, filter)
+//合同外费用列表
+export const getOutMoney = appRx.get(API_GET_OUTMONEY, errorCatcher, errorHandle, filter)
+//请款
+export const requestFunds = appRx.post(API_POST_PLEASEMONEY, errorCatcher, errorHandle, filter)
+//付款
+export const payment = appRx.post(API_POST_PAYMENT, errorCatcher, errorHandle, filter)
+//付款
+export const deleteInfo = appRx.post(API_POST_DELDATA, errorCatcher, errorHandle, filter)
+//编辑
+export const editInfo = appRx.post(API_POST_EDITINFO, errorCatcher, errorHandle, filter)
+//查看
+export const getLookInfo = appRx.get(API_GET_LOOKINFO, errorCatcher, errorHandle, filter)
+// 审核
+export const woekflowhandle = appRx.post(API_POST_WORKFLOW_API_HANDLE, errorCatcher, errorHandle, filter)
+// 审核记录
+export const getAuditRecord = appRx.get(API_POST_AUDITRECORD, 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)
 // 导入

+ 6 - 0
src/model/warehouse/index.js

@@ -52,6 +52,8 @@ import {
     API_GET_WAREHOUSE_RESPONSIBLE,
     API_POST_WAREHOUSE_INWEIGHT,
     API_GET_WAREHOUSE_ALL
+    API_SEND_BACK,
+    API_DELETE_WAREHOUSE
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
 // 列表
@@ -155,4 +157,8 @@ export const  getResponsible = appRx.get(API_GET_WAREHOUSE_RESPONSIBLE, errorHan
 export const  postInWeight = appRx.post(API_POST_WAREHOUSE_INWEIGHT, errorHandle, filter)
 //查看全部仓库
 export const  getWarehouseAll = appRx.get(API_GET_WAREHOUSE_ALL, errorHandle, filter)
+//退回
+export const sendback = appRx.post(API_SEND_BACK,errorCatcher, errorHandle, filter)
+//删除
+export const postdeletewarehouse = appRx.post(API_DELETE_WAREHOUSE,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 {

+ 31 - 1
src/views/contractManagement/component/routers/route.js

@@ -26,6 +26,21 @@ const contractManagementRouter = {
         keepAlive: true
       }
     },
+    // 现货采购合同费用
+    {
+            path: 'buyContractcost',
+            component: () =>
+              import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/purchaseContractCost'),
+            name: 'buyContractcost',
+            meta: {
+              title: 'purchaseContractcost',
+              shortcutEntrance: 'contractManagement',
+              module: 'contractManagement.buyContract',
+              permissicon: [],
+              keepAlive: true
+            },
+            hidden: true
+    },
     //现货采购合同查看
     {
       path: 'purchaseContractExamine',
@@ -137,7 +152,22 @@ const contractManagementRouter = {
       },
       hidden: true
     },
-
+     //现货销售合同费用
+     {
+        path: 'salesContractcost',
+        component: () =>
+          import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/salesContractCost'),
+        name: 'salesContractcost',
+       meta: {
+         title: 'salesContractcost',
+         shortcutEntrance: 'contractManagement',
+         module: 'contractManagement.salesContract',
+         permissicon: [],
+         keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+       hidden: true
+    },
     //现货销售合同
     {
       path: 'salesContract',

+ 132 - 41
src/views/contractManagement/purchaseContract.vue

@@ -59,62 +59,89 @@
         </template>
       </el-table-column> -->
       <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
-      <el-table-column prop="unitContractPrice" label="合同单价(元)">
+      <el-table-column width='130' 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="completedQuantity" label="已完成(吨)">
+      <el-table-column width='120' prop="completedQuantity" label="已完成(吨)">
         <template slot-scope="scope">
           <span style="color: #5473e8; font-weight: 600">{{
             scope.row.completedQuantity
           }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="status" label="状态">
+      <el-table-column width='150' prop="status" label="状态">
         <template slot-scope="scope">
-          <span v-if="scope.row.approveStatus">{{
-            scope.row.approveStatus
-          }}</span>
-          <el-popover v-else 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 v-if="scope.row.status != '执行中'&&scope.row.status != '发运结束'">
+            <!-- <span v-if="scope.row.approveStatus">{{
+              scope.row.approveStatus
+            }}</span> -->
+            <el-select v-if="scope.row.approveStatus" v-model="scope.row.approveStatus" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'
+            disabled
+            :value="scope.row.approveStatus">
+            <el-option label="待决策人审核" value="待决策人审核"
+              style="color: #8890b1" />
+          </el-select>
+          <el-select v-else v-model="scope.row.status" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'
+
+            :value="scope.row.status">
+            <el-option label="待执行" value="待执行"
+              style="color: #8890b1" />
+              <el-option label="执行中" value="执行中"
+              style="color: #8890b1" />
+          </el-select>
+            <!-- <el-popover v-else 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>
-            </div>
-          </el-popover>
-          <img v-if="!scope.row.approveStatus" 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> -->
+            </el-popover>
+            <img v-if="!scope.row.approveStatus" width="17" height="18"
+              style="vertical-align: text-top; position: relative; top: -1px;" src="../../../public/img/edit.png"
+              @click="editClick(scope.row)" alt="" /> -->
+          </div>
+          <div v-else>
+            <!-- {{scope.row.status}} -->
+            <el-select v-model="scope.row.status" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'
+            :value="scope.row.status"
+          >
+            <el-option v-for="item in statusList" :key="item.value" :label="item.value" :value="item.value"
+              style="color: #8890b1" />
+          </el-select>
+          </div>
         </template>
       </el-table-column>
-      <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
-      <el-table-column prop="contractExpenditure" label="合同支出"> </el-table-column>
-      <el-table-column prop="expenses" label="费用支出"> </el-table-column>
+      <el-table-column width='120' prop="signingDate" label="签订日期"> </el-table-column>
+      <el-table-column width='120' prop="contractExpenditure" label="合同支出"> </el-table-column>
+      <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
       
-      <el-table-column prop="mildewGrain" label="已付款(元)">
+      <el-table-column width='130' prop="mildewGrain" label="已付款(元)">
       </el-table-column>
       <el-table-column prop="amountEdPayable" label="已付运费"> </el-table-column>
-      <el-table-column prop="goodsNames" label="已开发票 (元)">
+      <el-table-column width='130' prop="goodsNames" label="已开发票 (元)">
       </el-table-column>
       <el-table-column prop="addressUrl" label="附件">
         <template slot-scope="scope">
@@ -129,8 +156,18 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="140">
+      <el-table-column prop="address" label="操作" width="160">
         <template slot-scope="scope">
+           <img width="16" height="17" style="
+                vertical-align: text-top;
+                position: relative;
+                top: -1px;
+                margin: 0 6px;
+              "  src="../../../public/img/daichu.png"
+               v-hasPermission="
+              `contractManagement.nonContract.nonContractInfo.view`"
+             @click="handlecost(scope.row)" alt="" />
+             
           <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`
@@ -156,7 +193,7 @@
         </template>
       </el-table-column>
     </el-table>
-    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+    <el-pagination  :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
       :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
     </el-pagination>
 
@@ -175,6 +212,7 @@
     billoperatehis,
     deletecontract,
     editInfo,
+    
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -210,6 +248,9 @@
         // 表格显示数据
         tableDate: [],
         size: 10,
+        statusList:[{
+          value:'已完成',
+        },{value:'发运结束',}],
         // 是否显示
         showType: true,
         // 年
@@ -315,6 +356,17 @@
       this.showType = this.isShow
     },
     methods: {
+      handlecost(row){
+         this.$router.push({
+          name: 'buyContractcost',
+          query: {
+            id: row.id,
+            contractNo: row.contractNo,
+            status:row.status,
+            seller:row.seller
+          },
+        })
+      },
       onChange() {
         this.$refs.upload
           .handleSaveBill()
@@ -361,6 +413,37 @@
       handleClose() {
         this.dialogViewSpareMoney = false
       },
+      selectstatuschange(e,row){
+        var data={}
+        if(e=='发运结束'){
+          data={id: row.id,endFlag:1}
+        }else{
+          data={id: row.id}
+        }
+        this.$confirm(`是否将状态改为${e}`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editstatus(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            row.status=row.currectstatus
+            return false
+          })
+      },
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)
         this.pageSize = val
@@ -387,6 +470,9 @@
           .toPromise()
           .then((response) => {
             for (var i = 0; i < response.records.length; i++) {
+              if(response.records[i].status){
+                response.records[i].currectstatus=response.records[i].status
+              }
               if (response.records[i].completedQuantity) {
                 response.records[i].completedQuantity = response.records[i].completedQuantity.toFixed(3)
               }
@@ -429,7 +515,7 @@
         var status = ''
         if (row.status == '待执行' || row.status == '已完成') {
           status = '执行中'
-        } else if (row.status == '执行中') {
+        } else if (row.status == '执行中'||row.status == '发运结束') {
           status = '已完成'
         }
         this.$confirm(`是否将状态改为${status}`, '提示', {
@@ -454,6 +540,7 @@
               })
           })
           .catch(() => {
+
             return false
           })
       },
@@ -929,4 +1016,8 @@
   /deep/.typeselect .el-input__inner {
     color: #8890b1;
   }
+  /deep/.statusselect .el-input__inner {
+    color: #8890b1;
+    width:100%;
+  }
 </style>

+ 74 - 5
src/views/contractManagement/purchaseContractAdd.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="container">
     <el-row>
-      <el-col :span="12">
+      <el-col :span="12"  class="bg">
         <h2 class="bg-left title">创建采购合同</h2>
       </el-col>
-      <el-col :span="12" class="bg-right">
+      <el-col :span="12" class="bg-right bg">
         <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>
@@ -13,9 +13,22 @@
     <ws-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList">
       <div class="remark">
         <h3>基本信息</h3>
+        <el-row>
+        <el-col :span="12">
         <p style="color: #8890b1">
           注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>” 标记的条目提交后不可修改。
         </p>
+        </el-col>
+      <el-col :span="12" style='text-align:right;'>
+        <el-select v-model="contractNo" placeholder="请选择要复制的合同" class="typeselect" filterable clearable
+              @change="copySelect">
+              <el-option v-for="(item,index) in outContractNo" :key="'hetong'+index" :label="item.contractNo"
+                :value="item.contractNo" />
+            </el-select>
+            <el-button class="bg-bottom" type="primary" size="small" @click="cancelcopy()">取消复制
+       </el-button>
+         </el-col>
+    </el-row>
       </div>
       <ws-info-table>
         <!--合同类型-->
@@ -395,10 +408,11 @@
     delxiala,
     getstafffind,
     getRelationContractNo,
-    getcustomerinfo
+    getcustomerinfo,
+    examineList
   } from '@/model/contarct/index'
   import {
-    getstaff,
+    getstaff,xialaNo,
   } from '@/model/warehouse/index'
   import {
     regionData,
@@ -437,6 +451,8 @@ import { isUndefined } from 'xe-utils/methods'
         customerinfo:[],
         type: '',
         dialogVisible: false,
+        contractNo:'',
+        outContractNo:[],
         //弹出框
         dialogViewSpareMoney: false,
         dialogApproveFormVisible: false,
@@ -569,6 +585,50 @@ import { isUndefined } from 'xe-utils/methods'
       if (!this.restaurants4) this.restaurants4 = [];
     },
     methods: {
+      copySelect(e){
+        for (let i = 0; i < this.outContractNo.length; i++) {
+          if(this.outContractNo[i].contractNo==e){
+            examineList({
+            id: this.outContractNo[i].id
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList = response
+            if(this.deptBudgetList.personPhone){
+              this.deptBudgetList.personPhone=this.deptBudgetList.personPhone.split(',')
+            }
+            
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方自提'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方送货'
+            }
+          })
+          }
+          
+        }
+      },
+      cancelcopy(){
+        this.contractNo=''
+        this.deptBudgetList={
+          deliverType: '1',
+          sourceGoods:'',
+          placeDelivery:'',
+          agreementType: '采购合同',
+          addressUrl: '',
+          sellerPhone:'',
+          personPhone:'',
+          personCharge:'',
+          personChargeKey:'',
+          finalTradingVolume: 0,
+          totalContractPrice: 0,
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          contractProcessInfo: {},
+          settlementWeightMethod: '1',
+        }
+      },
       selectpriceType(e) {
         if (e == '随行就市') {
           this.deptBudgetList.deliverType = '1'
@@ -758,6 +818,15 @@ import { isUndefined } from 'xe-utils/methods'
         })
       },
       loaddata() {
+        // 合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 0,
+          })
+          .toPromise()
+         .then((response) => {
+            this.outContractNo = response
+          })
         // 包装方式
         packList({
             constId: 'CON1'
@@ -1721,7 +1790,7 @@ import { isUndefined } from 'xe-utils/methods'
     border-color: #5878e8;
   }
 
-  .el-col {
+  .bg {
     background: #f6f7fc;
   }
 

+ 804 - 0
src/views/contractManagement/purchaseContractCost.vue

@@ -0,0 +1,804 @@
+<!--现货采购合同费用-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="8">
+      <template slot="left">
+          <el-select style='width:200px;'  filterable v-model="searchTypeText" placeholder="" class="typeselect" @change="selectcontract"
+          :value="searchType">
+          <el-option v-for="item in contractList" :key="item.id" :label="item.contractNo+'('+item.status+')'" :value="item.contractNo"
+            style="color: #8890b1" />
+        </el-select>
+        <span style='padding-left:10px;'>卖方:{{seller}}</span>
+      </template>
+      <template slot="right">
+      </template>
+    </BaseHeaderLayout>
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+        <ws-button :type="type==''?'primary':''" @click="handlestatus('')">全部</ws-button>
+          <ws-button :type="type=='1'?'primary':''" @click="handlestatus(1)">收入</ws-button>
+          <ws-button :type="type=='2'?'primary':''" @click="handlestatus(2)">支出</ws-button>
+          <span style='padding-left:10px;'>粮款:{{grain}}</span>
+          <span style='padding-left:10px;'>合计收入:{{income}}</span>
+          <span style='padding-left:10px;'>合计支出:{{expend}}</span>
+          <span style='padding-left:10px;'>付款中:{{nograinexpend}}</span>
+          
+      </template>
+      <template slot="right">
+        <!-- <ws-button type="primary" @click="handleAdd()"
+          v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">运费</ws-button> -->
+          <ws-button type="primary" @click="handleAdd(2)"
+          v-hasPermission="`contractManagement.nonContract.nonContractInfo.add`">请款</ws-button>
+          <ws-button type="primary" @click="handleAdd(1)"
+          v-hasPermission="`contractManagement.nonContract.nonContractInfo.add`">收款</ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table class="wenzi" :data="costList.records" style="width: 100%; margin-top: 10px"
+      height="calc(100% - 105px)">
+      <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="type" label="类型" width="150">
+        <template slot-scope="scope">
+          <span v-if='scope.row.type==1&&scope.row.costType==1'>收入(粮)</span>
+          <span v-if='scope.row.type==1&&scope.row.costType!=1'>收入</span>
+          <span v-if='scope.row.type==2&&scope.row.costType==1'>支出(粮)</span>
+          <span v-if='scope.row.type==2&&scope.row.costType!=1'>支出</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="costName" label="款项名称" width="80">
+      </el-table-column>
+      <!-- <el-table-column prop="grade" label="品级" width="80">
+        <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 width='130' prop="costPrice" 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 != null">
+            {{
+              scope.row.addressUrlArray.length == 0
+                ? ''
+                : scope.row.addressUrlArray.length
+            }}
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column width='130' prop="personName" label="请款人/收款人">
+      </el-table-column>
+      <el-table-column width='130' prop="payee" label="回款方">
+      </el-table-column>
+      <el-table-column width='130' prop="payDeadline" label="支付日期">
+      </el-table-column>
+      <el-table-column width='130' prop="createDate" label="录入日期">
+      </el-table-column>
+      <el-table-column width='130' prop="status" label="状态">
+         <template slot-scope="scope">
+           <span v-if='scope.row.approveStatus'>{{scope.row.approveStatus}}</span><span v-else>{{scope.row.status}}</span>
+           <i @click="handlerecord(scope.row)" class="el-icon-s-claim"></i>
+        </template>
+      </el-table-column>
+      <el-table-column prop="address" label="操作" width="360">
+        <template slot-scope="scope">
+          <div v-if='scope.row.type==2'>
+            <div style='display:inline-block;' v-if='scope.row.taskId'>
+              <ws-button type="primary" @click="handleaudit(scope.row)">审核</ws-button>
+            </div>
+             <div style='display:inline-block;' v-if='scope.row.status=="未付款"'>
+                <ws-button type="primary" @click="handlepayment(scope.row)"
+            v-hasPermission="`contractManagement.nonContract.nonContractInfo.status`">付款</ws-button>
+             </div>
+            <div style='display:inline-block;' v-if='scope.row.personName==staffName'>
+            <ws-button type="primary" @click="handleedit(scope.row)"
+            v-hasPermission="`contractManagement.nonContract.nonContractInfo.edit`">编辑</ws-button>
+            </div>
+            <div style='display:inline-block;' v-if='scope.row.status=="已驳回"&&scope.row.personName==staffName'>
+              <ws-button type="danger" @click="handleDelete(scope.row)" v-hasPermission="`contractManagement.nonContract.nonContractInfo.delete`">删除</ws-button>
+            </div>
+           
+          </div>
+          
+        </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')">
+      <div v-if='appendixIdss.length>0'>
+        <img style='border:1px solid #ccc;' v-for='item in appendixIdss' :src="item" alt="">
+      </div>
+      
+    </WinseaContentModal>
+    <el-dialog width='30%' :visible.sync="dialogVisible" :title="title"  class='title_css' top="20vh">
+      <el-form style='margin:0 auto;' ref="form" :model="deptBudgetList" label-width="100px">
+        <el-form-item v-if='status==1||status==2||status==5' label="类型">
+          <el-radio-group v-model="costType">
+            <el-radio :label="1">粮款</el-radio>
+            <el-radio :label="2">非粮款</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item v-else label="类型">
+          <ws-select :disabled="disabled" v-model="costType" placeholder="" class="typeselect"
+          :value="costType">
+          <ws-option  key="1" label="粮款" value="1" style="color: #8890b1" />
+          <ws-option  key="2" label="非粮款" value="2" style="color: #8890b1" />
+        </ws-select>
+        </el-form-item>
+        <el-form-item label="款项名称">
+          <el-input :disabled='disabled' v-model="deptBudgetList.costName" placeholder="请输入款项名称"></el-input>
+        </el-form-item>
+        <!-- <el-form-item label="费用名称">
+          <el-input :disabled='disabled' v-model="deptBudgetList.costName"></el-input>
+        </el-form-item> -->
+        <el-form-item label="金额(元)">
+          <el-input :disabled='disabled' v-model="deptBudgetList.costPrice" placeholder="请输入金额"></el-input>
+        </el-form-item>
+        <el-form-item v-if='status==1||currectcost.type==1' label="回款方">
+          <el-input :disabled='disabled' v-model="deptBudgetList.payee" placeholder="请输入回款方"></el-input>
+        </el-form-item>
+        <el-form-item label="备注">
+          <!-- <el-input :disabled='disabled' type="textarea" v-model="deptBudgetList.remark"></el-input> -->
+           <el-input type="textarea" v-model="deptBudgetList.remark" placeholder="输入备注,不超过50个字" maxlength="50" :rows="4">
+            </el-input>
+        </el-form-item>
+        
+        <el-form-item label="附件">
+          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+            :on-success="handlefujian" :on-remove="handleRemove" class="photo2">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item v-if='status==3' label="审核意见">
+          <el-input type="textarea" v-model="auditMind"></el-input>
+        </el-form-item>
+        <el-form-item v-if='status==1' label="收款日期">
+          <ws-date-picker v-model="deptBudgetList.payDeadline" type="date" placeholder="请选择收款日期"
+              value-format="yyyy-MM-dd" />
+        </el-form-item>
+        <el-form-item v-if='status==4' label="付款日期">
+          <ws-date-picker v-model="deptBudgetList.payDeadline" type="date" placeholder="请选择付款日期"
+              value-format="yyyy-MM-dd" />
+        </el-form-item>
+      </el-form>
+      <div style='text-align:center;' v-if='status==1||status==2||status==4||status==5'>
+        <el-button @click='dialogVisible=false'>取消</el-button>
+        <el-button @click='confirm' type="primary">提交</el-button>
+      </div>
+      <div style='text-align:center;' v-if='status==3'>
+        <el-button @click='cancel'>驳回</el-button>
+        <el-button @click='confirm' type="primary">通过</el-button>
+      </div>
+    </el-dialog>
+    
+    <el-dialog width='50%' :visible.sync="dialogVisible1" title="审核记录">
+      <div v-for="item in recordList">
+        <div style='width:100%;justify-content: space-between;' class='flex'>
+          <div>{{item.operateUser}}</div>
+          <div>{{item.dealMsg}}</div>
+          <div>{{item.createDate}}</div>
+        </div>
+        <div style='width:100%;text-align:center;'>{{item.verifyRemark}}</div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    contractcost,
+    getcontract,
+    addcontractcost,
+    editcontractcost,
+    delcontractcost,
+    payment,
+    billoperatehis
+    // export1,
+    // editstatus,
+    // billoperatehis,
+    // deletecontract,
+    // editInfo,
+  } from '@/model/contarct/index'
+  import {
+    woekflowhandle,gettaskhistories
+  } from '@/model/tasksport/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 {
+        id: '',
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        size: 10,
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        title:'',
+        costType:1,
+        seller:'',
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        recordList:[],
+        pageSize: 9999,
+        searchType: 1,
+        dialogVisible1:false,
+        type:'',
+        searchTypeText: '',
+        searchKeyWord: '',
+        contractType: 2,
+        dataList:[],
+        startDate: null,
+        endDate: null,
+        addressUrls: [],
+        costList:{},
+        currectcost:{},
+        dialogVisible:false,
+        contractId:0,
+        status:'',
+        contractNo:'',
+        disabled:false,
+        // 提交类型
+        submitType: true,
+        auditMind:'',
+        grain:0,
+        income:0,
+        expend:0,
+        nograinexpend:0,
+        staffName:localStorage.getItem('ws-pf_staffName'),
+        paymentScreenshot:[],
+        deptCircularPage: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        deptBudgetList: {},
+        historyList: [],
+        appendixIdss: [],
+        compId: localStorage.getItem('ws-pf_compId'),
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+        value1: '',
+        value2: '',
+      }
+    },
+    activated() {
+      //cg.viewBudget
+      //cg.viewSpareMoney
+      // this.getVesselData();
+            this.contractId=this.$route.query.id
+            this.contractNo=this.$route.query.contractNo
+            this.searchTypeText=this.$route.query.contractNo+'('+this.$route.query.status+')'
+            this.seller=this.$route.query.seller
+      getcontract({flag:0}).toPromise()
+          .then((response) => {
+            this.contractList=response
+            // this.contractId=response[0].id
+            // this.contractNo=response[0].contractNo
+            // this.searchTypeText=response[0].contractNo
+            // this.seller=response[0].seller
+            this.getList()
+          })
+      
+      this.showType = this.isShow
+    },
+    methods: {
+      handlestatus(status){
+        this.type=status
+        this.getList()
+      },
+      handleedit(row){
+        if(row.type==1){
+          this.title='收款'
+        }else{
+          this.title='请款'
+        }
+        this.status=5
+        this.deptBudgetList=row
+        this.costType=row.costType
+        if(row.addressUrl){
+          this.dataList=[]
+          this.paymentScreenshot=row.addressUrl.split(',')
+          for (let i = 0; i < this.paymentScreenshot.length; i++) {
+            this.dataList.push({url:this.paymentScreenshot[i]})
+            
+          }
+        }
+        this.currectcost=row
+        this.dialogVisible=true
+      },
+      handlerecord(row){
+        billoperatehis({id: row.id}).toPromise()
+                .then((response) => {
+                  this.recordList=response
+                  this.dialogVisible1=true
+                }).catch((response) => {})
+        
+      },
+      handleaudit(row){
+        console.log(row)
+        this.status=3
+        this.costType=row.costType
+        this.deptBudgetList=row
+        this.currectcost=row
+        if(row.addressUrl){
+          this.dataList=[]
+          this.paymentScreenshot=row.addressUrl.split(',')
+          for (let i = 0; i < this.paymentScreenshot.length; i++) {
+            this.dataList.push({url:this.paymentScreenshot[i]})
+            
+          }
+        }
+        this.disabled=true
+        this.dialogVisible=true
+      },
+      handlepayment(row){
+        this.status=4
+        this.costType=row.costType
+        this.currectcost=row
+        this.disabled=true
+        this.deptBudgetList=row
+        if(row.addressUrl){
+          this.dataList=[]
+          this.paymentScreenshot=row.addressUrl.split(',')
+          for (let i = 0; i < this.paymentScreenshot.length; i++) {
+            this.dataList.push({url:this.paymentScreenshot[i]})
+            
+          }
+        }
+        this.dialogVisible=true
+      },
+      handlefujian(file) {
+        // console.log(file)
+        this.paymentScreenshot.push(file.url)
+        // this.dialogVisible = true
+      },
+      handleRemove(file) {
+        // console.log(file)
+        for (let i = 0; i < this.paymentScreenshot.length; i++) {
+          if(this.paymentScreenshot[i]==response.url){
+            this.paymentScreenshot.splice(i, 1)
+          }
+          
+        }
+      },
+       handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      selectcontract(e){
+        for (let i = 0; i < this.contractList.length; i++) {
+          if(this.contractList[i].contractNo==e){
+            this.contractId=this.contractList[i].id
+            this.contractNo=this.contractList[i].contractNo
+            this.searchTypeText=this.contractList[i].contractNo
+            this.seller=this.contractList[i].seller
+            this.getList()
+          }
+          
+        }
+      },
+      cancel(){
+        woekflowhandle({taskId: this.currectcost.taskId,
+                approved: false,
+                auditMind: this.auditMind,
+                needReapply: false,})
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '驳回成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+      },
+      confirm(){
+        // addcontractcost()
+         var text = ''
+        if(this.status == 2||this.status == 1){
+          if(!this.deptBudgetList.costName){
+            this.$message({
+              message: '款项名称不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if(!this.deptBudgetList.costPrice){
+            this.$message({
+              message: '金额不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if(this.deptBudgetList.costName.length<1||this.deptBudgetList.costName.length>15){
+            this.$message({
+              message: '费用名称输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if(this.deptBudgetList.costPrice<0.01||this.deptBudgetList.costPrice>100000000){
+            this.$message({
+              message: '费用名称输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if(String(this.deptBudgetList.costPrice).indexOf(".")!=-1){
+            if(String(this.deptBudgetList.costPrice).substring(String(this.deptBudgetList.costPrice).indexOf(".")+1,this.deptBudgetList.costPrice.length)>2){
+              this.$message({
+                message: '费用名称输入错误',
+                type: 'warning',
+              })
+              return
+            }
+          }
+          if(this.deptBudgetList.remark&&this.deptBudgetList.remark.length<0||this.deptBudgetList.remark&&this.deptBudgetList.remark.length>50){
+            this.$message({
+              message: '备注不超过50字',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if(this.status == 1){
+          if(this.paymentScreenshot.length==0){
+            this.$message({
+              message: '附件不能为空',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.status == 2||this.status == 5&&this.currectcost.type==2) {
+          text =
+            '确认提交请款信息?'
+        } else if(this.status == 1) {
+          text = '确认提交收款信息?'
+        } else if(this.status == 3&&this.currectcost.type==2) {
+          text = '确认通过请款信息?'
+        }else if(this.status == 4) {
+          text = '确认提交付款信息?'
+        }
+        this.$confirm(text, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            this.deptBudgetList.contractId=this.contractId
+              this.deptBudgetList.contractNo=this.contractNo
+              this.deptBudgetList.contractType=this.contractType
+              this.deptBudgetList.costType=this.costType
+              this.deptBudgetList.compId=this.compId
+              this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
+              this.deptBudgetList.personName=localStorage.getItem('ws-pf_staffName')
+            if(this.status==1||this.status==2){
+              this.deptBudgetList.type=this.status
+              // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
+              addcontractcost(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '提交成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+            }else if(this.status==5){
+              this.deptBudgetList.type=this.currectcost.type
+              // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
+              editcontractcost(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '编辑成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+            }else if(this.status==3){
+              // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
+              woekflowhandle({taskId: this.currectcost.taskId,
+                approved: true,
+                auditMind: this.auditMind,
+                needReapply: false,})
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '通过成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+            }else if(this.status==4){
+              // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
+              payment(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '付款成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+            }
+            
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      handleAdd(status){
+        this.status=status
+        if(status==1){
+          this.title='收款'
+        }else if(status==2){
+          this.title='请款'
+        }
+        this.dialogVisible=true
+      },
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async (response) => {
+            this.deptBudgetList.addressUrl = response
+            this.deptBudgetList.id = this.id
+            this.deptBudgetList.flag = 1
+            editInfo(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.accessoryTFs = false
+                this.$message.success('上传成功')
+                this.getList()
+              })
+          })
+          .catch((res) => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      getList() {
+        contractcost({
+            compId: localStorage.getItem('ws-pf_compId'),
+            contractType: this.contractType,
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            contractId:this.contractId,
+            contractNo:this.contractNo,
+            searchType:this.type
+          })
+          .toPromise()
+          .then((response) => {
+            var income=0,expend=0,grainincome=0,grainexpend=0,nograinexpend=0
+            this.costList=response
+            for (var i = 0; i < response.records.length; i++) {
+              if(response.records[i].addressUrl){
+                response.records[i].addressUrlArray=response.records[i].addressUrl.split(',')
+              }
+              // 收入
+              if(response.records[i].type==1){
+                income+=response.records[i].costPrice
+                if(response.records[i].costType==1){
+                  grainincome+=response.records[i].costPrice
+                }
+              }
+              // 支出
+              if(response.records[i].type==2){
+                expend+=response.records[i].costPrice
+                if(response.records[i].costType==1&&response.records[i].status=='已付款'){
+                  grainexpend+=response.records[i].costPrice
+                }else{
+                  nograinexpend+=response.records[i].costPrice
+                }
+              }
+            }
+            console.log(grainexpend,grainincome)
+            this.income=income.toFixed(2)
+            this.expend=expend.toFixed(2)
+            this.grain=(grainexpend-grainincome).toFixed(2)
+            this.nograinexpend=nograinexpend.toFixed(2)
+            // this.deptCircularPage.currentPage = response.current
+            // this.deptCircularPage.pageSize = response.size
+            // this.deptBudgetTotal = response.total
+            // this.contractList = response
+            // for (var i = 0; i < response.records.length; i++) {
+            //   var arr = new Array()
+            //   this.addressUrls[i] = new Array()
+            //   if (this.contractList.records[i].addressUrl != null) {
+            //     arr = this.contractList.records[i].addressUrl.split(',')
+            //     this.addressUrls[i] = arr
+            //   }
+            // }
+          })
+      },
+    
+      fujian(row) {
+        this.id = row.id
+        this.accessoryTFs = true
+        this.appendixIdss = row.addressUrlArray
+        console.log(this.appendixIdss)
+      },
+      handleExamine(row) {
+        console.log(row)
+        this.$router.push({
+          name: 'purchaseContractExamine',
+          query: {
+            id: row.id,
+            status: row.status,
+          },
+        })
+      },
+      handleEdit(row) {
+        this.$router.push({
+          name: 'purchaseContractEdit',
+          query: {
+            id: row.id,
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      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: localStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          goodsType: this.goodsType,
+          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.type == 1) {
+          text =
+            '确认删除收款信息?'
+        } else {
+          text = '确认删除请款信息?'
+        }
+        this.$confirm(text, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            delcontractcost({
+                id: row.id,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '删除成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {})
+          })
+          .catch(() => {
+            return false
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+ /deep/.base_header_layout .grid-content{
+   height:36px;
+ }
+ /deep/.title_css .el-dialog__header {
+    text-align: center !important;
+    border-radius: 4px;
+  }
+</style>

+ 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) ||

+ 129 - 40
src/views/contractManagement/salesContract.vue

@@ -61,12 +61,11 @@
         </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 width='150' 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="completedQuantity" label="已完成(吨)">
+      <el-table-column width='150' prop="completedQuantity" label="已完成(吨)">
         <template slot-scope="scope">
           <span v-if="scope.row.proportion < 90"
             style="color: #5473e8; font-weight: 600">{{ scope.row.completedQuantity }}</span>
@@ -74,45 +73,74 @@
             style="color: red; font-weight: 600">{{ scope.row.completedQuantity }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="status" label="状态">
+      <el-table-column width='150' prop="status" label="状态">
         <template slot-scope="scope">
-          <span v-if="scope.row.approveStatus">{{
-            scope.row.approveStatus
-          }}</span>
-          <el-popover v-else 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 v-if="scope.row.status != '执行中'&&scope.row.status != '发运结束'&&scope.row.status != '已驳回'">
+            <!-- <span v-if="scope.row.approveStatus">{{
+              scope.row.approveStatus
+            }}</span> -->
+            <el-select v-if="scope.row.approveStatus" v-model="scope.row.approveStatus" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'
+            disabled
+            :value="scope.row.approveStatus">
+            <el-option label="待决策人审核" value="待决策人审核"
+              style="color: #8890b1" />
+          </el-select>
+          <el-select v-else v-model="scope.row.status" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'
+
+            :value="scope.row.status">
+              <el-option label="执行中" value="执行中"
+              style="color: #8890b1" />
+          </el-select>
+            <!-- <el-popover v-else 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>
-            </div>
-          </el-popover>
-          <img v-if="!scope.row.approveStatus" width="17" height="18"
-            style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
-            @click="editClick(scope.row)" alt="" />
+            </el-popover>
+            <img v-if="!scope.row.approveStatus" width="17" height="18"
+              style="vertical-align: text-top; position: relative; top: -1px;" src="../../../public/img/edit.png"
+              @click="editClick(scope.row)" alt="" /> -->
+          </div>
+          <div v-else-if="scope.row.status == '已驳回'">
+            已驳回
+          </div>
+          <div v-else>
+            <!-- {{scope.row.status}} -->
+            <el-select v-model="scope.row.status" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'
+            :value="scope.row.status"
+          >
+            <el-option v-for="item in statusList" :key="item.value" :label="item.value" :value="item.value"
+              style="color: #8890b1" />
+          </el-select>
+          </div>
         </template>
       </el-table-column>
-      <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
-      <el-table-column prop="contractRevenue" label="合同收入"> </el-table-column>
-      <el-table-column prop="expenses" label="费用支出"> </el-table-column>
-      <el-table-column prop="mildewGrain" label="未回款(元)">
+      <el-table-column width='120' prop="signingDate" label="签订日期"> </el-table-column>
+      <el-table-column width='120' prop="contractRevenue" label="合同收入"> </el-table-column>
+      <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
+      <el-table-column width='120' prop="mildewGrain" label="未回款(元)">
         <template slot-scope="scope">
         <span style='color:red;' v-if='scope.row.datestatus&&scope.row.invoiced>scope.row.contractRevenue'>{{scope.row.mildewGrain}}</span>
         <span v-else>{{scope.row.mildewGrain}}</span>
@@ -133,8 +161,16 @@
           <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="140">
+      <el-table-column prop="address" label="操作" width="160">
         <template slot-scope="scope">
+          <img width="16" height="17" style="
+                vertical-align: text-top;
+                position: relative;
+                top: -1px;
+                margin: 0 6px; " 
+               v-hasPermission="
+              `contractManagement.nonContract.nonContractInfo.view`" src="../../../public/img/daichu.png"
+             @click="handlecost(scope.row)" alt="" />
           <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`
@@ -161,7 +197,7 @@
         </template>
       </el-table-column>
     </el-table>
-    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+    <el-pagination  :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" @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')"
@@ -219,6 +255,7 @@
         showType: true,
         // 年
         year: '',
+        currectstatus:'',
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 9999,
@@ -251,6 +288,9 @@
             return time.getTime() > Date.now()
           },
         },
+        statusList:[{
+          value:'发运结束',
+        },{value:'已完成',}],
         accessoryTFs: false,
         accesscard: false,
         accessurl: '',
@@ -329,6 +369,48 @@
       this.showType = this.isShow
     },
     methods: {
+      handlecost(row){
+         this.$router.push({
+          name: 'salesContractcost',
+          query: {
+            id: row.id,
+            contractNo: row.contractNo,
+            status:row.status,
+            buger:row.buger
+          },
+        })
+      },
+      selectstatuschange(e,row){
+        var data={}
+        if(e=='发运结束'){
+          data={id: row.id,endFlag:1}
+        }else{
+          data={id: row.id}
+        }
+        this.$confirm(`是否将状态改为${e}`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editstatus(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            row.status=row.currectstatus
+            return false
+          })
+      },
       onChange() {
         this.$refs.upload
           .handleSaveBill()
@@ -407,6 +489,9 @@
           .then((response) => {
             var date=new Date().getTime()
             for (var i = 0; i < response.records.length; i++) {
+              if(response.records[i].status){
+                response.records[i].currectstatus=response.records[i].status
+              }
               if(response.records[i].collectionDeadline){
                 response.records[i].date=new Date(response.records[i].collectionDeadline).getTime()
                 console.log(response.records[i].date,parseInt(date) + (5 * 24 * 3600 * 1000))
@@ -471,7 +556,7 @@
         var status = ''
         if (row.status == '待执行' || row.status == '已完成') {
           status = '执行中'
-        } else if (row.status == '执行中') {
+        } else if (row.status == '执行中'||row.status == '发运结束') {
           status = '已完成'
         }
         //cancelButtonClass: "btn-custom-cancel"
@@ -997,4 +1082,8 @@
   /deep/.typeselect .el-input__inner {
     color: #8890b1;
   }
+  /deep/.statusselect .el-input__inner {
+    color: #8890b1;
+    width:100%;
+  }
 </style>

+ 28 - 15
src/views/contractManagement/salesContractAdd.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="container">
     <el-row>
-      <el-col :span="12">
+      <el-col :span="12" class='bg'>
         <h2 class="bg-left title">创建销售合同</h2>
       </el-col>
-      <el-col :span="12" class="bg-right">
+      <el-col :span="12" class="bg-right bg">
         <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>
@@ -78,12 +78,12 @@
               placeholder="请输入买方电话" @select="handleSelect"></el-autocomplete>
           </ws-form-item>
           <ws-form-item label="交货方式" span="1" prop="seller" class="readonly">
-            <el-radio v-model="deptBudgetList.deliverType" v-if="deptBudgetList.priceType == '随行就市'" disabled label="1">
-              我方送货</el-radio>
-            <el-radio v-model="deptBudgetList.deliverType" v-else label="1">我方送货</el-radio>
-            <el-radio v-model="deptBudgetList.deliverType" v-if="deptBudgetList.priceType == '随行就市'" disabled label="2">
-              对方自提</el-radio>
-            <el-radio v-model="deptBudgetList.deliverType" v-else label="2">对方自提</el-radio>
+            <el-radio v-model="deptBudgetList.deliverType" label="1">我方送货</el-radio>
+              <!--  v-if="deptBudgetList.priceType == '随行就市'" disabled label="1" -->
+            <!-- <el-radio v-model="deptBudgetList.deliverType" v-else label="1">我方送货</el-radio> -->
+            <el-radio v-model="deptBudgetList.deliverType" label="2">对方自提</el-radio>
+               <!-- v-if="deptBudgetList.priceType == '随行就市'" disabled label="2" -->
+            <!-- <el-radio v-model="deptBudgetList.deliverType" v-else label="2">对方自提</el-radio> -->
           </ws-form-item>
           <!--卖方电话-->
           <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
@@ -165,7 +165,8 @@
           </ws-form-item>
           <!--价格类型-->
           <ws-form-item label="价格类型" span="1" prop="priceType">
-            <ws-select v-model="deptBudgetList.priceType" placeholder="请选择价格类型" @change="selectpriceType">
+            <ws-select v-model="deptBudgetList.priceType" placeholder="请选择价格类型" >
+              <!-- @change="selectpriceType" -->
               <ws-option v-for="item in priceTypeList" :key="item" :label="item" :value="item" />
             </ws-select>
           </ws-form-item>
@@ -1159,7 +1160,11 @@
         //   return
         // }
         if (
+<<<<<<< HEAD
           this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+=======
+          this.deptBudgetList.contractGoodsInfo.mildewGrain &&
+>>>>>>> origin
           (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
               '.'
             ) != -1 &&
@@ -1186,7 +1191,11 @@
         //   return
         // }
         if (
+<<<<<<< HEAD
           this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+=======
+          this.deptBudgetList.contractGoodsInfo.jiaorenli &&
+>>>>>>> origin
           (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
             -1 &&
             String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
@@ -1212,7 +1221,11 @@
         //   return
         // }
         if (
+<<<<<<< HEAD
           this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+=======
+          this.deptBudgetList.contractGoodsInfo.imperfectGrain &&
+>>>>>>> origin
           (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
               '.'
             ) != -1 &&
@@ -1535,11 +1548,11 @@
           }
         }
       },
-      selectpriceType(e) {
-        if (e == '随行就市') {
-          this.deptBudgetList.deliverType = '1'
-        }
-      },
+      // selectpriceType(e) {
+      //   if (e == '随行就市') {
+      //     this.deptBudgetList.deliverType = '1'
+      //   }
+      // },
       weightchange(e) {
         this.deptBudgetList.finalTradingVolume = e
       },
@@ -1615,7 +1628,7 @@
     margin-top: 10px;
   }
 
-  .el-col {
+  .bg {
     background: #f6f7fc;
   }
 

+ 802 - 0
src/views/contractManagement/salesContractCost.vue

@@ -0,0 +1,802 @@
+<!--现货销售合同费用-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="8">
+      <template slot="left">
+          <el-select style='width:200px;'  filterable v-model="searchTypeText" placeholder="" class="typeselect" @change="selectcontract"
+          :value="searchType">
+          <el-option v-for="item in contractList" :key="item.id" :label="item.contractNo+'('+item.status+')'" :value="item.contractNo"
+            style="color: #8890b1" />
+        </el-select>
+        <span style='padding-left:10px;'>买方:{{buger}}</span>
+      </template>
+      <template slot="right">
+      </template>
+    </BaseHeaderLayout>
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+        <ws-button :type="type==''?'primary':''" @click="handlestatus('')">全部</ws-button>
+          <ws-button :type="type=='1'?'primary':''" @click="handlestatus(1)">收入</ws-button>
+          <ws-button :type="type=='2'?'primary':''" @click="handlestatus(2)">支出</ws-button>
+          <span style='padding-left:10px;'>粮款:{{grain}}</span>
+          <span style='padding-left:10px;'>合计收入:{{income}}</span>
+          <span style='padding-left:10px;'>合计支出:{{expend}}</span>
+          <span style='padding-left:10px;'>付款中:{{nograinexpend}}</span>
+          
+      </template>
+      <template slot="right">
+        <!-- <ws-button type="primary" @click="handleAdd()"
+          v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">运费</ws-button> -->
+          <ws-button type="primary" @click="handleAdd(2)"
+          v-hasPermission="`contractManagement.nonContract.nonContractInfo.add`">请款</ws-button>
+          <ws-button type="primary" @click="handleAdd(1)"
+          v-hasPermission="`contractManagement.nonContract.nonContractInfo.add`">收款</ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table class="wenzi" :data="costList.records" style="width: 100%; margin-top: 10px"
+      height="calc(100% - 105px)">
+      <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="type" label="类型" width="150">
+        <template slot-scope="scope">
+          <span v-if='scope.row.type==1&&scope.row.costType==1'>收入(粮)</span>
+          <span v-if='scope.row.type==1&&scope.row.costType!=1'>收入</span>
+          <span v-if='scope.row.type==2&&scope.row.costType==1'>支出(粮)</span>
+          <span v-if='scope.row.type==2&&scope.row.costType!=1'>支出</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="costName" label="款项名称" width="80">
+      </el-table-column>
+      <!-- <el-table-column prop="grade" label="品级" width="80">
+        <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 width='130' prop="costPrice" 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 != null">
+            {{
+              scope.row.addressUrlArray.length == 0
+                ? ''
+                : scope.row.addressUrlArray.length
+            }}
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column width='130' prop="personName" label="请款人/收款人">
+      </el-table-column>
+      <el-table-column width='130' prop="payee" label="回款方">
+      </el-table-column>
+      <el-table-column width='130' prop="payDeadline" label="支付日期">
+      </el-table-column>
+      <el-table-column width='130' prop="createDate" label="录入日期">
+      </el-table-column>
+      <el-table-column width='130' prop="status" label="状态">
+         <template slot-scope="scope">
+           <span v-if='scope.row.approveStatus'>{{scope.row.approveStatus}}</span><span v-else>{{scope.row.status}}</span>
+           <i @click="handlerecord(scope.row)" class="el-icon-s-claim"></i>
+        </template>
+      </el-table-column>
+      <el-table-column prop="address" label="操作" width="360">
+        <template slot-scope="scope">
+          <div v-if='scope.row.type==2'>
+            <div style='display:inline-block;' v-if='scope.row.taskId'>
+              <ws-button type="primary" @click="handleaudit(scope.row)">审核</ws-button>
+            </div>
+             <div style='display:inline-block;' v-if='scope.row.status=="未付款"'>
+                <ws-button type="primary" @click="handlepayment(scope.row)"
+            v-hasPermission="`contractManagement.nonContract.nonContractInfo.status`">付款</ws-button>
+             </div>
+            <div style='display:inline-block;' v-if='scope.row.personName==staffName'>
+            <ws-button type="primary" @click="handleedit(scope.row)"
+            v-hasPermission="`contractManagement.nonContract.nonContractInfo.edit`">编辑</ws-button>
+            </div>
+            <div style='display:inline-block;' v-if='scope.row.status=="已驳回"&&scope.row.personName==staffName'>
+              <ws-button type="danger" @click="handleDelete(scope.row)" v-hasPermission="`contractManagement.nonContract.nonContractInfo.delete`">删除</ws-button>
+            </div>
+           
+          </div>
+          
+        </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')">
+      <div v-if='appendixIdss.length>0'>
+        <img style='border:1px solid #ccc;' v-for='item in appendixIdss' :src="item" alt="">
+      </div>
+      
+    </WinseaContentModal>
+    <el-dialog width='30%' :visible.sync="dialogVisible" :title="title"  class='title_css' top="20vh">
+      <el-form style='margin:0 auto;' ref="form" :model="deptBudgetList" label-width="100px">
+        <el-form-item v-if='status==1||status==2||status==5' label="类型">
+          <el-radio-group v-model="costType">
+            <el-radio :label="1">粮款</el-radio>
+            <el-radio :label="2">非粮款</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item v-else label="类型">
+          <ws-select :disabled="disabled" v-model="costType" placeholder="" class="typeselect"
+          :value="costType">
+          <ws-option  key="1" label="粮款" value="1" style="color: #8890b1" />
+          <ws-option  key="2" label="非粮款" value="2" style="color: #8890b1" />
+        </ws-select>
+        </el-form-item>
+        <el-form-item label="款项名称">
+          <el-input :disabled='disabled' v-model="deptBudgetList.costName" placeholder="请输入款项名称"></el-input>
+        </el-form-item>
+        <!-- <el-form-item label="费用名称">
+          <el-input :disabled='disabled' v-model="deptBudgetList.costName"></el-input>
+        </el-form-item> -->
+        <el-form-item label="金额(元)">
+          <el-input :disabled='disabled' v-model="deptBudgetList.costPrice" placeholder="请输入金额"></el-input>
+        </el-form-item>
+        <el-form-item v-if='status==1||currectcost.type==1' label="回款方">
+          <el-input :disabled='disabled' v-model="deptBudgetList.payee" placeholder="请输入回款方"></el-input>
+        </el-form-item>
+        <el-form-item label="备注">
+          <!-- <el-input :disabled='disabled' type="textarea" v-model="deptBudgetList.remark"></el-input> -->
+           <el-input type="textarea" v-model="deptBudgetList.remark" placeholder="输入备注,不超过50个字" maxlength="50" :rows="4"></el-input>
+        </el-form-item>
+        
+        <el-form-item label="附件">
+          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+            :on-success="handlefujian" :on-remove="handleRemove" class="photo2">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item v-if='status==3' label="审核意见">
+          <el-input type="textarea" v-model="auditMind"></el-input>
+        </el-form-item>
+        <el-form-item v-if='status==1' label="收款日期">
+          <ws-date-picker v-model="deptBudgetList.payDeadline" type="date" placeholder="请选择收款日期"
+              value-format="yyyy-MM-dd" />
+        </el-form-item>
+        <el-form-item v-if='status==4' label="付款日期">
+          <ws-date-picker v-model="deptBudgetList.payDeadline" type="date" placeholder="请选择付款日期"
+              value-format="yyyy-MM-dd" />
+        </el-form-item>
+      </el-form>
+      <div style='text-align:center;' v-if='status==1||status==2||status==4||status==5'>
+        <el-button @click='dialogVisible=false'>取消</el-button>
+        <el-button @click='confirm' type="primary">提交</el-button>
+      </div>
+      <div style='text-align:center;' v-if='status==3'>
+        <el-button @click='cancel'>驳回</el-button>
+        <el-button @click='confirm' type="primary">通过</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog width='50%' :visible.sync="dialogVisible1" title="审核记录" >
+      <div v-for="item in recordList">
+        <div style='width:100%;justify-content: space-between;' class='flex'>
+          <div>{{item.operateUser}}</div>
+          <div>{{item.dealMsg}}</div>
+          <div>{{item.createDate}}</div>
+        </div>
+        <div style='width:100%;text-align:center;'>{{item.verifyRemark}}</div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    contractcost,
+    getcontract,
+    addcontractcost,
+    editcontractcost,
+    delcontractcost,
+    payment,
+    billoperatehis
+    // export1,
+    // editstatus,
+    // billoperatehis,
+    // deletecontract,
+    // editInfo,
+  } from '@/model/contarct/index'
+  import {
+    woekflowhandle,gettaskhistories
+  } from '@/model/tasksport/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 {
+        id: '',
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        size: 10,
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        title:'',
+        costType:1,
+        buger:'',
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        recordList:[],
+        pageSize: 9999,
+        searchType: 1,
+        dialogVisible1:false,
+        type:'',
+        searchTypeText: '',
+        searchKeyWord: '',
+        contractType: 1,
+        dataList:[],
+        startDate: null,
+        endDate: null,
+        addressUrls: [],
+        costList:{},
+        currectcost:{},
+        dialogVisible:false,
+        contractId:0,
+        status:'',
+        contractNo:'',
+        disabled:false,
+        // 提交类型
+        submitType: true,
+        auditMind:'',
+        grain:0,
+        income:0,
+        expend:0,
+        nograinexpend:0,
+        staffName:localStorage.getItem('ws-pf_staffName'),
+        paymentScreenshot:[],
+        deptCircularPage: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        deptBudgetList: {},
+        historyList: [],
+        appendixIdss: [],
+        compId: localStorage.getItem('ws-pf_compId'),
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+        value1: '',
+        value2: '',
+      }
+    },
+    activated() {
+      //cg.viewBudget
+      //cg.viewSpareMoney
+      // this.getVesselData();
+            this.contractId=this.$route.query.id
+            this.contractNo=this.$route.query.contractNo
+            this.searchTypeText=this.$route.query.contractNo+'('+this.$route.query.status+')'
+            this.buger=this.$route.query.buger
+      getcontract({flag:0}).toPromise()
+          .then((response) => {
+            this.contractList=response
+            // this.contractId=response[0].id
+            // this.contractNo=response[0].contractNo
+            // this.searchTypeText=response[0].contractNo
+            // this.seller=response[0].seller
+            this.getList()
+          })
+      
+      this.showType = this.isShow
+    },
+    methods: {
+      handlestatus(status){
+        this.type=status
+        this.getList()
+      },
+      handleedit(row){
+        if(row.type==1){
+          this.title='收款'
+        }else{
+          this.title='请款'
+        }
+        this.status=5
+        this.deptBudgetList=row
+        this.costType=row.costType
+        if(row.addressUrl){
+          this.dataList=[]
+          this.paymentScreenshot=row.addressUrl.split(',')
+          for (let i = 0; i < this.paymentScreenshot.length; i++) {
+            this.dataList.push({url:this.paymentScreenshot[i]})
+            
+          }
+        }
+        this.currectcost=row
+        this.dialogVisible=true
+      },
+      handlerecord(row){
+        gettaskhistories({ businessKey: row.id,
+            workflowId: row.workflowId}).toPromise()
+                .then((response) => {
+                  this.recordList=response
+                  this.dialogVisible1=true
+                }).catch((response) => {})
+        
+      },
+      handleaudit(row){
+        console.log(row)
+        this.status=3
+        this.costType=row.costType
+        this.deptBudgetList=row
+        this.currectcost=row
+        if(row.addressUrl){
+          this.dataList=[]
+          this.paymentScreenshot=row.addressUrl.split(',')
+          for (let i = 0; i < this.paymentScreenshot.length; i++) {
+            this.dataList.push({url:this.paymentScreenshot[i]})
+            
+          }
+        }
+        this.disabled=true
+        this.dialogVisible=true
+      },
+      handlepayment(row){
+        this.status=4
+        this.costType=row.costType
+        this.currectcost=row
+        this.disabled=true
+        this.deptBudgetList=row
+        if(row.addressUrl){
+          this.dataList=[]
+          this.paymentScreenshot=row.addressUrl.split(',')
+          for (let i = 0; i < this.paymentScreenshot.length; i++) {
+            this.dataList.push({url:this.paymentScreenshot[i]})
+            
+          }
+        }
+        this.dialogVisible=true
+      },
+      handlefujian(file) {
+        // console.log(file)
+        this.paymentScreenshot.push(file.url)
+        // this.dialogVisible = true
+      },
+      handleRemove(file) {
+        // console.log(file)
+        for (let i = 0; i < this.paymentScreenshot.length; i++) {
+          if(this.paymentScreenshot[i]==response.url){
+            this.paymentScreenshot.splice(i, 1)
+          }
+          
+        }
+      },
+       handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      selectcontract(e){
+        for (let i = 0; i < this.contractList.length; i++) {
+          if(this.contractList[i].contractNo==e){
+            this.contractId=this.contractList[i].id
+            this.contractNo=this.contractList[i].contractNo
+            this.searchTypeText=this.contractList[i].contractNo
+            this.buger=this.contractList[i].buger
+            this.getList()
+          }
+          
+        }
+      },
+      cancel(){
+        woekflowhandle({taskId: this.currectcost.taskId,
+                approved: false,
+                auditMind: this.auditMind,
+                needReapply: false,})
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '驳回成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+      },
+      confirm(){
+        // addcontractcost()
+         var text = ''
+        if(this.status == 2||this.status == 1){
+          if(!this.deptBudgetList.costName){
+            this.$message({
+              message: '款项名称不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if(!this.deptBudgetList.costPrice){
+            this.$message({
+              message: '金额不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if(this.deptBudgetList.costName.length<1||this.deptBudgetList.costName.length>15){
+            this.$message({
+              message: '费用名称输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if(this.deptBudgetList.costPrice<0.01||this.deptBudgetList.costPrice>100000000){
+            this.$message({
+              message: '费用名称输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if(String(this.deptBudgetList.costPrice).indexOf(".")!=-1){
+            if(String(this.deptBudgetList.costPrice).substring(String(this.deptBudgetList.costPrice).indexOf(".")+1,this.deptBudgetList.costPrice.length)>2){
+              this.$message({
+                message: '费用名称输入错误',
+                type: 'warning',
+              })
+              return
+            }
+          }
+          if(this.deptBudgetList.remark&&this.deptBudgetList.remark.length<0||this.deptBudgetList.remark&&this.deptBudgetList.remark.length>50){
+            this.$message({
+              message: '备注不超过50字',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if(this.status == 1){
+          if(this.paymentScreenshot.length==0){
+            this.$message({
+              message: '附件不能为空',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.status == 2||this.status == 5&&this.currectcost.type==2) {
+          text =
+            '确认提交请款信息?'
+        } else if(this.status == 1) {
+          text = '确认提交收款信息?'
+        } else if(this.status == 3&&this.currectcost.type==2) {
+          text = '确认通过请款信息?'
+        }else if(this.status == 4) {
+          text = '确认提交付款信息?'
+        }
+        this.$confirm(text, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            this.deptBudgetList.contractId=this.contractId
+              this.deptBudgetList.contractNo=this.contractNo
+              this.deptBudgetList.contractType=this.contractType
+              this.deptBudgetList.costType=this.costType
+              this.deptBudgetList.compId=this.compId
+              this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
+              this.deptBudgetList.personName=localStorage.getItem('ws-pf_staffName')
+            if(this.status==1||this.status==2){
+              this.deptBudgetList.type=this.status
+              // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
+              addcontractcost(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '提交成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+            }else if(this.status==5){
+              this.deptBudgetList.type=this.currectcost.type
+              // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
+              editcontractcost(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '编辑成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+            }else if(this.status==3){
+              // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
+              woekflowhandle({taskId: this.currectcost.taskId,
+                approved: true,
+                auditMind: this.auditMind,
+                needReapply: false,})
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '通过成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+            }else if(this.status==4){
+              // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
+              payment(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '付款成功',
+                  })
+                  this.dialogVisible=false
+                  this.deptBudgetList={}
+                  this.paymentScreenshot=[]
+                  this.$refs.uploadfiles.clearFiles()
+                  this.getList()
+                }).catch((response) => {})
+            }
+            
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      handleAdd(status){
+        this.status=status
+        if(status==1){
+          this.title='收款'
+        }else if(status==2){
+          this.title='请款'
+        }
+        this.dialogVisible=true
+      },
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async (response) => {
+            this.deptBudgetList.addressUrl = response
+            this.deptBudgetList.id = this.id
+            this.deptBudgetList.flag = 1
+            editInfo(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.accessoryTFs = false
+                this.$message.success('上传成功')
+                this.getList()
+              })
+          })
+          .catch((res) => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      getList() {
+        contractcost({
+            compId: localStorage.getItem('ws-pf_compId'),
+            contractType: this.contractType,
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            contractId:this.contractId,
+            contractNo:this.contractNo,
+            searchType:this.type
+          })
+          .toPromise()
+          .then((response) => {
+            var income=0,expend=0,grainincome=0,grainexpend=0,nograinexpend=0
+            this.costList=response
+            for (var i = 0; i < response.records.length; i++) {
+              if(response.records[i].addressUrl){
+                response.records[i].addressUrlArray=response.records[i].addressUrl.split(',')
+              }
+              // 收入
+              if(response.records[i].type==1){
+                income+=response.records[i].costPrice
+                if(response.records[i].costType==1){
+                  grainincome+=response.records[i].costPrice
+                }
+              }
+              // 支出
+              if(response.records[i].type==2){
+                expend+=response.records[i].costPrice
+                if(response.records[i].costType==1&&response.records[i].status=='已付款'){
+                  grainexpend+=response.records[i].costPrice
+                }else{
+                  nograinexpend+=response.records[i].costPrice
+                }
+              }
+            }
+            console.log(grainexpend,grainincome)
+            this.income=income.toFixed(2)
+            this.expend=expend.toFixed(2)
+            this.grain=(grainincome-grainexpend).toFixed(2)
+            this.nograinexpend=nograinexpend.toFixed(2)
+            // this.deptCircularPage.currentPage = response.current
+            // this.deptCircularPage.pageSize = response.size
+            // this.deptBudgetTotal = response.total
+            // this.contractList = response
+            // for (var i = 0; i < response.records.length; i++) {
+            //   var arr = new Array()
+            //   this.addressUrls[i] = new Array()
+            //   if (this.contractList.records[i].addressUrl != null) {
+            //     arr = this.contractList.records[i].addressUrl.split(',')
+            //     this.addressUrls[i] = arr
+            //   }
+            // }
+          })
+      },
+    
+      fujian(row) {
+        this.id = row.id
+        this.accessoryTFs = true
+        this.appendixIdss = row.addressUrlArray
+        console.log(this.appendixIdss)
+      },
+      handleExamine(row) {
+        console.log(row)
+        this.$router.push({
+          name: 'purchaseContractExamine',
+          query: {
+            id: row.id,
+            status: row.status,
+          },
+        })
+      },
+      handleEdit(row) {
+        this.$router.push({
+          name: 'purchaseContractEdit',
+          query: {
+            id: row.id,
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      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: localStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          goodsType: this.goodsType,
+          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.type == 1) {
+          text =
+            '确认删除收款信息?'
+        } else {
+          text = '确认删除请款信息?'
+        }
+        this.$confirm(text, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            delcontractcost({
+                id: row.id,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '删除成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {})
+          })
+          .catch(() => {
+            return false
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+ /deep/.base_header_layout .grid-content{
+   height:36px;
+ }
+ /deep/.title_css .el-dialog__header {
+    text-align: center !important;
+    border-radius: 4px;
+  }
+</style>

+ 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 (

+ 14 - 0
src/views/contractManagement/storageContractAdd.vue

@@ -868,7 +868,11 @@
           })
           return
         }
+<<<<<<< HEAD
         if (!this.deptBudgetList.storageFeeNew) {
+=======
+        if (!this.deptBudgetList.storageFee) {
+>>>>>>> origin
           this.$message({
             message: '代储费不能为空!',
             type: 'warning',
@@ -883,6 +887,7 @@
           return
         }
         if (
+<<<<<<< HEAD
           isNaN(this.deptBudgetList.storageFeeNew) ||
           (String(this.deptBudgetList.storageFeeNew).indexOf('.') != -1 &&
             String(this.deptBudgetList.storageFeeNew).length -
@@ -890,6 +895,15 @@
             2) ||
           this.deptBudgetList.storageFeeNew < 0 ||
           this.deptBudgetList.storageFeeNew > 1000
+=======
+          isNaN(this.deptBudgetList.storageFee) ||
+          (String(this.deptBudgetList.storageFee).indexOf('.') != -1 &&
+            String(this.deptBudgetList.storageFee).length -
+            (String(this.deptBudgetList.storageFee).indexOf('.') + 1) >
+            2) ||
+          this.deptBudgetList.storageFee < 0 ||
+          this.deptBudgetList.storageFee > 1000
+>>>>>>> origin
         ) {
           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;

+ 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">

+ 4 - 1
src/views/houseSelfCollect/component/weightCheckPrint.vue

@@ -51,7 +51,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 +75,7 @@
             </div>
             <div class="config">收货单位签名或盖章:</div>
             <div class="autograph">客户签名:</div>
+            <div class="autograph">司机签名:</div>
           </div>
           <div class="bottom-row3">扫一扫</div>
            <!-- <div class="bottom-row4">
@@ -164,6 +166,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,

+ 148 - 142
src/views/houseSelfCollect/inspectInfo.vue

@@ -113,7 +113,7 @@
             </ws-form-item>
           </ws-info-table>
 
-          <div class="title">质检数据</div>
+          <div class="title">质检数据&nbsp;&nbsp;&nbsp;&nbsp; <el-checkbox v-if='types==1||types==3' v-model="checked">补录</el-checkbox></div>
           <ws-info-table>
             <ws-form-item label="等级" span="1" prop="grade">
               <ws-select v-model="inspect.grade" placeholder="请输入等级" class="typeselect" :disabled="disabled"
@@ -219,6 +219,7 @@
         carNumberList: [],
         disabled: false,
         disabled1: false,
+        checked:false,
         disabled2: false,
         disabled3:false,
         disabledName: false,
@@ -465,6 +466,7 @@
               inspectAdd(this.inspect)
                 .toPromise()
                 .then((response) => {
+                  this.checked=false
                   this.$message.success('保存成功')
                   getinspectLook({
                       id: response
@@ -505,6 +507,7 @@
                 .toPromise()
                 .then((response) => {
                   this.$message.success('修改成功')
+                  this.checked=false
                   this.$router.push({
                     path: 'inspectionManagement'
                   })
@@ -743,149 +746,152 @@
             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.checked){
+          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.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
+          }
         }
         
-        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,
@@ -1307,4 +1313,4 @@
     text-align: center;
     // margin: 20px auto;
   }
-</style>
+</style>

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

@@ -101,7 +101,7 @@
           <el-button @click="inspectInfo(scope.row, 4)" v-if="scope.row.confirm !='1'"
             v-hasPermission="`acquisitionManagement.acquisitionQuality.again`">复检</el-button>
           <div style="display: inline-block;"
-            v-if="scope.row.weighingManagement&&scope.row.weighingManagement.status=='已质检'">
+            v-if="!scope.row.weighingManagement">
             <el-button @click="del(scope.row)" type="danger"
               v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
           </div>

+ 246 - 56
src/views/houseSelfCollect/paymentManagement.vue

@@ -7,8 +7,8 @@
         <div class="print-type-title">打印凭证</div>
         <div class="print-type-checkbox">
           <el-checkbox-group v-model="ruleForm.type">
-            <el-checkbox label="打印身份证(正反面)" name="type" class="label-width" @change="selectType"></el-checkbox>
-            <el-checkbox label="打印银行卡(正反面)" name="type" class="label-width" @change="selectType"></el-checkbox>
+            <el-checkbox label="打印身份证" name="type" class="label-width" @change="selectType"></el-checkbox>
+            <el-checkbox label="打印银行卡" name="type" class="label-width" @change="selectType"></el-checkbox>
             <el-checkbox label="打印结算凭证" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
             <el-checkbox label="打印检斤单" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
             <el-checkbox label="打印回执单" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
@@ -78,6 +78,15 @@
         <ws-button type="primary" @click="agreementPrint()"
           v-hasPermission="`acquisitionManagement.acquisitionPay.dow`">下载结算单
         </ws-button>
+        <!-- <el-upload :on-change="importClick" action="" :show-file-list="false" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" :auto-upload="false"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.dow`"><el-button type="primary">导入</el-button>
+        </el-upload> -->
+        <el-upload style="margin-left: 8px;" class="upload-demo inline-block margin-right-10" action=""
+          :on-change="importClick" :show-file-list="false"
+          accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
+          :auto-upload="false">
+          <ws-button type="primary">导入</ws-button>
+        </el-upload>
       </template>
       <template slot="right"> </template>
     </BaseHeaderLayout>
@@ -122,9 +131,10 @@
       <el-table-column class="table_td" prop="updateDate" label="更新时间" width="150" sortable></el-table-column>
       <el-table-column class="table_td" prop="status" width="80" label="状态">
         <template scope="scope">
-          <span v-if="scope.row.approveStatus">{{
+          <span v-if="scope.row.approveStatus&&scope.row.reverseFlag!=1">{{
             scope.row.approveStatus
           }}</span>
+
           <span v-else>{{ scope.row.status }}</span>
         </template>
       </el-table-column>
@@ -134,17 +144,19 @@
           <span v-else>已开票</span>
         </template>
       </el-table-column>
-      <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="500">
+      <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="600">
         <template scope="scope">
           <span v-hasPermission="`acquisitionManagement.acquisitionPay.add`">
             <el-button v-if="
-                (!scope.row.approveStatus ||
-                  scope.row.approveStatus == '待结算') &&
-                (scope.row.status == '待结算' || scope.row.status == '已驳回' )
+                (!scope.row.approveStatus ||scope.row.approveStatus == '待结算') &&
+                (scope.row.status == '待结算' || scope.row.status == '已驳回' )||scope.row.approveStatus&&scope.row.reverseFlag==1
               " @click="settlement(1, scope.row)">结算</el-button>
           </span>
           <el-button @click="settlement(2, scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.view`">查看
           </el-button>
+          <el-button v-if="scope.row.approveStatus&&scope.row.reverseFlag!=1" @click="settleaccounts(scope.row)"
+            v-hasPermission="`acquisitionManagement.acquisitionPay.seet`">反结算
+          </el-button>
           <el-button v-if="
               scope.row.approveStatus ||
               (scope.row.status != '待结算' && !scope.row.approveStatus)
@@ -308,7 +320,21 @@
         :preview-src-list="[paymentReceipt]">
       </el-image>
     </el-dialog>
-
+    <el-dialog width="30%" title="开票信息" :visible.sync="invoicingshow" :close="invoicingClose">
+      <el-form :label-position="labelposition" label-width="200px" style='text-align:center;' class="customer">
+        <el-form-item label="税控盘:">
+          <el-select v-model="invoiceFlag" placeholder="请选择税控盘" filterable clearable style="margin: 0 10px">
+            <el-option v-for="item in invoicingList" :key="'invoicing'+item.value" :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="invoicingshow = false">取 消</el-button>
+        <el-button type="primary" @click="invoicingconfirm">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -333,7 +359,9 @@
     invoicing,
     export1,
     settlementEdit,
-    workflowcontent
+    workflowcontent,
+    suspendinstance,
+    importWord
   } from '@/model/houseSelfCollect/index'
   import {
     posthandle,
@@ -354,12 +382,21 @@
         paymentReceipt: '',
         isPreviewPayOrder: false,
         printType: 0,
+        invoiceFlag: '',
         isShowPrintType1: true,
         isShowPrintType2: true,
         isShowPrintType3: true,
         isShowPrintType4: true,
         customerInfo: false,
         form: {},
+        labelposition: 'right',
+        invoicingList: [{
+          label: '航天信息',
+          value: 1
+        }, {
+          label: '百旺',
+          value: 2
+        }],
         formLabelWidth: '300px',
         invoicing: '',
         deleteshow: false,
@@ -369,8 +406,8 @@
 
         ruleForm: {
           type: [
-            '打印身份证(正反面)',
-            '打印银行卡(正反面)',
+            '打印身份证',
+            '打印银行卡',
             '打印结算凭证',
             '打印检斤单',
             '打印回执单'
@@ -402,6 +439,7 @@
         warehouseNameKey: '',
         warehouseName: '',
         isShowPrint: false,
+        invoicingshow: false,
         printData: {},
         warehouse: [],
         disabled: false,
@@ -425,6 +463,10 @@
           year: dayjs().format('YYYY'),
           month: dayjs().format('MM'),
         },
+        accessoryTFs: false,
+        fileList: [],
+        appendixIdsAdd: '',
+        excelFreightspace: [],
       }
     },
     activated() {
@@ -434,14 +476,153 @@
       // this.getList()
     },
     updated() {
+
       this.$nextTick(() => {
         this.$refs['table'].doLayout()
       })
     },
     methods: {
+      importClick(file, fileList) {
+        this.fileTemp = file.raw
+        let fileName = file.raw.name
+        let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
+        // 判断上传文件格式
+        if (this.fileTemp) {
+          if (fileType == 'xlsx' || fileType == 'xls') {
+            this.importf(this.fileTemp)
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '附件格式错误,请删除后重新上传!',
+            })
+          }
+        } else {
+          this.$message({
+            type: 'warning',
+            message: '请上传附件!',
+          })
+        }
+      },
+      importf(obj) {
+        this.excelFreightspace = []
+        // this.dialogVisible = true;
+        let _this = this;
+        let inputDOM = this.$refs.inputer; // 通过DOM取文件数据
+        this.file = event.currentTarget.files[0];
+        var rABS = false; //是否将文件读取为二进制字符串
+        var f = this.file;
+        var reader = new FileReader();
+        //if (!FileReader.prototype.readAsBinaryString) {
+        FileReader.prototype.readAsBinaryString = function(f) {
+          var binary = '';
+          var rABS = false; //是否将文件读取为二进制字符串
+          var pt = this;
+          var wb; //读取完成的数据
+          var outdata;
+          var reader = new FileReader();
+          reader.onload = function(e) {
+            var bytes = new Uint8Array(reader.result);
+            var length = bytes.byteLength;
+            for (var i = 0; i < length; i++) {
+              binary += String.fromCharCode(bytes[i]);
+            }
+            var XLSX = require('xlsx');
+            if (rABS) {
+              wb = XLSX.read(btoa(fixdata(binary)), { //手动转化
+                type: 'base64',
+                cellDates: true
+              });
+            } else {
+              wb = XLSX.read(binary, {
+                type: 'binary'
+              });
+            }
+            // outdata就是你想要的东西 excel导入的数据
+            outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
+            // excel 数据再处理
+            let arr = []
+            outdata.map(v => {
+              // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
+              let jsonString = JSON.stringify(v).replace(/\//g, '').replace(/\s/ig, '');
+              v = JSON.parse(jsonString);
+              let obj = {}
+              //xxx代表列名
+              obj.qualityNo = v.业务编号
+              obj.customerName = v.客户姓名
+              obj.customerNumberCard = v.身份证号
+              obj.customerPhone = v.客户手机号
+              obj.carNumber = v.车牌号
+              obj.grossWeight = v.毛重
+              obj.tare = v.皮重
+              obj.netWeight = v.净重
+              obj.dryGrainPrice = v.单价
+              obj.qualityDate = _this.formatDate(v.日期,'-')
+              _this.excelFreightspace.push(obj)
+            })
+            if (_this.excelFreightspace) {
+              importWord({
+                  warehouseName: _this.warehouseName,
+                  qualityInspectionManagementList: _this.excelFreightspace
+                }).toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.$notify({
+                      title: '成功',
+                      message: '导入成功',
+                      type: 'success'
+                    });
+                    _this.getList()
+                  }
+                })
+
+            }
+          }
+          reader.readAsArrayBuffer(f);
+        }
+        if (rABS) {
+          reader.readAsArrayBuffer(f);
+        } else {
+          reader.readAsBinaryString(f);
+        }
+
+      },
+      formatDate(numb, format) {
+        const old = numb - 1;
+        const t = Math.round((old - Math.floor(old)) * 24 * 60 * 60);
+        const time = new Date(1900, 0, old, 0, 0, t)
+        const year = time.getFullYear() ;
+        const month = time.getMonth() + 1 ;
+        const date = time.getDate() ;
+        return year + format + (month < 10 ? '0' + month : month) + format + (date < 10 ? '0' + date : date)+' 00:00:00'
+      },
+      invoicingClose() {
+        this.invoicingshow = false
+      },
+      settleaccounts(row) {
+        this.$confirm('确定将该笔业务进行反结算操作?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+
+          suspendinstance({
+              workflowId: row.workflowId,
+              id: row.id
+            }).toPromise()
+            .then((response) => {
+              this.$message({
+                type: 'success',
+                message: '反结算成功!'
+              });
+              this.getList()
+            })
+        }).catch(() => {
+          return false
+        });
+
+      },
       imgshow() {
         this.deleteshow = false
-        console.log(11111)
       },
       handlePictureCardPreview(file) {
         this.dialogImageUrl = file.url;
@@ -450,8 +631,6 @@
       previewPayOrder(val) {
         this.paymentReceipt = val.paymentScreenshot
         this.isPreviewPayOrder = true
-        console.log(val.paymentScreenshot)
-
       },
       paymentReceiptClose() {},
       datechange() {
@@ -491,7 +670,6 @@
         this.value2 = [formatDate, nowData] // 默认赋值一年时间
       },
       selectPrint() {
-        console.log('批量打印数据', this.modification)
         this.printType = 1
         this.isShowPrintType = true
       },
@@ -511,7 +689,6 @@
         }
       },
       async exportlist() {
-        console.log('导出数据', this.modification)
         let _data = {
           paymentManagementList: this.modification,
         }
@@ -583,21 +760,12 @@
           xmlhttp.send()
         })
       },
-      invoicingClick() {
-        // let data = JSON.stringify({
-        //   paymentManagementList : this.modification
-        // })
-        // //开票
-        //   invoicing(data)
-        //   .toPromise()
-        //   .then(response => {
-        //     console.log(response)
-        //   })
-
+      invoicingconfirm() {
         let data = {
           paymentManagementList: this.modification,
         }
         for (let i = 0; i < this.modification.length; i++) {
+          this.modification[i].invoiceFlag = this.invoiceFlag
           if (
             this.modification[i].status != '全部付款' &&
             this.modification[i].status != '部分付款' &&
@@ -614,16 +782,33 @@
             if (response.length > 0) {
               var arr = []
               for (let i = 0; i < response.length; i++) {
+                let _name = response[i].replace('https://taohaoliang.oss-cn-beijing.aliyuncs.com/FP/',"")
                 arr.push({
                   fileUrl: response[i],
-                  renameFileName: '发票' + i + '.xml',
+                  renameFileName: _name,
                 })
               }
               this.filesToRar(arr, '开票XML文件')
+            }else{
+               this.$message.error('暂无数据')
+               return
             }
           })
           .catch(() => {})
       },
+      invoicingClick() {
+        this.invoicingshow = true
+        // let data = JSON.stringify({
+        //   paymentManagementList : this.modification
+        // })
+        // //开票
+        //   invoicing(data)
+        //   .toPromise()
+        //   .then(response => {
+        //     console.log(response)
+        //   })
+
+      },
       customer(row) {
         getCustomerLook({
             id: row.identityId,
@@ -647,21 +832,19 @@
       },
       //合计
       getSummaries(param) {
-        console.log(param)
         const {
           columns,
           data
         } = param
         const sums = []
         var _number = []
-        if (this.warehouseName == "鲅鱼圈金信库") {
+        if (this.warehouseName == '鲅鱼圈金信库') {
           _number = [11, 12, 16, 17, 18]
         } else {
           _number = [10, 11, 15, 16, 17]
         }
         if (this.modification.length > 0) {
           columns.forEach((column, index) => {
-            console.log(column, index)
             if (index === 0) {
               sums[index] = '合计'
             } else if (index === 10 || index === 11 || index === 15 || index === 16) {
@@ -688,7 +871,7 @@
             if (index === 0) {
               sums[index] = '合计'
             } else if (index === _number[0] || index === _number[1] || index === _number[2] || index === _number[
-              3] || index === _number[4]) {
+                3] || index === _number[4]) {
               const values = data.map((item) => Number(item[column.property]))
               if (!values.every((value) => isNaN(value))) {
                 sums[index] = values.reduce((prev, curr) => {
@@ -716,10 +899,10 @@
       selectType(val) {
         for (let i = 0; i < this.ruleForm.type.length; i++) {
           switch (this.ruleForm.type[i]) {
-            case '打印身份证(正反面)':
+            case '打印身份证':
               this.isShowPrintType1 = !this.isShowPrintType1
               break
-            case '打印银行卡(正反面)':
+            case '打印银行卡':
               this.isShowPrintType2 = !this.isShowPrintType2
               break
             case '打印结算凭证':
@@ -727,13 +910,16 @@
             case '打印检斤单':
               this.isShowPrintType4 = !this.isShowPrintType4
               break
+            case '打印回执单':
+              this.isShowPrintType5 = !this.isShowPrintType5
+              break
           }
         }
       },
       typePrintCannelClick() {
         this.isShowPrintType = false
       },
-      typePrintClick(type) {
+      async typePrintClick(type) {
         // type 1批量打印 0单个打印
         //  this.isShowPrint = true
         this.selectCustomerList = []
@@ -742,7 +928,7 @@
           let index1 = 0
           let index2 = 0
           for (let i = 0; i < this.modification.length; i++) {
-            getCustomerLook({
+            await getCustomerLook({
                 id: this.modification[i].identityId,
                 authenticationStatusKey: 7,
               })
@@ -1234,16 +1420,18 @@
               })
               .toPromise()
               .then((response) => {
-                workflowcontent({
-                    workflowId: item.workflowId,
-                    businessKey: item.id,
-                    type: '付款管理'
-                  }).toPromise()
-                  .then((response1) => {
-                    console.log(response1)
-                    // this.$message.success('审核成功')
-                    // this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
-                  })
+                if (index == 0) {
+                  workflowcontent({
+                      workflowId: item.workflowId,
+                      businessKey: item.id,
+                      type: '付款管理'
+                    }).toPromise()
+                    .then((response1) => {
+                      console.log(response1)
+                      // this.$message.success('审核成功')
+                      // this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
+                    })
+                }
                 this.audit(
                   this.modification[index + 1],
                   index + 1,
@@ -1261,16 +1449,18 @@
               })
               .toPromise()
               .then((response) => {
-                workflowcontent({
-                    workflowId: item.workflowId,
-                    businessKey: item.id,
-                    type: '付款管理'
-                  }).toPromise()
-                  .then((response1) => {
-                    console.log(response1)
-                    // this.$message.success('审核成功')
-                    // this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
-                  })
+                if (index == 0) {
+                  workflowcontent({
+                      workflowId: item.workflowId,
+                      businessKey: item.id,
+                      type: '付款管理'
+                    }).toPromise()
+                    .then((response1) => {
+                      console.log(response1)
+                      // this.$message.success('审核成功')
+                      // this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
+                    })
+                }
                 // postqueryhandle({workflowId:item.workflowId}).toPromise()
                 // .then((response) => {
                 this.audit(

+ 238 - 13
src/views/houseSelfCollect/weighingManagement.vue

@@ -35,8 +35,9 @@
             " 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% - 130px)"
-      @row-click="handleRowClick" @selection-change="handleSelectionChange">
+    <el-table :data="weighingList" style="width: 100%; margin-top: 20px" ref="weighingList" border
+      height="calc(100% - 130px)" @row-click="handleRowClick" @selection-change="handleSelectionChange"
+      :summary-method="getSummaries" show-summary>
       <el-table-column type="selection" width="55"></el-table-column>
       <el-table-column type="index" label="序号" width="50">
         <template scope="scope">
@@ -98,7 +99,7 @@
         </template>
       </el-table-column>
       <el-table-column prop="status" label="状态"></el-table-column>
-      <el-table-column width="270" prop="contractNo1" label="操作">
+      <el-table-column width="340" prop="contractNo1" label="操作">
         <template slot-scope="scope">
           <el-button @click="weightCheck(scope.row, 1)" v-if=" scope.row.status == '已称毛重' || scope.row.status == '已质检' "
             v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`">毛重</el-button>
@@ -106,6 +107,10 @@
           <el-button :disabled="scope.row.allow == 2" @click="weightCheck(scope.row, 2)"
             v-if=" (scope.row.status == '已称毛重' || scope.row.status == '已称皮重') "
             v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`">皮重</el-button>
+          <div style="display: inline-block;">
+            <el-button :disabled="scope.row.allow == 2" @click="del(scope.row)" type="danger"
+              v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
+          </div>
           <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' ||scope.row.status == '已称毛重'"
             v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
         </template>
@@ -113,7 +118,7 @@
     </el-table>
     <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"
+        :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" layout="total, sizes, prev, pager, next, jumper"
         :total="deptBudgetTotal">
       </el-pagination>
     </div>
@@ -127,6 +132,40 @@
             <el-radio label="A5" class="label-width" @change="selectType">A5</el-radio>
           </el-radio-group>
         </div>
+
+        <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
+          <div>收货单位:</div>
+          <!-- <div>{{companyName}}</div> -->
+          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
+            <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'">
+          <div class="print-type-ew">
+            <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
+            <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
+          </div>
+          <div class="ew-print" v-if="printSeparately">
+            <div class="row">
+              <div>额外客户姓名:</div>
+              <!-- <div>{{companyName}}</div> -->
+              <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
+                <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+            </div>
+            <div class="row">
+              <div>额外收货单位:</div>
+              <!-- <div>{{companyNameEW}}</div> -->
+              <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
+                <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </div>
+          </div>
+        </div>
       </div>
       <div class="bottom-btn">
         <el-button @click="typePrintClick">确定</el-button>
@@ -146,6 +185,7 @@
 <script>
   import {
     getweighingList,
+    getweighingDelete,
     selectWarehouseSelf,
     getPrint
   } from '@/model/houseSelfCollect/index'
@@ -158,6 +198,42 @@
     watch: {},
     data() {
       return {
+        ewCustomerOptions: [{
+            value: '黑龙江利润元粮食贸易有限公司',
+            label: '黑龙江利润元粮食贸易有限公司'
+          }, {
+            value: '黑龙江众利合粮食贸易有限公司',
+            label: '黑龙江众利合粮食贸易有限公司'
+          }, {
+            value: '黑龙江鑫满仓粮食贸易有限公司',
+            label: '黑龙江鑫满仓粮食贸易有限公司'
+          }, {
+            value: '黑龙江中天昊元贸易有限公司',
+            label: '黑龙江中天昊元贸易有限公司'
+          }],
+        companyNameOptions: [{
+          value: '黑龙江利润元粮食贸易有限公司',
+          label: '黑龙江利润元粮食贸易有限公司'
+        }, {
+          value: '黑龙江众利合粮食贸易有限公司',
+          label: '黑龙江众利合粮食贸易有限公司'
+        }, {
+          value: '黑龙江鑫满仓粮食贸易有限公司',
+          label: '黑龙江鑫满仓粮食贸易有限公司'
+        }, {
+          value: '黑龙江中天昊元贸易有限公司',
+          label: '黑龙江中天昊元贸易有限公司'
+        }, ],
+        companyNameEWOptions: [{
+          value: '厦门建发物产有限公司',
+          label: '厦门建发物产有限公司'
+        }],
+        companyName: '黑龙江利润元粮食贸易有限公司',
+        companyNameEW: "厦门建发物产有限公司",
+        ewCustomer: "黑龙江利润元粮食贸易有限公司",
+        ewradio: '',
+        ddchecked: false,
+        checked: false,
         //分页
         currentPage: 1,
         pageSize: 10,
@@ -191,13 +267,72 @@
         endDate: '',
         excelPrintData: [],
         isExcelPrint: false,
+        selectEW: false,
+        printSeparately: false
       }
     },
+    computed: {
+      // companyName(){
+      //     if(this.warehouseName=='鲅鱼圈金信库'||this.warehouseName=='白城内陆港'){
+      //       return '黑龙江利润元贸易有限公司'
+      //     }
+      //     return "黑龙江中天昊元贸易有限公司"
+      //   }
+    },
     activated() {
       this.selectWarehouse()
 
     },
     methods: {
+      //合计
+      getSummaries(param) {
+        const {
+          columns,
+          data
+        } = param
+        const sums = []
+        columns.forEach((column, index) => {
+          if (index === 0) {
+            sums[index] = '合计'
+          } else if (
+            index === 10) {
+            const values = data.map((item) => Number(item[column.property]))
+            console.log(values)
+            // console.log(values)
+            if (values.length > 0) {
+              sums[index] = values.reduce((prev, curr) => {
+                const value = Number(curr)
+                if (!isNaN(value)) {
+                  return prev + curr
+                } else {
+                  return prev
+                }
+              }, 0)
+            } else {
+              sums[index] = 0
+            }
+          } else {
+            sums[index] = '--'
+          }
+        })
+        return sums
+      },
+      changeEwDD(e) {
+        this.checked = false
+        if (e) {
+          this.printSeparately = true
+        } else {
+          this.printSeparately = false
+        }
+      },
+      changeEw(e) {
+        this.ddchecked = false
+        if (e) {
+          this.printSeparately = true
+        } else {
+          this.printSeparately = false
+        }
+      },
       selectType(val) {
         console.log(val)
         // for (let i = 0; i < this.ruleForm.type.length; i++) {
@@ -337,10 +472,25 @@
       printSmall() {
         window.open('../../../../static/weightCheck.html?type=1&tableData=' + JSON.stringify(this.dialogData))
       },
+      makeEWjjSelectPrintList() {
+        let _selectPrint_EWjjSelectPrintList = JSON.parse(JSON.stringify(this.jjSelectPrintList));
+        for (let i = 0; i < _selectPrint_EWjjSelectPrintList.length; i++) {
+          let _data = _selectPrint_EWjjSelectPrintList[i];
+          _data.compName = this.companyNameEW;
+          _data.customer = this.ewCustomer
+        }
+        localStorage.setItem('selectPrint_EWjjSelectPrintList', JSON.stringify(_selectPrint_EWjjSelectPrintList))
+      },
       printBig(type, radioType) {
+        // 打印额外
+        if (this.checked || this.ddchecked) {
+          this.makeEWjjSelectPrintList()
+          //  this.selectEW = true;
+        }
         if (type == 1) {
           localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
-          window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
+          window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType + '&selectEW=' + this
+            .checked + '&selectEWDD=' + this.ddchecked)
         } else if (type == 2) {
           localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
           window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
@@ -349,7 +499,7 @@
           window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogData))
         }
       },
-      typePrintClick(type) {
+      async typePrintClick(type) {
         if (this.isExcelPrint) {
           this.printBig(2, this.radio)
           this.isExcelPrint = false
@@ -358,15 +508,18 @@
           this.jjSelectPrintList = []
           let index1 = 0;
           for (let i = 0; i < this.modification.length; i++) {
-            getPrint({
+            await getPrint({
                 id: this.modification[i].id
               })
               .toPromise()
               .then((response) => {
                 index1++;
+                response.compName = this.companyName
+
                 if (response.compName == '黑龙江秋收有限公司') {
                   response.compName = '黑龙江中天昊元贸易有限公司'
                 }
+
                 this.jjSelectPrintList.push(response)
                 if (index1 == this.modification.length) {
                   this.printBig(1, this.radio)
@@ -426,15 +579,18 @@
         this.getList()
       },
       isConfirmQuality(val) {
-        if (val.qualityInspectionManagement.confirm == '1' && val.qualityInspectionManagement.warehouseName == '哈尔滨依兰库')
+        if (val.qualityInspectionManagement.confirm == '0' && val.qualityInspectionManagement.warehouseName == '白城内陆港')
           return false;
-        return true
+        return true;
       },
       weightCheck(row, num) {
         console.log(this.cangid)
         // 质检是否是已确定状态
-        // let _isGoweightCheck = this.isConfirmQuality(row)
-        let _isGoweightCheck = true
+        let _isGoweightCheck = this.isConfirmQuality(row)
+        // let _isGoweightCheck = true
+        if (num == 1) {
+          _isGoweightCheck = true
+        }
         console.log(row.qualityInspectionManagement)
         if (_isGoweightCheck) {
           this.$router.push({
@@ -476,6 +632,33 @@
         }
 
       },
+      del(row) {
+        //删除
+        this.$confirm('确定删除检斤信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            getweighingDelete({
+                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
+          })
+      },
       find() {
         this.getList()
       },
@@ -734,8 +917,8 @@
     left: 0;
     right: 0;
     margin: auto;
-    width: 220px;
-    height: 160px;
+    width: 440px;
+    height: 320px;
     background: white;
     border-radius: 10px;
     z-index: 999;
@@ -776,4 +959,46 @@
     border-top-right-radius: 0px;
     border-bottom-right-radius: 0px;
   }
+
+  .ew-print {
+    padding: 0 20px;
+    margin-top: 10px;
+
+    // display: flex;
+    // justify-content: space-between;
+    // align-content: center;
+    .row {
+      display: flex;
+      margin-top: 10px;
+      align-items: center;
+    }
+  }
+
+  .sh-address {
+    display: flex;
+  }
+
+  .print-type-ew {
+    display: flex;
+    justify-content: space-between;
+    padding: 0 20px;
+
+    /deep/.el-radio__label {
+      font-size: 14px;
+    }
+
+    margin-top: 10px;
+  }
+
+  /deep/.el-table .cell {
+    text-align: center;
+  }
+
+  .shdw-style {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 20px;
+    margin-top: 20px;
+  }
 </style>

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

@@ -1340,7 +1340,7 @@ export default {
   display: flex;
 
   .left {
-    min-width: 500px;
+    min-width: 570px;
      position: relative;
     // padding:0 20px 20px 20px;
 
@@ -1349,7 +1349,7 @@ export default {
       color: #2aff7c;
       font-size: 32px;
       text-align: right;
-      padding: 0 20px;
+       padding: 0 10px 0 20px;
       border-radius: 10px;
       margin: 0 20px 20px 20px;
         position: absolute;

+ 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"

+ 1147 - 1336
src/views/platformAudit/purchaseContractAdd.vue

@@ -5,19 +5,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
-        >
+        <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">
@@ -29,165 +19,79 @@
       </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 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-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-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-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-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
-          >
+          <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-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 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-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"
-            >
+          <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 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-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-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>
+                <i class="el-icon-delete" style="line-height: 29px" @click.stop="deleteClick(item, index)"></i>
               </span>
             </el-option>
             <!-- 新增按钮 -->
             <el-option value="" label="">
-              <div
-                style="
+              <div style="
                   text-align: right;
                   border-top: 1px solid #dcdfe6;
                   padding: 5px;
-                "
-              >
+                ">
                 <ws-button type="primary" @click.stop="addClick">{{
                   $t('button.add')
                 }}</ws-button>
@@ -197,143 +101,58 @@
         </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-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-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-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-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 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-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"
-          />
+          <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-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"
-          />
+          <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-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-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 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"
-            />
+        <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>
@@ -345,95 +164,55 @@
       <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 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-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 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-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-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-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-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-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完整粒占比(%)" maxlength="100"
+            size="small" />
         </ws-form-item>
       </ws-info-table>
 
@@ -445,67 +224,39 @@
       <ws-info-table>
         <!--已付款(元)-->
         <ws-form-item label="已付款(元)" span="1" prop="goodsNameKey">
-          <ws-input
-            v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
-            placeholder="请输入已付款(元)"
-            maxlength="100"
-            size="small"
-          />
+          <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
-            v-model="deptBudgetList.contractProcessInfo.goodsName"
-            placeholder="请输入已开发票(元)"
-            maxlength="100"
-            size="small"
-          />
+          <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
-            v-model="deptBudgetList.contractProcessInfo.waterContent"
-            placeholder="请输入费用支出(元)"
-            maxlength="100"
-            size="small"
-          />
+          <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
-            v-model="deptBudgetList.contractProcessInfo.impurity"
-            placeholder="请输入未开发票(元)"
-            maxlength="100"
-            size="small"
-          />
+          <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 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-input v-model="deptBudgetList.contractProcessInfo.imperfectGrain" placeholder="请输入已完成发货量(吨)"
+            maxlength="100" size="small" />
         </ws-form-item>
       </ws-info-table>
 
@@ -513,1105 +264,1165 @@
         <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-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
-      >
+      <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
+  //  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,
     },
-  },
-  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' },
-        // ],
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
       },
-      options: [],
-      staffList: [],
-      appendixIdsAdd: '',
-      size: 10,
-      // uploadSuccess: {},
-      // onChange:{},
-      unitList: [],
-      goodnameList: [],
-      value1: '袋装',
-      value2: '未回收',
-      gradeList: [],
-      ChapterTwoList: [],
-
-      deptBudgetList: {
-        deliverType: '1',
-        finalTradingVolume: 0,
-        contractGoodsInfo: {
-          goodsName: '',
-        },
-        contractProcessInfo: {},
+      isShow(val) {
+        this.showType = val
       },
-      acceptanceCheck: {},
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
+    },
+    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' },
+          // ],
         },
-      },
-      // 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',
+        options: [],
+        staffList: [],
+        appendixIdsAdd: '',
+        size: 10,
+        // uploadSuccess: {},
+        // onChange:{},
+        unitList: [],
+        goodnameList: [],
+        value1: '袋装',
+        value2: '未回收',
+        gradeList: [],
+        ChapterTwoList: [],
+
+        deptBudgetList: {
+          deliverType: '1',
+          finalTradingVolume: 0,
+          contractGoodsInfo: {
+            goodsName: '',
           },
-        ],
-      },
-      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
-        }
+          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: {},
       }
     },
-    // 关闭 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
+    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')
         })
-      // 品级
-      packList({ constId: 'CON3' })
         .toPromise()
         .then((response) => {
-          this.gradeList = response
+          this.options = response
+          this.staffList = 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)
-      })
+      this.loaddata()
+      this.showType = this.isShow
     },
-    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
+    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
             }
           })
-          //
-          if (currItem) {
-            this.selectContract(currItem.constValue)
+        } 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)
 
-    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',
+        // 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)
         })
-        return
-      }
+      },
+      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)
+            }
+          })
+      },
 
-      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
-      }
+      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 -
+        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 -
+          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(
+        ) {
+          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(
+        ) {
+          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 -
+        ) {
+          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 -
+        ) {
+          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('.') +
+                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 -
+        ) {
+          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('.') +
+                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 -
+        ) {
+          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('.') +
+                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(
+        ) {
+          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(
+        ) {
+          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)
+        ) {
+          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('.') +
+                this.deptBudgetList.contractProcessInfo.imperfectGrain
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '已完成发运量输入错误',
-          type: 'warning',
-        })
-        return
-      }
+        ) {
+          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]]
+        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)
 
-          addList(this.deptBudgetList)
+        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.$message.success('添加成功')
-              this.deptBudgetList = {
-                deliverType: '1',
-                finalTradingVolume: 0,
-                contractGoodsInfo: {
-                  goodsName: '',
-                },
-                contractProcessInfo: {},
-              }
-              this.$router.push({ path: 'buyContract' })
+              this.getUnitList()
             })
-            .catch((req) => {
-              EventBus.$emit('error', req.message)
+        } 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()
             })
-        } 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)
+      },
+      // selectContract(val) {
+      //   let key = this.unitList.find((item) => item.constValue === val).constKey
+      //   this.pleaseChoose = val
+      // },
 
-      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
+      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
+      },
+      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
+      },
+      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
+      },
+      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
+      },
+      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 = ''
-        })
+      },
+      // 编辑
+      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;
+  .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;
-    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;
 
-  /deep/.auditFlow-box {
-    position: unset;
-    margin-left: 10px;
-    &/deep/.auditFlow-icon {
-      width: auto;
-      padding-right: 30px;
+      &>span {
+        line-height: 50px;
+      }
     }
-    &/deep/.auditFlow-main {
-      position: absolute;
+
+    /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;
+
+  .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;
+
+  .collapse-bottom {
+    margin-bottom: 20px;
   }
-  .el-icon-arrow-up {
-    display: none;
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
   }
-  .el-textarea__inner {
-    background-color: #fff !important;
-    border: 0;
+
+  .bg-left {
+    padding-left: 30px;
   }
-  .el-date-editor {
-    i {
-      display: none;
-    }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
   }
-  .is-disabled {
-    .el-input__inner:hover {
-      background-color: #fff !important;
-      border: 0;
-    }
-    color: #606266;
+
+  .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 {
-      background-color: #fff !important;
-      border: 0;
-      color: #606266;
+      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 {
+  // 控制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/.is-disabled {
-  .el-input__prefix,
-  .el-input__suffix {
-    display: none;
+
+  .winseaview-view {
+    padding: 0 0 20px;
   }
-  .el-input__inner {
-    background-color: #fff;
-    border-color: #fff !important;
-    color: #000 !important;
-    font-size: 14px;
-    cursor: text;
-    padding: 0 !important;
+
+  .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%;
   }
-}
-.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>
+</style>

+ 1116 - 1291
src/views/platformAudit/purchaseContractEdit.vue

@@ -7,27 +7,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-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"
-    >
+    <ws-form ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
       <div class="remark">
         <h3>基本信息</h3>
         <p style="color: #8890b1">
@@ -37,23 +22,13 @@
       </div>
       <ws-info-table>
         <!-- 合同编号 -->
-        <ws-form-item
-          class="readonly"
-          label="合同编号"
-          span="1"
-          prop="contractNo"
-        >
+        <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-input v-model="deptBudgetList.shippingType" maxlength="100" placeholder="请输入运输方式" size="small" />
         </ws-form-item>
 
         <!-- 买方 -->
@@ -62,118 +37,62 @@
         </ws-form-item>
         <!-- 交货方式 -->
         <ws-form-item label="结算方式" span="1" prop="settlementMethod">
-          <ws-input
-            v-model="deptBudgetList.settlementMethod"
-            maxlength="100"
-            placeholder="请输入结算方式"
-            size="small"
-          />
+          <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 class="readonly" label="卖方" span="1" prop="seller">{{ deptBudgetList.seller }}
         </ws-form-item>
 
-        <ws-form-item
-          class="readonly"
-          label="交货方式"
-          span="1"
-          prop="sourceGoods"
-        >
+        <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-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 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-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"
-            >
+          <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>
+                  <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-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-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>
+                <i class="el-icon-delete" style="line-height: 29px" @click.stop="deleteClick(item, index)"></i>
               </span>
             </el-option>
             <!-- 新增按钮 -->
             <el-option value="" label="">
-              <div
-                style="
+              <div style="
                   text-align: right;
                   border-top: 1px solid #dcdfe6;
                   padding: 5px;
-                "
-              >
+                ">
                 <ws-button type="primary" @click.stop="addClick">{{
                   $t('button.add')
                 }}</ws-button>
@@ -183,147 +102,67 @@
         </ws-form-item>
         <!-- 重量(吨) -->
         <ws-form-item label="重量(吨)" span="1" prop="weight">
-          <ws-input
-            v-model="deptBudgetList.weight"
-            maxlength="100"
-            size="small"
-            placeholder="请输入重量(吨)"
-          />
+          <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-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-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-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-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-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"
-          />
+          <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-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"
-          />
+          <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-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-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 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"
-            />
+        <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>
@@ -333,86 +172,39 @@
           <h3>货物信息</h3>
         </div>
         <ws-info-table>
-          <ws-form-item
-            class="readonly"
-            label="货名"
-            span="1"
-            prop="waterContent"
-          >
+          <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-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 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-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-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 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-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 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">
@@ -420,1141 +212,1174 @@
         </div>
         <ws-info-table>
           <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
-              placeholder="请输入已付款(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.goodsName"
-              placeholder="请输入已开发票(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.waterContent"
-              placeholder="请输入费用支出(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.impurity"
-              placeholder="请输入未开发票(元)"
-              maxlength="100"
-              size="small"
-            />
+          <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 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-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"
-        />
+        <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
-      >
+      <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: {},
+  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()
       },
-      options_: regionData,
-      selectedOptions: [],
-      selectedOptions1: [],
-      mainReportAdd: {},
-      list: {},
-      unitList: [],
-      options: [],
-      staffList: [],
-      packtypeList: [],
-      goodnameList: [],
-      gradeList: [],
-      ChapterTwoList: [],
-      appendixIdsAdd: '',
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
-        },
+      isShow(val) {
+        this.showType = val
       },
-      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
-        }
-      }
+    components: {
+      WsUpload,
     },
-    handleChange(value) {
-      this.selectedOptions = value
-    },
-    handleChange1(value) {
-      this.selectedOptions1 = value
+    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'),
+      }
     },
-    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
+    activated() {
+      getstaff({
+          compId: sessionStorage.getItem('ws-pf_compId')
         })
-      // 双章
-      packList({ constId: 'CON4' })
         .toPromise()
         .then((response) => {
-          this.ChapterTwoList = response
+          this.options = response
+          this.staffList = response
         })
+      this.loaddata()
+      this.showType = this.isShow
     },
-    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
+    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
             }
           })
-          //
-          if (currItem) {
-            this.selectContract(currItem.constValue)
+        } 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: '',
         })
-    },
-    // 关闭 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
+      },
+      // 上传附件
+      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
+      },
+      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
+      },
+      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
+      },
+      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)
+      },
+      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()
+        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
           })
-      } 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()
+            this.pleaseChoose = ''
           })
-      }
-    },
-    // 编辑
-    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
-      }
+      },
+      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 (!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 -
+        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 -
+          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(
+        ) {
+          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(
+        ) {
+          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 -
+        ) {
+          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 -
+        ) {
+          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('.') +
+                this.deptBudgetList.contractGoodsInfo.imperfectGrain
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '不完整粒输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+        ) {
+          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 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.goodsNameKey
-            ).indexOf('.') +
+                this.deptBudgetList.contractProcessInfo.goodsNameKey
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '合同收入金额输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+        ) {
+          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 &&
+            String(this.deptBudgetList.contractProcessInfo.waterContent).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.waterContent
-            ).indexOf('.') +
+                this.deptBudgetList.contractProcessInfo.waterContent
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '费用金额输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+        ) {
+          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(
+          (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.$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(
+          (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.$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)
+          (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
             .length -
             (String(
-              this.deptBudgetList.contractProcessInfo.imperfectGrain
-            ).indexOf('.') +
+                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
+        ) {
+          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;
+  .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;
-    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;
 
-  /deep/.auditFlow-box {
-    position: unset;
-    margin-left: 10px;
-    &/deep/.auditFlow-icon {
-      width: auto;
-      padding-right: 30px;
+      &>span {
+        line-height: 50px;
+      }
     }
-    &/deep/.auditFlow-main {
-      position: absolute;
+
+    /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;
+
+  .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;
+
+  .collapse-bottom {
+    margin-bottom: 20px;
   }
-  .el-icon-arrow-up {
-    display: none;
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
   }
-  .el-textarea__inner {
-    background-color: #fff !important;
-    border: 0;
+
+  .bg-left {
+    padding-left: 30px;
   }
-  .el-date-editor {
-    i {
-      display: none;
-    }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
   }
-  .is-disabled {
-    .el-input__inner:hover {
-      background-color: #fff !important;
-      border: 0;
-    }
-    color: #606266;
+
+  .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 {
-      background-color: #fff !important;
-      border: 0;
-      color: #606266;
+      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 {
+  // 控制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;
+
+  /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-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;
   }
-}
-.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 {
+
+  .el-textarea {
+    width: 101%;
+  }
+
+  /deep/.iconclose:before {
     display: none;
-}
-/deep/.winsea-card .card__header {
+  }
+
+  /deep/.winsea-card .card__header {
     font-size: 14px;
     color: #409eff;
     padding: 0 0 20px 10px;
     position: relative;
     display: none;
-}
+  }
 </style>

+ 1154 - 1354
src/views/platformAudit/salesContractAdd.vue

@@ -5,19 +5,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="vertion-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt=""
-          />返回</el-button
-        >
+        <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>
 
@@ -34,172 +24,82 @@
 
         <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 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-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-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-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-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 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-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 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-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"
-              >
+            <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
-                  >
+                    {{ 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 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-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-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>
+                  <i class="el-icon-delete" style="line-height: 29px" @click.stop="deleteClick(item, index)"></i>
                 </span>
               </el-option>
               <!-- 新增按钮 -->
               <el-option value="" label="">
-                <div
-                  style="
+                <div style="
                     text-align: right;
                     border-top: 1px solid #dcdfe6;
                     padding: 5px;
-                  "
-                >
+                  ">
                   <ws-button type="primary" @click.stop="addClick">{{
                     $t('button.add')
                   }}</ws-button>
@@ -210,127 +110,54 @@
 
           <!--重量(吨)-->
           <ws-form-item label="重量(吨)" span="1" prop="weight">
-            <ws-input
-              v-model="deptBudgetList.weight"
-              placeholder="请输入重量(吨)"
-              maxlength="100"
-              size="small"
-            />
+            <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 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-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-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 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-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"
-            />
+            <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-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"
-            />
+            <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-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-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 label="最终实际成交量(吨)" span="1" prop="finalTradingVolume">
+            <ws-input v-model="deptBudgetList.finalTradingVolume" placeholder="请输入最终实际成交量" maxlength="100"
+              size="small" />
           </ws-form-item>
         </ws-info-table>
       </ws-form>
@@ -339,105 +166,61 @@
       <h3>货物信息</h3>
     </div>
     <div class="center">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
+      <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 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-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 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-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-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-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-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-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完整粒占比(%)"
+              maxlength="40" size="small" />
           </ws-form-item>
         </ws-info-table>
       </ws-form>
@@ -447,91 +230,51 @@
       <h3>流程信息</h3>
     </div>
     <div class="center">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
         <!--流程信息-->
 
         <ws-info-table>
           <!--合同收入(元)-->
           <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
-              placeholder="请输入合同收入(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.goodsName"
-              placeholder="请输入已开发票(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.waterContent"
-              placeholder="请输入费用支出(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.impurity"
-              placeholder="请输入未开发票(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
-              placeholder="请输入未回款(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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 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 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>
@@ -542,1112 +285,1169 @@
       <h3>备注信息</h3>
     </div>
     <div class="ce">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
+      <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-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
-      >
+      <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
+  //  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,
     },
-  },
-  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: {},
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
       },
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
-        },
+      isShow(val) {
+        this.showType = val
       },
-      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
+    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: {},
+      }
     },
-    returnsales() {
-      this.$router.push({ path: 'salesContract' })
+    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
     },
-    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
+    methods: {
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+      },
+      returnsales() {
+        this.$router.push({
+          path: 'salesContract'
         })
-      // 双章
-      packList({ constId: 'CON4' })
-        .toPromise()
-        .then((response) => {
-          this.ChapterTwoList = response
+      },
+      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)
         })
-    },
-    // 上传附件
-    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
+      },
+      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)
             }
           })
-          //
-          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
-      }
+      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 (!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 -
+        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 -
+          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(
+        ) {
+          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(
+        ) {
+          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 -
+        ) {
+          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 -
+        ) {
+          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('.') +
+                this.deptBudgetList.contractGoodsInfo.imperfectGrain
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '不完整粒输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+        ) {
+          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 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.goodsNameKey
-            ).indexOf('.') +
+                this.deptBudgetList.contractProcessInfo.goodsNameKey
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '合同收入金额输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+        ) {
+          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 &&
+            String(this.deptBudgetList.contractProcessInfo.waterContent).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.waterContent
-            ).indexOf('.') +
+                this.deptBudgetList.contractProcessInfo.waterContent
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '费用金额输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+        ) {
+          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(
+          (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.$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(
+          (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.$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)
+          (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
             .length -
             (String(
-              this.deptBudgetList.contractProcessInfo.imperfectGrain
-            ).indexOf('.') +
+                this.deptBudgetList.contractProcessInfo.imperfectGrain
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '已完成发运量输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+        ) {
+          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 &&
+            String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.mildewGrain
-            ).indexOf('.') +
+                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.$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)
 
-          addList(this.deptBudgetList)
+        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.$message.success('添加成功')
-              this.deptBudgetList = {
-                deliverType: '1',
-                finalTradingVolume: 0,
-                contractGoodsInfo: {
-                  goodsName: '',
-                },
-                contractProcessInfo: {},
-              }
-
-              this.$router.push({ path: 'salesContract' })
+              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()
             })
-        } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          return false
         }
-      })
-    },
-    resetForm(deptBudgetList) {
-      this.$refs[deptBudgetList].resetFields()
-    },
-    saveClick(item, index) {
-      console.log(item)
+      },
+      // selectContract(val) {
+      //   let key = this.unitList.find((item) => item.constValue === val).constKey
+      //   this.pleaseChoose = val
+      // },
 
-      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
+      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
+      },
+      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
+      },
+      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
+      },
+      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
+      },
+      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 = ''
-        })
+      },
+      // 编辑
+      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;
+  /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;
-    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;
 
-  /deep/.auditFlow-box {
-    position: unset;
-    margin-left: 10px;
-    &/deep/.auditFlow-icon {
-      width: auto;
-      padding-right: 30px;
+      &>span {
+        line-height: 50px;
+      }
     }
-    &/deep/.auditFlow-main {
-      position: absolute;
+
+    /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;
+
+  .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;
+
+  .collapse-bottom {
+    margin-bottom: 20px;
   }
-  .el-icon-arrow-up {
-    display: none;
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
   }
-  .el-textarea__inner {
-    background-color: #fff !important;
-    border: 0;
+
+  .bg-left {
+    padding-left: 30px;
   }
-  .el-date-editor {
-    i {
-      display: none;
-    }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
   }
-  .is-disabled {
-    .el-input__inner:hover {
-      background-color: #fff !important;
-      border: 0;
-    }
-    color: #606266;
+
+  .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 {
-      background-color: #fff !important;
-      border: 0;
-      color: #606266;
+      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/.ws-info-table .el-form-item .el-form-item__label {
+    width: 130px;
   }
-}
-/deep/.is-disabled {
-  .el-input__prefix,
-  .el-input__suffix {
-    display: none;
+
+  //*号
+  .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;
   }
-  .el-input__inner {
-    background-color: #fff;
-    border-color: #fff !important;
-    color: #000 !important;
+
+  /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;
-    cursor: text;
-    padding: 0 !important;
+    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;
   }
-}
-.winseaview-view {
-  padding: 0 0 20px;
-}
-.container {
-  overflow: scroll;
-  height: 93vh;
-}
-</style>
+</style>

+ 1104 - 1263
src/views/platformAudit/salesContractEdit.vue

@@ -5,19 +5,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="vertion-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt=""
-          />返回</el-button
-        >
+        <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>
 
@@ -29,11 +19,7 @@
       </p>
     </div>
     <div class="center">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
         <!--基本信息-->
         <ws-info-table>
           <!--合同编号-->
@@ -46,12 +32,7 @@
 
           <!--运输方式-->
           <ws-form-item label="运输方式" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.shippingType"
-              placeholder="请输入运输方式"
-              maxlength="100"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.shippingType" placeholder="请输入运输方式" maxlength="100" size="small" />
           </ws-form-item>
 
           <!--买方-->
@@ -64,12 +45,7 @@
 
           <!--结算方式-->
           <ws-form-item label="结算方式" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.settlementMethod"
-              placeholder="请输入结算方式"
-              maxlength="100"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.settlementMethod" placeholder="请输入结算方式" maxlength="100" size="small" />
           </ws-form-item>
 
           <!--卖方-->
@@ -90,103 +66,52 @@
 
           <!--买方电话-->
           <ws-form-item label="买方电话" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.buyerPhone"
-              placeholder="请输入买方电话"
-              maxlength="100"
-              size="small"
-            />
+            <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 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-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"
-              >
+            <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
-                  >
+                    {{ 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 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-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-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>
+                  <i class="el-icon-delete" style="line-height: 29px" @click.stop="deleteClick(item, index)"></i>
                 </span>
               </el-option>
               <!-- 新增按钮 -->
               <el-option value="" label="">
-                <div
-                  style="
+                <div style="
                     text-align: right;
                     border-top: 1px solid #dcdfe6;
                     padding: 5px;
-                  "
-                >
+                  ">
                   <ws-button type="primary" @click.stop="addClick">{{
                     $t('button.add')
                   }}</ws-button>
@@ -196,43 +121,21 @@
           </ws-form-item>
           <!--重量(吨)-->
           <ws-form-item label="重量(吨)" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.weight"
-              placeholder="请输入重量(吨)"
-              maxlength="100"
-              size="small"
-            />
+            <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 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-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-date-picker v-model="deptBudgetList.deliveryDateEnd" type="date" placeholder="请选择交货日期(止)"
+              value-format="yyyy-MM-dd" />
           </ws-form-item>
 
           <!--合同单价(元/吨)-->
@@ -245,80 +148,37 @@
 
           <!--合同总价-->
           <ws-form-item label="合同总价" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.totalContractPrice"
-              placeholder="请输入合同总价"
-              maxlength="100"
-              size="small"
-            />
+            <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"
-            />
+            <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-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"
-            />
+            <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 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-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 label="最终实际交易量(吨)" span="1" prop="totalContractPrice">
+            <ws-input v-model="deptBudgetList.finalTradingVolume" maxlength="100" placeholder="请输入最终实际交易量"
+              size="small" />
           </ws-form-item>
         </ws-info-table>
       </ws-form>
@@ -328,11 +188,7 @@
       <h3>货物信息</h3>
     </div>
     <div class="center">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
         <!--货物信息-->
         <ws-info-table>
           <!--货名-->
@@ -358,78 +214,46 @@
 
           <!--水分(%)<=-->
           <ws-form-item label="水分(%)" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.contractGoodsInfo.waterContent"
-              placeholder="请输入水分(%)"
-              maxlength="100"
-              size="small"
-            />
+            <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 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-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-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-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-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-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完整粒(%)" maxlength="100"
+              size="small" />
           </ws-form-item>
         </ws-info-table>
       </ws-form>
@@ -438,86 +262,50 @@
       <h3>流程信息</h3>
     </div>
     <div class="center">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
         <!--流程信息-->
 
         <ws-info-table>
           <!--合同收入(元)-->
           <ws-form-item label="合同收入(元)" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
-              placeholder="请输入合同收入(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.goodsName"
-              placeholder="请输入已开发票(元))"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.waterContent"
-              placeholder="请输入费用支出(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.impurity"
-              placeholder="请输入未开发票(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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
-              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
-              placeholder="请输入未回款(元)"
-              maxlength="100"
-              size="small"
-            />
+            <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-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 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>
@@ -528,1075 +316,1128 @@
       <h3>备注信息</h3>
     </div>
     <div class="center">
-      <ws-form
-        ref="deptBudgetList"
-        :rules="ruleDeptBudget"
-        :model="deptBudgetList"
-      >
+      <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-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
-      >
+      <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()
+  // 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,
     },
-    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()
-        },
+    watch: {
+      vesselId(val) {
+        this.loaddata()
       },
-      // selectpackingMethod:{},
-      selectunitList: {},
-      //change:{},
-      onChange: {},
-      uploadSuccess: {},
-      selectgrade: {},
-      goodnameList: {},
-      selectpackingMethod: {},
-      unitList: {},
-      packtypeList: [],
-      compId: sessionStorage.getItem('ws-pf_compId'),
-      appendixIdsAdd: '',
-      size: 10,
-      deptBudgetList: {
-        contractGoodsInfo: {
-          goodsName: '',
-        },
-        contractProcessInfo: {},
+      isShow(val) {
+        this.showType = val
       },
-      // 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
+    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: {},
+      }
     },
-    handleChange1(value) {
-      this.selectedOptions1 = value
+    activated() {
+      //cg.viewBudget
+      //cg.viewSpareMoney
+      // this.getVesselData();
+      this.loaddata()
+      this.editInfo()
+      this.showType = this.isShow
+      // console.log(this.$route.params)
+      this.showType = this.isShow
     },
-    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
+    methods: {
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      returnsales() {
+        this.deptBudgetList = {}
+        this.$router.push({
+          path: 'salesContract'
         })
-    },
-
-    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
+      },
+      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
           })
-          //
-          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)
+        // 包装方式
+        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
+          })
+      },
 
-      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)
+      getUnitList() {
+        xiala({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
           .toPromise()
           .then((response) => {
-            this.getUnitList()
+            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
           })
-      } 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()
+            this.pleaseChoose = ''
           })
-      }
-    },
-    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
-      }
+      },
+      saveClick(item, index) {
+        //  console.log(item)
 
-      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',
+        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: '',
         })
-        return
-      }
+      },
+      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 -
+        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 -
+          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(
+        ) {
+          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(
+        ) {
+          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 -
+        ) {
+          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 -
+        ) {
+          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('.') +
+                this.deptBudgetList.contractGoodsInfo.imperfectGrain
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '不完整粒输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+        ) {
+          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 &&
+            String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.goodsNameKey
-            ).indexOf('.') +
+                this.deptBudgetList.contractProcessInfo.goodsNameKey
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '合同收入金额输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+        ) {
+          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 &&
+            String(this.deptBudgetList.contractProcessInfo.waterContent).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.waterContent
-            ).indexOf('.') +
+                this.deptBudgetList.contractProcessInfo.waterContent
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '费用金额输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+        ) {
+          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(
+          (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.$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(
+          (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.$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)
+          (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
             .length -
             (String(
-              this.deptBudgetList.contractProcessInfo.imperfectGrain
-            ).indexOf('.') +
+                this.deptBudgetList.contractProcessInfo.imperfectGrain
+              ).indexOf('.') +
               1) >
             2)
-      ) {
-        this.$message({
-          message: '已完成发运量输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+        ) {
+          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 &&
+            String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
             (String(
-              this.deptBudgetList.contractProcessInfo.mildewGrain
-            ).indexOf('.') +
+                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 = '特别行政区'
+        ) {
+          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 {
-            this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
           }
-          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({})
+        })
+      },
+      editInfo() {
+        editInfo({})
+      },
+      // getList(){}
     },
-    // 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;
+  /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;
-    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;
 
-  /deep/.auditFlow-box {
-    position: unset;
-    margin-left: 10px;
-    &/deep/.auditFlow-icon {
-      width: auto;
-      padding-right: 30px;
+      &>span {
+        line-height: 50px;
+      }
     }
-    &/deep/.auditFlow-main {
-      position: absolute;
+
+    /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;
+
+  .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;
+
+  .collapse-bottom {
+    margin-bottom: 20px;
   }
-  .el-icon-arrow-up {
-    display: none;
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
   }
-  .el-textarea__inner {
-    background-color: #fff !important;
-    border: 0;
+
+  .bg-left {
+    padding-left: 30px;
   }
-  .el-date-editor {
-    i {
-      display: none;
-    }
+
+  .bg-right {
+    padding: 10px;
+    text-align: right;
   }
-  .is-disabled {
-    .el-input__inner:hover {
-      background-color: #fff !important;
-      border: 0;
-    }
-    color: #606266;
+
+  .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 {
-      background-color: #fff !important;
-      border: 0;
-      color: #606266;
+      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 {
+  // 控制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;
+
+  /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-input__inner {
-    background-color: #fff;
-    border-color: #fff !important;
-    color: #000 !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;
-    cursor: text;
-    padding: 0 !important;
+    font-weight: 400;
+    color: #afb5cb;
+    line-height: 14px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
   }
-}
-.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>
+</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>

+ 64 - 0
src/views/profitable/component/routers/route.js

@@ -0,0 +1,64 @@
+import Layout from '@/layout/index';
+
+const profitableRouter = {
+  path: '/profitable',
+  component: Layout,
+  redirect: '/profitable',
+  name: 'profitable',
+  alwaysShow: true, // will always show the root menu
+  meta: {
+    title: 'profitable',
+    module: 'contractManagement.exContract.exContractInfo.view',
+    icon: '-caigouguanli'
+  },
+  children: [
+      // 盈收概览
+    {
+      path: 'earningsLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/earningsLook'),
+      name: 'earningsLook',
+      meta: {
+        title: 'earningsLook',
+        shortcutEntrance: 'profitable',
+        module: 'contractManagement.exContract.exContractInfo.view',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      }
+    },  
+      // 收支明细
+      {
+        path: 'inOutDetailed',
+        component: () =>
+          import(/* webpackChunkName: "applDetail" */ '@/views/profitable/inOutDetailed'),
+        name: 'inOutDetailed',
+        meta: {
+          title: 'inOutDetailed',
+          shortcutEntrance: 'profitable',
+          module: 'contractManagement.exContract.exContractInfo.view',
+          permissicon: [],
+          keepAlive: true
+          // module: 'procurement.sparepart.applDetail'
+        }
+      }, 
+       // 合同外费用
+       {
+        path: 'contractOtherMoney',
+        component: () =>
+          import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractOtherMoney'),
+        name: 'contractOtherMoney',
+        meta: {
+          title: 'contractOtherMoney',
+          shortcutEntrance: 'profitable',
+          module: 'contractManagement.exContract.exContractInfo.view',
+          permissicon: [],
+          keepAlive: true
+          // module: 'procurement.sparepart.applDetail'
+        }
+      }, 
+  ],
+
+};
+
+export default profitableRouter;

+ 706 - 0
src/views/profitable/contractOtherMoney.vue

@@ -0,0 +1,706 @@
+//合同外费用
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">合同外费用</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"></el-col>
+    </el-row>
+
+    <div class="center">
+      <el-row>
+        <el-col :span="12">
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="!searchType?'primary':''">全部</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">收入</el-button>
+          <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">支出</el-button>
+          <div class="top_info">
+            <span class="info_css">合计收入:{{inmoney}}元</span><span class="info_css">合计支出:{{outmoney}}元</span><span
+              class="info_css">请款中:{{inmoney}}元</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+            <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels
+              range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
+              class="data_css" @change="changeDate">
+            </el-date-picker>
+            <el-input placeholder="按费用名称或用途查找" class="input_css" v-model="searchKeyWord"></el-input>
+            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
+                src="../../../public/img/sousuo.png" alt="" /></el-button>
+          </div>
+          <div class="btn_css">
+            <el-button @click="audit(3)" v-hasPermission=" `contractManagement.exContract.exContractInfo.add`">请款
+            </el-button>
+            <el-button @click="audit(4)" v-hasPermission=" `contractManagement.exContract.exContractInfo.add`">收款
+            </el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <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="reexType" label="类型"></el-table-column>
+          <el-table-column prop="purpose" label="用途"></el-table-column>
+          <el-table-column prop="expenseName" label="费用名称"></el-table-column>
+          <el-table-column prop="amountMoney" label="费用金额(元)" min-width="106"></el-table-column>
+          <el-table-column 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>{{scope.row.addressUrl.split(",").length == 0 ? '' : scope.row.addressUrl.split(",").length}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="payee" label="请款人/收款人" min-width="100"></el-table-column>
+          <el-table-column prop="paymentDate" label="支付日期"></el-table-column>
+          <el-table-column prop="status" label="状态" min-width="81">
+            <template slot-scope="scope">
+              <span style="margin-right:10px">{{scope.row.status}}</span><i class="el-icon-tickets icon_css"
+                v-show="scope.row.reexType == '支出'" @click="showAudit(scope.row)"></i>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" min-width="400">
+            <template slot-scope="scope">
+              <el-button @click="audit(1,scope.row)" v-if="scope.row.reexType == '支出' && scope.row.taskId">审核
+              </el-button>
+              <el-button @click="audit(2,scope.row)"
+                v-hasPermission=" `contractManagement.exContract.exContractInfo.status`">付款</el-button>
+              <el-button @click="audit(5,scope.row)"
+                v-hasPermission=" `contractManagement.exContract.exContractInfo.edit`">编辑</el-button>
+              <el-button @click="delData(scope.row)"
+                v-hasPermission=" `contractManagement.exContract.exContractInfo.delete`">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+      <el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" top="20vh"
+        class="title_css">
+        <el-form ref="formData" :model="formData" label-width="100px">
+          <el-form-item label="费用类型" v-if="btnChange == 3 || btnChange == 4 || btnChange == 5">
+            <el-radio-group v-model="radio">
+              <el-radio v-model="radio" label="1">经营费用</el-radio>
+              <el-radio v-model="radio" label="2">仓库费用</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="费用类型" v-if="btnChange == 1 || btnChange == 2">
+            <template>
+              <el-input value="经营费用" :disabled="disabled" v-if="formData.expenseType == 1"></el-input>
+              <el-input value="仓库费用" :disabled="disabled" v-else></el-input>
+            </template>
+          </el-form-item>
+          <el-form-item label="仓库" v-if="radio == 2">
+            <el-select v-model="formData.warehouseName" placeholder="请选择仓库" style="width:100%" :disabled="disabled">
+              <el-option v-for="(item,index) in warehouseList" :key="index" :label="item.warehouseName"
+                :value="item.warehouseName"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="款项名称">
+            <el-input v-model="formData.expenseName" placeholder="输入费用名称" :disabled="disabled" maxlength="15">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="金额(元)" v-if="btnChange == 3 || btnChange == 4 || btnChange == 5">
+            <el-input v-model="formData.amountMoney" placeholder="输入请款金额" type="number"></el-input>
+          </el-form-item>
+          <el-form-item label="请款(元)" v-if="btnChange == 1 || btnChange == 2">
+            <el-input v-model="formData.amountMoney" placeholder="输入请款金额" :disabled="disabled" type="number"></el-input>
+          </el-form-item>
+          <el-form-item label="备注(选填)" v-if="btnChange == 3 || btnChange == 4 || btnChange == 5">
+            <el-input type="textarea" v-model="formData.remarks" placeholder="输入备注,不超过50个字" maxlength="50" :rows="4">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="请款备注" v-if="btnChange == 1 || btnChange == 2">
+            <el-input type="textarea" v-model="formData.remarks" placeholder="输入备注,不超过50个字" maxlength="50" :rows="4"
+              :disabled="disabled"></el-input>
+          </el-form-item>
+          <el-form-item label="附件">
+            <!-- :limit="1" -->
+            <ws-upload ref="upload" :comp-id="compId" :appendix-ids="formData.addressUrl" :editable="!disabled"
+              :disabled="disabled" @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+              :remarkWord="false" />
+          </el-form-item>
+          <el-form-item label="审核意见" v-if="btnChange == 1">
+            <el-input type="textarea" v-model="formData.opinion" placeholder="选填,不超过50个字" maxlength="50" :rows="4">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="收款日期" v-if="btnChange == 4">
+            <el-date-picker value-format='yyyy-MM-dd' v-model="formData.paymentDate" type="date" placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="付款日期" v-if="btnChange == 2">
+            <el-date-picker value-format='yyyy-MM-dd' v-model="formData.paymentDate" type="date" placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="handleClose" v-if="btnChange != 1">取 消</el-button>
+          <el-button type="primary" @click="submit" v-if="btnChange != 1">确 定</el-button>
+          <el-button @click="examine(1)" v-if="btnChange == 1">驳 回</el-button>
+          <el-button type="primary" @click="examine(2)" v-if="btnChange == 1">通 过</el-button>
+        </span>
+      </el-dialog>
+    </div>
+    <el-dialog title="附件预览" :visible.sync="fujianshow" width="30%" :before-close="fuijianClose" top="30vh"
+      class="title_css">
+      <ws-upload ref="upload" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss" :editable="editable"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+    </el-dialog>
+    <el-dialog title="审核记录" :visible.sync="auditShow" width="30%" :before-close="auditShowClose" top="20vh"
+      class="title_css">
+      <div v-for="(item,index) in auditRecord" :key="index" class="audit">
+        <div class="audit_item">
+          <div class="audit_left">
+            <span class="audit_name">{{item.operateUser}}</span><span
+              v-if="item.approveResult">{{item.approveResult == 0 ? "驳回" : "通过"}}</span><span
+              v-else>{{item.dealMsg}}</span>
+          </div>
+          <span class="audit_date">{{item.operateDate}}</span>
+        </div>
+        <div class="audit_opinion" v-if="item.dealMsg != '付款' && item.approveResult">审核意见:{{item.verifyRemark}}</div>
+        <div class="audit_opinion" v-if="item.dealMsg == '请款' && item.approveResult == null">备注信息:{{item.verifyRemark}}
+        </div>
+      </div>
+
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    getOutMoney,
+    requestFunds,
+    payment,
+    deleteInfo,
+    editInfo,
+    woekflowhandle,
+    getAuditRecord
+  } from '@/model/profitable/index'
+  import {
+    selectWarehouseSelf
+  } from '@/model/houseSelfCollect/index'
+  import WsUpload from '@/components/WsUpload'
+  export default {
+    components: {
+      WsUpload
+    },
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        dialogVisible: false,
+        fujianshow: false,
+        compId: localStorage.getItem('ws-pf_compId'),
+        btnChange: "",
+        title: "",
+        disabled: false,
+        searchType: "",
+        searchKeyWord: "",
+        startDate: "",
+        endDate: "",
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        value: "",
+        warehouseList: [],
+        formData: {},
+        radio: "1",
+        appendixIdss: [],
+        editable: false,
+        auditShow: false,
+        auditRecord: [],
+        inmoney:0,
+        outmoney:0,
+      }
+    },
+    activated() {
+      this.getPassYearFormatDate()
+      this.getList()
+      this.getWarehouse()
+    },
+    methods: {
+      showAudit(row) {
+        getAuditRecord({
+            id: row.id,
+            workflowId: row.workflowId
+          })
+          .toPromise()
+          .then((response) => {
+            this.auditShow = true
+            this.auditRecord = response
+          })
+      },
+      auditShowClose() {
+        this.auditRecord = []
+        this.auditShow = false
+      },
+      examine(tmp) {
+        if (tmp == 1) { //驳回
+          this.$confirm('是否确定驳回该条请款信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              woekflowhandle({
+                  taskId: this.formData.taskId,
+                  approved: false,
+                  auditMind: this.formData.opinion ? this.formData.opinion : "驳回",
+                  needReapply: true,
+                })
+                .toPromise()
+                .then((response) => {
+                  this.$notify({
+                    title: '成功',
+                    message: '驳回成功!',
+                    type: 'success'
+                  });
+                })
+              this.formData = {}
+              this.dialogVisible = false
+              this.getList()
+            })
+        } else if (tmp == 2) { //通过
+          this.$confirm('是否确定通过该条请款信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              woekflowhandle({
+                  taskId: this.formData.taskId,
+                  approved: true,
+                  auditMind: this.formData.opinion ? this.formData.opinion : "通过",
+                  needReapply: false,
+                })
+                .toPromise()
+                .then((response) => {
+                  this.$notify({
+                    title: '成功',
+                    message: '审核成功!',
+                    type: 'success'
+                  });
+                  this.formData = {}
+                  this.dialogVisible = false
+                  this.getList()
+
+                })
+                .catch(() => {
+                  return false
+                })
+            })
+        }
+
+
+      },
+      delData(row) {
+        this.$confirm('确定删除请款信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            deleteInfo({
+                id: row.id
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify({
+                  title: '成功',
+                  message: '删除成功!',
+                  type: 'success'
+                });
+                this.getList()
+              })
+          })
+      },
+      fujian(row) {
+        this.fujianshow = true
+        this.appendixIdss = row.addressUrl
+      },
+      fuijianClose() {
+        this.appendixIdss = ""
+        this.fujianshow = false
+      },
+      submit() {
+        this.formData.expenseType = this.radio
+        if (this.formData.expenseType == 2) {
+          if (!this.formData.warehouseName) {
+            this.$message.error("请选择仓库")
+            return
+          }
+        }
+        if (!this.formData.expenseName) {
+          this.$message.error("款项名称不能为空!")
+          return
+        }
+        if (!this.formData.amountMoney) {
+          this.$message.error("金额不能为空!")
+          return
+        }
+        if (Number(this.formData.amountMoney) < 0 || Number(this.formData.amountMoney) > 100000000) {
+          this.$message.error("金额输入错误!")
+        }
+        
+        if (this.formData.amountMoney.indexOf(".") != -1 && this.formData.amountMoney.split(".")[1].length > 2) {
+          this.$message.error("金额请保留两位小数!")
+          return
+        }
+        if (this.btnChange == 4) {
+          if (!this.formData.addressUrl) {
+            this.$message.error("请上传附件!")
+            return
+          }
+        }
+        this.$confirm('确定提交' + this.title + '信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            if (this.btnChange == 3) { //请款
+              this.formData.compId = this.compId
+              this.formData.payee = localStorage.getItem('ws-pf_staffName')
+              this.formData.reexType = "支出"
+              this.formData.reexTypeKey = 2
+              requestFunds(this.formData)
+                .toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.formData = {}
+                    this.dialogVisible = false
+                    this.$notify({
+                      title: '成功',
+                      message: '请款提交成功!',
+                      type: 'success'
+                    });
+                    this.getList()
+                  }
+                })
+            } else if (this.btnChange == 2) { //付款
+              payment(this.formData)
+                .toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.formData = {}
+                    this.dialogVisible = false
+                    this.$notify({
+                      title: '成功',
+                      message: '付款提交成功!',
+                      type: 'success'
+                    });
+                    this.getList()
+                  }
+                })
+            } else if (this.btnChange == 5) { //编辑
+              editInfo(this.formData)
+                .toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.formData = {}
+                    this.dialogVisible = false
+                    this.$notify({
+                      title: '成功',
+                      message: '修改成功!',
+                      type: 'success'
+                    });
+                    this.getList()
+                  }
+
+                })
+            } else if (this.btnChange == 4) { //收款
+              this.formData.compId = this.compId
+              this.formData.payee = localStorage.getItem('ws-pf_staffName')
+              this.formData.reexType = "收入"
+              this.formData.reexTypeKey = 1
+              requestFunds(this.formData)
+                .toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.formData = {}
+                    this.dialogVisible = false
+                    this.$notify({
+                      title: '成功',
+                      message: '请款提交成功!',
+                      type: 'success'
+                    });
+                    this.getList()
+                  }
+                })
+
+            }
+          })
+      },
+      typeChange(num) {
+        this.searchType = num
+        this.getList()
+      },
+      getWarehouse() {
+        //仓库
+        selectWarehouseSelf({
+            compId: localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList = response
+          })
+      },
+      audit(num, row) {
+        this.btnChange = num
+        if (num == 1) {
+          this.title = "审核"
+          this.formData = row
+          this.disabled = true
+        } else if (num == 2) {
+          this.title = "付款"
+          this.formData = row
+          this.disabled = true
+        } else if (num == 3) {
+          this.title = "请款"
+          this.disabled = false
+        } else if (num == 4) {
+          this.title = "收款"
+          this.disabled = false
+        } else if (num == 5) {
+          this.title = "编辑"
+          this.formData = row
+          this.radio = row.expenseType
+          this.disabled = false
+        }
+        this.dialogVisible = true
+
+      },
+      getPassYearFormatDate() {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
+
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+        this.value = [this.startDate, this.endDate]
+      },
+      handleClose() {
+        this.formData = {}
+        this.radio = "1"
+        this.dialogVisible = false
+      },
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.formData.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      getList() {
+        getOutMoney({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            startDate: this.startDate,
+            endDate: this.endDate,
+            searchKeyWord: this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            this.inmoney = 0
+             this.outmoney = 0
+            this.tableData = response.records
+            for(let count = 0 ; count < this.tableData.length ; count++){
+              if(this.tableData[count].reexType == '收入'){
+                this.inmoney += this.tableData[count].amountMoney
+              }
+              if(this.tableData[count].reexType == '支出'){
+                 this.outmoney += this.tableData[count].amountMoney
+              }
+            }
+            this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate() {
+        if (this.value) {
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 10px 0;
+    overflow-y: scroll;
+    height: 546px;
+
+    .icon_css {
+      font-size: 15px;
+
+      color: #5473e8;
+
+    }
+  }
+
+  /deep/.title_css .el-dialog__header {
+    text-align: center !important;
+    border-radius: 4px;
+  }
+
+  .btn_css {
+    margin: 10px 10px 0;
+    justify-content: flex-end;
+    display: flex;
+  }
+
+  .top_info {
+    margin: 16px 0 0 10px;
+    min-width: 712px;
+
+    .info_css {
+      margin-right: 15px;
+    }
+  }
+
+  .audit {
+    margin-bottom: 20px;
+    border-bottom: 1px solid #AFB3BF;
+    height: 70px;
+
+    .audit_item {
+      width: 100%;
+      display: flex;
+      height: 30px;
+
+      .audit_name {
+        margin-right: 30px;
+        font-size: 16px;
+        font-weight: 600;
+      }
+
+      .audit_left {
+        width: 60%;
+      }
+
+      .audit_date {
+        width: 40%;
+        justify-content: flex-end;
+        display: flex;
+        color: #AFB3BF;
+      }
+    }
+
+    .audit_opinion {}
+  }
+</style>

+ 359 - 0
src/views/profitable/earningsLook.vue

@@ -0,0 +1,359 @@
+//盈收概览
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">盈收概览</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"></el-col>
+    </el-row>
+    <div class="center">
+      <div class="datascreen">
+        <el-date-picker v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+      </div>
+      <div class="chart_css">
+        <div class="table">
+          <div ref="myEchart7" style="height: 410px;"></div>
+        </div>
+        <div class="makeWord_css">
+          <div ref="myEchart6" style="height: 410px"></div>
+        </div>
+      </div>
+      <div class="table_css">
+        <el-table :data="valueData" style="width: 100%">
+          <el-table-column prop="date" label="货名/货值" min-width="110">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">期初货值(元)</span>
+              <span v-if="scope.$index == 1">期末货值(元)</span>
+            </div>
+
+          </el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="合计" min-width="130">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">合计:</span>
+              <span v-if="scope.$index == 1">合计:1000000000</span>
+            </div>
+          </el-table-column>
+        </el-table>
+
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        makeWordData: {},
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      this.makeWordData = this.getData(2)
+      this.initCharts()
+      this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      getList() {
+        // getceshi({
+        //  driverId:'8f1f3c624d7946d79a9d44a4057d969b'
+        // })
+        // .toPromise()
+        // .then((response) => {
+        // debugger
+        // console.log(response)
+        // })
+
+      },
+      getPassYearFormatDate() {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
+
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+      initCharts() {
+        let app = this;
+        let myChart7 = app.$echarts.init(this.$refs.myEchart7);
+        let myChart6 = app.$echarts.init(this.$refs.myEchart6);
+        var option;
+        var graphical;
+        graphical = {
+          title: {
+            text: '盈利',
+            subtext: '利润',
+            left: 'center'
+          },
+          tooltip: {
+            trigger: 'item',
+            formatter: '{b} : {c} ({d}%)'
+          },
+          legend: {
+            type: 'scroll',
+            orient: 'vertical',
+            right: 10,
+            top: 20,
+            bottom: 20,
+            data: this.makeWordData.legendData
+          },
+          series: [{
+            // name: '姓名',
+            type: 'pie',
+            radius: '55%',
+            center: ['40%', '50%'],
+            data: this.makeWordData.seriesData,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
+              }
+            }
+          }],
+
+        }
+        myChart6.setOption(graphical)
+        option = {
+            // title: {
+            //   text: 'Rainfall vs Evaporation',
+            //   subtext: 'Fake Data'
+            // },
+            tooltip: {
+              trigger: 'axis'
+            },
+            legend: {
+              data: ['支出', '收入']
+            },
+            toolbox: {
+              show: true,
+              feature: {
+                dataView: {
+                  show: false,
+                  readOnly: false
+                },
+                magicType: {
+                  show: false,
+                  type: ['line', 'bar']
+                },
+                restore: {
+                  show: false
+                },
+                saveAsImage: {
+                  show: false
+                }
+              }
+            },
+            calculable: true,
+            xAxis: [{
+              name: '种类',
+              type: 'category',
+              // prettier-ignore
+              data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']
+            }],
+            yAxis: [{
+              name: '储量(吨)',
+              type: 'value'
+            }],
+            series: [{
+                name: '支出',
+                type: 'bar',
+                right: 0,
+                // label: {
+                //   show: true,
+                //   position: 'inside'
+                // },
+                 label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data: [
+                  6.0, 60.9, 90.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0
+                ],
+                color: ['#5878E8 '],
+                formatter: '{value} 元',
+
+              },
+              {
+                name: '收入',
+                type: 'bar',
+                right: 20,
+                label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data: [
+                  102.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8
+                ],
+                color: ['#FF9F24'],
+                formatter: '{value} 元',
+              }
+            ]
+          },
+          myChart7.setOption(option)
+      },
+      getData(count) {
+        // prettier-ignore
+        const nameList = [
+          '支出', '收入'
+        ];
+        const legendData = [];
+        const seriesData = [];
+        for (var i = 0; i < count; i++) {
+          var name = nameList[i]
+          // Math.random() > 0.65 ?  makeWord(4, 1) + '·' + makeWord(3, 0) :  makeWord(2, 1);
+          legendData.push(name);
+          seriesData.push({
+            name: name,
+            value: Math.round(Math.random() * 100000)
+          });
+        }
+
+        return {
+          legendData: legendData,
+          seriesData: seriesData
+        };
+
+        // function makeWord(max, min) {
+        //   debugger
+        //   const nameLen = Math.ceil(Math.random() * max + min);
+        //   const name = [];
+        //   for (var i = 0; i < nameLen; i++) {
+        //     name.push(nameList[Math.round(Math.random() * nameList.length - 1)]);
+        //   }
+        //   return name.join('');
+        // }
+
+      }
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    /deep/.el-table th,
+    /deep/.el-table td {
+      text-align: center;
+    }
+
+  }
+</style>

+ 238 - 0
src/views/profitable/inOutDetailed.vue

@@ -0,0 +1,238 @@
+//收支明细
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">收支明细</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"></el-col>
+    </el-row>
+
+    <div class="center">
+      <el-row>
+        <el-col :span="12">
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="!searchType?'primary':''">全部</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">收入</el-button>
+          <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">支出</el-button>
+          <div class="top_info">
+           <span class="info_css">合同收入:{{tableData.length > 0 && tableData[0].inContractMoney? tableData[0].inContractMoney:0}}元</span><span class="info_css">仓库收入:{{tableData.length > 0 && tableData[0].inWarehouseMoney? tableData[0].inWarehouseMoney:0}}元</span><span class="info_css">经营收入:{{tableData.length > 0 && tableData[0].inManageMoney? tableData[0].inManageMoney:0}}元</span><span class="info_css">合计收入:{{intotal}}元</span>   
+          </div>
+          <div class="top_info">
+            <span class="info_css">合同支出:{{tableData.length > 0 && tableData[0].outContractMoney? tableData[0].outContractMoney:0}}元</span><span class="info_css">仓库支出:{{tableData.length > 0 && tableData[0].outWarehouseMoney? tableData[0].outWarehouseMoney:0}}元</span><span class="info_css">经营支出:{{tableData.length > 0 && tableData[0].outManageMoney? tableData[0].outManageMoney:0}}元</span><span class="info_css">合计支出:{{outtotal}}元</span> <span class="info_css">毛利润:{{Number(intotal - outtotal)}}元</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+            <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
+            </el-date-picker>
+            <el-input placeholder="按费用名称或费用说明查找" class="input_css" v-model="searchKeyWord"></el-input>
+            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
+                src="../../../public/img/sousuo.png" alt="" /></el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <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="reexType" label="类型"></el-table-column>
+          <el-table-column prop="createDate" label="录入日期"></el-table-column>
+          <el-table-column prop="amountMoney" label="金额(元)"></el-table-column>
+          <el-table-column prop="expenseName" label="费用名称"></el-table-column>
+          <el-table-column prop="expenseRemarks" label="费用说明"></el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    getInOutDetailed
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        searchType:"",
+        searchKeyWord:"",
+        startDate:"",
+        endDate:"",
+        outtotal:0,
+        intotal:0,
+      }
+    },
+    activated() {
+         this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      getPassYearFormatDate () {
+          var nowDate = new Date()
+          var _date = new Date()
+          nowDate.setTime(nowDate.getTime()-24*60*60*1000*30)
+          var year = nowDate.getFullYear()
+          var year1 = _date.getFullYear()
+          var month = nowDate.getMonth() + 1
+          var month1 = _date.getMonth() + 1
+          var strDate = nowDate.getDate()
+          var strDate1 = _date.getDate()
+          if (month >= 1 && month <= 9) {
+            month = '0' + month
+          }
+           if (month1 >= 1 && month1 <= 9) {
+            month1 = '0' + month1
+          }
+        
+          if (strDate >= 0 && strDate <= 9) {
+            strDate = '0' + strDate
+          }
+           if (strDate1 >= 0 && strDate1 <= 9) {
+            strDate1 = '0' + strDate1
+          }
+          this.startDate = year + '-' + month +'-' + strDate
+          this.endDate = year1 + '-' + month1 +'-' + strDate1
+          this.value=[this.startDate,this.endDate]
+        },
+      getList() {
+         getInOutDetailed({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            searchType:this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData = response.records
+            if(this.tableData.length > 0){
+              this.intotal = Number(this.tableData[0].inContractMoney) + Number(this.tableData[0].inWarehouseMoney) + Number(this.tableData[0].inManageMoney)
+            this.outtotal = Number(this.tableData[0].outContractMoney) + Number(this.tableData[0].outWarehouseMoney) + Number(this.tableData[0].outManageMoney)
+            }
+            
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+</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>

Diferenças do arquivo suprimidas por serem muito extensas
+ 906 - 1188
src/views/statisticalReport/autoSettlementList.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 902 - 1071
src/views/statisticalReport/huoyunList.vue


+ 26 - 17
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">
@@ -27,8 +27,8 @@
           </el-select>
         </el-col>
       </el-row>
-      <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList" height="calc(100% - 110px)"
-        border :summary-method="getSummaries" show-summary @row-click="handleRowClick"
+      <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList"
+        height="calc(100% - 110px)" border :summary-method="getSummaries" show-summary @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>
@@ -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,11 @@
     <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"
@@ -320,11 +321,19 @@
             })
             .toPromise()
             .then((response) => {
-              workflowcontent({workflowId:item.workflowId,businessKey:item.id,type:'采购平仓报表'}).toPromise()
-            .then((response1) => {
+              if (index == 0) {
+                workflowcontent({
+                    workflowId: item.workflowId,
+                    businessKey: item.id,
+                    type: '采购平仓报表'
+                  }).toPromise()
+                  .then((response1) => {
+
+                  })
+              }
+
               this.audit(this.modification[index + 1], index + 1, status)
             })
-            })
             .catch((req) => {
               this.$message.warning(req.message)
             })
@@ -413,25 +422,25 @@
             sums[index] = '--'
           }
         })
-        if(typeof sums[sums.length - 5] =='number'){
+        if (typeof sums[sums.length - 5] == 'number') {
           sums[sums.length - 5] = sums[sums.length - 5].toFixed(2)
         }
-        if(typeof sums[sums.length - 6] =='number'){
+        if (typeof sums[sums.length - 6] == 'number') {
           sums[sums.length - 6] = sums[sums.length - 6].toFixed(2)
         }
-        if(typeof sums[sums.length - 7] =='number'){
+        if (typeof sums[sums.length - 7] == 'number') {
           sums[sums.length - 7] = sums[sums.length - 7].toFixed(2)
         }
-        if(typeof sums[sums.length - 9] =='number'){
+        if (typeof sums[sums.length - 9] == 'number') {
           sums[sums.length - 9] = sums[sums.length - 9].toFixed(2)
         }
-        if(typeof sums[sums.length - 10] =='number'){
+        if (typeof sums[sums.length - 10] == 'number') {
           sums[sums.length - 10] = sums[sums.length - 10].toFixed(2)
         }
-        if(typeof sums[sums.length - 11] =='number'){
+        if (typeof sums[sums.length - 11] == 'number') {
           sums[sums.length - 11] = sums[sums.length - 11].toFixed(2)
         }
-        if(typeof sums[sums.length - 15] =='number'){
+        if (typeof sums[sums.length - 15] == 'number') {
           sums[sums.length - 15] = sums[sums.length - 15].toFixed(2)
         }
         return sums

+ 19 - 12
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">
@@ -653,12 +653,19 @@
             })
             .toPromise()
             .then((response) => {
-              
-              workflowcontent({workflowId:item.workflowId,businessKey:item.id,type:'采购入库报表'}).toPromise()
-            .then((response1) => {
+              if (index == 0) {
+                workflowcontent({
+                    workflowId: item.workflowId,
+                    businessKey: item.id,
+                    type: '采购入库报表'
+                  }).toPromise()
+                  .then((response1) => {
+
+                  })
+              }
+
               this.audit(this.modification[index + 1], index + 1, status, status2, reason)
             })
-            })
             .catch((req) => {
               this.$message.warning(req.message)
             })
@@ -874,19 +881,19 @@
           }
         })
         console.log(sums)
-        if(typeof sums[sums.length - 2] =='number'){
+        if (typeof sums[sums.length - 2] == 'number') {
           sums[sums.length - 2] = sums[sums.length - 2].toFixed(2)
         }
-        if(typeof sums[sums.length - 9] =='number'){
+        if (typeof sums[sums.length - 9] == 'number') {
           sums[sums.length - 9] = sums[sums.length - 9].toFixed(2)
         }
-        if(typeof sums[sums.length - 10] =='number'){
+        if (typeof sums[sums.length - 10] == 'number') {
           sums[sums.length - 10] = sums[sums.length - 10].toFixed(2)
         }
-        if(typeof sums[sums.length - 11] =='number'){
+        if (typeof sums[sums.length - 11] == 'number') {
           sums[sums.length - 11] = sums[sums.length - 11].toFixed(2)
         }
-        if(typeof sums[sums.length - 2] =='number'){
+        if (typeof sums[sums.length - 2] == 'number') {
           sums[sums.length - 12] = sums[sums.length - 12].toFixed(2)
         }
         return sums

Diferenças do arquivo suprimidas por serem muito extensas
+ 649 - 808
src/views/statisticalReport/salesClosingCashierList.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 796 - 1026
src/views/statisticalReport/salesDeliveryReportList.vue


+ 1238 - 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,1275 @@
   <!-- </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()
+              if (index == 0) {
+                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>

Diferenças do arquivo suprimidas por serem muito extensas
+ 784 - 994
src/views/statisticalReport/stockPurchaseReceiptReportList.vue


+ 301 - 169
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>
@@ -143,22 +145,42 @@
             </div>
 
             <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>
-        <el-table-column width='120' class="table_td" prop="amountIngReceivable" label="应收金额(元)"></el-table-column>
+              v-if="scope.row.identification3 == 'true'" @click="weightClick(scope.row,2)"></i>
+          </template>
+        </el-table-column>
+        <el-table-column  width='130' class="table_td"  prop="amountIngReceivable" label="应收金额(元)">
+          <template slot-scope="scope">
+            <div class="inputChenge">
+              <el-input v-model="scope.row.amountIngReceivable" v-if="scope.row.identification3 == 'true'">
+              </el-input>
+              <div v-if="scope.row.identification3 == 'false'" class="inputs">
+                <span>{{scope.row.amountIngReceivable}}</span>
+              </div>
+            </div>
+            <div style='display:inline-block;' v-if="scope.row.identification3 == 'false'">
+              <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
+                style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
+                @click="whether(scope.row,5)" alt="" />
+            </div>
+
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification3 == 'true'" @click="weightClick(scope.row,5)"></i>
+          </template>
+        </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 +212,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 +243,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 +252,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,10 +268,25 @@
 
             <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>
-        <el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)">
+          </template>
+        </el-table-column>
+        <el-table-column class="table_td" prop="amountIngReceivable" width='130' label="应收金额(元)">
           <template slot-scope="scope">
-            <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
+            <div class="inputChenge">
+              <el-input v-model="scope.row.amountIngReceivable" v-if="scope.row.identification3 == 'true'">
+              </el-input>
+              <div v-if="scope.row.identification3 == 'false'" class="inputs">
+                <span>{{scope.row.amountIngReceivable}}</span>
+              </div>
+            </div>
+            <div style='display:inline-block;' v-if="scope.row.identification3 == 'false'">
+              <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
+                style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
+                @click="whether(scope.row,5)" alt="" />
+            </div>
+
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification3 == 'true'" @click="weightClick(scope.row,5)"></i>
           </template>
         </el-table-column>
         <el-table-column class="table_td" prop="amountEdReceivable" label="已收金额(元)">
@@ -263,17 +299,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 +321,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 +348,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 +372,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 +387,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 +472,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 +501,7 @@
         contractNo: '',
         dialogVisible: false,
         form: {},
-        id:0,
+        id: 0,
         compId: localStorage.getItem('ws-pf_compId'),
         collectForm: false,
         collectForm1: false,
@@ -504,13 +540,15 @@
         modification: [],
         accessoryTFs: false,
         appendixIdss: [],
-        activeinvoice:0,
+        activeinvoice: 0,
         accessoryTFs1: false,
         appendixIdss1: [],
         appendixIdss2: '',
         accessoryTFs2: false,
         addressUrlArray: [],
         addressUrlArray1: [],
+        money: "",
+        weight: ""
       }
     },
     activated() {
@@ -519,100 +557,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 +693,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,18 +744,20 @@
         }
       },
       //修改结算重量
-      whether(row,flag) {
-        if(flag==1){
+      whether(row, flag) {
+        if (flag == 1) {
           row.identification = 'true'
-        }else{
+        } else if(flag==5){
+          row.identification3 = 'true'
+        }else {
           row.identification1 = 'true'
         }
-        
+
       },
-      weightClick(row,flag) {
+      weightClick(row, flag) {
         if (
-          row.settlementWeight > 200 ||
-          row.settlementWeight < 1 ||
+          row.settlementWeight > 200&&flag==1 ||
+          row.settlementWeight < 1&&flag==1 ||
           (String(row.settlementWeight).indexOf(
               '.'
             ) != -1 &&
@@ -725,22 +774,29 @@
           })
           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 if (flag == 5) {
+          title = '确定要修改应收金额?'
+          data = {
+            amountIngReceivable: row.amountIngReceivable,
+            id: row.id,
+            flag: flag
+          }
+        } else {
+          title = '确定要修改结算单价?'
+          data = {
+            settlementPrice: row.settlementPrice,
+            id: row.id,
+            flag: flag
+          }
         }
         this.$confirm(title, {
             confirmButtonText: '确定',
@@ -751,18 +807,23 @@
             saleEditSettlementWeight(data)
               .toPromise()
               .then((response) => {
-                if(flag==1){
+                if (flag == 1) {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '结算重量修改成功',
+                  })
+                }if (flag == 5) {
                   this.$notify.success({
-                  title: '成功',
-                  message: '结算重量修改成功',
-                })
-                }else{
+                    title: '成功',
+                    message: '应收金额修改成功',
+                  })
+                } else {
                   this.$notify.success({
-                  title: '成功',
-                  message: '结算单价修改成功',
-                })
+                    title: '成功',
+                    message: '结算单价修改成功',
+                  })
                 }
-                
+
                 this.getList(this.orderList.deliverType)
               })
               .catch(() => {
@@ -829,10 +890,15 @@
             if (index === 0) {
               sums[index] = '合计'
             } else if (
+<<<<<<< HEAD
               index === 7 ||
               index === 8 ||
               index === 9 ||
               index === 10 ||
+=======
+              // index === 10 ||
+              index === 8 ||
+>>>>>>> origin
               index === 11 ||
               index === 13 ||
               index === 14 ||
@@ -848,9 +914,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 +941,7 @@
                 sums[index] = '合计'
               } else if (
                 index === 11 ||
-                index === 9 ||
+                // index === 9 ||
                 index === 10 ||
                 index === 8
               ) {
@@ -874,9 +955,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 +982,9 @@
                 sums[index] = '合计'
               } else if (
                 index === 11 ||
-                index === 10 ||
+                index === 7 ||
+                index === 8 ||
+                // index === 10 ||
                 index === 13 ||
                 index === 12
               ) {
@@ -899,9 +998,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 +1025,7 @@
               } else if (
                 index === 11 ||
                 index === 12 ||
-                index === 10 ||
+                // index === 10 ||
                 index === 9
               ) {
                 const values = data.map((item) => Number(item[column.property]))
@@ -924,9 +1038,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] = '--'
               }
@@ -1139,8 +1269,10 @@
               response.records[i].identification = 'false'
               response.records[i].identification1 = 'false'
               response.records[i].identification2 = 'false'
+              response.records[i].identification3 = 'false'
               if (response.records[i].amountIngReceivable) {
                 this.amountReceivable += Number(response.records[i].amountIngReceivable.toFixed(2))
+                response.records[i].amountIngReceivable=response.records[i].amountIngReceivable.toFixed(2)
               }
               if (response.records[i].amountEdReceivable) {
                 this.amountReceived += Number(response.records[i].amountEdReceivable.toFixed(2))

+ 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])
 								}

+ 1058 - 1403
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -6,77 +6,47 @@
         <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">
       <div class="annu">
-        <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="nav">
           <span class="ziti">
             任务类型:
-            <h1
-              class="ziti1"
-              v-show="
+            <h1 class="ziti1" v-show="
                 dataList.inOutType == '移库入库' ||
                 dataList.inOutType == '移库出库'
-              "
-            >
+              ">
               移库任务
             </h1>
-            <h1
-              class="ziti1"
-              v-show="
+            <h1 class="ziti1" v-show="
                 dataList.inOutType == '销售出库' ||
                 dataList.inOutType == '暂存出库' ||
                 dataList.inOutType == '贸易服务出库' ||
                 dataList.inOutType == '采购出库'
-              "
-            >
+              ">
               出库任务
             </h1>
-            <h1
-              class="ziti1"
-              v-show="
+            <h1 class="ziti1" v-show="
                 dataList.inOutType == '采购入库' ||
                 dataList.inOutType == '暂存入库' ||
                 dataList.inOutType == '贸易服务入库' ||
                 dataList.inOutType == '退库'
-              "
-            >
+              ">
               入库任务
             </h1>
           </span>
         </div>
       </div>
       <div class="ding"></div>
-      <div
-        v-if="dataList.taskTypeKey != 2 && dataList.taskTypeKey != 4"
-        class="center1"
-      >
-        <img
-          style="position: relative; top: 40px; left: 300px"
-          width="19"
-          height="19"
-          src="../../../public/img/cangku.png"
-          alt
-        />
+      <div v-if="dataList.taskTypeKey != 2 && dataList.taskTypeKey != 4" class="center1">
+        <img style="position: relative; top: 40px; left: 300px" width="19" height="19"
+          src="../../../public/img/cangku.png" alt />
         <!--出库=-->
         <div class="small-title">
           <h3>出库任务({{ dataList.inOutTaskNo }})</h3>
@@ -84,175 +54,80 @@
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <!-- 仓库名 -->
           <el-form-item label="仓库名">
-            <el-select
-              disabled
-              v-model="dataList.warehouseName"
-              placeholder="请选择仓库名"
-              class="typeselect"
-              @change="selectwarehouseName"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in warehouseNameList"
-                :key="item.constKey"
-                :label="item.warehouseName"
-                :value="item.warehouseName"
-              />
+            <el-select disabled v-model="dataList.warehouseName" placeholder="请选择仓库名" class="typeselect"
+              @change="selectwarehouseName" filterable clearable>
+              <el-option v-for="item in warehouseNameList" :key="item.constKey" :label="item.warehouseName"
+                :value="item.warehouseName" />
             </el-select>
           </el-form-item>
           <!-- 出库类型 -->
           <el-form-item label="出库类型">
-            <el-select
-              disabled
-              v-model="dataList.inOutType"
-              placeholder="请选择出库类型"
-              class="typeselect"
-              @change="selectstorageType"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in storageType"
-                :key="item.constKey"
-                v-if="
+            <el-select disabled v-model="dataList.inOutType" placeholder="请选择出库类型" class="typeselect"
+              @change="selectstorageType" filterable clearable>
+              <el-option v-for="item in storageType" :key="item.constKey" v-if="
                   (dataList.taskTypeKey == 1 &&
                     item.constValue != '移库出库') ||
                   (dataList.taskTypeKey == 3 &&
                     item.constValue == '移库出库') ||
                   (dataList.taskTypeKey == 4 && item.constValue == '销售出库')
-                "
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+                " :label="item.constValue" :value="item.constValue" />
             </el-select>
           </el-form-item>
           <!-- 合同编号 -->
           <el-form-item v-if="dataList.taskTypeKey != 3" label="合同编号">
-            <el-select
-              disabled
-              @change="changecontract"
-              v-model="dataList.contractNo"
-              placeholder="请输入合同编号"
-              class="typeselect"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in contractNoList"
-                :key="item.constKey"
-                :label="item.contractNo"
-                :value="item.contractNo"
-              ></el-option>
+            <el-select disabled @change="changecontract" v-model="dataList.contractNo" placeholder="请输入合同编号"
+              class="typeselect" filterable clearable>
+              <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
+                :value="item.contractNo"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item v-if="dataList.taskTypeKey == 3" label="移库任务编号">
-            <el-select
-              disabled
-              @change="selectTaskNo"
-              v-model="dataList.moveTaskNo"
-              placeholder="请输入移库任务编号"
-              class="typeselect"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in contractNoList"
-                :key="item.constKey"
-                :label="item.contractNo"
-                :value="item.contractNo"
-              ></el-option>
+            <el-select disabled @change="selectTaskNo" v-model="dataList.moveTaskNo" placeholder="请输入移库任务编号"
+              class="typeselect" filterable clearable>
+              <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
+                :value="item.contractNo"></el-option>
             </el-select>
           </el-form-item>
           <!-- 货名 -->
           <el-form-item label="货名" class="huom">
-            <el-select
-              disabled
-              v-model="dataList.goodsName"
-              placeholder="货名"
-              class="huom"
-              @change="selectgoodsName"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              ></el-option>
+            <el-select disabled v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName"
+              filterable clearable>
+              <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue"></el-option>
             </el-select>
           </el-form-item>
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
-            <el-input
-              disabled
-              v-model="dataList.weight"
-              placeholder="请输入重量(吨)"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input disabled v-model="dataList.weight" placeholder="请输入重量(吨)" maxlength="120" size="small"
+              class="huom" />
           </el-form-item>
           <!-- 品级 -->
           <el-form-item label="品级">
-            <el-select
-              v-model="dataList.grade"
-              placeholder
-              class="typeselect"
-              @change="selectpackingMethod"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <el-select v-model="dataList.grade" placeholder class="typeselect" @change="selectpackingMethod" filterable
+              clearable>
+              <el-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </el-select>
           </el-form-item>
           <!--容重(克/升)>=-->
           <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
-            <el-input
-              @input="bulkDensitychange"
-              v-model="dataList.bulkDensity"
-              placeholder="请输入容重"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input @input="bulkDensitychange" v-model="dataList.bulkDensity" placeholder="请输入容重" maxlength="120"
+              size="small" class="huom" />
           </el-form-item>
           <!--水分(%)<=-->
           <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=">
-            <el-input
-              @input="waterContentchange"
-              v-model="dataList.waterContent"
-              placeholder="请输入水分占比"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input @input="waterContentchange" v-model="dataList.waterContent" placeholder="请输入水分占比" maxlength="120"
+              size="small" class="huom" />
           </el-form-item>
           <!--单价(元/吨)-->
           <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" v-show="Pricetype">
-            <el-input
-              @input="unitPricechange"
-              v-model="dataList.unitPrice"
-              placeholder="请输入单价"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input @input="unitPricechange" v-model="dataList.unitPrice" placeholder="请输入单价" maxlength="120"
+              size="small" class="huom" />
           </el-form-item>
           <!--预计出库日期-->
-          <el-form-item
-            label="预计出库日期"
-            span="1"
-            prop="predictDate"
-            class="deliverydate"
-          >
-            <el-date-picker
-              disabled
-              v-model="dataList.predictDate"
-              type="date"
-              placeholder="请选择预计出库日期"
-              value-format="yyyy-MM-dd"
-            />
+          <el-form-item label="预计出库日期" span="1" prop="predictDate" class="deliverydate">
+            <el-date-picker disabled v-model="dataList.predictDate" type="date" placeholder="请选择预计出库日期"
+              value-format="yyyy-MM-dd" />
           </el-form-item>
           <!--预估运费(元/吨)-->
           <!-- <el-form-item label="预估运费(元/吨)" span="1">
@@ -265,48 +140,21 @@
           </el-form-item> -->
           <!--收货人-->
           <el-form-item label="发货人">
-            <el-select
-              disabled
-              v-model="dataList.agent"
-              placeholder="请选择发货人"
-              @change="selectstaff"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.staffName"
-                :value="item.staffName"
-              />
+            <el-select disabled v-model="dataList.agent" placeholder="请选择发货人" @change="selectstaff" filterable
+              clearable>
+              <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
             </el-select>
           </el-form-item>
           <!--业务描述=-->
-          <el-form-item
-            v-if="dataList.taskTypeKey != 3"
-            label="业务描述"
-            span="1"
-          >
-            <el-input
-              v-model="dataList.businessDescribe"
-              placeholder="请输入业务描述,不超过150字"
-              maxlength="150"
-              size="large"
-              class="yewu"
-            />
+          <el-form-item v-if="dataList.taskTypeKey != 3" label="业务描述" span="1">
+            <el-input v-model="dataList.businessDescribe" placeholder="请输入业务描述,不超过150字" maxlength="150" size="large"
+              class="yewu" />
           </el-form-item>
           <el-form-item label="仓位号(选填)" span="1">
-             <el-select
-              v-model="dataList.binNumber"
-              placeholder="请输入仓位号"
-              filterable clearable
-              @change="binNumberChange1"
-            >
-              <el-option
-                v-for="(item, index) in binNumberList1"
-                :Key="index"
-                :label="item.binNumber"
-                :value="item.binNumber"
-              >
+            <el-select v-model="dataList.binNumber" placeholder="请输入仓位号" filterable clearable
+              @change="binNumberChange1">
+              <el-option v-for="(item, index) in binNumberList1" :Key="index" :label="item.binNumber"
+                :value="item.binNumber">
               </el-option>
             </el-select>
             <!-- <el-input
@@ -320,201 +168,91 @@
         </el-form>
       </div>
       <div v-show="dataList.taskTypeKey != 1" class="center1">
-        <img
-          style="position: relative; top: 40px; left: 300px"
-          width="19"
-          height="19"
-          src="../../../public/img/cangku.png"
-          alt
-        />
+        <img style="position: relative; top: 40px; left: 300px" width="19" height="19"
+          src="../../../public/img/cangku.png" alt />
         <div class="small-title">
           <h3>
             入库任务({{ dataList1.inOutTaskNo }})
             <span v-if="deletetask" style="color: red">已删除</span>
           </h3>
         </div>
-        <el-form
-          v-if="!deletetask"
-          ref="form"
-          :model="form"
-          label-width="140px"
-        >
+        <el-form v-if="!deletetask" ref="form" :model="form" label-width="140px">
           <!-- 仓库名 -->
           <el-form-item label="仓库名" v-if="dataList1.inOutType == '移库入库'">
-            <el-select
-              disabled
-              v-model="dataList1.warehouseName"
-              placeholder="请选择仓库名"
-              class="typeselect"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in warehouseNameList"
-                :key="item.constKey"
-                :label="item.warehouseName"
-                :value="item.warehouseName"
-              />
+            <el-select disabled v-model="dataList1.warehouseName" placeholder="请选择仓库名" class="typeselect" filterable
+              clearable>
+              <el-option v-for="item in warehouseNameList" :key="item.constKey" :label="item.warehouseName"
+                :value="item.warehouseName" />
             </el-select>
           </el-form-item>
           <!-- 出库类型 -->
-          <el-form-item
-            label="入库类型"
-            v-if="dataList1.inOutType == '移库入库'"
-          >
-            <el-select
-              disabled
-              v-model="dataList1.inOutType"
-              placeholder="请选择入库类型"
-              class="typeselect"
-              @change="selectstorageType1"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in storageType1"
-                :key="item.constKey"
-                v-if="
+          <el-form-item label="入库类型" v-if="dataList1.inOutType == '移库入库'">
+            <el-select disabled v-model="dataList1.inOutType" placeholder="请选择入库类型" class="typeselect"
+              @change="selectstorageType1" filterable clearable>
+              <el-option v-for="item in storageType1" :key="item.constKey" v-if="
                   (dataList1.taskTypeKey == 2 &&
                     item.constValue != '移库入库') ||
                   (dataList1.taskTypeKey == 3 &&
                     item.constValue == '移库入库') ||
                   (dataList1.taskTypeKey == 4 && item.constValue == '退库')
-                "
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+                " :label="item.constValue" :value="item.constValue" />
             </el-select>
           </el-form-item>
           <!-- 合同编号 -->
           <el-form-item v-if="dataList1.taskTypeKey != 3" label="合同编号">
-            <el-select
-              disabled
-              @change="changecontract1"
-              v-model="dataList1.contractNo"
-              placeholder="请输入合同编号"
-              class="typeselect"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in contractNoList"
-                :key="item.constKey"
-                :label="item.contractNo"
-                :value="item.contractNo"
-              ></el-option>
+            <el-select disabled @change="changecontract1" v-model="dataList1.contractNo" placeholder="请输入合同编号"
+              class="typeselect" filterable clearable>
+              <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
+                :value="item.contractNo"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item v-if="dataList1.taskTypeKey == 3" label="移库任务编号">
-            <el-select
-              disabled
-              v-model="dataList1.moveTaskNo"
-              placeholder="请输入移库任务编号"
-              class="typeselect"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in contractNoList"
-                :key="item.constKey"
-                :label="item.contractNo"
-                :value="item.contractNo"
-              ></el-option>
+            <el-select disabled v-model="dataList1.moveTaskNo" placeholder="请输入移库任务编号" class="typeselect" filterable
+              clearable>
+              <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
+                :value="item.contractNo"></el-option>
             </el-select>
           </el-form-item>
           <!-- 货名 -->
           <el-form-item label="货名" class="huom">
-            <el-select
-              disabled
-              v-model="dataList1.goodsName"
-              placeholder="货名"
-              class="huom"
-              @change="selectgoodsName1"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              ></el-option>
+            <el-select disabled v-model="dataList1.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1"
+              filterable clearable>
+              <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue"></el-option>
             </el-select>
           </el-form-item>
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
-            <el-input
-              @input="weightchange"
-              v-model="dataList1.weight"
-              placeholder="请输入重量(吨)"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)" maxlength="120"
+              size="small" class="huom" />
           </el-form-item>
           <!-- 品级 -->
           <el-form-item label="品级">
-            <el-select
-              :disabled="dataList.taskTypeKey == 3"
-              v-model="dataList1.grade"
-              placeholder
-              class="typeselect"
-              @change="selectpackingMethod1"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <el-select :disabled="dataList.taskTypeKey == 3" v-model="dataList1.grade" placeholder class="typeselect"
+              @change="selectpackingMethod1" filterable clearable>
+              <el-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </el-select>
           </el-form-item>
           <!--容重(克/升)>=-->
           <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
-            <el-input
-              @input="bulkDensitychange"
-              :disabled="dataList.taskTypeKey == 3"
-              v-model="dataList1.bulkDensity"
-              placeholder="请输入容重"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input @input="bulkDensitychange" :disabled="dataList.taskTypeKey == 3" v-model="dataList1.bulkDensity"
+              placeholder="请输入容重" maxlength="120" size="small" class="huom" />
           </el-form-item>
           <!--水分(%)<=-->
           <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=">
-            <el-input
-              @input="waterContentchange"
-              :disabled="dataList.taskTypeKey == 3"
-              v-model="dataList1.waterContent"
-              placeholder="请输入水分占比"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input @input="waterContentchange" :disabled="dataList.taskTypeKey == 3" v-model="dataList1.waterContent"
+              placeholder="请输入水分占比" maxlength="120" size="small" class="huom" />
           </el-form-item>
           <!--单价(元/吨)-->
           <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" v-show="Pricetype">
-            <el-input
-              @input="unitPricechange"
-              :disabled="dataList.taskTypeKey == 3"
-              v-model="dataList1.unitPrice"
-              placeholder="请输入单价"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input @input="unitPricechange" :disabled="dataList.taskTypeKey == 3" v-model="dataList1.unitPrice"
+              placeholder="请输入单价" maxlength="120" size="small" class="huom" />
           </el-form-item>
           <!--预计出库日期-->
-          <el-form-item
-            label="预计入库日期"
-            span="1"
-            prop="predictDate"
-            class="deliverydate"
-          >
-            <el-date-picker
-              disabled
-              v-model="dataList1.predictDate"
-              type="date"
-              placeholder="请选择预计入库日期"
-              value-format="yyyy-MM-dd"
-            />
+          <el-form-item label="预计入库日期" span="1" prop="predictDate" class="deliverydate">
+            <el-date-picker disabled v-model="dataList1.predictDate" type="date" placeholder="请选择预计入库日期"
+              value-format="yyyy-MM-dd" />
           </el-form-item>
           <!--预估运费(元/吨)-->
           <!-- <el-form-item label="预估运费(元/吨)" span="1">
@@ -527,44 +265,20 @@
           </el-form-item> -->
           <!--收货人-->
           <el-form-item label="收货人">
-            <el-select
-              disabled
-              v-model="dataList1.agent"
-              placeholder="请选择收货人"
-              filterable
-              @change="selectstaff1"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.staffName"
-                :value="item.staffName"
-              />
+            <el-select disabled v-model="dataList1.agent" placeholder="请选择收货人" filterable @change="selectstaff1"
+              filterable clearable>
+              <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
             </el-select>
           </el-form-item>
           <!--业务描述=-->
           <el-form-item v-if="dataList.taskTypeKey != 4" label="业务描述">
-            <el-input
-              v-model="dataList1.businessDescribe"
-              placeholder="请输入业务描述,不超过150字"
-              maxlength="150"
-              size="large"
-            />
+            <el-input v-model="dataList1.businessDescribe" placeholder="请输入业务描述,不超过150字" maxlength="150" size="large" />
           </el-form-item>
           <el-form-item label="仓位号(选填)" span="1">
-            <el-select
-              v-model="dataList1.binNumber"
-              placeholder="请输入仓位号"
-              @change="binNumberChange"
-              filterable clearable
-            >
-              <el-option
-                v-for="(item, index) in binNumberList"
-                :Key="index"
-                :label="item.binNumber"
-                :value="item.binNumber"
-              >
+            <el-select v-model="dataList1.binNumber" placeholder="请输入仓位号" @change="binNumberChange" filterable
+              clearable>
+              <el-option v-for="(item, index) in binNumberList" :Key="index" :label="item.binNumber"
+                :value="item.binNumber">
               </el-option>
             </el-select>
             <!-- <el-input
@@ -580,184 +294,87 @@
       <div v-if="dataList.taskTypeKey == 4" class="center1">
         <!--出库=-->
         <div class="small-title">
-          <img
-            style="position: relative; top: 40px; left: -22px"
-            width="19"
-            height="19"
-            src="../../../public/img/cangku.png"
-            alt
-          />
+          <img style="position: relative; top: 40px; left: -22px" width="19" height="19"
+            src="../../../public/img/cangku.png" alt />
           <h3>出库任务({{ inOutTaskNo }})</h3>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <!-- 仓库名 -->
           <el-form-item label="仓库名">
-            <el-select
-              disabled
-              v-model="dataList.warehouseName"
-              placeholder="请选择仓库名"
-              class="typeselect"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in warehouseNameList"
-                :key="item.constKey"
-                :label="item.warehouseName"
-                :value="item.warehouseName"
-              />
+            <el-select disabled v-model="dataList.warehouseName" placeholder="请选择仓库名" class="typeselect" filterable
+              clearable>
+              <el-option v-for="item in warehouseNameList" :key="item.constKey" :label="item.warehouseName"
+                :value="item.warehouseName" />
             </el-select>
           </el-form-item>
           <!-- 出库类型 -->
           <el-form-item label="出库类型">
-            <el-select
-              :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4"
-              v-model="dataList.inOutType"
-              placeholder="请选择出库类型"
-              class="typeselect"
-              @change="selectstorageType"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in storageType"
-                :key="item.constKey"
-                v-if="
+            <el-select :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4" v-model="dataList.inOutType"
+              placeholder="请选择出库类型" class="typeselect" @change="selectstorageType" filterable clearable>
+              <el-option v-for="item in storageType" :key="item.constKey" v-if="
                   (dataList.taskTypeKey == 1 &&
                     item.constValue != '移库出库') ||
                   (dataList.taskTypeKey == 3 &&
                     item.constValue == '移库出库') ||
                   (dataList.taskTypeKey == 4 && item.constValue == '销售出库')
-                "
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+                " :label="item.constValue" :value="item.constValue" />
             </el-select>
           </el-form-item>
           <!-- 合同编号 -->
           <el-form-item v-if="dataList.taskTypeKey != 3" label="合同编号">
-            <el-select
-              disabled
-              v-model="dataList.contractNo"
-              placeholder="请输入合同编号"
-              class="typeselect"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in contractNoList"
-                :key="item.constKey"
-                :label="item.contractNo"
-                :value="item.contractNo"
-              ></el-option>
+            <el-select disabled v-model="dataList.contractNo" placeholder="请输入合同编号" class="typeselect" filterable
+              clearable>
+              <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
+                :value="item.contractNo"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item v-if="dataList.taskTypeKey == 3" label="移库任务编号">
-            <el-select
-              @change="selectTaskNo"
-              v-model="dataList.moveTaskNo"
-              placeholder="请输入移库任务编号"
-              class="typeselect"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in contractNoList"
-                :key="item.constKey"
-                :label="item.contractNo"
-                :value="item.contractNo"
-              ></el-option>
+            <el-select @change="selectTaskNo" v-model="dataList.moveTaskNo" placeholder="请输入移库任务编号" class="typeselect"
+              filterable clearable>
+              <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
+                :value="item.contractNo"></el-option>
             </el-select>
           </el-form-item>
           <!-- 货名 -->
           <el-form-item label="货名" class="huom">
-            <el-select
-              disabled
-              v-model="dataList.goodsName"
-              placeholder="货名"
-              class="huom"
-              @change="selectgoodsName"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              ></el-option>
+            <el-select disabled v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName"
+              filterable clearable>
+              <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue"></el-option>
             </el-select>
           </el-form-item>
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
-            <el-input
-              disabled
-              v-model="dataList.weight"
-              placeholder="请输入重量(吨)"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input disabled v-model="dataList.weight" placeholder="请输入重量(吨)" maxlength="120" size="small"
+              class="huom" />
           </el-form-item>
           <!-- 品级 -->
           <el-form-item label="品级">
-            <el-select
-              disabled
-              v-model="dataList.grade"
-              placeholder
-              class="typeselect"
-              @change="selectpackingMethod"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
+            <el-select disabled v-model="dataList.grade" placeholder class="typeselect" @change="selectpackingMethod"
+              filterable clearable>
+              <el-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                :value="item.constValue" />
             </el-select>
           </el-form-item>
           <!--容重(克/升)>=-->
           <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
-            <el-input
-              disabled
-              v-model="dataList.bulkDensity"
-              placeholder="请输入容重"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input disabled v-model="dataList.bulkDensity" placeholder="请输入容重" maxlength="120" size="small"
+              class="huom" />
           </el-form-item>
           <!--水分(%)<=-->
           <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=">
-            <el-input
-              disabled
-              v-model="dataList.waterContent"
-              placeholder="请输入水分占比"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input disabled v-model="dataList.waterContent" placeholder="请输入水分占比" maxlength="120" size="small"
+              class="huom" />
           </el-form-item>
           <!--单价(元/吨)-->
           <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" v-show="Pricetype">
-            <el-input
-              disabled
-              v-model="dataList.unitPrice"
-              placeholder="请输入单价"
-              maxlength="120"
-              size="small"
-              class="huom"
-            />
+            <el-input disabled v-model="dataList.unitPrice" placeholder="请输入单价" maxlength="120" size="small"
+              class="huom" />
           </el-form-item>
           <!--预计出库日期-->
-          <el-form-item
-            label="预计出库日期"
-            span="1"
-            prop="predictDate"
-            class="deliverydate"
-          >
-            <el-date-picker
-              v-model="dataList.predictDate"
-              type="date"
-              placeholder="请选择预计出库日期"
-              value-format="yyyy-MM-dd"
-            />
+          <el-form-item label="预计出库日期" span="1" prop="predictDate" class="deliverydate">
+            <el-date-picker v-model="dataList.predictDate" type="date" placeholder="请选择预计出库日期"
+              value-format="yyyy-MM-dd" />
           </el-form-item>
           <!--预估运费(元/吨)-->
           <!-- <el-form-item label="预估运费(元/吨)" span="1">
@@ -770,28 +387,13 @@
           </el-form-item> -->
           <!--发货人-->
           <el-form-item label="发货人">
-            <el-select
-              v-model="dataList.agent"
-              placeholder="请选择发货人"
-              @change="selectstaff"
-              filterable clearable
-            >
-              <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.staffName"
-                :value="item.staffName"
-              />
+            <el-select v-model="dataList.agent" placeholder="请选择发货人" @change="selectstaff" filterable clearable>
+              <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
             </el-select>
           </el-form-item>
           <!--业务描述=-->
           <el-form-item label="业务描述">
-            <el-input
-              v-model="dataList.businessDescribe"
-              placeholder="请输入业务描述,不超过150字"
-              maxlength="150"
-              size="large"
-            />
+            <el-input v-model="dataList.businessDescribe" placeholder="请输入业务描述,不超过150字" maxlength="150" size="large" />
           </el-form-item>
         </el-form>
       </div>
@@ -799,23 +401,11 @@
 
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
-      <el-button class="bg-bottom" type="primary" size="small" @click="reject()"
-        >驳回</el-button
-      >
-      <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
-        >通过</el-button
-      >
+      <el-button class="bg-bottom" type="primary" size="small" @click="reject()">驳回</el-button>
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()">通过</el-button>
     </div>
-    <el-table
-      class="wenzi"
-      :data="taskhistories"
-      style="width: 80%"
-      height="180"
-    >
-      <el-table-column
-        prop="operatorMajorRoleName"
-        label="审核人"
-      ></el-table-column>
+    <el-table class="wenzi" :data="taskhistories" style="width: 80%" height="180">
+      <el-table-column prop="operatorMajorRoleName" label="审核人"></el-table-column>
       <el-table-column prop="inOutTaskNo" label="审核结果">
         <template scope="scope">
           <span v-if="scope.row.approved">通过</span>
@@ -825,18 +415,8 @@
       <el-table-column prop="createTime" label="审核时间"></el-table-column>
       <el-table-column prop="auditMind" label="审核意见"></el-table-column>
     </el-table>
-    <WinseaContentModal
-      v-model="outerVisible"
-      title="驳回原因"
-      @on-cancel="handleClose"
-    >
-      <el-input
-        type="textarea"
-        :rows="2"
-        maxlength="30"
-        placeholder="请输入驳回原因,1~30个字"
-        v-model="auditMind"
-      ></el-input>
+    <WinseaContentModal v-model="outerVisible" title="驳回原因" @on-cancel="handleClose">
+      <el-input type="textarea" :rows="2" maxlength="30" placeholder="请输入驳回原因,1~30个字" v-model="auditMind"></el-input>
       <div class="dialog-footer">
         <el-button @click="outerVisible = false">取 消</el-button>
         <el-button type="primary" @click="disableReasons">确定</el-button>
@@ -845,889 +425,964 @@
   </div>
 </template>
 <script>
-import {
-  getwarehousename,
-  xialaNo,
-  outexamine,
-  getGoodsName,
-  warehousetask,
-  woekflowhandle,
-  gettaskhistories,
-  workflowcontent
-} from '@/model/tasksport/index'
-import { pullDown, getstaff } from '@/model/warehouse/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'
-import { mapGetters } from 'vuex'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination,
-  },
-  watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
-    isShow(val) {
-      this.showType = val
+  import {
+    getwarehousename,
+    xialaNo,
+    outexamine,
+    getGoodsName,
+    warehousetask,
+    woekflowhandle,
+    gettaskhistories,
+    workflowcontent
+  } from '@/model/tasksport/index'
+  import {
+    pullDown,
+    getstaff
+  } from '@/model/warehouse/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'
+  import {
+    mapGetters
+  } from 'vuex'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
     },
-  },
-  computed: {
-    ...mapGetters(['deptBudgetList']),
-  },
-  data() {
-    return {
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-      // 是否显示
-      showType: true,
-      disabled: false,
-      // 年
-      year: '',
-      disableReason: '',
-      contractNoList: [],
-      deptBudgetTotal: 0,
-      readonly: true,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      searchKeyWord: '',
-      radio: '1',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      taskhistories: [],
-      goodnameList: [],
-      checked: true,
-      form: {},
-      outerVisible: false,
-      staffList: [],
-      options: [],
-      storageType: [],
-      storageType1: [],
-      outContractNo: [],
-      // 提交类型
-      submitType: true,
-      status: [],
-      auditMind: '',
-      deletetask: false,
-      warehouseNameList: [],
-      warehouseNameList1: [],
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      warehouseInOutDetail: {},
-      onChange: {},
-      deptBudgetList1: [],
-      gradeList: [],
-      Pricetype:true,
-      rules: {
-        netWeight: [
-          {
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    computed: {
+      ...mapGetters(['deptBudgetList']),
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        disabled: false,
+        // 年
+        year: '',
+        disableReason: '',
+        contractNoList: [],
+        deptBudgetTotal: 0,
+        readonly: true,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        radio: '1',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        taskhistories: [],
+        goodnameList: [],
+        checked: true,
+        form: {},
+        outerVisible: false,
+        staffList: [],
+        options: [],
+        storageType: [],
+        storageType1: [],
+        outContractNo: [],
+        // 提交类型
+        submitType: true,
+        status: [],
+        auditMind: '',
+        deletetask: false,
+        warehouseNameList: [],
+        warehouseNameList1: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        warehouseInOutDetail: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        Pricetype: true,
+        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()
         },
-      },
-      binNumberList: [],
-      binNumberList1:[],
-      accessoryTFs: false,
-    }
-  },
-  activated() {
-    this.getList()
-  },
-  methods: {
-    // 仓位号改变
-    binNumberChange(e) {
-      this.dataList1.binNumber = e
-    },
-       binNumberChange1(e) {
-      this.dataList.binNumber = e
-    },
-    //返回按钮
-    revert() {
-      this.$router.go(-1)
-    },
-    returnsales() {
-      this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
-    },
-    // 获取当前年月日
-    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
+        binNumberList: [],
+        binNumberList1: [],
+        accessoryTFs: false,
       }
-      return year + '' + mouth + datetime
     },
-    reject() {
-      this.outerVisible = true
+    activated() {
+      this.getList()
     },
-    // 随机验证码
-    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
+    methods: {
+      // 仓位号改变
+      binNumberChange(e) {
+        this.dataList1.binNumber = e
+      },
+      binNumberChange1(e) {
+        this.dataList.binNumber = e
+      },
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
+      },
+      returnsales() {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttask'
+        })
+      },
+      // 获取当前年月日
+      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
+      },
+      reject() {
+        this.outerVisible = 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
+        })
+        arr.length = 4
 
-      return arr.join('')
-    },
-    MathRand() {
-      var Num = ''
-      for (var i = 0; i < 4; i++) {
-        Num += Math.floor(Math.random() * 10)
-      }
-      return Num
-    },
-    selectTaskNo(e) {
-      if (this.dataList.taskTypeKey == 3) {
-        this.dataList1.moveTaskNo = e
-      }
-    },
-    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
+        return arr.join('')
+      },
+      MathRand() {
+        var Num = ''
+        for (var i = 0; i < 4; i++) {
+          Num += Math.floor(Math.random() * 10)
+        }
+        return Num
+      },
+      selectTaskNo(e) {
+        if (this.dataList.taskTypeKey == 3) {
+          this.dataList1.moveTaskNo = e
+        }
+      },
+      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
+        }
+      },
+      weightchange(e) {
+        if (this.dataList.taskTypeKey == 4) {
+          this.$set(this.dataList, 'weight', e)
+        }
+      },
+      bulkDensitychange(e) {
+        if (this.dataList.taskTypeKey == 4) {
+          this.$set(this.dataList, 'bulkDensity', e)
+        } else if (this.dataList1.taskTypeKey == 3) {
+          this.$set(this.dataList1, 'bulkDensity', e)
+        }
+      },
+      waterContentchange(e) {
+        if (this.dataList.taskTypeKey == 4) {
+          this.$set(this.dataList, 'waterContent', e)
+        } else if (this.dataList1.taskTypeKey == 3) {
+          this.$set(this.dataList1, 'waterContent', e)
+        }
+      },
+      unitPricechange(e) {
+        if (this.dataList.taskTypeKey == 4) {
+          this.$set(this.dataList, 'unitPrice', e)
+        } else if (this.dataList1.taskTypeKey == 3) {
+          this.$set(this.dataList1, 'unitPrice', e)
+        }
+      },
+      changecontract(e) {
+        if (this.dataList.taskTypeKey != 3) {
+          for (let i = 0; i < this.contractNoList.length; i++) {
+            if (this.contractNoList[i].contractNo == e) {
+              getGoodsName({
+                  contractId: this.contractNoList[i].id,
+                  contractNo: this.contractNoList[i].contractNo,
+                })
+                .toPromise()
+                .then((response) => {
+                  this.$set(this.dataList, 'goodsName', response.goodsName)
+                  this.$set(this.dataList, 'goodsNameKey', response.goodsNameKey)
+                  this.$set(this.dataList, 'grade', response.grade)
+                  this.$set(this.dataList, 'gradeKey', response.gradeKey)
+                  this.$set(this.dataList, 'waterContent', response.waterContent)
+                  this.$set(this.dataList, 'bulkDensity', response.bulkDensity)
+                  // this.$set(this.dataList, 'weight', response.weight)
+                  this.$set(
+                    this.dataList,
+                    'unitPrice',
+                    response.unitContractPrice
+                  )
+                })
+            }
           }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options = this.staffList
-      }
-    },
-    weightchange(e) {
-      if (this.dataList.taskTypeKey == 4) {
-        this.$set(this.dataList, 'weight', e)
-      }
-    },
-    bulkDensitychange(e) {
-      if (this.dataList.taskTypeKey == 4) {
-        this.$set(this.dataList, 'bulkDensity', e)
-      } else if (this.dataList1.taskTypeKey == 3) {
-        this.$set(this.dataList1, 'bulkDensity', e)
-      }
-    },
-    waterContentchange(e) {
-      if (this.dataList.taskTypeKey == 4) {
-        this.$set(this.dataList, 'waterContent', e)
-      } else if (this.dataList1.taskTypeKey == 3) {
-        this.$set(this.dataList1, 'waterContent', e)
-      }
-    },
-    unitPricechange(e) {
-      if (this.dataList.taskTypeKey == 4) {
-        this.$set(this.dataList, 'unitPrice', e)
-      } else if (this.dataList1.taskTypeKey == 3) {
-        this.$set(this.dataList1, 'unitPrice', e)
-      }
-    },
-    changecontract(e) {
-      if (this.dataList.taskTypeKey != 3) {
-        for (let i = 0; i < this.contractNoList.length; i++) {
-          if (this.contractNoList[i].contractNo == e) {
-            getGoodsName({
-              contractId: this.contractNoList[i].id,
-              contractNo: this.contractNoList[i].contractNo,
-            })
+        }
+      },
+      changecontract1(e) {
+        if (this.dataList1.taskTypeKey != 3) {
+          for (let i = 0; i < this.contractNoList.length; i++) {
+            if (this.contractNoList[i].contractNo == e) {
+              getGoodsName({
+                  contractId: this.contractNoList[i].id,
+                  contractNo: this.contractNoList[i].contractNo,
+                })
+                .toPromise()
+                .then((response) => {
+                  this.$set(this.dataList1, 'goodsName', response.goodsName)
+                  this.$set(this.dataList1, 'goodsNameKey', response.goodsNameKey)
+                  this.$set(this.dataList1, 'grade', response.grade)
+                  this.$set(this.dataList1, 'gradeKey', response.gradeKey)
+                  this.$set(this.dataList1, 'waterContent', response.waterContent)
+                  this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
+                  this.$set(this.dataList1, 'weight', response.weight)
+                  this.$set(
+                    this.dataList1,
+                    'unitPrice',
+                    response.unitContractPrice
+                  )
+                })
+            }
+          }
+        }
+      },
+      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
+          }
+        }
+      },
+      requestadd(list, status) {
+        console.log(list)
+        list.compId = localStorage.getItem('ws-pf_compId')
+        list.publisher =
+          localStorage.getItem('ws-pf_roleName') +
+          localStorage.getItem('ws-pf_staffName')
+        warehousetask(list)
+          .toPromise()
+          .then((response) => {
+            woekflowhandle({
+                taskId: list.taskId,
+                approved: true,
+                auditMind: '34',
+                needReapply: false,
+              })
               .toPromise()
               .then((response) => {
-                this.$set(this.dataList, 'goodsName', response.goodsName)
-                this.$set(this.dataList, 'goodsNameKey', response.goodsNameKey)
-                this.$set(this.dataList, 'grade', response.grade)
-                this.$set(this.dataList, 'gradeKey', response.gradeKey)
-                this.$set(this.dataList, 'waterContent', response.waterContent)
-                this.$set(this.dataList, 'bulkDensity', response.bulkDensity)
-                // this.$set(this.dataList, 'weight', response.weight)
-                this.$set(
-                  this.dataList,
-                  'unitPrice',
-                  response.unitContractPrice
-                )
+                //   workflowcontent({workflowId:list.workflowId,businessKey:list.id}).toPromise()
+                // .then((response1) => {
+                //   console.log(response1)
+
+                workflowcontent({
+                    workflowId: item.workflowId,
+                    businessKey: item.id,
+                    type: '出入库任务'
+                  }).toPromise()
+                  .then((response1) => {
+                    this.$message.success('审核成功')
+                    this.$router.push({
+                      path: 'tranManagementWarehouseInOuttask'
+                    })
+                  })
+
+                // })
+              })
+          })
+      },
+      requestaudit(list, status) {
+        list.compId = localStorage.getItem('ws-pf_compId')
+        list.publisher =
+          localStorage.getItem('ws-pf_roleName') +
+          localStorage.getItem('ws-pf_staffName')
+        warehousetask(list)
+          .toPromise()
+          .then((response) => {
+            woekflowhandle({
+                taskId: list.taskId,
+                approved: false,
+                auditMind: this.auditMind,
+                needReapply: true,
               })
-          }
-        }
-      }
-    },
-    changecontract1(e) {
-      if (this.dataList1.taskTypeKey != 3) {
-        for (let i = 0; i < this.contractNoList.length; i++) {
-          if (this.contractNoList[i].contractNo == e) {
-            getGoodsName({
-              contractId: this.contractNoList[i].id,
-              contractNo: this.contractNoList[i].contractNo,
-            })
               .toPromise()
               .then((response) => {
-                this.$set(this.dataList1, 'goodsName', response.goodsName)
-                this.$set(this.dataList1, 'goodsNameKey', response.goodsNameKey)
-                this.$set(this.dataList1, 'grade', response.grade)
-                this.$set(this.dataList1, 'gradeKey', response.gradeKey)
-                this.$set(this.dataList1, 'waterContent', response.waterContent)
-                this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
-                this.$set(this.dataList1, 'weight', response.weight)
-                this.$set(
-                  this.dataList1,
-                  'unitPrice',
-                  response.unitContractPrice
-                )
+                workflowcontent({
+                    workflowId: item.workflowId,
+                    businessKey: item.id,
+                    type: '出入库任务'
+                  }).toPromise()
+                  .then((response1) => {
+                    this.$message.success('驳回成功')
+                    this.$router.push({
+                      path: 'tranManagementWarehouseInOuttask'
+                    })
+                  })
+
               })
+          })
+      },
+      //提交按钮
+      submit() {
+        this.dataList.inOutFlag = 1
+        this.dataList1.inOutFlag = 2
+        if (this.dataList.taskTypeKey == 1) {
+          this.requestadd(this.dataList)
+        } else if (this.dataList1.taskTypeKey == 2) {
+          this.requestadd(this.dataList1)
+        } else if (
+          this.dataList.taskTypeKey == 3 ||
+          this.dataList.taskTypeKey == 4
+        ) {
+          this.requestadd(this.dataList, 'repetition')
+          if (!this.deletetask) {
+            this.requestadd(this.dataList1, 'repetition')
           }
         }
-      }
-    },
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.dataList.agentKey = this.staffList[i].staffId
+      },
+      disableReasons() {
+        this.dataList.inOutFlag = 1
+        this.dataList1.inOutFlag = 2
+        if (!this.auditMind) {
+          this.$message({
+            message: '驳回原因不能为空!',
+            type: 'warning',
+          })
+          return
         }
-      }
-    },
-    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 (this.dataList.taskTypeKey == 1) {
+          this.requestaudit(this.dataList)
+        } else if (this.dataList1.taskTypeKey == 2) {
+          this.requestaudit(this.dataList1)
+        } else if (
+          this.dataList.taskTypeKey == 3 ||
+          this.dataList.taskTypeKey == 4
+        ) {
+          this.requestaudit(this.dataList, 'repetition')
+          if (!this.deletetask) {
+            this.requestaudit(this.dataList1, 'repetition')
+          }
         }
-      }
-    },
-    requestadd(list, status) {
-      console.log(list)
-      list.compId = localStorage.getItem('ws-pf_compId')
-      list.publisher =
-        localStorage.getItem('ws-pf_roleName') +
-        localStorage.getItem('ws-pf_staffName')
-      warehousetask(list)
-        .toPromise()
-        .then((response) => {
-          woekflowhandle({
-            taskId: list.taskId,
-            approved: true,
-            auditMind: '34',
-            needReapply: false,
-          })
-            .toPromise()
-            .then((response) => {
-            //   workflowcontent({workflowId:list.workflowId,businessKey:list.id}).toPromise()
-            // .then((response1) => {
-            //   console.log(response1)
-            workflowcontent({workflowId:item.workflowId,businessKey:item.id,type:'出入库任务'}).toPromise()
-            .then((response1) => {
-               this.$message.success('审核成功')
-              this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
-            })
-            
-            // })
-          })
-        })
-    },
-    requestaudit(list, status) {
-      list.compId = localStorage.getItem('ws-pf_compId')
-      list.publisher =
-        localStorage.getItem('ws-pf_roleName') +
-        localStorage.getItem('ws-pf_staffName')
-      warehousetask(list)
-        .toPromise()
-        .then((response) => {
-          woekflowhandle({
-            taskId: list.taskId,
-            approved: false,
-            auditMind: this.auditMind,
-            needReapply: true,
-          })
-            .toPromise()
-            .then((response) => {
-               workflowcontent({workflowId:item.workflowId,businessKey:item.id,type:'出入库任务'}).toPromise()
-            .then((response1) => {
-              this.$message.success('驳回成功')
-              this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
-            })
-              
-            })
-        })
-    },
-    //提交按钮
-    submit() {
-      this.dataList.inOutFlag = 1
-      this.dataList1.inOutFlag = 2
-      if (this.dataList.taskTypeKey == 1) {
-        this.requestadd(this.dataList)
-      } else if (this.dataList1.taskTypeKey == 2) {
-        this.requestadd(this.dataList1)
-      } else if (
-        this.dataList.taskTypeKey == 3 ||
-        this.dataList.taskTypeKey == 4
-      ) {
-        this.requestadd(this.dataList, 'repetition')
-        if (!this.deletetask) {
-          this.requestadd(this.dataList1, 'repetition')
+      },
+      selectwarehouseName() {},
+      tarechange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    disableReasons() {
-      this.dataList.inOutFlag = 1
-      this.dataList1.inOutFlag = 2
-      if (!this.auditMind) {
-        this.$message({
-          message: '驳回原因不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.taskTypeKey == 1) {
-        this.requestaudit(this.dataList)
-      } else if (this.dataList1.taskTypeKey == 2) {
-        this.requestaudit(this.dataList1)
-      } else if (
-        this.dataList.taskTypeKey == 3 ||
-        this.dataList.taskTypeKey == 4
-      ) {
-        this.requestaudit(this.dataList, 'repetition')
-        if (!this.deletetask) {
-          this.requestaudit(this.dataList1, 'repetition')
+      },
+      grossWeightchange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          )
         }
-      }
-    },
-    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
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[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
+      },
+      selectgoodsName1(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList1.goodsNameKey = this.goodnameList[i].constKey
+          }
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.gradeList.length; i++) {
-        if (this.gradeList[i].constValue == e) {
-          this.dataList.gradeKey = this.gradeList[i].constKey
-          if (this.dataList.taskTypeKey == 3) {
-            this.$set(this.dataList1, 'grade', e)
-            this.$set(this.dataList1, 'gradeKey', this.gradeList[i].constKey)
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.dataList.gradeKey = this.gradeList[i].constKey
+            if (this.dataList.taskTypeKey == 3) {
+              this.$set(this.dataList1, 'grade', e)
+              this.$set(this.dataList1, 'gradeKey', this.gradeList[i].constKey)
+            }
           }
         }
-      }
-    },
-    selectpackingMethod1(e) {
-      for (var i = 0; i < this.gradeList.length; i++) {
-        if (this.gradeList[i].constValue == e) {
-          this.dataList1.packingMethodKey = this.gradeList[i].constKey
-          if (this.dataList1.taskTypeKey == 4) {
-            this.$set(this.dataList, 'grade', e)
-            this.$set(this.dataList, 'gradeKey', this.gradeList[i].constKey)
+      },
+      selectpackingMethod1(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.dataList1.packingMethodKey = this.gradeList[i].constKey
+            if (this.dataList1.taskTypeKey == 4) {
+              this.$set(this.dataList, 'grade', e)
+              this.$set(this.dataList, 'gradeKey', this.gradeList[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.storageType1[i].constKey
+      },
+      selectstorageType1(e) {
+        for (var i = 0; i < this.storageType1.length; i++) {
+          if (this.storageType1[i].constValue == e) {
+            this.dataList1.inOutTypeKey = this.storageType1[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    businessDescriptionchange(e) {
-      console.log(e)
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
-    tasknumber() {
-      if (this.dataList.taskTypeKey == 1) {
-        this.inOutTaskNo = 'CK' + this.getdate() + this.MathRand()
-      } else if (this.dataList.taskTypeKey == 2) {
-        this.inOutTaskNo1 = 'RK' + this.getdate() + this.MathRand()
-      } else if (this.dataList.taskTypeKey == 3) {
-        var random = this.getdate() + this.MathRand()
-        this.inOutTaskNo = 'YKC' + random
-        this.inOutTaskNo1 = 'YKR' + random
-      } else if (this.dataList.taskTypeKey == 4) {
-        var random = this.getdate() + this.MathRand()
-        this.inOutTaskNo = 'TCC' + random
-        this.inOutTaskNo1 = 'TCR' + random
-      }
-    },
-    tasktypechange(e) {
-      if (!this.$route.query.relevanceId) {
-        this.tasknumber()
-      }
-      this.dataList1.taskTypeKey = e
-      if (this.dataList.taskTypeKey == 1) {
-        this.dataList.inOutType = '销售出库'
-        this.dataList.inOutTypeKey = '1'
-      }
-      if (this.dataList1.taskTypeKey == 2) {
-        this.dataList1.inOutType = '采购入库'
-        this.dataList1.inOutTypeKey = '1'
-      } else if (this.dataList1.taskTypeKey == 3) {
-        this.disabled = true
-        this.dataList1.inOutType = '移库入库'
-        this.dataList1.inOutTypeKey = '3'
-        this.dataList.inOutType = '移库出库'
-        this.dataList.inOutTypeKey = '3'
-      } else if (this.dataList1.taskTypeKey == 4) {
-        this.disabled = true
-        this.dataList1.inOutType = '退库'
-        this.dataList1.inOutTypeKey = '6'
-        this.dataList.inOutType = '销售出库'
-        this.dataList.inOutTypeKey = '1'
-      }
-    },
-    GetRandomNum(Min, Max) {
-      var Range = Max - Min
-      var Rand = Math.random()
-      return Min + Math.round(Rand * Range)
-    },
-    getList() {
-      gettaskhistories({
-        businessKey: this.$route.query.businessKey,
-        workflowId: this.$route.query.workflowId,
-      })
-        .toPromise()
-        .then((response) => {
-          this.taskhistories = response
-        })
-
-      if (this.$route.query.relevanceId) {
-        outexamine({ relevanceId: this.$route.query.relevanceId })
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      businessDescriptionchange(e) {
+        console.log(e)
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      tasknumber() {
+        if (this.dataList.taskTypeKey == 1) {
+          this.inOutTaskNo = 'CK' + this.getdate() + this.MathRand()
+        } else if (this.dataList.taskTypeKey == 2) {
+          this.inOutTaskNo1 = 'RK' + this.getdate() + this.MathRand()
+        } else if (this.dataList.taskTypeKey == 3) {
+          var random = this.getdate() + this.MathRand()
+          this.inOutTaskNo = 'YKC' + random
+          this.inOutTaskNo1 = 'YKR' + random
+        } else if (this.dataList.taskTypeKey == 4) {
+          var random = this.getdate() + this.MathRand()
+          this.inOutTaskNo = 'TCC' + random
+          this.inOutTaskNo1 = 'TCR' + random
+        }
+      },
+      tasktypechange(e) {
+        if (!this.$route.query.relevanceId) {
+          this.tasknumber()
+        }
+        this.dataList1.taskTypeKey = e
+        if (this.dataList.taskTypeKey == 1) {
+          this.dataList.inOutType = '销售出库'
+          this.dataList.inOutTypeKey = '1'
+        }
+        if (this.dataList1.taskTypeKey == 2) {
+          this.dataList1.inOutType = '采购入库'
+          this.dataList1.inOutTypeKey = '1'
+        } else if (this.dataList1.taskTypeKey == 3) {
+          this.disabled = true
+          this.dataList1.inOutType = '移库入库'
+          this.dataList1.inOutTypeKey = '3'
+          this.dataList.inOutType = '移库出库'
+          this.dataList.inOutTypeKey = '3'
+        } else if (this.dataList1.taskTypeKey == 4) {
+          this.disabled = true
+          this.dataList1.inOutType = '退库'
+          this.dataList1.inOutTypeKey = '6'
+          this.dataList.inOutType = '销售出库'
+          this.dataList.inOutTypeKey = '1'
+        }
+      },
+      GetRandomNum(Min, Max) {
+        var Range = Max - Min
+        var Rand = Math.random()
+        return Min + Math.round(Rand * Range)
+      },
+      getList() {
+        gettaskhistories({
+            businessKey: this.$route.query.businessKey,
+            workflowId: this.$route.query.workflowId,
+          })
           .toPromise()
           .then((response) => {
-            if (response.length > 1) {
-              if (response[0].taskTypeKey == 3) {
-                if (response[0].inOutType == '移库出库') {
-                  this.dataList = response[0]
-                  this.dataList1 = response[1]
-                } else {
-                  this.dataList = response[1]
+            this.taskhistories = response
+          })
+
+        if (this.$route.query.relevanceId) {
+          outexamine({
+              relevanceId: this.$route.query.relevanceId
+            })
+            .toPromise()
+            .then((response) => {
+              if (response.length > 1) {
+                if (response[0].taskTypeKey == 3) {
+                  if (response[0].inOutType == '移库出库') {
+                    this.dataList = response[0]
+                    this.dataList1 = response[1]
+                  } else {
+                    this.dataList = response[1]
+                    this.dataList1 = response[0]
+                  }
+                }
+              } else {
+                if (response[0].taskTypeKey == 3) {
+                  this.deletetask = true
+                  this.dataList1.inOutTaskNo =
+                    'YKR' +
+                    response[0].inOutTaskNo.substr(
+                      response[0].inOutTaskNo.indexOf('C') + 1,
+                      response[0].inOutTaskNo.length
+                    )
+                } else if (response[0].taskTypeKey == 2) {
                   this.dataList1 = response[0]
                 }
+                this.dataList = response[0]
               }
-            } else {
-              if (response[0].taskTypeKey == 3) {
-                this.deletetask = true
-                this.dataList1.inOutTaskNo =
-                  'YKR' +
-                  response[0].inOutTaskNo.substr(
-                    response[0].inOutTaskNo.indexOf('C') + 1,
-                    response[0].inOutTaskNo.length
-                  )
-              } else if (response[0].taskTypeKey == 2) {
-                this.dataList1 = response[0]
+            })
+        } else {
+          this.tasknumber()
+          this.$set(this.dataList, 'inOutType', '销售出库')
+          this.$set(this.dataList, 'inOutTypeKey', '1')
+          this.$set(this.dataList, 'goodsName', '玉米')
+          this.$set(this.dataList, 'goodsNameKey', '1')
+          this.$set(this.dataList, 'grade', '一等品')
+          this.$set(this.dataList, 'gradeKey', '1')
+          this.$set(this.dataList1, 'goodsName', '玉米')
+          this.$set(this.dataList1, 'goodsNameKey', '1')
+          this.$set(this.dataList1, 'grade', '一等品')
+          this.$set(this.dataList1, 'gradeKey', '1')
+        }
+
+        // 货名
+        pullDown({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        pullDown({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        pullDown({
+            constId: 'CON6'
+          })
+          .toPromise()
+          .then((response) => {
+            this.storageType = response
+          })
+        pullDown({
+            constId: 'CON5'
+          })
+          .toPromise()
+          .then((response) => {
+            this.storageType1 = response
+          })
+        xialaNo({
+            compId: this.compId,
+          })
+          .toPromise()
+          .then((response) => {
+            this.contractNoList = response
+            for (let i = 0; i < this.contractNoList.length; i++) {
+              if (this.contractNoList[i].contractNo == this.dataList.contractNo) {
+                if (this.contractNoList[i].priceType == "随行就市") {
+                  this.Pricetype = false
+                } else {
+                  this.Pricetype = true
+                }
               }
-              this.dataList = response[0]
             }
           })
-      } else {
-        this.tasknumber()
-        this.$set(this.dataList, 'inOutType', '销售出库')
-        this.$set(this.dataList, 'inOutTypeKey', '1')
-        this.$set(this.dataList, 'goodsName', '玉米')
-        this.$set(this.dataList, 'goodsNameKey', '1')
-        this.$set(this.dataList, 'grade', '一等品')
-        this.$set(this.dataList, 'gradeKey', '1')
-        this.$set(this.dataList1, 'goodsName', '玉米')
-        this.$set(this.dataList1, 'goodsNameKey', '1')
-        this.$set(this.dataList1, 'grade', '一等品')
-        this.$set(this.dataList1, 'gradeKey', '1')
-      }
-
-      // 货名
-      pullDown({ constId: 'CON2' })
-        .toPromise()
-        .then((response) => {
-          this.goodnameList = response
-        })
-      // 品级
-      pullDown({ constId: 'CON3' })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-      pullDown({ constId: 'CON6' })
-        .toPromise()
-        .then((response) => {
-          this.storageType = response
-        })
-      pullDown({ constId: 'CON5' })
-        .toPromise()
-        .then((response) => {
-          this.storageType1 = response
-        })
-      xialaNo({
-        compId: this.compId,
-      })
-        .toPromise()
-        .then((response) => {
-          this.contractNoList = response
-          for (let i = 0; i <  this.contractNoList.length; i++) {
-              if ( this.contractNoList[i].contractNo == this.dataList.contractNo) {
-                  if( this.contractNoList[i].priceType == "随行就市"){
-                    this.Pricetype = false
-                  }else{
-                    this.Pricetype = true
-                  }
+        //仓库名
+        getwarehousename({
+            compId: this.compId,
+            warehouseType: 1,
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseNameList = response
+            for (let i = 0; i < this.warehouseNameList.length; i++) {
+              if (
+                this.dataList.warehouseName ==
+                this.warehouseNameList[i].warehouseName
+              ) {
+                this.binNumberList1 = this.warehouseNameList[i].positionInfos
+              }
+              if (
+                this.dataList1.warehouseName ==
+                this.warehouseNameList[i].warehouseName
+              ) {
+                this.binNumberList = this.warehouseNameList[i].positionInfos
               }
             }
-        })
-      //仓库名
-      getwarehousename({
-        compId: this.compId,
-        warehouseType: 1,
-      })
-        .toPromise()
-        .then((response) => {
-          this.warehouseNameList = response
-          for (let i = 0; i < this.warehouseNameList.length; i++) {
-            if (
-              this.dataList.warehouseName ==
-              this.warehouseNameList[i].warehouseName
-            ) {
-              this.binNumberList1 = this.warehouseNameList[i].positionInfos
-            }
-            if (
-              this.dataList1.warehouseName ==
-              this.warehouseNameList[i].warehouseName
-            ) {
-              this.binNumberList = this.warehouseNameList[i].positionInfos
-            }
+          })
+        getwarehousename({
+            compId: this.compId,
+            warehouseType: 2,
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseNameList1 = response
+          })
+        //经办人
+        getstaff({
+            compId: localStorage.getItem('ws-pf_compId')
+          })
+          .toPromise()
+          .then((response) => {
+            this.options = response
+            this.staffList = response
+            //  this.agent = response
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
           }
-        })
-      getwarehousename({
-        compId: this.compId,
-        warehouseType: 2,
-      })
-        .toPromise()
-        .then((response) => {
-          this.warehouseNameList1 = response
-        })
-      //经办人
-      getstaff({ compId: localStorage.getItem('ws-pf_compId') })
-        .toPromise()
-        .then((response) => {
-          this.options = response
-          this.staffList = response
-          //  this.agent = response
-        })
-    },
-    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.receiveAttachmentPath === null ||
-        row.receiveAttachmentPath === ''
-      ) {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      } else {
-        this.accessoryTFs = true
-      }
-      this.appendixIdss = row.receiveAttachmentPath
-    },
-    handleExamine(row) {
-      this.$router.push({
-        name: 'salesContractExamine',
-        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
+      },
+      fujian(row) {
+        if (
+          row.receiveAttachmentPath === null ||
+          row.receiveAttachmentPath === ''
+        ) {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        } else {
+          this.accessoryTFs = true
+        }
+        this.appendixIdss = row.receiveAttachmentPath
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          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
+          })
+      },
     },
-  },
-}
+  }
 </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;
   }
-  .el-form-item {
-    width: 33.3333%;
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    height: 100px;
+    margin: 10px 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 {
-  height: 100px;
-  margin: 10px 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;
-}
-.huom {
-  width: 100%;
-}
-.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);
-}
-.ziti {
-  width: 72px;
-  height: 20px;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 20px;
-  margin-left: 310px;
-  /* margin-top: 112px; */
-}
-.ziti1 {
-  width: 100px;
-  font-size: 16px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
-  color: #262626;
-  line-height: 22px;
-  margin-left: 381px;
-  margin-top: -21px;
-}
-.winseaview-view {
-  padding: 0 0 20px;
-}
-.container {
-  overflow: scroll;
-  height: 93vh;
-}
-.nav {
-  width: 381px;
-  height: 20px;
-}
-.wenzi {
-  margin: 0 auto;
-}
+
+  .huom {
+    width: 100%;
+  }
+
+  .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);
+  }
+
+  .ziti {
+    width: 72px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 20px;
+    margin-left: 310px;
+    /* margin-top: 112px; */
+  }
+
+  .ziti1 {
+    width: 100px;
+    font-size: 16px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #262626;
+    line-height: 22px;
+    margin-left: 381px;
+    margin-top: -21px;
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  .nav {
+    width: 381px;
+    height: 20px;
+  }
+
+  .wenzi {
+    margin: 0 auto;
+  }
 </style>

+ 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>

+ 39 - 45
src/views/tradeServicesManagement/inOutRecord.vue

@@ -66,7 +66,7 @@
       @selection-change="handleSelectionChange"
       :data="recordList"
       style="width: 100%"
-      height="780"
+      border height="calc(100% - 170px)"
     >
       <el-table-column type="selection" width="55"></el-table-column>
       <el-table-column type="index" label="序号" width="50">
@@ -77,7 +77,6 @@
       </el-table-column>
       <el-table-column prop="goodsName" label="货名"> </el-table-column>
       <el-table-column prop="grossWeight" label="毛重(吨)"> 
-        <template slot-scope="scope">{{scope.grossWeight}}</template>
       </el-table-column>
       <el-table-column prop="tare" label="皮重(吨)"> 
          </el-table-column>
@@ -101,6 +100,12 @@
       </el-table-column>
       <el-table-column prop="inOutDate" label="出入库日期"> </el-table-column>
     </el-table>
+    <div style="text-align: center">
+      <!-- 页数 -->
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"></el-pagination>
+    </div>
     <el-dialog :visible.sync="isShowadjustment" title="调整">
       <div>
         <el-input
@@ -345,6 +350,7 @@
             <td class="col" colspan="7">{{ printData.capitalize }}</td>
           </tr>
         </table>
+        
         <div class="bottom">
           <div class="bottom-row1">
             <div>
@@ -354,7 +360,6 @@
             <div>皮检:{{ printData.weighingManagement.skinInspector }}</div>
             <div>结算:{{ printData.settlementClerk }}</div>
             <div>付款:{{ printData.cashier }}</div>
-            <div>复点:{{}}</div>
             <div></div>
           </div>
           <div class="bottom-row2">
@@ -390,18 +395,7 @@
           <el-button type="primary" @click="printBig">打印单据</el-button>
         </div>
       </el-dialog> -->
-       <div class="pageNumber">
-    <!-- 页数 -->
-      <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>
@@ -449,12 +443,12 @@ export default {
        printList1: [],
       newList:[],
       count:0,
-      startDate:"",
-      endDate:"",
+      startDate:'',
+      endDate:'',
     }
   },
   activated() {
-    localStorage.setItem("pageUp","1")
+    localStorage.setItem('pageUp','1')
     this.deptBudgetList.baseId = this.$route.query.baseId
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
@@ -464,8 +458,8 @@ export default {
   },
   methods: {
     find(){
-        this.startDate = ""
-        this.endDate = ""
+        this.startDate = ''
+        this.endDate = ''
       if(this.value2){
           this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
           this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
@@ -486,27 +480,27 @@ export default {
       })
         .toPromise()
         .then((res) => {
-          for (let i = 0; i < res.records.length; i++) {
-            if (res.records[i].grossWeight) {
-              res.records[i].grossWeight = Number(res.records[i].grossWeight * 1000).toFixed(3)
-            }
-            if (res.records[i].tare) {
-              res.records[i].tare = Number(res.records[i].tare * 1000).toFixed(3)
-            }
-            if (res.records[i].netWeight) {
-              res.records[i].netWeight = Number(res.records[i].netWeight*1000).toFixed(3)
+          // for (let i = 0; i < res.records.length; i++) {
+          //   if (res.records[i].grossWeight) {
+          //     res.records[i].grossWeight = Number(res.records[i].grossWeight * 1000).toFixed(3)
+          //   }
+          //   if (res.records[i].tare) {
+          //     res.records[i].tare = Number(res.records[i].tare * 1000).toFixed(3)
+          //   }
+          //   if (res.records[i].netWeight) {
+          //     res.records[i].netWeight = Number(res.records[i].netWeight*1000).toFixed(3)
               
-            }
-            if (
-              res.records[i].grossWeight &&
-              res.records[i].tare &&
-              res.records[i].netWeight
-            ) {
-              res.records[i].weight = Number(res.records[i].grossWeight - res.records[i].tare -  res.records[i].netWeight).toFixed(3)
-            } else {
-              res.records[i].weight = null
-            }
-          }
+          //   }
+          //   if (
+          //     res.records[i].grossWeight &&
+          //     res.records[i].tare &&
+          //     res.records[i].netWeight
+          //   ) {
+          //     res.records[i].weight = Number(res.records[i].grossWeight - res.records[i].tare -  res.records[i].netWeight).toFixed(3)
+          //   } else {
+          //     res.records[i].weight = null
+          //   }
+          // }
           this.recordList = res.records
           this.deptBudgetTotal = res.total
         })
@@ -583,14 +577,14 @@ export default {
       this.printList1 = []
       this.count = 0
        for(let j = 0 ; j < this.ruleForm.type.length ; j++){
-          if(this.ruleForm.type[j] == "打印磅单"){
+          if(this.ruleForm.type[j] == '打印磅单'){
               for(let i = 0 ; i < selection.length ; i++){
                 // selection[i].printType = "打印磅单"
               selection[i].code = this.getdate() + selection[i].commonWarehouseNo + this.verifyinit()
                  this.printList.push(selection[i])
               }
           }
-         else if(this.ruleForm.type[j] == "打印结算单"){
+         else if(this.ruleForm.type[j] == '打印结算单'){
             for(let index = 0 ; index < selection.length ; index++){
               if(!selection[index].paymentId){
                  this.$message.error('只有收购入库的条目才能打印结算单,请重新勾选!')
@@ -600,7 +594,7 @@ export default {
             this.printSettlementSheet(selection)
           }
         }
-        if(this.ruleForm.type.length == 1 && this.ruleForm.type[0] == "打印磅单"){
+        if(this.ruleForm.type.length == 1 && this.ruleForm.type[0] == '打印磅单'){
             sessionStorage.setItem('inOutRecord_printBD', JSON.stringify(this.printList))
              window.open('../../../../../static/tradeServicesPrint.html')
         }
@@ -616,8 +610,8 @@ export default {
                  if(this.count == list.length){
                    sessionStorage.setItem('inOutRecord_printBD', JSON.stringify(this.printList))
                     sessionStorage.setItem('inOutRecord_printJSD', JSON.stringify(this.printList1))
-                    console.log("磅单",this.printList)
-                    console.log("结算单",this.printList1)
+                    console.log('磅单',this.printList)
+                    console.log('结算单',this.printList1)
                    window.open('../../../../../static/tradeServicesPrint.html')
                     }
                })

+ 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>

+ 44 - 23
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -29,13 +29,13 @@
       </el-form-item>
       <el-form-item label="仓库名称" prop="warehouseName" class="forlist">
         <el-select v-model="deptBudgetList.warehouseName" filterable placeholder="请选择仓库" @change="changeWarehouse" clearable>
-          <el-option v-for="(item,index) in warehouseList" :key='index' :label="item.warehouseName" :value="item.id">
+          <el-option v-for="(item,index) in warehouseList" :key='index' :label="item.warehouseName" :value="item.warehouseName">
           </el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="仓位号" 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 :label="item.binNumber" :value="item.binNumber" v-for="(item,index) in cwNumberList" :key='index'>
           </el-option>
         </el-select>
       </el-form-item>
@@ -43,19 +43,20 @@
         <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
       </el-form-item>
       <el-form-item prop="goodsName" label="货名">
-        <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="changeGoodsName" filterable clearable>
-          <el-option :label="item.goodsName" :value="item.id" v-for="(item,index) in goodsList" :key='index' >
+        <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="dataFlush" filterable clearable>
+          <el-option v-for="item in goodsList" :key="item.goodsName" :label="item.goodsName"
+                  :value="item.goodsName" >
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="grade" label="品级">
+      <!-- <el-form-item prop="grade" label="品级">
         <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>
           <el-option label="等外" value="等外"></el-option>
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="现有储量" prop="nowWeight" class="forlist">
         <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small"></el-input>
       </el-form-item>
@@ -70,13 +71,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"
@@ -122,7 +123,12 @@
     data() {
       return {
         deptBudgetList: {
-          grade:"二等"
+          goodsName:'',
+          goodsNameKey:'',
+          useWeight:'',
+          nowWeight:'',
+          warehouseNo:'',
+          warehouseName:''
         },
         size: 10,
         compId: '',
@@ -143,7 +149,7 @@
     activated() {
       this.compId = localStorage.getItem('ws-pf_compId')
       this.deptBudgetList.compId = this.compId
-      let i = localStorage.getItem("pageUp")
+      let i = localStorage.getItem('pageUp')
       if(i != 1){
       this.getcompList()
       this.getList()
@@ -166,10 +172,10 @@
       },
       getList() {
         // this.deptBudgetList.grade = '二等'
-        WarehouseReceiptBankList({constId:"BANK1"}).toPromise().then((response) => {
+        WarehouseReceiptBankList({constId:'BANK1'}).toPromise().then((response) => {
           this.bankList = response
         })
-         WarehouseReceiptBankList({constId:"THREE1"}).toPromise().then((response) => {
+         WarehouseReceiptBankList({constId:'THREE1'}).toPromise().then((response) => {
           this.threeList = response
         })
 
@@ -218,10 +224,10 @@
                   this.deptBudgetList.goodsName = this.goodsList[0].goodsName
                   this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsNameKey : ''
                 }else {
-                    this.deptBudgetList.nowWeight = ""
-                  this.deptBudgetList.useWeight = ""
-                  this.deptBudgetList.goodsName =""
-                  this.deptBudgetList.goodsNameKey = ""
+                    this.deptBudgetList.nowWeight = ''
+                  this.deptBudgetList.useWeight = ''
+                  this.deptBudgetList.goodsName =''
+                  this.deptBudgetList.goodsNameKey = ''
                 }
             
               }
@@ -235,12 +241,26 @@
       changeGoodsName(val) {
         let _data = this.goodsList
         for (let i = 0; i < _data.length; i++) {
-          if (_data[i].id == val) {
+          if (_data[i].goodsName == val) {
             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
+          }
+        }
+      },
+      dataFlush(){
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseList[i].warehouseName == this.deptBudgetList.warehouseName) {
+            let tmpGoodsName = this.warehouseList[i].goodsNameInfos;
+            for(let j = 0;j<tmpGoodsName.length;j++){
+              if(tmpGoodsName[j].binNumber == this.deptBudgetList.warehouseNo){
+                if(tmpGoodsName[j].goodsName == this.deptBudgetList.goodsName){
+                  this.deptBudgetList.useWeight = tmpGoodsName[j].useStorage;
+                  this.deptBudgetList.nowWeight = tmpGoodsName[j].storage;
+                }
+              }
+            }                                   
           }
         }
       },
@@ -257,7 +277,7 @@
         
         let _data = this.cwNumberList
         for (let i = 0; i < _data.length; i++) {
-          if (_data[i].id == val) {
+          if (_data[i].binNumber == val) {
             this.deptBudgetList.warehouseNoId = _data[i].id
             this.deptBudgetList.warehouseNo = _data[i].binNumber
             this.deptBudgetList.baseId = _data.baseId
@@ -274,10 +294,11 @@
           }
         }
         if(this.goodsList.length == 0){
-          this.deptBudgetList.goodsName = ""
+          this.deptBudgetList.goodsName = ''
         }else{
            this.deptBudgetList.goodsName = this.goodsList[0].goodsName
         }
+        this.dataFlush();
       },
       // 名头切换
       changeCompOptionList(val) {
@@ -296,7 +317,7 @@
         console.log('切换后仓库数据', val)
         let _data = this.warehouseList
         for (let i = 0; i < _data.length; i++) {
-          if (_data[i].id == val) {
+          if (_data[i].warehouseName == 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 : ''
@@ -404,7 +425,7 @@
           }).then(() => {
             addList(this.deptBudgetList).toPromise().then((response) => {
               // this.tableData = response.records
-              localStorage.removeItem("pageUp")
+              localStorage.removeItem('pageUp')
               this.$message.success('提交成功')
               this.$router.push({
                 path: 'warehouseReceiptRegulation'
@@ -428,7 +449,7 @@
           })
       },
       cancel() {
-        localStorage.removeItem("pageUp")
+        localStorage.removeItem('pageUp')
         this.$router.push({
           path: 'warehouseReceiptRegulation'
         })

+ 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>

+ 168 - 283
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>
@@ -73,182 +52,82 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="grade" label="品级" span="1">
-      <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled>
+      <!-- <el-form-item prop="grade" label="品级" span="1">
+        <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>
           <el-option label="等外" value="等外"></el-option>
         </el-select>
-      </el-form-item>
+      </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() {

+ 4 - 13
src/views/warehouse/warehouseManagementDelete.vue

@@ -76,8 +76,7 @@
         </el-table-column>
         <el-table-column prop="warehouseLocation" label="仓库所在地">
           <template scope="scope">
-            {{ scope.row.warehousePrivate }}{{ scope.row.warehouseCity
-            }}{{ scope.row.warehouseArea }}
+            {{ scope.row.warehousePrivate }}{{ scope.row.warehouseCity}}{{ scope.row.warehouseArea }}
           </template>
         </el-table-column>
         <el-table-column prop="residual" label="应余库存(吨)">
@@ -88,18 +87,10 @@
             <ws-button
               type="primary"
               @click="handleHide(scope.row)"
-              v-if="scope.row.showFlag == 0"
-              >显示</ws-button
-            >
-            <ws-button
-              type="primary"
-              @click="handleHide(scope.row)"
-              v-if="scope.row.showFlag == 1"
-              >隐藏</ws-button
-            >
+              v-if="scope.row.showFlag == 0">显示</ws-button>
+            <ws-button type="primary" @click="handleHide(scope.row)" v-if="scope.row.showFlag == 1">隐藏</ws-button>
             <ws-button type="primary" @click="handleDelete(scope.row)"
-              >删除</ws-button
-            >
+              >删除</ws-button>
           </template>
         </el-table-column>
       </el-table>

+ 30 - 17
src/views/warehouse/warehouseManagementDelivery.vue

@@ -344,11 +344,15 @@
                 prop="carNo"
                 v-if="deptBudgetList.outType == '散船'"
               >
-                <ws-input
+                <!-- <ws-input
                   v-model="deptBudgetList.carNo"
                   placeholder="请输入船名"
                   size="small"
-                />
+                /> -->
+                <ws-input v-if='shipInfoList.length<2' v-model="deptBudgetList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+                <el-select v-else v-model="deptBudgetList.shipName" placeholder="请选择船名" @change='shipNamechange'>
+                  <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipName" :value="item.shipName" />
+                </el-select>
               </ws-form-item>
               <ws-form-item
                 label="航次"
@@ -356,12 +360,10 @@
                 prop="shipNumber"
                 v-if="deptBudgetList.outType == '散船'"
               >
-                <ws-input
-                  v-model="deptBudgetList.shipNumber"
-                  placeholder="请输入航次"
-                  maxlength="20"
-                  size="small"
-                />
+                <ws-input v-if='shipInfoList.length<2' v-model="deptBudgetList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+                <el-select v-else disabled v-model="deptBudgetList.shipNumber" placeholder="请选择航次">
+                  <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipNo" :value="item.shipNo" />
+                </el-select>
               </ws-form-item>
               <!--车号  -->
               <ws-form-item
@@ -635,6 +637,7 @@ export default {
       tableDate: [],
       // 是否显示
       showType: true,
+      shipInfoList:[],
       readonly: true,
       // 年
       year: '',
@@ -702,7 +705,7 @@ export default {
         type:'干粮',
         addressUrl:'',
         warehouseInOutDetail: {},
-         selfLoading:"0",
+         selfLoading:'0',
       },
       historyList: [],
 
@@ -713,7 +716,7 @@ export default {
       },
       accessoryTFs: false,
       deptBudgetList1:[],
-      carChange1:"手动填写",
+      carChange1:'手动填写',
       carjudge:false
     }
   },
@@ -732,11 +735,18 @@ 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='识别下拉'
+        }
+      },
+      shipNamechange(e){
+        for (let i = 0; i < this.shipInfoList.length; i++) {
+          if(this.shipInfoList[i].shipName==e){
+            this.deptBudgetList.shipNumber=this.shipInfoList[i].shipNo
+          }
         }
       },
     imgBig(item){
@@ -816,6 +826,9 @@ export default {
             this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
             this.carstatus=true
           }
+          if(this.outContractNo[i].shipInfoList){
+               this.shipInfoList = this.outContractNo[i].shipInfoList
+            }
         }
       }
     },
@@ -904,7 +917,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 +1233,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 +1615,7 @@ export default {
         }
       }
       if(!this.carstatus){//若自运的合同该字段置空
-          this.deptBudgetList.selfLoading = ""
+          this.deptBudgetList.selfLoading = ''
         }
       this.$confirm(`确定提交出库信息`, {
         cancelButtonText: '取消',

+ 89 - 56
src/views/warehouse/warehouseManagementGross.vue

@@ -232,7 +232,7 @@
                   " src="../../../public/img/edit.png" @click="editClick(1)" alt="" />
               </ws-form-item>
               <ws-form-item label="运费(元/吨)" span="1" prop="freight">
-                <ws-input :disabled="disabled2" v-model="deptBudgetList.freight" placeholder="请输入运费" size="small"
+                <ws-input  v-model="deptBudgetList.freight" placeholder="请输入运费" size="small"
                   type="number" @mousewheel.native.prevent />
                 <img width="17" height="18" style="
                     vertical-align: text-top;
@@ -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">
@@ -266,10 +269,17 @@
               </ws-form-item>
               <!--船名  -->
               <ws-form-item label="船名" span="1" prop="carNo" v-if="deptBudgetList.outType == '散船'">
-                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入船名" size="small" />
+                <!-- <ws-input v-model="deptBudgetList.carNo" placeholder="请输入船名" size="small" /> -->
+                 <ws-input v-if='shipInfoList.length<2' v-model="deptBudgetList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+                <el-select v-else v-model="deptBudgetList.shipName" placeholder="请选择船名" @change='shipNamechange'>
+                  <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipName" :value="item.shipName" />
+                </el-select>
               </ws-form-item>
               <ws-form-item label="航次" span="1" prop="shipNumber" v-if="deptBudgetList.outType == '散船'">
-                <ws-input v-model="deptBudgetList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+                 <ws-input v-if='shipInfoList.length<2' v-model="deptBudgetList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+                <el-select v-else disabled v-model="deptBudgetList.shipNumber" placeholder="请选择航次">
+                  <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipNo" :value="item.shipNo" />
+                </el-select>
               </ws-form-item>
               <!--车号  -->
               <ws-form-item label="车号" span="1" prop="carNo" v-if="deptBudgetList.outType == '火运'">
@@ -472,6 +482,7 @@
         searchKeyWord: '',
         contractType: 2,
         startDate: null,
+        shipInfoList:[],
         endDate: null,
         goodnameList: {},
         checked: true,
@@ -517,6 +528,7 @@
           grossWeight: '',
           tare: '',
           inOutDate: '',
+          outType:'汽运'
         },
         historyList: [],
         cost: '',
@@ -601,6 +613,13 @@
       // }
     },
     methods: {
+      shipNamechange(e){
+        for (let i = 0; i < this.shipInfoList.length; i++) {
+          if(this.shipInfoList[i].shipName==e){
+            this.deptBudgetList.shipNumber=this.shipInfoList[i].shipNo
+          }
+        }
+      },
       // 千丰自动计算扣款
       automaticCalculation() {
         let _price = 0
@@ -663,23 +682,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 +715,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 +800,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 +1326,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 +1420,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 +1871,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 +1896,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 +2114,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 (
@@ -2211,6 +2237,9 @@
               this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
               // this.carstatus = true
             }
+            if(this.outContractNo[i].shipInfoList){
+               this.shipInfoList = this.outContractNo[i].shipInfoList
+            }
           }
         }
       },
@@ -2388,6 +2417,10 @@
           .toPromise()
           .then((response) => {
             this.options = response
+            if(this.options.length>0){
+              this.deptBudgetList.personChargeKey = this.options[0].staffId
+              this.deptBudgetList.agent = this.options[0].staffName
+            }
             this.qualityInspectorList = response
             this.staffList = response
             //  this.agent = response

+ 111 - 7
src/views/warehouse/warehouseManagementNoWeight.vue

@@ -73,7 +73,7 @@
             <el-table-column prop="backOffice" label="操作人"> </el-table-column>
             <el-table-column prop="updateDate" label="保存时间">
             </el-table-column>
-            <el-table-column prop="address" label="操作" width="200">
+            <el-table-column prop="address" label="操作" width="400">
               <template slot-scope="scope">
                 <ws-button v-if="scope.row.inOutFlag =='2' " v-hasPermission="
            `warehouseManagement.warehouse.warehouseInfo.in`
@@ -85,6 +85,16 @@
           " class="putstorage" @click="edits(scope.row)">
                   毛检
                 </ws-button>
+              <ws-button v-hasPermission="
+           `warehouseManagement.warehouse.warehouseInfo.huan`
+          " class="putstorage" @click="exchange(scope.row)">
+                  换仓
+                </ws-button>
+                <el-button v-hasPermission="
+           `warehouseManagement.warehouse.warehouseInfo.huan`
+          "  type="danger" class="putstorage" @click="deletewarehousefunction(scope.row)">
+                  删除
+                </el-button>
                 <!-- <el-button @click="print(scope.row)"  v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button > -->
 
                 <!-- <div class="record" @click="edits(scope.row)">编辑</div>
@@ -100,7 +110,21 @@
               :total="deptBudgetTotal">
             </el-pagination>
           </div>
-
+          <el-dialog
+          title="提示"
+          :visible.sync="dialogVisible"
+          width="30%"
+          :before-close="handleClose">
+          <el-select filterable clearable v-model="binNumber" placeholder="请选择仓位" class="typeselect"
+              @change="binNumberChange">
+              <el-option v-for="item in binnumberList" :key="item.binNumber" :label="item.binNumber"
+                :value="item.binNumber" />
+            </el-select>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="dialogVisible = false">取 消</el-button>
+            <el-button type="primary" @click="dialogVisibleconfirm">确 定</el-button>
+          </span>
+        </el-dialog>
         </div>
       </ws-form>
 
@@ -112,6 +136,9 @@
     delInOut,
     completeList,
     getPrintInfo,
+    getbinnumber,
+    addstorageputList,
+    postdeletewarehouse
     // deletewarehouse,
     // warehouseName,
     // addstorageputList,
@@ -147,6 +174,7 @@
         tableDate: [],
         // 是否显示
         showType: true,
+        binNumber:'', 
         // 年
         year: '',
         deptBudgetTotal: 0,
@@ -158,12 +186,15 @@
         startDate: null,
         endDate: null,
         value2: [],
+        dialogVisible:false,
+        id:0,
         deletewarehouse: [],
         improved: [],
         row: [],
         deptBudgetList1: [],
         // 提交类型
         submitType: true,
+        binnumberList:[],
         selectpackingMethod: {},
         size: 10,
         compId: localStorage.getItem('ws-pf_compId'),
@@ -190,7 +221,7 @@
       //cg.viewSpareMoney
       // this.getVesselData();
       this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
-      this.binNumber = this.$route.params.binNumber
+      this.binNumber = this.$route.query.binNumber
       this.status = this.$route.query.status
       this.deptBudgetList.warehouseType = this.$route.query.warehouseType
       this.createType = this.$route.query.createType
@@ -204,8 +235,74 @@
       this.showType = this.isShow
     },
     methods: {
+      deletewarehousefunction(row){
+        postdeletewarehouse({id:row.id}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '删除成功',
+                })
+							this.getList(
+              this.$route.query.baseId,
+              this.$route.query.positionId,
+              this.$route.query.warehouseType
+            )
+						})
+      },
+      handleClose(){
+        this.dialogVisible=false
+      },
+      dialogVisibleconfirm(){
+        this.$confirm(`确定修改仓位?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+              addstorageputList({statusFlag:1,id:this.id,positionId:this.deptBudgetList.positionId,binNumber:this.binNumber,warehouseInOutDetail: JSON.parse(this.warehouseInOutDetail)}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '修改仓位成功',
+                })
+                this.dialogVisible=false
+							this.getList(
+              this.$route.query.baseId,
+              this.$route.query.positionId,
+              this.$route.query.warehouseType
+            )
+              
+						})
+          })
+          .catch(() => {
+            return false
+          })
+        
+      },
+      binNumberChange(e){
+					for (let i = 0; i < this.binnumberList.length; i++) {
+						if(this.binnumberList[i].binNumber==e){
+							this.deptBudgetList.positionId=this.binnumberList[i].id
+						}
+					}
+			},
+       exchange(row){
+         var that=this
+         getbinnumber({id:  this.$route.query.baseId}).toPromise()
+						.then((response) => {
+							
+							this.binnumberList = response.warehousePositionInfoList
+              this.$forceUpdate()
+						})
+         this.id=row.id
+         this.warehouseInOutDetail= JSON.stringify(row.warehouseInOutDetail),
+         this.dialogVisible=true
+
+       },
       datechange() {
-        this.getList()
+        this.getList( this.$route.query.baseId,
+              this.$route.query.positionId,
+              this.$route.query.warehouseType)
       },
       //返回按钮
       returnWarehouse() {
@@ -385,12 +482,16 @@
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)
         this.pageSize = val
-        this.getList()
+        this.getList( this.$route.query.baseId,
+              this.$route.query.positionId,
+              this.$route.query.warehouseType)
       },
       handleCurrentChange(val) {
         this.currentPage = val
         console.log(`当前页: ${val}`)
-        this.getList()
+        this.getList( this.$route.query.baseId,
+              this.$route.query.positionId,
+              this.$route.query.warehouseType)
       },
       //收
       getList(id, id1, id2) {
@@ -428,6 +529,7 @@
             })
             .toPromise()
             .then((response) => {
+              this.deptBudgetTotal = response.total
               this.improved = response
             })
         }
@@ -474,7 +576,9 @@
       this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
       this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
       this.currentPage = 1
-      this.getList()
+      this.getList( this.$route.query.baseId,
+              this.$route.query.positionId,
+              this.$route.query.warehouseType)
     },
     // deletecontract(){},
     //删除

+ 36 - 19
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -233,7 +233,11 @@
               </ws-form-item>
               <!--船名  -->
               <ws-form-item label="船名" span="1" prop="carNo" v-if="deptBudgetList.outType == '散船'">
-                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入船名" size="small" />
+                <!-- <ws-input v-model="deptBudgetList.carNo" placeholder="请输入船名" size="small" /> -->
+                 <ws-input v-if='shipInfoList.length<2' v-model="dataList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+                <el-select v-else v-model="dataList.shipName" placeholder="请选择船名">
+                  <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipName" :value="item.shipName" />
+                </el-select>
               </ws-form-item>
               <!--车号  -->
               <ws-form-item label="车号" span="1" prop="carNo" v-if="deptBudgetList.outType == '火运'">
@@ -422,7 +426,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 深度监听
@@ -449,6 +453,7 @@
         tableDate: [],
         // 是否显示
         showType: true,
+        shipInfoList:[],
         // 年
         year: '',
         deptBudgetTotal: 0,
@@ -583,6 +588,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
@@ -621,6 +627,7 @@
       // }
     },
     methods: {
+      
       // 千丰自动计算扣款
       automaticCalculation() {
         let _price = 0
@@ -749,13 +756,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 == '移库入库') {
@@ -773,6 +782,9 @@
               this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
               // this.carstatus = true
             }
+            if(this.outContractNo[i].shipInfoList){
+               this.shipInfoList = this.outContractNo[i].shipInfoList
+            }
           }
         }
       },
@@ -915,7 +927,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 +1434,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 +1492,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)
         }
       },

+ 37 - 20
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -191,7 +191,8 @@
               </ws-form-item>
               <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
               dataList.outType == '汽运' ||
-              dataList.outType == '集装箱船'
+              dataList.outType == '集装箱船' ||
+              dataList.outType == '散船'
             ">
                 <ws-input v-if="!carstatus || carjudge" v-model="dataList.carNo" placeholder="请输入车牌号" maxlength="7"
                   size="small" />
@@ -242,10 +243,16 @@
                 <ws-input v-model="dataList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
               </ws-form-item>
               <ws-form-item label="船名" span="1" prop="shipName" v-if="dataList.outType == '散船'">
-                <ws-input v-model="dataList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+                <ws-input v-if='shipInfoList.length<2' v-model="dataList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+                <el-select v-else v-model="dataList.shipName" placeholder="请选择船名" @change='shipNamechange'>
+                  <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipName" :value="item.shipName" />
+                </el-select>
               </ws-form-item>
               <ws-form-item label="航次" span="1" prop="shipNumber" v-if="dataList.outType == '散船'">
-                <ws-input v-model="dataList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+                <ws-input v-if='shipInfoList.length<2' v-model="dataList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+                <el-select v-else disabled v-model="dataList.shipNumber" placeholder="请选择航次">
+                  <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipNo" :value="item.shipNo" />
+                </el-select>
               </ws-form-item>
             </ws-info-table>
           </div>
@@ -431,6 +438,7 @@
         options: [],
         options1: [],
         options2: [],
+        shipInfoList:[],
         carstatus: false,
         storageType: [],
         deliveryType: [],
@@ -474,7 +482,7 @@
           inOutDate: '',
           inOutType: '',
           goodsName: '',
-          selfLoading: "0",
+          selfLoading: '0',
           warehouseInOutDetail: {
             qualityInspector: '',
           },
@@ -500,8 +508,8 @@
         param: 9600,
         allowEdit: true,
         result1: '00',
-        grossWeight: "", //显示的毛重
-        carChange1: "手动填写",
+        grossWeight: '', //显示的毛重
+        carChange1: '手动填写',
         carjudge: false
       }
     },
@@ -554,16 +562,23 @@
       this.getList()
     },
     methods: {
+      shipNamechange(e){
+        for (let i = 0; i < this.shipInfoList.length; i++) {
+          if(this.shipInfoList[i].shipName==e){
+            this.dataList.shipNumber=this.shipInfoList[i].shipNo
+          }
+        }
+      },
       dataFilter2(){},
       //切换车牌号输入状态
       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) {
@@ -723,6 +738,9 @@
               this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
               // this.carstatus = true
             }
+            if(this.outContractNo[i].shipInfoList){
+               this.shipInfoList = this.outContractNo[i].shipInfoList
+            }
           }
         }
       },
@@ -790,7 +808,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 +1181,7 @@
           }
         }
         if (!this.carstatus) { //若自运的合同该字段置空
-          this.deptBudgetList.selfLoading = ""
+          this.deptBudgetList.selfLoading = ''
         }
         this.$confirm(`确定提交毛重检斤`, {
             cancelButtonText: '取消',
@@ -1182,7 +1200,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 +1220,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 +1243,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
                     )

+ 29 - 16
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -312,11 +312,15 @@
                 prop="carNo"
                 v-if="dataList.outType == '散船'"
               >
-                <ws-input
+                <!-- <ws-input
                   v-model="dataList.carNo"
                   placeholder="请输入船名"
                   size="small"
-                />
+                /> -->
+                <ws-input v-if='shipInfoList.length<2' v-model="dataList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+                <el-select v-else v-model="dataList.shipName" placeholder="请选择船名" @change='shipNamechange'>
+                  <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipName" :value="item.shipName" />
+                </el-select>
               </ws-form-item>
               <ws-form-item
                 label="航次"
@@ -324,12 +328,10 @@
                 prop="shipNumber"
                 v-if="dataList.outType == '散船'"
               >
-                <ws-input
-                  v-model="dataList.shipNumber"
-                  placeholder="请输入航次"
-                  maxlength="20"
-                  size="small"
-                />
+                <ws-input v-if='shipInfoList.length<2' v-model="dataList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+                <el-select v-else disabled v-model="dataList.shipNumber" placeholder="请选择航次">
+                  <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipNo" :value="item.shipNo" />
+                </el-select>
               </ws-form-item>
               <!--车号  -->
               <ws-form-item
@@ -671,13 +673,14 @@ export default {
         freight:0,
         type:'',
         addressUrl:'',
+        shipInfoList:[],
         buckleWeightRatio:'',
         tidalGrainWater:'',
         solidGrainWater:'',
         pureWeight:'',
         deductionAmount:'',
         deductionWeigh:'',
-        selfLoading:"0"
+        selfLoading:'0'
       },
       historyList: [],
 
@@ -687,7 +690,7 @@ export default {
         },
       },
       accessoryTFs: false,
-        carChange1:"手动填写",
+        carChange1:'手动填写',
         carjudge:false
     }
   },
@@ -732,11 +735,18 @@ 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='识别下拉'
+        }
+      },
+      shipNamechange(e){
+        for (let i = 0; i < this.shipInfoList.length; i++) {
+          if(this.shipInfoList[i].shipName==e){
+            this.dataList.shipNumber=this.shipInfoList[i].shipNo
+          }
         }
       },
     imgBig(item){
@@ -833,6 +843,9 @@ export default {
             this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
             this.carstatus=true
           }
+          if(this.outContractNo[i].shipInfoList){
+               this.shipInfoList = this.outContractNo[i].shipInfoList
+            }
         }
       }
     },
@@ -870,7 +883,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 +1243,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 -

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff