Selaa lähdekoodia

前端更新sdy

zhongtianhaoyuan 3 vuotta sitten
vanhempi
commit
cfd38fa88a

+ 2 - 2
.env.production

@@ -4,8 +4,8 @@
 
 NODE_ENV = 'production'
 # base api
-VUE_APP_BASE_API = 'https://api2.eliangeyun.com'
-#VUE_APP_BASE_API = 'https://apitest.eliangeyun.com'
+#VUE_APP_BASE_API = 'https://api2.eliangeyun.com'
+VUE_APP_BASE_API = 'https://apitest.eliangeyun.com'
 
 # 微服务相关接口配置
 ## 任务消息

+ 1 - 1
package.json

@@ -59,7 +59,7 @@
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",
     "pinyin": "^2.9.1",
-    "qrcodejs2": "0.0.2",
+    "qrcodejs2": "^0.0.2",
     "querystring": "^0.2.0",
     "register-service-worker": "^1.0.0",
     "sass-loader": "^7.1.0",

+ 335 - 0
public/static/payprint.html

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

+ 28 - 0
public/static/print.html

@@ -39,6 +39,33 @@
   </head>
   <body>
     <div id="app">
+<<<<<<< HEAD
+      {{dataList}}
+       <el-button @click="visible = true">Button</el-button>
+    </div>
+  </body>
+  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+  <script type="text/javascript">
+    new Vue({
+      el: '#app',
+      data: {
+        dataList: ""
+      },
+      computed: {},
+      methods: {
+
+      },
+      mounted() {debugger
+       let _data = localStorage.getItem("pricePrintList")
+        // var _data = decodeURIComponent(this.getQueryVariable("id"))
+        console.log(_data)
+        this.dataList = JSON.parse(_data)
+        // window.print()
+        // window.onafterprint = function(event) {
+        //   window.history.back(-1)
+        // };
+=======
       <div class="content">
         <div class="title">
           <div class="name">{{name}}价格对照表(按水分)</div>
@@ -105,6 +132,7 @@
         window.onafterprint = function(event) {
           window.history.back(-1)
         };
+>>>>>>> 1d46949992a1fc8a79736807784052ab343c9846
       },
       watch: {
       }

+ 11 - 3
src/api/V2/houseSelfCollect/index.js

@@ -42,15 +42,20 @@ export const API_GET_INSPECT_GETINSPECTLOOKGOODS = '/qualityInspectionManagement
 export const API_POST_INSPECT_GETINSPECTEDIT = '/qualityInspectionManagement/api/editQualityInspection'
 //质检删除
 export const API_POST_INSPECT_GETINSPECTDELETE = '/qualityInspectionManagement/api/deleteQualityInspection'
+//付款管理列表
+export const API_GET_PAYMENTMANAGEMENT = '/paymentManagement/selectPaymentManagement'
 //检斤列表查看
 export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWeighingManagement'
 //皮重检斤保存
 export const API_POST_WEIGHTCHECK_TARE= '/weighingManagement/api/editTare'
-//毛重检斤保存
+//毛重检斤保存
 export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
+//付款查看
+export const API_GET_PAYMENT = '/paymentManagement/getInfo'
+// 付款结算
+export const API_POST_PAYMENT_EDIT = '/paymentManagement/api/editInfo'
 //质检客户下拉校验
 export const API_GET_INSPECT_GETAMOUNT = '/paymentManagement/cumulant'
-
 //识别身份证
 export const API_GET_CUSTOMER_GETIDENTITY = '/driverViewInfo/personShibie'
 //识别银行卡
@@ -59,6 +64,9 @@ export const API_GET_CUSTOMER_GETBANK = '/driverViewInfo/bankShibie'
 export const API_GET_INSPECT_GETCOUNT= '/qualityInspectionManagement/api/settledCount'
 //检斤打印查看
 export const API_GET_WEIGHTCHECK_GETPRINT= '/weighingManagement/api/getWeighingManagement'
-
+//付款删除
+export const API_POST_PAYMENT_DEL = '/paymentManagement/api/deleteInfo'
+//付款审核
+export const API_POST_PAYMENT_AUDIT = '/paymentManagement/api/openAuditFlow'
 
 

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

@@ -0,0 +1,8 @@
+//质检列表
+export const API_GET_INSPECT_GETINSPECTLIST = '/qualityInspectionManagement/selectQualityInspection'
+//质检查看
+export const API_GET_INSPECT_GETINSPECTLOOK = '/qualityInspectionManagement/api/getQualityInspection'
+//质检添加
+export const API_POST_INSPECT_ADDOUT = '/qualityInspectionManagement/api/addQualityInspectionOut'
+//查询仓库列表
+export const API_GET_WAREHOUSESELF = '/warehouseBaseInfo/selectWarehouseSelf'

+ 4 - 3
src/lang/zh.js

@@ -1,4 +1,4 @@
-export default {
+export default {
   logoName: '船舶管理平台',
   tip: '提示',
   title: 'WinSea企业级开发平台',
@@ -993,7 +993,7 @@
     paymentManagement:'付款管理',
     weighingManagement:'检斤管理',
     houseSelfCollectPrint:'查看',
-    acquisitionManagementAdd:'收购管理新增',
+    acquisitionManagementAdd:'收购管理',
     acquisitionManagementEdit:'收购管理编辑',
     customerManagementEdit:'客户管理编辑',
     customerManagementAdd:'客户管理添加',
@@ -1005,6 +1005,7 @@
     outboundManagement: '出库管理',
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    qualityInspection: '质检信息',
     collectionManagement: '收款管理',
 
   },
@@ -7423,7 +7424,6 @@
   houseSelfCollect:{
     customerManagement:'客户管理',
     acquisitionManagement:'仓库设置',
-    acquisitionManagementAdd:'收购管理新增',
     acquisitionManagementEdit:'收购管理编辑',
     inspectionManagement:'质检管理',
     paymentManagement:'付款管理',
@@ -7440,6 +7440,7 @@
   outboundManagement: {
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    qualityInspection:'质检信息',
     collectionManagement: '收款管理',
   }
      

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

@@ -24,14 +24,19 @@ import {
   API_GET_INSPECT_GETINSPECTLOOKGOODS,
   API_POST_INSPECT_GETINSPECTEDIT,
   API_POST_INSPECT_GETINSPECTDELETE,
+  API_GET_PAYMENTMANAGEMENT,
   API_GET_WEIGHTCHECK_GETWEIGHINGLIST,
   API_POST_WEIGHTCHECK_GROSSWEIGHT,
   API_POST_WEIGHTCHECK_TARE,
+  API_GET_PAYMENT,
+  API_POST_PAYMENT_EDIT,
   API_GET_INSPECT_GETAMOUNT,
   API_GET_CUSTOMER_GETIDENTITY,
   API_GET_CUSTOMER_GETBANK,
   API_GET_INSPECT_GETCOUNT,
-  API_GET_WEIGHTCHECK_GETPRINT
+  API_GET_WEIGHTCHECK_GETPRINT,
+  API_POST_PAYMENT_DEL,
+  API_POST_PAYMENT_AUDIT
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -49,7 +54,7 @@ export const getPurchasePrice = appRx.get(API_GET_PURCHASEPRICE_MANAGE, errorCat
 //收购管理添加
 export const purchasePriceAdd = appRx.post(API_POST_PURCHASEPRICE_ADD, errorCatcher, errorHandle, filter)
 //收购管理查看
-export const purchasePriceLook = appRx.get(API_GET_PURCHASEPRICE_LOOK, errorCatcher, errorHandle, filter)
+export const purchasePriceLook = appRx.post(API_GET_PURCHASEPRICE_LOOK, errorCatcher, errorHandle, filter)
 //收购管理编辑
 export const purchasePriceEdit = appRx.post(API_POST_PURCHASEPRICE_EDIT, errorCatcher, errorHandle, filter)
 //收购管理删除
@@ -78,15 +83,20 @@ export const getinspectLookGoods = appRx.get(API_GET_INSPECT_GETINSPECTLOOKGOODS
 export const getinspectEdit = appRx.post(API_POST_INSPECT_GETINSPECTEDIT, errorCatcher, errorHandle, filter)
 //质检删除
 export const getinspectDelete = appRx.post(API_POST_INSPECT_GETINSPECTDELETE, errorCatcher, errorHandle, filter)
+//付款管理列表
+export const getpayment = appRx.get(API_GET_PAYMENTMANAGEMENT, errorCatcher, errorHandle, filter)
 //检斤列表查看
 export const getweighingList = appRx.get(API_GET_WEIGHTCHECK_GETWEIGHINGLIST, errorCatcher, errorHandle, filter)
 //皮重检斤保存
 export const tare = appRx.post(API_POST_WEIGHTCHECK_TARE, errorCatcher, errorHandle, filter)
 //毛重检斤保存
 export const grossWeight = appRx.post(API_POST_WEIGHTCHECK_GROSSWEIGHT, errorCatcher, errorHandle, filter)
+//付款信息查看
+export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorHandle, filter)
+//付款信息结算
+export const postpaymentedit = appRx.post(API_POST_PAYMENT_EDIT, errorCatcher, errorHandle, filter)
 //质检客户下拉校验
 export const getamount = appRx.get(API_GET_INSPECT_GETAMOUNT, errorCatcher, errorHandle, filter)
-
 //身份证识别
 export const getIdentity = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)
 //银行卡识别
@@ -94,4 +104,9 @@ export const getBank = appRx.get(API_GET_CUSTOMER_GETBANK, errorCatcher, errorHa
 //查询货名有未结算状态
 export const getCount = appRx.get(API_GET_INSPECT_GETCOUNT, errorCatcher, errorHandle, filter)
 //检斤打印查看
-export const getPrint = appRx.get(API_GET_WEIGHTCHECK_GETPRINT, errorCatcher, errorHandle, filter)
+export const getPrint = appRx.get(API_GET_WEIGHTCHECK_GETPRINT, errorCatcher, errorHandle, filter)
+//付款删除
+export const delpayment  = appRx.post(API_POST_PAYMENT_DEL, errorCatcher, errorHandle, filter)
+//付款审核
+export const auditpayment  = appRx.post(API_POST_PAYMENT_AUDIT, errorCatcher, errorHandle, filter)
+

+ 15 - 2
src/model/outboundManagement/index.js

@@ -2,6 +2,19 @@ import { errorCatcher, errorHandle, filter } from 'base-core-lib'
 import { appRx } from '../defalutConfig/indexRx'
 
 import {
-  
+    API_POST_INSPECT_ADDOUT,
+    API_GET_INSPECT_GETINSPECTLIST,
+    API_GET_INSPECT_GETINSPECTLOOK,
+    API_GET_WAREHOUSESELF
+
+}   from '@/api/V2/outboundManagement'
 
-} from '@/api/V2/outboundManagement'
+  //质检列表
+  export const getinspectList = appRx.get(API_GET_INSPECT_GETINSPECTLIST, errorCatcher, errorHandle, filter)
+  //质检查看
+  export const getinspectLook = appRx.get(API_GET_INSPECT_GETINSPECTLOOK, errorCatcher, errorHandle, filter)
+  //质检添加
+  export const addOut = appRx.post(API_POST_INSPECT_ADDOUT, errorCatcher, errorHandle, filter)
+  //查看仓库
+  export const selectWarehouseSelf = appRx.get(API_GET_WAREHOUSESELF, errorCatcher, errorHandle, filter)
+  

+ 2 - 1
src/views/financialManagement/collectionManagementList.vue

@@ -630,7 +630,8 @@ export default {
             boxNo: '',
             titleNo: '',
             tranCarNo: tmp,
-            agent: this.agent
+            agent: this.agent,
+            staffId: this.staffId
           })
           // for (var i = 0; i < this.freightspace.length; i++) {
           //   var index = i + 1

+ 104 - 33
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -7,7 +7,7 @@
           <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
           </el-option>
         </el-select>
-        <el-checkbox v-model="checked" @change="allowEdit">允许手动编辑重量</el-checkbox>
+        <el-checkbox v-model="checked" @change="allowEdit" :disabled="!userJurisdiction">允许手动编辑重量</el-checkbox>
       </div>
       <el-button type="primary" @click="newAcquisition('','','新增')">新增</el-button>
     </div>
@@ -31,14 +31,17 @@
         </el-table-column>
         <el-table-column prop="waterBase" label="基准水分(%)"></el-table-column>
         <el-table-column prop="deductWeight" label="扣重比"></el-table-column>
-        <el-table-column prop="saleLimit" label="销量上线"></el-table-column>
+        <el-table-column prop="saleLimit" label="销量上限(年/吨)"></el-table-column>
+        <el-table-column prop="dryGrainPrice" label="干粮收购价"></el-table-column>
+
         <el-table-column prop="status" label="状态"></el-table-column>
         <el-table-column prop="passDate" label="通过时间"></el-table-column>
         <el-table-column label="操作" width="300">
           <template slot-scope="scope">
             <el-button size="mini" @click="newAcquisition(scope.$index, scope.row,'查看')">查看</el-button>
-            <el-button size="mini" @click="newAcquisition(scope.$index, scope.row,'编辑')">编辑</el-button>
-            <el-button size="mini" type="danger" @click="delRow(scope.$index, scope.row)">删除</el-button>
+            <el-button v-if="scope.row.status!='审核中'" size="mini" @click="newAcquisition(scope.$index, scope.row,'编辑')">编辑</el-button>
+            <el-button v-if="scope.row.status=='审核中'" size="mini" :disabled="!userJurisdiction" @click="newAcquisition(scope.$index, scope.row,'编辑')">审核中</el-button>
+            <el-button size="mini" :disabled="!userJurisdiction" type="danger" @click="delRow(scope.$index, scope.row)">删除</el-button>
             <el-button size="mini" @click="print(scope.$index, scope.row)">打印</el-button>
           </template>
         </el-table-column>
@@ -47,13 +50,7 @@
         :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
         :total="deptBudgetTotal">
       </el-pagination>
-      <el-popover placement="center" width="160" v-model="visible">
-        <p>这是一段内容这是一段内容确定删除吗?</p>
-        <div style="text-align: right; margin: 0">
-          <el-button size="mini" type="text" @click="visible = false">取消</el-button>
-          <el-button type="primary" size="mini" @click="visible = false">确定</el-button>
-        </div>
-      </el-popover>
+
     </div>
   </div>
 </template>
@@ -62,9 +59,11 @@
     getPurchasePrice,
     selectWarehouseSelf,
     purchasePriceAllowEdit,
-    purchasePriceLook
+    purchasePriceLook,
+    purchasePriceDel
   } from '@/model/houseSelfCollect/index'
   import acquisitionManagementAdd from './acquisitionManagementAdd.vue'
+  import { getHp } from '@/utils/getHasPermission'
   export default {
 
     components: {
@@ -86,21 +85,29 @@
         accountName: '',
         tableData: [],
         selectVal: '',
-        goodsNameList:[],
-        warehouseList:[]
+        goodsNameList: [],
+        warehouseList: [],
+        userJurisdiction:false
       }
     },
-    activated() {},
-    computed() {},
-    created() {
+    activated() {
       //获取公司id
       this.compId = sessionStorage.getItem('ws-pf_compId')
       //用户名
       this.accountName = sessionStorage.getItem('ws-pf_staffName')
       this.getWarehouseSelf()
+      //获取用户权限,决策人、统计
+      this.getUserJurisdiction()
+    },
+    computed() {},
+    created() {
+
 
     },
     methods: {
+      getUserJurisdiction(){
+        let userJurisdiction = getHp('acquisitionManagement.acquisition.allow')
+      },
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)
         this.pageSize = val
@@ -113,6 +120,20 @@
       },
       warehouseChange(e) {
         console.log(e)
+        let _obj = this.warehouseList.find((item) => {
+          return item.id === this.selectVal;
+        });
+        if (_obj.allowEdit == 1) {
+
+          this.checked = true
+        } else {
+          this.checked = false
+        }
+  this.currentPage=1
+   this.pageSize = 10
+        this.getList()
+        console.log(_obj)
+
       },
       newAcquisition(index, row, type) {
         let _obj = {}
@@ -128,15 +149,21 @@
               warehouseName: _obj.warehouseName,
               compId: this.compId,
               type: type,
-              goodsNameList:this.goodsNameList
+              goodsNameList: this.goodsNameList
             }
             break
           case '编辑':
+          _query = {
+            data: JSON.stringify(row),
+            type: type,
+             goodsNameList: this.goodsNameList
+          }
             break
           case "查看":
             _query = {
-              data:JSON.stringify(row),
-              type: type
+              data: JSON.stringify(row),
+              type: type,
+              goodsNameList: this.goodsNameList
             }
             break
           default:
@@ -155,7 +182,17 @@
         }).toPromise().then((response) => {
           console.log(response)
           this.warehouseList = response
+          if(this.userJurisdiction){
+            this.warehouseList.unshift({warehouseName:response[0].flag})
+          }
+          console.log(this.warehouseList)
           this.selectVal = this.warehouseList[0].id
+          if (this.warehouseList[0].allowEdit == 1) {
+
+            this.checked = true
+          } else {
+            this.checked = false
+          }
           // this.tableData = response.records
           this.getList()
         })
@@ -167,17 +204,21 @@
           pageSize: this.pageSize,
           warehouseId: this.selectVal,
           compId: this.compId,
+
         }).toPromise().then((response) => {
           console.log(response)
-          for(let i=0;i<response.records.length;i++){
+          for (let i = 0; i < response.records.length; i++) {
             this.goodsNameList.push(response.records[i].goodsName)
           }
           this.tableData = response.records
         })
       },
       allowEdit(val) {
-        console.log(val)
-        purchasePriceAllowEdit({}).toPromise().then((response) => {
+        console.log(this.selectVal)
+        purchasePriceAllowEdit({
+          warehouseId: this.selectVal
+        }).toPromise().then((response) => {
+
           console.log(response)
           // this.tableData = response.records
         })
@@ -185,19 +226,49 @@
       handleEdit(index, row) {
         console.log(index, row);
       },
+      // 删除
       delRow(index, row) {
-        this.visible = true
         console.log(index, row);
-      },
-      print(index,row) {
-      // 打印价格对照表
-     purchasePriceLook({id:row.id}).toPromise().then((response) => {
-            console.log(response.detailPrints)
-            // this.tableData = response.records
-            // this.getList()
-            localStorage.setItem('pricePrintList', JSON.stringify(response.detailPrints));
-            window.location.href="../../../static/print.html?name="+row.goodsName
+        //删除
+        this.$confirm('确定删除该条设置?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            purchasePriceDel({
+                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
+          })
+      },
+      print(index, row) {
+        // 打印价格对照表
+        purchasePriceLook({
+          id: row.id
+        }).toPromise().then((response) => {
+          console.log(response.detailPrints)
+          // this.tableData = response.records
+          // this.getList()
+          localStorage.setItem('pricePrintList', JSON.stringify(response.detailPrints));
+          window.location.href = "../../../static/print.html?name=" + row.goodsName
+        })
+      },
+      validate(){
+
       }
     },
   }

+ 430 - 158
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -14,8 +14,7 @@
         <div class="row1">
           <div class="grid-content">
             <el-form-item label="货名">
-              <!-- <el-input v-model="baseInfoForm.goodsName"></el-input> -->
-              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange">
+              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange" :disabled="!isEdit">
                 <el-option v-for="item in goodnameList" :key="item.constValue" :label="item.constValue"
                   :value="item.constValue">
                 </el-option>
@@ -24,29 +23,34 @@
           </div>
           <div class="grid-content">
             <el-form-item label="基准水分(%)">
-              <el-input v-model="baseInfoForm.waterBase" @input="changeBaseWater"></el-input>
+              <el-input v-model="baseInfoForm.waterBase" @input="changeBaseWater" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
           <div class="grid-content">
             <el-form-item label="扣重比">
-              <el-input v-model="baseInfoForm.deductWeight"></el-input>
+              <el-input v-model="baseInfoForm.deductWeight" :disabled="!isEdit"></el-input>
+            </el-form-item>
+          </div>
+          <div class="grid-content">
+            <el-form-item label="干粮收购价格">
+              <el-input v-model="baseInfoForm.dryGrainPrice" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
         </div>
         <div class="row2">
           <div class="grid-content">
             <el-form-item label="干粮水分">
-              <el-input v-model="baseInfoForm.waterMin" @input="changeMinWater"></el-input>
+              <el-input v-model="baseInfoForm.waterMin" @input="changeMinWater" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
           <div class="grid-content">
             <el-form-item label="水分上限">
-              <el-input v-model="baseInfoForm.waterMax" @input="changeMaxWater"></el-input>
+              <el-input v-model="baseInfoForm.waterMax" @input="changeMaxWater" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
           <div class="grid-content">
             <el-form-item label="销售上限(年/吨)">
-              <el-input v-model="baseInfoForm.saleLimit"></el-input>
+              <el-input v-model="baseInfoForm.saleLimit" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
         </div>
@@ -54,23 +58,23 @@
       <el-row class="row3">
         <div class="top">
           <div class="title">粮价设置</div>
-          <el-button class="btn" @click="newSetPrice">新增</el-button>
+          <el-button v-if="priceList.length<4" class="btn" @click="newSetPrice" :disabled="!isEdit">新增</el-button>
         </div>
         <div class="content" v-for="(item,index) in priceList" :key="index">
           <div class="top">
             <div class="left">
               <div class="text">基准单价(元/公斤)</div>
-              <el-input v-model="item.basicUnitPrice"></el-input>
+              <el-input v-model="item.basicUnitPrice" :disabled="!isEdit"></el-input>
             </div>
-            <el-button @click="delSetPrice(item,index)">删除</el-button>
+            <el-button @click="delSetPrice(item,index)" :disabled="!isEdit">删除</el-button>
           </div>
           {{item}}
           <div class="level">
             <el-checkbox-group v-model="item.checkList" @change="changeLevel($event,index)">
-              <el-checkbox label="一等"></el-checkbox>
-              <el-checkbox label="二等"></el-checkbox>
-              <el-checkbox label="三等"></el-checkbox>
-              <el-checkbox label="等外"></el-checkbox>
+              <el-checkbox label="一等" :disabled="!isEdit"></el-checkbox>
+              <el-checkbox label="二等" :disabled="!isEdit"></el-checkbox>
+              <el-checkbox label="三等" :disabled="!isEdit"></el-checkbox>
+              <el-checkbox label="等外" :disabled="!isEdit"></el-checkbox>
             </el-checkbox-group>
           </div>
           <div class="count">
@@ -86,9 +90,10 @@
                 <div class="item-style">
                   <div v-if="item1.type!=4" class="item-style-title">
                     <span>{{item1.name}}{{item1.index}}</span>
-                    <span class="add" @click="add(item,item1,index)" v-if="item1.type!=3">+</span>
-                    <span class="reduce" @click="reduce(item,item1,index)"
-                      v-show="item1.type!=1&&item1.type!=2&&item1.type!=3">-</span>
+                    <el-button class="add" @click="add(item,item1,index)" v-if="item1.type!=3" :disabled="!isEdit">+
+                    </el-button>
+                    <el-button class="reduce" @click="reduce(item,item1,index)"
+                      v-show="item1.type!=1&&item1.type!=2&&item1.type!=3" :disabled="!isEdit">-</el-button>
                   </div>
                   <div v-show="item1.type!=4">
                     <input v-if='item1.type==1' class="water-price" v-model="baseInfoForm.waterMin"
@@ -103,13 +108,14 @@
                   <div class="circle" v-if="item1.type!=4"></div>
                 </div>
                 <div class="bottom-price">
-                  <input v-if="item1.type==4" class="water-price" v-model="item1.jfprice"></input>
+                  <input v-if="item1.type==4" class="water-price" v-model="item1.jfprice" :disabled="!isEdit"></input>
                 </div>
               </div>
             </div>
           </div>
         </div>
-        <el-button class="submit" @click="submit">提交</el-button>
+        <!-- <el-button class="submit" @click="submit">提交</el-button> -->
+        <el-button class="submit" @click="submit">{{submitName}}</el-button>
       </el-row>
     </el-main>
     <el-main v-show="!isCountShow">
@@ -128,12 +134,19 @@
           </el-table-column>
           <el-table-column prop="price3" label="三等单价">
           </el-table-column>
-          <el-table-column prop="priceOther" label="等外单价">
+          <el-table-column prop="price4" label="等外单价">
           </el-table-column>
         </el-table>
       </div>
-      <el-button class="submit" @click="closeCount">关闭</el-button>
-      <el-button class="submit" @click="print">打印</el-button>
+
+      <!-- <el-button class="submit" @click="closeCount">关闭</el-button> -->
+
+      <div class="bottom-btn">
+        <div >当前价格尚未通过审核,建议审核通过后进行打印</div>
+        <el-button class="submit" @click="closeCount">关闭</el-button>
+        <el-button class="submit" @click="print">打印</el-button>
+      </div>
+
 
     </el-main>
   </el-container>
@@ -141,11 +154,9 @@
 <script>
   import {
     purchasePriceAdd,
-    purchasePriceLook
+    purchasePriceLook,
+    purchasePriceEdit
   } from '@/model/houseSelfCollect/index'
-  import {
-    packList,
-  } from '@/model/contarct/index'
   export default {
 
     components: {
@@ -158,38 +169,10 @@
       return {
         selectVal: "",
         goodnameList: [],
-        tableData: [{
-          waterMin: '10',
-          waterMax: '20',
-          price1: '30',
-          price2: '30',
-          price3: '30',
-          priceOther: '30',
-        }, {
-          waterMin: '11',
-          waterMax: '20',
-          price1: '30',
-          price2: '30',
-          price3: '30',
-          priceOther: '30',
-        }, {
-          waterMin: '12',
-          waterMax: '20',
-          price1: '30',
-          price2: '30',
-          price3: '30',
-          priceOther: '30',
-        }, {
-          waterMin: '13',
-          waterMax: '20',
-          price1: '30',
-          price2: '30',
-          price3: '30',
-          priceOther: '30',
-        }],
+        tableData: [],
+        submitName: "提交",
         isCountShow: true,
         priceList: [{
-          unitPrice: '',
           index: 0,
           checkList: [],
           basicUnitPrice: "",
@@ -238,6 +221,7 @@
           workflowId: '',
           approveStatus: '',
           passDate: '',
+          dryGrainPrice: '',
           details: [],
           detailPrints: []
         },
@@ -247,57 +231,111 @@
       }
     },
     activated() {
-      switch (this.$route.query.type) {
-        case "新增":
-        let _goodsNameList = []
-        this.baseInfoForm.warehouseId = this.$route.query.warehouseId
-        this.baseInfoForm.warehouseName = this.$route.query.warehouseName
-        this.baseInfoForm.compId = this.$route.query.compId
-        this.type = this.$route.query.type
-        console.log(this.baseInfoForm)
-        _goodsNameList = this.$route.query.goodsNameList
-        this.priceList[0].detailList[0].water = this.baseInfoForm.waterMin
-        this.priceList[0].detailList[2].water = this.baseInfoForm.waterBase
-        this.priceList[0].detailList[4].water = this.baseInfoForm.waterMax
-          // 货名
-          packList({
-              constId: 'CON2'
-            })
-            .toPromise()
-            .then((response) => {
-              let _list = []
-              for (let i = 0; i < response.length; i++) {
-                let _isAll = true
-                for (let j = 0; j < _goodsNameList.length; j++) {
-                  if (response[i].constValue != _goodsNameList[j]) {
-                    if (j == _goodsNameList.length - 1 && _isAll) {
-                      _list.push(response[i])
-                    }
-                  } else {
-                    _isAll = false
-                  }
+      // 货名
+      let _goodsNameList = []
+      _goodsNameList = this.$route.query.goodsNameList
+      packList({
+          constId: 'CON2'
+        })
+        .toPromise()
+        .then((response) => {
+          debugger
+          let _list = []
+          for (let i = 0; i < response.length; i++) {
+            let _isAll = true
+            for (let j = 0; j < _goodsNameList.length; j++) {
+              if (response[i].constValue != _goodsNameList[j]) {
+                if (j == _goodsNameList.length - 1 && _isAll) {
+                  _list.push(response[i])
                 }
+              } else {
+                _isAll = false
               }
-              this.goodnameList = _list
-              this.selectVal = _list[0].constValue
-            })
+            }
+          }
+          this.goodnameList = _list
+          this.selectVal = _list[0].constValue
+        })
+      switch (this.$route.query.type) {
+        case "新增":
+          this.submitName = "提交"
+          this.baseInfoForm.warehouseId = this.$route.query.warehouseId
+          this.baseInfoForm.warehouseName = this.$route.query.warehouseName
+          this.baseInfoForm.compId = this.$route.query.compId
+          this.type = this.$route.query.type
+          console.log(this.baseInfoForm)
+
+          this.priceList[0].detailList[0].water = this.baseInfoForm.waterMin
+          this.priceList[0].detailList[2].water = this.baseInfoForm.waterBase
+          this.priceList[0].detailList[4].water = this.baseInfoForm.waterMax
+          this.isEdit = true
+          this.priceList = [{
+            index: 0,
+            checkList: [],
+            basicUnitPrice: "",
+            detailList: [{
+                type: 1,
+                name: "干粮",
+                water: "",
+                isWrite: false
+              },
+              {
+                type: 4,
+                jfprice: ""
+              },
+              {
+                type: 2,
+                name: "基准",
+                water: '',
+                isWrite: false
+              },
+              {
+                type: 4,
+                jfprice: ""
+              },
+              {
+                type: 3,
+                name: "上限",
+                water: '',
+                isWrite: false
+              },
+            ],
+          }]
           break;
         case "编辑":
+          // this.isEdit = false;
+          this.submitName = "提交"
+          this.getData()
           break;
         case "查看":
-         this.baseInfoForm =JSON.parse(this.$route.query.data)
-       purchasePriceLook({id:this.baseInfoForm.id}).toPromise().then((response) => {
-              console.log(response)
-              // this.tableData = response.records
-              // this.getList()
-            })
+          this.isEdit = false;
+          this.submitName = "计算"
+          this.getData()
           break;
         default:
           break
       }
     },
-    mounted() {},
+    mounted() {
+      debugger
+
+
+    },
     methods: {
+      // 查看/编辑获取数据
+      getData() {
+        this.type = this.$route.query.type
+        this.baseInfoForm = JSON.parse(this.$route.query.data)
+        purchasePriceLook({
+          id: this.baseInfoForm.id
+        }).toPromise().then((response) => {
+          console.log(response)
+          this.baseInfoForm = response
+          //构造查看priceList数据
+          this.priceList = []
+          this.makeLookPriceList()
+        })
+      },
       goodsChange(e) {
         console.log(e)
       },
@@ -331,6 +369,7 @@
           }
         }
       },
+      // 设置表格颜色
       tableRowClassName({
         row,
         rowIndex
@@ -410,6 +449,7 @@
         } catch (e) {}
         return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
       },
+      //保留两位小数
       keepTwoDecimal(num) {
         var result = parseFloat(num);
         if (isNaN(result)) {
@@ -419,9 +459,9 @@
         result = Math.round(result * 100) / 100;
         return result;
       },
+      // 添加粮价设置
       newSetPrice() {
         let _newObj = {
-          unitPrice: '',
           index: 0,
           checkList: [],
           detailList: [{
@@ -456,6 +496,7 @@
       },
       // 删除价格组
       delSetPrice(item, index) {
+        let that = this
         this.$confirm(
             '确认删除本组设置?',
             '提示', {
@@ -465,13 +506,19 @@
             }
           )
           .then(() => {
-            this.priceList.splice(index, 1)
+            if (that.priceList.length == 1) {
+              that.$message({
+                message: '至少保留一组粮价设置',
+                type: 'warning'
+              });
+            } else {
+              that.priceList.splice(index, 1)
+            }
           })
           .catch(() => {
             return false
           })
       },
-
       //构造新增价格数据
       makePriceDataList() {
         for (let k = 0; k < this.priceList.length; k++) {
@@ -508,26 +555,162 @@
               _detailsObj.point += ',' + this.priceList[k].detailList[i].water
             }
           }
+
+          debugger
           this.baseInfoForm.details.push(_detailsObj)
 
         }
       },
-
       //打印
-      print() {
+      print() {},
+      validate() {
+        let that = this
+        function _baseWaterValidate(min, max, saveNum, point, type) {
+          let _val1 = parseFloat(that.baseInfoForm.waterBase)
+          let _pointVal1 = _val1.toString().split(".")[1]
+          let _tobeVal1 = _val1 % saveNum
+          if (type == "waterBase") {
+            if (_val1 < max && _val1 > min && _pointVal1 < point && _tobeVal1 == 0) {
+              return false
+            }
+          }
+          if (type == "deductWeight") {
+            if (_val1 < max && _val1 > min && _pointVal1 < point) {
+              return false
+            }
+          }
+          if (type == "saleLimit") {
 
+            if (_val1 < max && _val1 > min && Number.isInteger(this.baseInfoForm.saleLimit)) {
+              return false
+            }
+          }
+          return true
+        }
+        if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase") || this.baseInfoForm.waterBase == '') {
+          if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase")) {
+            that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.5整除!');
+          } else {
+            this.$message.error('基准水分不能为空!');
+          }
+          return false
+        }
+        if (_baseWaterValidate(0, 2, 2, '', 'deductWeight') || this.baseInfoForm.deductWeight == '') {
+          if (_baseWaterValidate(0, 2, 2, '', 'deductWeight')) {
+            that.$message.error('扣重比输入错误!');
+          } else {
+            this.$message.error('扣重比不能为空!');
+          }
+          return false
+        }
+        if (_baseWaterValidate(0, 1000, 4, '', 'deductWeight') || this.baseInfoForm.dryGrainPrice == '') {
+          if (_baseWaterValidate(0, 1000, 4, '', 'deductWeight')) {
+            that.$message.error('干粮收购价输入错误!');
+          } else {
+            this.$message.error('干粮收购价格不能为空!');
+          }
+          return false
+        }
+
+        if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase") || this.baseInfoForm.waterMin == '') {
+          if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase")) {
+            that.$message.error('干粮水分输入错误!');
+          } else {
+            this.$message.error('干粮水分不能为空!');
+          }
+          return false
+        }
+        if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase") || this.baseInfoForm.waterMax == '') {
+          if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase")) {
+            that.$message.error('水分上限输入错误!');
+          } else {
+            this.$message.error('水分上限不能为空!');
+          }
+          return false
+        }
+        if (_baseWaterValidate(100, 100000, '', '', "saleLimit") || this.baseInfoForm.saleLimit == '') {
+          if (_baseWaterValidate(100, 100000, '', '', "saleLimit")) {
+            that.$message.error('销售上限输入错误!');
+          } else {
+            this.$message.error('销售上限不能为空!');
+          }
+          return false
+        }
+        console.log(this.priceList.length)
+        if (this.priceList.length != 4) {
+          this.$message.error('粮价设置为4个等级!');
+          return false
+        }
+        for (let i = 0; i < this.priceList.length; i++) {
+          let _item = this.priceList[i]
+          if (_baseWaterValidate(0, 50, 2, '', "deductWeight") || _item.basicUnitPrice == '') {
+            if (_baseWaterValidate(0, 50, 2, '', "deductWeight")) {
+              that.$message.error('基准单价输入错误!');
+            } else {
+              this.$message.error('基准单价不能为空!');
+            }
+            return false
+          }
+          if (_item.checkList.length == 0) {
+            this.$message.error('等级不能为空!');
+            return false
+          }
+          for (let j = 0; j < _item.detailList.length; j++) {
+            let _item1 = _item.detailList[j]
+            if (_item1.type == 4) {
+              if (_baseWaterValidate(0, 100, 3, '', 'deductWeight') || _item1.jfprice == "") {
+                if (_baseWaterValidate(0, 100, 3, '', 'deductWeight')) {
+                  that.$message.error('降幅输入错误!');
+                } else {
+                  this.$message.error('降幅价格不能为空!');
+                }
+                return false
+              }
+            } else {
+              if (_baseWaterValidate(0, 100, 1, 0.5, "waterBase") || _item1.water == "") {
+                if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase")) {
+                  that.$message.error('分界值输入错误!');
+                } else {
+                  this.$message.error('分界水分不能为空!');
+                }
+                return false
+              }
+            }
+          }
+        }
+        return true
       },
       // 提交
       submit() {
-        this.isCountShow = false
-        this.makeTableList()
-        this.makePriceDataList()
-        this.baseInfoForm.goodsName = this.selectVal
-        purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
-          console.log(response)
-          // this.tableData = response.records
-        })
+        debugger
+        let isValidate = this.validate()
+        if (isValidate) {
+          this.makeTableList()
+          this.makePriceDataList()
+          this.baseInfoForm.goodsName = this.selectVal
+          switch (this.$route.query.type) {
+            case "查看":
+              this.isCountShow = false;
+              break;
+            case "新增":
+              purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
+                console.log(response)
+                // this.tableData = response.records
+
+                this.isCountShow = false
+              })
+              break;
+            case "编辑":
+              purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
+                console.log(response)
+                // this.tableData = response.records
+                this.isCountShow = false
+              })
+              break;
+          }
+        }
       },
+      // 关闭
       closeCount() {
         this.isCountShow = true
         this.splitPriceList = []
@@ -535,23 +718,15 @@
           name: 'acquisitionManagement',
         })
       },
-      //处理表格数据
+      //处理价格表格数据
       makeTableList() {
-        // this.tableData
-        //水分下限
-        // this.baseInfoForm.waterMin
-        // 水分上限
-        // this.baseInfoForm.waterMax
-        // price1
-
         // 获取等级对应分界钱数
         this.getSplitPrice()
-        // 分界价钱数据
-        // this.splitPriceList
+        // 构造表格等差数列
         let _list = []
         let _obj = {}
         let _waterMin = parseFloat(this.baseInfoForm.waterMin)
-        let _waterMax = parseFloat(this.baseInfoForm.waterMax)
+        let _waterMax = this.baseInfoForm.waterMax
         let _count = (_waterMax - _waterMin) / 0.5 + 1
         for (let i = 0; i < _count; i++) {
           if (i == 0) {
@@ -562,7 +737,7 @@
               price1: priceList[0],
               price2: priceList[1],
               price3: priceList[2],
-              priceOther: priceList[3],
+              price4: priceList[3],
             }
           } else {
             _waterMin += 0.5
@@ -573,23 +748,21 @@
               price1: priceList[0],
               price2: priceList[1],
               price3: priceList[2],
-              priceOther: priceList[3],
+              price4: priceList[3],
             }
           }
           _list.push(_obj)
-          this.baseInfoForm.detailPrints.push(_obj)
         }
         this.tableData = _list
       },
-      // 获取分界价格数据
+      // 获取分界价格数据,构造分界价格区间数据
       getSplitPrice() {
-
         let _priceList = this.priceList
         for (let i = 0; i < _priceList.length; i++) {
           for (let k = 0; k < _priceList[i].checkList.length; k++) {
             let _obj = {}
             _obj.level = _priceList[i].checkList[k]
-            _obj.basicUnitPrice = parseFloat(_priceList[i].basicUnitPrice)
+            _obj.basicUnitPrice = _priceList[i].basicUnitPrice
             _obj.priceList = []
             _obj.haveSplit = false
             for (let j = 0; j < _priceList[i].detailList.length; j++) {
@@ -598,6 +771,7 @@
               }
               if (_priceList[i].detailList[j].type != 4 && _priceList[i].detailList[j].type != 3) {
                 _obj.priceList.push({
+                  index: j,
                   type: parseFloat(_priceList[i].detailList[j].type),
                   priceStart: parseFloat(_priceList[i].detailList[j].water),
                   priceEnd: parseFloat(_priceList[i].detailList[j + 2].water),
@@ -609,13 +783,56 @@
             }
             console.log(_obj)
             this.splitPriceList.push(_obj)
-
             console.log(this.splitPriceList)
           }
         }
       },
-      getOtherPrice(list) {
-
+      // 获取当前价格左右价格区间数据
+      getOtherPrice(list, nowList, direction) {
+        //判断当前价格左右各有几个分界,返回当前除当前分界其他分界价格和
+        let _left = []
+        let _right = []
+        let _leftTotalPrice = 0
+        let _rightTotalPrice = 0
+        //当前分界左边价格
+        if (direction == "leftBasic") {
+          for (let i = 0; i < list.length; i++) {
+            if (nowList.index <= list[i].index && list[i].priceStart < 30) {
+              _right.push(list[i])
+            } else if (list[i].priceStart < 30) {
+              _left.push(list[i])
+            }
+          }
+          if (_left.length > 0) {
+            for (let j = 0; j < _left.length; j++) {
+              _leftTotalPrice += _left[j].totalPrice
+            }
+          }
+          if (_right.length > 0) {
+            for (let k = 0; k < _right.length; k++) {
+              _rightTotalPrice += _right[k].totalPrice
+            }
+          }
+        } else {
+          for (let m = 0; m < list.length; m++) {
+            if (nowList.index <= list[m].index && list[m].priceStart > 30) {
+              _left.push(list[m])
+            } else if (list[m].priceStart > 30) {
+              _right.push(list[m])
+            }
+          }
+        }
+        if (_left.length > 0) {
+          for (let j = 0; j < _left.length; j++) {
+            _leftTotalPrice += _left[j].totalPrice
+          }
+        }
+        if (_right.length > 0) {
+          for (let k = 0; k < _right.length; k++) {
+            _rightTotalPrice += _right[k].totalPrice
+          }
+        }
+        return _leftTotalPrice + _rightTotalPrice
       },
       // 计算价格
       calculatePrice(_waterMin) {
@@ -631,6 +848,7 @@
           for (let k = 0; k < _list.length; k++) {
             //基准左边
             if (_waterMin < parseFloat(this.baseInfoForm.waterBase)) {
+              // 未设置分界
               if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd && !this.splitPriceList[i]
                 .haveSplit) {
                 console.log(basePrice)
@@ -638,56 +856,105 @@
                 console.log(this.keepTwoDecimal(((parseFloat(this.baseInfoForm.waterBase) - _waterMin) / 0.5) * _list[k]
                   .betweenPrice))
                 _price = basePrice + (parseFloat(this.baseInfoForm.waterBase) - _waterMin) / 0.5 * _list[k]
-                .betweenPrice;
+                  .betweenPrice;
                 console.log(_price)
                 prcieList.push(this.keepTwoDecimal(_price))
               } else if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd) {
-                // 当前段价格+其他段价格
-                let _otherPice = this.getOtherPrice(_list[k])
+                // 当前区间段价格+其他区间段价格
+                let _otherPice = this.getOtherPrice(_list, _list[k], "leftBasic")
                 let _price1 = (_list[k].priceEnd - _waterMin) / 0.5 * _list[k].betweenPrice + _otherPice;
-
-
-
-                // _price+=_list[k].totalPrice
+                prcieList.push(basePrice + _price1)
 
               }
-
             }
             //基准值
             else if (_waterMin == parseFloat(this.baseInfoForm.waterBase)) {
-                   prcieList.push(this.keepTwoDecimal(basePrice))
+              prcieList.push(this.keepTwoDecimal(basePrice))
             }
             // 基准右边
             else {
-
-            if (_waterMin > _list[k].priceStart && _waterMin <=_list[k].priceEnd && !this.splitPriceList[i]
+              if (_waterMin > _list[k].priceStart && _waterMin <= _list[k].priceEnd && !this.splitPriceList[i]
                 .haveSplit) {
-                _price = basePrice - (parseFloat(this.baseInfoForm.waterBase) - _waterMin) / 0.5 * _list[k]
-                .betweenPrice;
+                _price = basePrice - (_waterMin - parseFloat(this.baseInfoForm.waterBase)) / 0.5 * _list[k]
+                  .betweenPrice;
                 console.log(_price)
                 prcieList.push(this.keepTwoDecimal(_price))
-              } else if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd) {
+              } else if (_waterMin > _list[k].priceStart && _waterMin <= _list[k].priceEnd) {
                 // 当前段价格+其他段价格
-                let _otherPice = this.getOtherPrice(_list[k])
-                let _price1 = (_list[k].priceEnd - _waterMin) / 0.5 * _list[k].betweenPrice + _otherPice;
-
-
-
-                // _price+=_list[k].totalPrice
-
+                let _otherPice2 = this.getOtherPrice(_list, _list[k], "rightBasic")
+                let _price2 = (_waterMin - _list[k].priceEnd) / 0.5 * _list[k].betweenPrice + _otherPice2;
+                prcieList.push(basePrice - _price2)
               }
-
-
             }
-
-
           }
         }
         return prcieList
+      },
+      // 构造查看粮价设置数据
+      makeLookPriceList() {
+        debugger
+        this.selectVal = this.baseInfoForm.goodsName
+        let _priceList = this.baseInfoForm.details
+        let _checkList = []
+        let _detailList = []
+        let _pointPrice = []
+        let _basePrice = 0
+        for (let i = 0; i < _priceList.length; i++) {
+          _checkList = _priceList[i].level.split(',')
+          _detailList = _priceList[i].point.split(',')
+          _pointPrice = _priceList[i].pointPrice.split(',')
+          let _newDetailList = []
+          for (let k = 0; k < _detailList.length; k++) {
+            let _obj = {}
+            if (_detailList[k] == this.baseInfoForm.waterMin) {
+              _obj = {
+                type: 1,
+                name: "干粮",
+                water: _detailList[k],
+                isWrite: false
+              }
 
-      }
-
+            } else if (_detailList[k] == this.baseInfoForm.waterMax) {
+              _obj = {
+                type: 3,
+                name: "上限",
+                water: _detailList[k],
+                isWrite: false
+              }
+            } else if (_detailList[k] == this.baseInfoForm.waterBase) {
+              _obj = {
+                type: 2,
+                name: "基准",
+                water: _detailList[k],
+                isWrite: false
+              }
+            } else {
+              _obj = {
+                name: "分界",
+                water: _detailList[k],
+                type: 5,
+                index: k,
+                isWrite: false
+              }
 
+            }
+            _newDetailList.push(_obj)
+            if (k != _detailList.length - 1) {
+              _newDetailList.push({
+                type: 4,
+                jfprice: _pointPrice[k]
+              })
+            }
+          }
+          let _obj = {
+            basicUnitPrice: _priceList[i].basePrice,
+            index: i,
+            checkList: _checkList,
+            detailList: _newDetailList
+          }
+          this.priceList.push(_obj)
+        }
+      }
     },
   }
 </script>
@@ -859,9 +1126,14 @@
           background: #5473E8;
           border-radius: 2px;
           color: white;
-          display: inline-block;
-          text-align: center;
-          line-height: 16px;
+          background: #5473E8;
+          border-radius: 2px;
+          color: white;
+          padding: 0 !important;
+          display: inline-flex;
+          justify-content: center;
+          align-items: center;
+          font-size: 14px;
         }
 
         .reduce {

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

@@ -8,7 +8,7 @@ const houseSelfCollectRouter = {
   alwaysShow: true, // will always show the root menu
   meta: {
     title: 'houseSelfCollect',
-    module: 'contractManagement',
+    module: 'acquisitionManagement',
     icon: '-hetongguanli'
   },
   children: [
@@ -65,7 +65,7 @@ const houseSelfCollectRouter = {
       meta: {
         title: 'acquisitionManagement',
         shortcutEntrance: 'houseSelfCollect',
-        module: 'procurement.procurementOrder.delete',
+        module: 'acquisitionManagement.acquisition.view',
         permissicon: [],
         keepAlive: true
       }
@@ -79,7 +79,7 @@ const houseSelfCollectRouter = {
       meta: {
         title: 'acquisitionManagementAdd',
         shortcutEntrance: 'houseSelfCollect',
-        module: 'procurement.procurementOrder.delete',
+        module: 'acquisitionManagement.acquisition.add',
         permissicon: [],
         keepAlive: true
       },
@@ -122,7 +122,7 @@ const houseSelfCollectRouter = {
       meta: {
         title: 'paymentManagement',
         shortcutEntrance: 'houseSelfCollect',
-        module: 'procurement.procurementOrder.delete',
+        module: 'acquisitionManagement.acquisitionPay',
         permissicon: [],
         keepAlive: true
       }

+ 265 - 54
src/views/houseSelfCollect/paymentManagement.vue

@@ -9,23 +9,12 @@
         <ws-button type="primary" @click="reject">驳回</ws-button>
         <ws-button type="primary" @click="adopt">通过</ws-button>
         <ws-button type="primary" @click="payment">付款</ws-button>
-        <ws-button type="primary" @click="examine">审核</ws-button>
       </template>
       <template slot="right">
-        <ws-select
-          v-model="searchTypeText"
-          placeholder=""
-          @change="selecttaskType"
-          :value="searchType"
-        >
-          <ws-option
-            v-for="item in taskTypeList"
-            :key="item.value"
-            :label="item.value"
-            :value="item.value"
-            style="color: #8890b1"
-          />
-        </ws-select>
+        <el-select v-model="warehouseNameKey" placeholder="请选择" @change="warehouseChange">
+          <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
+          </el-option>
+          </el-select>
         <div></div>
         <ws-input
           v-model="searchKeyWord"
@@ -51,11 +40,11 @@
       </template>
     </BaseHeaderLayout>
     <el-table
-      :data="warehouseList"
+      :data="paymentList.records"
       style="width: 100%; margin-top: 20px"
-      ref="warehouseList"
+      ref="paymentList"
       border
-      height="780"
+      height="680"
       @selection-change="handleSelectionChange"
     >
       <el-table-column
@@ -71,58 +60,63 @@
       </el-table-column>
       <el-table-column
         class="table_td"
-        prop="contractNo"
+        prop="paymentNo"
         width="120"
         label="编号"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="closePositionDate"
+        prop="customerName"
         label="客户"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="closingQuantity"
+        prop="carNo"
         label="车牌号"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="transactionPrice"
+        prop="goodsName"
         label="货名"
       ></el-table-column>
       <el-table-column
         class="table_td"
+        width='180'
         prop="type"
         label="类型"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="closeRate"
+        prop="tidalGrainPrice"
+         width='180'
         label="净重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="basisPrice"
+        prop="solidGrainPrice"
+        width='180'
         label="纯重单价(元/公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="amountIngPayable"
+        prop="netWeight"
+        width='140'
         label="净重(公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="amountEdPayable"
+        prop="pureWeight"
+        width='140'
         label="纯重(公斤)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="amountNotPayable"
+        prop="amountIngPayable"
         label="应付款(元)"
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="paymentDate"
+        prop="amountEdPayable"
         label="已付款(元)"
       ></el-table-column>
       <el-table-column
@@ -132,19 +126,26 @@
       ></el-table-column>
       <el-table-column
         class="table_td"
-        prop="collectionEdPayable"
+        prop="status"
         label="状态"
-      ></el-table-column>
+      >
+      <template scope="scope">
+        <span v-if='scope.row.approveStatus'>{{scope.row.approveStatus}}</span>
+        <span v-else>{{scope.row.status}}</span>
+      </template>
+      </el-table-column>
       <el-table-column
         class="table_td"
         prop="collectionEdPayable"
         label="操作"
         width="350"
       >
-        <el-button @click="del">删除</el-button>
-        <el-button @click="settlement(1)">结算</el-button>
-        <el-button @click="settlement(2)">查看</el-button>
-        <el-button>打印</el-button>
+      <template scope="scope">
+        <el-button type="danger" v-if='!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="del(scope.row)">删除</el-button>
+        <el-button v-if='!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="settlement(1,scope.row)">结算</el-button>
+        <el-button v-if='scope.row.approveStatus||scope.row.status=="已驳回"' @click="settlement(2,scope.row)">查看</el-button>
+        <el-button v-if='scope.row.approveStatus||scope.row.status=="已驳回"' @click='print(scope.row)'>打印</el-button>
+      </template>
       </el-table-column>
     </el-table>
     <!-- 付款弹窗 -->
@@ -187,13 +188,100 @@
       :total="deptBudgetTotal"
     >
     </el-pagination>
+    <el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="粮食质检单"
+    >
+    <div>
+      <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
+      <table class="table">
+        <tr class="row">
+          <td rowspan="4" class="col col-bgc">买方</td>
+          <td class="col col-bgc">收货单位</td>
+          <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
+          <td rowspan="4" class="col col-bgc">买方</td>
+          <td class="col col-bgc">收货单位</td>
+          <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">收货单位</td>
+          <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
+          <td class="col col-bgc">联系人</td>
+          <td class="col" colspan="2">{{ printData.contacts }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">收货单位</td>
+          <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
+          <td class="col col-bgc">联系人</td>
+          <td class="col" colspan="2">{{ printData.contacts }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">收货单位</td>
+          <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
+          <td class="col col-bgc">联系人</td>
+          <td class="col" colspan="2">{{ printData.contacts }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">货名</td>
+          <td class="col">{{ printData.goodsName }}</td>
+          <td class="col col-bgc">类型</td>
+          <td class="col">{{ printData.customerName }}</td>
+          <td class="col col-bgc">容量(克/升)</td>
+          <td class="col">{{ printData.bulkDensity }}</td>
+          <td class="col col-bgc">不完整粒(%)</td>
+          <td class="col">{{ printData.imperfectGrain }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">等级</td>
+          <td class="col">{{ printData.grade }}</td>
+          <td class="col col-bgc">水分(%)</td>
+          <td class="col">{{ printData.waterContent }}</td>
+          <td class="col col-bgc">热损伤(%)</td>
+          <td class="col">{{ printData.jiaorenli }}</td>
+          <td class="col col-bgc">单价(元/公斤)</td>
+          <td class="col">{{ printData.tidalGrainPrice }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">杂质(%)</td>
+          <td class="col">{{ printData.impurity }}</td>
+          <td class="col col-bgc">霉变粒(%)</td>
+          <td class="col">{{ printData.mildewGrain }}</td>
+          <td class="col col-bgc" colspan="2">购粮性质</td>
+          <td class="col" colspan="2">{{ printData.customerName }}</td>
+        </tr>
+      </table>
+    </div>
+      
+      <div class="bottom">
+        <div class="bottom-row1">
+          <div>质检:{{ printData.qualityInspector }}</div>
+          <div>{{ printData.qualityDate }}</div>
+        </div>
+        <div class="bottom-row2">
+          <div class="left">
+            <img src="../../../public/img/add.png" alt="" />
+          </div>
+          <div class="config">收货单位签名或盖章</div>
+          <div class="">客户签名</div>
+        </div>
+        <div class="bottom-row3">扫一扫</div>
+        <div class="bottom-row4">
+          <el-button type="primary">关闭</el-button>
+          <el-button type="primary" @click="printSmall">打印小票</el-button>
+          <el-button type="primary" @click="printBig">打印单据</el-button>
+        </div>
+      </div>
+    </el-dialog>
     </div>
   </div>
 </template>
 <script>
-import {} from '@/model/houseSelfCollect/index'
+import {getpayment,selectWarehouseSelf,delpayment,auditpayment,getpaymentexamine} from '@/model/houseSelfCollect/index'
 import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
-
+import { posthandle } from '@/model/purchasingManagement/index'
 export default {
   components: {
     houseSelfCollectPrint,
@@ -204,25 +292,53 @@ export default {
       //分页
       currentPage: 1,
       pageSize: 10,
+      paymentList:[],
       deptCircularPage:{},
       deptBudgetTotal: 0,
-      warehouseList: [
-        {
-          collectionEdPayable: '快付款',
-        },
-      ],
       paymentForm: false,
       taskTypeList: ['一号库'],
       searchType: '',
       searchTypeText: '',
       searchKeyWord: '',
+      warehouseList:[],
+      warehouseNameKey:'',
+      warehouseName:'',
+      isShowPrint: false,
+      printData:{},
+      warehouse:[],
       value1: '', //付款日期
       modification: [],
     }
   },
-  activated() {},
+  activated() {
+     selectWarehouseSelf({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        personCharge: sessionStorage.getItem('ws-pf_staffName'),
+      }).toPromise().then((response) => {
+          this.warehouseList = response
+          // this.$set(this.warehouseName,response[0].warehouseName)
+          // this.warehouseName=response[0].warehouseName
+          // this.warehouse=response[0]
+          this.warehouseList = response
+          this.warehouseNameKey = this.warehouseList[0].id
+          this.warehouseName = this.warehouseList[0].warehouseName
+          this.getList()
+        })
+    
+  },
   methods: {
-    del() {
+   getList(){
+     getpayment({
+       currentPage:this.currentPage,
+       pageSize:this.pageSize,
+       searchKeyWord:this.searchKeyWord,
+       searchType:this.searchType,
+       warehouseName:this.warehouseName
+      }).toPromise().then((response) => {
+          this.paymentList = response
+        })
+   },
+    del(row) {
       this.$confirm(
         '对应的质检和检斤记录将一并删除,是否确定删除操作?',
         '提示',
@@ -232,13 +348,31 @@ export default {
           type: 'warning',
         }
       )
-        .then(() => {})
+        .then(() => {
+          delpayment({id:row.id}).toPromise().then((response) => {
+         this.$message.success('删除成功')
+         this.getList()
+        })
+        })
         .catch(() => {
           return false
         })
     },
-    settlement(index) {
-      this.$router.push({ path: 'settlement', query: { type: index } })
+    settlement(index,row) {
+      var data={}
+      var data1={}
+      for (let i = 0; i < this.warehouseList.length; i++) {
+        if(this.warehouseList[i].id==this.warehouseNameKey){
+          data=this.warehouseList[i]
+        }
+      }
+      for (let i = 0; i < data.purchasePriceList.length; i++) {
+        if(data.purchasePriceList[i].goodsName==row.goodsName){
+          data1=data.purchasePriceList[i]
+        }
+      }
+      if(row.goodsName)
+      this.$router.push({ path: 'settlement', query: { type: index,id: row.id,waterMin:data1.waterMin} })
     },
     payment() {
       if (this.modification.length == 0) {
@@ -262,23 +396,61 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要驳回的条目')
       } else {
-        this.$confirm('驳回后任务将退回到统计,是否确定驳回?', '提示', {
+        this.$confirm('是否确定驳回?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning',
         })
-          .then(() => {})
+          .then(() => {
+            this.audit(this.modification[0], 0,false,'','') 
+          })
           .catch(() => {
             return false
           })
       }
     },
+    audit(item, index, status, status2, reason) {
+      if (index < this.modification.length) {
+        if(status==true&&item.status=='已驳回'){
+          console.log(11111)
+          auditpayment({compId:sessionStorage.getItem('ws-pf_compId'),id:item.id}).toPromise()
+          .then((response) => {
+            console.log(22222)
+            this.audit(this.modification[index + 1], index + 1, status,status2,reason)
+          })
+        }else{
+        posthandle({
+          taskId: item.taskId,
+          approved: status,
+          auditMind: reason != undefined ? '已驳回' : '34',
+          needReapply: status2 != undefined ? true : false,
+        })
+          .toPromise()
+          .then((response) => {
+            this.audit(this.modification[index + 1], index + 1, status,status2,reason)
+          })
+          .catch((req) => {
+            this.$message.warning(req.message)
+          })
+        }
+        
+      } else {
+        if (status==true) {
+          this.$message.success('通过成功')
+          this.getList()
+        } else if (status==false) {
+          this.$message.success('驳回成功')
+          this.getList()
+          }
+      }
+    },
     adopt() {
+      var that =this
       if (this.modification.length == 0) {
         this.$message.warning('请选择要通过的条目')
       } else {
         this.$confirm(
-          '审核通过后,任务将发送给决策人,是否确定通过?',
+          '是否确定通过?',
           '提示',
           {
             confirmButtonText: '确定',
@@ -286,12 +458,23 @@ export default {
             type: 'warning',
           }
         )
-          .then(() => {})
+          .then(() => {
+            this.audit(this.modification[0], 0, true) 
+          })
           .catch(() => {
             return false
           })
       }
     },
+    print(row) {
+      getpaymentexamine({id:row.id}).toPromise().then((response) => {
+          this.isShowPrint = true
+          this.printData =response
+        })
+      
+      // 打印价格对照表
+        // window.location.href="../../../static/payprint.html?data="+JSON.stringify(row)
+      },
     examine() {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要审核的条目')
@@ -319,16 +502,18 @@ export default {
     // },
     selectInit(row) {
       //在这里一定要记得类型匹配的上。
-      if (row.approveStatus == null) {
-        return true
-      } else if (row.approveStatus != null) {
+      if(row.status!='已驳回'){
         if (row.taskId == null) {
           return false
         } else {
           return true
         }
+      }else{
+        return true
       }
+        
     },
+     
     handleSelectionChange(val) {
       this.modification = val
     },
@@ -345,7 +530,14 @@ export default {
     //     }
     //   }
     // },
-    selecttaskType() {},
+    warehouseChange(e) {
+      for (let i = 0; i < this.warehouseList.length; i++) {
+        if(this.warehouseList[i].id==this.warehouseNameKey){
+          this.warehouseName=this.warehouseList[i].warehouseName
+        }
+      }
+      this.getList()
+    },
      handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       this.pageSize = val
@@ -380,6 +572,21 @@ export default {
   font-size: 16px;
   font-weight: 600;
 }
+table,
+table tr th,
+table tr td {
+  border: 2px solid #333333;
+  padding: 5px 0;
+}
+
+table {
+  width: 100%;
+  min-height: 25px;
+  line-height: 25px;
+  text-align: center;
+  border-collapse: collapse;
+  border: 3px solid #333333;
+}
 .formItem {
   width: 70% !important;
 }
@@ -390,5 +597,9 @@ export default {
 /deep/.el-table--enable-row-transition .el-table__body td {
   text-align: center;
 }
+.title{
+  padding:10px;
+  text-align:center;
+}
 </style>
 

+ 240 - 57
src/views/houseSelfCollect/settlement.vue

@@ -26,8 +26,9 @@
         <div style="width: 50%; margin: 0 auto">
           <div class="title">基本信息</div>
           <ws-info-table>
-            <ws-form-item label="编号" span="1" prop="waterContent">
+            <ws-form-item label="编号" span="1" prop="paymentNo">
               <ws-input
+              v-model="paymentList.paymentNo"
                 placeholder="请输入编号"
                 maxlength="100"
                 disabled
@@ -36,46 +37,49 @@
             </ws-form-item>
             <ws-form-item label="仓位号" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.binNumber"
                 placeholder="请输入仓位号"
                 maxlength="100"
+                disabled
                 size="small"
-              disabled
               />
             </ws-form-item>
             <ws-form-item label="客户" span="1" prop="waterContent">
-              <ws-select
-                v-model="warehouseList.a"
-                placeholder="请输入货名"
-                class="typeselect"
-                @change="selectpackingMethod"
-               disabled
-              >
-                <ws-option
-                  v-for="item in goodnameList"
-                  :key="item.constKey"
-                  :label="item.constValue"
-                  :value="item.constValue"
-                />
-              </ws-select>
+               <ws-input
+              v-model="paymentList.customerName"
+                placeholder="请输入仓位号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
             </ws-form-item>
             <ws-form-item label="囤位号" span="1" prop="waterContent">
-              <ws-input placeholder="请输入客户" maxlength="100" size="small" disabled />
+              <ws-input  v-model="paymentList.storageNumber" placeholder="请输入囤位号" maxlength="100" size="small" disabled />
             </ws-form-item>
             <ws-form-item label="车牌号" span="1" prop="waterContent">
-              <ws-input placeholder="请输入客户" maxlength="100" size="small" disabled/>
+              <ws-input v-model="paymentList.carNumber" placeholder="请输入车牌号" maxlength="100" size="small" disabled />
             </ws-form-item>
             <ws-form-item label="货名" span="1" prop="waterContent">
-              <ws-input placeholder="请输入客户" maxlength="100" size="small" disabled/>
+                <ws-input v-model="paymentList.goodsName" placeholder="请输入货名" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item label="类型" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.type" placeholder="请输入类型" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item label="购粮性质" span="1" prop="waterContent">
+                <ws-input v-model="paymentList.natureOfGrainPurchase" placeholder="请输入购粮性质" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item v-if='paymentList.type=="干粮"' label="干粮单价" span="1" prop="waterContent">
+                <ws-input v-model="paymentList.solidGrainPrice" placeholder="请输入干粮单价" maxlength="100" size="small" :disabled='disabled' />
             </ws-form-item>
           </ws-info-table>
-
           <div class="title">质检数据</div>
           <ws-info-table>
             <ws-form-item label="等级" span="1" prop="waterContent">
-              <ws-input placeholder="请输入编号" maxlength="100" size="small" disabled/>
+              <ws-input v-model="paymentList.qualityInspectionManagement.grade" placeholder="请输入等级" maxlength="100" size="small" disabled />
             </ws-form-item>
             <ws-form-item label="杂质(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.impurity"
                 placeholder="请输入杂质占比"
                 maxlength="100"
                 size="small"
@@ -84,6 +88,7 @@
             </ws-form-item>
             <ws-form-item label="水分(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.waterContent"
                 placeholder="请输入水分占比"
                 maxlength="100"
                 size="small"
@@ -92,17 +97,19 @@
             </ws-form-item>
             <ws-form-item label="霉变粒(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.mildewGrain"
                 placeholder="请输入霉变粒占比"
                 maxlength="100"
                 size="small"
-                disabled
+               disabled
               />
             </ws-form-item>
             <ws-form-item label="容重(克/升)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入容重" maxlength="100" size="small" disabled/>
+              <ws-input v-model="paymentList.qualityInspectionManagement.bulkDensity" placeholder="请输入容重" maxlength="100" size="small" disabled />
             </ws-form-item>
             <ws-form-item label="热损伤(%)" span="1" prop="waterContent">
               <ws-input
+               v-model="paymentList.qualityInspectionManagement.jiaorenli"
                 placeholder="请输入热损伤占比"
                 maxlength="100"
                 size="small"
@@ -111,6 +118,7 @@
             </ws-form-item>
             <ws-form-item label="不完整粒(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.imperfectGrain"
                 placeholder="请输入不完整粒占比"
                 maxlength="100"
                 size="small"
@@ -119,94 +127,110 @@
             </ws-form-item>
           </ws-info-table>
 
-          <div class="title">单价核算</div>
-          <ws-info-table>
+          <div v-if='paymentList.type=="潮粮"' class="title">单价核算</div>
+          <ws-info-table v-if='paymentList.type=="潮粮"'>
             <ws-form-item label="潮粮水分(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.waterContent"
                 placeholder="请输入潮粮水分"
                 maxlength="100"
                 size="small"
                 disabled
               />
             </ws-form-item>
-            <ws-form-item label="扣重比" span="1" prop="waterContent">
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣重比" span="1" prop="waterContent">
               <ws-input
+              @input='buckleWeightRatiochange'
+              v-model="paymentList.buckleWeightRatio"
                 placeholder="请输入扣重比"
                 maxlength="100"
                 size="small"
-                :disabled = "disabled"
+                :disabled='disabled'
               />
             </ws-form-item>
-            <ws-form-item label="干粮水分(%)" span="1" prop="waterContent">
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="干粮水分(%)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.qualityInspectionManagement.waterMin"
                 placeholder="请输入干粮水分"
                 maxlength="100"
                 size="small"
                 disabled
               />
             </ws-form-item>
-            <ws-form-item label="扣重" span="1" prop="waterContent">
-              <ws-input placeholder="请输入扣重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣重" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.qualityInspectionManagement.weightDeduction" placeholder="请输入扣重" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="掉水(%)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入掉水" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="掉水(%)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.qualityInspectionManagement.waterContent-paymentList.qualityInspectionManagement.waterMin" placeholder="请输入掉水" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="基数" span="1" prop="waterContent">
-              <ws-input placeholder="请输入基数" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="基数" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.base" placeholder="请输入基数" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="毛重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入毛重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="毛重(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.weighingManagement.grossWeight" placeholder="请输入毛重" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="纯重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入纯重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="纯重(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.pureWeight" placeholder="请输入纯重" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item label="皮重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入皮重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="皮重(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.weighingManagement.tare" placeholder="请输入皮重" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item
+            <ws-form-item v-if='paymentList.type=="潮粮"'
               label="净重单价(元/公斤)"
               span="1"
               prop="waterContent"
             >
               <ws-input
+               v-model="paymentList.qualityInspectionManagement.tidalGrainPrice"
                 placeholder="请输入净重单价"
                 maxlength="100"
                 size="small"
               disabled
               />
             </ws-form-item>
-            <ws-form-item label="扣杂(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入扣杂" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="扣杂(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.weighingManagement.buckleMiscellaneous" placeholder="请输入扣杂" maxlength="100" size="small" disabled/>
             </ws-form-item>
-            <ws-form-item
+            <ws-form-item v-if='paymentList.type=="潮粮"'
               label="纯重单价(元/公斤)"
               span="1"
               prop="waterContent"
             >
               <ws-input
+               v-model="paymentList.solidGrainPrice"
                 placeholder="请输入纯重单价"
                 maxlength="100"
                 size="small"
                 disabled
               />
             </ws-form-item>
-            <ws-form-item label="净重(公斤)" span="1" prop="waterContent">
-              <ws-input placeholder="请输入净重" maxlength="100" size="small" disabled/>
+            <ws-form-item v-if='paymentList.type=="潮粮"' label="净重(公斤)" span="1" prop="waterContent">
+              <ws-input v-model="paymentList.weighingManagement.netWeight" placeholder="请输入净重" maxlength="100" size="small" disabled/>
             </ws-form-item>
           </ws-info-table>
 
-          <div class="title">算金额(元)</div>
+          <div class="title">算金额(元)</div>
           <ws-info-table>
-            <ws-form-item
+            <ws-form-item v-if='paymentList.type=="潮粮"'
               label="粮款 = 净重 x 净重单价 ="
               span="1"
               prop="waterContent"
               class="formItem"
             >
-              <ws-input placeholder="请输入粮款" maxlength="100" size="small" disabled/>
+              <ws-input @input='grainMoney' v-model="paymentList.grainMoney" placeholder="请输入粮款" maxlength="100" size="small" :disabled='disabled'/>
+            </ws-form-item>
+            <ws-form-item v-if='paymentList.type=="干粮"'
+              label="粮款 = 净重 x  干粮单价 ="
+              span="1"
+              prop="waterContent"
+              class="formItem"
+            >
+              <ws-input @input='grainMoney' v-model="paymentList.grainMoney" placeholder="请输入粮款" maxlength="100" size="small" :disabled='disabled'/>
             </ws-form-item>
             <ws-form-item label="称重补助" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+               v-model="paymentList.weighingSubsidy"
                 placeholder="请输入称重补助"
                 maxlength="100"
                 size="small"
@@ -215,6 +239,8 @@
             </ws-form-item>
             <ws-form-item label="称重扣款" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.weighingDeduction"
                 placeholder="请输入称重扣款"
                 maxlength="100"
                 size="small"
@@ -223,6 +249,8 @@
             </ws-form-item>
             <ws-form-item label="运费补助" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.freightSubsidy"
                 placeholder="请输入运费补助"
                 maxlength="100"
                 :disabled="disabled"
@@ -231,6 +259,8 @@
             </ws-form-item>
             <ws-form-item label="运费扣款" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+               v-model="paymentList.freightDeduction"
                 placeholder="请输入运费扣款"
                 maxlength="100"
                 :disabled="disabled"
@@ -239,6 +269,8 @@
             </ws-form-item>
             <ws-form-item label="卸车补助" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.unloadSubsidy"
                 placeholder="请输入卸车补助"
                 maxlength="100"
                 :disabled="disabled"
@@ -247,6 +279,8 @@
             </ws-form-item>
             <ws-form-item label="卸车扣款" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.unloadDeduction"
                 placeholder="请输入卸车扣款"
                 maxlength="100"
                 :disabled="disabled"
@@ -255,6 +289,8 @@
             </ws-form-item>
             <ws-form-item label="其他补助" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.otherSubsidy"
                 placeholder="请输入其他补助"
                 maxlength="100"
                 :disabled="disabled"
@@ -263,6 +299,8 @@
             </ws-form-item>
             <ws-form-item label="质量扣款" span="1" prop="qualityDeduction">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.qualityDeduction"
                 placeholder="请输入质量扣款"
                 maxlength="100"
                 :disabled="disabled"
@@ -271,6 +309,8 @@
             </ws-form-item>
             <ws-form-item label="其他扣款" span="1" prop="waterContent">
               <ws-input
+              @input='grainMoney'
+              v-model="paymentList.otherDeduction"
                 placeholder="请输入其他扣款"
                 maxlength="100"
                 :disabled="disabled"
@@ -284,14 +324,17 @@
               class="formItem"
             >
               <ws-input
+              v-model="paymentList.calculationPayable"
                 placeholder="请输入计算应付"
                 maxlength="100"
-               disabled
+                disabled
                 size="small"
               />
             </ws-form-item>
             <ws-form-item label="实际付款" span="1" prop="waterContent">
               <ws-input
+              @input='actualPayment'
+              v-model="paymentList.actualPayment"
                 placeholder="请输入实际付款"
                 maxlength="100"
                 :disabled="disabled"
@@ -300,6 +343,7 @@
             </ws-form-item>
             <ws-form-item label="人民币大写" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.capitalize"
                 placeholder="请输入人民币大写"
                 maxlength="100"
                 disabled
@@ -320,6 +364,7 @@
             </ws-form-item> -->
             <ws-form-item label="记事(选填)" span="1" prop="waterContent">
               <ws-input
+              v-model="paymentList.remarks"
                 placeholder="备注信息,不超过20个字"
                 maxlength="100"
                 :disabled="disabled"
@@ -339,7 +384,7 @@
   </div>
 </template>
 <script>
-import {} from '@/model/houseSelfCollect/index'
+import {getpaymentexamine,postpaymentedit} from '@/model/houseSelfCollect/index'
 // import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
 export default {
   components: {
@@ -348,9 +393,16 @@ export default {
   watch: {},
   data() {
     return {
-      warehouseList: {},
+     paymentList: {
+       qualityInspectionManagement:{
+         waterContent:'',
+         buckleWeightRatio:0,
+         grainMoney:0
+       }
+     },
       disabled:false,
       types:'',
+
       information:'结算',
     }
   },
@@ -363,19 +415,141 @@ export default {
       this.disabled=false
          this.information = '结算'   
     }
-    console.log( this.information)
+   this.getList()
   },
   methods: {
+    getList(){
+      getpaymentexamine({id:this.$route.query.id}).toPromise().then((response) => {
+          this.paymentList = response
+          this.paymentList.qualityInspectionManagement.waterMin=this.$route.query.waterMin
+          this.paymentList.qualityInspectionManagement.weightDeduction=(this.paymentList.qualityInspectionManagement.waterContent-this.paymentList.qualityInspectionManagement.waterMin)*this.paymentList.buckleWeightRatio
+          this.paymentList.base=(100-this.paymentList.qualityInspectionManagement.weightDeduction)/100
+          this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
+          if(!this.paymentList.solidGrainPrice){
+            this.paymentList.solidGrainPrice=this.paymentList.qualityInspectionManagement.tidalGrainPrice/this.paymentList.base
+          }
+          if(this.paymentList.type='潮粮'){
+            this.paymentList.grainMoney=this.paymentList.qualityInspectionManagement.tidalGrainPrice*this.paymentList.weighingManagement.netWeight
+          }else{
+            this.paymentList.grainMoney=this.paymentList.qualityInspectionManagement.solidGrainPrice*this.paymentList.weighingManagement.netWeight
+          }
+          console.log(this.paymentList.grainMoney)
+          
+        })
+    },
+    actualPayment(e){
+     this.paymentList.capitalize=this.convertCurrency(e)
+    },
+    grainMoney(){
+      this.paymentList.calculationPayable=(Number(this.paymentList.grainMoney)+Number(this.paymentList.weighingSubsidy)+Number(this.paymentList.freightSubsidy)+Number(this.paymentList.unloadSubsidy)+Number(this.paymentList.otherSubsidy))-this.paymentList.weighingDeduction-this.paymentList.freightDeduction-this.paymentList.unloadDeduction-this.paymentList.otherDeduction-this.paymentList.qualityDeduction
+    },
+     /**
+         * 将金额数字转为汉字大写
+         * 12.42 -> 壹拾贰元肆角贰分
+         * @param {Number} money - 数字金额
+         * @return String
+        */
+        convertCurrency(money)
+        {
+          //汉字的数字
+          var cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖');
+          //基本单位
+          var cnIntRadice = new Array('', '拾', '佰', '仟');
+          //对应整数部分扩展单位
+          var cnIntUnits = new Array('', '万', '亿', '兆');
+          //对应小数部分单位
+          var cnDecUnits = new Array('角', '分', '毫', '厘');
+          //整数金额时后面跟的字符
+          var cnInteger = '整';
+          //整型完以后的单位
+          var cnIntLast = '元';
+          //最大处理的数字
+          var maxNum = 999999999999999.9999;
+          //金额整数部分
+          var integerNum;
+          //金额小数部分
+          var decimalNum;
+          //输出的中文金额字符串
+          var chineseStr = '';
+          //分离金额后用的数组,预定义
+          var parts;
+          if (money == '') { return ''; }
+          money = parseFloat(money);
+          if (money >= maxNum) {
+            //超出最大处理数字
+            return '';
+          }
+          if (money == 0) {
+            chineseStr = cnNums[0] + cnIntLast + cnInteger;
+            return chineseStr;
+          }
+          //转换为字符串
+          money = money.toString();
+          if (money.indexOf('.') == -1) {
+            integerNum = money;
+            decimalNum = '';
+          } else {
+            parts = money.split('.');
+            integerNum = parts[0];
+            decimalNum = parts[1].substr(0, 4);
+          }
+          //获取整型部分转换
+          if (parseInt(integerNum, 10) > 0) {
+            var zeroCount = 0;
+            var IntLen = integerNum.length;
+            for (var i = 0; i < IntLen; i++) {
+              var n = integerNum.substr(i, 1);
+              var p = IntLen - i - 1;
+              var q = p / 4;
+              var m = p % 4;
+              if (n == '0') {
+                zeroCount++;
+              } else {
+                if (zeroCount > 0) {
+                  chineseStr += cnNums[0];
+                }
+                //归零
+                zeroCount = 0;
+                chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
+              }
+              if (m == 0 && zeroCount < 4) {
+                chineseStr += cnIntUnits[q];
+              }
+            }
+            chineseStr += cnIntLast;
+          }
+          //小数部分
+          if (decimalNum != '') {
+            var decLen = decimalNum.length;
+            for (var i = 0; i < decLen; i++) {
+              var n = decimalNum.substr(i, 1);
+              if (n != '0') {
+                chineseStr += cnNums[Number(n)] + cnDecUnits[i];
+              }
+            }
+          }
+          if (chineseStr == '') {
+            chineseStr += cnNums[0] + cnIntLast + cnInteger;
+          } else if (decimalNum == '') {
+            chineseStr += cnInteger;
+          }
+          return chineseStr;
+        },
     print() {
+      this.paymentList.id=this.$route.query.id
+      postpaymentedit(this.paymentList).toPromise().then((response) => {
+          this.$router.push({ path: 'houseSelfCollectPrint',
+            query:{
+          name:"123"
+        }
+          
+        })
       // this.xx = true;
       // let newstr = document.getElementById('print').innerHTML
       // let oldstr = document.body.innerHTML
       // document.body.innerHTML = newstr
       // window.print()
-        this.$router.push({ path: 'houseSelfCollectPrint',
-            query:{
-          name:"123"
-        }
+       
         },
     
         )
@@ -383,6 +557,11 @@ export default {
       // window.location.reload()
       // this.$router.push({ path: 'paymentManagement' })
     },
+    buckleWeightRatiochange(e){
+      this.paymentList.qualityInspectionManagement.weightDeduction=(this.paymentList.qualityInspectionManagement.waterContent-this.paymentList.qualityInspectionManagement.waterMin)*this.paymentList.buckleWeightRatio
+      this.paymentList.base=(100-this.paymentList.qualityInspectionManagement.weightDeduction)/100
+      this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
+    },
     cancel() {
       this.$router.push({ path: 'paymentManagement' })
     },
@@ -468,4 +647,8 @@ export default {
   text-align: center;
   margin: 20px auto;
 }
+.el-form{
+      overflow: scroll;
+    height: 86vh;
+}
 </style>

+ 3 - 3
src/views/houseSelfCollect/weightCheck.vue

@@ -78,7 +78,7 @@
             <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
               <ws-input
                 v-model="weighingList.grossWeight"
-                @change="calculation"
+                @input="calculation"
                 placeholder="未获取到毛重"
                 maxlength="100"
                 size="small"
@@ -99,7 +99,7 @@
             >
               <ws-input
                 v-model="weighingList.tare"
-                @change="calculation"
+                @input="calculation"
                 placeholder="未获取到皮重"
                 maxlength="100"
                 size="small"
@@ -119,7 +119,7 @@
               >
                 <ws-input
                   v-model="weighingList.buckleMiscellaneous"
-                  @change="calculation"
+                  @input="calculation"
                   placeholder="请输入扣杂"
                   maxlength="100"
                   size="small"

+ 31 - 14
src/views/outboundManagement/component/route.js

@@ -14,14 +14,14 @@ const outboundManagementRouter = {
     children: [
         // 检斤管理
         {
-            path: 'weighingManagement',
+            path:'weighingManagement',
             component: () =>
                 import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/weighingManagement'),
-            name: 'weighingManagement',
+            name:'weighingManagement',
             meta: {
-                title: 'weighingManagement',
-                shortcutEntrance: 'outboundManagement',
-                module: 'procurement.procurementOrder.delete',
+                title:'weighingManagement',
+                shortcutEntrance:'outboundManagement',
+                module:'procurement.procurementOrder.delete',
                 permissicon: [],
                 keepAlive: true
             }
@@ -31,25 +31,42 @@ const outboundManagementRouter = {
             path: 'qualityInspectionManagement',
             component: () =>
                 import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/qualityInspectionManagement'),
-            name: 'qualityInspectionManagement',
+            name:'qualityInspectionManagement',
             meta: {
-                title: 'qualityInspectionManagement',
-                shortcutEntrance: 'outboundManagement',
-                module: 'procurement.procurementOrder.delete',
+                title:'qualityInspectionManagement',
+                shortcutEntrance:'outboundManagement',
+                module:'procurement.procurementOrder.delete',
                 permissicon: [],
                 keepAlive: true
             }
         },
+        // 查看/编辑质检信息
+        {
+            path: 'qualityInspection',
+            component: () =>
+              import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/qualityInspection'),
+            name: 'qualityInspection',
+            meta: {
+              title: 'qualityInspection',
+              shortcutEntrance: 'qualityInspection',
+              
+              module: 'procurement.procurementOrder.delete',
+              permissicon: [],
+              keepAlive: true
+            },
+            hidden: true
+          },
+
         // 付款管理
         {
-            path: 'collectionManagement',
+            path:'collectionManagement',
             component: () =>
                 import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/collectionManagement'),
-            name: 'collectionManagement',
+            name:'collectionManagement',
             meta: {
-                title: 'collectionManagement',
-                shortcutEntrance: 'outboundManagement',
-                module: 'procurement.procurementOrder.delete',
+                title:'collectionManagement',
+                shortcutEntrance:'outboundManagement',
+                module:'procurement.procurementOrder.delete',
                 permissicon: [],
                 keepAlive: true
             }

+ 392 - 0
src/views/outboundManagement/qualityInspection.vue

@@ -0,0 +1,392 @@
+<!--质检信息-->
+<template>
+  <div class="center">
+    <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: 50%; margin: 0 auto">
+          <div class="title">基本信息</div>
+          <ws-info-table>
+            <ws-form-item label="合同编号" span="1" prop="contractNo">
+              <ws-input
+                v-model="inspect.contractNo"
+                placeholder="请输入合同编号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="仓位号" span="1" prop="binNumber">
+              <ws-input
+                v-model="inspect.binNumber"
+                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="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
+               <ws-input
+                v-model="inspect.carNumber"
+                placeholder="请输入车牌号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="货名" span="1" prop="goodsName">
+              <ws-input
+                v-model="inspect.goodsName"
+                placeholder="请输入货名"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </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"
+                @change="waterContentChange"
+                :disabled="disabled"
+              >
+                <ws-option
+                  v-for="item in gradeList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="杂质(%)" span="1" prop="impurity">
+              <ws-input
+                v-model="inspect.impurity"
+                placeholder="请输入杂质占比"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="水分(%)" span="1" prop="waterContent">
+              <ws-input
+                v-model="inspect.waterContent"
+                placeholder="请输入水分占比"
+                maxlength="100"
+                size="small"
+                @change = "waterContentChange"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+              <ws-input
+                v-model="inspect.mildewGrain"
+                placeholder="请输入霉变粒占比"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+              <ws-input
+                v-model="inspect.bulkDensity"
+                placeholder="请输入容重"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+              <ws-input
+                v-model="inspect.jiaorenli"
+                placeholder="请输入热损伤占比"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
+              <ws-input
+                v-model="inspect.imperfectGrain"
+                placeholder="请输入不完整粒占比"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+          </ws-info-table>
+          <div class="but">
+            <el-button @click="cancel" v-if="this.types != 2" type="primary"
+              >取消</el-button
+            >
+            <el-button @click="print" v-if="this.types != 2" type="primary"
+              >提交</el-button
+            >
+            <el-button @click="cancel" v-if="this.types == 2" type="primary"
+              >关闭</el-button
+            >
+          </div>
+        </div>
+      </ws-form>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  addOut,
+  getinspectLook,
+} from '@/model/outboundManagement/index'
+import { packList } from '@/model/contarct/index'
+// import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
+export default {
+  components: {
+    //houseSelfCollectPrint,
+  },
+  watch: {},
+  data() {
+    return {
+      inspect: {},
+      disabled: false,
+      types: '1',
+      information : '添加',
+      goodnameList: [],
+      gradeList: [],
+      customerList: [],
+      getbinNumberList: [],
+      cangid: '', //仓库id
+      warehouseName:'',
+       unitPrice:0,
+       count:0,
+       cangNo:'',
+    }
+  },
+  activated() {
+    this.types = this.$route.query.type
+    this.cangid = this.$route.query.cangid
+    this.warehouseName = this.$route.query.warehouseName
+    this.inspect.contractNo = this.$route.query.contractNo
+    this.inspect.binNumber = this.$route.query.binNumber
+    this.inspect.carNumber = this.$route.query.carNumber
+    this.inspect.goodsName = this.$route.query.goodsName
+    this.inspect.storageTagNo = this.$route.query.storageTagNo
+    //this.inspect.personCharge = this.$route.query.personCharge
+    let id = this.$route.query.id
+    this.cangNo = this.$route.query.warehouseNo
+    this.count = Number(this.$route.query.count)+1 
+    if (this.types == 2) {
+      this.disabled = true
+      this.information = '查看'
+    }
+    // this.calculation()
+    this.getList(id)
+  },
+  methods: {
+    getdate() {
+      var date = new Date()
+      var year = date.getFullYear() //获取完整的年份(4位)
+      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+      var datetime = date.getDate() //获取当前日(1-31)
+      if (mouth < 10) {
+        mouth = '0' + mouth
+      }
+      if (datetime < 10) {
+        datetime = '0' + datetime
+      }
+      return year + mouth + datetime
+    },
+    // 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位序列号
+    //   // + this.verifyinit()
+    // },
+    print() {
+      this.inspect.warehouseName = this.warehouseName
+      this.inspect.id = this.$route.query.id
+      this.inspect.qualityInspector = sessionStorage.getItem('ws-pf_staffName')
+          this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
+      // if(this.types == null || this.types == ''){
+         this.$confirm('确定保存质检信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          
+          addOut(this.inspect)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('保存成功')
+              // this.xx = true;
+              // let newstr = document.getElementById('print').innerHTML
+              // let oldstr = document.body.innerHTML
+              // document.body.innerHTML = newstr
+              // window.print()
+              // document.body.innerHTML = oldstr
+              // // window.location.reload()
+              this.$router.push({ path: 'qualityInspectionManagement' })
+            })
+        })
+        .catch(() => {
+          return false
+        })
+
+      // }else if(this.types == 1){
+      //    this.$confirm('确定保存质检信息?', '提示', {
+      //   confirmButtonText: '确定',
+      //   cancelButtonText: '取消',
+      //   type: 'warning',
+      // })
+      //   .then(() => {
+      //     // return
+      //     getinspectEdit(this.inspect)
+      //       .toPromise()
+      //       .then((response) => {
+      //         this.$message.success('修改成功')
+      //         // this.xx = true;
+      //         // let newstr = document.getElementById('print').innerHTML
+      //         // let oldstr = document.body.innerHTML
+      //         // document.body.innerHTML = newstr
+      //         // window.print()
+      //         // document.body.innerHTML = oldstr
+      //         // window.location.reload()
+      //         this.$router.push({ path: 'paymentManagement' })
+      //       })
+      //   })
+      //   .catch(() => {
+      //     return false
+      //   })
+
+      // }
+     
+    },
+    cancel() {
+      this.$router.push({ path: 'qualityInspectionManagement' })
+    },
+    getList(ids) {
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      if (this.types == 2) {
+        //查看
+        getinspectLook({ id: ids })
+          .toPromise()
+          .then((response) => {
+            this.inspect = response
+          })
+      }
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.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;
+}
+.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>

+ 222 - 0
src/views/outboundManagement/qualityInspectionManagement.vue

@@ -0,0 +1,222 @@
+<!--质检管理-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="12">
+      <template slot="right">
+        <ws-select
+          v-model="warehouseName"
+          placeholder=""
+          @change="selecttaskType"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in warehouseList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890b1"
+          />
+        </ws-select>
+        <div></div>
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按合同编号、车牌号查找"
+          clearable
+          maxlength="500"
+          type="input"
+        ></ws-input>
+        <ws-button class="find" type="primary" @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table
+      :data="inspect"
+      style="width: 100%; margin-top: 20px"
+      ref="inspect"
+      border
+      height="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" 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="bulkDensity" label="容重(克/升)"></el-table-column>
+      <el-table-column prop="waterContent" label="水分(%)"></el-table-column>
+      <el-table-column prop="binNumber" label="仓位号"></el-table-column>
+      <el-table-column prop="storageTagNo" label="囤位号"></el-table-column>
+      <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
+      <el-table-column prop="updateDate" label="质检时间"></el-table-column>
+      <el-table-column prop="status" label="状态"></el-table-column>
+      <el-table-column width="300" label="操作">
+        <template slot-scope="scope">
+          <span v-if="scope.row.status == '已质检'"><el-button @click="qualityInspection(scope.row, 2)">查看</el-button></span>
+          <span v-if="scope.row.status == '已称皮重' || scope.row.status == '' || scope.row.status == null"><el-button @click="qualityInspection(scope.row, 1)">质检</el-button></span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div style="text-align: center">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  selectWarehouseSelf,
+  getinspectList,
+} from '@/model/outboundManagement/index'
+
+export default {
+  components: {},
+  watch: {},
+  data() {
+    return {
+      //分页
+      currentPage: 1,
+      pageSize: 10,
+      deptCircularPage: {},
+      deptBudgetTotal: 0,
+
+      searchKeyWord: '',
+      taskTypeList: [],
+      searchType: 0,
+      warehouseName: '',
+      inspect: [],
+      warehouseList: [],
+      cangid: '', //仓库id
+    }
+  },
+  activated() {
+    this.getList()
+  },
+  methods: {
+    find(){
+     this.getList()
+    },
+    qualityInspection(row, index) {
+      //添加/查看
+      console.log(row.id, 'id值')
+      this.$router.push({
+        path: 'qualityInspection',
+        query: { type: index, cangid: this.cangid, id: row.id ,warehouseName:this.warehouseName,count:this.warehouseCount,
+        warehouseNo:this.warehouseNo,contractNo:row.contractNo,binNumber:row.binNumber,carNumber:row.carNumber,
+        storageTagNo:row.storageTagNo,goodsName:row.goodsName},
+      })
+    },
+    selecttaskType(e) {
+      console.log(e)
+    },
+    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,
+            })
+          }
+          this.warehouseName = response[0].warehouseName
+          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
+          console.log(this.inspect,'容重')
+          this.deptBudgetTotal = response.total
+        })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.title {
+  font-size: 20px;
+  font-weight: 600;
+  margin: 20px 0 0 20px;
+}
+.tit {
+  font-size: 16px;
+  font-weight: 600;
+  margin: 20px;
+}
+.ws-info-table {
+  border: none;
+}
+.ws-info-table .el-form-item {
+  width: 50%;
+  border: none;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 30%;
+  text-align: center;
+  background: #ffffff;
+  color: #8890b1;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  border: none;
+}
+/deep/.el-table .el-table__header .cell,
+.el-table .el-table__body .cell {
+  text-align: center;
+}
+/deep/.el-table--enable-row-transition .el-table__body td {
+  text-align: center;
+}
+</style>

+ 0 - 2
src/views/purchasingManagement/purchaseOrderList.vue

@@ -1556,8 +1556,6 @@ export default {
           //  if(this.aduitlist.invoiceFee){
           //    this.aduitlist.invoiceFee=-Math.abs(this.aduitlist.invoiceFee)
           //  }
-            this.aduitlist.unloadingCharge = '-' + this.aduitlist.unloadingCharge
-            this.aduitlist.basis = '-' + this.aduitlist.basis
        }
       this.dialogFormVisible4 = false
       this.$confirm(`审核通过后,将通知客户订单生效,是否确定通过审核?`, {

+ 1 - 1
src/views/statisticalReport/purchaseReceiptStatisticsList.vue

@@ -948,7 +948,7 @@ export default {
         })
           .toPromise()
           .then((response) => {
-            this.audit(this.modification[index + 1], index + 1, status)
+            this.audit(this.modification[index + 1], index + 1, status,status2,reason)
           })
           .catch((req) => {
             this.$message.warning(req.message)

+ 7 - 7
vue.config.js

@@ -141,7 +141,7 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.120:8090/',
+        target: 'http://192.168.1.120:9100/',
         // target: 'http://192.168.1.112:8090/',
         // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.119:8090/',
@@ -167,12 +167,12 @@ module.exports = {
     //直接修改配置
     config.resolve.alias['@'] = resolve('src')
     config.resolve.alias['@/assets'] = resolve('src/assets')
-    if (ignoreFile.includes(process.env.NODE_ENV)) {
-      config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
-      config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
-      config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true
-      config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log', 'console.info']
-    }
+    // if (ignoreFile.includes(process.env.NODE_ENV)) {
+    //   config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
+    //   config.optimization.minimizer[0].options.terserOptions.compress.drop_console = false
+    //   config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true
+    //   config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log', 'console.info']
+    // }
   },
   chainWebpack(config) {
     config.plugins.delete('preload')