Bladeren bron

Merge branch 'rukuguanli' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc into rukuguanli

zhongtianhaoyuan 3 jaren geleden
bovenliggende
commit
b6e8db379f

+ 391 - 0
public/static/inspectionnew.html

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

+ 1 - 0
public/static/tradeServicesPrint.html

@@ -271,6 +271,7 @@
     </div>
   </body>
   <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
   <script src="https://unpkg.com/element-ui/lib/index.js"></script>
   <script type="text/javascript">
     new Vue({

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

@@ -62,6 +62,8 @@ export const API_GET_PAYMENT = '/paymentManagement/getInfo'
 export const API_POST_PAYMENT_EDIT = '/paymentManagement/api/editInfo'
 //质检客户下拉校验
 export const API_GET_INSPECT_GETAMOUNT = '/paymentManagement/cumulant'
+//质检运输方式
+export const API_GET_INSPECT_CONTRACTNO = '/inOutWarehouseTask/getContractNo'
 //识别身份证
 export const API_GET_CUSTOMER_GETIDENTITY = '/driverViewInfo/personShibie'
 //识别银行卡

+ 2 - 2
src/api/V2/notice/index.js

@@ -4,10 +4,10 @@ const baseUrl = process.env.VUE_APP_API_NOTICE
 export const API_GET_NOTICETASK_BUSINESSTYPEAMOUNT = `${baseUrl}/noticeTask/query/businessTypeAmount`
 
 // 任务列表数据查询
-export const API_GET_NOTICETASKS = `${baseUrl}/noticeTask/query/noticeTasks`
+export const API_GET_NOTICETASKS = `${baseUrl}/newNoticeTask/query/noticeTasks`
 
 // 查询 - 提醒 - 可处理模块及数量
-export const API_GET_NOTICEREMIND_BUSINESSTYPEAMOUNT = `${baseUrl}/noticeTask/query/noticeTasks`
+export const API_GET_NOTICEREMIND_BUSINESSTYPEAMOUNT = `${baseUrl}/newNoticeTask/query/noticeTasks`
 
 // 提醒 列表数据查询
 export const API_GET_NOTICEREMIND_NOTICEREMINDS = `${baseUrl}/noticeRemind/query/noticeReminds`

+ 2 - 0
src/lang/zh.js

@@ -1031,6 +1031,7 @@ export default {
     customerManagement: '客户管理',
     acquisitionManagement: '仓库设置',
     inspectionManagement: '质检管理',
+    inspectionManagementrecord:'质检管理记录',
     paymentManagement: '付款管理',
     weighingManagement: '检斤管理',
     newWeighingManagement: '新检斤管理',
@@ -7452,6 +7453,7 @@ export default {
     acquisitionManagement: '仓库设置',
     acquisitionManagementEdit: '收购管理编辑',
     inspectionManagement: '质检管理',
+    inspectionManagementrecord:'质检管理记录',
     paymentManagement: '付款管理',
     weighingManagement: '检斤管理',
     weighingManagement: '检斤管理',

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

@@ -50,7 +50,8 @@ import {
   API_GAT_QRCODE,
   API_GAT_GETQRCODE,
   API_GAT_INFO,
-  API_POST_WORKFLOW_TASK
+  API_POST_WORKFLOW_TASK,
+  API_GET_INSPECT_CONTRACTNO
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -116,6 +117,8 @@ export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorH
 export const postpaymentedit = appRx.post(API_POST_PAYMENT_EDIT, errorCatcher, errorHandle, filter)
 //质检客户下拉校验
 export const getamount = appRx.get(API_GET_INSPECT_GETAMOUNT, errorCatcher, errorHandle, filter)
+//质检运输方式
+export const getinspectcontractno = appRx.get(API_GET_INSPECT_CONTRACTNO, errorCatcher, errorHandle, filter)
 //身份证识别
 export const getIdentity = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)
 //银行卡识别

+ 45 - 3
src/views/houseSelfCollect/component/routers/route.js

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

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

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

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

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

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

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

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

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

+ 61 - 30
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -111,20 +111,20 @@
             <div class="input-item-margin">
               <div v-if="deptBudgetList.priceStatus=='审核中'&&pricetype==1">
                 <el-button type="primary" v-hasPermission="`tranManager.vehicleDispatching.reprice`" size="small"
-                  @click="examine()">审核中
+                  @click="examine(1)">审核中
                 </el-button>
               </div>
-              <el-button v-if="deptBudgetList.priceStatus!='审核中'&&pricetype==1" type="primary" @click="priceSubmit()">提交</el-button>
+              <el-button v-if="deptBudgetList.priceStatus!='审核中'&&pricetype==1" type="primary" @click="priceSubmit(1)">提交</el-button>
               <div v-if="deptBudgetList.priceStatusCar=='审核中'&&pricetype==2">
                 <el-button type="primary" v-hasPermission="`tranManager.vehicleDispatching.reprice`" size="small"
-                  @click="examine()">审核中
+                  @click="examine(2)">审核中
                 </el-button>
               </div>
-              <el-button v-if="deptBudgetList.priceStatusCar!='审核中'&&pricetype==2" type="primary" @click="priceSubmit()">提交</el-button>
+              <el-button v-if="deptBudgetList.priceStatusCar!='审核中'&&pricetype==2" type="primary" @click="priceSubmit(2)">提交</el-button>
             </div>
           </div>
-          <div class="content3" v-for="(item, index) in deptBudgetList.tranCarInfoList" :key="index">
-            <div v-if='item.fleetFlag==0' class="content3-item1">
+          <div class="content3" v-for="(item, index) in driverlist" :key="index">
+            <div class="content3-item1">
 
               <div class="">
                 <span style="margin-left: 30px;font-weight: 600;">司机-{{ index + 1 }}</span>
@@ -220,7 +220,7 @@
                   <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
                 </el-form-item>
                 <el-form-item v-else label="运输单价(元/车):" span="1" prop="carModel" label-width="125px">
-                  <el-input :disabled="readonly" v-model="item.tranPriceCar" size="small" />
+                  <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
                 </el-form-item>
               </el-col>
               <span v-if="item.status == '未装车'||item.temporaryDriverFlag!=0" width="22" height="22" class="del"
@@ -243,7 +243,7 @@
                   <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
                 </el-form-item>
                 <el-form-item v-else label="运输单价(元/车):" span="1" prop="carModel" label-width="125px">
-                  <el-input :disabled="readonly" v-model="item.tranPriceCar" size="small" />
+                  <el-input :disabled="readonly" v-model="item.tranPrice" size="small" />
                 </el-form-item>
               </el-col>
               <span v-if="!item.id" width="22" height="22" class="del"
@@ -366,9 +366,21 @@
           return arr
         }
       },
+      driverlist: function() {
+        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+          var arr = []
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+            if(this.deptBudgetList.tranCarInfoList[i].fleetFlag==0){
+              arr.push(this.deptBudgetList.tranCarInfoList[i])
+            }
+          }
+          return arr
+        }
+      },
     },
     methods: {
       pricetypechange(e){
+        console.log(e)
         this.deptBudgetList.billingMethod=e
         if (this.deptBudgetList.tranCarInfoList.length > 0) {
           for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
@@ -377,7 +389,7 @@
              if(e==1){
                this.deptBudgetList.tranCarInfoList[i].tranPrice=this.deptBudgetList.tranPrice
              }else{
-               this.deptBudgetList.tranCarInfoList[i].tranPriceCar=this.deptBudgetList.tranPriceCar
+               this.deptBudgetList.tranCarInfoList[i].tranPrice=this.deptBudgetList.tranPriceCar
              }
            }
           }
@@ -445,23 +457,40 @@
         }
       },
       addteam(){
-         if (!this.deptBudgetList.tranPrice) {
-          this.$message({
-            message: '请设置运输单价!',
-            type: 'warning',
-          })
-        } else {
-            this.deptBudgetList.tranCarInfoList.push({
-              fleetName:'',
-              fleetFlag:1,
-              index:this.deptBudgetList.tranCarInfoList.length,
-              billingMethod:this.pricetype,
-              tranPrice: this.deptBudgetList.tranPrice,
-              tranPriceCar:this.deptBudgetList.tranPriceCar,
-              tranType: '1',
+        if(this.pricetype==1){
+          if (!this.deptBudgetList.tranPrice) {
+            this.$message({
+              message: '请设置运输单价!',
+              type: 'warning',
             })
-         
+          } else {
+              this.deptBudgetList.tranCarInfoList.push({
+                fleetName:'',
+                fleetFlag:1,
+                index:this.deptBudgetList.tranCarInfoList.length,
+                billingMethod:this.pricetype,
+                tranPrice:this.deptBudgetList.tranPrice,
+                tranType: '1',
+              })
+          }
+        }else{
+          if (!this.deptBudgetList.tranPriceCar) {
+            this.$message({
+              message: '请设置运输单价!',
+              type: 'warning',
+            })
+          } else {
+              this.deptBudgetList.tranCarInfoList.push({
+                fleetName:'',
+                fleetFlag:1,
+                index:this.deptBudgetList.tranCarInfoList.length,
+                billingMethod:this.pricetype,
+                tranPrice:this.deptBudgetList.tranPriceCar,
+                tranType: '1',
+              })
+          }
         }
+         
       },
       add() {
         if (!this.deptBudgetList.tranPrice) {
@@ -539,11 +568,11 @@
         }
       },
       //审核
-      examine() {
+      examine(status) {
         this.$prompt('运输单价审核', {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
-          inputValue: this.deptBudgetList.billingMethod==1?this.deptBudgetList.tranPriceIng:this.deptBudgetList.tranPriceIngCar
+          inputValue: status==1?this.deptBudgetList.tranPriceIng:this.deptBudgetList.tranPriceIngCar
         }).then(({
           value
         }) => {
@@ -577,7 +606,7 @@
           );
         });
       },
-      priceSubmit() {
+      priceSubmit(status) {
         this.$confirm(`运输单价将发送给决策人审核,确定提交?`, {
             cancelButtonText: '取消',
             confirmButtonText: '确定',
@@ -591,7 +620,7 @@
             tranProcessInfo.tranPriceIng = this.deptBudgetList.tranPriceIng
             tranProcessInfo.billingMethod= this.deptBudgetList.billingMethod
             tranProcessInfo.tranPriceIngCar = this.deptBudgetList.tranPriceIngCar
-            if(this.deptBudgetList.billingMethod==2){
+            if(status==2){
               setUpTranPriceCar(tranProcessInfo)
               .toPromise()
               .then((response) => {
@@ -666,6 +695,7 @@
                   tranCarInfo.processNo = this.deptBudgetList.processNo
                   tranCarInfo.tranPrice = this.deptBudgetList.tranPrice
                   tranCarInfo.infoId = this.deptBudgetList.infoId
+                  tranCarInfo.billingMethod=this.pricetype
                   tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
                   dispatchCat(tranCarInfo)
                     .toPromise()
@@ -703,9 +733,10 @@
                 }
               }
             }
-
+            if(response.billingMethod){
+              this.pricetype=response.billingMethod
+            }
             this.deptBudgetList = response
-            console.log(this.deptBudgetList)
             this.fhaddress = response.sendPrivate + response.sendCity + response.sendArea + response
               .sendDetailedAddress
             this.shaddress = response.receivePrivate + response.receiveCity + response.receiveArea + response

+ 12 - 1
src/views/tranManagement/tranManagementVehicleLook.vue

@@ -105,7 +105,7 @@
       <div
         style="width: 100%"
         class="driver"
-        v-for="(item, index) in deptBudgetList.tranCarInfoList"
+        v-for="(item, index) in driverlist"
         :key="index"
       >
         <ws-info-table>
@@ -362,6 +362,17 @@ export default {
           return arr
         }
       },
+      driverlist: function() {
+        if (this.deptBudgetList.tranCarInfoList.length > 0) {
+          var arr = []
+          for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+            if(this.deptBudgetList.tranCarInfoList[i].fleetFlag==0){
+              arr.push(this.deptBudgetList.tranCarInfoList[i])
+            }
+          }
+          return arr
+        }
+      },
     },
   methods: {
     //返回按钮

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

@@ -600,6 +600,7 @@
       // }
     },
     methods: {
+    // 获取当前年月日
       // 千丰自动计算扣款
       automaticCalculation() {
         let _price = 0

+ 1 - 1
src/views/workNotification/utils/index.js

@@ -849,7 +849,7 @@ export function sale (code, state) {
   return undefined
 }
 export function tran (code, state) {
-  if (code === 'TRAN-TASK-APPROVE') {
+  if (code === 'TRAN-TASK-APPROVE'||code === 'TRAN-TEAM-APPROVE') {
     // 运输单价
     return 'vehicleDispatching'
   }