浏览代码

入库 出库 更新 sdy

zhongtianhaoyuan 3 年之前
父节点
当前提交
f1335083cc

+ 23 - 33
public/static/outInspectionPrint.html

@@ -142,20 +142,20 @@
         <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" colspan="2">{{ tableData.contractManagement.buyer }}</td>
+            <td class="col col-bgc">联系电话</td>
+            <td class="col" colspan="2">{{ tableData.contractManagement.buyerPhone }}</td>
             <td class="col col-bgc">车牌号</td>
-            <td class="col">{{tableData.carNumber}}</td>
+            <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.contractManagement.seller }}</td>
             <td class="col col-bgc">联系人</td>
-            <td class="col" colspan="2">{{tableData.person}}</td>
+            <td class="col" colspan="2">{{ tableData.contractManagement.feedbackLeader }}</td>
             <td class="col col-bgc">联系电话</td>
-            <td class="col">{{tableData.personPhone}}</td>
+            <td class="col">{{ tableData.contractManagement.sellerPhone }}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc">货名</td>
@@ -174,14 +174,10 @@
             <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-if="tableData.contractManagement.priceType == '定价销售'" 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>
+            <!-- <td v-if="tableData.type == '潮粮'" class="col">{{ tableData.tidalGrainPrice }}</td> -->
+            <td class="col">{{ tableData.contractManagement.unitContractPrice }}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc">杂质(%)</td>
@@ -190,18 +186,12 @@
             <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 colspan="2"></td>
+            <!-- <td v-if="tableData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
             <td v-else class="col col-bgc" colspan="2">购粮性质</td>
             <td v-if="tableData.paramType == '1'" class="col" colspan="1">{{ tableData.natureOfGrainPurchase }}</td>
-            <td v-else class="col" colspan="2">{{ tableData.natureOfGrainPurchase }}</td>
-          </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>
+            <td v-else class="col" colspan="2">{{ tableData.natureOfGrainPurchase }}</td> -->
+            <td colspan="2"></td>
           </tr>
         </table>
         <div class="bottom">
@@ -331,11 +321,13 @@
     new Vue({
       el: '#app',
       data: {
-        tableData: "",
+        tableData: {
+          contractManagement:{},
+
+        },
         name: "",
         bigContent: false,
         smallContent: false,
-        printData :{},
       },
       computed: {},
       methods: {
@@ -363,17 +355,15 @@
         },
       },
       mounted() {
-        debugger
-        let _data = decodeURIComponent(this.getQueryVariable("dataList"))
-        let _type = decodeURIComponent(this.getQueryVariable("type"))
-        if (_type == 2) {
+        _data = localStorage.getItem("out-Warehouse_print")
+        this.tableData = JSON.parse(_data)
+        if (this.tableData.type == 2) {
           this.bigContent = true
           this.smallContent = false
         } else {
           this.smallContent = true
           this.bigContent = false
         }
-        this.tableData = JSON.parse(_data)
         document.title="粮食质检单"
         window.print()
         window.onafterprint = function(event) {

+ 2 - 1
public/static/weightCheck.html

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

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

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

+ 11 - 8
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -160,7 +160,7 @@
                 <div @click="cutstatus(2)" :class="status==2?'select_css':'noselect_css'" v-if="!(inWarehouseType == 1 && tpyeNo == 2)">已称{{information}}</div>
               </div>
             <div class="screen_right">
-              <div @click="record" v-hasPermission="`acquisitionManagement.acquisitionWeight.view`">记录</div>
+              <div @click="record" v-hasPermission="`acquisitionManagement.acquisitionWeight.view`" class="jilu">记录</div>
             </div>
             
             </div>
@@ -870,15 +870,9 @@ this.deptBudgetTotal = this.carList.length
           }
         })
         this.isShowPrint = false
-        // this.$router.push({
-        //   path: 'weighingManagement'
-        // })
       },
       closePrint() {
         this.isShowPrint = false
-        // this.$router.push({
-        //   path: 'weighingManagement'
-        // })
       },
       print() {
         if (this.reader) {
@@ -1286,6 +1280,9 @@ this.deptBudgetTotal = this.carList.length
           text-align: center;
           font-weight: 600;
         }
+         .in_css:hover,.in_cssno:hover,.in_cssno1:hover,.in_css1:hover{
+           cursor:pointer;
+         }
         .in_css{
           color: #5878E8;
           background: #F0F6FF;
@@ -1476,6 +1473,9 @@ this.deptBudgetTotal = this.carList.length
           line-height: 28px;
           text-align: center;
     }
+     .select_css:hover,.noselect_css:hover{
+       cursor:pointer;
+     }
     .select_css{
       color: #5878E8 ;
       background: #F0F6FF;
@@ -1486,9 +1486,12 @@ this.deptBudgetTotal = this.carList.length
       justify-content: flex-end;
       display: flex;
       margin-right: 30px;
-      div{
+      .jilu{
         color: #5878E8 ;
       }
+     .jilu:hover{
+        cursor:pointer;
+      }
     }
     /deep/.el-select{
       width: 50%;

+ 16 - 12
src/views/outboundManagement/component/outInspectPrint.vue

@@ -5,25 +5,25 @@
     <table class="table">
       <tr class="row">
         <td class="col col-bgc">收货单位</td>
-        <td class="col" colspan="2">{{ printData.customerName }}</td>
+        <td class="col" colspan="2">{{ printData.contractManagement.buyer }}</td>
         <td class="col col-bgc">联系电话</td>
-        <td class="col" colspan="2">{{ printData.customerPhone }}</td>
+        <td class="col" colspan="2">{{ printData.contractManagement.buyerPhone }}</td>
         <td class="col col-bgc">车牌号</td>
         <td class="col">{{ printData.carNumber }}</td>
       </tr>
       <tr class="row">
         <td class="col col-bgc">发货单位</td>
-        <td class="col" colspan="2">{{ printData.customerName }}</td>
+        <td class="col" colspan="2">{{ printData.contractManagement.seller }}</td>
         <td class="col col-bgc">联系人</td>
-        <td class="col" colspan="2">{{ printData.customerPhone }}</td>
+        <td class="col" colspan="2">{{ printData.contractManagement.feedbackLeader }}</td>
         <td class="col col-bgc">联系电话</td>
-        <td class="col">{{ printData.carNumber }}</td>
+        <td class="col">{{ printData.contractManagement.sellerPhone }}</td>
       </tr>
       <tr class="row">
         <td class="col col-bgc">货名</td>
         <td class="col">{{ printData.goodsName }}</td>
         <td class="col col-bgc">类型</td>
-        <td class="col">{{ printData.type }}</td>
+        <td class="col">{{ printData.weighingManagement.type }}</td>
         <td class="col col-bgc">容量(克/升)</td>
         <td class="col">{{ printData.bulkDensity }}</td>
         <td class="col col-bgc">不完善粒(%)</td>
@@ -36,10 +36,10 @@
         <td class="col">{{ printData.waterContent }}</td>
         <td class="col col-bgc">热损伤(%)</td>
         <td class="col">{{ printData.jiaorenli }}</td>
-        <td v-if="printData.confirm == '1'" class="col col-bgc">单价(元/公斤)</td>
+        <td v-if="printData.contractManagement.priceType == '定价销售'" class="col col-bgc">单价(元/公斤)</td>
         <td v-else class="col col-bgc">待定单价(元/公斤)</td>
-        <td v-if="printData.type == '潮粮'" class="col">{{ printData.tidalGrainPrice }}</td>
-        <td v-else class="col">{{ printData.dryGrainPrice }}</td>
+        <!-- <td v-if="printData.type == '潮粮'" class="col">{{ printData.tidalGrainPrice }}</td> -->
+        <td class="col">{{ printData.contractManagement.unitContractPrice }}</td>
       </tr>
       <tr class="row">
         <td class="col col-bgc">杂质(%)</td>
@@ -48,11 +48,12 @@
         <td class="col">{{ printData.mildewGrain }}</td>
         <td v-if="printData.paramType == '1'"  class="col col-bgc">扣杂</td>
         <td v-if="printData.paramType == '1'"  class="col">{{printData.buckleMiscellaneous}}</td>
-        <td v-if="printData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
+        <!-- <td v-if="printData.paramType == '1'" class="col col-bgc" colspan="1">购粮性质</td>
         <td v-else class="col col-bgc" colspan="2">购粮性质</td>
         <td v-if="printData.paramType == '1'" class="col" colspan="1">{{ printData.natureOfGrainPurchase }}</td>
-        <td v-else class="col" colspan="2">{{ printData.natureOfGrainPurchase }}</td>
-      </tr>>
+        <td v-else class="col" colspan="2">{{ printData.natureOfGrainPurchase }}</td> -->
+        <td colspan="2"></td>
+      </tr>
     </table>
     <div class="bottom">
       <div class="bottom-row1">
@@ -148,4 +149,7 @@
     margin-top: 50px;
     text-align: center;
   }
+  .center{
+    background: #ffffff !important;
+  }
 </style>

+ 172 - 108
src/views/outboundManagement/newQualityInspectionManagement.vue

@@ -16,7 +16,7 @@
               <ws-input v-model="inspect.binNumber" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="业务编号" span="1" prop="number">
-              <ws-input v-model="inspect.number" placeholder="自动获取,不可编辑" disabled size="small" />
+              <ws-input v-model="inspect.weighingManagement.number" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="囤位号" span="1" prop="storageTagNo">
               <ws-input v-model="inspect.storageTagNo" placeholder="暂无" disabled size="small" />
@@ -25,26 +25,26 @@
               <ws-input v-model="inspect.contractNo" placeholder="自动获取,不可编辑" disabled size="small" v-if="inspect.contractNo" />
               <ws-input v-model="inspect.moveTaskNo" placeholder="自动获取,不可编辑" disabled size="small" v-else/>
             </ws-form-item>
-            <ws-form-item label="提示" span="1" prop="goodsName">
-              <ws-input v-model="inspect.goodsName" placeholder="暂无" disabled size="small" />
+            <ws-form-item label="提示" span="1" prop="tips">
+              <ws-input v-model="inspect.weighingManagement.tips" placeholder="暂无" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="goodsName">
               <ws-input v-model="inspect.goodsName" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
-            <ws-form-item label="经办人" span="1" prop="agent">
-              <ws-input v-model="inspect.agent" placeholder="自动获取,不可编辑" disabled size="small" />
+            <ws-form-item label="经办人" span="1" prop="secretaryWeigher">
+              <ws-input v-model="inspect.weighingManagement.secretaryWeigher" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="出库类型" span="1" prop="inOutType">
               <ws-input v-model="inspect.weighingManagement.inOutType" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
-            <ws-form-item label="出库日期" span="1" prop="inOutDate">
-              <ws-input v-model="inspect.inOutDate" placeholder="自动获取,不可编辑" disabled size="small" />
+            <ws-form-item label="出库日期" span="1" prop="updateDate">
+              <ws-input v-model="inspect.updateDate" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="运输方式" span="1" prop="outType">
-              <ws-input v-model="inspect.outType" placeholder="自动获取,不可编辑" disabled size="small" />
+              <ws-input v-model="inspect.weighingManagement.outType" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="车队" span="1" prop="fleet">
-              <ws-input v-model="inspect.fleet" placeholder="自动获取,不可编辑" disabled size="small" />
+              <ws-input v-model="inspect.fleet" placeholder="非车辆车队" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="车牌号" span="1" prop="carNumber">
               <ws-input v-model="inspect.carNumber" placeholder="自动获取,不可编辑" disabled size="small" />
@@ -73,10 +73,10 @@
         </el-select>
         <div class="screen">
           <div class="screen_left">
-            <el-badge :value="inspectList.length" class="badge_item">
+            <el-badge :value="noinspectList.length" class="badge_item">
               <div :class="inspectbtn == 1 ? 'inspect_css':'noinspect_css'" @click="inspectChange(1)">未质检</div>
             </el-badge>
-            <el-badge :value="noinspectList.length" class="badge_item">
+            <el-badge :value="inspectList.length" class="badge_item">
               <div :class="inspectbtn == 2 ? 'inspect_css':'noinspect_css'" @click="inspectChange(2)">已质检</div>
             </el-badge>
           </div>
@@ -99,9 +99,10 @@
             </template>
           </el-table-column>
         </el-table> -->
-        <el-table ref="singleTable" :data="inspectList" highlight-current-row @current-change="rowChange"
+        <el-table ref="singleTable" :data="switchList" highlight-current-row @current-change="rowChange"
               style="width: 100%; overflow-y: scroll !important; height: calc(100vh - 54vh);margin-top:14px">
               <el-table-column property="number" label="业务编号">
+                <span slot-scope="scope">{{scope.row.weighingManagement?scope.row.weighingManagement.number:""}}</span>
               </el-table-column>
               <el-table-column property="carNumber" label="车牌号">
               </el-table-column>
@@ -151,12 +152,12 @@
           </ws-info-table>
         </ws-form>
         <div class="but">
-            <el-button @click="print" type="primary">提交</el-button>
+            <!-- <el-button @click="print" type="primary">提交</el-button> -->
             <el-button @click="print" type="primary">提交并打印</el-button>
           </div>
       </div>
     </div>
-     <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单">
+     <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单"  @close="closeDialog">
       <!-- <inspectInfoPrint :printData="printData"></inspectInfoPrint> -->
       <outInspectPrint :printData="printData" ref="saveImg"></outInspectPrint>
       <div style="text-align:center">
@@ -176,6 +177,8 @@
   import {
     packList
   } from '@/model/contarct/index'
+  import html2canvas from 'html2canvas'
+    import axios from 'axios'
    import outInspectPrint from './component/outInspectPrint.vue'
   export default {
     components: {
@@ -195,6 +198,7 @@
         inspectbtn: 1,
         inspectList: [],
         noinspectList:[],
+        switchList:[],
         //分页
         currentPage: 1,
         pageSize: 10,
@@ -249,10 +253,14 @@
     },
     methods: {
       printSmall(){
-        window.open('../../../static/outInspectionPrint.html?type=1&dataList=' + JSON.stringify(this.inspect))
+        this.inspect.type = 1
+        localStorage.setItem('out-Warehouse_print',JSON.stringify( this.inspect))
+        window.open('../../../static/outInspectionPrint.html')
       },
        printBig(){
-        window.open('../../../static/outInspectionPrint.html?type=2&dataList=' + JSON.stringify(this.inspect))
+         this.inspect.type = 2
+        localStorage.setItem('out-Warehouse_print',JSON.stringify(this.inspect))
+        window.open('../../../static/outInspectionPrint.html')
        },
       warehouseNameChange() {
         this.getList()
@@ -266,6 +274,21 @@
       },
       inspectChange(num) {
         this.inspectbtn = num
+        if(num == 1){
+          this.switchList = this.noinspectList
+        }else if(num == 2){
+          this.switchList = this.inspectList
+        }
+        if(this.switchList.length > 0){
+         this.inspect = this.switchList[0]
+         if(!this.inspect.weighingManagement){
+           this.inspect.weighingManagement = {}
+         }
+        }else{
+          this.inspect = {}
+        }
+        
+        this.deptBudgetTotal =  this.switchList.length
 
       },
        handleSizeChange(val) {
@@ -302,71 +325,97 @@
         }
         return year + '' + mouth + datetime
       },
+      closeDialog() {
+        html2canvas(this.$refs.saveImg.$el).then((canvas) => {
+          let dataURL = canvas.toDataURL('image/png')
+          this.imgUrl = dataURL
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImage')
+            let formdata = new FormData()
+            formdata.append('file', b)
+            axios({
+              method: 'post',
+              url: 'https://www.zthymaoyi.com/upload/admin',
+              data: formdata,
+            }).then((response) => {
+              //编辑接口
+              this.inspect.pictureAddress = response.data.url
+              addOut(this.inspect)
+              .toPromise()
+              .then((response) => {
+                console.log(response)
+              })
+            })
+          }
+        })
+        this.isShowPrint = false
+      },
       print() {
         this.inspect.warehouseName = this.warehouseName
-        this.inspect.id = this.$route.query.id
+        // this.inspect.id = this.$route.query.id
         this.inspect.qualityInspector = localStorage.getItem('ws-pf_staffName')
         this.inspect.compId = localStorage.getItem('ws-pf_compId')
-        if (!this.inspect.grade) {
-          this.$message({
-            message: '等级不能为空',
-            type: 'warning',
-          })
-          return
-        }
-        if (!this.inspect.impurity) {
+        // if (!this.inspect.grade) {
+        //   this.$message({
+        //     message: '等级不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (!this.inspect.impurity) {
+        //   this.$message({
+        //     message: '杂质不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.impurity && (this.inspect.impurity < 0 || this.inspect.impurity > 40)) {
           this.$message({
-            message: '杂质不能为空',
+            message: '杂质输入错误',
             type: 'warning',
           })
           return
         }
-        if (String(this.inspect.impurity).indexOf('.') != -1 && String(this.inspect.impurity).length - (String(this
+        if (this.inspect.impurity && String(this.inspect.impurity).indexOf('.') != -1 && String(this.inspect.impurity).length - (String(this
             .inspect.impurity).indexOf('.') + 1) > 1) {
           this.$message({
-            message: '杂质输入错误',
+            message: '杂质应保留一位小数',
             type: 'warning',
           })
           return
         }
 
-        if (this.inspect.impurity < 0 || this.inspect.impurity > 40) {
-          this.$message({
-            message: '杂质输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (!this.inspect.waterContent) {
-          this.$message({
-            message: '水分不能为空',
-            type: 'warning',
-          })
-          return
-        }
-        if (this.inspect.waterContent < 0 || this.inspect.waterContent > 40) {
+        
+        // if (!this.inspect.waterContent) {
+        //   this.$message({
+        //     message: '水分不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.waterContent && (this.inspect.waterContent < 0 || this.inspect.waterContent > 40)) {
           this.$message({
             message: '水分输入错误',
             type: 'warning',
           })
           return
         }
-        if (String(this.inspect.waterContent).indexOf('.') != -1 && String(this.inspect.waterContent).length - (String(
+        if (this.inspect.waterContent && String(this.inspect.waterContent).indexOf('.') != -1 && String(this.inspect.waterContent).length - (String(
             this.inspect.waterContent).indexOf('.') + 1) > 1) {
           this.$message({
-            message: '水分输入错误',
-            type: 'warning',
-          })
-          return
-        }
-        if (!this.inspect.mildewGrain) {
-          this.$message({
-            message: '霉变粒不能为空',
+            message: '水分应保留一位小数',
             type: 'warning',
           })
           return
         }
-        if (this.inspect.mildewGrain < 0 || this.inspect.mildewGrain > 40) {
+        // if (!this.inspect.mildewGrain) {
+        //   this.$message({
+        //     message: '霉变粒不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.mildewGrain && this.inspect.mildewGrain < 0 || this.inspect.mildewGrain > 40) {
           this.$message({
             message: '霉变粒输入错误',
             type: 'warning',
@@ -376,26 +425,26 @@
         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: '容重不能为空',
+            message: '霉变粒应保留一位小数',
             type: 'warning',
           })
           return
         }
-        if (this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
+        // if (!this.inspect.bulkDensity) {
+        //   this.$message({
+        //     message: '容重不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.bulkDensity && this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
           this.$message({
             message: '容重输入错误',
             type: 'warning',
           })
           return
         }
-        if (String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect.bulkDensity).length - (String(
+        if (this.inspect.bulkDensity && String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect.bulkDensity).length - (String(
             this.inspect.bulkDensity).indexOf('.') + 1) > 0) {
           this.$message({
             message: '容重需输入整数',
@@ -403,14 +452,14 @@
           })
           return
         }
-        if (!this.inspect.jiaorenli) {
-          this.$message({
-            message: '热损伤不能为空',
-            type: 'warning',
-          })
-          return
-        }
-        if (this.inspect.jiaorenli < 0 || this.inspect.jiaorenli > 40) {
+        // if (!this.inspect.jiaorenli) {
+        //   this.$message({
+        //     message: '热损伤不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.jiaorenli && this.inspect.jiaorenli < 0 || this.inspect.jiaorenli > 40) {
           this.$message({
             message: '热损伤输入错误',
             type: 'warning',
@@ -420,29 +469,29 @@
         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: '不完善粒不能为空',
+            message: '热损伤应保留一位小数',
             type: 'warning',
           })
           return
         }
-        if (this.inspect.imperfectGrain < 0 || this.inspect.imperfectGrain > 40) {
+        // if (!this.inspect.imperfectGrain) {
+        //   this.$message({
+        //     message: '不完善粒不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.inspect.imperfectGrain && this.inspect.imperfectGrain < 0 || this.inspect.imperfectGrain > 40) {
           this.$message({
             message: '不完善粒输入错误',
             type: 'warning',
           })
           return
         }
-        if (String(this.inspect.imperfectGrain).indexOf('.') != -1 && String(this.inspect.imperfectGrain).length - (
+        if ( this.inspect.imperfectGrain && String(this.inspect.imperfectGrain).indexOf('.') != -1 && String(this.inspect.imperfectGrain).length - (
             String(this.inspect.imperfectGrain).indexOf('.') + 1) > 1) {
           this.$message({
-            message: '不完善粒输入错误',
+            message: '不完善粒应保留一位小数',
             type: 'warning',
           })
           return
@@ -478,32 +527,49 @@
             pageSize: this.pageSize,
             warehouseName: this.warehouseName,
             managementType: this.managementType,
-            // statusType:1
+             qualityType:1
+          })
+          .toPromise()
+          .then((response) => {
+            debugger
+            this.noinspectList = response.records
+             if(this.inspectbtn == 1 && this.noinspectList.length > 0){
+               this.switchList = this.noinspectList
+                this.inspect = this.noinspectList[0]
+                if(!this.inspect.weighingManagement){
+                   this.inspect.weighingManagement = {}
+                }
+            }else{
+               this.switchList = []
+                this.inspect = {}
+                this.inspect.weighingManagement = {}
+            }
+            this.deptBudgetTotal = this.switchList.length
+          })
+          getinspectList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            warehouseName: this.warehouseName,
+            managementType: this.managementType,
+            qualityType:2
           })
           .toPromise()
           .then((response) => {
             this.inspectList = response.records
-             if(this.inspectbtn == 1 && this.inspectList.length > 0){
+            if(this.inspectbtn == 2 && this.inspectList.length > 0){
+                this.switchList = this.inspectList
                 this.inspect = this.inspectList[0]
+                  if(!this.inspect.weighingManagement){
+                   this.inspect.weighingManagement = {}
+                }
+            }else{
+              this.switchList = []
+              this.inspect = {}
+                this.inspect.weighingManagement = {}
             }
-            this.deptBudgetTotal = response.total
+            this.deptBudgetTotal = this.switchList.length
           })
-          // getinspectList({
-          //   compId: localStorage.getItem('ws-pf_compId'),
-          //   currentPage: this.currentPage,
-          //   pageSize: this.pageSize,
-          //   warehouseName: this.warehouseName,
-          //   managementType: this.managementType,
-          //   // statusType:2
-          // })
-          // .toPromise()
-          // .then((response) => {
-          //   this.noinspectList = response.records
-          //   if(this.inspect == 2 && this.inspectList.length > 0){
-          //       this.inspect = this.noinspectList[0]
-          //   }
-          //   this.deptBudgetTotal = response.total
-          // })
       },
     },
   }
@@ -536,12 +602,6 @@
   /deep/.ws-info-table .el-form-item .el-form-item__content {
     border: none;
   }
-
-  // .title {
-  //   font-size: 16px;
-  //   font-weight: 600;
-  // }
-
   .title::before {
     content: '';
     display: inline-block;
@@ -610,7 +670,7 @@
           width: 50%;
         }
         .screen_left{
-            min-width: 175px;
+            min-width: 182px;
         }
 
         .badge_item {
@@ -625,6 +685,10 @@
           border-radius: 4px;
           text-align: center;
           line-height: 32px;
+          
+        }
+        .record:hover,.inspect_css:hover,.noinspect_css:hover{
+          cursor:pointer;
         }
 
         .inspect_css {

+ 3 - 1
src/views/outboundManagement/outInspectRecord.vue

@@ -37,7 +37,9 @@
           <span v-else>{{ scope.$index + 1 }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="number" label="业务编号"></el-table-column>
+      <el-table-column prop="number" label="业务编号">
+        <span slot-scope="scope">{{scope.row.weighingManagement?scope.row.weighingManagement.number:""}}</span>
+      </el-table-column>
       <el-table-column prop="contractNo" label="合同编号/移库编号" width="122"></el-table-column>
       <el-table-column prop="carNumber" label="车牌号"></el-table-column>
       <el-table-column prop="goodsName" label="货名"></el-table-column>

+ 9 - 8
src/views/outboundManagement/qualityInspection.vue

@@ -29,7 +29,7 @@
               <ws-input v-model="inspect.binNumber" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="业务编号" span="1" prop="number">
-              <ws-input v-model="inspect.number" placeholder="自动获取,不可编辑" disabled size="small" />
+              <ws-input v-model="inspect.weighingManagement.number" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="囤位号" span="1" prop="storageTagNo">
               <ws-input v-model="inspect.storageTagNo" placeholder="暂无" disabled size="small" />
@@ -38,23 +38,23 @@
               <ws-input v-model="inspect.contractNo" placeholder="自动获取,不可编辑" disabled size="small" v-if="inspect.contractNo" />
               <ws-input v-model="inspect.moveTaskNo" placeholder="自动获取,不可编辑" disabled size="small" v-else/>
             </ws-form-item>
-            <ws-form-item label="提示" span="1" prop="goodsName">
-              <ws-input v-model="inspect.goodsName" placeholder="暂无" disabled size="small" />
+            <ws-form-item label="提示" span="1" prop="tips">
+              <ws-input v-model="inspect.weighingManagement.tips" placeholder="暂无" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="goodsName">
               <ws-input v-model="inspect.goodsName" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
-            <ws-form-item label="经办人" span="1" prop="agent">
-              <ws-input v-model="inspect.agent" placeholder="自动获取,不可编辑" disabled size="small" />
+            <ws-form-item label="经办人" span="1" prop="secretaryWeigher">
+              <ws-input v-model="inspect.weighingManagement.secretaryWeigher" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="出库类型" span="1" prop="inOutType">
               <ws-input v-model="inspect.weighingManagement.inOutType" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
-            <ws-form-item label="出库日期" span="1" prop="inOutDate">
-              <ws-input v-model="inspect.inOutDate" placeholder="自动获取,不可编辑" disabled size="small" />
+            <ws-form-item label="出库日期" span="1" prop="updateDate">
+              <ws-input v-model="inspect.updateDate" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="运输方式" span="1" prop="outType">
-              <ws-input v-model="inspect.outType" placeholder="自动获取,不可编辑" disabled size="small" />
+              <ws-input v-model="inspect.weighingManagement.outType" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
             <ws-form-item label="车队" span="1" prop="fleet">
               <ws-input v-model="inspect.fleet" placeholder="自动获取,不可编辑" disabled size="small" />
@@ -62,6 +62,7 @@
             <ws-form-item label="车牌号" span="1" prop="carNumber">
               <ws-input v-model="inspect.carNumber" placeholder="自动获取,不可编辑" disabled size="small" />
             </ws-form-item>
+
             <ws-form-item label="箱号-1" span="1" prop="boxNo">
               <ws-input v-model="inspect.boxNo" placeholder="暂无" disabled size="small" />
             </ws-form-item>