Pārlūkot izejas kodu

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

# Conflicts:
#	src/views/houseSelfCollect/acquisitionManagementAdd.vue
mxx 3 gadi atpakaļ
vecāks
revīzija
9d31d70b45

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

+ 335 - 0
public/static/payprint.html

@@ -0,0 +1,335 @@
+<!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="title">粮食质检单</div>
+        <div class="number">{{tableData.qualityNo}}</div>
+        <table class="table">
+          <tr class="row">
+            <td class="col col-bgc">客户姓名</td>
+            <td class="col" colspan="2">{{tableData.customerName}}</td>
+            <td class="col col-bgc">客户电话</td>
+            <td class="col" colspan="2">{{tableData.customerPhone}}</td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col">{{tableData.carNumber}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">收货单位</td>
+            <td class="col" colspan="2">{{tableData.receivingUnit}}</td>
+            <td class="col col-bgc">联系人</td>
+            <td class="col" colspan="2">{{tableData.contacts}}</td>
+            <td class="col col-bgc">联系电话</td>
+            <td class="col">{{tableData.contactsPhone}}</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.customerName}}</td>
+            <td class="col col-bgc">容量(克/升)</td>
+            <td class="col">{{tableData.bulkDensity}}</td>
+            <td class="col col-bgc">不完整粒(%)</td>
+            <td class="col">{{tableData.imperfectGrain}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">等级</td>
+            <td class="col">{{tableData.grade}}</td>
+            <td class="col col-bgc">水分(%)</td>
+            <td class="col">{{tableData.waterContent}}</td>
+            <td class="col col-bgc">热损伤(%)</td>
+            <td class="col">{{tableData.jiaorenli}}</td>
+            <td class="col col-bgc">单价(元/公斤)</td>
+            <td class="col">{{tableData.tidalGrainPrice}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">杂质(%)</td>
+            <td class="col">{{tableData.impurity}}</td>
+            <td class="col col-bgc">霉变粒(%)</td>
+            <td class="col">{{tableData.mildewGrain}}</td>
+            <td class="col col-bgc" colspan="2">购粮性质</td>
+            <td class="col" colspan="2">{{tableData.customerName}}</td>
+          </tr>
+        </table>
+        <div class="bottom">
+          <div class="bottom-row1">
+            <div>质检:{{tableData.qualityInspector}}</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="">客户签名</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.qualityNo}}</div>
+        </div>
+        <div class="small-row">
+          <div>客户姓名</div>
+          <div>{{tableData.customerName}}</div>
+        </div>
+        <div class="small-row">
+          <div>客户电话</div>
+          <div>{{tableData.customerPhone}}</div>
+        </div>
+        <div class="small-row">
+          <div>车牌号</div>
+          <div>{{tableData.carNumber}}</div>
+        </div>
+        <div class="small-row">
+          <div>收货单位</div>
+          <div>{{tableData.receivingUnit}}</div>
+        </div>
+        <div class="small-row">
+          <div>联系人</div>
+          <div>{{tableData.contacts}}</div>
+        </div>
+        <div class="small-row">
+          <div>联系电话</div>
+          <div>{{tableData.contactsPhone}}</div>
+        </div>
+        <div class="small-row">
+          <div>货名</div>
+          <div>{{tableData.goodsName}}</div>
+        </div>
+        <div class="small-row">
+          <div>类型</div>
+          <div>{{tableData.customerName}}</div>
+        </div>
+        <div class="small-row">
+          <div>容量(克/升)</div>
+          <div>{{tableData.bulkDensity}}</div>
+        </div>
+        <div class="small-row">
+          <div>不完整粒(%)</div>
+          <div>{{tableData.imperfectGrain}}</div>
+        </div>
+        <div class="small-row">
+          <div>等级</div>
+          <div>{{tableData.grade}}</div>
+        </div>
+        <div class="small-row">
+          <div>水分(%)</div>
+          <div>{{tableData.waterContent}}</div>
+        </div>
+        <div class="small-row">
+          <div>热损伤(%)</div>
+          <div>{{tableData.jiaorenli}}</div>
+        </div>
+        <div class="small-row">
+          <div>单价(元/公斤)</div>
+          <div>{{tableData.tidalGrainPrice}}</div>
+        </div>
+        <div class="small-row">
+          <div>杂质(%)</div>
+          <div>{{tableData.impurity}}</div>
+        </div>
+        <div class="small-row">
+          <div>>霉变粒(%)</div>
+          <div>{{tableData.mildewGrain}}</div>
+        </div>
+        <div class="small-row">
+          <div>购粮性质</div>
+          <div>{{tableData.customerName}}</div>
+        </div>
+        <div class="small-row">
+          <div>质检</div>
+          <div>{{tableData.qualityInspector}}</div>
+        </div>
+        <div class="small-row">
+          <div>时间</div>
+          <div>{{tableData.qualityDate}}</div>
+        </div>
+        <div class="small-row">
+          <div>收货单位签名或盖章:</div>
+          <div class="sign">客户签名:</div>
+        </div>
+      </div>
+    </div>
+  </body>
+  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+  <script type="text/javascript">
+    new Vue({
+      el: '#app',
+      data: {
+        tableData: "",
+        name: "",
+        bigContent: false,
+        smallContent: false
+      },
+      computed: {},
+      methods: {
+        tableRowClassName({
+          row,
+          rowIndex
+        }) {
+          if (rowIndex === 1) {
+            return 'warning-row';
+          } else if (rowIndex === 3) {
+            return 'success-row';
+          }
+          return '';
+        },
+        getQueryVariable(variable) {
+          var query = window.location.search.substring(1);
+          var vars = query.split("&");
+          for (var i = 0; i < vars.length; i++) {
+            var pair = vars[i].split("=");
+            if (pair[0] == variable) {
+              return pair[1];
+            }
+          }
+          return (false);
+        },
+        printSmall() {},
+        printBig() {},
+      },
+      mounted() {
+        let _data = decodeURIComponent(this.getQueryVariable("dataList"))
+        let _type = decodeURIComponent(this.getQueryVariable("type"))
+        if (_type == 2) {
+          this.bigContent = true
+          this.smallContent = false
+        } else {
+          this.smallContent = true
+          this.bigContent = false
+        }
+        // console.log(_data)
+        this.tableData = JSON.parse(_data)
+        // console.log(this.tableData)
+        // 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: {
       }

+ 336 - 0
public/static/weightCheck.html

@@ -0,0 +1,336 @@
+<!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: {},
+        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() {
+        debugger
+        let _data = decodeURIComponent(this.getQueryVariable("dialogData"))
+        let _type = decodeURIComponent(this.getQueryVariable("type"))
+        if (_type == 2) {
+          this.bigContent = true
+          this.smallContent = false
+        } else {
+          this.smallContent = true
+          this.bigContent = false
+        }
+        console.log(_data)
+        this.tableData = JSON.parse(_data)
+        console.log(this.tableData)
+        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'
 
 

+ 28 - 6
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,13 +48,12 @@ 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)
 //收购管理添加
 export const purchasePriceAdd = appRx.post(API_POST_PURCHASEPRICE_ADD, errorCatcher, errorHandle, filter)
 //收购管理查看
-export const purchasePriceLook = appRx.get(API_GET_PURCHASEPRICE_LOOK, errorCatcher, errorHandle, filter)
+export const purchasePriceLook = appRx.post(API_GET_PURCHASEPRICE_LOOK, errorCatcher, errorHandle, filter)
 //收购管理编辑
 export const purchasePriceEdit = appRx.post(API_POST_PURCHASEPRICE_EDIT, 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)
+

+ 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

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

@@ -122,7 +122,7 @@ const houseSelfCollectRouter = {
       meta: {
         title: 'paymentManagement',
         shortcutEntrance: 'houseSelfCollect',
-        module: 'procurement.procurementOrder.delete',
+        module: 'acquisitionManagement.acquisitionPay',
         permissicon: [],
         keepAlive: true
       }

+ 0 - 0
src/views/houseSelfCollect/component/weightCheck.vue


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

+ 240 - 30
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"
                 />
@@ -250,6 +260,7 @@ import {
   getinspectLookGoods,
   getinspectEdit,
   getamount,
+  getCount
 } from '@/model/houseSelfCollect/index'
 import { packList } from '@/model/contarct/index'
 import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
@@ -263,11 +274,13 @@ export default {
       // warehouseList: {},
       inspect: {
         tidalGrainPrice: 0,
+        buckleWeightRatio: 0,
       },
       disabled: false,
+      disabled1: false,
       types: '1',
       information: '添加',
-      goodnameList: [],
+      goodNameList: [],
       gradeList: [],
       customerList: [],
       getbinNumberList: [],
@@ -277,8 +290,8 @@ export default {
       count: 0,
       cangNo: '',
       typeList: ['干粮', '潮粮'],
-      purchasePriceList:[],
-      id:"",
+      purchasePriceList: [],
+      id: '',
     }
   },
   activated() {
@@ -291,9 +304,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,6 +335,210 @@ 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')
@@ -334,7 +553,7 @@ export default {
               .toPromise()
               .then((response) => {
                 this.$message.success('保存成功')
-                this.$router.push({ path: 'paymentManagement' })
+                this.$router.go(-1)
               })
           })
           .catch(() => {
@@ -359,7 +578,8 @@ export default {
                 // window.print()
                 // document.body.innerHTML = oldstr
                 // window.location.reload()
-                this.$router.push({ path: 'paymentManagement' })
+                // this.$router.push({ path: 'paymentManagement' })
+                this.$router.go(-1)
               })
           })
           .catch(() => {
@@ -374,31 +594,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 +624,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 +643,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++) {

+ 1 - 0
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="净重单价(元/公斤)"

+ 265 - 54
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>
     <!-- 付款弹窗 -->
@@ -187,13 +188,100 @@
       :total="deptBudgetTotal"
     >
     </el-pagination>
+    <el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="粮食质检单"
+    >
+    <div>
+      <div class="title">中天昊元粮食贸易有限公司结算凭证</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="2">{{ printData.receivingUnit }}</td>
+          <td rowspan="4" class="col col-bgc">买方</td>
+          <td class="col col-bgc">收货单位</td>
+          <td class="col" colspan="2">{{ printData.receivingUnit }}</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>
+        </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>
+        </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>
+        </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>
+      
+      <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>
+    </el-dialog>
     </div>
   </div>
 </template>
 <script>
-import {} from '@/model/houseSelfCollect/index'
+import {getpayment,selectWarehouseSelf,delpayment,auditpayment,getpaymentexamine} from '@/model/houseSelfCollect/index'
 import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
-
+import { posthandle } from '@/model/purchasingManagement/index'
 export default {
   components: {
     houseSelfCollectPrint,
@@ -204,25 +292,53 @@ export default {
       //分页
       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 +348,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 +396,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 +458,23 @@ 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
+        })
+      
+      // 打印价格对照表
+        // window.location.href="../../../static/payprint.html?data="+JSON.stringify(row)
+      },
     examine() {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要审核的条目')
@@ -319,16 +502,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 +530,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 +572,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 +597,9 @@ export default {
 /deep/.el-table--enable-row-transition .el-table__body td {
   text-align: center;
 }
+.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>

+ 248 - 34
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,10 +109,110 @@
       >
       </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>{{ }}</div> -->
+            <div style="margin-left:60px">皮检:{{ dialogData.skinInspector}}</div>
+          <!-- <div>{{ }}</div> -->
+        </div>
+        <div class="bottom-row2">
+          <div class="left">
+            <img src="../../../public/img/add.png" alt="" />
+          </div>
+          <div class="config">收货单位签名或盖章:</div>
+          <div class="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>
+    </el-dialog>
   </div>
 </template>
 <script>
-import { getweighingList, selectWarehouseSelf } from '@/model/houseSelfCollect/index'
+import {
+  getweighingList,
+  selectWarehouseSelf,
+  getPrint
+} from '@/model/houseSelfCollect/index'
 
 export default {
   components: {},
@@ -119,46 +232,81 @@ 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
+           console.log(this.dialogData)
+        })
+        .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){
+      console.log(this.warehouseList)
+      for (let i = 0; i < this.warehouseList.length; i++) {
+        if (this.warehouseList[i].value == e) {
           this.warehouseId = this.warehouseList[i].warehouseId
+         this.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>

+ 152 - 35
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,30 @@
         </div>
       </ws-form>
     </div>
+    <!-- <weighingManagement></weighingManagement> -->
   </div>
 </template>
 <script>
-import { tare, grossWeight } from '@/model/houseSelfCollect/index'
+import { tare, grossWeight, getamount } from '@/model/houseSelfCollect/index'
+// import weighingManagement from './weighingManagement.vue'
 export default {
+  components: {
+    // weighingManagement,
+  },
   data() {
     return {
       inspect: {},
       types: 1,
       information: '',
       weighingList: {
+        grossWeight:"",
         buckleMiscellaneous: 0,
       },
       tpyeNo: '',
       disabled: false,
       relationId: '',
       warehouseId: '',
+      purchasePriceList: [],
     }
   },
   activated() {
@@ -186,6 +192,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,36 +210,139 @@ 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) => {
@@ -239,16 +350,22 @@ export default {
                     title: '成功',
                     message: '保存成功',
                   })
+                  //   let newstr = document.getElementById('dialog').innerHTML
+                  // let oldstr = document.body.innerHTML
+                  // document.body.innerHTML = newstr
+                  // // window.print()
+                  // document.body.innerHTML = oldstr
+                  // window.location.reload()
                   this.$router.go(-1)
                 })
                 .catch((response) => {
                   // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
                 })
-            }
-          })
-          .catch(() => {
-            return false
-          })
+          }
+        })
+        .catch(() => {
+          return false
+        })
     },
   },
 }

+ 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.102: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/',