gjy 3 anos atrás
pai
commit
82f7a2abd2
41 arquivos alterados com 21682 adições e 9806 exclusões
  1. 391 0
      public/static/inspectionnew.html
  2. 377 0
      public/static/outInspectionPrint.html
  3. 12 9
      public/static/payprint.html
  4. 49 19
      public/static/weightCheck.html
  5. 487 0
      public/static/weightChecknew.html
  6. 5 1
      src/api/V2/houseSelfCollect/index.js
  7. 19 20
      src/lang/zh.js
  8. 31 91
      src/layout/index/top/index.vue
  9. 7 1
      src/model/houseSelfCollect/index.js
  10. 2 2
      src/views/houseSelfCollect/acquisitionManagementAdd.vue
  11. 8 7
      src/views/houseSelfCollect/component/paymentPrint.vue
  12. 82 10
      src/views/houseSelfCollect/component/routers/route.js
  13. 8 5
      src/views/houseSelfCollect/component/weightCheckPrint.vue
  14. 1 2
      src/views/houseSelfCollect/inspectInfo.vue
  15. 1348 0
      src/views/houseSelfCollect/inspectInfoLook.vue
  16. 2209 0
      src/views/houseSelfCollect/inspectionManagementNew.vue
  17. 445 0
      src/views/houseSelfCollect/inspectionManagementrecord.vue
  18. 1591 0
      src/views/houseSelfCollect/newWeighingManagement.vue
  19. 33 17
      src/views/houseSelfCollect/settlement.vue
  20. 316 0
      src/views/houseSelfCollect/weightCheckRecord.vue
  21. 169 0
      src/views/outboundManagement/component/inspectInfoPrint.vue
  22. 155 0
      src/views/outboundManagement/component/outInspectPrint.vue
  23. 73 16
      src/views/outboundManagement/component/route.js
  24. 184 0
      src/views/outboundManagement/component/weightCheckPrint.vue
  25. 743 0
      src/views/outboundManagement/newQualityInspectionManagement.vue
  26. 264 0
      src/views/outboundManagement/outInspectRecord.vue
  27. 63 256
      src/views/outboundManagement/qualityInspection.vue
  28. 1433 0
      src/views/outboundManagement/weighingManagementNew.vue
  29. 434 0
      src/views/outboundManagement/weighingManagementrecord.vue
  30. 1336 1147
      src/views/platformAudit/purchaseContractAdd.vue
  31. 1291 1116
      src/views/platformAudit/purchaseContractEdit.vue
  32. 1354 1154
      src/views/platformAudit/salesContractAdd.vue
  33. 1263 1104
      src/views/platformAudit/salesContractEdit.vue
  34. 1336 1147
      src/views/platformaudit/purchaseContractAdd.vue
  35. 1291 1116
      src/views/platformaudit/purchaseContractEdit.vue
  36. 1354 1154
      src/views/platformaudit/salesContractAdd.vue
  37. 1263 1104
      src/views/platformaudit/salesContractEdit.vue
  38. 2 2
      src/views/statisticalReport/stockSaleOutReportList.vue
  39. 0 1
      src/views/warehouse/warehouseManagementPutOutLook.vue
  40. 252 305
      src/views/warehousenew/warehouseManagementRecord.vue
  41. 1 0
      vue.min.js

+ 391 - 0
public/static/inspectionnew.html

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

+ 377 - 0
public/static/outInspectionPrint.html

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

+ 12 - 9
public/static/payprint.html

@@ -281,7 +281,6 @@
                   <td class="col col-bgc">皮重</td>
                   <td class="col col-bgc">扣杂重</td>
                   <td class="col col-bgc">净重</td>
-                  <!-- <td class="col col-bgc">纯重</td> -->
                 </tr>
                 <tr class="row">
                   <td class="col">{{ printData1[index].goodsName}}</td>
@@ -305,7 +304,6 @@
                     {{printData1[index].weighingManagement?printData1[index].weighingManagement.buckleMiscellaneous:''}}
                   </td>
                   <td class="col">{{ printData1[index].netWeight}}</td>
-                  <!-- <td class="col">{{ printData1[index].pureWeight}}</td> -->
                 </tr>
                 <tr class="row">
                   <td class="col col-bgc">纯重</td>
@@ -323,7 +321,6 @@
                   <td class="col col-bgc">其他补助</td>
                   <td class="col col-bgc">称重扣款</td>
                   <td class="col col-bgc">运费扣款</td>
-                  <!-- <td class="col col-bgc">卸车扣款</td> -->
                 </tr>
                 <tr class="row">
                   <td class="col">{{ printData1[index].pureWeight}}</td>
@@ -632,7 +629,8 @@
               <td class="col col-bgc">皮重</td>
               <td class="col col-bgc">扣杂重</td>
               <td class="col col-bgc">净重</td>
-              <td class="col col-bgc">纯重</td>
+              <td class="col col-bgc">出库净重</td>
+              <!-- <td class="col col-bgc">纯重</td> -->
             </tr>
             <tr class="row">
               <td class="col">{{ printData.goodsName}}</td>
@@ -652,9 +650,11 @@
                 {{ printData.weighingManagement.buckleMiscellaneous}}
               </td>
               <td class="col">{{ printData.netWeight}}</td>
-              <td class="col">{{ printData.pureWeight}}</td>
+              <td class="col">{{printData.contractManagement ? printData.contractManagement.weight : "0"}}</td>
+              <!-- <td class="col">{{ printData.pureWeight}}</td> -->
             </tr>
             <tr class="row">
+              <td class="col col-bgc">纯重</td>
               <td class="col col-bgc" v-if="printData.type == '潮粮'">
                 净重单价
               </td>
@@ -667,9 +667,10 @@
               <td class="col col-bgc">其他补助</td>
               <td class="col col-bgc">称重扣款</td>
               <td class="col col-bgc">运费扣款</td>
-              <td class="col col-bgc">卸车扣款</td>
+              <!-- <td class="col col-bgc">1卸车扣款</td> -->
             </tr>
             <tr class="row">
+              <td class="col">{{ printData.pureWeight}}</td>
               <td class="col " v-if="printData.type == '潮粮'">
                 {{printData.tidalGrainPrice}}
               </td>
@@ -684,9 +685,10 @@
               <td class="col ">{{ printData.otherSubsidy}}</td>
               <td class="col ">{{ printData.weighingDeduction}}</td>
               <td class="col ">{{ printData.freightDeduction}}</td>
-              <td class="col ">{{ printData.unloadDeduction}}</td>
+              <!-- <td class="col ">{{ printData.unloadDeduction}}</td> -->
             </tr>
             <tr class="row">
+              <td class="col col-bgc">卸车扣款</td>
               <td class="col col-bgc">质量扣款</td>
               <td class="col col-bgc">其他扣款</td>
               <td class="col col-bgc" v-if="printData.type == '潮粮'">
@@ -695,9 +697,10 @@
               <td class="col col-bgc">合计应付</td>
               <td class="col col-bgc">购粮性质</td>
               <td class="col col-bgc">车牌号</td>
-              <td class="col col-bgc" colspan="5">记事</td>
+              <td class="col col-bgc" colspan="4">记事</td>
             </tr>
             <tr class="row">
+              <td class="col ">{{ printData.unloadDeduction}}</td>
               <td class="col ">{{ printData.qualityDeduction}}</td>
               <td class="col ">{{ printData.otherDeduction}}</td>
               <td class="col " v-if="printData.type == '潮粮'">
@@ -708,7 +711,7 @@
                 {{ printData.qualityInspectionManagement.natureOfGrainPurchase}}
               </td>
               <td class="col ">{{ printData.carNo}}</td>
-              <td class="col " colspan="5">{{ printData.remarks}}</td>
+              <td class="col " colspan="4">{{ printData.remarks}}</td>
             </tr>
             <tr class="row">
               <td class="col col-bgc">实付金额</td>

+ 49 - 19
public/static/weightCheck.html

@@ -252,10 +252,14 @@
             <div class="number">{{item.number}}</div>
             <table class="table">
               <tr class="row">
-                <td class="col col-bgc">客户姓名</td>
-                <td class="col" colspan="2">{{item.customer}}</td>
-                <td class="col col-bgc">客户电话</td>
-                <td class="col">{{item.customerPhone}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 3">客户姓名</td>
+                <td class="col" colspan="2" v-if="item.serviceManagementType == 3">{{item.customer}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 1">发货单位</td>
+                <td class="col" colspan="2" v-if="item.serviceManagementType == 1">{{item.contractManagement ? item.contractManagement.seller : ""}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 3">客户电话</td>
+                <td class="col" v-if="item.serviceManagementType == 3">{{item.customerPhone}}</td>
+                <td class="col col-bgc" v-if="item.serviceManagementType == 1">联系电话</td>
+                <td class="col" v-if="item.serviceManagementType == 1">{{item.contractManagement ? item.contractManagement.sellerPhone : ""}}</td>
                 <td class="col col-bgc">车牌号</td>
                 <td class="col" colspan="2">{{item.carNumber}}</td>
               </tr>
@@ -341,9 +345,14 @@
         </div>
       </div>
       <div v-else>
+<<<<<<< HEAD
         <div class="content" v-if="bigContent" v-for="(_item,index) in tableData">
 
           <!-- <div class="title">{{_item.compName}}</div> -->
+=======
+        <div class="content" v-if="bigContent">
+          <div class="title">{{tableData.compName}}</div>
+>>>>>>> rukuguanli
           <div class="title">入库检斤单</div>
           <div class="left">
             <img :src="_item.codeUrl" alt="">
@@ -351,10 +360,21 @@
           <div class="number">{{_item.number}}</div>
           <table class="table">
             <tr class="row">
+<<<<<<< HEAD
               <td class="col col-bgc">客户姓名</td>
               <td class="col" colspan="2">{{_item.customer}}</td>
               <td class="col col-bgc">客户电话</td>
               <td class="col">{{_item.customerPhone}}</td>
+=======
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户姓名</td>
+              <td class="col" colspan="2" v-if="tableData.serviceManagementType == 3">{{tableData.customer}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">发货单位</td>
+              <td class="col" colspan="2" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户电话</td>
+              <td class="col" v-if="tableData.serviceManagementType == 3">{{tableData.customerPhone}}</td>
+              <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">联系电话</td>
+              <td class="col" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</td>
+>>>>>>> rukuguanli
               <td class="col col-bgc">车牌号</td>
               <td class="col" colspan="2">{{_item.carNumber}}</td>
             </tr>
@@ -415,7 +435,6 @@
               <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>
@@ -450,21 +469,33 @@
         </div>
         <img :src="tableData.codeUrl" alt="" class="small-code">
         <div class="small-row">
-          <div>编号</div>
+          <div>业务编号</div>
           <div>{{tableData.number}}</div>
         </div>
-        <div class="small-row">
+        <div class="small-row" v-if="tableData.serviceManagementType == 3">
           <div>客户姓名</div>
           <div>{{tableData.customer}}</div>
         </div>
+<<<<<<< HEAD
         <div class="small-row">
           <div>客户身份证:</div>
           <div>{{tableData.customerNumberCard}}</div>
         </div>
         <div class="small-row">
+=======
+        <div class="small-row" v-if="tableData.serviceManagementType == 3">
+>>>>>>> remotes/origin/rukuguanli
           <div>客户电话</div>
           <div>{{tableData.customerPhone}}</div>
         </div>
+        <div class="small-row" v-if="tableData.serviceManagementType == 1">
+          <div>发货单位</div>
+          <div>{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</div>
+        </div>
+        <div class="small-row" v-if="tableData.serviceManagementType == 1">
+          <div>联系电话</div>
+          <div>{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</div>
+        </div>
         <div class="small-row">
           <div>车牌号</div>
           <div>{{tableData.carNumber}}</div>
@@ -493,14 +524,6 @@
           <div>类型</div>
           <div>{{tableData.type}}</div>
         </div>
-        <div class="small-row">
-          <div>皮重(公斤)</div>
-          <div>{{tableData.tare}}</div>
-        </div>
-        <div class="small-row">
-          <div>皮检时间</div>
-          <div>{{tableData.tareDate}}</div>
-        </div>
         <div class="small-row">
           <div>毛重(公斤)</div>
           <div>{{tableData.grossWeight}}</div>
@@ -509,11 +532,18 @@
           <div>毛检时间</div>
           <div>{{tableData.grossDate}}</div>
         </div>
-
-        <!-- <div class="small-row">
-          <div>扣杂(公斤)</div>
+        <div class="small-row">
+          <div>皮重(公斤)</div>
+          <div>{{tableData.tare}}</div>
+        </div>
+        <div class="small-row">
+          <div>皮检时间</div>
+          <div>{{tableData.tareDate}}</div>
+        </div>
+        <div class="small-row" v-if="tableData.qualityInspectionManagement.paramType == 2 || tableData.serviceManagementType == 1">
+          <div>扣重(公斤)</div>
           <div>{{tableData.buckleMiscellaneous}}</div>
-        </div> -->
+        </div>
         <div class="small-row">
           <div>净重(公斤)</div>
           <div>{{tableData.netWeight}}</div>

+ 487 - 0
public/static/weightChecknew.html

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

+ 5 - 1
src/api/V2/houseSelfCollect/index.js

@@ -64,6 +64,8 @@ export const API_GET_PAYMENT = '/paymentManagement/getInfo'
 export const API_POST_PAYMENT_EDIT = '/paymentManagement/api/editInfo'
 //质检客户下拉校验
 export const API_GET_INSPECT_GETAMOUNT = '/paymentManagement/cumulant'
+//质检运输方式
+export const API_GET_INSPECT_CONTRACTNO = '/inOutWarehouseTask/getContractNo'
 //识别身份证
 export const API_GET_CUSTOMER_GETIDENTITY = '/driverViewInfo/personShibie'
 //识别银行卡
@@ -103,4 +105,6 @@ 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'
+export const API_POST_IMPORT ='/qualityInspectionManagement/api/importQuality'
+// 结算单
+export const API_GET_SETTLEACCOUT = '/warehouseInOutInfo/getInfo'

+ 19 - 20
src/lang/zh.js

@@ -481,17 +481,6 @@ export default {
     protectionInventory: '劳保库存',
     // 合同管理
     contractManagement: '合同管理',
-    purchaseContract: '采购合同',
-    salesContract: '销售合同',
-    salesContractEdit: '销售合同编辑',
-    salesContractExamine: '销售合同查看',
-    purchaseContractExamine: '采购合同查看',
-    salesContractAdd: '销售合同添加',
-    purchaseContractAdd: '采购合同添加',
-    purchaseContractEdit: '采购合同编辑',
-    // 平台审核
-    platformAudit:'平台审核',
-    driveraudit:'司机审核',
     purchaseContract: '现货采购合同',
     collectionContract: '代收合同',
     purchaseContractAdd: '现货采购合同  /  添加',
@@ -548,8 +537,6 @@ export default {
     warehouseManagementPerfectput: '编辑',
     warehouseManagementPutOut: '任务',
     warehouseManagementPutOutLook: '查看',
-    // 新仓库管理
-    newwarehouseManagementList: '新仓库管理',
     transformation: '折转',
     //客户管理
     customerList: '客户管理',
@@ -1048,12 +1035,16 @@ export default {
     dynamicReportsDetail: '动态报详情',
 
     // 库内自采
-    houseSelfCollect: '收购业务管理',
+    houseSelfCollect: '入库管理',
+    deliverywarehouse:'出库管理',
     customerManagement: '客户管理',
     acquisitionManagement: '仓库设置',
     inspectionManagement: '质检管理',
+    inspectionManagementrecord:'质检管理记录',
     paymentManagement: '付款管理',
     weighingManagement: '检斤管理',
+    newWeighingManagement: '检斤管理',
+    weightCheckRecord: '检斤记录',
     houseSelfCollectPrint: '查看',
     acquisitionManagementAdd: '收购管理',
     acquisitionManagementEdit: '收购管理编辑',
@@ -1072,7 +1063,10 @@ export default {
     outboundManagement: '出库管理',
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    newQualityInspectionManagement: '质检管理',
+    outInspectRecord:"质检记录",
     qualityInspection: '质检信息',
+    weighingManagementrecord:'检斤记录',
     collectionManagement: '收款管理',
     collectionment: '查看收款管理',
     weighing: '检斤信息',
@@ -4851,15 +4845,13 @@ export default {
   },
   purchase: {
     purchaseContract: '采购合同',
-    driveraudit:'司机审核'
   },
   //仓库管理
   warehouseManagement: {
     warehouseManagementList: '仓库管理',
-    // newwarehouseManagementList: '新仓库管理',
-    warehouselocation:'成本管理  /  库点费用',
-    weightedsubsidiary:'加权明细',
-    costmanagement:'成本管理',
+    warehouselocation: '成本管理  /  库点费用',
+    weightedsubsidiary: '加权明细',
+    costmanagement: '成本管理',
     warehouseManagementAdd: '仓库管理添加',
     warehouseManagementEdit: '仓库管理编辑',
     warehouseManagementPut: '入库',
@@ -7483,9 +7475,13 @@ export default {
     acquisitionManagement: '仓库设置',
     acquisitionManagementEdit: '收购管理编辑',
     inspectionManagement: '质检管理',
+    inspectionManagementrecord:'质检管理记录',
     paymentManagement: '付款管理',
     weighingManagement: '检斤管理',
-    houseSelfCollect: '收购业务管理',
+    weighingManagement: '检斤管理',
+    newWeighingManagement: '检斤管理',
+    houseSelfCollect: '入库管理',
+    deliverywarehouse:'出库管理',
     houseSelfCollectPrint: '查看',
     customerManagementEdit: '客户管理编辑',
     customerManagementAdd: '客户管理添加',
@@ -7497,7 +7493,10 @@ export default {
   outboundManagement: {
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    newQualityInspectionManagement: '质检管理',
+    outInspectRecord:"质检记录",
     qualityInspection: '质检信息',
+    weighingManagementrecord:'检斤记录',
     collectionManagement: '收款管理',
   },
   //利润核算

+ 31 - 91
src/layout/index/top/index.vue

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

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

@@ -53,7 +53,9 @@ import {
   API_POST_WORKFLOW_TASK,
   API_POST_INSPECT_GETWEIGHTDELETE,
   API_POST_SUSPENDINSTANCE,
-  API_POST_IMPORT
+  API_POST_IMPORT,
+  API_GET_INSPECT_CONTRACTNO,
+  API_GET_SETTLEACCOUT
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -121,6 +123,8 @@ export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorH
 export const postpaymentedit = appRx.post(API_POST_PAYMENT_EDIT, errorCatcher, errorHandle, filter)
 //质检客户下拉校验
 export const getamount = appRx.get(API_GET_INSPECT_GETAMOUNT, errorCatcher, errorHandle, filter)
+//质检运输方式
+export const getinspectcontractno = appRx.get(API_GET_INSPECT_CONTRACTNO, errorCatcher, errorHandle, filter)
 //身份证识别
 export const getIdentity = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)
 //银行卡识别
@@ -161,3 +165,5 @@ export const workflowcontent = appRx.get(API_POST_WORKFLOW_TASK, errorCatcher, e
 export const suspendinstance = appRx.post(API_POST_SUSPENDINSTANCE, errorCatcher, errorHandle, filter)
 // 导入
 export const importWord = appRx.post(API_POST_IMPORT, errorCatcher, errorHandle, filter)
+// 查看结算单
+export const getsettleaccout = appRx.get(API_GET_SETTLEACCOUT, errorCatcher, errorHandle, filter)

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

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

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

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

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

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

+ 8 - 5
src/views/houseSelfCollect/component/weightCheckPrint.vue

@@ -4,10 +4,14 @@
         <div class="number">{{tableData.number}}</div>
         <table class="table">
           <tr class="row">
-            <td class="col col-bgc">客户姓名</td>
-            <td class="col" colspan="2">{{tableData.customer}}</td>
-            <td class="col col-bgc">客户电话</td>
-            <td class="col" >{{tableData.customerPhone}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户姓名</td>
+            <td class="col" colspan="2" v-if="tableData.serviceManagementType == 3">{{tableData.customer}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">发货单位</td>
+            <td class="col" colspan="2" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.seller : ""}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 3">客户电话</td>
+            <td class="col" v-if="tableData.serviceManagementType == 3">{{tableData.customerPhone}}</td>
+            <td class="col col-bgc" v-if="tableData.serviceManagementType == 1">联系电话</td>
+            <td class="col" v-if="tableData.serviceManagementType == 1">{{tableData.contractManagement ? tableData.contractManagement.sellerPhone : ""}}</td>
             <td class="col col-bgc">车牌号</td>
             <td class="col" colspan="2">{{tableData.carNumber}}</td>
           </tr>
@@ -121,7 +125,6 @@ export default{
     text-align: right;
     margin: 0 0 10px 0;
   }
-
   table,
   table tr th,
   table tr td {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -5,9 +5,19 @@
         <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">
@@ -19,79 +29,165 @@
       </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>
@@ -101,58 +197,143 @@
         </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>
@@ -164,55 +345,95 @@
       <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>
 
@@ -224,39 +445,67 @@
       <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-input
+            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-input
+            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-input
+            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-input
+            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>
 
@@ -264,1165 +513,1105 @@
         <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,
+//  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()
     },
-    watch: {
-      vesselId(val) {
-        this.getVesselData()
-      },
-      isShow(val) {
-        this.showType = val
-      },
+    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' },
-          // ],
+  },
+  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: '',
         },
-        options: [],
-        staffList: [],
-        appendixIdsAdd: '',
-        size: 10,
-        // uploadSuccess: {},
-        // onChange:{},
-        unitList: [],
-        goodnameList: [],
-        value1: '袋装',
-        value2: '未回收',
-        gradeList: [],
-        ChapterTwoList: [],
-
-        deptBudgetList: {
-          deliverType: '1',
-          finalTradingVolume: 0,
-          contractGoodsInfo: {
-            goodsName: '',
-          },
-          contractProcessInfo: {},
+        contractProcessInfo: {},
+      },
+      acceptanceCheck: {},
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
         },
-        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',
           },
-        },
-        // 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: {},
+        ],
+      },
+      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
       }
     },
-    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')
+    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.options = response
-          this.staffList = response
+          this.gradeList = response
         })
-      this.loaddata()
-      this.showType = this.isShow
+      // 双章
+      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)
+      })
     },
-    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
+    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
             }
           })
-        } 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
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
           }
-        }
-      },
-      // 关闭 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)
+    submit() {
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '请输入合同编号',
+          type: 'warning',
         })
-      },
-      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
-        }
+        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 -
+      ) {
+        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 -
+      ) {
+        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 -
+      ) {
+        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 -
+      ) {
+        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
-        }
-
-        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]]
-            }
+      ) {
+        this.$message({
+          message: '已完成发运量输入错误',
+          type: 'warning',
+        })
+        return
+      }
 
-            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
+      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]]
           }
-        })
-      },
-      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)
+          addList(this.deptBudgetList)
             .toPromise()
             .then((response) => {
-              this.getUnitList()
+              this.$message.success('添加成功')
+              this.deptBudgetList = {
+                deliverType: '1',
+                finalTradingVolume: 0,
+                contractGoodsInfo: {
+                  goodsName: '',
+                },
+                contractProcessInfo: {},
+              }
+              this.$router.push({ path: 'buyContract' })
             })
-        } 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()
+            .catch((req) => {
+              EventBus.$emit('error', req.message)
             })
-        }
-      },
-      // 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
+          // for (let key in that.rules) {
+          //   EventBus.$emit('error', that.rules[key][0].message)
+          //   return false
+          // }
+          return false
         }
-        delxiala({
-            id: this.unitList[index].id
+      })
+    },
+    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()
-            this.pleaseChoose = ''
           })
-      },
+      }
     },
-  }
+    // 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 {
+.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;
-    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;
-      }
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
     }
   }
 
-  .box-app {
-    display: inline-block;
-    float: left;
-    margin-left: 30px;
-    line-height: 50px;
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
   }
-
-  /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;
+}
+.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-form-item {
-    width: 50%;
+  .el-icon-arrow-up {
+    display: none;
   }
-
-  .el-form-item__label {
-    text-align: center;
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
   }
-
-  .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 {
+  .el-date-editor {
+    i {
       display: none;
     }
-
-    .el-textarea__inner {
+  }
+  .is-disabled {
+    .el-input__inner:hover {
       background-color: #fff !important;
       border: 0;
     }
-
-    .el-date-editor {
-      i {
-        display: none;
-      }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
     }
-
-    .is-disabled {
-      .el-input__inner:hover {
-        background-color: #fff !important;
-        border: 0;
-      }
-
+    .el-textarea__inner {
+      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;
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
     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;
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
   }
-
-  .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%;
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
   }
-</style>
+}
+.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>

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

@@ -7,12 +7,27 @@
         <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">
@@ -22,13 +37,23 @@
       </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>
 
         <!-- 买方 -->
@@ -37,62 +62,118 @@
         </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>
@@ -102,67 +183,147 @@
         </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>
@@ -172,39 +333,86 @@
           <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">
@@ -212,1174 +420,1141 @@
         </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-input
+              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-input
+              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-input
+              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 label="未开发票(元)" span="1" prop="impurity"
+            ><ws-input
+              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
-      },
+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()
     },
-    components: {
-      WsUpload,
+    isShow(val) {
+      this.showType = val
     },
-    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()
-          },
+  },
+  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'),
+      },
+      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
 
-    activated() {
-      getstaff({
-          compId: sessionStorage.getItem('ws-pf_compId')
+          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.options = response
-          this.staffList = response
+          this.ChapterTwoList = 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
+    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
             }
           })
-        } 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
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
           }
-        }
-      },
-      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
-          }
+    },
+    // 关闭 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()
-            })
-        } 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
-          })
+      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()
-            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',
+      } 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()
           })
-          return
-        }
+      }
+    },
+    // 编辑
+    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 (!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 -
+      ) {
+        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 -
+      ) {
+        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(
+          '.'
+        ) != -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(
+          '.'
+        ) != -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 {
+.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;
-    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;
-      }
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
     }
   }
 
-  .box-app {
-    display: inline-block;
-    float: left;
-    margin-left: 30px;
-    line-height: 50px;
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
   }
-
-  /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;
+}
+.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;
   }
-
-  .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;
+  .el-icon-arrow-up {
+    display: none;
   }
-
-  .ce {
-    width: 900px;
-    margin: 0 auto;
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
   }
-
-  /*.crt-main .textarea /deep/ .el-form-item__label {*/
-  /*  height: 82px;*/
-  /*}*/
-  // 控制select为只读的时候显示样式
-
-  .hide-sel {
-    .el-input__inner {
-      border: 0px;
-    }
-
-    .el-icon-arrow-up {
+  .el-date-editor {
+    i {
       display: none;
     }
-
-    .el-textarea__inner {
+  }
+  .is-disabled {
+    .el-input__inner:hover {
       background-color: #fff !important;
       border: 0;
     }
-
-    .el-date-editor {
-      i {
-        display: none;
-      }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
     }
-
-    .is-disabled {
-      .el-input__inner:hover {
-        background-color: #fff !important;
-        border: 0;
-      }
-
+    .el-textarea__inner {
+      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;
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
     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;
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
   }
-
-  .el-textarea {
-    width: 101%;
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
   }
-
-  /deep/.iconclose:before {
+}
+.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 {
+}
+/deep/.winsea-card .card__header {
     font-size: 14px;
     color: #409eff;
     padding: 0 0 20px 10px;
     position: relative;
     display: none;
-  }
+}
 </style>

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

@@ -5,9 +5,19 @@
         <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>
 
@@ -24,82 +34,172 @@
 
         <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>
@@ -110,54 +210,127 @@
 
           <!--重量(吨)-->
           <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>
@@ -166,61 +339,105 @@
       <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>
@@ -230,51 +447,91 @@
       <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 type='number' v-model="deptBudgetList.contractProcessInfo.goodsNameKey" placeholder="请输入合同收入(元)" maxlength="100"
-              size="small" />
+            <ws-input
+              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-input
+              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-input
+              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-input
+              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-input
+              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>
@@ -285,1169 +542,1112 @@
       <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,
+//  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()
     },
-    watch: {
-      vesselId(val) {
-        this.getVesselData()
-      },
-      isShow(val) {
-        this.showType = val
-      },
+    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()
-          },
+  },
+  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: '',
         },
-        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
+        contractProcessInfo: {},
       },
-      handleChange(value) {
-        this.selectedOptions = value
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
       },
-      handleChange1(value) {
-        this.selectedOptions1 = value
+      ruleDeptBudget: {
+        contractNo: [
+          { required: true, message: '请输入活动名称', trigger: 'blur' },
+          {
+            min: 6,
+            max: 20,
+            message: '长度在 6 到 20 个字符',
+            trigger: 'blur',
+          },
+        ],
       },
-      returnsales() {
-        this.$router.push({
-          path: 'salesContract'
+      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
         })
-      },
-      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)
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = 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)
+      // 品级
+      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
-        }
+    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 -
+      ) {
+        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 -
+      ) {
+        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(
+          '.'
+        ) != -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(
+          '.'
+        ) != -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)
 
-        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)
+          addList(this.deptBudgetList)
             .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
-      // },
+              this.$message.success('添加成功')
+              this.deptBudgetList = {
+                deliverType: '1',
+                finalTradingVolume: 0,
+                contractGoodsInfo: {
+                  goodsName: '',
+                },
+                contractProcessInfo: {},
+              }
 
-      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)
+              this.$router.push({ path: 'salesContract' })
+            })
         } else {
-          map.flag = 'delete'
-          this.$set(this.unitList, index, map)
-        }
-      },
-      // 删除
-      deleteClick(item, index) {
-        if (Object.is(item.constKey, 1)) {
-          return
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
         }
-        if (!item.constValue) {
-          this.unitList.splice(index, 1)
-          return
-        }
-        delxiala({
-            id: this.unitList[index].id
+      })
+    },
+    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()
-            this.pleaseChoose = ''
           })
-      },
+      }
     },
-  }
+    // 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 {
+/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;
-    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;
-      }
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
     }
   }
 
-  .box-app {
-    display: inline-block;
-    float: left;
-    margin-left: 30px;
-    line-height: 50px;
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
   }
-
-  /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;
+}
+.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;
   }
-
-  .bg-right {
-    padding-right: 10px;
-    text-align: right;
+  .el-icon-arrow-up {
+    display: none;
   }
-
-  .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;
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
   }
-
-  /*.crt-main .textarea /deep/ .el-form-item__label {*/
-  /*  height: 82px;*/
-  /*}*/
-  // 控制select为只读的时候显示样式
-
-  .hide-sel {
-    .el-input__inner {
-      border: 0px;
-    }
-
-    .el-icon-arrow-up {
+  .el-date-editor {
+    i {
       display: none;
     }
-
-    .el-textarea__inner {
+  }
+  .is-disabled {
+    .el-input__inner:hover {
       background-color: #fff !important;
       border: 0;
     }
-
-    .el-date-editor {
-      i {
-        display: none;
-      }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
     }
-
-    .is-disabled {
-      .el-input__inner:hover {
-        background-color: #fff !important;
-        border: 0;
-      }
-
+    .el-textarea__inner {
+      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;
+}
+/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/.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;
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
   }
-
-  .container {
-    overflow: scroll;
-    height: 93vh;
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
   }
-</style>
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+</style>

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

@@ -5,9 +5,19 @@
         <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>
 
@@ -19,7 +29,11 @@
       </p>
     </div>
     <div class="center">
-      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
         <!--基本信息-->
         <ws-info-table>
           <!--合同编号-->
@@ -32,7 +46,12 @@
 
           <!--运输方式-->
           <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>
 
           <!--买方-->
@@ -45,7 +64,12 @@
 
           <!--结算方式-->
           <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>
 
           <!--卖方-->
@@ -66,52 +90,103 @@
 
           <!--买方电话-->
           <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>
@@ -121,21 +196,43 @@
           </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>
 
           <!--合同单价(元/吨)-->
@@ -148,37 +245,80 @@
 
           <!--合同总价-->
           <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>
@@ -188,7 +328,11 @@
       <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>
           <!--货名-->
@@ -214,46 +358,78 @@
 
           <!--水分(%)<=-->
           <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>
@@ -262,50 +438,86 @@
       <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 type='number' v-model="deptBudgetList.contractProcessInfo.goodsNameKey" placeholder="请输入合同收入(元)" maxlength="100"
-              size="small" />
+            <ws-input
+              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-input
+              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-input
+              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-input
+              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-input
+              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>
@@ -316,1128 +528,1075 @@
       <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,
+// 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()
     },
-    watch: {
-      vesselId(val) {
-        this.loaddata()
-      },
-      isShow(val) {
-        this.showType = val
-      },
+    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()
-          },
+  },
+  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:{},
+      selectunitList: {},
+      //change:{},
+      onChange: {},
+      uploadSuccess: {},
+      selectgrade: {},
+      goodnameList: {},
+      selectpackingMethod: {},
+      unitList: {},
+      packtypeList: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      appendixIdsAdd: '',
+      size: 10,
+      deptBudgetList: {
+        contractGoodsInfo: {
+          goodsName: '',
         },
-        // selectpackingMethod:{},
-        //  change:{},
-        ruleDeptBudget: {},
-        trainingMethods: {},
-        isEdited: false,
-        registered: {},
-        selectCrtDuty: {},
-        dutyList: {},
-        sexList: {},
-        selectDuty: {},
-        gradeList: {},
-        ChapterTwoList: {},
-        selectIntendedShip: {},
-        interviewTypeList: {},
-      }
+        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
     },
-    activated() {
-      //cg.viewBudget
-      //cg.viewSpareMoney
-      // this.getVesselData();
-      this.loaddata()
-      this.editInfo()
-      this.showType = this.isShow
-      // console.log(this.$route.params)
-      this.showType = this.isShow
+    returnsales() {
+      this.deptBudgetList = {}
+      this.$router.push({ path: 'salesContract' })
     },
-    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
         })
-      },
-      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
-            }
+      // 包装方式
+      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
+        })
+    },
 
-            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)
 
-      getUnitList() {
-        xiala({
-            compId: sessionStorage.getItem('ws-pf_compId'),
-            constCode: 'TYPEYAN',
-          })
+      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) => {
-            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
+            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()
-            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: '',
+      }
+    },
+    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',
         })
-      },
-      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
-        }
+        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 -
+      ) {
+        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 -
+      ) {
+        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(
+          '.'
+        ) != -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(
+          '.'
+        ) != -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.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
-            }
-            editInfo(this.deptBudgetList)
-              .toPromise()
-              .then((response) => {
-                this.$message.success('编辑成功')
-                this.deptBudgetList = {}
-                this.$router.push({
-                  path: 'salesContract'
-                })
-              })
+      ) {
+        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 {
-            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-            return false
+            this.deptBudgetList.deliveryArea =
+              CodeToText[this.selectedOptions1[2]]
           }
-        })
-      },
-      editInfo() {
-        editInfo({})
-      },
-      // getList(){}
+          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 {
+/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;
-    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;
-      }
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
     }
   }
 
-  .box-app {
-    display: inline-block;
-
-    margin-left: 30px;
-    line-height: 50px;
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
   }
-
-  /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;
+}
+.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;
   }
-
-  .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-icon-arrow-up {
+    display: none;
   }
-
-  .el-form-item__label {
-    text-align: center;
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
   }
-
-  /*.crt-main .textarea /deep/ .el-form-item__label {*/
-  /*  height: 82px;*/
-  /*}*/
-  // 控制select为只读的时候显示样式
-
-  .hide-sel {
-    .el-input__inner {
-      border: 0px;
-    }
-
-    .el-icon-arrow-up {
+  .el-date-editor {
+    i {
       display: none;
     }
-
-    .el-textarea__inner {
+  }
+  .is-disabled {
+    .el-input__inner:hover {
       background-color: #fff !important;
       border: 0;
     }
-
-    .el-date-editor {
-      i {
-        display: none;
-      }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
     }
-
-    .is-disabled {
-      .el-input__inner:hover {
-        background-color: #fff !important;
-        border: 0;
-      }
-
+    .el-textarea__inner {
+      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;
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
     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/.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;
-  }
-
-  /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;
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
     font-size: 14px;
-    font-weight: 400;
-    color: #afb5cb;
-    line-height: 14px;
-  }
-
-  /deep/.el-input--small .el-input__inner {
-    height: 32px;
-    line-height: 32px;
+    cursor: text;
+    padding: 0 !important;
   }
-</style>
+}
+.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>

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

@@ -5,9 +5,19 @@
         <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">
@@ -19,79 +29,165 @@
       </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>
@@ -101,58 +197,143 @@
         </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>
@@ -164,55 +345,95 @@
       <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>
 
@@ -224,39 +445,67 @@
       <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-input
+            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-input
+            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-input
+            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-input
+            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>
 
@@ -264,1165 +513,1105 @@
         <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,
+//  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()
     },
-    watch: {
-      vesselId(val) {
-        this.getVesselData()
-      },
-      isShow(val) {
-        this.showType = val
-      },
+    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' },
-          // ],
+  },
+  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: '',
         },
-        options: [],
-        staffList: [],
-        appendixIdsAdd: '',
-        size: 10,
-        // uploadSuccess: {},
-        // onChange:{},
-        unitList: [],
-        goodnameList: [],
-        value1: '袋装',
-        value2: '未回收',
-        gradeList: [],
-        ChapterTwoList: [],
-
-        deptBudgetList: {
-          deliverType: '1',
-          finalTradingVolume: 0,
-          contractGoodsInfo: {
-            goodsName: '',
-          },
-          contractProcessInfo: {},
+        contractProcessInfo: {},
+      },
+      acceptanceCheck: {},
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
         },
-        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',
           },
-        },
-        // 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: {},
+        ],
+      },
+      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
       }
     },
-    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')
+    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.options = response
-          this.staffList = response
+          this.gradeList = response
         })
-      this.loaddata()
-      this.showType = this.isShow
+      // 双章
+      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)
+      })
     },
-    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
+    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
             }
           })
-        } 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
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
           }
-        }
-      },
-      // 关闭 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)
+    submit() {
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '请输入合同编号',
+          type: 'warning',
         })
-      },
-      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
-        }
+        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 -
+      ) {
+        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 -
+      ) {
+        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 -
+      ) {
+        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 -
+      ) {
+        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
-        }
-
-        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]]
-            }
+      ) {
+        this.$message({
+          message: '已完成发运量输入错误',
+          type: 'warning',
+        })
+        return
+      }
 
-            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
+      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]]
           }
-        })
-      },
-      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)
+          addList(this.deptBudgetList)
             .toPromise()
             .then((response) => {
-              this.getUnitList()
+              this.$message.success('添加成功')
+              this.deptBudgetList = {
+                deliverType: '1',
+                finalTradingVolume: 0,
+                contractGoodsInfo: {
+                  goodsName: '',
+                },
+                contractProcessInfo: {},
+              }
+              this.$router.push({ path: 'buyContract' })
             })
-        } 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()
+            .catch((req) => {
+              EventBus.$emit('error', req.message)
             })
-        }
-      },
-      // 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
+          // for (let key in that.rules) {
+          //   EventBus.$emit('error', that.rules[key][0].message)
+          //   return false
+          // }
+          return false
         }
-        delxiala({
-            id: this.unitList[index].id
+      })
+    },
+    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()
-            this.pleaseChoose = ''
           })
-      },
+      }
     },
-  }
+    // 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 {
+.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;
-    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;
-      }
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
     }
   }
 
-  .box-app {
-    display: inline-block;
-    float: left;
-    margin-left: 30px;
-    line-height: 50px;
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
   }
-
-  /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;
+}
+.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-form-item {
-    width: 50%;
+  .el-icon-arrow-up {
+    display: none;
   }
-
-  .el-form-item__label {
-    text-align: center;
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
   }
-
-  .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 {
+  .el-date-editor {
+    i {
       display: none;
     }
-
-    .el-textarea__inner {
+  }
+  .is-disabled {
+    .el-input__inner:hover {
       background-color: #fff !important;
       border: 0;
     }
-
-    .el-date-editor {
-      i {
-        display: none;
-      }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
     }
-
-    .is-disabled {
-      .el-input__inner:hover {
-        background-color: #fff !important;
-        border: 0;
-      }
-
+    .el-textarea__inner {
+      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;
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
     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;
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
   }
-
-  .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%;
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
   }
-</style>
+}
+.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>

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

@@ -7,12 +7,27 @@
         <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">
@@ -22,13 +37,23 @@
       </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>
 
         <!-- 买方 -->
@@ -37,62 +62,118 @@
         </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>
@@ -102,67 +183,147 @@
         </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>
@@ -172,39 +333,86 @@
           <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">
@@ -212,1174 +420,1141 @@
         </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-input
+              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-input
+              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-input
+              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 label="未开发票(元)" span="1" prop="impurity"
+            ><ws-input
+              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
-      },
+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()
     },
-    components: {
-      WsUpload,
+    isShow(val) {
+      this.showType = val
     },
-    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()
-          },
+  },
+  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'),
+      },
+      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
 
-    activated() {
-      getstaff({
-          compId: sessionStorage.getItem('ws-pf_compId')
+          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.options = response
-          this.staffList = response
+          this.ChapterTwoList = 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
+    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
             }
           })
-        } 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
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
           }
-        }
-      },
-      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
-          }
+    },
+    // 关闭 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()
-            })
-        } 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
-          })
+      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()
-            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',
+      } 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()
           })
-          return
-        }
+      }
+    },
+    // 编辑
+    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 (!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 -
+      ) {
+        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 -
+      ) {
+        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(
+          '.'
+        ) != -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(
+          '.'
+        ) != -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 {
+.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;
-    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;
-      }
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
     }
   }
 
-  .box-app {
-    display: inline-block;
-    float: left;
-    margin-left: 30px;
-    line-height: 50px;
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
   }
-
-  /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;
+}
+.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;
   }
-
-  .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;
+  .el-icon-arrow-up {
+    display: none;
   }
-
-  .ce {
-    width: 900px;
-    margin: 0 auto;
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
   }
-
-  /*.crt-main .textarea /deep/ .el-form-item__label {*/
-  /*  height: 82px;*/
-  /*}*/
-  // 控制select为只读的时候显示样式
-
-  .hide-sel {
-    .el-input__inner {
-      border: 0px;
-    }
-
-    .el-icon-arrow-up {
+  .el-date-editor {
+    i {
       display: none;
     }
-
-    .el-textarea__inner {
+  }
+  .is-disabled {
+    .el-input__inner:hover {
       background-color: #fff !important;
       border: 0;
     }
-
-    .el-date-editor {
-      i {
-        display: none;
-      }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
     }
-
-    .is-disabled {
-      .el-input__inner:hover {
-        background-color: #fff !important;
-        border: 0;
-      }
-
+    .el-textarea__inner {
+      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;
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
     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;
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
   }
-
-  .el-textarea {
-    width: 101%;
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
   }
-
-  /deep/.iconclose:before {
+}
+.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 {
+}
+/deep/.winsea-card .card__header {
     font-size: 14px;
     color: #409eff;
     padding: 0 0 20px 10px;
     position: relative;
     display: none;
-  }
+}
 </style>

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

@@ -5,9 +5,19 @@
         <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>
 
@@ -24,82 +34,172 @@
 
         <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>
@@ -110,54 +210,127 @@
 
           <!--重量(吨)-->
           <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>
@@ -166,61 +339,105 @@
       <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>
@@ -230,51 +447,91 @@
       <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 type='number' v-model="deptBudgetList.contractProcessInfo.goodsNameKey" placeholder="请输入合同收入(元)" maxlength="100"
-              size="small" />
+            <ws-input
+              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-input
+              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-input
+              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-input
+              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-input
+              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>
@@ -285,1169 +542,1112 @@
       <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,
+//  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()
     },
-    watch: {
-      vesselId(val) {
-        this.getVesselData()
-      },
-      isShow(val) {
-        this.showType = val
-      },
+    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()
-          },
+  },
+  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: '',
         },
-        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
+        contractProcessInfo: {},
       },
-      handleChange(value) {
-        this.selectedOptions = value
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
       },
-      handleChange1(value) {
-        this.selectedOptions1 = value
+      ruleDeptBudget: {
+        contractNo: [
+          { required: true, message: '请输入活动名称', trigger: 'blur' },
+          {
+            min: 6,
+            max: 20,
+            message: '长度在 6 到 20 个字符',
+            trigger: 'blur',
+          },
+        ],
       },
-      returnsales() {
-        this.$router.push({
-          path: 'salesContract'
+      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
         })
-      },
-      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)
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = 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)
+      // 品级
+      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
-        }
+    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 -
+      ) {
+        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 -
+      ) {
+        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(
+          '.'
+        ) != -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(
+          '.'
+        ) != -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)
 
-        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)
+          addList(this.deptBudgetList)
             .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
-      // },
+              this.$message.success('添加成功')
+              this.deptBudgetList = {
+                deliverType: '1',
+                finalTradingVolume: 0,
+                contractGoodsInfo: {
+                  goodsName: '',
+                },
+                contractProcessInfo: {},
+              }
 
-      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)
+              this.$router.push({ path: 'salesContract' })
+            })
         } else {
-          map.flag = 'delete'
-          this.$set(this.unitList, index, map)
-        }
-      },
-      // 删除
-      deleteClick(item, index) {
-        if (Object.is(item.constKey, 1)) {
-          return
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
         }
-        if (!item.constValue) {
-          this.unitList.splice(index, 1)
-          return
-        }
-        delxiala({
-            id: this.unitList[index].id
+      })
+    },
+    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()
-            this.pleaseChoose = ''
           })
-      },
+      }
     },
-  }
+    // 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 {
+/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;
-    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;
-      }
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
     }
   }
 
-  .box-app {
-    display: inline-block;
-    float: left;
-    margin-left: 30px;
-    line-height: 50px;
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
   }
-
-  /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;
+}
+.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;
   }
-
-  .bg-right {
-    padding-right: 10px;
-    text-align: right;
+  .el-icon-arrow-up {
+    display: none;
   }
-
-  .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;
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
   }
-
-  /*.crt-main .textarea /deep/ .el-form-item__label {*/
-  /*  height: 82px;*/
-  /*}*/
-  // 控制select为只读的时候显示样式
-
-  .hide-sel {
-    .el-input__inner {
-      border: 0px;
-    }
-
-    .el-icon-arrow-up {
+  .el-date-editor {
+    i {
       display: none;
     }
-
-    .el-textarea__inner {
+  }
+  .is-disabled {
+    .el-input__inner:hover {
       background-color: #fff !important;
       border: 0;
     }
-
-    .el-date-editor {
-      i {
-        display: none;
-      }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
     }
-
-    .is-disabled {
-      .el-input__inner:hover {
-        background-color: #fff !important;
-        border: 0;
-      }
-
+    .el-textarea__inner {
+      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;
+}
+/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/.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;
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
   }
-
-  .container {
-    overflow: scroll;
-    height: 93vh;
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
   }
-</style>
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+</style>

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

@@ -5,9 +5,19 @@
         <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>
 
@@ -19,7 +29,11 @@
       </p>
     </div>
     <div class="center">
-      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
         <!--基本信息-->
         <ws-info-table>
           <!--合同编号-->
@@ -32,7 +46,12 @@
 
           <!--运输方式-->
           <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>
 
           <!--买方-->
@@ -45,7 +64,12 @@
 
           <!--结算方式-->
           <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>
 
           <!--卖方-->
@@ -66,52 +90,103 @@
 
           <!--买方电话-->
           <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>
@@ -121,21 +196,43 @@
           </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>
 
           <!--合同单价(元/吨)-->
@@ -148,37 +245,80 @@
 
           <!--合同总价-->
           <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>
@@ -188,7 +328,11 @@
       <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>
           <!--货名-->
@@ -214,46 +358,78 @@
 
           <!--水分(%)<=-->
           <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>
@@ -262,50 +438,86 @@
       <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 type='number' v-model="deptBudgetList.contractProcessInfo.goodsNameKey" placeholder="请输入合同收入(元)" maxlength="100"
-              size="small" />
+            <ws-input
+              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-input
+              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-input
+              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-input
+              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-input
+              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>
@@ -316,1128 +528,1075 @@
       <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,
+// 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()
     },
-    watch: {
-      vesselId(val) {
-        this.loaddata()
-      },
-      isShow(val) {
-        this.showType = val
-      },
+    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()
-          },
+  },
+  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:{},
+      selectunitList: {},
+      //change:{},
+      onChange: {},
+      uploadSuccess: {},
+      selectgrade: {},
+      goodnameList: {},
+      selectpackingMethod: {},
+      unitList: {},
+      packtypeList: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      appendixIdsAdd: '',
+      size: 10,
+      deptBudgetList: {
+        contractGoodsInfo: {
+          goodsName: '',
         },
-        // selectpackingMethod:{},
-        //  change:{},
-        ruleDeptBudget: {},
-        trainingMethods: {},
-        isEdited: false,
-        registered: {},
-        selectCrtDuty: {},
-        dutyList: {},
-        sexList: {},
-        selectDuty: {},
-        gradeList: {},
-        ChapterTwoList: {},
-        selectIntendedShip: {},
-        interviewTypeList: {},
-      }
+        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
     },
-    activated() {
-      //cg.viewBudget
-      //cg.viewSpareMoney
-      // this.getVesselData();
-      this.loaddata()
-      this.editInfo()
-      this.showType = this.isShow
-      // console.log(this.$route.params)
-      this.showType = this.isShow
+    returnsales() {
+      this.deptBudgetList = {}
+      this.$router.push({ path: 'salesContract' })
     },
-    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
         })
-      },
-      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
-            }
+      // 包装方式
+      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
+        })
+    },
 
-            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)
 
-      getUnitList() {
-        xiala({
-            compId: sessionStorage.getItem('ws-pf_compId'),
-            constCode: 'TYPEYAN',
-          })
+      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) => {
-            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
+            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()
-            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: '',
+      }
+    },
+    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',
         })
-      },
-      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
-        }
+        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 -
+      ) {
+        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 -
+      ) {
+        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(
+          '.'
+        ) != -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(
+          '.'
+        ) != -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.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
-            }
-            editInfo(this.deptBudgetList)
-              .toPromise()
-              .then((response) => {
-                this.$message.success('编辑成功')
-                this.deptBudgetList = {}
-                this.$router.push({
-                  path: 'salesContract'
-                })
-              })
+      ) {
+        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 {
-            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-            return false
+            this.deptBudgetList.deliveryArea =
+              CodeToText[this.selectedOptions1[2]]
           }
-        })
-      },
-      editInfo() {
-        editInfo({})
-      },
-      // getList(){}
+          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 {
+/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;
-    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;
-      }
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
     }
   }
 
-  .box-app {
-    display: inline-block;
-
-    margin-left: 30px;
-    line-height: 50px;
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
   }
-
-  /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;
+}
+.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;
   }
-
-  .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-icon-arrow-up {
+    display: none;
   }
-
-  .el-form-item__label {
-    text-align: center;
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
   }
-
-  /*.crt-main .textarea /deep/ .el-form-item__label {*/
-  /*  height: 82px;*/
-  /*}*/
-  // 控制select为只读的时候显示样式
-
-  .hide-sel {
-    .el-input__inner {
-      border: 0px;
-    }
-
-    .el-icon-arrow-up {
+  .el-date-editor {
+    i {
       display: none;
     }
-
-    .el-textarea__inner {
+  }
+  .is-disabled {
+    .el-input__inner:hover {
       background-color: #fff !important;
       border: 0;
     }
-
-    .el-date-editor {
-      i {
-        display: none;
-      }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
     }
-
-    .is-disabled {
-      .el-input__inner:hover {
-        background-color: #fff !important;
-        border: 0;
-      }
-
+    .el-textarea__inner {
+      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;
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
     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/.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;
-  }
-
-  /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;
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
     font-size: 14px;
-    font-weight: 400;
-    color: #afb5cb;
-    line-height: 14px;
-  }
-
-  /deep/.el-input--small .el-input__inner {
-    height: 32px;
-    line-height: 32px;
+    cursor: text;
+    padding: 0 !important;
   }
-</style>
+}
+.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>

+ 2 - 2
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -893,10 +893,10 @@
               index === 7 ||
               index === 8 ||
               index === 9 ||
-              index === 10 ||
+              // index === 10 ||
+              index === 8 ||
               index === 11 ||
               index === 13 ||
-              index === 14 ||
               index === 12
             ) {
               const values = data.map((item) => Number(item[column.property]))

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

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

+ 252 - 305
src/views/warehousenew/warehouseManagementRecord.vue

@@ -441,313 +441,260 @@
               this.deptBudgetList.positionId = this.binnumberList[i].id
             }
           }
+      
+          var formatDate = year + seperator1 + month + seperator1 + strDate
+          this.getNowFormatDate(formatDate)
         }
-
-        this.getList()
-      },
-      //合计
-      getSummaries(param) {
-        const {
-          columns,
-          data
-        } = param
-        const sums = []
-        columns.forEach((column, index) => {
-          if (index === 0) {
-            sums[index] = '合计'
-          } else if (
-            index === 4 ||
-            index === 5 ||
-            index === 6 ||
-            index === 7 ||
-            index === 8 ||
-            index === 9
-          ) {
-            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)
-              sums[index] = sums[index].toFixed(3)
-            }
-          } else {
-            sums[index] = '--'
-          }
-        })
-        return sums
-      },
-      getPassYearFormatDate() {
-        var nowDate = new Date()
-        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
-        var seperator1 = '-'
-        var year = nowDate.getFullYear()
-        var month = nowDate.getMonth() + 1
-        var strDate = nowDate.getDate()
-        if (month >= 1 && month <= 9) {
-          month = '0' + month
-        }
-        if (strDate >= 0 && strDate <= 9) {
-          strDate = '0' + strDate
-        }
-        var formatDate = year + seperator1 + month + seperator1 + strDate
-        this.getNowFormatDate(formatDate)
-      },
-      /* 获取现在时间,并接受过去时间的值 */
-      getNowFormatDate(formatDate) {
-        var date = new Date()
-        date.setTime(date.getTime() + 24 * 60 * 60 * 1000)
-        var seperator1 = '-'
-        var year = date.getFullYear()
-        var month = date.getMonth() + 1
-        var strDate = date.getDate()
-        if (month >= 1 && month <= 9) {
-          month = '0' + month
-        }
-        if (strDate >= 0 && strDate <= 9) {
-          strDate = '0' + strDate
-        }
-        var nowData = year + seperator1 + month + seperator1 + strDate
-        this.value2 = [formatDate, nowData] // 默认赋值一年时间
-      },
-      print(row) {
-        sessionStorage.removeItem('record_print')
-        getPrintInfo({
-            id: row.id
-          })
-          .toPromise()
-          .then((response) => {
-            localStorage.setItem('ck_bd_printData', JSON.stringify(response))
-            window.open('../../../../static/weightCheckInOut.html?type=2')
-
-          })
-      },
-      //返回按钮
-      returnWarehouse() {
-        this.$router.push({
-          path: 'warehouseManagementList'
-        })
-        this.searchKeyWord = ''
-      },
-      //
-      iossrecord() {
-        this.$router.push({
-          path: 'warehouseManagementIossRecord',
-          query: {
-            baseId: this.deptBudgetList.baseId,
-            positionId: this.deptBudgetList.positionId,
-            warehouseName: this.deptBudgetList.warehouseName,
-            binNumber: this.binNumber,
-          },
-        })
-      },
-      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
-      },
-      datechange() {
-        this.getList()
-      },
-      find() {
-        this.getList()
       },
-      handleClose() {
-        this.accessoryTFs = false
-      },
-      handleSizeChange(val) {
-        console.log(`每页 ${val} 条`)
-        this.pageSize = val
-        this.getList()
-      },
-      handleCurrentChange(val) {
-        this.currentPage = val
-        console.log(`当前页: ${val}`)
-        this.getList()
-      },
-      record(status, status1) {
-        this.status = status1
-        this.searchType = status
-        this.currentPage = '1'
-        this.getList()
-      },
-      // 上传附件
-      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
-      },
-      getList() {
-        var startDate = ''
-        var endDate = ''
-        if (this.value2) {
-          startDate = this.value2[0] ? this.value2[0] : ''
-          endDate = this.value2[1] ? this.value2[1] : ''
-        }
-        if (this.warehouseType == 1) {
-          getbinnumber({
-              id: this.deptBudgetList.baseId
-            }).toPromise()
-            .then((response) => {
-
-              this.binnumberList = response.warehousePositionInfoList
-            })
-          addselectinfoList({
-              compId: localStorage.getItem('ws-pf_compId'),
-              baseId: this.deptBudgetList.baseId,
-              positionId: this.deptBudgetList.positionId,
-              warehouseName: this.deptBudgetList.warehouseName,
-              startDate: startDate,
-              endDate: endDate,
-              searchType: this.searchType,
-              searchKeyWord: this.searchKeyWord,
-              currentPage: this.currentPage,
-              pcFlag: this.pcFlag,
-              pageSize: this.pageSize
-            })
-            .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.warehouseList = response
-            })
-        } else if (this.warehouseType == 2) {
-          recordss({
-              compId: localStorage.getItem('ws-pf_compId'),
-              baseId: this.deptBudgetList.baseId,
-              positionId: this.deptBudgetList.positionId,
-              warehouseName: this.deptBudgetList.warehouseName,
-              startDate: startDate,
-              endDate: endDate,
-              searchType: this.searchType,
-              searchKeyWord: this.searchKeyWord,
-              currentPage: this.currentPage,
-              pageSize: this.pageSize,
-            })
-            .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.warehouseList = 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.addressUrl === null ||
-          row.addressUrl === ''
-        ) {
-          EventBus.$emit(
-            'warning',
-            this.$t('system.noticeCircular.NoInformation')
-          )
-        } else {
-          this.accessoryTFs = true
-        }
-        this.appendixIdss = row.addressUrl
-        this.srcList = [row.addressUrl]
-      },
-      // 关闭 dialog时 处理文件url 初始化upload组件
-      handleCloe() {
-        this.dialogViewSpareMoney = false
-      },
-      history(row) {
-        console.log(row)
-        billoperatehis({
-            id: row.id
-          })
-          .toPromise()
-          .then((response) => {
-            this.historyList = response
-          })
-      },
-      // async exportlist() {
-      //   const { data } = await export1(
-      //     {
-      //       compId: localStorage.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() {},
-    },
-  }
+		/* 获取现在时间,并接受过去时间的值 */
+        getNowFormatDate (formatDate) {
+			var date = new Date()
+			date.setTime(date.getTime()+24*60*60*1000)
+			var seperator1 = '-'
+			var year = date.getFullYear()
+			var month = date.getMonth() + 1
+			var strDate = date.getDate()
+			if (month >= 1 && month <= 9) {
+				month = '0' + month
+			}
+			if (strDate >= 0 && strDate <= 9) {
+				strDate = '0' + strDate
+			}
+			var nowData = year + seperator1 + month + seperator1 + strDate
+			this.value2= [formatDate, nowData]  // 默认赋值一年时间
+   		 },
+			print(row){
+				sessionStorage.removeItem('record_print')
+				getPrintInfo({
+                        id: row.id
+                      })
+                        .toPromise()
+                        .then((response) => {
+                                     localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
+                        })
+			},
+			//返回按钮
+			returnWarehouse() {
+				this.$router.push({
+					path: 'warehouseManagementList'
+				})
+				this.searchKeyWord = ''
+			},
+			//
+			iossrecord() {
+				this.$router.push({
+					path: 'warehouseManagementIossRecord',
+					query: {
+						baseId: this.deptBudgetList.baseId,
+						positionId: this.deptBudgetList.positionId,
+						warehouseName: this.deptBudgetList.warehouseName,
+						binNumber: this.binNumber,
+					},
+				})
+			},
+			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
+			},
+			datechange(){
+				this.getList()
+			},
+			find() {
+      			this.getList()
+    		},
+			handleClose() {
+				this.accessoryTFs = false
+			},
+			handleSizeChange(val) {
+				console.log(`每页 ${val} 条`)
+				this.pageSize = val
+				this.getList()
+			},
+			handleCurrentChange(val) {
+				this.currentPage = val
+				console.log(`当前页: ${val}`)
+				this.getList()
+			},
+			record(status, status1) {
+				this.status = status1
+				this.searchType = status
+				this.currentPage = '1'
+				this.getList()
+			},
+			// 上传附件
+			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
+			},
+			getList() {
+					var startDate=''
+					var endDate=''
+					if(this.value2){
+					startDate=this.value2[0]?this.value2[0]:''
+					endDate=this.value2[1]?this.value2[1]:''
+				}
+				if (this.warehouseType == 1) {
+					getbinnumber({id: this.deptBudgetList.baseId}).toPromise()
+						.then((response) => {
+							
+							this.binnumberList = response.warehousePositionInfoList
+						})
+					addselectinfoList({
+							compId: localStorage.getItem('ws-pf_compId'),
+							baseId: this.deptBudgetList.baseId,
+							positionId: this.deptBudgetList.positionId,
+							warehouseName: this.deptBudgetList.warehouseName,
+							startDate:startDate,
+       					    endDate:endDate,
+							searchType: this.searchType,
+							searchKeyWord: this.searchKeyWord,
+							currentPage: this.currentPage,
+							pcFlag: this.pcFlag,
+							pageSize: this.pageSize
+						})
+						.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.warehouseList = response
+						})
+				} else if (this.warehouseType == 2) {
+					recordss({
+							compId: localStorage.getItem('ws-pf_compId'),
+							baseId: this.deptBudgetList.baseId,
+							positionId: this.deptBudgetList.positionId,
+							warehouseName: this.deptBudgetList.warehouseName,
+							startDate:startDate,
+       					    endDate:endDate,
+							searchType: this.searchType,
+							searchKeyWord: this.searchKeyWord,
+							currentPage: this.currentPage,
+							pageSize: this.pageSize,
+						})
+						.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.warehouseList = 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.addressUrl === null ||
+					row.addressUrl === ''
+				) {
+					EventBus.$emit(
+						'warning',
+						this.$t('system.noticeCircular.NoInformation')
+					)
+				} else {
+					this.accessoryTFs = true
+				}
+				this.appendixIdss = row.addressUrl
+				this.srcList=[row.addressUrl]
+			},
+			// 关闭 dialog时 处理文件url 初始化upload组件
+			handleCloe() {
+				this.dialogViewSpareMoney = false
+			},
+			history(row) {
+				console.log(row)
+				billoperatehis({
+						id: row.id
+					})
+					.toPromise()
+					.then((response) => {
+						this.historyList = response
+					})
+			},
+			// async exportlist() {
+			//   const { data } = await export1(
+			//     {
+			//       compId: localStorage.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() {},
+		},
+	}
 </script>
 <style lang="scss" scoped>
   /deep/.totalStorage .el-input__inner {

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


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