gjy пре 3 година
родитељ
комит
476a372a9a

+ 377 - 0
public/static/outInspectionPrint.html

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

+ 12 - 9
public/static/payprint.html

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

+ 1 - 0
public/static/weightCheck.html

@@ -410,6 +410,7 @@
       </div>
     </div>
   </body>
+  <!-- <script src="https://cdn.jsdelivr.net/npm/vue@2"></script> -->
   <script src="../cdn/vue/2.6.10/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">

+ 8 - 4
src/lang/zh.js

@@ -1032,7 +1032,7 @@ export default {
     dynamicReportsDetail: '动态报详情',
 
     // 库内自采
-    houseSelfCollect: '收购业务管理',
+    houseSelfCollect: '入库管理',
     deliverywarehouse:'出库管理',
     customerManagement: '客户管理',
     acquisitionManagement: '仓库设置',
@@ -1040,7 +1040,7 @@ export default {
     inspectionManagementrecord:'质检管理记录',
     paymentManagement: '付款管理',
     weighingManagement: '检斤管理',
-    newWeighingManagement: '检斤管理',
+    newWeighingManagement: '检斤管理',
     weightCheckRecord: '检斤记录',
     houseSelfCollectPrint: '查看',
     acquisitionManagementAdd: '收购管理',
@@ -1055,6 +1055,8 @@ export default {
     outboundManagement: '出库管理',
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    newQualityInspectionManagement: '新质检管理',
+    outInspectRecord:"质检记录",
     qualityInspection: '质检信息',
     collectionManagement: '收款管理',
     collectionment: '查看收款管理',
@@ -7468,8 +7470,8 @@ export default {
     paymentManagement: '付款管理',
     weighingManagement: '检斤管理',
     weighingManagement: '检斤管理',
-    newWeighingManagement: '检斤管理',
-    houseSelfCollect: '收购业务管理',
+    newWeighingManagement: '检斤管理',
+    houseSelfCollect: '入库管理',
     deliverywarehouse:'出库管理',
     houseSelfCollectPrint: '查看',
     customerManagementEdit: '客户管理编辑',
@@ -7482,6 +7484,8 @@ export default {
   outboundManagement: {
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    newQualityInspectionManagement: '新质检管理',
+    outInspectRecord:"质检记录",
     qualityInspection: '质检信息',
     collectionManagement: '收款管理',
   }

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

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

+ 21 - 20
src/views/houseSelfCollect/component/routers/route.js

@@ -112,14 +112,28 @@ const houseSelfCollectRouter = {
         // keepAlive:true
       }
     },
-    // 检斤管理
-    {
-      path: 'weighingManagement',
+    // // 检斤管理
+    // {
+    //   path: 'weighingManagement',
+    //   component: () =>
+    //     import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/weighingManagement'),
+    //   name: 'weighingManagement',
+    //   meta: {
+    //     title: 'weighingManagement',
+    //     shortcutEntrance: 'houseSelfCollect',
+    //     module: 'acquisitionManagement.acquisitionWeight.view',
+    //     permissicon: [],
+    //     keepAlive: true
+    //   }
+    // },
+     // 新检斤管理
+     {
+      path: 'newWeighingManagement',
       component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/weighingManagement'),
-      name: 'weighingManagement',
+        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/newWeighingManagement'),
+      name: 'newWeighingManagement',
       meta: {
-        title: 'weighingManagement',
+        title: 'newWeighingManagement',
         shortcutEntrance: 'houseSelfCollect',
         module: 'acquisitionManagement.acquisitionWeight.view',
         permissicon: [],
@@ -196,20 +210,7 @@ const houseSelfCollectRouter = {
       },
       hidden: true
     },
-    // 新检斤管理
-    {
-      path: 'newWeighingManagement',
-      component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/houseSelfCollect/newWeighingManagement'),
-      name: 'newWeighingManagement',
-      meta: {
-        title: 'newWeighingManagement',
-        shortcutEntrance: 'houseSelfCollect',
-        module: 'acquisitionManagement.acquisitionWeight.view',
-        permissicon: [],
-        keepAlive: true
-      }
-    },
+   
     // 记录
     {
       path: 'weightCheckRecord',

+ 5 - 4
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -105,11 +105,11 @@
                 <ws-form-item v-if='statusTypetext!="初检"&&serviceManagementType==1' label="经办人" span="1" prop="agent">
                   <ws-input v-model="deptBudgetList.agent" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
                 </ws-form-item>
-                <ws-form-item label="净重单价(元/公斤)" span="1" prop="tidalGrainPrice" v-if="deptBudgetList.type == '潮粮'&&serviceManagementType==3">
+                <ws-form-item label="净重单价(元/公斤)" span="1" prop="tidalGrainPrice" v-if="deptBudgetList.type == '潮粮' && serviceManagementType == 3">
                   <ws-input type="number" @mousewheel.native.prevent v-model="deptBudgetList.tidalGrainPrice" placeholder="请输入净重单价"
                     maxlength="10" size="small"  />
                 </ws-form-item>
-                <ws-form-item label="干粮单价(元/公斤)" span="2" prop="dryGrainPrice" v-if="deptBudgetList.type == '干粮'&&serviceManagementType==3">
+                <ws-form-item label="干粮单价(元/公斤)" span="2" prop="dryGrainPrice" v-if="deptBudgetList.type == '干粮' && serviceManagementType == 3">
                   <ws-input type="number" @mousewheel.native.prevent v-model="deptBudgetList.dryGrainPrice" placeholder="请输入干粮单价"
                     maxlength="10" size="small"  />
                 </ws-form-item>
@@ -323,6 +323,7 @@
   } from '@/model/warehouse/index'
   import inspectInfoPrint from './component/inspectInfoPrint.vue'
     import html2canvas from 'html2canvas'
+    import axios from 'axios'
   export default {
     components: {
       inspectInfoPrint
@@ -605,7 +606,7 @@
             .then((response) => {
               if (this.deptBudgetList.paramType == '1') {
                 this.deptBudgetList.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.deptBudgetList
-                  .buckleMiscellaneous) / 100 * parseFloat(this.deptBudgetList.dryGrainPrice)).toFixed(4)
+                  .buckleMiscellaneous) / 100 * parseFloat(this.deptBudgetList.dryGrainPrice?this.deptBudgetList.dryGrainPrice:0 )).toFixed(4)
               } else {
                 if (this.inspect.type == '干粮') {
                   if (response == 0) {
@@ -1059,7 +1060,6 @@
           })
           return
         }
-        
         if (!this.deptBudgetList.carNo) {
           this.$message({
             message: '车牌号不能为空',
@@ -1520,6 +1520,7 @@
           }
         }
         console.log(this.deptBudgetList, '入库对象')
+
         this.$confirm(`确定提交入库信息`, {
             cancelButtonText: '取消',
             confirmButtonText: '确定',

+ 12 - 9
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -160,13 +160,13 @@
                 <div @click="cutstatus(2)" :class="status==2?'select_css':'noselect_css'" v-if="!(inWarehouseType == 1 && tpyeNo == 2)">已称{{information}}</div>
               </div>
             <div class="screen_right">
-              <div @click="record" v-hasPermission="`acquisitionManagement.acquisitionWeight.view`">记录</div>
+              <div @click="record" v-hasPermission="`acquisitionManagement.acquisitionWeight.view`" class="jilu">记录</div>
             </div>
             
             </div>
             
             <el-table ref="singleTable" :data="carList" highlight-current-row @current-change="handleCurrentChange"
-              style="width: 100%; overflow: auto; height: calc(100vh - 55vh);margin-top:20px">
+              style="width: 100%; overflow-y: scroll !important;; height: calc(100vh - 54vh);margin-top:20px">
               <el-table-column property="number" label="业务编号">
               </el-table-column>
               <el-table-column property="carNumber" label="车牌号">
@@ -870,15 +870,9 @@ this.deptBudgetTotal = this.carList.length
           }
         })
         this.isShowPrint = false
-        // this.$router.push({
-        //   path: 'weighingManagement'
-        // })
       },
       closePrint() {
         this.isShowPrint = false
-        // this.$router.push({
-        //   path: 'weighingManagement'
-        // })
       },
       print() {
         if (this.reader) {
@@ -1286,6 +1280,9 @@ this.deptBudgetTotal = this.carList.length
           text-align: center;
           font-weight: 600;
         }
+         .in_css:hover,.in_cssno:hover,.in_cssno1:hover,.in_css1:hover{
+           cursor:pointer;
+         }
         .in_css{
           color: #5878E8;
           background: #F0F6FF;
@@ -1476,6 +1473,9 @@ this.deptBudgetTotal = this.carList.length
           line-height: 28px;
           text-align: center;
     }
+     .select_css:hover,.noselect_css:hover{
+       cursor:pointer;
+     }
     .select_css{
       color: #5878E8 ;
       background: #F0F6FF;
@@ -1486,9 +1486,12 @@ this.deptBudgetTotal = this.carList.length
       justify-content: flex-end;
       display: flex;
       margin-right: 30px;
-      div{
+      .jilu{
         color: #5878E8 ;
       }
+     .jilu:hover{
+        cursor:pointer;
+      }
     }
     /deep/.el-select{
       width: 50%;

+ 27 - 21
src/views/houseSelfCollect/settlement.vue

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

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

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

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

@@ -67,6 +67,35 @@ const outboundManagementRouter = {
                 permissicon: [],
                 keepAlive: true
             }
+        },
+         // 质检管理
+         {
+          path: 'newQualityInspectionManagement',
+          component: () =>
+              import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/newQualityInspectionManagement'),
+          name:'newQualityInspectionManagement',
+          meta: {
+              title:'newQualityInspectionManagement',
+              shortcutEntrance:'outboundManagement',
+              module:'outbound.acquisitionQualityOut.view',
+              permissicon: [],
+              keepAlive: true
+          }
+        },
+        // 质检记录
+        {
+          path: 'outInspectRecord',
+          component: () =>
+            import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/outInspectRecord'),
+          name: 'outInspectRecord',
+          meta: {
+            title: 'outInspectRecord',
+            shortcutEntrance: 'outInspectRecord',
+            module: 'outbound.acquisitionQualityOut.edit',
+            permissicon: [],
+            keepAlive: true
+          },
+          hidden: true
         },
         // 查看/编辑质检信息
         {

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

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

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

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

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

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