Explorar o código

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

# Conflicts:
#	vue.config.js
ccj %!s(int64=3) %!d(string=hai) anos
pai
achega
e5120b4de9
Modificáronse 33 ficheiros con 4154 adicións e 748 borrados
  1. 1 1
      package.json
  2. 0 1
      public/static/inspection.html
  3. 318 0
      public/static/payprint.html
  4. 28 0
      public/static/print.html
  5. 337 0
      public/static/weightCheck.html
  6. 17 2
      src/api/V2/houseSelfCollect/index.js
  7. 17 1
      src/api/V2/outboundManagement/index.js
  8. 2 0
      src/lang/zh.js
  9. 27 5
      src/model/houseSelfCollect/index.js
  10. 26 1
      src/model/outboundManagement/index.js
  11. 2 1
      src/views/financialManagement/collectionManagementList.vue
  12. 21 9
      src/views/houseSelfCollect/acquisitionManagement.vue
  13. 281 91
      src/views/houseSelfCollect/acquisitionManagementAdd.vue
  14. 159 0
      src/views/houseSelfCollect/component/inspectInfoPrint.vue
  15. 228 0
      src/views/houseSelfCollect/component/paymentPrint.vue
  16. 1 16
      src/views/houseSelfCollect/component/routers/route.js
  17. 181 0
      src/views/houseSelfCollect/component/weightCheckPrint.vue
  18. 29 22
      src/views/houseSelfCollect/customerManagementAdd.vue
  19. 0 52
      src/views/houseSelfCollect/houseSelfCollectPrint.vue
  20. 273 41
      src/views/houseSelfCollect/inspectInfo.vue
  21. 4 136
      src/views/houseSelfCollect/inspectionManagement.vue
  22. 192 60
      src/views/houseSelfCollect/paymentManagement.vue
  23. 240 57
      src/views/houseSelfCollect/settlement.vue
  24. 249 35
      src/views/houseSelfCollect/weighingManagement.vue
  25. 183 36
      src/views/houseSelfCollect/weightCheck.vue
  26. 484 0
      src/views/outboundManagement/collectionManagement.vue
  27. 248 0
      src/views/outboundManagement/collectionment.vue
  28. 30 0
      src/views/outboundManagement/component/route.js
  29. 445 0
      src/views/outboundManagement/weighing.vue
  30. 129 177
      src/views/outboundManagement/weighingManagement.vue
  31. 0 2
      src/views/purchasingManagement/purchaseOrderList.vue
  32. 1 1
      src/views/statisticalReport/purchaseReceiptStatisticsList.vue
  33. 1 1
      vue.config.js

+ 1 - 1
package.json

@@ -59,7 +59,7 @@
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",
     "pinyin": "^2.9.1",
-    "qrcodejs2": "0.0.2",
+    "qrcodejs2": "^0.0.2",
     "querystring": "^0.2.0",
     "register-service-worker": "^1.0.0",
     "sass-loader": "^7.1.0",

+ 0 - 1
public/static/inspection.html

@@ -311,7 +311,6 @@
         printBig() {},
       },
       mounted() {
-        debugger
         let _data = decodeURIComponent(this.getQueryVariable("dataList"))
         let _type = decodeURIComponent(this.getQueryVariable("type"))
         if (_type == 2) {

+ 318 - 0
public/static/payprint.html

@@ -0,0 +1,318 @@
+<!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;
+        height: 583px;
+        margin: auto;
+        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 {
+        width: 41px;
+        height: 41px;
+        margin-right: 118px;
+      }
+
+      .config {
+        margin-right: 240px;
+      }
+
+      .bottom-row3 {
+        margin: 10px 0;
+      }
+
+      .title {
+        text-align: center;
+        font-size: 24px;
+      }
+
+      .number {
+        text-align: right;
+        margin-bottom: 10px;
+      }
+
+      .small-row {
+        display: flex;
+      }
+
+      .small-content {
+        width: 400px;
+        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;
+        justify-content: space-between;
+        align-items: center;
+      }
+
+      .small-row {
+        display: flex;
+        justify-content: space-between;
+        margin: 10px;
+      }
+
+      .small-img {
+        margin-right: 0;
+      }
+      .sign{
+        margin-right: 100px;
+      }
+    </style>
+  </head>
+  <body>
+    <div id="app">
+      <div class="content" v-if="bigContent">
+        <div class="center">
+          <div class="header-top">
+            <div>单位:公斤、元</div>
+            <div>No.</div>
+          </div>
+          <div class="header-top">
+            <div>开票日期:{{printData.compName}}</div>
+            <div class="number">{{100000000000000}}</div>
+          </div>
+          <table class="table">
+            <tr class="row">
+              <td rowspan="4" class="col col-bgc">买方</td>
+              <td class="col col-bgc">单位名称</td>
+              <td class="col" colspan="3">{{ printData.compName}}</td>
+              <td rowspan="4" class="col col-bgc">买方</td>
+              <td class="col col-bgc">姓名</td>
+              <td class="col" colspan="3">{{ printData.customerName}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">税务登记号</td>
+              <td class="col" colspan="3">{{ printData.taxRegistrationNo}}</td>
+              <td class="col col-bgc">身份证号</td>
+              <td class="col" colspan="3">{{ printData.customerNumberCard}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">化验单号</td>
+              <td class="col" colspan="3">{{ printData.paymentNo}}</td>
+              <td class="col col-bgc">卡号</td>
+              <td class="col" colspan="3">{{ printData. bankCard}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">收货仓库</td>
+              <td class="col" colspan="3">{{printData.warehouseName}}</td>
+              <td class="col col-bgc">地址</td>
+              <td class="col" colspan="3">{{printData.compAddress}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">货名</td>
+              <td class="col col-bgc">类型</td>
+              <td class="col col-bgc">等级</td>
+              <td class="col col-bgc">水分%</td>
+              <td class="col col-bgc">杂质%</td>
+              <td class="col col-bgc">毛重</td>
+              <td class="col col-bgc">皮重</td>
+              <td class="col col-bgc">扣杂重</td>
+              <td class="col col-bgc">净重</td>
+              <td class="col col-bgc">纯重</td>
+            </tr>
+            <tr class="row">
+              <td class="col">{{ printData.goodsName}}</td>
+              <td class="col">{{ printData.type}}</td>
+              <td class="col">{{ printData.grade}}</td>
+              <td class="col">{{ printData.waterContent}}</td>
+              <td class="col">{{ printData.impurity}}</td>
+              <td class="col">{{ printData.grossWeight}}</td>
+              <td class="col">{{ printData.tare}}</td>
+              <td class="col">{{ printData.buckleMiscellaneous}}</td>
+              <td class="col">{{ printData.netWeight}}</td>
+              <td class="col">{{ printData.pureWeight}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">净重单价</td>
+              <td class="col col-bgc">粮款</td>
+              <td class="col col-bgc">称重补助</td>
+              <td class="col col-bgc">运费补助</td>
+              <td class="col col-bgc">卸车补助</td>
+              <td class="col col-bgc">其他补助</td>
+              <td class="col col-bgc">称重扣款</td>
+              <td class="col col-bgc">运费扣款</td>
+              <td class="col col-bgc">卸车扣款</td>
+              <td class="col col-bgc">质量扣款</td>
+            </tr>
+            <tr class="row">
+              <td class="col ">{{ printData.tidalGrainPrice}}</td>
+              <td class="col ">{{ printData.grainMoney}}</td>
+              <td class="col ">{{ printData.weighingSubsidy}}</td>
+              <td class="col ">{{ printData.freightSubsidy}}</td>
+              <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.qualityDeduction}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">其他扣款</td>
+              <td class="col col-bgc">纯重单价</td>
+              <td class="col col-bgc">合计应付</td>
+              <td class="col col-bgc">购粮性质</td>
+              <td class="col col-bgc">车牌号</td>
+              <td class="col col-bgc" colspan="5">记事</td>
+            </tr>
+            <tr class="row">
+              <td class="col ">{{ printData.otherDeduction}}</td>
+              <td class="col ">{{ printData.solidGrainPrice}}</td>
+              <td class="col ">{{ printData.calculationPayable}}</td>
+              <td class="col ">{{ printData.natureOfGrainPurchase}}</td>
+              <td class="col ">{{ printData.carNo}}</td>
+              <td class="col " colspan="5">{{ printData.remarks}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">实付金额</td>
+              <td class="col " colspan="2">{{printData.actualPayment}}</td>
+              <td class="col col-bgc" colspan="3">人民币(大写)</td>
+              <td class="col " colspan="4">{{printData.capitalize}}</td>
+
+            </tr>
+          </table>
+
+          <div class="bottom">
+            <div class="bottom-row1">
+              <div>质检:{{ printData.qualityInspector}}</div>
+              <div>毛检:{{ printData.skinInspector}}</div>
+              <div>皮检:{{ printData.qualityInspector}}</div>
+              <div>结算:{{ printData.settlementClerk}}</div>
+              <div>付款:{{ printData.qualityInspector}}</div>
+              <div>复点:{{ printData.qualityInspector}}</div>
+            </div>
+            <div class="bottom-row2">
+              <div class="left">
+                <img src="../../../../public/img/add.png" alt="" />
+              </div>
+              <div class="config">收货单位签名或盖章</div>
+              <div class="">客户签名</div>
+            </div>
+            <div class="bottom-row3">扫一扫</div>
+          </div>
+        </div>
+      </div>
+    <div class="small-content" v-if="smallContent">
+<div class="small-title">
+          <div>
+中天昊元粮食贸易有限公司结算凭证</div>
+          <img class="small-img" src="../img/add.png" alt="">
+        </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: {
+        printData:[],
+        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);
+        },
+        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.printData = JSON.parse(_data)
+        // console.log(this.tableData)
+        window.print()
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        };
+      },
+      watch: {}
+    })
+  </script>
+
+</html>

+ 28 - 0
public/static/print.html

@@ -39,6 +39,33 @@
   </head>
   <body>
     <div id="app">
+<<<<<<< HEAD
+      {{dataList}}
+       <el-button @click="visible = true">Button</el-button>
+    </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: {
+        dataList: ""
+      },
+      computed: {},
+      methods: {
+
+      },
+      mounted() {debugger
+       let _data = localStorage.getItem("pricePrintList")
+        // var _data = decodeURIComponent(this.getQueryVariable("id"))
+        console.log(_data)
+        this.dataList = JSON.parse(_data)
+        // window.print()
+        // window.onafterprint = function(event) {
+        //   window.history.back(-1)
+        // };
+=======
       <div class="content">
         <div class="title">
           <div class="name">{{name}}价格对照表(按水分)</div>
@@ -105,6 +132,7 @@
         window.onafterprint = function(event) {
           window.history.back(-1)
         };
+>>>>>>> 1d46949992a1fc8a79736807784052ab343c9846
       },
       watch: {
       }

+ 337 - 0
public/static/weightCheck.html

@@ -0,0 +1,337 @@
+<!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;
+        height: 583px;
+        margin: auto;
+        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 {
+        width: 41px;
+        height: 41px;
+        margin-right: 118px;
+      }
+
+      .config {
+        margin-top: 20px;
+        margin-right: 240px;
+      }
+      .autograph{
+    margin-top: 20px;
+     }
+      .bottom-row3 {
+        margin: 10px 0;
+      }
+
+      .title {
+        text-align: center;
+        font-size: 24px;
+      }
+
+      .number {
+        text-align: right;
+        margin-bottom: 10px;
+      }
+
+      .small-row {
+        display: flex;
+      }
+
+      .small-content {
+        width: 400px;
+        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;
+        justify-content: space-between;
+        align-items: center;
+      }
+
+      .small-row {
+        display: flex;
+        justify-content: space-between;
+        margin: 10px;
+      }
+
+      .small-img {
+        margin-right: 0;
+      }
+      .sign{
+        margin-right: 100px;
+      }
+    </style>
+  </head>
+  <body>
+    <div id="app">
+      <div class="content" v-if="bigContent">
+        <div class="title">粮食检斤单</div>
+        <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">车牌号</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">质检{{tableData.qualityInspectionManagement.suqualityTestingDate}}</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.buckleMiscellaneous}}</td>
+            <td class="col col-bgc">净重(公斤)</td>
+            <td class="col">{{tableData.netWeight}}</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 " colspan="4"></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="../img/add.png" alt="">
+            </div>
+            <div class="config">收货单位签名或盖章:</div>
+            <div class="autograph">客户签名:</div>
+          </div>
+          <div class="bottom-row3">扫一扫</div>
+        </div>
+      </div>
+      <div class="small-content" v-if="smallContent">
+        <div class="small-title">
+          <div>粮食检斤单</div>
+          <img class="small-img" src="../img/add.png" alt="">
+        </div>
+        <div class="small-row">
+          <div>编号</div>
+          <div>{{tableData.number}}</div>
+        </div>
+        <div class="small-row">
+          <div>客户姓名</div>
+          <div>{{tableData.customer}}</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.tare}}</div>
+          </div>
+          <div class="small-row">
+            <div>皮检时间</div>
+            <div>{{tableData.tareDate}}</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.buckleMiscellaneous}}</div>
+        </div>
+        <div class="small-row">
+          <div>净重(公斤)</div>
+          <div>{{tableData.netWeight}}</div>
+        </div>
+        <div class="small-row">
+          <div>收货单位签名或盖章:</div>
+          <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:{}
+        },
+        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);
+        },
+        printSmall() {},
+        printBig() {},
+      },
+      mounted() {
+        let _data = decodeURIComponent(this.getQueryVariable("tableData"))
+        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,"sddsd")
+        this.tableData = JSON.parse(_data)
+        console.log(this.tableData)
+        window.print()
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        };
+      },
+      watch: {}
+    })
+  </script>
+
+</html>

+ 17 - 2
src/api/V2/houseSelfCollect/index.js

@@ -42,16 +42,31 @@ export const API_GET_INSPECT_GETINSPECTLOOKGOODS = '/qualityInspectionManagement
 export const API_POST_INSPECT_GETINSPECTEDIT = '/qualityInspectionManagement/api/editQualityInspection'
 //质检删除
 export const API_POST_INSPECT_GETINSPECTDELETE = '/qualityInspectionManagement/api/deleteQualityInspection'
+//付款管理列表
+export const API_GET_PAYMENTMANAGEMENT = '/paymentManagement/selectPaymentManagement'
 //检斤列表查看
 export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWeighingManagement'
 //皮重检斤保存
 export const API_POST_WEIGHTCHECK_TARE= '/weighingManagement/api/editTare'
-//毛重检斤保存
+//毛重检斤保存
 export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
+//付款查看
+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_CUSTOMER_GETIDENTITY = '/driverViewInfo/personShibie'
+//识别银行卡
+export const API_GET_CUSTOMER_GETBANK = '/driverViewInfo/bankShibie'
+//查询货名有未结算状态
+export const API_GET_INSPECT_GETCOUNT= '/qualityInspectionManagement/api/settledCount'
+//检斤打印查看
+export const API_GET_WEIGHTCHECK_GETPRINT= '/weighingManagement/api/getWeighingManagement'
+//付款删除
+export const API_POST_PAYMENT_DEL = '/paymentManagement/api/deleteInfo'
+//付款审核
+export const API_POST_PAYMENT_AUDIT = '/paymentManagement/api/openAuditFlow'
 
 

+ 17 - 1
src/api/V2/outboundManagement/index.js

@@ -5,4 +5,20 @@ export const API_GET_INSPECT_GETINSPECTLOOK = '/qualityInspectionManagement/api/
 //质检添加
 export const API_POST_INSPECT_ADDOUT = '/qualityInspectionManagement/api/addQualityInspectionOut'
 //查询仓库列表
-export const API_GET_WAREHOUSESELF = '/warehouseBaseInfo/selectWarehouseSelf'
+export const API_GET_WAREHOUSESELF = '/warehouseBaseInfo/selectWarehouseSelf'
+//检斤列表查看
+export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWeighingManagement'
+//皮重检斤保存
+export const API_POST_WEIGHTCHECK_TARE= '/weighingManagement/api/editTare'
+//出库管理添加皮重检斤
+export const API_POST_WEIGHTCHECK_ADDTARE= '/weighingManagement/api/addTare'
+//出库管理编辑皮重检斤
+export const API_POST_WEIGHTCHECK_EDITTAREOUT= '/weighingManagement/api/editTareOut'
+//毛重检斤保存
+export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
+//检斤仓位下拉
+export const API_GET_INSPECT_GETBINNUMBER = '/warehouseBaseInfo/getWarehouse'
+//删除检斤信息
+export const API_POST_INSPECT_DELETEWEIGHING = '/weighingManagement/api/deleteWeightcheck'
+//合同编号下拉
+export const API_GET_INSPECT_CONTRANCLIST= '/warehouseBaseInfo/selectContractNoList'

+ 2 - 0
src/lang/zh.js

@@ -1007,6 +1007,8 @@ export default {
     qualityInspectionManagement: '质检管理',
     qualityInspection: '质检信息',
     collectionManagement: '收款管理',
+    collectionment:'查看收款管理',
+    weighing: '检斤信息',
 
   },
   // 后台错误码

+ 27 - 5
src/model/houseSelfCollect/index.js

@@ -24,12 +24,19 @@ import {
   API_GET_INSPECT_GETINSPECTLOOKGOODS,
   API_POST_INSPECT_GETINSPECTEDIT,
   API_POST_INSPECT_GETINSPECTDELETE,
+  API_GET_PAYMENTMANAGEMENT,
   API_GET_WEIGHTCHECK_GETWEIGHINGLIST,
   API_POST_WEIGHTCHECK_GROSSWEIGHT,
   API_POST_WEIGHTCHECK_TARE,
+  API_GET_PAYMENT,
+  API_POST_PAYMENT_EDIT,
   API_GET_INSPECT_GETAMOUNT,
-  API_GET_CUSTOMER_GETIDENTITY
-
+  API_GET_CUSTOMER_GETIDENTITY,
+  API_GET_CUSTOMER_GETBANK,
+  API_GET_INSPECT_GETCOUNT,
+  API_GET_WEIGHTCHECK_GETPRINT,
+  API_POST_PAYMENT_DEL,
+  API_POST_PAYMENT_AUDIT
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -41,7 +48,6 @@ export const customerIdentity = appRx.get(API_GET_CUSTOMER_IDENTITY, errorCatche
 export const getCustomerDelete = appRx.post(API_GET_CUSTOMER_DELETE, errorCatcher, errorHandle, filter)
 //客户查看
 export const getCustomerLook = appRx.get(API_GET_CUSTOMER_LOOK, errorCatcher, errorHandle, filter)
-
 //收购管理列表
 export const getPurchasePrice = appRx.get(API_GET_PURCHASEPRICE_MANAGE, errorCatcher, errorHandle, filter)
 //收购管理添加
@@ -76,14 +82,30 @@ export const getinspectLookGoods = appRx.get(API_GET_INSPECT_GETINSPECTLOOKGOODS
 export const getinspectEdit = appRx.post(API_POST_INSPECT_GETINSPECTEDIT, errorCatcher, errorHandle, filter)
 //质检删除
 export const getinspectDelete = appRx.post(API_POST_INSPECT_GETINSPECTDELETE, errorCatcher, errorHandle, filter)
+//付款管理列表
+export const getpayment = appRx.get(API_GET_PAYMENTMANAGEMENT, errorCatcher, errorHandle, filter)
 //检斤列表查看
 export const getweighingList = appRx.get(API_GET_WEIGHTCHECK_GETWEIGHINGLIST, errorCatcher, errorHandle, filter)
 //皮重检斤保存
 export const tare = appRx.post(API_POST_WEIGHTCHECK_TARE, errorCatcher, errorHandle, filter)
 //毛重检斤保存
 export const grossWeight = appRx.post(API_POST_WEIGHTCHECK_GROSSWEIGHT, errorCatcher, errorHandle, filter)
+//付款信息查看
+export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorHandle, filter)
+//付款信息结算
+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 getIdentity  = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)
+export const getIdentity = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)
+//银行卡识别
+export const getBank = appRx.get(API_GET_CUSTOMER_GETBANK, errorCatcher, errorHandle, filter)
+//查询货名有未结算状态
+export const getCount = appRx.get(API_GET_INSPECT_GETCOUNT, errorCatcher, errorHandle, filter)
+//检斤打印查看
+export const getPrint = appRx.get(API_GET_WEIGHTCHECK_GETPRINT, errorCatcher, errorHandle, filter)
+//付款删除
+export const delpayment  = appRx.post(API_POST_PAYMENT_DEL, errorCatcher, errorHandle, filter)
+//付款审核
+export const auditpayment  = appRx.post(API_POST_PAYMENT_AUDIT, errorCatcher, errorHandle, filter)
+

+ 26 - 1
src/model/outboundManagement/index.js

@@ -5,7 +5,15 @@ import {
     API_POST_INSPECT_ADDOUT,
     API_GET_INSPECT_GETINSPECTLIST,
     API_GET_INSPECT_GETINSPECTLOOK,
-    API_GET_WAREHOUSESELF
+    API_GET_WAREHOUSESELF,
+    API_GET_WEIGHTCHECK_GETWEIGHINGLIST,
+    API_POST_WEIGHTCHECK_TARE,
+    API_POST_WEIGHTCHECK_GROSSWEIGHT,
+    API_GET_INSPECT_GETBINNUMBER,
+    API_POST_INSPECT_DELETEWEIGHING,
+    API_GET_INSPECT_CONTRANCLIST,
+    API_POST_WEIGHTCHECK_ADDTARE,
+    API_POST_WEIGHTCHECK_EDITTAREOUT
 
 }   from '@/api/V2/outboundManagement'
 
@@ -17,4 +25,21 @@ import {
   export const addOut = appRx.post(API_POST_INSPECT_ADDOUT, errorCatcher, errorHandle, filter)
   //查看仓库
   export const selectWarehouseSelf = appRx.get(API_GET_WAREHOUSESELF, errorCatcher, errorHandle, filter)
+  //检斤列表查看
+export const getweighingList = appRx.get(API_GET_WEIGHTCHECK_GETWEIGHINGLIST, errorCatcher, errorHandle, filter)
+//皮重检斤保存
+export const tare = appRx.post(API_POST_WEIGHTCHECK_TARE, errorCatcher, errorHandle, filter)
+//毛重检斤保存
+export const grossWeight = appRx.post(API_POST_WEIGHTCHECK_GROSSWEIGHT, errorCatcher, errorHandle, filter)
+//出库管理添加皮重检斤
+export const tareAdd = appRx.post(API_POST_WEIGHTCHECK_ADDTARE, errorCatcher, errorHandle, filter)
+//出库管理编辑皮重检斤
+export const tareEdit = appRx.post(API_POST_WEIGHTCHECK_EDITTAREOUT, errorCatcher, errorHandle, filter)
+//仓位下拉
+export const getbinNumber = appRx.get(API_GET_INSPECT_GETBINNUMBER, errorCatcher, errorHandle, filter)
+//删除检斤信息
+export const delelteWeighing = appRx.post(API_POST_INSPECT_DELETEWEIGHING, errorCatcher, errorHandle, filter)
+//合同编号下拉
+export const contractList = appRx.get(API_GET_INSPECT_CONTRANCLIST, errorCatcher, errorHandle, filter)
+
   

+ 2 - 1
src/views/financialManagement/collectionManagementList.vue

@@ -630,7 +630,8 @@ export default {
             boxNo: '',
             titleNo: '',
             tranCarNo: tmp,
-            agent: this.agent
+            agent: this.agent,
+            staffId: this.staffId
           })
           // for (var i = 0; i < this.freightspace.length; i++) {
           //   var index = i + 1

+ 21 - 9
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -7,7 +7,7 @@
           <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
           </el-option>
         </el-select>
-        <el-checkbox v-model="checked" @change="allowEdit" :disabled="userJurisdiction">允许手动编辑重量</el-checkbox>
+        <el-checkbox v-model="checked" @change="allowEdit" :disabled="!userJurisdiction">允许手动编辑重量</el-checkbox>
       </div>
       <el-button type="primary" @click="newAcquisition('','','新增')">新增</el-button>
     </div>
@@ -31,7 +31,7 @@
         </el-table-column>
         <el-table-column prop="waterBase" label="基准水分(%)"></el-table-column>
         <el-table-column prop="deductWeight" label="扣重比"></el-table-column>
-        <el-table-column prop="saleLimit" label="销量上线"></el-table-column>
+        <el-table-column prop="saleLimit" label="销量上限(年/吨)"></el-table-column>
         <el-table-column prop="dryGrainPrice" label="干粮收购价"></el-table-column>
 
         <el-table-column prop="status" label="状态"></el-table-column>
@@ -39,8 +39,9 @@
         <el-table-column label="操作" width="300">
           <template slot-scope="scope">
             <el-button size="mini" @click="newAcquisition(scope.$index, scope.row,'查看')">查看</el-button>
-            <el-button size="mini" @click="newAcquisition(scope.$index, scope.row,'编辑')">编辑</el-button>
-            <el-button size="mini" type="danger" @click="delRow(scope.$index, scope.row)">删除</el-button>
+            <el-button v-if="scope.row.status!='审核中'" size="mini" @click="newAcquisition(scope.$index, scope.row,'编辑')">编辑</el-button>
+            <el-button v-if="scope.row.status=='审核中'" size="mini" :disabled="!userJurisdiction" @click="newAcquisition(scope.$index, scope.row,'编辑')">审核中</el-button>
+            <el-button size="mini" :disabled="!userJurisdiction" type="danger" @click="delRow(scope.$index, scope.row)">删除</el-button>
             <el-button size="mini" @click="print(scope.$index, scope.row)">打印</el-button>
           </template>
         </el-table-column>
@@ -104,7 +105,7 @@
 
     },
     methods: {
-      getUserJurisdiction(){debugger
+      getUserJurisdiction(){
         let userJurisdiction = getHp('acquisitionManagement.acquisition.allow')
       },
       handleSizeChange(val) {
@@ -152,11 +153,17 @@
             }
             break
           case '编辑':
+          _query = {
+            data: JSON.stringify(row),
+            type: type,
+             goodsNameList: this.goodsNameList
+          }
             break
           case "查看":
             _query = {
               data: JSON.stringify(row),
-              type: type
+              type: type,
+              goodsNameList: this.goodsNameList
             }
             break
           default:
@@ -172,10 +179,12 @@
         selectWarehouseSelf({
           compId: this.compId,
           personCharge: this.accountName,
-        }).toPromise().then((response) => {debugger
+        }).toPromise().then((response) => {
           console.log(response)
           this.warehouseList = response
-          this.warehouseList.unshift({warehouseName:response[0].flag})
+          if(this.userJurisdiction){
+            this.warehouseList.unshift({warehouseName:response[0].flag})
+          }
           console.log(this.warehouseList)
           this.selectVal = this.warehouseList[0].id
           if (this.warehouseList[0].allowEdit == 1) {
@@ -189,7 +198,7 @@
         })
       },
       //获取列表数据
-      getList() {debugger
+      getList() {
         getPurchasePrice({
           currentPage: this.currentPage,
           pageSize: this.pageSize,
@@ -257,6 +266,9 @@
           localStorage.setItem('pricePrintList', JSON.stringify(response.detailPrints));
           window.location.href = "../../../static/print.html?name=" + row.goodsName
         })
+      },
+      validate(){
+
       }
     },
   }

+ 281 - 91
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -14,7 +14,7 @@
         <div class="row1">
           <div class="grid-content">
             <el-form-item label="货名">
-              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange">
+              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange" :disabled="!isEdit">
                 <el-option v-for="item in goodnameList" :key="item.constValue" :label="item.constValue"
                   :value="item.constValue">
                 </el-option>
@@ -58,7 +58,7 @@
       <el-row class="row3">
         <div class="top">
           <div class="title">粮价设置</div>
-          <el-button class="btn" @click="newSetPrice" :disabled="!isEdit">新增</el-button>
+          <el-button v-if="priceList.length<4" class="btn" @click="newSetPrice" :disabled="!isEdit">新增</el-button>
         </div>
         <div class="content" v-for="(item,index) in priceList" :key="index">
           <div class="top">
@@ -114,7 +114,7 @@
             </div>
           </div>
         </div>
-        <el-button class="submit" @click="submit">提交</el-button>
+        <el-button class="submit" @click="submit">{{submitName}}</el-button>
       </el-row>
     </el-main>
     <el-main v-show="!isCountShow">
@@ -137,8 +137,14 @@
           </el-table-column>
         </el-table>
       </div>
-      <el-button class="submit" @click="closeCount">关闭</el-button>
-      <el-button class="submit" @click="print">打印</el-button>
+      <div class="bottom-btn">
+        <div v-if="baseInfoForm.status=='审核中'" class="left">当前价格尚未通过审核,建议审核通过后进行打印</div>
+        <div class="right">
+          <el-button class="submit" @click="closeCount">关闭</el-button>
+          <el-button class="submit" @click="print">打印</el-button>
+        </div>
+      </div>
+
 
     </el-main>
   </el-container>
@@ -146,7 +152,8 @@
 <script>
   import {
     purchasePriceAdd,
-    purchasePriceLook
+    purchasePriceLook,
+    purchasePriceEdit
   } from '@/model/houseSelfCollect/index'
   import {
     packList,
@@ -164,35 +171,7 @@
         selectVal: "",
         goodnameList: [],
         tableData: [],
-        // tableData: [{
-        //   waterMin: '10',
-        //   waterMax: '20',
-        //   price1: '30',
-        //   price2: '30',
-        //   price3: '30',
-        //   priceOther: '30',
-        // }, {
-        //   waterMin: '11',
-        //   waterMax: '20',
-        //   price1: '30',
-        //   price2: '30',
-        //   price3: '30',
-        //   priceOther: '30',
-        // }, {
-        //   waterMin: '12',
-        //   waterMax: '20',
-        //   price1: '30',
-        //   price2: '30',
-        //   price3: '30',
-        //   priceOther: '30',
-        // }, {
-        //   waterMin: '13',
-        //   waterMax: '20',
-        //   price1: '30',
-        //   price2: '30',
-        //   price3: '30',
-        //   priceOther: '30',
-        // }],
+        submitName: "提交",
         isCountShow: true,
         priceList: [{
           index: 0,
@@ -253,56 +232,86 @@
       }
     },
     activated() {
+      // 货名
+      let _goodsNameList = []
+      _goodsNameList = this.$route.query.goodsNameList
+      packList({
+          constId: 'CON2'
+        })
+        .toPromise()
+        .then((response) => {
+          debugger
+          let _list = []
+          for (let i = 0; i < response.length; i++) {
+            let _isAll = true
+            for (let j = 0; j < _goodsNameList.length; j++) {
+              if (response[i].constValue != _goodsNameList[j]) {
+                if (j == _goodsNameList.length - 1 && _isAll) {
+                  _list.push(response[i])
+                }
+              } else {
+                _isAll = false
+              }
+            }
+          }
+          this.goodnameList = _list
+          this.selectVal = _list[0].constValue
+        })
       switch (this.$route.query.type) {
         case "新增":
-          let _goodsNameList = []
+          this.submitName = "提交"
           this.baseInfoForm.warehouseId = this.$route.query.warehouseId
           this.baseInfoForm.warehouseName = this.$route.query.warehouseName
           this.baseInfoForm.compId = this.$route.query.compId
           this.type = this.$route.query.type
           console.log(this.baseInfoForm)
-          _goodsNameList = this.$route.query.goodsNameList
+
           this.priceList[0].detailList[0].water = this.baseInfoForm.waterMin
           this.priceList[0].detailList[2].water = this.baseInfoForm.waterBase
           this.priceList[0].detailList[4].water = this.baseInfoForm.waterMax
-          // 货名
-          packList({
-              constId: 'CON2'
-            })
-            .toPromise()
-            .then((response) => {
-              let _list = []
-              for (let i = 0; i < response.length; i++) {
-                let _isAll = true
-                for (let j = 0; j < _goodsNameList.length; j++) {
-                  if (response[i].constValue != _goodsNameList[j]) {
-                    if (j == _goodsNameList.length - 1 && _isAll) {
-                      _list.push(response[i])
-                    }
-                  } else {
-                    _isAll = false
-                  }
-                }
-              }
-              this.goodnameList = _list
-              this.selectVal = _list[0].constValue
-            })
+          this.isEdit = true
+          this.priceList = [{
+            index: 0,
+            checkList: [],
+            basicUnitPrice: "",
+            detailList: [{
+                type: 1,
+                name: "干粮",
+                water: "",
+                isWrite: false
+              },
+              {
+                type: 4,
+                jfprice: ""
+              },
+              {
+                type: 2,
+                name: "基准",
+                water: '',
+                isWrite: false
+              },
+              {
+                type: 4,
+                jfprice: ""
+              },
+              {
+                type: 3,
+                name: "上限",
+                water: '',
+                isWrite: false
+              },
+            ],
+          }]
           break;
         case "编辑":
+          // this.isEdit = false;
+          this.submitName = "提交"
+          this.getData()
           break;
         case "查看":
           this.isEdit = false;
-          this.type = this.$route.query.type
-          this.baseInfoForm = JSON.parse(this.$route.query.data)
-          purchasePriceLook({
-            id: this.baseInfoForm.id
-          }).toPromise().then((response) => {
-            console.log(response)
-            this.baseInfoForm = response
-            //构造查看priceList数据
-            this.priceList = []
-            this.makeLookPriceList()
-          })
+          this.submitName = "计算"
+          this.getData()
           break;
         default:
           break
@@ -310,6 +319,20 @@
     },
     mounted() {},
     methods: {
+      // 查看/编辑获取数据
+      getData() {
+        this.type = this.$route.query.type
+        this.baseInfoForm = JSON.parse(this.$route.query.data)
+        purchasePriceLook({
+          id: this.baseInfoForm.id
+        }).toPromise().then((response) => {
+          console.log(response)
+          this.baseInfoForm = response
+          //构造查看priceList数据
+          this.priceList = []
+          this.makeLookPriceList()
+        })
+      },
       goodsChange(e) {
         console.log(e)
       },
@@ -344,16 +367,19 @@
         }
       },
       // 设置表格颜色
-      tableRowClassName({
-        row,
-        rowIndex
-      }) {
-        if (rowIndex === 1) {
-          return 'warning-row';
-        } else if (rowIndex === 3) {
-          return 'success-row';
-        }
-        return '';
+tableRowClassName ({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return 'double';
+      } else {
+        return 'single';
+      }
+    }, getRowClass ({ rowIndex }) {
+      if (rowIndex == 0) {
+        return 'background:#ebeaef'
+      } else {
+        return ''
+}
+      //   return '';
       },
       // 增加分界
       add(item, item1, index) {
@@ -470,6 +496,7 @@
       },
       // 删除价格组
       delSetPrice(item, index) {
+        let that = this
         this.$confirm(
             '确认删除本组设置?',
             '提示', {
@@ -479,7 +506,14 @@
             }
           )
           .then(() => {
-            this.priceList.splice(index, 1)
+            if (that.priceList.length == 1) {
+              that.$message({
+                message: '至少保留一组粮价设置',
+                type: 'warning'
+              });
+            } else {
+              that.priceList.splice(index, 1)
+            }
           })
           .catch(() => {
             return false
@@ -527,24 +561,164 @@
       },
       //打印
       print() {},
+      validate() {
+        let that = this
+        function _baseWaterValidate(min, max, saveNum, point, type) {
+          let _val1 = parseFloat(that.baseInfoForm.waterBase)
+          let _pointVal1 = _val1.toString().split(".")[1]
+          let _tobeVal1 = _val1 % saveNum
+          if (type == "waterBase") {
+            if (_val1 < max && _val1 > min && _pointVal1 < point && _tobeVal1 == 0) {
+              return false
+            }
+          }
+          if (type == "deductWeight") {
+            if (_val1 < max && _val1 > min && _pointVal1 < point) {
+              return false
+            }
+          }
+          if (type == "saleLimit") {
+
+            if (_val1 < max && _val1 > min && Number.isInteger(this.baseInfoForm.saleLimit)) {
+              return false
+            }
+          }
+          return true
+        }
+        if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase") || this.baseInfoForm.waterBase == '') {
+          if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase")) {
+            that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.5整除!');
+          } else {
+            this.$message.error('基准水分不能为空!');
+          }
+          return false
+        }
+        if (_baseWaterValidate(0, 2, 2, '', 'deductWeight') || this.baseInfoForm.deductWeight == '') {
+          if (_baseWaterValidate(0, 2, 2, '', 'deductWeight')) {
+            that.$message.error('扣重比输入错误!');
+          } else {
+            this.$message.error('扣重比不能为空!');
+          }
+          return false
+        }
+        if (_baseWaterValidate(0, 1000, 4, '', 'deductWeight') || this.baseInfoForm.dryGrainPrice == '') {
+          if (_baseWaterValidate(0, 1000, 4, '', 'deductWeight')) {
+            that.$message.error('干粮收购价输入错误!');
+          } else {
+            this.$message.error('干粮收购价格不能为空!');
+          }
+          return false
+        }
+
+        if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase") || this.baseInfoForm.waterMin == '') {
+          if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase")) {
+            that.$message.error('干粮水分输入错误!');
+          } else {
+            this.$message.error('干粮水分不能为空!');
+          }
+          return false
+        }
+        if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase") || this.baseInfoForm.waterMax == '') {
+          if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase")) {
+            that.$message.error('水分上限输入错误!');
+          } else {
+            this.$message.error('水分上限不能为空!');
+          }
+          return false
+        }
+        if (_baseWaterValidate(100, 100000, '', '', "saleLimit") || this.baseInfoForm.saleLimit == '') {
+          if (_baseWaterValidate(100, 100000, '', '', "saleLimit")) {
+            that.$message.error('销售上限输入错误!');
+          } else {
+            this.$message.error('销售上限不能为空!');
+          }
+          return false
+        }
+        console.log(this.priceList.length)
+        if (this.priceList.length != 4) {
+          this.$message.error('粮价设置为4个等级!');
+          return false
+        }
+        for (let i = 0; i < this.priceList.length; i++) {
+          let _item = this.priceList[i]
+          if (_baseWaterValidate(0, 50, 2, '', "deductWeight") || _item.basicUnitPrice == '') {
+            if (_baseWaterValidate(0, 50, 2, '', "deductWeight")) {
+              that.$message.error('基准单价输入错误!');
+            } else {
+              this.$message.error('基准单价不能为空!');
+            }
+            return false
+          }
+          if (_item.checkList.length == 0) {
+            this.$message.error('等级不能为空!');
+            return false
+          }
+          for (let j = 0; j < _item.detailList.length; j++) {
+            let _item1 = _item.detailList[j]
+            if (_item1.type == 4) {
+              if (_baseWaterValidate(0, 100, 3, '', 'deductWeight') || _item1.jfprice == "") {
+                if (_baseWaterValidate(0, 100, 3, '', 'deductWeight')) {
+                  that.$message.error('降幅输入错误!');
+                } else {
+                  this.$message.error('降幅价格不能为空!');
+                }
+                return false
+              }
+            } else {
+              if (_baseWaterValidate(0, 100, 1, 0.5, "waterBase") || _item1.water == "") {
+                if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase")) {
+                  that.$message.error('分界值输入错误!');
+                } else {
+                  this.$message.error('分界水分不能为空!');
+                }
+                return false
+              }
+            }
+          }
+        }
+        return true
+      },
       // 提交
       submit() {
-        this.isCountShow = false
+        debugger
+
         this.makeTableList()
         this.makePriceDataList()
         this.baseInfoForm.goodsName = this.selectVal
-        // purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
-        //   console.log(response)
-        //   this.tableData = response.records
-        // })
+        let isValidate = false
+        switch (this.$route.query.type) {
+          case "查看":
+            this.isCountShow = false;
+            break;
+          case "新增":
+          isValidate=this.validate()
+            if (isValidate) {
+              purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
+                console.log(response)
+                // this.tableData = response.records
+                this.isCountShow = false
+              })
+            }
+            break;
+          case "编辑":
+          isValidate=this.validate()
+            if (isValidate) {
+              purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
+                console.log(response)
+                // this.tableData = response.records
+                this.isCountShow = false
+              })
+            }
+            break;
+        }
       },
       // 关闭
       closeCount() {
         this.isCountShow = true
-        // this.splitPriceList = []
-        // this.$router.push({
-        //   name: 'acquisitionManagement',
-        // })
+        this.splitPriceList = []
+        this.$router.push({
+          name: 'acquisitionManagement',
+        })
       },
       //处理价格表格数据
       makeTableList() {
@@ -721,6 +895,7 @@
       },
       // 构造查看粮价设置数据
       makeLookPriceList() {
+        debugger
         this.selectVal = this.baseInfoForm.goodsName
         let _priceList = this.baseInfoForm.details
         let _checkList = []
@@ -749,7 +924,7 @@
                 water: _detailList[k],
                 isWrite: false
               }
-            } else if (_detailList[k] == this.baseInfoForm.waterMax) {
+            } else if (_detailList[k] == this.baseInfoForm.waterBase) {
               _obj = {
                 type: 2,
                 name: "基准",
@@ -1057,4 +1232,19 @@
     font-weight: 500;
     color: #262626;
   }
+  .double {
+    background: #FEFBF6 !important;
+  }
+  .single {
+    background: #F7FBFF !important;
+  }
+  .bottom-btn{
+    display: flex;
+    .left{
+      color: red;
+    }
+    margin: 20px 0;
+        justify-content: space-around;
+        align-items: center;
+  }
 </style>

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

@@ -0,0 +1,159 @@
+<!--质检信息-->
+<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">收货单位</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.customerName }}</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 class="col col-bgc">单价(元/公斤)</td>
+        <td class="col">{{ printData.tidalGrainPrice }}</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 class="col col-bgc" colspan="2">购粮性质</td>
+        <td class="col" colspan="2">{{ printData.customerName }}</td>
+      </tr>
+    </table>
+    <div class="bottom">
+      <div class="bottom-row1">
+        <div>质检:{{ printData.qualityInspector }}</div>
+        <div>{{ printData.qualityDate }}</div>
+      </div>
+      <div class="bottom-row2">
+        <div class="left">
+          <img src="../../../../public/img/add.png" alt="" />
+        </div>
+        <div class="config">收货单位签名或盖章:</div>
+        <div class="">客户签名:</div>
+      </div>
+      <div class="bottom-row3">扫一扫</div>
+      <div class="bottom-row4">
+        <el-button type="primary">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    components: {},
+    props: {
+      printData: {
+        type: Object
+      }
+    },
+    data() {
+      return {
+
+      }
+    },
+    activated() {
+
+    },
+    methods: {
+    printSmall() {
+      window.location.href =
+        '../../../../static/inspection.html?type=1&dataList=' +
+        JSON.stringify(this.printData)
+    },
+    printBig() {
+      window.location.href =
+        '../../../../static/inspection.html?type=2&dataList=' +
+        JSON.stringify(this.printData)
+    },
+    },
+  }
+</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: 41px;
+        height: 41px;
+        margin-right: 118px;
+      }
+    }
+
+    .config {
+      margin-right: 240px;
+    }
+  }
+
+  .bottom-row3 {
+    margin: 10px 0;
+  }
+
+  .bottom-row4 {
+    margin-top: 50px;
+    text-align: center;
+  }
+</style>

+ 228 - 0
src/views/houseSelfCollect/component/paymentPrint.vue

@@ -0,0 +1,228 @@
+<template>
+  <div class="center">
+    <div class="header-top">
+      <div>单位:公斤、元</div>
+      <div>No.</div>
+    </div>
+    <div class="header-top">
+      <div>开票日期:{{printData.compName}}</div>
+      <div class="number">{{100000000000000}}</div>
+    </div>
+    <table class="table">
+      <tr class="row">
+        <td rowspan="4" class="col col-bgc">买方</td>
+        <td class="col col-bgc">单位名称</td>
+        <td class="col" colspan="3">{{ printData.compName}}</td>
+        <td rowspan="4" class="col col-bgc">买方</td>
+        <td class="col col-bgc">姓名</td>
+        <td class="col" colspan="3">{{ printData.customerName}}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">税务登记号</td>
+        <td class="col" colspan="3">{{ printData.taxRegistrationNo}}</td>
+        <td class="col col-bgc">身份证号</td>
+        <td class="col" colspan="3">{{ printData.customerNumberCard}}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">化验单号</td>
+        <td class="col" colspan="3">{{ printData.paymentNo}}</td>
+        <td class="col col-bgc">卡号</td>
+        <td class="col" colspan="3">{{ printData. bankCard}}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">收货仓库</td>
+        <td class="col" colspan="3">{{printData.warehouseName}}</td>
+        <td class="col col-bgc">地址</td>
+        <td class="col" colspan="3">{{printData.compAddress}}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">货名</td>
+        <td class="col col-bgc">类型</td>
+        <td class="col col-bgc">等级</td>
+        <td class="col col-bgc">水分%</td>
+        <td class="col col-bgc">杂质%</td>
+        <td class="col col-bgc">毛重</td>
+        <td class="col col-bgc">皮重</td>
+        <td class="col col-bgc">扣杂重</td>
+        <td class="col col-bgc">净重</td>
+        <td class="col col-bgc">纯重</td>
+      </tr>
+      <tr class="row">
+        <td class="col">{{ printData.goodsName}}</td>
+        <td class="col">{{ printData.type}}</td>
+        <td class="col">{{ printData.grade}}</td>
+        <td class="col">{{ printData.waterContent}}</td>
+        <td class="col">{{ printData.impurity}}</td>
+        <td class="col">{{ printData.grossWeight}}</td>
+        <td class="col">{{ printData.tare}}</td>
+        <td class="col">{{ printData.buckleMiscellaneous}}</td>
+        <td class="col">{{ printData.netWeight}}</td>
+        <td class="col">{{ printData.pureWeight}}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">净重单价</td>
+        <td class="col col-bgc">粮款</td>
+        <td class="col col-bgc">称重补助</td>
+        <td class="col col-bgc">运费补助</td>
+        <td class="col col-bgc">卸车补助</td>
+        <td class="col col-bgc">其他补助</td>
+        <td class="col col-bgc">称重扣款</td>
+        <td class="col col-bgc">运费扣款</td>
+        <td class="col col-bgc">卸车扣款</td>
+        <td class="col col-bgc">质量扣款</td>
+      </tr>
+      <tr class="row">
+        <td class="col ">{{ printData.tidalGrainPrice}}</td>
+        <td class="col ">{{ printData.grainMoney}}</td>
+        <td class="col ">{{ printData.weighingSubsidy}}</td>
+        <td class="col ">{{ printData.freightSubsidy}}</td>
+        <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.qualityDeduction}}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">其他扣款</td>
+        <td class="col col-bgc">纯重单价</td>
+        <td class="col col-bgc">合计应付</td>
+        <td class="col col-bgc">购粮性质</td>
+        <td class="col col-bgc">车牌号</td>
+        <td class="col col-bgc" colspan="5">记事</td>
+      </tr>
+      <tr class="row">
+        <td class="col ">{{ printData.otherDeduction}}</td>
+        <td class="col ">{{ printData.solidGrainPrice}}</td>
+        <td class="col ">{{ printData.calculationPayable}}</td>
+        <td class="col ">{{ printData.natureOfGrainPurchase}}</td>
+        <td class="col ">{{ printData.carNo}}</td>
+        <td class="col " colspan="5">{{ printData.remarks}}</td>
+      </tr>
+      <tr class="row">
+        <td class="col col-bgc">实付金额</td>
+        <td class="col " colspan="2">{{printData.actualPayment}}</td>
+        <td class="col col-bgc" colspan="3">人民币(大写)</td>
+        <td class="col " colspan="4">{{printData.capitalize}}</td>
+
+      </tr>
+    </table>
+
+    <div class="bottom">
+      <div class="bottom-row1">
+        <div>质检:{{ printData.qualityInspector}}</div>
+        <div>毛检:{{ printData.skinInspector}}</div>
+        <div>皮检:{{ printData.qualityInspector}}</div>
+        <div>结算:{{ printData.settlementClerk}}</div>
+        <div>付款:{{ printData.qualityInspector}}</div>
+        <div>复点:{{ printData.qualityInspector}}</div>
+      </div>
+      <div class="bottom-row2">
+        <div class="left">
+          <img src="../../../../public/img/add.png" alt="" />
+        </div>
+        <div class="config">收货单位签名或盖章</div>
+        <div class="">客户签名</div>
+      </div>
+      <div class="bottom-row3">扫一扫</div>
+      <div class="bottom-row4">
+        <el-button type="primary">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    components: {},
+    props: {
+      printData: {
+        type: Object
+      }
+    },
+    data() {
+      return {
+
+      }
+    },
+    activated() {
+
+    },
+    methods: {
+      printSmall() {
+        window.location.href =
+          '../../../../../static/payprint.html?type=1&dataList=' +
+          JSON.stringify(this.printData)
+      },
+      printBig() {debugger
+        window.location.href =
+          '../../../../../static/payprint.html?type=2&dataList=' +
+          JSON.stringify(this.printData)
+      },
+    },
+  }
+</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;
+    // background-color: red;
+  }
+
+  .bottom-row1 {
+    display: flex;
+    justify-content: space-between;
+    margin: 10px 0;
+  }
+
+  .bottom-row2 {
+    display: flex;
+    margin: 10px 0;
+
+    .left {
+      img {
+        width: 41px;
+        height: 41px;
+        margin-right: 118px;
+      }
+    }
+
+    .config {
+      margin-right: 240px;
+    }
+  }
+
+  .bottom-row3 {
+    margin: 10px 0;
+  }
+
+  .bottom-row4 {
+    margin-top: 50px;
+    text-align: center;
+  }
+  .header-top{
+    display: flex;
+    justify-content: space-between;
+  }
+</style>

+ 1 - 16
src/views/houseSelfCollect/component/routers/route.js

@@ -122,26 +122,11 @@ const houseSelfCollectRouter = {
       meta: {
         title: 'paymentManagement',
         shortcutEntrance: 'houseSelfCollect',
-        module: 'procurement.procurementOrder.delete',
+        module: 'acquisitionManagement.acquisitionPay',
         permissicon: [],
         keepAlive: true
       }
     },
-    //打印
-    {
-      path: 'houseSelfCollectPrint',
-      component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/houseSelfCollectPrint'),
-      name: 'houseSelfCollectPrint',
-      meta: {
-        title: 'houseSelfCollectPrint',
-        shortcutEntrance: 'houseSelfCollectPrint',
-        module: 'procurement.procurementOrder.delete',
-        permissicon: [],
-        keepAlive: true
-      },
-      hidden: true
-    },
     {
       path: 'settlement',
       component: () =>

+ 181 - 0
src/views/houseSelfCollect/component/weightCheckPrint.vue

@@ -0,0 +1,181 @@
+<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">客户姓名</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">车牌号</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">质检{{tableData.qualityInspectionManagement.suqualityTestingDate}}</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.buckleMiscellaneous}}</td>
+            <td class="col col-bgc">净重(公斤)</td>
+            <td class="col">{{tableData.netWeight}}</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 " colspan="4"></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="../../../../public/img/add.png" alt="" />
+            </div>
+            <div class="config">收货单位签名或盖章:</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() {
+                  console.log(this.tableData,"对象")
+      window.location.href =
+        '../../../../static/weightCheck.html?type=1&tableData=' +
+        JSON.stringify(this.tableData)
+    },
+    printBig() {
+           console.log(this.tableData,"对象")
+      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: 41px;
+        height: 41px;
+        margin-right: 118px;
+      }
+    }
+
+    .config {
+        margin-top: 20px;
+      margin-right: 240px;
+    }
+    .autograph{
+        margin-top: 20px;
+    }
+  }
+
+  .bottom-row3 {
+    margin: 10px 0;
+  }
+
+  .bottom-row4 {
+    margin-top: 50px;
+    text-align: center;
+  }
+</style> 

+ 29 - 22
src/views/houseSelfCollect/customerManagementAdd.vue

@@ -308,6 +308,7 @@ import {
   getCustomerLook,
   CustomerEdit,
   getIdentity,
+  getBank
 } from '@/model/houseSelfCollect/index'
 
 export default {
@@ -322,7 +323,6 @@ export default {
         customerNumberCard:"",
         bankCard:"",
         bankDeposit:"",
-
       },
       disabledFlag: true,
       disabled: false,
@@ -371,7 +371,6 @@ export default {
       this.trader = '编辑'
       this.getList(id)
     }
-    console.log(this.switchType)
   },
   methods: {
     handleRemove(file, index) {
@@ -387,14 +386,12 @@ export default {
             this.identity.splice(i, 1, '')
           }
         }
-        console.log(this.identity)
       } else if (this.switchType == 1) {
         for (let i = 0; i < this.identity.length; i++) {
           if (file.response.url == this.identity[i]) {
             this.identity.splice(i, 1, '')
           }
         }
-        console.log(this.identity)
       }
     },
     handleRemove1(file, index) {
@@ -416,8 +413,6 @@ export default {
           }
         }
       }
-
-      console.log(this.bank)
     },
     handlePictureCardPreview(file) {
       this.dialogImageUrl = file.url
@@ -475,7 +470,6 @@ export default {
           }
           if(response.recPersonNo != ""){
              this.customerList.customerNumberCard = response.recPersonNo
-
           }
         })
     },
@@ -493,15 +487,34 @@ export default {
 
           }
         })
-
     },
     bankSuccess1(e) {
       this.bankUps = 'bankUp'
       this.bank[0] = e.url
+        getBank({bankImg:e.url})
+        .toPromise()
+        .then((response) => {
+          if(response.bankNo  ){
+             this.customerList.bankCard = response.bankNo
+          }
+          if(response.bankName ){
+             this.customerList.bankDeposit = response.bankName
+          }
+        })
     },
     bankSuccess2(e) {
       this.bankLows = 'bankLow'
       this.bank[1] = e.url
+       getBank({bankImg:e.url})
+        .toPromise()
+        .then((response) => {
+          if(response.bankNo  ){
+             this.customerList.bankCard = response.bankNo
+          }
+          if(response.bankName ){
+             this.customerList.bankDeposit = response.bankName
+          }
+        })
     },
     commit() {
       this.customerList.compId = sessionStorage.getItem('ws-pf_compId')
@@ -516,22 +529,17 @@ export default {
           type: 'warning',
         })
           .then(() => {
-            // this.customerList.compId = sessionStorage.getItem('ws-pf_compId')
-            // this.customerList.cardAddressUrl = this.identity.toString()
-            // this.customerList.payeeAddressUrl = this.bank.toString()
-            // this.customerList.customerTypeFlag = 1
-            // this.customerList.customerType = '个人'
             customerAdd(this.customerList)
               .toPromise()
               .then((response) => {
-                this.customerList.id = response
-                customerIdentity(this.customerList)
-                  .toPromise()
-                  .then((response) => {
-                    console.log(response.code)
-                    this.$message.success('添加成功')
-                    this.$router.push({ path: 'customerManagement' })
-                  })
+                // this.customerList.id = response
+                // customerIdentity(this.customerList)
+                //   .toPromise()
+                //   .then((response) => {
+                //     this.$message.success('添加成功')
+                //     this.$router.push({ path: 'customerManagement' })
+                //   })
+                this.$router.go(-1)
               })
           })
           .catch(() => {
@@ -557,7 +565,6 @@ export default {
       }
     },
     getList(ids) {
-      authenticationStatusKey==7
       getCustomerLook({ id: ids,authenticationStatusKey: 7 })
         .toPromise()
         .then((response) => {

+ 0 - 52
src/views/houseSelfCollect/houseSelfCollectPrint.vue

@@ -1,52 +0,0 @@
-<!--打印-->
-<template>
-  <div id="print" class="center">
-    <div class="title">{{ name }}</div>
-    <div @click="print">打印</div>
-  </div>
-</template>
-<script>
-import // getList,
-'@/model/houseSelfCollect/index'
-
-export default {
-  components: {},
-  watch: {},
-  data() {
-    return {
-      tableData: {},
-      name: '',
-    }
-  },
-  activated() {},
-  created() {
-    // this.$route.query.type
-    this.name = this.$route.query.name
-  },
-  methods: {
-    print() {
-      let newstr = document.getElementById('print').innerHTML
-      let oldstr = document.body.innerHTML
-      document.body.innerHTML = newstr
-      window.print()
-      document.body.innerHTML = oldstr
-    },
-  },
-}
-</script>
-<style lang="scss" scoped>
-.center {
-  width: 90%;
-  border: 1px solid #d8dce6;
-  margin: 10px auto;
-}
-.title {
-  width: 325px;
-  font-size: 20px;
-  margin: 10px auto;
-  text-align: center;
-  color: #323233;
-  font-weight: 600;
-  border-bottom-style: double;
-}
-</style>

+ 273 - 41
src/views/houseSelfCollect/inspectInfo.vue

@@ -22,6 +22,15 @@
         <div style="width: 50%; margin: 0 auto">
           <div class="title">基本信息</div>
           <ws-info-table>
+            <ws-form-item label="仓库" span="1" prop="warehouseName">
+              <ws-input
+                v-model="warehouseName"
+                placeholder="请输入仓库"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
             <ws-form-item label="编号" span="1" prop="qualityNo">
               <ws-input
                 v-model="inspect.qualityNo"
@@ -48,10 +57,11 @@
             </ws-form-item>
             <ws-form-item label="客户" span="1" prop="customerName">
               <ws-select
+                v-model="inspect.customerName"
                 placeholder=""
                 class="typeselect"
                 @change="customerChange"
-                :disabled="disabled"
+                :disabled="disabled1"
               >
                 <ws-option
                   v-for="item in customerList"
@@ -84,12 +94,12 @@
                 v-model="inspect.goodsName"
                 placeholder=""
                 class="typeselect"
-                :disabled="disabled"
+                :disabled="disabled1"
                 @change="waterContentChange"
               >
                 <ws-option
-                  v-for="item in goodnameList"
-                  :key="item.goodsNameKey"
+                  v-for="item in goodNameList"
+                  :key="item.goodsName"
                   :label="item.goodsName"
                   :value="item.goodsName"
                 />
@@ -237,7 +247,15 @@
         </div>
       </ws-form>
     </div>
-    <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint>
+    <el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="粮食质检单"
+    >
+      <inspectInfoPrint :printData="inspect"></inspectInfoPrint>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -250,24 +268,28 @@ import {
   getinspectLookGoods,
   getinspectEdit,
   getamount,
+  getCount,
 } from '@/model/houseSelfCollect/index'
 import { packList } from '@/model/contarct/index'
-import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
+import inspectInfoPrint from './component/inspectInfoPrint.vue'
 export default {
   components: {
-    houseSelfCollectPrint,
+    inspectInfoPrint,
   },
   watch: {},
   data() {
     return {
+      isShowPrint: false,
       // warehouseList: {},
       inspect: {
         tidalGrainPrice: 0,
+        buckleWeightRatio: 0,
       },
       disabled: false,
+      disabled1: false,
       types: '1',
       information: '添加',
-      goodnameList: [],
+      goodNameList: [],
       gradeList: [],
       customerList: [],
       getbinNumberList: [],
@@ -277,8 +299,8 @@ export default {
       count: 0,
       cangNo: '',
       typeList: ['干粮', '潮粮'],
-      purchasePriceList:[],
-      id:"",
+      purchasePriceList: [],
+      id: '',
     }
   },
   activated() {
@@ -291,9 +313,11 @@ export default {
     this.id = this.$route.query.id
     if (this.types == 2) {
       this.disabled = true
+      this.disabled1 = true
       this.information = '查看'
     } else if (this.types == 3) {
       this.disabled = false
+      this.disabled1 = true
       this.information = '编辑'
     }
     this.calculation()
@@ -320,9 +344,213 @@ export default {
       // + this.verifyinit()
     },
     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.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.$message({
+      //     message: '车牌号输入错误',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (!this.inspect.goodsName) {
+      //   this.$message({
+      //     message: '货名不能为空',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // 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.type) {
+      //   this.$message({
+      //     message: '类型不能为空',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (!this.inspect.natureOfGrainPurchase) {
+      //   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 (!this.inspect.waterContent) {
+      //   this.$message({
+      //     message: '水分不能为空',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (!this.inspect.mildewGrain) {
+      //   this.$message({
+      //     message: '霉变粒不能为空',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (!this.inspect.bulkDensity) {
+      //   this.$message({
+      //     message: '容重不能为空',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (!this.inspect.jiaorenli) {
+      //   this.$message({
+      //     message: '热损伤不能为空',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (!this.inspect.imperfectGrain) {
+      //   this.$message({
+      //     message: '不完整粒不能为空',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // //查看当前用户对应货名有未结算状态的送货
+      // let count = 0
+      // getCount({
+      //   compId: sessionStorage.getItem('ws-pf_compId'),
+      //   customerName: this.inspect.customerName,
+      //   goodsName: this.inspect.goodsName,
+      // })  .toPromise()
+      //   .then((response) => {
+      //        count = response
+      //   })
+      // //  客户下拉校验
+      // getamount({
+      //   compId: sessionStorage.getItem('ws-pf_compId'),
+      //   customerName: this.inspect.customerName,
+      //   goodsName: this.inspect.goodsName,
+      // })
+      //   .toPromise()
+      //   .then((response) => {
+      //     for (let i = 0; i < this.purchasePriceList.length; i++) {
+      //       if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+      //         console.log(this.purchasePriceList[i].saleLimit - response)
+      //         if (this.purchasePriceList[i].saleLimit - response < 50 || count > 0) {
+      //           // this.$confirm(
+      //           //   '当前客户已累计销售我司' +
+      //           //     this.inspect.goodsName +
+      //           //     response +
+      //           //     '吨,最高可售' +
+      //           //     this.purchasePriceList[i].saleLimit +
+      //           //     '吨。',
+      //           //   '提示',
+      //           //   {
+      //           //     cancelButtonText: '取消',
+      //           //     type: 'warning',
+      //           //   }
+      //           // )
+      //           //   .then(() => {})
+      //           //   .catch(() => {
+      //           //     return false
+      //           //   })
+      //             this.$alert('当前客户已累计销售我司' +this.inspect.goodsName + response +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。',
+      //                   '提示',
+      //                   {
+      //                     confirmButtonText: '确定',
+      //                     callback: (action) => {
+      //                       // this.$message({
+      //                       //   type: 'info',
+      //                       //   message: `累计售粮已超出上限`,
+      //                       // })
+      //                     },
+      //                   }
+      //                 )
+      //         }
+      //       }
+      //     }
+      //   })
       this.inspect.warehouseName = this.warehouseName
       this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
-      this.qualityInspector = sessionStorage.getItem('ws-pf_staffName')
+      this.inspect.qualityInspector = sessionStorage.getItem('ws-pf_staffName')
       if (this.types == null) {
         this.$confirm('确定保存质检信息?', '提示', {
           confirmButtonText: '确定',
@@ -334,7 +562,14 @@ export default {
               .toPromise()
               .then((response) => {
                 this.$message.success('保存成功')
-                this.$router.push({ path: 'paymentManagement' })
+                 getinspectLook({ id: response })
+                  .toPromise()
+                  .then((response) => {
+                    this.inspect = response
+                  })
+                this.isShowPrint = true
+                //打印
+                // this.$router.go(-1)
               })
           })
           .catch(() => {
@@ -352,14 +587,12 @@ export default {
               .toPromise()
               .then((response) => {
                 this.$message.success('修改成功')
-                // this.xx = true;
-                // let newstr = document.getElementById('print').innerHTML
-                // let oldstr = document.body.innerHTML
-                // document.body.innerHTML = newstr
-                // window.print()
-                // document.body.innerHTML = oldstr
-                // window.location.reload()
-                this.$router.push({ path: 'paymentManagement' })
+                getinspectLook({ id: this.inspect.id })
+                  .toPromise()
+                  .then((response) => {
+                    this.inspect = response
+                  })
+                this.isShowPrint = true
               })
           })
           .catch(() => {
@@ -374,31 +607,22 @@ export default {
       let customers = e.split('(')
       this.inspect.customerName = customers[0]
       this.inspect.customerPhone = customers[1].split(')')[0]
-      //客户下拉校验
-      // getamount({
-      //   compId: sessionStorage.getItem('ws-pf_compId'),
-      //   customerName: this.inspect.customerPhone,
-      //   goodsName: this.inspect.goodsName,
-      // })
-      //   .toPromise()
-      //   .then((response) => {
-      //     console.log(response)
-      //   })
     },
 
     waterContentChange() {
-      if(this.inspect.goodsName){
-        for(var i=0;i<this.purchasePriceList.length;i++){
-          if(this.purchasePriceList[i].goodsName == this.inspect.goodsName){
-            this.inspect.buckleWeightRatio = this.purchasePriceList[i].deductWeight
+      if (this.inspect.goodsName) {
+        for (var i = 0; i < this.purchasePriceList.length; i++) {
+          if (this.purchasePriceList[i].goodsName == this.inspect.goodsName) {
+            this.inspect.buckleWeightRatio =
+              this.purchasePriceList[i].deductWeight
           }
         }
       }
       //潮粮单价改变事件
       if (
-        this.inspect.goodsName  &&
-        this.inspect.waterContent  &&
-        this.inspect.grade 
+        this.inspect.goodsName &&
+        this.inspect.waterContent &&
+        this.inspect.grade
       ) {
         getinspectLookUnitPrice({
           warehouseId: this.cangid,
@@ -413,14 +637,14 @@ export default {
           })
       }
     },
-   
+
     getList(ids) {
       // 货名
       getinspectLookGoods({ warehouseId: this.cangid })
         .toPromise()
         .then((response) => {
-          this.goodnameList = []
-          this.goodnameList = response
+          this.goodNameList = []
+          this.goodNameList = response
         })
       // 品级
       packList({ constId: 'CON3' })
@@ -432,7 +656,6 @@ export default {
       getcustomer({ compId: sessionStorage.getItem('ws-pf_compId') })
         .toPromise()
         .then((response) => {
-          // this.gradeList = response
           this.customerList = []
           let customer = response
           for (let i = 0; i < response.length; i++) {
@@ -468,6 +691,15 @@ export default {
 }
 </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;
 }

+ 4 - 136
src/views/houseSelfCollect/inspectionManagement.vue

@@ -66,6 +66,7 @@
       <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="tidalGrainPrice"
         label="净重单价(元/公斤)"
@@ -91,72 +92,7 @@
       :visible.sync="isShowPrint"
       title="粮食质检单"
     >
-      <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">收货单位</td>
-          <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
-          <td class="col col-bgc">联系人</td>
-          <td class="col" colspan="2">{{ printData.contacts }}</td>
-          <td class="col col-bgc">联系电话</td>
-          <td class="col">{{ printData.contactsPhone }}</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.customerName }}</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 class="col col-bgc">单价(元/公斤)</td>
-          <td class="col">{{ printData.tidalGrainPrice }}</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 class="col col-bgc" colspan="2">购粮性质</td>
-          <td class="col" colspan="2">{{ printData.customerName }}</td>
-        </tr>
-      </table>
-      <div class="bottom">
-        <div class="bottom-row1">
-          <div>质检:{{ printData.qualityInspector }}</div>
-          <div>{{ printData.qualityDate }}</div>
-        </div>
-        <div class="bottom-row2">
-          <div class="left">
-            <img src="../../../public/img/add.png" alt="" />
-          </div>
-          <div class="config">收货单位签名或盖章</div>
-          <div class="">客户签名</div>
-        </div>
-        <div class="bottom-row3">扫一扫</div>
-        <div class="bottom-row4">
-          <el-button type="primary">关闭</el-button>
-          <el-button type="primary" @click="printSmall">打印小票</el-button>
-          <el-button type="primary" @click="printBig">打印单据</el-button>
-        </div>
-      </div>
+    <inspectInfoPrint :printData="printData"></inspectInfoPrint>
     </el-dialog>
     <div style="text-align: center">
       <el-pagination
@@ -178,9 +114,9 @@ import {
   getinspectDelete,
   getinspectLook,
 } from '@/model/houseSelfCollect/index'
-
+import inspectInfoPrint from './component/inspectInfoPrint.vue'
 export default {
-  components: {},
+  components: {inspectInfoPrint},
   watch: {},
   data() {
     return {
@@ -338,16 +274,6 @@ export default {
           // window.location.href="../../../static/inspection.html?dataList="+JSON.stringify(response)
         })
     },
-    printSmall() {
-      window.location.href =
-        '../../../static/inspection.html?type=1&dataList=' +
-        JSON.stringify(this.printData)
-    },
-    printBig() {
-      window.location.href =
-        '../../../static/inspection.html?type=2&dataList=' +
-        JSON.stringify(this.printData)
-    },
   },
 }
 </script>
@@ -362,22 +288,6 @@ export default {
   font-size: 24px !important;
 }
 
-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;
-}
-
 .title {
   font-size: 20px;
   font-weight: 600;
@@ -418,48 +328,6 @@ table {
 /deep/.el-table--enable-row-transition .el-table__body td {
   text-align: center;
 }
-
-.number {
-  text-align: right;
-  margin: 0 0 10px 0;
-}
-
-.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: 41px;
-      height: 41px;
-      margin-right: 118px;
-    }
-  }
-
-  .config {
-    margin-right: 240px;
-  }
-}
-
-.bottom-row3 {
-  margin: 10px 0;
-}
-
-.bottom-row4 {
-  margin-top: 50px;
-  text-align: center;
-}
-
 /deep/.el-dialog__body {
   padding: 20px !important;
 }

+ 192 - 60
src/views/houseSelfCollect/paymentManagement.vue

@@ -9,23 +9,12 @@
         <ws-button type="primary" @click="reject">驳回</ws-button>
         <ws-button type="primary" @click="adopt">通过</ws-button>
         <ws-button type="primary" @click="payment">付款</ws-button>
-        <ws-button type="primary" @click="examine">审核</ws-button>
       </template>
       <template slot="right">
-        <ws-select
-          v-model="searchTypeText"
-          placeholder=""
-          @change="selecttaskType"
-          :value="searchType"
-        >
-          <ws-option
-            v-for="item in taskTypeList"
-            :key="item.value"
-            :label="item.value"
-            :value="item.value"
-            style="color: #8890b1"
-          />
-        </ws-select>
+        <el-select v-model="warehouseNameKey" placeholder="请选择" @change="warehouseChange">
+          <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
+          </el-option>
+          </el-select>
         <div></div>
         <ws-input
           v-model="searchKeyWord"
@@ -51,11 +40,11 @@
       </template>
     </BaseHeaderLayout>
     <el-table
-      :data="warehouseList"
+      :data="paymentList.records"
       style="width: 100%; margin-top: 20px"
-      ref="warehouseList"
+      ref="paymentList"
       border
-      height="780"
+      height="680"
       @selection-change="handleSelectionChange"
     >
       <el-table-column
@@ -71,58 +60,63 @@
       </el-table-column>
       <el-table-column
         class="table_td"
-        prop="contractNo"
+        prop="paymentNo"
         width="120"
         label="编号"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="closePositionDate"
+        prop="customerName"
         label="客户"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="closingQuantity"
+        prop="carNo"
         label="车牌号"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="transactionPrice"
+        prop="goodsName"
         label="货名"
       ></el-table-column>
       <el-table-column
         class="table_td"
+        width='180'
         prop="type"
         label="类型"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="closeRate"
+        prop="tidalGrainPrice"
+         width='180'
         label="净重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="basisPrice"
+        prop="solidGrainPrice"
+        width='180'
         label="纯重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="amountIngPayable"
+        prop="netWeight"
+        width='140'
         label="净重(公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="amountEdPayable"
+        prop="pureWeight"
+        width='140'
         label="纯重(公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="amountNotPayable"
+        prop="amountIngPayable"
         label="应付款(元)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="paymentDate"
+        prop="amountEdPayable"
         label="已付款(元)"
       ></el-table-column>
       <el-table-column
@@ -132,19 +126,26 @@
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="collectionEdPayable"
+        prop="status"
         label="状态"
-      ></el-table-column>
+      >
+      <template scope="scope">
+        <span v-if='scope.row.approveStatus'>{{scope.row.approveStatus}}</span>
+        <span v-else>{{scope.row.status}}</span>
+      </template>
+      </el-table-column>
       <el-table-column
         class="table_td"
         prop="collectionEdPayable"
         label="操作"
         width="350"
       >
-        <el-button @click="del">删除</el-button>
-        <el-button @click="settlement(1)">结算</el-button>
-        <el-button @click="settlement(2)">查看</el-button>
-        <el-button>打印</el-button>
+      <template scope="scope">
+        <el-button type="danger" v-if='!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="del(scope.row)">删除</el-button>
+        <el-button v-if='!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="settlement(1,scope.row)">结算</el-button>
+        <el-button v-if='scope.row.approveStatus||scope.row.status=="已驳回"' @click="settlement(2,scope.row)">查看</el-button>
+        <el-button v-if='scope.row.approveStatus||scope.row.status=="已驳回"' @click='print(scope.row)'>打印</el-button>
+      </template>
       </el-table-column>
     </el-table>
     <!-- 付款弹窗 -->
@@ -176,7 +177,6 @@
         </div>
       </ws-form>
     </el-dialog>
-    <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
     <div style="text-align:center">
     <el-pagination
       @size-change="handleSizeChange"
@@ -187,42 +187,77 @@
       :total="deptBudgetTotal"
     >
     </el-pagination>
+    <el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="中天昊元粮食贸易有限公司结算凭证"
+    >
+      <paymentPrint :printData="printData"></paymentPrint>
+    </el-dialog>
     </div>
   </div>
 </template>
 <script>
-import {} from '@/model/houseSelfCollect/index'
-import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
-
+import {getpayment,selectWarehouseSelf,delpayment,auditpayment,getpaymentexamine} from '@/model/houseSelfCollect/index'
+import { posthandle } from '@/model/purchasingManagement/index'
+import paymentPrint from './component/paymentPrint.vue'
 export default {
-  components: {
-    houseSelfCollectPrint,
-  },
+  components: {paymentPrint},
   watch: {},
   data() {
     return {
       //分页
       currentPage: 1,
       pageSize: 10,
+      paymentList:[],
       deptCircularPage:{},
       deptBudgetTotal: 0,
-      warehouseList: [
-        {
-          collectionEdPayable: '快付款',
-        },
-      ],
       paymentForm: false,
       taskTypeList: ['一号库'],
       searchType: '',
       searchTypeText: '',
       searchKeyWord: '',
+      warehouseList:[],
+      warehouseNameKey:'',
+      warehouseName:'',
+      isShowPrint: false,
+      printData:{},
+      warehouse:[],
       value1: '', //付款日期
       modification: [],
     }
   },
-  activated() {},
+  activated() {
+     selectWarehouseSelf({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        personCharge: sessionStorage.getItem('ws-pf_staffName'),
+      }).toPromise().then((response) => {
+          this.warehouseList = response
+          // this.$set(this.warehouseName,response[0].warehouseName)
+          // this.warehouseName=response[0].warehouseName
+          // this.warehouse=response[0]
+          this.warehouseList = response
+          this.warehouseNameKey = this.warehouseList[0].id
+          this.warehouseName = this.warehouseList[0].warehouseName
+          this.getList()
+        })
+
+  },
   methods: {
-    del() {
+   getList(){
+     getpayment({
+       currentPage:this.currentPage,
+       pageSize:this.pageSize,
+       searchKeyWord:this.searchKeyWord,
+       searchType:this.searchType,
+       warehouseName:this.warehouseName
+      }).toPromise().then((response) => {
+          this.paymentList = response
+        })
+   },
+    del(row) {
       this.$confirm(
         '对应的质检和检斤记录将一并删除,是否确定删除操作?',
         '提示',
@@ -232,13 +267,31 @@ export default {
           type: 'warning',
         }
       )
-        .then(() => {})
+        .then(() => {
+          delpayment({id:row.id}).toPromise().then((response) => {
+         this.$message.success('删除成功')
+         this.getList()
+        })
+        })
         .catch(() => {
           return false
         })
     },
-    settlement(index) {
-      this.$router.push({ path: 'settlement', query: { type: index } })
+    settlement(index,row) {
+      var data={}
+      var data1={}
+      for (let i = 0; i < this.warehouseList.length; i++) {
+        if(this.warehouseList[i].id==this.warehouseNameKey){
+          data=this.warehouseList[i]
+        }
+      }
+      for (let i = 0; i < data.purchasePriceList.length; i++) {
+        if(data.purchasePriceList[i].goodsName==row.goodsName){
+          data1=data.purchasePriceList[i]
+        }
+      }
+      if(row.goodsName)
+      this.$router.push({ path: 'settlement', query: { type: index,id: row.id,waterMin:data1.waterMin} })
     },
     payment() {
       if (this.modification.length == 0) {
@@ -262,23 +315,61 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要驳回的条目')
       } else {
-        this.$confirm('驳回后任务将退回到统计,是否确定驳回?', '提示', {
+        this.$confirm('是否确定驳回?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning',
         })
-          .then(() => {})
+          .then(() => {
+            this.audit(this.modification[0], 0,false,'','')
+          })
           .catch(() => {
             return false
           })
       }
     },
+    audit(item, index, status, status2, reason) {
+      if (index < this.modification.length) {
+        if(status==true&&item.status=='已驳回'){
+          console.log(11111)
+          auditpayment({compId:sessionStorage.getItem('ws-pf_compId'),id:item.id}).toPromise()
+          .then((response) => {
+            console.log(22222)
+            this.audit(this.modification[index + 1], index + 1, status,status2,reason)
+          })
+        }else{
+        posthandle({
+          taskId: item.taskId,
+          approved: status,
+          auditMind: reason != undefined ? '已驳回' : '34',
+          needReapply: status2 != undefined ? true : false,
+        })
+          .toPromise()
+          .then((response) => {
+            this.audit(this.modification[index + 1], index + 1, status,status2,reason)
+          })
+          .catch((req) => {
+            this.$message.warning(req.message)
+          })
+        }
+
+      } else {
+        if (status==true) {
+          this.$message.success('通过成功')
+          this.getList()
+        } else if (status==false) {
+          this.$message.success('驳回成功')
+          this.getList()
+          }
+      }
+    },
     adopt() {
+      var that =this
       if (this.modification.length == 0) {
         this.$message.warning('请选择要通过的条目')
       } else {
         this.$confirm(
-          '审核通过后,任务将发送给决策人,是否确定通过?',
+          '是否确定通过?',
           '提示',
           {
             confirmButtonText: '确定',
@@ -286,12 +377,24 @@ export default {
             type: 'warning',
           }
         )
-          .then(() => {})
+          .then(() => {
+            this.audit(this.modification[0], 0, true)
+          })
           .catch(() => {
             return false
           })
       }
     },
+    print(row) {
+      getpaymentexamine({id:row.id}).toPromise().then((response) => {
+          this.isShowPrint = true
+          this.printData =response
+          console.log("printData",response)
+        })
+
+      // 打印价格对照表
+        // window.location.href="../../../static/payprint.html?data="+JSON.stringify(row)
+      },
     examine() {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要审核的条目')
@@ -319,16 +422,18 @@ export default {
     // },
     selectInit(row) {
       //在这里一定要记得类型匹配的上。
-      if (row.approveStatus == null) {
-        return true
-      } else if (row.approveStatus != null) {
+      if(row.status!='已驳回'){
         if (row.taskId == null) {
           return false
         } else {
           return true
         }
+      }else{
+        return true
       }
+
     },
+
     handleSelectionChange(val) {
       this.modification = val
     },
@@ -345,7 +450,14 @@ export default {
     //     }
     //   }
     // },
-    selecttaskType() {},
+    warehouseChange(e) {
+      for (let i = 0; i < this.warehouseList.length; i++) {
+        if(this.warehouseList[i].id==this.warehouseNameKey){
+          this.warehouseName=this.warehouseList[i].warehouseName
+        }
+      }
+      this.getList()
+    },
      handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       this.pageSize = val
@@ -380,6 +492,21 @@ export default {
   font-size: 16px;
   font-weight: 600;
 }
+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;
+}
 .formItem {
   width: 70% !important;
 }
@@ -390,5 +517,10 @@ export default {
 /deep/.el-table--enable-row-transition .el-table__body td {
   text-align: center;
 }
-</style>
+.title{
+  padding:10px;
+  text-align:center;
+}
+
 
+</style>

+ 240 - 57
src/views/houseSelfCollect/settlement.vue

@@ -26,8 +26,9 @@
         <div style="width: 50%; margin: 0 auto">
           <div class="title">基本信息</div>
           <ws-info-table>
-            <ws-form-item label="编号" span="1" prop="waterContent">
+            <ws-form-item label="编号" span="1" prop="paymentNo">
               <ws-input
+              v-model="paymentList.paymentNo"
                 placeholder="请输入编号"
                 maxlength="100"
                 disabled
@@ -36,46 +37,49 @@
             </ws-form-item>
             <ws-form-item label="仓位号" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.binNumber"
                 placeholder="请输入仓位号"
                 maxlength="100"
+                disabled
                 size="small"
-              disabled
               />
             </ws-form-item>
             <ws-form-item label="客户" span="1" prop="waterContent">
-              <ws-select
-                v-model="warehouseList.a"
-                placeholder="请输入货名"
-                class="typeselect"
-                @change="selectpackingMethod"
-               disabled
-              >
-                <ws-option
-                  v-for="item in goodnameList"
-                  :key="item.constKey"
-                  :label="item.constValue"
-                  :value="item.constValue"
-                />
-              </ws-select>
+               <ws-input
+              v-model="paymentList.customerName"
+                placeholder="请输入仓位号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
             </ws-form-item>
             <ws-form-item label="囤位号" span="1" prop="waterContent">
-              <ws-input placeholder="请输入客户" maxlength="100" size="small" disabled />
+              <ws-input  v-model="paymentList.storageNumber" placeholder="请输入囤位号" maxlength="100" size="small" disabled />
             </ws-form-item>
             <ws-form-item label="车牌号" span="1" prop="waterContent">
-              <ws-input placeholder="请输入客户" maxlength="100" size="small" disabled/>
+              <ws-input v-model="paymentList.carNumber" placeholder="请输入车牌号" maxlength="100" size="small" disabled />
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="waterContent">
-              <ws-input placeholder="请输入客户" maxlength="100" size="small" disabled/>
+                <ws-input v-model="paymentList.goodsName" placeholder="请输入货名" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item label="类型" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.type" placeholder="请输入类型" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item label="购粮性质" span="1" prop="waterContent">
+                <ws-input v-model="paymentList.natureOfGrainPurchase" placeholder="请输入购粮性质" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item v-if='paymentList.type=="干粮"' label="干粮单价" span="1" prop="waterContent">
+                <ws-input v-model="paymentList.solidGrainPrice" placeholder="请输入干粮单价" maxlength="100" size="small" :disabled='disabled' />
             </ws-form-item>
           </ws-info-table>
-
           <div class="title">质检数据</div>
           <ws-info-table>
             <ws-form-item label="等级" span="1" prop="waterContent">
-              <ws-input placeholder="请输入编号" maxlength="100" size="small" disabled/>
+              <ws-input v-model="paymentList.qualityInspectionManagement.grade" placeholder="请输入等级" maxlength="100" size="small" disabled />
             </ws-form-item>
             <ws-form-item label="杂质(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.impurity"
                 placeholder="请输入杂质占比"
                 maxlength="100"
                 size="small"
@@ -84,6 +88,7 @@
             </ws-form-item>
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.waterContent"
                 placeholder="请输入水分占比"
                 maxlength="100"
                 size="small"
@@ -92,17 +97,19 @@
             </ws-form-item>
             <ws-form-item label="霉变粒(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.mildewGrain"
                 placeholder="请输入霉变粒占比"
                 maxlength="100"
                 size="small"
-                disabled
+               disabled
               />
             </ws-form-item>
             <ws-form-item label="容重(克/升)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入容重" maxlength="100" size="small" disabled/>
+              <ws-input v-model="paymentList.qualityInspectionManagement.bulkDensity" placeholder="请输入容重" maxlength="100" size="small" disabled />
             </ws-form-item>
             <ws-form-item label="热损伤(%)" span="1" prop="waterContent">
               <ws-input
+               v-model="paymentList.qualityInspectionManagement.jiaorenli"
                 placeholder="请输入热损伤占比"
                 maxlength="100"
                 size="small"
@@ -111,6 +118,7 @@
             </ws-form-item>
             <ws-form-item label="不完整粒(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.imperfectGrain"
                 placeholder="请输入不完整粒占比"
                 maxlength="100"
                 size="small"
@@ -119,94 +127,110 @@
             </ws-form-item>
           </ws-info-table>
 
-          <div class="title">单价核算</div>
-          <ws-info-table>
+          <div v-if='paymentList.type=="潮粮"' class="title">单价核算</div>
+          <ws-info-table v-if='paymentList.type=="潮粮"'>
             <ws-form-item label="潮粮水分(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.waterContent"
                 placeholder="请输入潮粮水分"
                 maxlength="100"
                 size="small"
                 disabled
               />
             </ws-form-item>
-            <ws-form-item label="扣重比" span="1" prop="waterContent">
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣重比" span="1" prop="waterContent">
               <ws-input
+              @input='buckleWeightRatiochange'
+              v-model="paymentList.buckleWeightRatio"
                 placeholder="请输入扣重比"
                 maxlength="100"
                 size="small"
-                :disabled = "disabled"
+                :disabled='disabled'
               />
             </ws-form-item>
-            <ws-form-item label="干粮水分(%)" span="1" prop="waterContent">
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="干粮水分(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.waterMin"
                 placeholder="请输入干粮水分"
                 maxlength="100"
                 size="small"
                 disabled
               />
             </ws-form-item>
-            <ws-form-item label="扣重" span="1" prop="waterContent">
-              <ws-input placeholder="请输入扣重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣重" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.qualityInspectionManagement.weightDeduction" placeholder="请输入扣重" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="掉水(%)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入掉水" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="掉水(%)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.qualityInspectionManagement.waterContent-paymentList.qualityInspectionManagement.waterMin" placeholder="请输入掉水" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="基数" span="1" prop="waterContent">
-              <ws-input placeholder="请输入基数" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="基数" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.base" placeholder="请输入基数" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="毛重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入毛重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="毛重(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.weighingManagement.grossWeight" placeholder="请输入毛重" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="纯重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入纯重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="纯重(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.pureWeight" placeholder="请输入纯重" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="皮重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入皮重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="皮重(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.weighingManagement.tare" placeholder="请输入皮重" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item
+            <ws-form-item v-if='paymentList.type=="潮粮"'
               label="净重单价(元/公斤)"
               span="1"
               prop="waterContent"
             >
               <ws-input
+               v-model="paymentList.qualityInspectionManagement.tidalGrainPrice"
                 placeholder="请输入净重单价"
                 maxlength="100"
                 size="small"
               disabled
               />
             </ws-form-item>
-            <ws-form-item label="扣杂(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入扣杂" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣杂(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.weighingManagement.buckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item
+            <ws-form-item v-if='paymentList.type=="潮粮"'
               label="纯重单价(元/公斤)"
               span="1"
               prop="waterContent"
             >
               <ws-input
+               v-model="paymentList.solidGrainPrice"
                 placeholder="请输入纯重单价"
                 maxlength="100"
                 size="small"
                 disabled
               />
             </ws-form-item>
-            <ws-form-item label="净重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入净重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="净重(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.weighingManagement.netWeight" placeholder="请输入净重" maxlength="100" size="small" disabled/>
             </ws-form-item>
           </ws-info-table>
 
-          <div class="title">算金额(元)</div>
+          <div class="title">算金额(元)</div>
           <ws-info-table>
-            <ws-form-item
+            <ws-form-item v-if='paymentList.type=="潮粮"'
               label="粮款 = 净重 x 净重单价 ="
               span="1"
               prop="waterContent"
               class="formItem"
             >
-              <ws-input placeholder="请输入粮款" maxlength="100" size="small" disabled/>
+              <ws-input @input='grainMoney' v-model="paymentList.grainMoney" placeholder="请输入粮款" maxlength="100" size="small" :disabled='disabled'/>
+            </ws-form-item>
+            <ws-form-item v-if='paymentList.type=="干粮"'
+              label="粮款 = 净重 x  干粮单价 ="
+              span="1"
+              prop="waterContent"
+              class="formItem"
+            >
+              <ws-input @input='grainMoney' v-model="paymentList.grainMoney" placeholder="请输入粮款" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="称重补助" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+               v-model="paymentList.weighingSubsidy"
                 placeholder="请输入称重补助"
                 maxlength="100"
                 size="small"
@@ -215,6 +239,8 @@
             </ws-form-item>
             <ws-form-item label="称重扣款" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.weighingDeduction"
                 placeholder="请输入称重扣款"
                 maxlength="100"
                 size="small"
@@ -223,6 +249,8 @@
             </ws-form-item>
             <ws-form-item label="运费补助" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.freightSubsidy"
                 placeholder="请输入运费补助"
                 maxlength="100"
                 :disabled="disabled"
@@ -231,6 +259,8 @@
             </ws-form-item>
             <ws-form-item label="运费扣款" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+               v-model="paymentList.freightDeduction"
                 placeholder="请输入运费扣款"
                 maxlength="100"
                 :disabled="disabled"
@@ -239,6 +269,8 @@
             </ws-form-item>
             <ws-form-item label="卸车补助" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.unloadSubsidy"
                 placeholder="请输入卸车补助"
                 maxlength="100"
                 :disabled="disabled"
@@ -247,6 +279,8 @@
             </ws-form-item>
             <ws-form-item label="卸车扣款" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.unloadDeduction"
                 placeholder="请输入卸车扣款"
                 maxlength="100"
                 :disabled="disabled"
@@ -255,6 +289,8 @@
             </ws-form-item>
             <ws-form-item label="其他补助" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.otherSubsidy"
                 placeholder="请输入其他补助"
                 maxlength="100"
                 :disabled="disabled"
@@ -263,6 +299,8 @@
             </ws-form-item>
             <ws-form-item label="质量扣款" span="1" prop="qualityDeduction">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.qualityDeduction"
                 placeholder="请输入质量扣款"
                 maxlength="100"
                 :disabled="disabled"
@@ -271,6 +309,8 @@
             </ws-form-item>
             <ws-form-item label="其他扣款" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.otherDeduction"
                 placeholder="请输入其他扣款"
                 maxlength="100"
                 :disabled="disabled"
@@ -284,14 +324,17 @@
               class="formItem"
             >
               <ws-input
+              v-model="paymentList.calculationPayable"
                 placeholder="请输入计算应付"
                 maxlength="100"
-               disabled
+                disabled
                 size="small"
               />
             </ws-form-item>
             <ws-form-item label="实际付款" span="1" prop="waterContent">
               <ws-input
+              @input='actualPayment'
+              v-model="paymentList.actualPayment"
                 placeholder="请输入实际付款"
                 maxlength="100"
                 :disabled="disabled"
@@ -300,6 +343,7 @@
             </ws-form-item>
             <ws-form-item label="人民币大写" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.capitalize"
                 placeholder="请输入人民币大写"
                 maxlength="100"
                 disabled
@@ -320,6 +364,7 @@
             </ws-form-item> -->
             <ws-form-item label="记事(选填)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.remarks"
                 placeholder="备注信息,不超过20个字"
                 maxlength="100"
                 :disabled="disabled"
@@ -339,7 +384,7 @@
   </div>
 </template>
 <script>
-import {} from '@/model/houseSelfCollect/index'
+import {getpaymentexamine,postpaymentedit} from '@/model/houseSelfCollect/index'
 // import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
 export default {
   components: {
@@ -348,9 +393,16 @@ export default {
   watch: {},
   data() {
     return {
-      warehouseList: {},
+     paymentList: {
+       qualityInspectionManagement:{
+         waterContent:'',
+         buckleWeightRatio:0,
+         grainMoney:0
+       }
+     },
       disabled:false,
       types:'',
+
       information:'结算',
     }
   },
@@ -363,19 +415,141 @@ export default {
       this.disabled=false
          this.information = '结算'   
     }
-    console.log( this.information)
+   this.getList()
   },
   methods: {
+    getList(){
+      getpaymentexamine({id:this.$route.query.id}).toPromise().then((response) => {
+          this.paymentList = response
+          this.paymentList.qualityInspectionManagement.waterMin=this.$route.query.waterMin
+          this.paymentList.qualityInspectionManagement.weightDeduction=(this.paymentList.qualityInspectionManagement.waterContent-this.paymentList.qualityInspectionManagement.waterMin)*this.paymentList.buckleWeightRatio
+          this.paymentList.base=(100-this.paymentList.qualityInspectionManagement.weightDeduction)/100
+          this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
+          if(!this.paymentList.solidGrainPrice){
+            this.paymentList.solidGrainPrice=this.paymentList.qualityInspectionManagement.tidalGrainPrice/this.paymentList.base
+          }
+          if(this.paymentList.type='潮粮'){
+            this.paymentList.grainMoney=this.paymentList.qualityInspectionManagement.tidalGrainPrice*this.paymentList.weighingManagement.netWeight
+          }else{
+            this.paymentList.grainMoney=this.paymentList.qualityInspectionManagement.solidGrainPrice*this.paymentList.weighingManagement.netWeight
+          }
+          console.log(this.paymentList.grainMoney)
+          
+        })
+    },
+    actualPayment(e){
+     this.paymentList.capitalize=this.convertCurrency(e)
+    },
+    grainMoney(){
+      this.paymentList.calculationPayable=(Number(this.paymentList.grainMoney)+Number(this.paymentList.weighingSubsidy)+Number(this.paymentList.freightSubsidy)+Number(this.paymentList.unloadSubsidy)+Number(this.paymentList.otherSubsidy))-this.paymentList.weighingDeduction-this.paymentList.freightDeduction-this.paymentList.unloadDeduction-this.paymentList.otherDeduction-this.paymentList.qualityDeduction
+    },
+     /**
+         * 将金额数字转为汉字大写
+         * 12.42 -> 壹拾贰元肆角贰分
+         * @param {Number} money - 数字金额
+         * @return String
+        */
+        convertCurrency(money)
+        {
+          //汉字的数字
+          var cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖');
+          //基本单位
+          var cnIntRadice = new Array('', '拾', '佰', '仟');
+          //对应整数部分扩展单位
+          var cnIntUnits = new Array('', '万', '亿', '兆');
+          //对应小数部分单位
+          var cnDecUnits = new Array('角', '分', '毫', '厘');
+          //整数金额时后面跟的字符
+          var cnInteger = '整';
+          //整型完以后的单位
+          var cnIntLast = '元';
+          //最大处理的数字
+          var maxNum = 999999999999999.9999;
+          //金额整数部分
+          var integerNum;
+          //金额小数部分
+          var decimalNum;
+          //输出的中文金额字符串
+          var chineseStr = '';
+          //分离金额后用的数组,预定义
+          var parts;
+          if (money == '') { return ''; }
+          money = parseFloat(money);
+          if (money >= maxNum) {
+            //超出最大处理数字
+            return '';
+          }
+          if (money == 0) {
+            chineseStr = cnNums[0] + cnIntLast + cnInteger;
+            return chineseStr;
+          }
+          //转换为字符串
+          money = money.toString();
+          if (money.indexOf('.') == -1) {
+            integerNum = money;
+            decimalNum = '';
+          } else {
+            parts = money.split('.');
+            integerNum = parts[0];
+            decimalNum = parts[1].substr(0, 4);
+          }
+          //获取整型部分转换
+          if (parseInt(integerNum, 10) > 0) {
+            var zeroCount = 0;
+            var IntLen = integerNum.length;
+            for (var i = 0; i < IntLen; i++) {
+              var n = integerNum.substr(i, 1);
+              var p = IntLen - i - 1;
+              var q = p / 4;
+              var m = p % 4;
+              if (n == '0') {
+                zeroCount++;
+              } else {
+                if (zeroCount > 0) {
+                  chineseStr += cnNums[0];
+                }
+                //归零
+                zeroCount = 0;
+                chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
+              }
+              if (m == 0 && zeroCount < 4) {
+                chineseStr += cnIntUnits[q];
+              }
+            }
+            chineseStr += cnIntLast;
+          }
+          //小数部分
+          if (decimalNum != '') {
+            var decLen = decimalNum.length;
+            for (var i = 0; i < decLen; i++) {
+              var n = decimalNum.substr(i, 1);
+              if (n != '0') {
+                chineseStr += cnNums[Number(n)] + cnDecUnits[i];
+              }
+            }
+          }
+          if (chineseStr == '') {
+            chineseStr += cnNums[0] + cnIntLast + cnInteger;
+          } else if (decimalNum == '') {
+            chineseStr += cnInteger;
+          }
+          return chineseStr;
+        },
     print() {
+      this.paymentList.id=this.$route.query.id
+      postpaymentedit(this.paymentList).toPromise().then((response) => {
+          this.$router.push({ path: 'houseSelfCollectPrint',
+            query:{
+          name:"123"
+        }
+          
+        })
       // this.xx = true;
       // let newstr = document.getElementById('print').innerHTML
       // let oldstr = document.body.innerHTML
       // document.body.innerHTML = newstr
       // window.print()
-        this.$router.push({ path: 'houseSelfCollectPrint',
-            query:{
-          name:"123"
-        }
+       
         },
     
         )
@@ -383,6 +557,11 @@ export default {
       // window.location.reload()
       // this.$router.push({ path: 'paymentManagement' })
     },
+    buckleWeightRatiochange(e){
+      this.paymentList.qualityInspectionManagement.weightDeduction=(this.paymentList.qualityInspectionManagement.waterContent-this.paymentList.qualityInspectionManagement.waterMin)*this.paymentList.buckleWeightRatio
+      this.paymentList.base=(100-this.paymentList.qualityInspectionManagement.weightDeduction)/100
+      this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
+    },
     cancel() {
       this.$router.push({ path: 'paymentManagement' })
     },
@@ -468,4 +647,8 @@ export default {
   text-align: center;
   margin: 20px auto;
 }
+.el-form{
+      overflow: scroll;
+    height: 86vh;
+}
 </style>

+ 249 - 35
src/views/houseSelfCollect/weighingManagement.vue

@@ -54,15 +54,11 @@
           <span v-else>{{ scope.$index + 1 }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        prop="number"
-        width="120"
-        label="编号"
-      ></el-table-column>
+      <el-table-column prop="number" width="120" label="编号"></el-table-column>
       <el-table-column prop="customer" 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="type" label="类型"></el-table-column>
+      <el-table-column prop="type" label="类型"></el-table-column>
       <el-table-column
         prop="grossWeight"
         label="毛重(公斤)"
@@ -70,7 +66,11 @@
       <el-table-column prop="tare" 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="secretaryWeigher" label="司称员">
+       <template slot-scope="scope">
+         {{scope.row.secretaryWeigher}}{{scope.row.skinInspector}}
+       </template> 
+      </el-table-column>
       <el-table-column
         prop="suqualityTestingDate"
         label="称重时间"
@@ -78,10 +78,23 @@
       <el-table-column prop="status" label="状态"></el-table-column>
       <el-table-column width="300" prop="contractNo1" label="操作">
         <template slot-scope="scope">
-
-        <el-button @click="weightCheck(scope.row,1)" v-if="(scope.row.status !='已称皮重'&& scope.row.status =='已质检')">毛重</el-button>
-        <el-button @click="weightCheck(scope.row,2)" v-if="scope.row.status =='已称毛重' || scope.row.status =='已称皮重'">皮重</el-button>
-        <el-button @click="print" v-if="scope.row.status =='已称皮重'">打印</el-button>
+          <el-button
+            @click="weightCheck(scope.row, 1)"
+            v-if="
+              scope.row.status == '已称毛重' || scope.row.status == '已质检'
+            "
+            >毛重</el-button
+          >
+          <el-button
+            @click="weightCheck(scope.row, 2)"
+            v-if="
+              scope.row.status == '已称毛重' || scope.row.status == '已称皮重'
+            "
+            >皮重</el-button
+          >
+          <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重'"
+            >打印</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -96,13 +109,115 @@
       >
       </el-pagination>
     </div>
+
+    <el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="粮食检斤单"
+      id="dialog"
+    >
+     <!-- <div class="number">{{dialogData.number}}</div>
+      <table class="table">
+        <tr class="row">
+          <td class="row col-bgc">客户姓名</td>
+          <td colspan="2">{{dialogData.customer}}</td>
+          <td class="row col-bgc">客户电话</td>
+          <td>{{dialogData.customerPhone}}</td>
+          <td class="row col-bgc">车牌号</td>
+          <td colspan="2">{{dialogData.carNumber}}</td>
+         
+        </tr>
+        <tr class="row">
+          <td class="row col-bgc">收货单位</td>
+          <td colspan="2">{{dialogData.compName}}</td>
+          <td class="row col-bgc">联系人</td>
+          <td>{{dialogData.person}}</td>
+          <td class="row col-bgc"> 联系电话</td>
+          <td colspan="2">{{dialogData.personPhone}}</td>
+          
+        </tr>
+        <tr class="row">
+          <td class="row col-bgc">货名</td>
+          <td>{{dialogData.goodsName}}</td>
+          <td class="row col-bgc">类型</td>
+          <td>{{dialogData.type}}</td>
+          <td class="row col-bgc">容重(克/升)</td>
+          <td>{{dialogData.qualityInspectionManagement.bulkDensity}}</td>
+          <td class="row col-bgc"> 不完整粒(%)</td>
+          <td class="row "> {{dialogData.qualityInspectionManagement.imperfectGrain}}</td>
+        </tr>
+        <tr class="row">
+          <td class="row col-bgc">等级</td>
+          <td>{{dialogData.qualityInspectionManagement.grade}}</td>
+          <td class="row col-bgc">水分(%)</td>
+          <td>{{dialogData.qualityInspectionManagement.waterContent}}</td>
+          <td class="row col-bgc"> 热损伤(%)</td>
+          <td>{{dialogData.qualityInspectionManagement.jiaorenli}}</td>
+          <td colspan="2" class="row col-bgc">质检 {{dialogData.qualityInspectionManagement.suqualityTestingDate}}</td>
+        </tr>
+        <tr class="row">
+          <td class="row col-bgc">杂质(%)</td>
+          <td>{{dialogData.qualityInspectionManagement.impurity}}</td>
+          <td class="row col-bgc">霉变粒(%)</td>
+          <td>{{dialogData.qualityInspectionManagement.mildewGrain}}</td>
+          <td class="row col-bgc">扣杂(公斤)</td>
+          <td>{{dialogData.buckleMiscellaneous}}</td>
+          <td class="row col-bgc">净重(公斤)</td>
+          <td>{{dialogData.netWeight}}</td>
+        </tr>
+        <tr class="row">
+          <td class="row col-bgc">毛重(公斤)</td>
+          <td>{{dialogData.grossWeight}}</td>
+          <td class="row col-bgc">皮重(公斤)</td>
+          <td>{{dialogData.tare}}</td>
+          <td colspan="4"></td>
+        </tr>
+        <tr class="row">
+          <td colspan="2" class="row col-bgc">毛重检斤时间</td>
+          <td colspan="2">{{dialogData.grossDate}}</td>
+          <td colspan="2" class="row col-bgc">皮重检斤时间</td>
+          <td colspan="2">{{dialogData.tareDate}}</td>
+        </tr>
+        
+      </table>
+      <div class="bottom">
+        <div class="bottom-row1">
+          <div>毛检:{{dialogData.secretaryWeigher}}</div>
+            <div style="margin-left:60px">皮检:{{ dialogData.skinInspector}}</div>
+       
+        </div>
+        <div class="bottom-row2">
+          <div class="left">
+            <img src="../../../public/img/add.png" alt="" />
+          </div>
+          <div class="config">收货单位签名或盖章:</div>
+          <div class="autograph">客户签名:</div>
+        </div>
+        <div class="bottom-row3">扫一扫</div>
+        <div class="bottom-row4">
+          <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>
+      </div> -->
+      <weightCheckPrint :tableData="dialogData"></weightCheckPrint>
+    </el-dialog>
   </div>
 </template>
 <script>
-import { getweighingList, selectWarehouseSelf } from '@/model/houseSelfCollect/index'
+import {
+  getweighingList,
+  selectWarehouseSelf,
+  getPrint
+} from '@/model/houseSelfCollect/index'
+import weightCheckPrint from './component/weightCheckPrint.vue'
 
 export default {
-  components: {},
+  components: {
+    weightCheckPrint
+  },
   watch: {},
   data() {
     return {
@@ -119,46 +234,79 @@ export default {
       warehouseName: '',
       value1: '', //选择时间
       warehouseList: [],
-      warehouseId:"",
+      warehouseId: '',
+      isShowPrint:false,//打印弹出
+      dialogData:{
+        qualityInspectionManagement:{},
+      },
+      purchasePriceList:[],
     }
   },
   activated() {
     this.getList()
   },
   methods: {
+    print(row) {
+       getPrint({
+      id:row.id
+      })
+        .toPromise()
+        .then((response) => {
+           this.dialogData = response
+           this.isShowPrint = true
+        })
+        .catch((response) => {
+          // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+        })
+    },
+    // printSmall(){
+    //   window.location.href =
+    //     '../../../static/weightCheck.html?type=1&dialogData=' +
+    //     JSON.stringify(this.dialogData)
+    // },
+    // printBig(){
+    //   window.location.href =
+    //     '../../../static/weightCheck.html?type=2&dialogData=' +
+    //     JSON.stringify(this.dialogData)
+    // },
     warehouseNameChange(e) {
       // this.warehouseName = e
-      console.log(this.warehouseList )
-      for(let i = 0 ; i < this.warehouseList.length ; i++){
-        if(this.warehouseList[i].value == e){
+      for (let i = 0; i < this.warehouseList.length; i++) {
+        if (this.warehouseList[i].value == e) {
           this.warehouseId = this.warehouseList[i].warehouseId
+         this.purchasePriceList = this.warehouseList[i].warehouseList
         }
-
       }
     },
-    weightCheck(row,num) {
+    weightCheck(row, num) {
       this.$router.push({
         path: 'weightCheck',
-        query: { tpyeNo: 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},
+        query: {
+          tpyeNo: 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,
+          purchasePriceList: this.purchasePriceList
+        },
       })
     },
     // Reacquire() {
     //   //重新获取
     // },
-    find(){
+    find() {
       this.getList()
-
     },
 
-    print() {
-      let newstr = document.getElementById('print').innerHTML
-      let oldstr = document.body.innerHTML
-      document.body.innerHTML = newstr
-      window.print()
-      document.body.innerHTML = oldstr
-      // window.location.reload()
-      this.$router.push({ path: 'paymentManagement' })
-    },
+  
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       this.pageSize = val
@@ -180,11 +328,13 @@ export default {
           for (let i = 0; i < response.length; i++) {
             this.warehouseList.push({
               value: response[i].warehouseName,
-              warehouseId :response[i].id
+              warehouseId: response[i].id,
+              warehouseList:response[i].purchasePriceList
             })
           }
-          this.warehouseName =  this.warehouseList[0].value
+          this.warehouseName = this.warehouseList[0].value
           this.warehouseId = this.warehouseList[0].warehouseId
+          this.purchasePriceList = this.warehouseList[0].warehouseList
         })
       getweighingList({
         compId: sessionStorage.getItem('ws-pf_compId'),
@@ -199,9 +349,8 @@ export default {
           //   title: '成功',
           //   message: '删除成功',
           // })
-          this.weighingList = response.records 
+          this.weighingList = response.records
           this.deptBudgetTotal = response.total
-          
         })
         .catch((response) => {
           // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
@@ -242,4 +391,69 @@ export default {
 .formItem {
   width: 51% !important;
 }
+/deep/.el-dialog__title {
+  font-size: 24px !important;
+}
+/deep/.el-dialog__header {
+  text-align: center !important;
+  padding: 10px 0 !important;
+  height: auto !important;
+}
+.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: 41px;
+      height: 41px;
+      margin-right: 118px;
+    }
+  }
+
+  .config {
+    margin-top: 20px;
+    margin-right: 240px;
+  }
+  .autograph{
+    margin-top: 20px;
+  }
+}
+
+.bottom-row3 {
+  margin: 10px 0;
+}
+
+.bottom-row4 {
+  margin-top: 50px;
+  text-align: center;
+}
 </style>

+ 183 - 36
src/views/houseSelfCollect/weightCheck.vue

@@ -78,7 +78,7 @@
             <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
               <ws-input
                 v-model="weighingList.grossWeight"
-                @change="calculation"
+                @input="calculation"
                 placeholder="未获取到毛重"
                 maxlength="100"
                 size="small"
@@ -99,7 +99,7 @@
             >
               <ws-input
                 v-model="weighingList.tare"
-                @change="calculation"
+                @input="calculation"
                 placeholder="未获取到皮重"
                 maxlength="100"
                 size="small"
@@ -119,8 +119,7 @@
               >
                 <ws-input
                   v-model="weighingList.buckleMiscellaneous"
-                  @change="calculation"
-                  number
+                  @input="calculation"
                   placeholder="请输入扣杂"
                   maxlength="100"
                   size="small"
@@ -156,23 +155,39 @@
         </div>
       </ws-form>
     </div>
+    <el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="粮食检斤单"
+    >
+      <weightCheckPrint :tableData="inspect"></weightCheckPrint>
+    </el-dialog>
   </div>
 </template>
 <script>
-import { tare, grossWeight } from '@/model/houseSelfCollect/index'
+import { tare, grossWeight, getamount,getPrint } from '@/model/houseSelfCollect/index'
+import weightCheckPrint from './component/weightCheckPrint.vue'
 export default {
+  components: {
+    weightCheckPrint,
+  },
   data() {
     return {
       inspect: {},
       types: 1,
       information: '',
       weighingList: {
+        grossWeight: '',
         buckleMiscellaneous: 0,
       },
       tpyeNo: '',
       disabled: false,
       relationId: '',
       warehouseId: '',
+      purchasePriceList: [],
+      isShowPrint: false,
     }
   },
   activated() {
@@ -186,6 +201,8 @@ export default {
     this.weighingList.id = this.$route.query.id
     this.relationId = this.$route.query.relationId
     this.warehouseId = this.$route.query.warehouseId
+    this.weighingList.grossWeight = this.$route.query.grossWeight
+    this.purchasePriceList = this.$route.query.purchasePriceList
     if (this.tpyeNo == 1) {
       this.information = '毛重'
     } else if (this.tpyeNo == 2) {
@@ -202,53 +219,175 @@ export default {
       this.$router.push({ path: 'weighingManagement' })
     },
     calculation() {
-      if ( this.weighingList.grossWeight  && this.weighingList.tare ) {
-        let  count = 0
-        this.weighingList.netWeight =this.weighingList.grossWeight -this.weighingList.tare-this.weighingList.buckleMiscellaneous
+      if (this.weighingList.grossWeight && this.weighingList.tare) {
+        let count = 0
+        this.weighingList.netWeight =
+          this.weighingList.grossWeight -
+          this.weighingList.tare -
+          this.weighingList.buckleMiscellaneous
       }
     },
     print() {
-      ;(this.weighingList.secretaryWeigher =
-        sessionStorage.getItem('ws-pf_staffName')),
-        this.$confirm('确定保存检斤信息?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
+      if (!this.weighingList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
           type: 'warning',
         })
-          .then(() => {
-            if (this.tpyeNo == 1) {
-              this.weighingList.relationId = this.relationId
-              grossWeight(this.weighingList)
-                .toPromise()
-                .then((response) => {
-                  this.$notify.success({
-                    title: '成功',
-                    message: '保存成功',
-                  })
-                  this.$router.go(-1)
-                })
-                .catch((response) => {
-                  // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-                })
-            } else if (this.tpyeNo == 2) {
-              this.weighingList.warehouseId = this.warehouseId
+        return
+      }
+      if (
+        this.weighingList.grossWeight < 1 ||
+        this.weighingList.grossWeight > 100000
+      ) {
+        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 (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
+        }
+      }
+      this.$confirm('确定保存检斤信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          if (this.tpyeNo == 1) {
+            //毛检保存前进行校验
+            getamount({
+              compId: sessionStorage.getItem('ws-pf_compId'),
+              customerName: this.weighingList.customer,
+              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
+                    if (count - this.weighingList.grossWeight < 0) {
+                      this.$alert(
+                        '该客户累计销售' +
+                          this.weighingList.goodsName +
+                          response +
+                          '吨,还可售粮' +
+                          count +
+                          '吨',
+                        '提示',
+                        {
+                          confirmButtonText: '确定',
+                          callback: (action) => {
+                            this.$message({
+                              type: 'info',
+                              message: `累计售粮已超出上限`,
+                            })
+                          },
+                        }
+                      )
+                    } else {
+                      //累计售粮没有超上限完成毛检保存
+                      this.weighingList.relationId = this.relationId
+                      ;(this.weighingList.secretaryWeigher =
+                        sessionStorage.getItem('ws-pf_staffName')),
+                        grossWeight(this.weighingList)
+                          .toPromise()
+                          .then((response) => {
+                            this.$notify.success({
+                              title: '成功',
+                              message: '保存成功',
+                            })
+                            this.$router.go(-1)
+                          })
+                          .catch((response) => {
+                            // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                          })
+                    }
+                  }
+                }
+              })
+          } else if (this.tpyeNo == 2) {
+            
+            this.weighingList.warehouseId = this.warehouseId
+           this.weighingList.skinInspector =sessionStorage.getItem('ws-pf_staffName'),
               tare(this.weighingList)
                 .toPromise()
                 .then((response) => {
+                  console.log(response)
                   this.$notify.success({
                     title: '成功',
                     message: '保存成功',
                   })
-                  this.$router.go(-1)
+                  getPrint({
+                    id: response,
+                  })
+                    .toPromise()
+                    .then((response) => {
+                      this.inspect = response
+                      this.isShowPrint = true
+                      console.log(this.dialogData)
+                    })
+                    .catch((response) => {
+                      // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                    })
+              
                 })
                 .catch((response) => {
                   // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
                 })
-            }
-          })
-          .catch(() => {
-            return false
-          })
+          }
+        })
+        .catch(() => {
+          return false
+        })
     },
   },
 }
@@ -338,4 +477,12 @@ export default {
 .butCss {
   opacity: 0;
 }
+/deep/.el-dialog__title {
+  font-size: 24px !important;
+}
+/deep/.el-dialog__header {
+  text-align: center !important;
+  padding: 10px 0 !important;
+  height: auto !important;
+}
 </style> 

+ 484 - 0
src/views/outboundManagement/collectionManagement.vue

@@ -0,0 +1,484 @@
+<!--收款管理-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="12">
+      <template slot="left">
+        <ws-button type="primary">待收款</ws-button>
+        <ws-button type="primary">已收款</ws-button>
+        <ws-button type="primary">全部</ws-button>
+        <ws-button type="primary" @click="adopt">备注</ws-button>
+        <ws-button type="primary" @click="collect">收款</ws-button>
+      </template>
+      <template slot="right">
+        <el-col
+          style="text-align: right; line-height: 60px; padding-right: 10px"
+          :span="8"
+        >
+          <el-select
+            v-model="contractNo"
+            placeholder="请选择合同"
+            clearable
+            filterable
+            :filter-method="dataFilter"
+            @change="contractchange"
+            maxlength="500"
+            type="input"
+            class="findValue"
+          >
+            <el-option
+              v-if="item.reportStatus"
+              v-for="item in options"
+              :key="item.constKey"
+              :label="item.contractNo + '(' + item.reportStatus + ')'"
+              :value="item.contractNo"
+            />
+            <el-option
+              v-if="!item.reportStatus"
+              v-for="item in options"
+              :key="item.constKey"
+              :label="item.contractNo"
+              :value="item.contractNo"
+            />
+          </el-select>
+        </el-col>
+      </template>
+    </BaseHeaderLayout>
+    <el-table
+      :data="warehouseList"
+      style="width: 100%; margin-top: 20px"
+      ref="warehouseList"
+      border
+      height="780"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column
+        :selectable="selectInit"
+        type="selection"
+        width="55"
+      ></el-table-column>
+      <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
+        class="table_td"
+        prop="closingQuantity"
+        label="车牌号"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="transactionPrice"
+        label="货名"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="amountIngPayable"
+        label="毛重(公斤)"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="amountEdPayable"
+        label="皮重(公斤)"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="amountIngPayable"
+        label="净重(公斤)"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="closeRate"
+        label="合同单价(元/公斤)"
+        width="150"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="basisPrice"
+        label="计算应收(元)"
+      ></el-table-column>
+
+       <el-table-column
+        class="table_td"
+        prop="basis"
+        label="计算应收(元)"
+        width="100"
+      >
+        <template slot-scope="scope">
+          <div class="inputChenge">
+          <input
+            style="width: 60px"
+            v-model="scope.row.basis"
+            type="text"
+          />
+          </div>
+          <img
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="whether(scope.row)"
+            v-if="scope.row.identification == 'false'"
+            alt=""
+          />
+          <i
+            class="el-icon-check"
+            style="line-height: 29px; margin-left: 10px"
+            @click="varietyClick(scope.row)"
+            v-if="scope.row.identification == 'true'"
+          ></i>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        class="table_td"
+        prop="basisPrice"
+        label="实际应收(元)"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="collectDate"
+        label="已收款(元)"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="collectionIngPayable"
+        label="收款时间"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="collectionEdPayable"
+        label="状态"
+      ></el-table-column>
+      <el-table-column
+        class="table_td"
+        prop="collectionEdPayable"
+        label="操作"
+        width="200"
+      >
+        <el-button @click="collectment(2)">查看</el-button>
+      </el-table-column>
+    </el-table>
+    <!-- 收款 -->
+    <el-dialog
+      width="25%"
+      title="收款"
+      :visible.sync="collectForm"
+      :append-to-body="true"
+    >
+      <el-form :model="form">
+        <el-form-item label="未收金额(元)" :label-width="formLabelWidth">
+          <el-input
+            v-model="allmoney1"
+            autocomplete="off"
+            class="deal"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
+          <el-input
+            v-model="collectmoney"
+            autocomplete="off"
+            placeholder="请输入本次收款金额"
+            class="deal"
+          ></el-input>
+        </el-form-item>
+        <el-form-item
+          label="收款日期"
+          prop="submissionDate"
+          :label-width="formLabelWidth"
+          class="deal"
+        >
+          <ws-date-picker
+            v-model="collectionDate"
+            type="date"
+            placeholder="请选择收款日期"
+            value-format="yyyy-MM-dd"
+            class="deal"
+          />
+        </el-form-item>
+        <el-form-item label="上传收款截图" :label-width="formLabelWidth">
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            list-type="picture-card"
+            :on-success="handlePictureCardPreview1"
+            :on-remove="handleRemove"
+            class="photo2"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+          <el-dialog :visible.sync="dialogVisible">
+            <img width="100%" :src="collectionScreenshot" alt="" />
+          </el-dialog>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="collectForm = false">取 消</el-button>
+        <el-button type="primary" @click="collectSubmit">提 交</el-button>
+      </div>
+    </el-dialog>
+    <!--备注-->
+
+    <el-dialog
+      width="25%"
+      title="备注"
+      :visible.sync="collectForm1"
+      :append-to-body="true"
+    >
+      <el-form :model="form">
+        <div class="beizhu">
+          <el-input
+            v-model="remarks"
+            autocomplete="off"
+            placeholder="备注信息,不超过1000字"
+            class="deal"
+          ></el-input>
+        </div>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="collectForm1 = false">取 消</el-button>
+        <el-button type="primary" @click="collectSubmit1">保存</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
+    <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 {} from '@/model/houseSelfCollect/index'
+export default {
+  watch: {},
+  data() {
+    return {
+      //分页
+      currentPage: 1,
+      pageSize: 10,
+      deptCircularPage: {},
+      deptBudgetTotal: 0,
+      warehouseList: [
+        {
+          collectionEdPayable: '快收款',
+        },
+      ],
+      dialogVisible: false,
+      form: {},
+      collectForm: false,
+      collectForm1: false,
+      taskTypeList: ['一号库'],
+      searchType: '',
+      searchTypeText: '',
+      formLabelWidth: '120px',
+      searchKeyWord: '',
+      value1: '', //收款日期
+      modification: [],
+    }
+  },
+  activated() {},
+  methods: {
+    contractchange(e) {
+      this.contractNo = e
+      this.getList()
+    },
+        //修改基差
+    varietyClick(row) {
+    //   if (row.basis) {
+    //     if (isNaN(row.basis)) {
+    //       this.$message({
+    //         message: '基差非数字!',
+    //         type: 'warning',
+    //       })
+    //       return
+    //     }
+    //   }
+    //   if (
+    //     (row.basis&&
+    //       String(row.basis).indexOf('.') != -1 &&
+    //       String(row.basis).length -
+    //         (String(row.basis).indexOf('.') + 1) >
+    //         2) ||
+    //     row.basis > 100000 ||
+    //     row.basis < -100000
+    //   ) {
+    //     this.$message({
+    //       message: '基差输入错误',
+    //       type: 'warning',
+    //     })
+    //     return
+    //   }
+    //   if (!String(row.basis)) {
+    //     this.$message({
+    //       message: '基差不能为空!',
+    //       type: 'warning',
+    //     })
+    //     return
+    //   }
+      this.$confirm(`确定要修改应收?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editCollect({
+            basis: row.basis,
+            id: row.id,
+          })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {})
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    whether(row) {
+      row.identification = 'true'
+    },
+    collectment(index) {
+      this.$router.push({ path: 'collectionment', query: { type: index } })
+    },
+    collect() {
+      if (this.modification.length == 0) {
+        this.$message.warning('请选择要收款的条目')
+      } else {
+        this.collectForm = true
+      }
+    },
+    collectSubmit() {
+      this.$confirm('确定提交收款信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {})
+        .catch(() => {
+          return false
+        })
+    },
+    collectSubmit1() {
+      this.$confirm('确定保存备注信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {})
+        .catch(() => {
+          return false
+        })
+    },
+    handlePictureCardPreview1(file) {
+      this.collectionScreenshot = file.url
+    },
+    adopt() {
+      if (this.modification.length == 0) {
+        this.$message.warning('请选择要备注的条目')
+      } else {
+        this.collectForm1 = true
+      }
+    },
+    selectInit(row) {
+      //在这里一定要记得类型匹配的上。
+      if (row.approveStatus == null) {
+        return true
+      } else if (row.approveStatus != null) {
+        if (row.taskId == null) {
+          return false
+        } else {
+          return true
+        }
+      }
+    },
+    getList(){
+      detailsList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        pcFlag: this.pcFlag,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+      })
+        .toPromise()
+        .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification = 'false'
+          }
+          this.warehouseList = response
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+        })
+      }
+    },
+    handleSelectionChange(val) {
+      this.modification = val
+    },
+    selecttaskType() {},
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+}
+</script>
+<style lang="scss" scoped>
+.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;
+}
+.title {
+  font-size: 16px;
+  font-weight: 600;
+}
+.formItem {
+  width: 70% !important;
+}
+/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/.beizhu .el-input--small .el-input__inner {
+  height: 220px;
+  line-height: 28px;
+}
+.inputChenge {
+  width: 40%;
+  display: inline-flex;
+}
+</style>
+

+ 248 - 0
src/views/outboundManagement/collectionment.vue

@@ -0,0 +1,248 @@
+<!--结算-->
+<template>
+  <div class="center">
+    <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: 50%; margin: 0 auto">
+          <div class="title">基本信息</div>
+          <ws-info-table>
+            <ws-form-item label="合同编号" span="1" prop="contractNo">
+              <ws-input
+                placeholder="请输入合同编号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="仓位号" span="1" prop="binNumber">
+              <ws-input
+                placeholder="请输入仓位号"
+                maxlength="100"
+                size="small"
+              disabled
+              />
+            </ws-form-item>
+            <ws-form-item label="货名" span="1" prop="goodsName">
+              <ws-select
+                v-model="warehouseList.a"
+                placeholder="请输入货名"
+                class="typeselect"
+                @change="selectpackingMethod"
+               disabled
+              >
+                <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="storageTagNo">
+              <ws-input placeholder="请输入囤位号" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item label="单价(元/公斤)" span="1" prop="waterContent">
+              <ws-input placeholder="请输入单价" maxlength="100" size="small" disabled/>
+            </ws-form-item>
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
+              <ws-input placeholder="请输入车牌号" maxlength="100" size="small" disabled/>
+            </ws-form-item>
+          </ws-info-table>
+
+          <div class="title">质检数据</div>
+          <ws-info-table>
+            <ws-form-item label="等级" span="1" prop="waterContent">
+              <ws-input placeholder="请输入编号" maxlength="100" size="small" disabled/>
+            </ws-form-item>
+            <ws-form-item label="杂质(%)" span="1" prop="waterContent">
+              <ws-input
+                placeholder="请输入杂质占比"
+                maxlength="100"
+                size="small"
+               disabled
+              />
+            </ws-form-item>
+            <ws-form-item label="水分(%)" span="1" prop="waterContent">
+              <ws-input
+                placeholder="请输入水分占比"
+                maxlength="100"
+                size="small"
+                disabled
+              />
+            </ws-form-item>
+            <ws-form-item label="霉变粒(%)" span="1" prop="waterContent">
+              <ws-input
+                placeholder="请输入霉变粒占比"
+                maxlength="100"
+                size="small"
+                disabled
+              />
+            </ws-form-item>
+            <ws-form-item label="容重(克/升)" span="1" prop="waterContent">
+              <ws-input placeholder="请输入容重" maxlength="100" size="small" disabled/>
+            </ws-form-item>
+            <ws-form-item label="热损伤(%)" span="1" prop="waterContent">
+              <ws-input
+                placeholder="请输入热损伤占比"
+                maxlength="100"
+                size="small"
+                disabled
+              />
+            </ws-form-item>
+            <ws-form-item label="不完整粒(%)" span="1" prop="waterContent">
+              <ws-input
+                placeholder="请输入不完整粒占比"
+                maxlength="100"
+                size="small"
+                disabled
+              />
+            </ws-form-item>
+          </ws-info-table>
+
+          <div class="title">检斤信息</div>
+          <ws-info-table>
+            <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
+              <ws-input placeholder="请输入毛重" maxlength="100" size="small" disabled/>
+            </ws-form-item>
+            <ws-form-item label="皮重(公斤)" span="1" prop="tare">
+              <ws-input placeholder="请输入皮重" maxlength="100" size="small" disabled/>
+            </ws-form-item>
+            <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
+              <ws-input placeholder="请输入净重" maxlength="100" size="small" disabled/>
+            </ws-form-item>
+          </ws-info-table>
+          <div class="but">
+            <el-button @click="cancel" v-if="this.types == 2" type="primary">关闭</el-button>
+          </div>
+        </div>
+      </ws-form>
+    </div>
+  </div>
+</template>
+<script>
+import {} from '@/model/houseSelfCollect/index'
+export default {
+  watch: {},
+  data() {
+    return {
+      warehouseList: {},
+      disabled:false,
+      types:'',
+      information:'结算',
+    }
+  },
+  activated() {
+    this.types = this.$route.query.type
+    if( this.types == 2){
+         this.disabled=true
+         this.information = '查看'   
+    }
+    console.log( this.information)
+  },
+  methods: {
+    cancel() {
+      this.$router.push({ path: 'collectionManagement' })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.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;
+}
+.title {
+  font-size: 16px;
+  font-weight: 600;
+  margin: 10px;
+}
+.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;
+}
+.formItem {
+  width: 70% !important;
+}
+/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>

+ 30 - 0
src/views/outboundManagement/component/route.js

@@ -26,6 +26,21 @@ const outboundManagementRouter = {
                 keepAlive: true
             }
         },
+        //检斤信息
+        {
+            path: 'weighing',
+            component: () =>
+              import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/weighing'),
+            name: 'weighing',
+            meta: {
+              title: 'weighing',
+              shortcutEntrance: 'weighing',
+              module: 'procurement.procurementOrder.delete',
+              permissicon: [],
+              keepAlive: true
+            },
+            hidden: true
+          },
         // 质检管理
         {
             path: 'qualityInspectionManagement',
@@ -71,6 +86,21 @@ const outboundManagementRouter = {
                 keepAlive: true
             }
         },
+        //查看收款管理
+        {
+            path: 'collectionment',
+            component: () =>
+              import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/collectionment'),
+            name: 'collectionment',
+            meta: {
+              title: 'collectionment',
+              shortcutEntrance: 'collectionment',
+              module: 'procurement.procurementOrder.delete',
+              permissicon: [],
+              keepAlive: true
+            },
+            hidden: true
+          },
     ],
 
 };

+ 445 - 0
src/views/outboundManagement/weighing.vue

@@ -0,0 +1,445 @@
+<template>
+  <div class="center">
+    <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: 50%; margin: 0 auto">
+          <div class="title">基本信息</div>
+          <ws-info-table>
+            <ws-form-item label="合同编号" span="1">
+              <ws-select
+                v-model="weighingList.contractNo"
+              @change="contractChange"
+                maxlength="100"
+                :disabled = "disabled1"
+                size="small"
+              >
+                <ws-option
+                  v-for="item in contractNoList"
+                  :key="item.contractNo"
+                  :label="item.contractNo"
+                  :value="item.contractNo"
+                />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="仓位号" span="1" prop="binNumber">
+              <ws-select
+                v-model="weighingList.binNumber"
+        
+                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="goodsName">
+              <ws-input
+                v-model="weighingList.goodsName"
+                placeholder="请输入货名"
+                maxlength="100"
+                 disabled 
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="囤位号" span="1" prop="storageNumber">
+              <ws-input
+                v-model="weighingList.storageNumber"
+                placeholder="请输入囤位号"
+                maxlength="100"
+                size="small"
+                 :disabled = "disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
+              <ws-input
+                v-model="weighingList.carNumber"
+                placeholder="请输入车牌号"
+                maxlength="100"
+                size="small"
+                 :disabled = "disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="出库类型" span="1" prop="inOutType">
+              <ws-select
+                v-model="weighingList.inOutType"
+   
+                :disabled="disabled"
+              >
+                <ws-option
+                  v-for="item in inOutType"
+                  :key="item.value"
+                  :label="item.value"
+                  :value="item.value"
+                />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight" v-if="this.types == 1">
+              <ws-input
+                v-model="weighingList.grossWeight"
+                @change="calculation"
+                placeholder="未获取到毛重"
+                maxlength="100"
+                size="small"
+                :disabled="disabled2"
+              />
+            </ws-form-item>
+            <el-button
+              type="primary"
+              v-if="this.types == 1"
+              
+              @click="chongxin"
+              >重新获取</el-button
+            >
+
+            <ws-form-item
+              label="皮重(公斤)"
+              span="1"
+              prop="tare"
+              
+            >
+              <ws-input
+                v-model="weighingList.tare"
+                placeholder="未获取到皮重"
+                maxlength="100"
+                size="small"
+                disabled
+              />
+            </ws-form-item>
+
+            <el-button type="primary" v-if="this.types == 2 || this.types == 3"
+              >重新获取</el-button
+            >
+            <div class="formItem">
+              <ws-form-item
+                label="净重(公斤)"
+                span="1"
+                prop="netWeight"
+                v-if="this.types == 1"
+              >
+                <ws-input
+                  v-model="weighingList.netWeight"
+                  placeholder="请输入净重"
+                  maxlength="100"
+                  size="small"
+                  disabled
+                />
+              </ws-form-item>
+        </div>
+            <div class="bangdan">
+        <el-form-item label="上传磅单"  :label-width="formLabelWidth" v-if="this.types == 1">
+          
+        </el-form-item>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            list-type="picture-card"
+            :on-success="handlePictureCardPreview1"
+            :on-remove="handleRemove"
+            class="photo2"
+            v-if="this.types == 1"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+          <el-dialog :visible.sync="dialogVisible">
+            <img width="100%" :src="collectionScreenshot" alt="" />
+          </el-dialog>
+            </div>
+          </ws-info-table>
+          <div class="but">
+            <el-button @click="cancel" type="primary">取消</el-button>
+            <el-button @click="print" type="primary" >保存</el-button>
+          </div>
+        </div>
+      </ws-form>
+    </div>
+  </div>
+</template>
+<script>
+import { 
+  grossWeight, 
+  getbinNumber, 
+  contractList, 
+  tareAdd, 
+  tareEdit
+} from '@/model/outboundManagement/index'
+export default {
+  data() {
+    return {
+      inspect: {},
+      types: 3,
+      information: '添加皮重',
+      weighingList: {
+        carNumber:'',
+        storageNumber:'',
+        buckleMiscellaneous: 0,
+      },
+      disabled: false,
+      disabled1:false,
+      disabled2:false,
+      dialogVisible: false,
+      getbinNumberList: [],
+      contractNoList: [],
+      inOutType: [
+        { value: '销售出库', type: 1 },
+        { value: '移库出库', type: 3 },
+        { value: '暂存出库', type: 5 },
+        { value: '贸易服务出库', type: 7 },        
+      ],
+      relationId: '',
+      warehouseId: '',//仓库id
+      
+    }
+  },
+  activated() {
+    this.types = this.$route.query.typeNo
+    this.weighingList.number = this.$route.query.number
+    this.weighingList.binNumber = this.$route.query.binNumber
+    this.weighingList.storageNumber = this.$route.query.storageNumber
+    this.weighingList.carNumber = this.$route.query.carNumber
+    this.weighingList.goodsName = this.$route.query.goodsName
+    this.weighingList.inOutType = this.$route.query.inOutType
+    let id = this.$route.query.id
+    this.relationId = this.$route.query.relationId
+    this.warehouseId = this.$route.query.warehouseId
+    if (this.types == 1) {
+      this.information = '毛重'
+      this.disabled = true
+      this.disabled1 = true
+    } else if (this.types == 2) {
+      this.information = '编辑皮重'
+      this.disabled1 = true
+      this.disabled2=true
+    }
+    this.getList(id)
+  },
+  methods: {
+    chongxin() {
+      if (this.types == 2 || this.types == 3) {
+        return
+      }
+    },
+    handlePictureCardPreview1(file) {
+      this.collectionScreenshot = file.url
+    },
+    cancel() {
+      this.weighingList = {} 
+      this.$router.push({ path: 'weighingManagement' })
+    },
+    calculation() {
+      if ( this.weighingList.grossWeight  && this.weighingList.tare ) {
+        let  count = 0
+        this.weighingList.netWeight =this.weighingList.grossWeight -this.weighingList.tare-this.weighingList.buckleMiscellaneous
+      }
+    },
+    contractChange(e){
+      for(let i = 0 ; i < this.contractNoList.length ; i++){
+        if(e == this.contractNoList[i].contractNo){
+         this.weighingList.goodsName = this.contractNoList[i].goodsName
+        }
+      }
+    },
+    getList() {
+      // 仓位
+      getbinNumber({ id: this.warehouseId })
+        .toPromise()
+        .then((response) => {
+          this.getbinNumberList = []
+          for (let i = 0; i < response.warehousePositionInfoList.length; i++) {
+            this.getbinNumberList.push({
+              value: response.warehousePositionInfoList[i].binNumber,
+            })
+          }
+        })
+      //合同编号
+      contractList({ compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          this.contractNoList = response
+        })
+    },
+    print() {
+      console.log(this.types,'dkshioyhado')
+      this.weighingList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName'),
+
+        this.$confirm('确定保存检斤信息?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(() => {
+            debugger
+            if (this.types == 1) {
+              this.weighingList.relationId = this.relationId
+              grossWeight(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '提交成功',
+                  })
+                  this.$router.go(-1)
+                })
+                .catch((response) => {
+                  // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                })
+            } else if (this.types == 2) {
+              this.weighingList.warehouseId = this.warehouseId
+              tareEdit(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '提交成功',
+                  })
+                  this.$router.go(-1)
+                })
+                .catch((response) => {
+                  // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                })
+            }else if (this.types == 3) {
+              this.weighingList.warehouseId = this.warehouseId
+              tareAdd(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '提交成功',
+                  })
+                  this.$router.go(-1)
+                })
+                .catch((response) => {
+                  // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                })
+            }
+          })
+          .catch(() => {
+            return false
+          })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.center {
+  background: #f6f7fc;
+}
+.ws-info-table {
+  border: none;
+}
+.ws-info-table .el-form-item {
+  width: 50%;
+  border: none;
+}
+.formItem {
+  width: 100%;
+  display: inline;
+}
+/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;
+}
+.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;
+}
+</style> 

+ 129 - 177
src/views/outboundManagement/weighingManagement.vue

@@ -2,16 +2,19 @@
 <template>
   <div>
     <BaseHeaderLayout :leftSpan="12">
-      <template slot="left"> </template>
+    <template slot="left">
+        <ws-button type="primary" @click="weighing(3)">添加</ws-button>
+      </template>
+      <!-- <template slot="left"> </template> -->
       <template slot="right">
         <ws-select
-          v-model="searchTypeText"
+          v-model="warehouseName"
           placeholder=""
-          @change="selecttaskType"
+          @change="warehouseNameChange"
           :value="searchType"
         >
           <ws-option
-            v-for="item in taskTypeList"
+            v-for="item in warehouseList"
             :key="item.value"
             :label="item.value"
             :value="item.value"
@@ -21,7 +24,7 @@
         <div></div>
         <ws-input
           v-model="searchKeyWord"
-          placeholder="可按编号、车牌号查找"
+          placeholder="可按编号、客户名、车牌号查找"
           clearable
           maxlength="500"
           type="input"
@@ -42,9 +45,9 @@
       </template>
     </BaseHeaderLayout>
     <el-table
-      :data="warehouseList"
+      :data="weighingList"
       style="width: 100%; margin-top: 20px"
-      ref="warehouseList"
+      ref="weighingList"
       border
       height="780"
     >
@@ -54,210 +57,159 @@
           <span v-else>{{ scope.$index + 1 }}</span>
         </template>
       </el-table-column>
-      <el-table-column
-        prop="contractNo"
-        width="120"
-        label="编号"
-      ></el-table-column>
-      <el-table-column prop="contractNo" label="客户"></el-table-column>
-      <el-table-column prop="contractNo" label="车牌号"></el-table-column>
-      <el-table-column prop="contractNo" label="货名"></el-table-column>
-      <el-table-column prop="contractNo" label="毛重(公斤)"></el-table-column>
-      <el-table-column prop="contractNo" label="皮重(公斤)"></el-table-column>
-      <el-table-column prop="contractNo" label="仓位号"></el-table-column>
-      <el-table-column prop="contractNo" label="囤位号"></el-table-column>
-      <el-table-column prop="contractNo" label="司称员"></el-table-column>
-      <el-table-column prop="contractNo" label="称重时间"></el-table-column>
-      <el-table-column prop="contractNo" label="状态"></el-table-column>
+      <el-table-column prop="contractNo" width="120" label="合同编号"></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="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="suqualityTestingDate" label="称重时间"></el-table-column>
+      <el-table-column prop="address" label="附件"></el-table-column>
+      <el-table-column prop="status" label="状态"></el-table-column>
       <el-table-column width="300" prop="contractNo1" label="操作">
-        <el-button @click="GrossWeight">毛重</el-button>
-        <el-button @click="tare">皮重</el-button>
-        <el-button @click="print">删除</el-button>
+        <template slot-scope="scope">
+        <el-button @click="weighing(scope.row,1)" v-if="scope.row.status !='已质检'">毛重</el-button>
+        <el-button @click="weighing(scope.row,2)" v-if="scope.row.status =='已称皮重'">皮重</el-button>
+        <el-button @click="del(scope.row)" v-if="scope.row.status =='已称皮重'">删除</el-button>
+        </template>
       </el-table-column>
     </el-table>
-
-    <!-- 毛重检斤 -->
-    <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true">
-      <ws-form>
-        <div class="title">毛重检斤</div>
-        <ws-info-table>
-          <ws-form-item label="编号"  prop="waterContent">
-            <ws-input placeholder="请输入编号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="仓位号" prop="waterContent">
-            <ws-input placeholder="请输入仓位号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="客户" prop="waterContent">
-            <ws-input placeholder="请输入客户" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="囤位号" prop="waterContent">
-            <ws-input placeholder="请输入囤位号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="车牌号" prop="waterContent">
-            <ws-input placeholder="请输入车牌号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="货名" prop="waterContent">
-            <ws-input placeholder="请输入货名" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="毛重(公斤)" prop="waterContent">
-            <ws-input placeholder="请输入毛重" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <div><el-button @click="Reacquire">重新获取</el-button></div>
-        </ws-info-table>
-        <div style="text-align: center">
-          <el-button @click="paymentForm = false">取消</el-button>
-          <el-button @click="commit">保存</el-button>
-        </div>
-      </ws-form>
-    </el-dialog>
-    <!-- 皮重检斤 -->
-    <el-dialog width="40%" :visible.sync="paymentForm1" :append-to-body="true">
-      <ws-form>
-        <div class="title">皮重检斤</div>
-        <ws-info-table>
-          <ws-form-item label="编号" prop="waterContent">
-            <ws-input placeholder="请输入编号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="仓位号" prop="waterContent">
-            <ws-input placeholder="请输入仓位号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="客户" prop="waterContent">
-            <ws-input placeholder="请输入客户" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="囤位号" prop="waterContent">
-            <ws-input placeholder="请输入囤位号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="车牌号" prop="waterContent">
-            <ws-input placeholder="请输入车牌号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="货名" prop="waterContent">
-            <ws-input placeholder="请输入货名" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item
-            label="毛重(公斤)"
-            prop="waterContent"
-            class="formItem"
-          >
-            <ws-input placeholder="请输入毛重" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item
-            label="皮重(公斤)"
-            prop="waterContent"
-            class="formItem"
-          >
-            <ws-input placeholder="请输入皮重" maxlength="100" size="small" />
-            <el-button @click="Reacquire">重新获取</el-button>
-          </ws-form-item>
-          <ws-form-item
-            label="扣杂(公斤)"
-            prop="waterContent"
-            class="formItem"
-          >
-            <ws-input placeholder="请输入扣杂" maxlength="100" size="small" />
-          </ws-form-item>
-          <ws-form-item
-            label="净重(公斤)"
-            prop="waterContent"
-            class="formItem"
-          >
-            <ws-input placeholder="请输入净重" maxlength="100" disabled size="small" />
-          </ws-form-item>
-        </ws-info-table>
-        <div style="text-align: center">
-          <el-button @click="paymentForm1 = false">取消</el-button>
-          <el-button @click="submit">保存</el-button>
-        </div>
-      </ws-form>
-    </el-dialog>
-     <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 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 {} from '@/model/houseSelfCollect/index'
+import { getweighingList, selectWarehouseSelf, delelteWeighing,  } from '@/model/outboundManagement/index'
+
 export default {
-  components: {
-    
-  },
-  watch: {},
   data() {
     return {
-       //分页
+      //分页
       currentPage: 1,
       pageSize: 10,
-      deptCircularPage:{},
+      deptCircularPage: {},
       deptBudgetTotal: 0,
       paymentForm: false,
       paymentForm1: false,
-      warehouseList: [
-        {
-          contractNo: '56454',
-        },
-      ],
+      weighingList: [],
       searchKeyWord: '',
       searchType: [],
-      searchTypeText: '',
+      warehouseName: '',
       value1: '', //选择时间
-      taskTypeList: [],
+      warehouseList: [],
+      warehouseId:'',
     }
   },
-  activated() {},
+  activated() {
+    this.getList()
+  },
   methods: {
-    GrossWeight() {
-      //毛重
-      this.paymentForm = true
+    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
+        }
+
+      }
+    },
+    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},
+      })
     },
-    tare() {
-      //皮重
-      this.paymentForm1 = true
+    // Reacquire() {
+    //   //重新获取
+    // },
+    find(){
+      this.getList()
+
     },
-    selecttaskType() {
-      //选择仓库改变方法
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
     },
-    Reacquire() {
-      //重新获取
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
     },
-    commit() {
-      //毛重保存
-      this.$confirm('确定保存检斤信息?', '提示', {
-        confirmButtonText: '确定',
+    del(row){
+      this.$confirm(`检斤信息删除后不可恢复,是否确定删除?`, {
         cancelButtonText: '取消',
+        confirmButtonText: '确定',
         type: 'warning',
       })
-        .then(() => {})
+        .then(() => {
+          delelteWeighing({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+            })
+        })
         .catch(() => {
           return false
         })
     },
-    submit() {//皮重保存
-       this.$confirm('确定保存检斤信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
+    getList() {
+      selectWarehouseSelf({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        personCharge: sessionStorage.getItem('ws-pf_staffName'),
       })
-        .then(() => {})
-        .catch(() => {
-          return false
+        .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
+        })
+      getweighingList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchKeyWord: this.searchKeyWord,
+        warehouseName: this.warehouseName,
+      })
+        .toPromise()
+        .then((response) => {
+          // this.$notify.success({
+          //   title: '成功',
+          //   message: '删除成功',
+          // })
+          this.weighingList = response.records 
+          this.deptBudgetTotal = response.total
+          
+        })
+        .catch((response) => {
+          // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
         })
-    },
-     handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
     },
   },
 }

+ 0 - 2
src/views/purchasingManagement/purchaseOrderList.vue

@@ -1556,8 +1556,6 @@ export default {
           //  if(this.aduitlist.invoiceFee){
           //    this.aduitlist.invoiceFee=-Math.abs(this.aduitlist.invoiceFee)
           //  }
-            this.aduitlist.unloadingCharge = '-' + this.aduitlist.unloadingCharge
-            this.aduitlist.basis = '-' + this.aduitlist.basis
        }
       this.dialogFormVisible4 = false
       this.$confirm(`审核通过后,将通知客户订单生效,是否确定通过审核?`, {

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

@@ -948,7 +948,7 @@ export default {
         })
           .toPromise()
           .then((response) => {
-            this.audit(this.modification[index + 1], index + 1, status)
+            this.audit(this.modification[index + 1], index + 1, status,status2,reason)
           })
           .catch((req) => {
             this.$message.warning(req.message)

+ 1 - 1
vue.config.js

@@ -141,7 +141,7 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.103:9100/',
+        target: 'http://192.168.1.120:8090/',
         // target: 'http://192.168.1.112:8090/',
         // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.119:8090/',