Prechádzať zdrojové kódy

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

zhongtianhaoyuan 3 rokov pred
rodič
commit
6ac2672abd

+ 336 - 0
public/static/inspection.html

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

+ 70 - 19
public/static/print.html

@@ -4,23 +4,62 @@
     <meta charset="utf-8">
     <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
     <title></title>
+    <style>
+    .content{
+      text-align: center;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      flex-direction: column;
+    }
+    .title{
+      width: 600px;
+      position: relative;
+      border-top: 1px solid #EBEEF5;
+       border-left: 1px solid #EBEEF5;
+        border-right: 1px solid #EBEEF5;
+        padding: 20px;
+        box-sizing: border-box;
+    }
+    .name{
+      font-size: 20px;
+      font-weight: 500;
+      color: #323233;
+    }
+    .price{
+      position: absolute;
+     top: 25px;
+         right: 10px;
+         bottom: 0;
+         margin: auto;
+         font-size: 14px;
+
+    }
+    </style>
   </head>
   <body>
     <div id="app">
-       <el-table :data="tableData" style="width: 500px" :row-class-name="tableRowClassName">
-         <el-table-column prop="waterMin" label="水分下限(%)">
-         </el-table-column>
-         <el-table-column prop="waterMax" label="水分上限(%)">
-         </el-table-column>
-         <el-table-column prop="price1" label="一等单价">
-         </el-table-column>
-         <el-table-column prop="price2" label="二等单价">
-         </el-table-column>
-         <el-table-column prop="price3" label="三等单价">
-         </el-table-column>
-         <el-table-column prop="priceOther" label="等外单价">
-         </el-table-column>
-       </el-table>
+      <div class="content">
+        <div class="title">
+          <div class="name">{{name}}价格对照表(按水分)</div>
+          <div class="price">价格单位:元/公斤</div>
+        </div>
+         <el-table :data="tableData" border style="width: 600px" :row-class-name="tableRowClassName">
+           <el-table-column prop="waterMin" label="水分下限(%)">
+           </el-table-column>
+           <el-table-column prop="waterMax" label="水分上限(%)">
+           </el-table-column>
+           <el-table-column prop="price1" label="一等单价">
+           </el-table-column>
+           <el-table-column prop="price2" label="二等单价">
+           </el-table-column>
+           <el-table-column prop="price3" label="三等单价">
+           </el-table-column>
+           <el-table-column prop="priceOther" label="等外单价">
+           </el-table-column>
+         </el-table>
+      </div>
+
     </div>
   </body>
   <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
@@ -29,7 +68,8 @@
     new Vue({
       el: '#app',
       data: {
-        tableData: ""
+        tableData: "",
+        name:""
       },
       computed: {},
       methods: {
@@ -43,17 +83,28 @@
           return 'success-row';
         }
         return '';
+      },
+      getQueryVariable(variable) {
+        var query = window.location.search.substring(1);
+        var vars = query.split("&");
+        for (var i = 0; i < vars.length; i++) {
+          var pair = vars[i].split("=");
+          if (pair[0] == variable) {
+            return pair[1];
+          }
+        }
+        return (false);
       }
       },
       mounted() {debugger
        let _data = localStorage.getItem("pricePrintList")
-        // var _data = decodeURIComponent(this.getQueryVariable("id"))
+         this.name = decodeURIComponent(this.getQueryVariable("name"))
         console.log(_data)
         this.tableData = JSON.parse(_data)
         window.print()
-        // window.onafterprint = function(event) {
-        //   window.history.back(-1)
-        // };
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        };
       },
       watch: {
       }

+ 0 - 0
src/api/V2/outboundManagement/index.js


+ 7 - 0
src/model/outboundManagement/index.js

@@ -0,0 +1,7 @@
+import { errorCatcher, errorHandle, filter } from 'base-core-lib'
+import { appRx } from '../defalutConfig/indexRx'
+
+import {
+  
+
+} from '@/api/V2/outboundManagement'

+ 2 - 6
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -93,7 +93,6 @@
     activated() {},
     computed() {},
     created() {
-      debugger
       //获取公司id
       this.compId = sessionStorage.getItem('ws-pf_compId')
       //用户名
@@ -116,7 +115,6 @@
         console.log(e)
       },
       newAcquisition(index, row, type) {
-        debugger
         let _obj = {}
         let _query = {}
         switch (type) {
@@ -155,7 +153,6 @@
           compId: this.compId,
           personCharge: this.accountName,
         }).toPromise().then((response) => {
-          debugger
           console.log(response)
           this.warehouseList = response
           this.selectVal = this.warehouseList[0].id
@@ -192,15 +189,14 @@
         this.visible = true
         console.log(index, row);
       },
-      print(index,row) {debugger
+      print(index,row) {
       // 打印价格对照表
      purchasePriceLook({id:row.id}).toPromise().then((response) => {
-            debugger
             console.log(response.detailPrints)
             // this.tableData = response.records
             // this.getList()
             localStorage.setItem('pricePrintList', JSON.stringify(response.detailPrints));
-            window.location.href="../../../static/print.html"
+            window.location.href="../../../static/print.html?name="+row.goodsName
           })
       }
     },

+ 0 - 3
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -247,7 +247,6 @@
       }
     },
     activated() {
-debugger
       switch (this.$route.query.type) {
         case "新增":
         let _goodsNameList = []
@@ -288,7 +287,6 @@ debugger
         case "查看":
          this.baseInfoForm =JSON.parse(this.$route.query.data)
        purchasePriceLook({id:this.baseInfoForm.id}).toPromise().then((response) => {
-              debugger
               console.log(response)
               // this.tableData = response.records
               // this.getList()
@@ -632,7 +630,6 @@ debugger
             .waterBase) * 0.01
           for (let k = 0; k < _list.length; k++) {
             //基准左边
-            debugger
             if (_waterMin < parseFloat(this.baseInfoForm.waterBase)) {
               if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd && !this.splitPriceList[i]
                 .haveSplit) {

+ 342 - 202
src/views/houseSelfCollect/inspectionManagement.vue

@@ -6,61 +6,29 @@
         <ws-button type="primary" @click="inspectInfo(1)">添加</ws-button>
       </template>
       <template slot="right">
-        <ws-select
-          v-model="warehouseName"
-          placeholder=""
-          @change="warehouseNameChange"
-          :value="searchType"
-        >
-          <ws-option
-            v-for="item in warehouseList"
-            :key="item.value"
-            :label="item.value"
-            :value="item.value"
-            style="color: #8890b1"
-          />
+        <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType">
+          <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
         </ws-select>
         <div></div>
-        <ws-input
-          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="
+        <ws-input 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>
+            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
       </template>
     </BaseHeaderLayout>
-    <el-table
-      :data="inspect"
-      style="width: 100%; margin-top: 20px"
-      ref="inspect"
-      border
-      height="780"
-    >
+    <el-table :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border height="780">
       <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="120"
-        label="编号"
-      ></el-table-column>
+      <el-table-column prop="qualityNo" width="120" label="编号"></el-table-column>
       <el-table-column prop="customerName" label="客户"></el-table-column>
       <el-table-column prop="carNumber" label="车牌号"></el-table-column>
       <el-table-column prop="goodsName" label="货名"></el-table-column>
@@ -71,188 +39,360 @@
       <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
       <el-table-column prop="qualityDate" label="质检时间"></el-table-column>
       <el-table-column prop="status" label="状态"></el-table-column>
-      <el-table-column width="300" label="操作">
+      <el-table-column width="400" label="操作">
         <template slot-scope="scope">
           <el-button @click="inspectInfo(scope.row, 2)">查看</el-button>
           <el-button @click="inspectInfo(scope.row, 3)">编辑</el-button>
           <el-button @click="del(scope.row)">删除</el-button>
+          <el-button @click="print(scope.row)">打印</el-button>
         </template>
       </el-table-column>
     </el-table>
+     <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单">
+      <div class="number">{{printData.qualityNo}}</div>
+  <table class="table">
+    <tr class="row">
+      <td class="col col-bgc">客户姓名</td>
+      <td class="col" colspan="2">{{printData.customerName}}</td>
+      <td class="col col-bgc">客户电话</td>
+      <td class="col" colspan="2">{{printData.customerPhone}}</td>
+      <td class="col col-bgc">车牌号</td>
+      <td class="col">{{printData.carNumber}}</td>
+    </tr>
+    <tr class="row">
+      <td class="col col-bgc">收货单位</td>
+      <td class="col" colspan="2">{{printData.receivingUnit}}</td>
+      <td class="col col-bgc">联系人</td>
+      <td class="col" colspan="2">{{printData.contacts}}</td>
+      <td class="col col-bgc">联系电话</td>
+      <td class="col">{{printData.contactsPhone}}</td>
+    </tr>
+    <tr class="row">
+      <td class="col col-bgc">货名</td>
+      <td class="col">{{printData.goodsName}}</td>
+      <td class="col col-bgc">类型</td>
+      <td class="col">{{printData.customerName}}</td>
+      <td class="col col-bgc">容量(克/升)</td>
+      <td class="col">{{printData.bulkDensity}}</td>
+      <td class="col col-bgc">不完整粒(%)</td>
+      <td class="col">{{printData.imperfectGrain}}</td>
+    </tr>
+    <tr class="row">
+      <td class="col col-bgc">等级</td>
+      <td class="col">{{printData.grade}}</td>
+      <td class="col col-bgc">水分(%)</td>
+      <td class="col">{{printData.waterContent}}</td>
+      <td class="col col-bgc">热损伤(%)</td>
+      <td class="col">{{printData.jiaorenli}}</td>
+      <td class="col col-bgc">单价(元/公斤)</td>
+      <td class="col">{{printData.tidalGrainPrice}}</td>
+    </tr>
+    <tr class="row">
+      <td class="col col-bgc">杂质(%)</td>
+      <td class="col">{{printData.impurity}}</td>
+      <td class="col col-bgc">霉变粒(%)</td>
+      <td class="col">{{printData.mildewGrain}}</td>
+      <td class="col col-bgc" colspan="2">购粮性质</td>
+      <td class="col" colspan="2">{{printData.customerName}}</td>
+    </tr>
+  </table>
+      <div class="bottom">
+        <div class="bottom-row1">
+          <div>质检:{{printData.qualityInspector}}</div>
+          <div>{{printData.qualityDate}}</div>
+        </div>
+        <div class="bottom-row2">
+          <div class="left">
+            <img src="../../../public/img/add.png" alt="">
+          </div>
+          <div class="config">收货单位签名或盖章</div>
+          <div class="">客户签名</div>
+        </div>
+        <div class="bottom-row3">扫一扫</div>
+        <div class="bottom-row4">
+          <el-button type="primary">关闭</el-button>
+          <el-button type="primary" @click="printSmall">打印小票</el-button>
+          <el-button type="primary" @click="printBig">打印单据</el-button>
+        </div>
+
+      </div>
+    </el-dialog>
     <div style="text-align: center">
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="currentPage"
-        :page-size="deptCircularPage.pageSize"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="deptBudgetTotal"
-      >
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
       </el-pagination>
     </div>
   </div>
 </template>
 <script>
-import {
-  selectWarehouseSelf,
-  getinspectList,
-  getinspectDelete,
-} from '@/model/houseSelfCollect/index'
+  import {
+    selectWarehouseSelf,
+    getinspectList,
+    getinspectDelete,
+    getinspectLook
+  } from '@/model/houseSelfCollect/index'
 
-export default {
-  components: {},
-  watch: {},
-  data() {
-    return {
-      //分页
-      currentPage: 1,
-      pageSize: 10,
-      deptCircularPage: {},
-      deptBudgetTotal: 0,
+  export default {
+    components: {},
+    watch: {},
+    data() {
+      return {
+        //分页
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        deptBudgetTotal: 0,
 
-      searchKeyWord: '',
-      taskTypeList: [],
-      searchType: 0,
-      warehouseName: '',
-      inspect: [],
-      warehouseList: [],
-      cangid: '', //仓库id
-      warehouseCount:"",
-      warehouseNo:"",
-    }
-  },
-  activated() {
-    this.getList()
-  },
-  methods: {
-    find(){
-     this.getList()
-    },
-    inspectInfo(row, index) {
-      //添加,编辑,查看
-      this.$router.push({
-        path: 'inspectInfo',
-        query: { type: index, cangid: this.cangid, id: row.id ,warehouseName:this.warehouseName,count:this.warehouseCount,warehouseNo:this.warehouseNo},
-      })
-    },
-    warehouseNameChange(e){
-      console.log(e,"eeeeeeeeeeeeeeeeee")
-    },
-    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()
+        searchKeyWord: '',
+        taskTypeList: [],
+        searchType: 0,
+        warehouseName: '',
+        inspect: [],
+        warehouseList: [],
+        cangid: '', //仓库id
+        warehouseCount: "",
+        warehouseNo: "",
+        isShowPrint: false,
+        printData:{}
+      }
     },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
+    activated() {
       this.getList()
     },
-    getList() {
-      selectWarehouseSelf({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-        personCharge: sessionStorage.getItem('ws-pf_staffName'),
-      })
-        .toPromise()
-        .then((response) => {
-          this.warehouseList = []
-          for (let i = 0; i < response.length; i++) {
-            this.warehouseList.push({
-              // valueKey: i,
-              value: response[i].warehouseName,
-              id: response[i].id,
-              count:response[i].count
-            })
-          }
-          this.warehouseName = response[0].warehouseName
-          this.warehouseCount = response[0].count
-          this.warehouseNo = response[0].commonWarehouseNo
-          this.cangid = response[0].id
+    methods: {
+      find() {
+        this.getList()
+      },
+      inspectInfo(row, index) {
+        //添加,编辑,查看
+        this.$router.push({
+          path: 'inspectInfo',
+          query: {
+            type: index,
+            cangid: this.cangid,
+            id: row.id,
+            warehouseName: this.warehouseName,
+            count: this.warehouseCount,
+            warehouseNo: this.warehouseNo
+          },
         })
+      },
+      warehouseNameChange(e) {
+        console.log(e, "eeeeeeeeeeeeeeeeee")
+      },
+      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()
+      },
+      getList() {
+        selectWarehouseSelf({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            personCharge: sessionStorage.getItem('ws-pf_staffName'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList = []
+            for (let i = 0; i < response.length; i++) {
+              this.warehouseList.push({
+                // valueKey: i,
+                value: response[i].warehouseName,
+                id: response[i].id,
+                count: response[i].count
+              })
+            }
+            this.warehouseName = response[0].warehouseName
+            this.warehouseCount = response[0].count
+            this.warehouseNo = response[0].commonWarehouseNo
+            this.cangid = response[0].id
+          })
 
-      getinspectList({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-        currentPage: this.currentPage,
-        pageSize: this.pageSize,
-        searchKeyWord: this.searchKeyWord,
-        warehouseName: this.warehouseName,
-      })
-        .toPromise()
-        .then((response) => {
-          // for (let i = 0; i < response.length; i++) {
-          //   this.warehouseList.push({
-          //     valueKey: i,
-          //     value: response[i].warehouseName,
-          //     id:response[i].id
-          //   })
-          // }
-          // this.searchTypeText = response[0].warehouseName
-          // this.id = response[0].id
-          // console.log(response)
-          this.inspect = response.records
-          this.deptBudgetTotal = response.total
-        })
+        getinspectList({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchKeyWord: this.searchKeyWord,
+            warehouseName: this.warehouseName,
+          })
+          .toPromise()
+          .then((response) => {
+            // for (let i = 0; i < response.length; i++) {
+            //   this.warehouseList.push({
+            //     valueKey: i,
+            //     value: response[i].warehouseName,
+            //     id:response[i].id
+            //   })
+            // }
+            // this.searchTypeText = response[0].warehouseName
+            // this.id = response[0].id
+            // console.log(response)
+            this.inspect = response.records
+            this.deptBudgetTotal = response.total
+          })
+      },
+      print(row) {
+        getinspectLook({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.isShowPrint = true
+            this.printData = response
+            // window.location.href="../../../static/inspection.html?dataList="+JSON.stringify(response)
+          })
+      },
+      printSmall() {
+        window.location.href = "../../../static/inspection.html?type=1&dataList=" + JSON.stringify(this.printData)
+      },
+      printBig() {
+        window.location.href = "../../../static/inspection.html?type=2&dataList=" + JSON.stringify(this.printData)
+      },
     },
-  },
-}
+  }
 </script>
 <style lang="scss" scoped>
-.title {
-  font-size: 20px;
-  font-weight: 600;
-  margin: 20px 0 0 20px;
-}
-.tit {
-  font-size: 16px;
-  font-weight: 600;
-  margin: 20px;
-}
-.ws-info-table {
-  border: none;
-}
-.ws-info-table .el-form-item {
-  width: 50%;
-  border: none;
-}
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  width: 30%;
-  text-align: center;
-  background: #ffffff;
-  color: #8890b1;
-}
-/deep/.ws-info-table .el-form-item .el-form-item__content {
-  border: none;
-}
-/deep/.el-table .el-table__header .cell,
-.el-table .el-table__body .cell {
-  text-align: center;
-}
-/deep/.el-table--enable-row-transition .el-table__body td {
-  text-align: center;
-}
+  /deep/.el-dialog__header {
+    text-align: center !important;
+    padding: 10px 0 !important;
+    height: auto !important;
+  }
+
+  /deep/.el-dialog__title {
+    font-size: 24px !important;
+  }
+
+  table,
+  table tr th,
+  table tr td {
+    border: 2px solid #333333;
+    padding: 5px 0;
+  }
+
+  table {
+    width: 100%;
+    min-height: 25px;
+    line-height: 25px;
+    text-align: center;
+    border-collapse: collapse;
+    border: 3px solid #333333;
+  }
+
+  .title {
+    font-size: 20px;
+    font-weight: 600;
+    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;
+  }
+
+  .number {
+    text-align: right;
+    margin: 0 0 10px 0;
+  }
+
+  .col-bgc {
+    background: #f6f7fb;
+  }
+
+  .bottom-row1 {
+    display: flex;
+    justify-content: space-between;
+    margin: 10px 0;
+  }
+
+  .bottom-row2 {
+    display: flex;
+    margin: 10px 0;
+
+    .left {
+      img {
+        width: 41px;
+        height: 41px;
+        margin-right: 118px;
+      }
+    }
+
+    .config {
+      margin-right: 240px;
+    }
+  }
+
+  .bottom-row3 {
+    margin: 10px 0;
+  }
+
+  .bottom-row4 {
+    margin-top: 50px;
+    text-align: center;
+  }
+
+  /deep/.el-dialog__body {
+    padding: 20px !important;
+  }
 </style>

+ 297 - 0
src/views/outboundManagement/weighingManagement.vue

@@ -0,0 +1,297 @@
+<!--检斤管理-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="12">
+      <template slot="left"> </template>
+      <template slot="right">
+        <ws-select
+          v-model="searchTypeText"
+          placeholder=""
+          @change="selecttaskType"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890b1"
+          />
+        </ws-select>
+        <div></div>
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按编号、车牌号查找"
+          clearable
+          maxlength="500"
+          type="input"
+        ></ws-input>
+        <ws-button class="find" type="primary" @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table
+      :data="warehouseList"
+      style="width: 100%; margin-top: 20px"
+      ref="warehouseList"
+      border
+      height="780"
+    >
+      <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="contractNo"
+        width="120"
+        label="编号"
+      ></el-table-column>
+      <el-table-column prop="contractNo" label="客户"></el-table-column>
+      <el-table-column prop="contractNo" label="车牌号"></el-table-column>
+      <el-table-column prop="contractNo" label="货名"></el-table-column>
+      <el-table-column prop="contractNo" label="毛重(公斤)"></el-table-column>
+      <el-table-column prop="contractNo" label="皮重(公斤)"></el-table-column>
+      <el-table-column prop="contractNo" label="仓位号"></el-table-column>
+      <el-table-column prop="contractNo" label="囤位号"></el-table-column>
+      <el-table-column prop="contractNo" label="司称员"></el-table-column>
+      <el-table-column prop="contractNo" label="称重时间"></el-table-column>
+      <el-table-column prop="contractNo" label="状态"></el-table-column>
+      <el-table-column width="300" prop="contractNo1" label="操作">
+        <el-button @click="GrossWeight">毛重</el-button>
+        <el-button @click="tare">皮重</el-button>
+        <el-button @click="print">删除</el-button>
+      </el-table-column>
+    </el-table>
+
+    <!-- 毛重检斤 -->
+    <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true">
+      <ws-form>
+        <div class="title">毛重检斤</div>
+        <ws-info-table>
+          <ws-form-item label="编号"  prop="waterContent">
+            <ws-input placeholder="请输入编号" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="仓位号" prop="waterContent">
+            <ws-input placeholder="请输入仓位号" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="客户" prop="waterContent">
+            <ws-input placeholder="请输入客户" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="囤位号" prop="waterContent">
+            <ws-input placeholder="请输入囤位号" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="车牌号" prop="waterContent">
+            <ws-input placeholder="请输入车牌号" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="货名" prop="waterContent">
+            <ws-input placeholder="请输入货名" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="毛重(公斤)" prop="waterContent">
+            <ws-input placeholder="请输入毛重" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <div><el-button @click="Reacquire">重新获取</el-button></div>
+        </ws-info-table>
+        <div style="text-align: center">
+          <el-button @click="paymentForm = false">取消</el-button>
+          <el-button @click="commit">保存</el-button>
+        </div>
+      </ws-form>
+    </el-dialog>
+    <!-- 皮重检斤 -->
+    <el-dialog width="40%" :visible.sync="paymentForm1" :append-to-body="true">
+      <ws-form>
+        <div class="title">皮重检斤</div>
+        <ws-info-table>
+          <ws-form-item label="编号" prop="waterContent">
+            <ws-input placeholder="请输入编号" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="仓位号" prop="waterContent">
+            <ws-input placeholder="请输入仓位号" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="客户" prop="waterContent">
+            <ws-input placeholder="请输入客户" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="囤位号" prop="waterContent">
+            <ws-input placeholder="请输入囤位号" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="车牌号" prop="waterContent">
+            <ws-input placeholder="请输入车牌号" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item label="货名" prop="waterContent">
+            <ws-input placeholder="请输入货名" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item
+            label="毛重(公斤)"
+            prop="waterContent"
+            class="formItem"
+          >
+            <ws-input placeholder="请输入毛重" maxlength="100" disabled size="small" />
+          </ws-form-item>
+          <ws-form-item
+            label="皮重(公斤)"
+            prop="waterContent"
+            class="formItem"
+          >
+            <ws-input placeholder="请输入皮重" maxlength="100" size="small" />
+            <el-button @click="Reacquire">重新获取</el-button>
+          </ws-form-item>
+          <ws-form-item
+            label="扣杂(公斤)"
+            prop="waterContent"
+            class="formItem"
+          >
+            <ws-input placeholder="请输入扣杂" maxlength="100" size="small" />
+          </ws-form-item>
+          <ws-form-item
+            label="净重(公斤)"
+            prop="waterContent"
+            class="formItem"
+          >
+            <ws-input placeholder="请输入净重" maxlength="100" disabled size="small" />
+          </ws-form-item>
+        </ws-info-table>
+        <div style="text-align: center">
+          <el-button @click="paymentForm1 = false">取消</el-button>
+          <el-button @click="submit">保存</el-button>
+        </div>
+      </ws-form>
+    </el-dialog>
+     <div style="text-align:center">
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="deptCircularPage.pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    >
+    </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+import {} from '@/model/houseSelfCollect/index'
+export default {
+  components: {
+    
+  },
+  watch: {},
+  data() {
+    return {
+       //分页
+      currentPage: 1,
+      pageSize: 10,
+      deptCircularPage:{},
+      deptBudgetTotal: 0,
+      paymentForm: false,
+      paymentForm1: false,
+      warehouseList: [
+        {
+          contractNo: '56454',
+        },
+      ],
+      searchKeyWord: '',
+      searchType: [],
+      searchTypeText: '',
+      value1: '', //选择时间
+      taskTypeList: [],
+    }
+  },
+  activated() {},
+  methods: {
+    GrossWeight() {
+      //毛重
+      this.paymentForm = true
+    },
+    tare() {
+      //皮重
+      this.paymentForm1 = true
+    },
+    selecttaskType() {
+      //选择仓库改变方法
+    },
+    Reacquire() {
+      //重新获取
+    },
+    commit() {
+      //毛重保存
+      this.$confirm('确定保存检斤信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {})
+        .catch(() => {
+          return false
+        })
+    },
+    submit() {//皮重保存
+       this.$confirm('确定保存检斤信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {})
+        .catch(() => {
+          return false
+        })
+    },
+     handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.title {
+  font-size: 20px;
+  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;
+}
+.formItem {
+  width: 51% !important;
+}
+</style>