zhongtianhaoyuan 3 år sedan
förälder
incheckning
56adb3a7e7

+ 514 - 0
public/static/tradeServicesPrint.html

@@ -0,0 +1,514 @@
+<!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: 88vh;
+        position: relative;
+      }
+
+      .content {
+        width: 1000px;
+        /* height: 583px; */
+        margin: auto;
+        /* position: absolute; */
+        /* top: -5vh; */
+        /* 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;
+      }
+
+      .header {
+        display: flex;
+        justify-content: space-between;
+        font-size: 16px;
+        margin: 10px 0;
+      }
+
+      .header1 {
+        font-size: 24px;
+        margin: 30px 60px 10px 60px;
+        display: flex;
+        justify-content: center;
+      }
+
+      .line {
+        height: 2px;
+        width: 410px;
+        margin: 3px auto;
+        background: black;
+      }
+
+      .line:nth-of-type(3) {
+        margin-bottom: 30px;
+      }
+
+      .header-top {
+        display: flex;
+        justify-content: space-between;
+      }
+
+      .sfcard {}
+
+      .sfcard-content {
+        display: flex;
+        align-items: center;
+        justify-content: space-evenly;
+      }
+
+      .sfcard-content img {
+        width: 45%;
+        height: 50vh;
+      }
+
+      .sfcard-title {
+        font-size: 28px;
+        text-align: center;
+        margin: 10px 0;
+      }
+
+      .avatar {
+        margin-bottom: 120px;
+      }
+
+      .avatar:nth-of-type(2) {
+        margin-bottom: 140px;
+      }
+
+      .center {
+       height: calc(100vh - 8px);
+      }
+    </style>
+  </head>
+  <body>
+    <div id="app">
+      <div v-for="(item,index) in printData" :key="index">
+        <div v-if="item.printType == '打印磅单'" class="center">
+            <div class="title">磅码单</div>
+            <div class="title">{{item.code}}</div>
+            <table class="table">
+              <tr class="row">
+                <td class="col col-bgc">单位</td>
+                <td class="col" colspan="4">{{item.companyName}}</td>
+                <td class="col col-bgc">类型</td>
+                <td class="col" colspan="1">{{item.inOutType}}</td>
+                <td class="col col-bgc">车牌号</td>
+                <td class="col" colspan="1">{{item.carNo}}</td>
+              </tr>
+              <tr class="row">
+                <td class="col col-bgc">仓库</td>
+                <td class="col" colspan="4">{{item.warehouseName}}</td>
+                <td class="col col-bgc">仓位</td>
+                <td class="col" colspan="1">{{item.binNumber}}</td>
+                <td class="col col-bgc">货名</td>
+                <td class="col" colspan="1">{{item.goodsName}}</td>
+              </tr>
+              <tr class="row">
+                <td class="col col-bgc">毛重(公斤)</td>
+                <td class="col" colspan="1">{{item.grossWeight}}</td>
+                <td class="col col-bgc">皮重(公斤)</td>
+                <td class="col" colspan="2">{{item.tare}}</td>
+                <td class="col col-bgc">扣重(公斤)</td>
+                <td class="col" colspan="1">{{item.weight}}</td>
+                <td class="col col-bgc">净重(公斤)</td>
+                <td class="col" colspan="1">{{item.netWeight}}</td>
+              </tr>
+            </table> 
+            <div class="bottom">
+              <div style='justify-content: space-between;' class="bottom-row1">
+                <div class="config">毛检:{{item.secretaryWeigher}}皮检:{{item.skinInspector}}</div>
+                <div class="autograph">日期:{{item.inOutDate}}</div>
+              </div>
+              
+            </div>
+        </div>
+
+      <div  v-if="item.printType == '打印结算单'" class="center">
+        <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
+        <!-- {{customerInfo}} -->
+        <div class="header">
+           <div>单位名称:{{ item.compName}}</div>
+           <!-- <div>税务登记编号:91230230MA1BNL7Q93</div> -->
+        </div>
+        <div class="header-top">
+          <div>单位:公斤、元</div>
+          <div>No.</div>
+        </div>
+        <div class="header-top">
+          <div>开票日期:{{item.createDate}}</div>
+          <!-- <div>开票日期:{{new Date(yyyy,mm,dd)}}</div> -->
+          <div class="number">{{item.paymentNo}}</div>
+        </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="3">{{ item.compName}}</td>
+            <td rowspan="4" class="col col-bgc">卖方</td>
+            <td class="col col-bgc">姓名</td>
+            <td class="col" colspan="4">{{ item.customerName}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">税务登记号</td>
+            <td class="col" colspan="3">{{ item.taxRegistrationNo}}</td>
+            <td class="col col-bgc">身份证号</td>
+            <td class="col" colspan="4">{{ item.identityAuthenticationInfo.customerNumberCard}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">业务编号</td>
+            <td class="col" colspan="3">{{ item.paymentNo}}</td>
+            <td class="col col-bgc">卡号</td>
+            <td class="col" colspan="4">{{item.identityAuthenticationInfo.bankDeposit}}{{item.identityAuthenticationInfo.bankCard}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">收货仓库</td>
+            <td class="col" colspan="3">{{item.warehouseName}}</td>
+            <td class="col col-bgc">地址</td>
+            <td class="col" colspan="4">{{item.identityAuthenticationInfo.compAddress}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">货名</td>
+            <td class="col col-bgc">类型</td>
+            <td class="col col-bgc">等级</td>
+            <td class="col col-bgc">水分%</td>
+            <td class="col col-bgc">杂质%</td>
+            <td class="col col-bgc">毛重</td>
+            <td class="col col-bgc">皮重</td>
+            <td class="col col-bgc">扣重</td>
+            <td class="col col-bgc">扣杂</td>
+            <td class="col col-bgc">净重</td>
+            <!-- <td class="col col-bgc">纯重</td> -->
+          </tr>
+          <tr class="row">
+            <td class="col">{{ item.goodsName}}</td>
+            <td class="col">{{ item.type}}</td>
+            <td class="col">{{ item.qualityInspectionManagement.grade}}</td>
+            <td class="col">{{ item.qualityInspectionManagement.waterContent}}</td>
+            <td class="col">{{ item.qualityInspectionManagement.impurity}}</td>
+            <td class="col">{{ item.grossWeight}}</td>
+            <td class="col">{{ item.tare}}</td>
+            <td class="col" v-if="item.type == '干粮'">{{printData.weighingManagement.buckleMiscellaneous}}</td>
+            <td class="col" v-if="item.type == '潮粮'">0</td>
+            <td class="col" v-if="item.type == '干粮'">0</td>
+            <td class="col" v-if="item.type == '潮粮'">{{printData.netWeight}}</td>
+            <td class="col">{{item.pureWeight}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc"  v-if="item.type == '潮粮'">净重单价</td>
+            <td class="col col-bgc" v-if="item.type == '干粮'">单价</td>
+            <td class="col col-bgc">扣单价</td>
+            <td class="col col-bgc">粮款</td>
+            <td class="col col-bgc">称重补助</td>
+            <td class="col col-bgc">运费补助</td>
+            <td class="col col-bgc">卸车补助</td>
+            <td class="col col-bgc">其他补助</td>
+            <td class="col col-bgc">称重扣款</td>
+            <td class="col col-bgc">运费扣款</td>
+            <td class="col col-bgc">卸车扣款</td>
+          </tr>
+          <tr class="row">
+            <td class="col " v-if="printData.type == '潮粮'">{{item.tidalGrainPrice}}</td>
+            <td class="col " v-if="printData.type == '干粮'">{{item.qualityInspectionManagement.dryGrainPrice}}</td>
+            <td class="col ">{{ item.unitDeduction}}</td>
+            <td class="col ">{{ item.grainMoney}}</td>
+            <td class="col ">{{ item.weighingSubsidy}}</td>
+            <td class="col ">{{ item.freightSubsidy}}</td>
+            <td class="col ">{{ item.unloadSubsidy}}</td>
+            <td class="col ">{{ item.otherSubsidy}}</td>
+            <td class="col ">{{ item.weighingDeduction}}</td>
+            <td class="col ">{{ item.freightDeduction}}</td>
+            <td class="col ">{{ item.unloadDeduction}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">质量扣款</td>
+            <td class="col col-bgc">其他扣款</td>
+            <!-- <td class="col col-bgc" v-if="printData.type == '潮粮'">纯重单价</td> -->
+            <td class="col col-bgc">合计应付</td>
+            <td class="col col-bgc">购粮性质</td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col col-bgc" colspan="5">记事</td>
+          </tr>
+          <tr class="row">
+            <td class="col ">{{ item.qualityDeduction}}</td>
+            <td class="col ">{{ item.otherDeduction}}</td>
+            <!-- <td class="col " v-if="printData.type == '潮粮'">{{ printData.solidGrainPrice}}</td> -->
+            <td class="col ">{{ item.calculationPayable}}</td>
+            <td class="col ">{{ item.qualityInspectionManagement.natureOfGrainPurchase}}</td>
+            <td class="col ">{{ item.carNo}}</td>
+            <td class="col " colspan="5">{{ item.remarks}}</td>
+          </tr>
+          <tr class="row">
+            <!-- <td class="col col-bgc">实付金额</td>
+            <td class="col " colspan="2">{{printData.actualPayment}}</td> -->
+            <td class="col col-bgc" colspan="3">人民币(大写)</td>
+            <td class="col " colspan="7">{{item.capitalize}}</td>
+    
+          </tr>
+        </table>
+        <div class="bottom">
+          <div class="bottom-row1">
+            <div>质检:{{ item.qualityInspectionManagement.qualityInspector}}</div>
+            <div>毛检:{{ item.weighingManagement.secretaryWeigher}}</div>
+            <div>皮检:{{ item.weighingManagement.skinInspector}}</div>
+            <div>结算:{{ item.settlementClerk}}</div>
+            <div>付款:{{ item.cashier}}</div>
+            <div>复点:{{ }}</div>
+            <div></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>
+      </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: {
+        isShowPrintType1: false,
+        isShowPrintType2: false,
+        isShowPrintType3: false,
+        isShowPrintType4: false,
+        showType: [],
+        printData: [
+            {
+                identityAuthenticationInfo:{},
+                qualityInspectionManagement:{},
+                weighingManagement:{},
+                customerNumberCard:{},
+            }
+        ],
+        printData1: [],
+        customerList: {},
+        customerList1: [],
+        name: '',
+        bigContent: false,
+        smallContent: false,
+        date: '',
+        imageUrl1: '',
+        imageUrl2: '',
+        imageUrl3: '',
+        imageUrl4: '',
+        identity: [],
+        bank: [],
+        selectPrint: false,
+      },
+      computed: {},
+      methods: {
+        dealNo(str) {
+          return str.slice(4)
+        },
+        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() {
+        this.date = new Date().toLocaleString()
+        let _data = decodeURIComponent(this.getQueryVariable('dataList'))
+        if (!_data) {
+          this.selectPrint = true;
+          this.printData1 = JSON.parse(sessionStorage.getItem('selectPrint_selectPrintList'))
+        } else {
+          this.printData = JSON.parse(_data)
+          console.log("打印磅单",this.printData)
+          this.selectPrint = false;
+        }
+        // let _type = decodeURIComponent(this.getQueryVariable('type'))
+        // this.showType = decodeURIComponent(this.getQueryVariable('printTypeList'))
+        // let _data1 = decodeURIComponent(this.getQueryVariable('customerList'))
+        // if (!_data1) {
+        //   this.customerList1 = JSON.parse(sessionStorage.getItem('selectPrint_selectCustomerList'))
+        // } else {
+        //   this.customerList = JSON.parse(_data1)
+        // }
+        // var cwprint = sessionStorage.getItem('cwprint')
+        // if (cwprint == "true") {
+        //   if (this.selectPrint) {
+        //     for (let i = 0; i < this.customerList1.length; i++) {
+        //       let _url1 = this.customerList1[i].cardAddressUrl.split(',')
+        //       let _url2 = this.customerList1[i].payeeAddressUrl.split(',')
+        //       this.customerList1[i].imgURl = {
+        //         imageUrl1: _url1[0],
+        //         imageUrl2: _url1[1],
+        //         imageUrl3: _url2[0],
+        //         imageUrl4: _url2[0]
+        //       }
+        //     }
+
+        //   } else {
+        //     this.identity = this.customerList.cardAddressUrl.split(',')
+        //     this.bank = this.customerList.payeeAddressUrl.split(',')
+        //     this.imageUrl1 = this.identity[0]
+        //     this.imageUrl2 = this.identity[1]
+        //     this.imageUrl3 = this.bank[0]
+        //     this.imageUrl4 = this.bank[1]
+        //   }
+
+        //   let _lsit = this.showType.split(',')
+        //   for (let i = 0; i < _lsit.length; i++) {
+        //     switch (_lsit[i]) {
+        //       case '打印身份证(正反面)':
+        //         this.isShowPrintType1 = !this.isShowPrintType1
+        //         break
+        //       case '打印银行卡(正反面)':
+        //         this.isShowPrintType2 = !this.isShowPrintType2
+        //         break
+        //       case '打印结算凭证':
+        //         this.isShowPrintType3 = !this.isShowPrintType3
+        //       case '打印发票':
+        //         this.isShowPrintType4 = !this.isShowPrintType4
+        //         break
+        //     }
+        //   }
+        // } else {
+        //   this.isShowPrintType3 = true
+        // }
+        // if (_type == 2) {
+        //   this.bigContent = true
+        //   this.smallContent = false
+        // } else {
+        //   this.smallContent = true
+        //   this.bigContent = false
+        // }
+
+        document.title = this.printData.compName + '结算凭证'
+        window.print()
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        }
+      },
+      watch: {}
+    })
+  </script>
+</html>

+ 12 - 0
src/api/V2/tradeServicesManagement/index.js

@@ -23,3 +23,15 @@ export const API_GET_WAREHOUSE_COUNT = '/warehouseInOutInfo/count'
 export const API_POST_WAREHOUSE_UPDATE = '/warehouseInOutInfo/adjustment'
 // 结算单
 export const API_GET_SETTLEACCOUT = '/warehouseInOutInfo/getInfo'
+//仓单查看
+export const API_GET_WAREHOUSE_SEE = '/tradeWarehouseReceiptAppl/getTrageInfo'
+//仓单修改
+export const API_POST_WAREHOUSERECEIPT_UPDATE = '/tradeWarehouseReceiptAppl/api/editTradeWarehouseReceiptAppl'
+//审核记录
+export const API_GET_WAREHOUSE_EXAMINE = '/workflowHistory/query/taskHistories'
+//还款列表
+export const API_GET_REPAYMENT_LIST = '/repaymentManagement/selectRepaymentManagement'
+//还款提交
+export const API_POST_REPAYMENT_SUBMIT = '/repaymentManagement/api/repaymentMoney'
+//银行
+export const API_GET_WAREHOUSERECEIPT_BANKLIST = '/commonSysParameter/getInfo'

+ 3 - 2
src/components/mapdrag/warehouseReceiptMap.vue

@@ -57,7 +57,7 @@
     computed: {},
     watch: {
       listData: function(val1, val2) {
-        debugger
+        // debugger
         this.listData = val1
         var that = this
         this.map = new AMap.Map('mapContainer', {
@@ -120,7 +120,8 @@
               infoWindow.close(that.map, e.target.getPosition())
             }
 
-            function toGetList(e) {debugger
+            function toGetList(e) {
+              // debugger
               // console.log(e.target.getExtData())
               
               that.$parent.getList(e.target.getExtData().id, 1)

+ 20 - 1
src/model/tradeServicesManagement/index.js

@@ -11,9 +11,16 @@ import {
     API_GET_RECORD,
     API_GET_WAREHOUSE_COUNT,
     API_POST_WAREHOUSE_UPDATE,
-    API_GET_SETTLEACCOUT
+    API_GET_SETTLEACCOUT,
+    API_GET_WAREHOUSE_SEE,
+    API_POST_WAREHOUSERECEIPT_UPDATE,
+    API_GET_WAREHOUSE_EXAMINE,
+    API_GET_REPAYMENT_LIST,
+    API_POST_REPAYMENT_SUBMIT,
+    API_GET_WAREHOUSERECEIPT_BANKLIST
 } from '@/api/V2/tradeServicesManagement'
 
+
 // 列表
 export const getList = appRx.get(API_GET_TRADESERVICES_LIST, errorCatcher, errorHandle, filter)
 export const getMapInfo = appRx.get(API_GET_MAPINFO, errorCatcher, errorHandle, filter)
@@ -35,3 +42,15 @@ export const getwarehousecount = appRx.get(API_GET_WAREHOUSE_COUNT, errorCatcher
 export const postwarehouseadjustment = appRx.post(API_POST_WAREHOUSE_UPDATE, errorCatcher, errorHandle, filter)
 // 出入库调整
 export const getsettleaccout = appRx.get(API_GET_SETTLEACCOUT, errorCatcher, errorHandle, filter)
+// 仓单查看
+export const getWarehouseReceiptLook = appRx.get(API_GET_WAREHOUSE_SEE, errorCatcher, errorHandle, filter)
+// 仓单修改
+export const WarehouseReceiptUpdate = appRx.post(API_POST_WAREHOUSERECEIPT_UPDATE, errorCatcher, errorHandle, filter)
+// 审核记录
+export const getWarehouseReceiptExamine = appRx.get(API_GET_WAREHOUSE_EXAMINE, errorCatcher, errorHandle, filter)
+// 还款列表
+export const getRepaymentList = appRx.get(API_GET_REPAYMENT_LIST, errorCatcher, errorHandle, filter)
+// 还款列表
+export const repaymentSubmit = appRx.post(API_POST_REPAYMENT_SUBMIT, errorCatcher, errorHandle, filter)
+// 银行列表
+export const WarehouseReceiptBankList = appRx.get(API_GET_WAREHOUSERECEIPT_BANKLIST, errorCatcher, errorHandle, filter)

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

@@ -41,8 +41,9 @@
         <!-- <ws-button type="primary" @click="handlepass" v-if="isShowAdopt">审核</ws-button> -->
         <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">付款
         </ws-button>
+         <!-- v-hasPermission="`acquisitionManagement.acquisitionPay.finace`" -->
         <ws-button type="primary" @click="selectPrint(1)"
-          v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
+         >财务批量打印
         </ws-button>
       </template>
       <template slot="right">

+ 1 - 1
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -705,7 +705,7 @@
             />
           </el-form-item>
           <!--水分(%)<=-->
-          <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<="
+          <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=">
             <el-input
               disabled
               v-model="dataList.waterContent"

+ 674 - 254
src/views/tradeServicesManagement/approveWarehouseReceipt.vue

@@ -1,281 +1,701 @@
-// 审批仓单
+//审批仓单
 <template>
-	<div>
-		 <el-form
+  <div class="center">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left titleup">审批仓单</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <el-form
       ref="deptBudgetList"
-      :rules="mainReportAdd"
+      :rules="rules"
       :model="deptBudgetList"
+      class="content2"
+      :inline="true"
+      label-position="right"
+      label-width="120px"
     >
       <!-- <ws-info-table class="el-table"> -->
-		  <div>申请信息</div>
-        <el-form-item label="业务编号" span="1" prop="taskNo" class="forlist">
-          <el-input
-            v-model="deptBudgetList.taskNo"
-            placeholder="请输入任务编号"
-            maxlength="20"
-            size="small"
-            disabled
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="名头" span="1" prop="taskNo" class="forlist">
-		  	<el-select v-model="deptBudgetList.region" placeholder="请选择名头">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="仓库名称" span="1" prop="taskNo" class="forlist">
-         	<el-select v-model="deptBudgetList.region" placeholder="请选择仓库">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="仓位号" span="1" prop="taskNo" class="forlist">
-         	<el-select disabled v-model="deptBudgetList.region" placeholder="请选择仓位号">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="仓库地址" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            disabled
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入仓库地址"
-            size="small"
-          ></el-input>
-        </el-form-item>
-        <el-form-item prop="goodsName" label="货名" span="1">
-            <el-select disabled v-model="deptBudgetList.region" placeholder="请选择货名">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item prop="goodsName" label="货名" span="1">
-            <el-select disabled v-model="deptBudgetList.region" placeholder="请选择货名">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item prop="goodsName" label="品级" span="1">
-            <el-select disabled v-model="deptBudgetList.region" placeholder="请选择品级">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="现有储量" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            disabled
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入现有储量"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="可用储量(吨)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            disabled
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入可用储量"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="本单重量(吨)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入本次仓单申请所需的重量"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="单价(元/吨)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入粮食单价"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="总价值(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="自动计算,不可编辑"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="申请比例(%)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入申请比例"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="申请金额(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入申请金额"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<div>发放信息</div>
-		<el-form-item label="合同编号" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入合同编号"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="发放金额(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入发放金额"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="利息" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入金额"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="监管费(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入金额"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="保险费" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入金额"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="其他费用(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入金额"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="合计应还(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="自动计算,不可编辑"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<div>附件</div>
-		<ws-upload
+      <div class="title1">申请信息</div>
+      <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
+        <el-input
+          v-model="deptBudgetList.billNo"
+          placeholder="请输入任务编号"
+          maxlength="20"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="名头" span="1" prop="taskNo" class="renown">
+        <el-select
+          v-model="deptBudgetList.renown"
+          placeholder="请选择名头"
+          disabled
+        >
+          <el-option
+            :label="item.compName"
+            :value="item.compId"
+            v-for="(item, index) in compOptionList"
+            :Key="index"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="仓库名称"
+        span="1"
+        prop="warehouseName"
+        class="forlist"
+      >
+        <el-select
+          v-model="deptBudgetList.warehouseName"
+          placeholder="请选择仓库"
+          disabled
+        >
+          <el-option
+            :label="item.warehouseName"
+            :value="item.id"
+            v-for="(item, index) in warehouseList"
+            :key="index"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
+        <el-select
+          v-model="deptBudgetList.warehouseNo"
+          placeholder="请选择仓位号"
+          disabled
+        >
+          <el-option
+            :label="item.binNumber"
+            :value="item.id"
+            v-for="(item, index) in cwNumberList"
+            :key="index"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="仓库地址"
+        span="1"
+        prop="warehouseAddress"
+        class="forlist"
+      >
+        <el-input
+          disabled
+          v-model="deptBudgetList.warehouseAddress"
+          placeholder="请输入仓库地址"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item prop="goodsName" label="货名" span="1">
+        <el-select
+          v-model="deptBudgetList.goodsName"
+          placeholder="请选择货名"
+          disabled
+        >
+          <el-option
+            v-for="(item, index) in goodsList"
+            :key="index"
+            :label="item.goodsName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="grade" label="品级" span="1">
+        <el-select
+          v-model="deptBudgetList.grade"
+          placeholder="请选择品级"
+          disabled
+        >
+          <el-option label="一等" value="一等"></el-option>
+          <el-option label="二等" value="二等"></el-option>
+          <el-option label="三等" value="三等"></el-option>
+          <el-option label="等外" value="等外"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="现有储量"
+        span="1"
+        prop="nowWeight"
+        class="forlist"
+        disabled
+      >
+        <el-input
+          disabled
+          v-model="deptBudgetList.nowWeight"
+          placeholder="请输入现有储量"
+          size="small"
+		  class="existing"
+        ></el-input>
+		<el-button  type="primary" @click="poundList">磅单</el-button>
+      </el-form-item>
+      <el-form-item
+        label="可用储量(吨)"
+        span="1"
+        prop="useWeight"
+        class="forlist"
+      >
+        <el-input
+          disabled
+          v-model="deptBudgetList.useWeight"
+          placeholder="请输入可用储量"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="本单重量(吨)"
+        span="1"
+        prop="weight"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.weight"
+          placeholder="输入本次仓单申请所需的重量"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="单价(元/吨)"
+        span="1"
+        prop="unitPrice"
+        class="forlist"
+        disabled
+      >
+        <el-input
+          v-model="deptBudgetList.unitPrice"
+          placeholder="输入粮食单价"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="总价值(元)"
+        span="1"
+        prop="totalValue"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.totalValue"
+          disabled
+          placeholder="自动计算,不可编辑"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="申请比例(%)"
+        span="1"
+        prop="applicationProportion"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.applicationProportion"
+          placeholder="输入申请比例"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="申请金额(元)"
+        span="1"
+        prop="interest"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.interest"
+          placeholder="输入申请金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <div>附件</div>
+      <ws-upload
         ref="upload"
         :comp-id="compId"
-        :appendix-ids="deptBudgetList.addressUrl"
+        :appendix-ids="deptBudgetList.appendix"
         :size-limit="size"
         @onChange="onChange"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        :editable="false"
       />
-	  <div>外审部门</div>
-	  	<el-form-item prop="goodsName" label="银行" span="1">
-            <el-select v-model="deptBudgetList.region" placeholder="请选择银行">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="无"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<div>
-			 <el-button @click='reject' type="primary">驳回</el-button>
-			  <el-button @click='pass'  type="primary">通过</el-button>
-		</div>
-		<div>审核记录</div>
-		 <el-table
-        class="wenzi"
-        :data="taskhistories"
-        style="width: 100%"
-      >
+      <div class="title1">发放信息</div>
+      <el-form-item prop="contractNo" label="合同编号" span="1">
+        <el-input
+          v-model="deptBudgetList.contractNo"
+          placeholder="请输入合同编号"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="发放金额" span="1" prop="taskNo">
+        <el-input
+          v-model="deptBudgetList.paymentAmount"
+          placeholder="请输入发放金额"
+          size="small"
+        ></el-input>
+      </el-form-item>
+	 
+	 <div class="custom">
+		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense1" :disabled="costOne">(元)</el-input></div>
+		  <div class="custom2"><el-input type="text" v-model="deptBudgetList.applicationAmount" placeholder="请输入金额" :disabled="costOne" @input="customEdit"></el-input></div>
+		  <span @click="switch1(1)" class="span_text">{{deptBudgetList.applicationAmountFlag}}</span>
+	  </div>
+	   <div class="custom">
+		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense2"  :disabled="costTwo"></el-input></div>
+		  <div class="custom2"><el-input type="text" v-model="deptBudgetList.supervisionFee" placeholder="请输入金额"  :disabled="costTwo" @input="customEdit"></el-input></div>
+		  <span @click="switch1(2)" class="span_text">{{deptBudgetList.supervisionFeeFlag}}</span>
+	  </div>
+	   <div class="custom">
+		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense3"  :disabled="costThree"></el-input></div>
+		  <div class="custom2"><el-input type="text" v-model="deptBudgetList.insurancePremium" placeholder="请输入金额" :disabled="costThree" @input="customEdit"></el-input></div>
+		  <span @click="switch1(3)" class="span_text">{{deptBudgetList.insurancePremiumFlag}}</span>
+	  </div>
+	   <div class="custom">
+		  <div class="custom1"><el-input type="text" v-model="deptBudgetList.modifyExpense4"  :disabled="costFour"></el-input></div>
+		  <div class="custom2"><el-input type="text" v-model="deptBudgetList.otherFee" placeholder="请输入金额"  :disabled="costFour" @input="customEdit"></el-input></div>
+		  <span @click="switch1(4)" class="span_text">{{deptBudgetList.otherFeeFlag}}</span>
+	  </div>
+	  <!-- <el-form-item label="利息" span="1" prop="taskNo">
+        <el-input
+          v-model="deptBudgetList.paymentAmount"
+          placeholder="请输入金额"
+          size="small"
+        ></el-input>
+      </el-form-item>
+	  <el-form-item label="发放金监管费" span="1" prop="taskNo">
+        <el-input
+          v-model="deptBudgetList.paymentAmount"
+          placeholder="请输入金额"
+          size="small"
+        ></el-input>
+      </el-form-item>
+	  <el-form-item label="保险费" span="1" prop="taskNo">
+        <el-input
+          v-model="deptBudgetList.paymentAmount"
+          placeholder="请输入金额"
+          size="small"
+        ></el-input>
+      </el-form-item>
+	   <el-form-item label="其他费用" span="1" prop="taskNo">
+        <el-input
+          v-model="deptBudgetList.paymentAmount"
+          placeholder="请输入金额"
+          size="small"
+        ></el-input>
+      </el-form-item> -->
+	   <el-form-item label="合计应还(元)" span="1" prop="taskNo">
+        <el-input
+          v-model="deptBudgetList.amountDue"
+          placeholder="自动计算,不可编辑"
+          size="small"
+		  disabled
+        ></el-input>
+      </el-form-item>
+      <div>
+        <el-button @click="outerVisible = true" type="primary">驳回</el-button>
+        <el-button @click="outerVisible1 = true" type="primary">通过</el-button>
+      </div>
+      <div class="title1">审核记录</div>
+      <el-table class="wenzi" :data="taskhistories" style="width: 100%">
         <el-table-column prop="operatorMajorRoleName" label="审核人">
           <template scope="scope">
-            {{scope.row.operatorMajorRoleName}}{{scope.row.operatorName}}
-            </template>
+            {{ scope.row.operatorMajorRoleName }}{{ scope.row.operatorName }}
+          </template>
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="审核结果">
           <template scope="scope">
-            <span v-if='scope.row.approved'>通过</span>
-            <span v-if='!scope.row.approved'>驳回</span>
+            <span v-if="scope.row.approved">通过</span>
+            <span v-if="!scope.row.approved">驳回</span>
           </template>
         </el-table-column>
         <el-table-column prop="endTime" label="审核时间"></el-table-column>
         <el-table-column prop="auditMind" label="审核意见"></el-table-column>
-     </el-table>
+      </el-table>
       <!-- </ws-info-table> -->
-		 </el-form>
-		 <el-dialog :visible.sync="isShowadjustment" :title="title">
-			<div>
-				<textarea placeholder="输入审核原因" name="" id="" cols="30" rows="10"></textarea>
-			</div>
-			<div>
-			 <el-button v-if='status==0' @click='' type="primary">确认驳回</el-button>
-			  <el-button v-if='status==1' @click='submit'  type="primary">确定通过</el-button>
-		</div>
-		</el-dialog>
-	</div>
+    </el-form>
+    <WinseaContentModal
+      v-model="outerVisible"
+      title="驳回原因"
+      @on-cancel="handleClose"
+    >
+      <el-input
+        type="textarea"
+        :rows="2"
+        maxlength="50"
+        placeholder="请输入驳回原因,1~50个字"
+        v-model="rejectText"
+      ></el-input>
+      <div class="dialog-footer">
+        <el-button @click="outerVisible = false">取 消</el-button>
+        <el-button type="primary" @click="rejectSubmit">确定</el-button>
+      </div>
+    </WinseaContentModal>
+    <WinseaContentModal
+      v-model="outerVisible1"
+      title="审核意见"
+      @on-cancel="handleClose"
+    >
+      <el-input
+        type="textarea"
+        :rows="2"
+        maxlength="50"
+        placeholder="请输入审核意见,1~50个字"
+        v-model="adoptText"
+      ></el-input>
+      <div class="dialog-footer">
+        <el-button @click="outerVisible1 = false">取 消</el-button>
+        <el-button type="primary" @click="adoptSubmit">确定</el-button>
+      </div>
+    </WinseaContentModal>
+  </div>
 </template>
 <script>
-	import {
-		getList,
-	} from '@/model/tradeServicesManagement/index'
-	import WsUpload from '@/components/WsUpload'
-	export default {
-		components: {
-			WsUpload,
-		},
-		data() {
-			return {
-				deptBudgetList:{},
-				size: 10,
-				compId: sessionStorage.getItem('ws-pf_compId'),
-				iscause:false,
-				title:'',
-				status:0
-			}
-		},
-		activated() {
-			
-		},
-		methods: {
-		reject(){
-			this.iscause=true
-			this.title='审核原因'
-			this.status=0
-			// this.$router.push({ name: 'inOutRecord' })
-		},
-		pass(){
-			this.iscause=true
-			this.title='审核原因'
-			this.status=1
-		},
-		submit(){
-			this.iscause=false
-		},
-		rejectclick(){
-			this.iscause=false
-		},
-		onChange() {
-			this.$refs.upload
-				.handleSaveBill()
-				.then(async response => {
-				this.deptBudgetList.addressUrl = response
-				})
-				.catch(res => {
-				EventBus.$emit('error', (JSON.parse(res) || {}).message)
-				this.$refs.upload.clearFiles()
-				})
-			},
-		},
+import { getcompList } from '@/model/signIn/index'
+import { woekflowhandle } from '@/model/tasksport/index'
+import {
+  getWarehouseReceiptLook,
+  getWarehouseReceiptExamine,
+  WarehouseReceiptUpdate,
+} from '@/model/tradeServicesManagement/index'
+import { selectWarehouseSelf } from '@/model/houseSelfCollect/index'
+import WsUpload from '@/components/WsUpload'
+export default {
+  components: {
+    WsUpload,
+  },
+  data() {
+    return {
+      deptBudgetList: {},
+	costOne:true,
+	costTwo:true,
+	costThree:true,
+	costFour:true,
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      compOptionList: [],
+      taskhistories: [],
+      warehouseList: [],
+      cwNumberList: [],
+      goodsList: [],
+      rules: {
+        // unitPrice: [
+        //   { required: true, message: '单价不能为空!', trigger: 'blur' },
+        //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+        // ],
+      },
+      outerVisible: false, //驳回
+      outerVisible1: false, //通过
+      rejectText: '', //驳回原因
+      adoptText: '', //审核意见
+    }
+  },
+  activated() {
+    // this.id = this.$route.query.id
+    this.getList(this.$route.query.id)
+    this.getcompList()
+  },
+  methods: {
+	  switch1(num){
+		  if(num == 1){
+			  this.costOne = !this.costOne
+			  if(this.costOne){
+				   this.deptBudgetList.applicationAmountFlag = "隐藏中"
+			  }else{
+				  this.deptBudgetList.applicationAmountFlag = "显示中"
+			  }
+		  }else if(num == 2){
+				this.costTwo = !this.costTwo
+				  if(this.costTwo){
+				   this.deptBudgetList.supervisionFeeFlag = "隐藏中"
+			  }else{
+				  this.deptBudgetList.supervisionFeeFlag = "显示中"
+			  }
+		  }else if(num == 3){
+			  this.costThree = !this.costThree
+			    if(this.costThree){
+				   this.deptBudgetList.insurancePremiumFlag = "隐藏中"
+			  }else{
+				  this.deptBudgetList.insurancePremiumFlag = "显示中"
+			  }
+		  }else if(num == 4){
+			    if(this.costFour){
+				    this.deptBudgetList.otherFeeFlag = "隐藏中"
+			  }else{
+				    this.deptBudgetList.otherFeeFlag = "显示中"
+			  }
+		  }
+	  },
+	  customEdit(){
+		  this.deptBudgetList.amountDue = this.deptBudgetList.paymentAmount + Number(this.deptBudgetList.applicationAmount ? this.deptBudgetList.applicationAmount : 0) + Number(this.deptBudgetList.supervisionFee ? this.deptBudgetList.supervisionFee : 0) + Number(this.deptBudgetList.insurancePremium ? this.deptBudgetList.insurancePremium : 0) + Number(this.deptBudgetList.otherFee? this.deptBudgetList.otherFee : 0)
+	  },
+    //返回
+    cancel() {
+      this.$router.push({
+        path: 'warehouseReceiptRegulation',
+      })
+    },
+    handleClose() {
+      if (this.outerVisible) {
+        this.outerVisible = false
+      }
+      if (this.outerVisible1) {
+        this.outerVisible1 = false
+      }
+    },
+    //驳回
+    rejectSubmit() {
+      if (!this.rejectText || this.rejectText.length > 50) {
+        this.$message.error('驳回原因不能为空且不能超出50字')
+        return
+      } else {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: false,
+          auditMind: this.rejectText,
+          needReapply: true,
+        })
+          .toPromise()
+          .then((response) => {
+            this.$message.success('驳回成功')
+            this.$router.push({
+          path: 'warehouseReceiptRegulation'
+        })
+          })
+      }
+    },
+    // 提交
+    adoptSubmit() {
+      if (!this.adoptText || this.adoptText.length > 50) {
+        this.$message.error('审核意见不能为空且不能超出50字')
+      } else {
+		WarehouseReceiptUpdate(this.deptBudgetList)
+        .toPromise()
+        .then((response) => {
+           this.$message.success('提交成功')
+		woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: true,
+          auditMind: this.adoptText,
+          needReapply: false,
+        })
+          .toPromise()
+          .then((response) => {
+            this.$message.success('审核成功')
+            this.$router.push({
+          path: 'warehouseReceiptRegulation'
+        })
+          })
+        })
+        .catch((req) => {
+          this.$message.success('提交失败')
+        }) 
+      }
+    },
+    getcompList() {
+      getcompList()
+        .toPromise()
+        .then((res) => {
+          this.compOptionList = res
+          this.deptBudgetList.renown = res[0].compName
+        })
+        .catch((err) => {})
+    },
+    getWarehouse() {
+      //获取仓库
+      selectWarehouseSelf({
+        compId: this.compId,
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = response
+          this.deptBudgetList.warehouseName = response[0].warehouseName
+          this.cwNumberList = response[0].positionInfos
+          this.deptBudgetList.warehouseNo =
+            response[0].positionInfos.length != 0
+              ? response[0].positionInfos[0].binNumber
+              : ''
+          this.deptBudgetList.baseId =
+            response[0].positionInfos.length != 0
+              ? response[0].positionInfos[0].baseId
+              : ''
+          this.deptBudgetList.warehouseAddress =
+            response[0].warehousePrivate +
+            response[0].warehouseCity +
+            response[0].warehouseArea +
+            response[0].detailedAddress
+          this.goodsList = response[0].goodsNameInfos
+          this.deptBudgetList.nowWeight =
+            response[0].goodsNameInfos.length != 0
+              ? response[0].goodsNameInfos[0].storage
+              : ''
+          // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
+          this.deptBudgetList.useWeight = '10'
+          this.deptBudgetList.goodsName =
+            response[0].goodsNameInfos.length != 0
+              ? response[0].goodsNameInfos[0].goodsName
+              : ''
+          this.deptBudgetList.warehouseId = response[0].id
+          if (!this.deptBudgetList.renown)
+            this.deptBudgetList.renown = this.compOptionList[0].compName
+          if (!this.deptBudgetList.renownId)
+            this.deptBudgetList.renownId = this.compOptionList[0].compId
+          this.deptBudgetList.bankId = 'bankId'
+          this.deptBudgetList.threeId = 'threeId'
+          this.deptBudgetList.warehouseNoId =
+            response[0].positionInfos.length != 0
+              ? response[0].positionInfos[0].id
+              : ''
+          this.deptBudgetList.goodsNameKey =
+            response[0].goodsNameInfos.length != 0
+              ? response[0].goodsNameInfos[0].goodsNameKey
+              : ''
+        })
+    },
+    getList(id) {
+      //审核记录
+      getWarehouseReceiptExamine({
+        businessKey: id,
+        workflowId: this.$route.query.workflowId,
+      })
+        .toPromise()
+        .then((response) => {
+          this.taskhistories = response
+        })
+      getWarehouseReceiptLook({ id: id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+		      this.deptBudgetList.modifyExpense1="利息"
+		      this.deptBudgetList.modifyExpense2="监管费"
+		      this.deptBudgetList.modifyExpense3="保险费"
+		      this.deptBudgetList.modifyExpense4="其他费用"
+		      this.deptBudgetList.applicationAmountFlag="隐藏中"
+		      this.deptBudgetList.supervisionFeeFlag="隐藏中"
+		      this.deptBudgetList.insurancePremiumFlag="隐藏中"
+		      this.deptBudgetList.otherFeeFlag="隐藏中"
+        })
+        .catch((req) => {
+          
+        })
+    },
+
+    // 附件改变事件
+    onChange() {
+      this.$refs.upload
+        .handleSaveBill()
+        .then(async (response) => {
+          this.deptBudgetList.appendix = response
+        })
+        .catch((res) => {
+          EventBus.$emit('error', (JSON.parse(res) || {}).message)
+          this.$refs.upload.clearFiles()
+        })
+    },
+	//磅单跳转
+	poundList(){
+		 this.$router.push({
+          name: 'inOutRecord',
+		  query: {
+            baseId: this.deptBudgetList.baseId,
+            positionId: this.deptBudgetList.warehouseNoId,
+            warehouseName: this.deptBudgetList.warehouseName,
+          }
+        })
 	}
+  },
+}
 </script>
 <style lang="scss" scoped>
+/deep/.el-form-item__content {
+  width: 400px;
+}
 
-</style>
+/deep/.el-select {
+  width: 100%;
+}
+
+.el-form {
+  overflow: scroll;
+  height: 94vh;
+}
+
+.bg-left {
+  padding-left: 30px;
+}
+
+.bg-bottom {
+  margin: 15px 0px;
+}
+
+.titleup {
+  position: relative;
+}
+
+.titleup::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+
+.center {
+  background: #f6f7fc;
+}
+
+.content2 {
+  background: white;
+  // padding:0 200px;
+  // text-align: center;
+  padding-left: 40px;
+}
+
+.title1 {
+  font-size: 20px;
+  font-weight: 600;
+  margin: 20px 0;
+}
+.existing{
+	width: 330px;
+}
+.custom{
+	width: 520px;
+	margin-bottom: 20px;
+	display: flex;
+	.custom1{
+		width: 120px;
+	}
+	/deep/.custom1 .el-input__inner{
+		text-align: right;
+	}
+	.custom2{
+		width: 345px;
+	}
+	/deep/.custom2 .el-input__inner{
+		width: 100%;
+	}
+	.span_text{
+		line-height: 32px;
+		color: #5878e8;
+    margin-left: 10px;
+	}
+}
+</style>

+ 779 - 560
src/views/tradeServicesManagement/inOutRecord.vue

@@ -1,296 +1,380 @@
 // 出入库记录
 <template>
-	<div>
-		<el-row>
-			<el-col :span="12">
-				<h2 class="bg-left title">修改合同信息</h2>
-			</el-col>
-			<el-col :span="12" class="bg-right">
-				<el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
-					style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />
-				返回</el-button>
-			</el-col>
-		</el-row>
-		<el-row>
-			<el-col :span="12">
-      <el-col :span="6">
-				<span>{{deptBudgetList.warehouseName}}(102仓位)</span><span>现有储量:1000吨</span>
+  <div>
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">流转记录及磅单</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />
+          返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <el-row>
+      <el-col :span="12">
+        <el-col :span="6">
+          <span>{{ deptBudgetList.warehouseName }}(102仓位)</span
+          ><span>现有储量:1000吨</span>
         </el-col>
         <el-col :span="18">
-				<el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
-					start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
-				</el-date-picker>
+          <el-date-picker
+            v-model="value2"
+            type="daterange"
+            align="right"
+            unlink-panels
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            :picker-options="pickerOptions"
+          >
+          </el-date-picker>
         </el-col>
-			</el-col>
-			<el-col :span="12" class="bg-right">
-				<el-button class="bg-bottom" type="primary" size="small" @click="adjustmentchange()">
-				调整</el-button>
-				<el-button class="bg-bottom" type="primary" size="small" @click="print()">
-				打印</el-button>
-			</el-col>
-		</el-row>
-		<el-table
-        class="wenzi"
-        @selection-change="handleSelectionChange"
-        :data="recordList"
-        style="width: 100%"
-      >
-	  <el-table-column
-        
-        type="selection"
-        width="55"
-      ></el-table-column>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="adjustmentchange()"
+        >
+          调整</el-button
+        >
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="print()"
+        >
+          打印</el-button
+        >
+      </el-col>
+    </el-row>
+    <el-table
+      class="wenzi"
+      @selection-change="handleSelectionChange"
+      :data="recordList"
+      style="width: 100%"
+    >
+      <el-table-column type="selection" width="55"></el-table-column>
       <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="goodsName" label="货名">
-        </el-table-column>
-		<el-table-column prop="grossWeight" label="毛重(吨)">
-        </el-table-column>
-		<el-table-column prop="tare" label="皮重(吨)">
-        </el-table-column>
-		<el-table-column prop="weight" label="扣重(吨)">
-    </el-table-column>
-		<el-table-column prop="netWeight" label="净重(吨)">
-        </el-table-column>
-		<el-table-column prop="inOutType" label="类型">
-        </el-table-column>
-		<el-table-column prop="addressUrl" label="磅单">
-      <template scope="scope">
-         <el-button @click='handleLook(1,scope.row)'>查看</el-button>
-       </template>
-    </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="结算单">
-      <template scope="scope">
-         <el-button @click='handleLook(2,scope.row)' v-if="scope.row.inOutType=='收购入库'">查看</el-button>
-       </template>
-    </el-table-column>
-		<el-table-column prop="inOutDate" label="出入库日期">
-    </el-table-column>
-     </el-table>
-	<el-dialog :visible.sync="isShowadjustment" title="收款截图">
-     <div>
-		 <el-input
-            v-model="adjustment"
-            placeholder="输入申请金额"
-            size="small"
-          ></el-input>
-          
-	 </div>
-   <div class="bottom-btn">
+      <el-table-column prop="goodsName" label="货名"> </el-table-column>
+      <el-table-column prop="grossWeight" label="毛重(吨)"> </el-table-column>
+      <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
+      <el-table-column prop="weight" label="扣重(吨)"> </el-table-column>
+      <el-table-column prop="netWeight" label="净重(吨)"> </el-table-column>
+      <el-table-column prop="inOutType" label="类型"> </el-table-column>
+      <el-table-column prop="addressUrl" label="磅单">
+        <template scope="scope">
+          <el-button @click="handleLook(1, scope.row)">查看</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="operatorMajorRoleName" label="结算单">
+        <template scope="scope">
+          <el-button
+            @click="handleLook(2, scope.row)"
+            v-if="scope.row.inOutType == '收购入库'"
+            >查看</el-button
+          >
+        </template>
+      </el-table-column>
+      <el-table-column prop="inOutDate" label="出入库日期"> </el-table-column>
+    </el-table>
+    <el-dialog :visible.sync="isShowadjustment" title="收款截图">
+      <div>
+        <el-input
+          v-model="adjustment"
+          placeholder="输入申请金额"
+          size="small"
+        ></el-input>
+      </div>
+      <div class="bottom-btn">
         <el-button @click="adjustmentClick()">确定</el-button>
       </div>
     </el-dialog>
-	<div class="mask" v-show="isShowPrintType"></div>
-	<div class="print-type" v-show="isShowPrintType">
+    <div class="mask" v-show="isShowPrintType"></div>
+    <div class="print-type" v-show="isShowPrintType">
       <div class="print-type-content">
         <div class="print-type-title">打印凭证</div>
         <div class="print-type-checkbox">
           <el-checkbox-group v-model="ruleForm.type">
-            <el-checkbox label="打印磅单" name="type" class="label-width" @change="selectType"></el-checkbox>
-            <el-checkbox label="打印结算单" name="type" class="label-width" @change="selectType"></el-checkbox>
+            <el-checkbox
+              label="打印磅单"
+              name="type"
+              class="label-width"
+              @change="selectType"
+            ></el-checkbox>
+            <el-checkbox
+              label="打印结算单"
+              name="type"
+              class="label-width"
+              @change="selectType"
+            ></el-checkbox>
             <!-- <el-checkbox label="打印发票" name="type" class="label-width" @change="selectType($event)"></el-checkbox> -->
           </el-checkbox-group>
         </div>
       </div>
+      <div class="bottom-btn">
+        <el-button @click="typePrintClick(selection)">确定</el-button>
+        <el-button @click="isShowPrintType = false">取消</el-button>
+      </div>
     </div>
     <el-dialog :visible.sync="isCountShow" title="磅单">
       <div id="printTest" class="content" v-if="true">
         <div class="title">磅码单</div>
-        <div class="title">{{tableData.code}}</div>
+        <div class="title">{{ tableData.code }}</div>
         <table class="table">
           <tr class="row">
             <td class="col col-bgc">单位</td>
-            <td class="col" colspan="4">{{tableData.companyName}}</td>
+            <td class="col" colspan="4">{{ tableData.companyName }}</td>
             <td class="col col-bgc">类型</td>
-            <td class="col"colspan="1">{{tableData.inOutType}}</td>
+            <td class="col" colspan="1">{{ tableData.inOutType }}</td>
             <td class="col col-bgc">车牌号</td>
-            <td class="col" colspan="1">{{tableData.carNo}}</td>
-            
+            <td class="col" colspan="1">{{ tableData.carNo }}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc">仓库</td>
-            <td class="col" colspan="4">{{tableData.warehouseName}}</td>
+            <td class="col" colspan="4">{{ tableData.warehouseName }}</td>
             <td class="col col-bgc">仓位</td>
-            <td class="col" colspan="1">{{tableData.binNumber}}</td>
+            <td class="col" colspan="1">{{ tableData.binNumber }}</td>
             <td class="col col-bgc">货名</td>
-            <td class="col" colspan="1">{{tableData.goodsName}}</td>
+            <td class="col" colspan="1">{{ tableData.goodsName }}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc">毛重(公斤)</td>
-            <td class="col" colspan="1">{{tableData.grossWeight}}</td>
+            <td class="col" colspan="1">{{ tableData.grossWeight }}</td>
             <td class="col col-bgc">皮重(公斤)</td>
-            <td class="col" colspan="2">{{tableData.tare}}</td>
+            <td class="col" colspan="2">{{ tableData.tare }}</td>
             <td class="col col-bgc">扣重(公斤)</td>
-            <td class="col" colspan="1">{{tableData.weight}}</td>
+            <td class="col" colspan="1">{{ tableData.weight }}</td>
             <td class="col col-bgc">净重(公斤)</td>
-            <td class="col" colspan="1">{{tableData.netWeight}}</td>
+            <td class="col" colspan="1">{{ tableData.netWeight }}</td>
           </tr>
-        </table> 
+        </table>
         <div class="bottom">
-          <div style='justify-content: space-between;' class="bottom-row1">
-            <div class="config">毛检:{{tableData.secretaryWeigher}}皮检:{{tableData.skinInspector}}</div>
-            <div class="autograph">日期:{{tableData.inOutDate}}</div>
+          <div style="justify-content: space-between" class="bottom-row1">
+            <div class="config">
+              毛检:{{ tableData.secretaryWeigher }}皮检:{{
+                tableData.skinInspector
+              }}
+            </div>
+            <div class="autograph">日期:{{ tableData.inOutDate }}</div>
           </div>
-          
         </div>
       </div>
       <div style="text-align: center">
-          <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
-          <el-button type="primary" v-print="'#printTest'" @click='isShowPrint = false'>打印单据</el-button>
-        </div>
-    </el-dialog>
-    <el-dialog width="70%" :visible.sync="isShowPrint" title="结算单">
-      <div class="center">
-    <!-- {{customerInfo}} -->
-    <div class="header">
-       <div>单位名称:{{ printData.compName}}</div>
-       <!-- <div>税务登记编号:91230230MA1BNL7Q93</div> -->
-    </div>
-    <div class="header-top">
-      <div>单位:公斤、元</div>
-      <div>No.</div>
-    </div>
-    <div class="header-top">
-      <!-- <div>开票日期:{{printData.createDate}}</div> -->
-      <!-- <div>开票日期:{{new Date(yyyy,mm,dd)}}</div> -->
-      <!-- <div class="number">{{dealNo(printData.paymentNo)}}</div> -->
-    </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="3">{{ printData.compName}}</td> -->
-        <td rowspan="4" class="col col-bgc">卖方</td>
-        <td class="col col-bgc">姓名</td>
-        <!-- <td class="col" colspan="4">{{ printData.customerName}}</td> -->
-      </tr>
-      <tr class="row">
-        <td class="col col-bgc">税务登记号</td>
-        <!-- <td class="col" colspan="3">{{ printData.taxRegistrationNo}}</td> -->
-        <td class="col col-bgc">身份证号</td>
-        <!-- <td class="col" colspan="4">{{ printData.identityAuthenticationInfo.customerNumberCard}}</td> -->
-      </tr>
-      <tr class="row">
-        <td class="col col-bgc">业务编号</td>
-        <!-- <td class="col" colspan="3">{{ printData.paymentNo}}</td> -->
-        <td class="col col-bgc">卡号</td>
-        <!-- <td class="col" colspan="4">{{printData.identityAuthenticationInfo.bankDeposit}}{{printData.identityAuthenticationInfo.bankCard}}</td> -->
-      </tr>
-      <tr class="row">
-        <td class="col col-bgc">收货仓库</td>
-        <!-- <td class="col" colspan="3">{{printData.warehouseName}}</td> -->
-        <td class="col col-bgc">地址</td>
-        <!-- <td class="col" colspan="4">{{printData.identityAuthenticationInfo.compAddress}}</td> -->
-      </tr>
-      <tr class="row">
-        <td class="col col-bgc">货名</td>
-        <td class="col col-bgc">类型</td>
-        <td class="col col-bgc">等级</td>
-        <td class="col col-bgc">水分%</td>
-        <td class="col col-bgc">杂质%</td>
-        <td class="col col-bgc">毛重</td>
-        <td class="col col-bgc">皮重</td>
-        <td class="col col-bgc">扣杂重</td>
-        <td class="col col-bgc">净重</td>
-        <td class="col col-bgc">纯重</td>
-      </tr>
-      <tr class="row">
-        <!-- <td class="col">{{ printData.goodsName}}</td>
-        <td class="col">{{ printData.type}}</td>
-        <td class="col">{{ printData.qualityInspectionManagement.grade}}</td>
-        <td class="col">{{ printData.qualityInspectionManagement.waterContent}}</td>
-        <td class="col">{{ printData.qualityInspectionManagement.impurity}}</td>
-        <td class="col">{{ printData.grossWeight}}</td>
-        <td class="col">{{ printData.tare}}</td>
-        <td class="col">{{ printData.weighingManagement.buckleMiscellaneous}}</td>
-        <td class="col">{{ printData.netWeight}}</td>
-        <td class="col">{{ printData.pureWeight}}</td> -->
-      </tr>
-      <tr class="row">
-        <td class="col col-bgc"  v-if="printData.type == '潮粮'">净重单价</td>
-        <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
-        <td class="col col-bgc">扣单价</td>
-        <td class="col col-bgc">粮款</td>
-        <td class="col col-bgc">称重补助</td>
-        <td class="col col-bgc">运费补助</td>
-        <td class="col col-bgc">卸车补助</td>
-        <td class="col col-bgc">其他补助</td>
-        <td class="col col-bgc">称重扣款</td>
-        <td class="col col-bgc">运费扣款</td>
-        <td class="col col-bgc">卸车扣款</td>
-      </tr>
-      <tr class="row">
-        <!-- <td class="col " v-if="printData.type == '潮粮'">{{printData.tidalGrainPrice}}</td>
-        <td class="col " v-if="printData.type == '干粮'">{{printData.qualityInspectionManagement.dryGrainPrice}}</td>
-        <td class="col ">{{ printData.unitDeduction}}</td>
-        <td class="col ">{{ printData.grainMoney}}</td>
-        <td class="col ">{{ printData.weighingSubsidy}}</td>
-        <td class="col ">{{ printData.freightSubsidy}}</td>
-        <td class="col ">{{ printData.unloadSubsidy}}</td>
-        <td class="col ">{{ printData.otherSubsidy}}</td>
-        <td class="col ">{{ printData.weighingDeduction}}</td>
-        <td class="col ">{{ printData.freightDeduction}}</td>
-        <td class="col ">{{ printData.unloadDeduction}}</td> -->
-      </tr>
-      <tr class="row">
-        <td class="col col-bgc">质量扣款</td>
-        <td class="col col-bgc">其他扣款</td>
-        <td class="col col-bgc" v-if="printData.type == '潮粮'">纯重单价</td>
-        <td class="col col-bgc">合计应付</td>
-        <td class="col col-bgc">购粮性质</td>
-        <td class="col col-bgc">车牌号</td>
-        <td class="col col-bgc" colspan="5">记事</td>
-      </tr>
-      <tr class="row">
-        <!-- <td class="col ">{{ printData.qualityDeduction}}</td>
-        <td class="col ">{{ printData.otherDeduction}}</td>
-        <td class="col " v-if="printData.type == '潮粮'">{{ printData.solidGrainPrice}}</td>
-        <td class="col ">{{ printData.calculationPayable}}</td>
-        <td class="col ">{{ printData.qualityInspectionManagement.natureOfGrainPurchase}}</td>
-        <td class="col ">{{ printData.carNo}}</td>
-        <td class="col " colspan="5">{{ printData.remarks}}</td> -->
-      </tr>
-      <tr class="row">
-        <td class="col col-bgc">实付金额</td>
-        <td class="col " colspan="2">{{printData.actualPayment}}</td>
-        <td class="col col-bgc" colspan="3">人民币(大写)</td>
-        <td class="col " colspan="4">{{printData.capitalize}}</td>
-
-      </tr>
-    </table>
-    <div class="bottom">
-      <div class="bottom-row1">
-        <!-- <div>质检:{{ printData.qualityInspectionManagement.qualityInspector}}</div>
-        <div>毛检:{{ printData.weighingManagement.secretaryWeigher}}</div>
-        <div>皮检:{{ printData.weighingManagement.skinInspector}}</div>
-        <div>结算:{{ printData.settlementClerk}}</div>
-        <div>付款:{{ printData.cashier}}</div>
-        <div>复点:{{ }}</div> -->
-        <div></div>
+        <el-button type="primary" @click="isCountShow = false">关闭</el-button>
+        <el-button
+          type="primary"
+          v-print="'#printTest'"
+          @click="isCountShow = false"
+          >打印单据</el-button
+        >
       </div>
-      <div class="bottom-row2">
-        <!-- <div class="left">
+    </el-dialog>
+    <el-dialog
+      width="70%"
+      :visible.sync="isShowPrint"
+      title="中天昊元粮食贸易有限公司结算凭证"
+    >
+      <div class="center" id="settlementSheet">
+        <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
+        <!-- {{customerInfo}} -->
+        <div class="header">
+          <div>单位名称:{{ printData.compName }}</div>
+          <!-- <div>税务登记编号:91230230MA1BNL7Q93</div> -->
+        </div>
+        <div class="header-top">
+          <div>单位:公斤、元</div>
+          <div>No.</div>
+        </div>
+        <div class="header-top">
+          <div>开票日期:{{ printData.createDate }}</div>
+          <!-- <div>开票日期:{{new Date(yyyy,mm,dd)}}</div> -->
+          <div class="number">{{ printData.paymentNo }}</div>
+        </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="3">{{ printData.compName }}</td>
+            <td rowspan="4" class="col col-bgc">卖方</td>
+            <td class="col col-bgc">姓名</td>
+            <td class="col" colspan="4">{{ printData.customerName }}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">税务登记号</td>
+            <td class="col" colspan="3">{{ printData.taxRegistrationNo }}</td>
+            <td class="col col-bgc">身份证号</td>
+            <td class="col" colspan="4">
+              {{ printData.identityAuthenticationInfo.customerNumberCard }}
+            </td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">业务编号</td>
+            <td class="col" colspan="3">{{ printData.paymentNo }}</td>
+            <td class="col col-bgc">卡号</td>
+            <td class="col" colspan="4">
+              {{ printData.identityAuthenticationInfo.bankDeposit
+              }}{{ printData.identityAuthenticationInfo.bankCard }}
+            </td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">收货仓库</td>
+            <td class="col" colspan="3">{{ printData.warehouseName }}</td>
+            <td class="col col-bgc">地址</td>
+            <td class="col" colspan="4">
+              {{ printData.identityAuthenticationInfo.compAddress }}
+            </td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">货名</td>
+            <td class="col col-bgc">类型</td>
+            <td class="col col-bgc">等级</td>
+            <td class="col col-bgc">水分%</td>
+            <td class="col col-bgc">杂质%</td>
+            <td class="col col-bgc">毛重</td>
+            <td class="col col-bgc">皮重</td>
+            <td class="col col-bgc">扣重</td>
+            <td class="col col-bgc">扣杂</td>
+            <td class="col col-bgc">净重</td>
+            <!-- <td class="col col-bgc">纯重</td> -->
+          </tr>
+          <tr class="row">
+            <td class="col">{{ printData.goodsName }}</td>
+            <td class="col">{{ printData.type }}</td>
+            <td class="col">
+              {{ printData.qualityInspectionManagement.grade }}
+            </td>
+            <td class="col">
+              {{ printData.qualityInspectionManagement.waterContent }}
+            </td>
+            <td class="col">
+              {{ printData.qualityInspectionManagement.impurity }}
+            </td>
+            <td class="col">{{ printData.grossWeight }}</td>
+            <td class="col">{{ printData.tare }}</td>
+            <td class="col" v-if="printData.type == '干粮'">
+              {{ printData.weighingManagement.buckleMiscellaneous }}
+            </td>
+            <td class="col" v-if="printData.type == '潮粮'">0</td>
+            <td class="col" v-if="printData.type == '干粮'">0</td>
+            <td class="col" v-if="printData.type == '潮粮'">
+              {{ printData.netWeight }}
+            </td>
+            <td class="col">{{ printData.pureWeight }}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc" v-if="printData.type == '潮粮'">
+              净重单价
+            </td>
+            <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
+            <td class="col col-bgc">扣单价</td>
+            <td class="col col-bgc">粮款</td>
+            <td class="col col-bgc">称重补助</td>
+            <td class="col col-bgc">运费补助</td>
+            <td class="col col-bgc">卸车补助</td>
+            <td class="col col-bgc">其他补助</td>
+            <td class="col col-bgc">称重扣款</td>
+            <td class="col col-bgc">运费扣款</td>
+            <td class="col col-bgc">卸车扣款</td>
+          </tr>
+          <tr class="row">
+            <td class="col" v-if="printData.type == '潮粮'">
+              {{ printData.tidalGrainPrice }}
+            </td>
+            <td class="col" v-if="printData.type == '干粮'">
+              {{ printData.qualityInspectionManagement.dryGrainPrice }}
+            </td>
+            <td class="col">{{ printData.unitDeduction }}</td>
+            <td class="col">{{ printData.grainMoney }}</td>
+            <td class="col">{{ printData.weighingSubsidy }}</td>
+            <td class="col">{{ printData.freightSubsidy }}</td>
+            <td class="col">{{ printData.unloadSubsidy }}</td>
+            <td class="col">{{ printData.otherSubsidy }}</td>
+            <td class="col">{{ printData.weighingDeduction }}</td>
+            <td class="col">{{ printData.freightDeduction }}</td>
+            <td class="col">{{ printData.unloadDeduction }}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">质量扣款</td>
+            <td class="col col-bgc">其他扣款</td>
+            <!-- <td class="col col-bgc" v-if="printData.type == '潮粮'">纯重单价</td> -->
+            <td class="col col-bgc">合计应付</td>
+            <td class="col col-bgc">购粮性质</td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col col-bgc" colspan="5">记事</td>
+          </tr>
+          <tr class="row">
+            <td class="col">{{ printData.qualityDeduction }}</td>
+            <td class="col">{{ printData.otherDeduction }}</td>
+            <!-- <td class="col " v-if="printData.type == '潮粮'">{{ printData.solidGrainPrice}}</td> -->
+            <td class="col">{{ printData.calculationPayable }}</td>
+            <td class="col">
+              {{ printData.qualityInspectionManagement.natureOfGrainPurchase }}
+            </td>
+            <td class="col">{{ printData.carNo }}</td>
+            <td class="col" colspan="5">{{ printData.remarks }}</td>
+          </tr>
+          <tr class="row">
+            <!-- <td class="col col-bgc">实付金额</td>
+        <td class="col " colspan="2">{{printData.actualPayment}}</td> -->
+            <td class="col col-bgc" colspan="3">人民币(大写)</td>
+            <td class="col" colspan="7">{{ printData.capitalize }}</td>
+          </tr>
+        </table>
+        <div class="bottom">
+          <div class="bottom-row1">
+            <div>
+              质检:{{ printData.qualityInspectionManagement.qualityInspector }}
+            </div>
+            <div>毛检:{{ printData.weighingManagement.secretaryWeigher }}</div>
+            <div>皮检:{{ printData.weighingManagement.skinInspector }}</div>
+            <div>结算:{{ printData.settlementClerk }}</div>
+            <div>付款:{{ printData.cashier }}</div>
+            <div>复点:{{}}</div>
+            <div></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">
+            <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>
-  </div>
-          <div style="text-align: center">
-          <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
-          <el-button type="primary" v-print="'#printTest'">打印单据</el-button>
         </div>
+      </div>
+      <div style="text-align: center">
+        <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
+        <el-button
+          type="primary"
+          v-print="'#settlementSheet'"
+          @click="isShowPrint = false"
+          >打印单据</el-button
+        >
+      </div>
     </el-dialog>
     <!-- <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint"
         :title="tableData.companyName + '结算凭证'">
@@ -300,356 +384,491 @@
           <el-button type="primary" @click="printBig">打印单据</el-button>
         </div>
       </el-dialog> -->
-	</div>
+  </div>
 </template>
 <script>
-	import {
-		getList,
-    getrecord,
-    getwarehousecount,
-    postwarehouseadjustment,
-    getsettleaccout
-	} from '@/model/tradeServicesManagement/index'
-    import paymentPrint from './component/paymentPrint.vue'
-	export default {
-		components: {
-      paymentPrint
-    },
-		data() {
-			return {
-				recordList:[],
-				value2:'',
-        customerList:{},
-				isShowadjustment:false,
-        adjustment:'',
-        id:0,
-				ruleForm: {
-					type: [
-						'打印磅单',
-						'打印结算单',
-					]
-				},
-        currentPage:1,
-        pageSize:10,
-        searchType:'',
-        isCountShow:false,
-        isShowPrint:false,
-				isShowPrintType:false,
-				deptBudgetList:{},
-				pickerOptions:[],
-        tableData:{},
-        selection:[],
-        printData:{}
-			}
-		},
-		activated() {
-      this.deptBudgetList.baseId=this.$route.query.baseId
-      this.deptBudgetList.positionId=this.$route.query.positionId
-      this.deptBudgetList.warehouseName=this.$route.query.warehouseName
-			this.getList()
-		},
-		methods: {
-      getList(){
-        getrecord({
-            compId: sessionStorage.getItem('ws-pf_compId'),
-						baseId: this.deptBudgetList.baseId,
-						positionId: this.deptBudgetList.positionId,
-						warehouseName: this.deptBudgetList.warehouseName,
-//             baseId: "264d297cffb543f9a2d5004b11efc124",
-// positionId: "6a46921d2f7a468d9c73663d6c28e294",
-// warehouseName: "erp测试库",
-						searchType: this.searchType,
-						currentPage: this.currentPage,
-						pageSize: this.pageSize,
-        }).toPromise()
-          .then((res) => {
-            for (let i = 0; i < res.records.length; i++) {
-              if(res.records[i].grossWeight){
-                res.records[i].grossWeight*=1000
-              }
-              if(res.records[i].tare){
-                res.records[i].tare*=1000
-              }
-              if(res.records[i].netWeight){
-                res.records[i].netWeight*=1000
-              }
-              if(res.records[i].grossWeight&&res.records[i].tare&&res.records[i].netWeight){
-                  res.records[i].weight=res.records[i].grossWeight-res.records[i].tare-res.records[i].netWeight
-              }else{
-                res.records[i].weight=null
-              }
-            }
-            this.recordList = res.records
-          })
+import {
+  getrecord,
+  postwarehouseadjustment,
+  getsettleaccout,
+} from '@/model/tradeServicesManagement/index'
+import { getpaymentexamine } from '@/model/houseSelfCollect/index'
+import paymentPrint from './component/paymentPrint.vue'
+export default {
+  components: {
+    paymentPrint,
+  },
+  data() {
+    return {
+      recordList: [],
+      value2: '',
+      customerList: {},
+      isShowadjustment: false,
+      adjustment: '',
+      id: 0,
+      ruleForm: {
+        type: ['打印磅单', '打印结算单'],
       },
-			returnsales() {
-				this.$router.go(-1)
-			},
-			adjustmentchange(){
-        // console.log(this.selection)
-        if(this.selection.length>0){
-          this.isShowadjustment=true
-        }else{
-          this.$message.error('请勾选要调整的条目');
-        }
-			},
-			print(){
-				this.isShowPrintType=true
-			},
-      adjustmentClick(){
-        postwarehouseadjustment({warehouseInOutInfoList:this.selection,adjustment:this.adjustment}).toPromise()
-          .then((res) => {
-            this.isShowadjustment=false
-            this.$message.success('调整成功');
-            this.getList()
-          })
+      currentPage: 1,
+      pageSize: 10,
+      searchType: '',
+      isCountShow: false,
+      isShowPrint: false,
+      isShowPrintType: false,
+      deptBudgetList: {},
+      pickerOptions: [],
+      tableData: {},
+      selection: [],
+      printData: {
+        identityAuthenticationInfo: {},
+        qualityInspectionManagement: {},
+        weighingManagement: {},
       },
-			selectType(){
-
-			},
-			typePrintClick(){
-
-			},
-			handleSelectionChange(val){
-        this.selection=val
-        console.log(val)
-			},
-      printBig(){
+      printList: [],
+    }
+  },
+  activated() {
+    this.deptBudgetList.baseId = this.$route.query.baseId
+    this.deptBudgetList.positionId = this.$route.query.positionId
+    this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+    this.getList()
+  },
+  methods: {
+    getList() {
+      getrecord({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        baseId: this.deptBudgetList.baseId,
+        positionId: this.deptBudgetList.positionId,
+        warehouseName: this.deptBudgetList.warehouseName,
+        searchType: this.searchType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+      })
+        .toPromise()
+        .then((res) => {
+          for (let i = 0; i < res.records.length; i++) {
+            if (res.records[i].grossWeight) {
+              res.records[i].grossWeight *= 1000
+            }
+            if (res.records[i].tare) {
+              res.records[i].tare *= 1000
+            }
+            if (res.records[i].netWeight) {
+              res.records[i].netWeight *= 1000
+            }
+            if (
+              res.records[i].grossWeight &&
+              res.records[i].tare &&
+              res.records[i].netWeight
+            ) {
+              res.records[i].weight =
+                res.records[i].grossWeight -
+                res.records[i].tare -
+                res.records[i].netWeight
+            } else {
+              res.records[i].weight = null
+            }
+          }
+          this.recordList = res.records
+        })
+    },
+    returnsales() {
+      this.$router.go(-1)
+    },
+    adjustmentchange() {
+      // console.log(this.selection)
+      if (this.selection.length > 0) {
+        this.isShowadjustment = true
+      } else {
+        this.$message.error('请勾选要调整的条目')
+      }
+    },
+    print() {
+      this.isShowPrintType = true
+    },
+    adjustmentClick() {
+      postwarehouseadjustment({
+        warehouseInOutInfoList: this.selection,
+        adjustment: this.adjustment,
+      })
+        .toPromise()
+        .then((res) => {
+          this.isShowadjustment = false
+          this.$message.success('调整成功')
+          this.getList()
+        })
+    },
+    selectType() {
+      console.log(this.ruleForm.type)
+    },
+    typePrintClick(selection) {
+      debugger
+      let index1 = 0
+      let index2 = 0
+      var that = this
+      let _bdList = []
+      let _jsList = []
+      for (let i = 0; i < selection.length; i++) {
+        for (let j = 0; j < this.ruleForm.type.length; j++) {
+          if (
+            this.ruleForm.type[j] == '打印磅单' &&
+            this.ruleForm.type.length < 1
+          ) {
+            selection[i].code =
+              this.getdate() +
+              selection[i].commonWarehouseNo +
+              this.verifyinit()
+            selection[i].printType = '打印磅单'
+            _bdList.push(selection[i])
+            index1++
+            if (index1 == selection.length) {
+              sessionStorage.setItem(
+                'inOutRecord_printbd',
+                JSON.stringify(_bdList)
+              )
+              window.open('../../../../../static/tradeServicesPrint.html')
+            }
+          } else if (
+            this.ruleForm.type[j] == '打印结算单' &&
+            this.ruleForm.type.length < 1
+          ) {
+            if (!selection[i].paymentId) {
+              this.$message.error(
+                '选择条目错误,收购入库结算单才能打印,请重新勾选!'
+              )
+              return
+            } else {
+              getpaymentexamine({ id: selection[i].paymentId })
+                .toPromise()
+                .then((res) => {
+                  res.printType = '打印结算单'
+                  index2++
+                  _jsList.push(res)
+                  if (index2 == this.selection.length) {
+                    sessionStorage.setItem(
+                      'inOutRecord_printjs',
+                      JSON.stringify(_jsList)
+                    )
+                    window.open('../../../../../static/tradeServicesPrint.html')
+                    // this.isShowPrint = true
+                    // this.printBig();
+                  }
+                })
+            }
+          } else {
+            // 两条都打
 
-      },
-      print(){
+            if (!selection[i].paymentId) {
+              this.$message.error(
+                '选择条目错误,收购入库结算单才能打印,请重新勾选!'
+              )
+              return
+            } else {
+              selection[i].code =
+                this.getdate() +
+                selection[i].commonWarehouseNo +
+                this.verifyinit()
+              selection[i].printType = '打印磅单'
+              _bdList.push(selection[i])
+              index1++
+              // if (index1 == selection.length && index2 == selection.length) {
+                sessionStorage.setItem(
+                  'inOutRecord_printbd',
+                  JSON.stringify(_bdList)
+                )
+                // window.open('../../../../../static/tradeServicesPrint.html')
+              // }
+              getpaymentexamine({ id: selection[i].paymentId })
+                .toPromise()
+                .then((res) => {
+                  res.printType = '打印结算单'
+                  index2++
+                  _jsList.push(res)
+                  if (
+                    index2 == selection.length
+                  ) {
+                    sessionStorage.setItem(
+                      'inOutRecord_printjs',
+                      JSON.stringify(_jsList)
+                    )
+                    window.open('../../../../../static/tradeServicesPrint.html')
+                    // this.isShowPrint = true
+                    // this.printBig();
+                  }
+                })
+            }
+          }
+        }
+      }
+    },
 
-      },
-      verifyinit() {
-				var arr = []
-				for (var i = 48; i < 57; i++) {
-					arr.push(String.fromCharCode(i))
-				}
-				arr.sort(function() {
-					return Math.random() - 0.5
-				})
-				arr.length = 4
+    handleSelectionChange(val) {
+      this.selection = val
+      console.log(val)
+    },
+    printBig() {},
+    verifyinit() {
+      var arr = []
+      for (var i = 48; i < 57; i++) {
+        arr.push(String.fromCharCode(i))
+      }
+      arr.sort(function () {
+        return Math.random() - 0.5
+      })
+      arr.length = 4
 
-				return arr.join('')
-			},
-      handleLook(status,item){
-        if(status==1){
-          this.tableData=item
-          // getwarehousecount({
-          //   positionId:this.deptBudgetList.positionId,
-          //   // positionId: "6a46921d2f7a468d9c73663d6c28e294",
-          //   inOutFlag:item.inOutFlag
-          //   }).toPromise()
-          // .then((res) => {
-            // var count='000'+(res+1)
-            // count=count.substring(count.length-3)
-            this.tableData.code=this.getdate()+item.commonWarehouseNo+this.verifyinit()
-            this.isCountShow=true
-          // })
-        }else{
-         
-          printData({id:item.id}).toPromise()
+      return arr.join('')
+    },
+    handleLook(status, item) {
+      if (status == 1) {
+        this.tableData = item
+        // getwarehousecount({
+        //   positionId:this.deptBudgetList.positionId,
+        //   // positionId: "6a46921d2f7a468d9c73663d6c28e294",
+        //   inOutFlag:item.inOutFlag
+        //   }).toPromise()
+        // .then((res) => {
+        // var count='000'+(res+1)
+        // count=count.substring(count.length-3)
+        this.tableData.code =
+          this.getdate() + item.commonWarehouseNo + this.verifyinit()
+        this.isCountShow = true
+        // })
+      } else {
+        // getsettleaccout({id:item.id}).toPromise()
+        // .then((res) => {
+        //   this.printData=res
+        //   this.isShowPrint=true
+        // })
+        getpaymentexamine({ id: item.paymentId })
+          .toPromise()
           .then((res) => {
-            this.printData=res 
-            this.isShowPrint=true
+            this.printData = res
+            this.isShowPrint = true
           })
-          // this.tableData=item
-        }
-      },
-      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
-			},
-			typePrintCannelClick() {
-				this.isShowPrintType = false
-			},
-		},
-	}
+      }
+    },
+    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
+    },
+    typePrintCannelClick() {
+      this.isShowPrintType = false
+    },
+  },
+}
 </script>
 <style lang="scss" scoped>
-	.bg-left {
-    padding-left: 30px;
-  }
+.bg-left {
+  padding-left: 30px;
+}
 
-  .bg-right {
-    padding-right: 10px;
-    text-align: right;
-  }
-	.bg-left.title {
-    position: relative;
-  }
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-left.title {
+  position: relative;
+}
 .bg-bottom {
-    margin: 15px 0px;
-  }
-  .bg-left.title::before {
-    content: '';
-    display: inline-block;
-    width: 5px;
-    height: 30px;
-    background: #5473e8;
-    position: absolute;
-    left: 0;
-  }
-  .mask {
-    background: black;
-    width: 100vw;
-    height: 100vh;
-    position: fixed;
-    top: 0;
-    z-index: 99;
-    opacity: 0.3;
-  }
+  margin: 15px 0px;
+}
+.bg-left.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.mask {
+  background: black;
+  width: 100vw;
+  height: 100vh;
+  position: fixed;
+  top: 0;
+  z-index: 99;
+  opacity: 0.3;
+}
 
-  .print-type {
-    position: absolute;
-    top: 0;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    margin: auto;
-    width: 200px;
-    height: 200px;
-    background: white;
-    border-radius: 10px;
-    z-index: 999;
-  }
-  .print-type-title {
-    text-align: center;
-    font-size: 18px;
-    margin: 20px;
-  }
-  .print-type-checkbox {
-    padding-left: 20px;
-  }
-  .page2-content {
-    border: 1px solid #D8DCE6;
-    margin-top: 20px;
-    padding: 10px;
-    box-sizing: border-box;
-    text-align: center;
-    border-radius: 4px;
-    padding-bottom: 20px;
-  }
-  table,
-      table tr th,
-      table tr td {
-        border: 2px solid #333333;
-        padding: 5px 0;
-        height: 55px;
-      }
+.print-type {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  margin: auto;
+  width: 200px;
+  height: 200px;
+  background: white;
+  border-radius: 10px;
+  z-index: 999;
+}
+.print-type-title {
+  text-align: center;
+  font-size: 18px;
+  margin: 20px;
+}
+.print-type-checkbox {
+  padding-left: 20px;
+}
+.page2-content {
+  border: 1px solid #d8dce6;
+  margin-top: 20px;
+  padding: 10px;
+  box-sizing: border-box;
+  text-align: center;
+  border-radius: 4px;
+  padding-bottom: 20px;
+}
+table,
+table tr th,
+table tr td {
+  border: 2px solid #333333;
+  padding: 5px 0;
+  height: 55px;
+}
 
-      #app {
-        /* height: 98vh;
+#app {
+  /* height: 98vh;
         position: relative; */
-      }
+}
 
-      .content {
-        // width: 1000px;
-        // padding: 70px 20px 20px 20px;
-        // font-size: 22px;
-        // position: absolute;
-        // top: 0;
-        // bottom: 0;
-        // left: 0;
-        // right: 0;
-        .title {
-          text-align: center;
-          font-size: 36px;
-          font-weight: 500;
-          margin-bottom: 20px;
-        }
-        img {
-          width: 41px;
-          height: 41px;
-          margin-right: 118px;
-        }
-      }
+.content {
+  // width: 1000px;
+  // padding: 70px 20px 20px 20px;
+  // font-size: 22px;
+  // position: absolute;
+  // top: 0;
+  // bottom: 0;
+  // left: 0;
+  // right: 0;
+  .title {
+    text-align: center;
+    font-size: 36px;
+    font-weight: 500;
+    margin-bottom: 20px;
+  }
+  img {
+    width: 41px;
+    height: 41px;
+    margin-right: 118px;
+  }
+}
 
-      .table {
-        width: 100%;
-        text-align: center;
-        border-collapse: collapse;
-        border: 3px solid #333333;
-      }
+.table {
+  width: 100%;
+  text-align: center;
+  border-collapse: collapse;
+  border: 3px solid #333333;
+}
 
-      .col-bgc {
-        background: #f6f7fb;
-      }
+.col-bgc {
+  background: #f6f7fb;
+}
 
-      .bottom-row1 {
-        display: flex;
-        /* justify-content: space-between; */
-        margin-top: 5px 0;
-      }
+.bottom-row1 {
+  display: flex;
+  /* justify-content: space-between; */
+  margin-top: 5px 0;
+}
 
-      .bottom-row2 {
-        display: flex;
-      }
+.bottom-row2 {
+  display: flex;
+}
 
-      
+.config {
+  margin-top: 10px;
+  margin-right: 240px;
+}
+.autograph {
+  margin-top: 10px;
+}
+.bottom-row3 {
+  margin: 10px 0;
+}
 
-      .config {
-        margin-top: 10px;
-        margin-right: 240px;
-      }
-      .autograph{
-    margin-top: 10px;
-     }
-      .bottom-row3 {
-        margin: 10px 0;
-      }
+.number {
+  text-align: right;
+  margin-bottom: 10px;
+  margin-top: 20px;
+}
 
-      .number {
-        text-align: right;
-        margin-bottom: 10px;
-        margin-top: 20px;
-      }
+.small-row {
+  display: flex;
+}
 
-      .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: 450px;
+}
 
-      .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: 450px;
-      }
+.small-title {
+  text-align: center;
+  font-size: 18px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
 
-      .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-row {
-        display: flex;
-        justify-content: space-between;
-        margin: 10px;
-      }
+.small-img {
+  margin-right: 0;
+}
+.sign {
+  margin-right: 100px;
+}
+.header {
+  display: flex;
+  justify-content: space-between;
+  font-size: 16px;
+  margin: 10px 0;
+}
+.header-top {
+  display: flex;
+  justify-content: space-between;
+}
+.number {
+  text-align: right;
+  margin: 0 0 10px 0;
+}
+/deep/.el-dialog__title {
+  font-size: 24px !important;
+}
 
-      .small-img {
-        margin-right: 0;
-      }
-      .sign{
-        margin-right: 100px;
-      }
+/deep/.el-dialog__header {
+  text-align: center !important;
+  padding: 10px 0 !important;
+  height: auto !important;
+  // border-bottom: none !important;
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.bottom-btn {
+  margin: 20px;
+}
 </style>

+ 200 - 46
src/views/tradeServicesManagement/repayment.vue

@@ -1,5 +1,4 @@
 // 还款
-// 出入库记录
 <template>
 	<div>
 		<el-row>
@@ -9,22 +8,24 @@
 			<el-col :span="12" class="bg-right">
 			</el-col>
 		</el-row>
-		<div>
-			<span>鸡西银行</span><span>鲅鱼圈1号库</span><span>鸡西银行</span><span>1000吨</span><span>业务编号:211103001</span>
+		<div class="span_css">
+			<span>{{repayment.bank}}</span><span>{{repayment.warehouseName}}</span><span>{{repayment.goodsName}}</span><span>{{repayment.weight}}吨</span><span>业务编号:{{repayment.billNo}}</span>
 		</div>
 		<el-row>
 			<el-col :span="12">
-				<span>鸡西银行</span><span>鲅鱼圈1号库</span><span>鸡西银行</span><span>1000吨</span><span>业务编号:211103001</span>
-			</el-col>
+        <div class="span_css">
+				<span>合同编号:{{repayment.contractNo}}</span><span>发放金额:{{repayment.paymentAmount}}元</span><span>应还金额:{{repayment.amountDue}}元</span><span>已还金额:{{repayment.amountRepaid}}元</span><span>待还金额:{{repayment.amountToRepaid}}元</span>
+			</div>
+      </el-col>
 			<el-col :span="12" class="bg-right">
-				<el-button class="bg-bottom" type="primary" size="small" @click="payment()">
-				还款</el-button>
+				<el-button class="bg-bottom" type="primary" size="small" @click="payment()">还款</el-button>
 			</el-col>
 		</el-row>
 		<el-table
         class="wenzi"
         :data="recordList"
         style="width: 100%"
+        height="780"
       >
       <el-table-column type="index" label="序号" width="50">
         <template scope="scope">
@@ -32,55 +33,92 @@
           <span v-else>{{ scope.$index + 1 }}</span>
         </template>
       </el-table-column>
-        <el-table-column prop="goodsName" label="还款金额(元)">
+        <el-table-column prop="repaymentEdAmount" label="还款金额(元)">
         </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="还款日期">
+		<el-table-column prop="repaymentDate" label="还款日期">
         </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="附件">
+		<el-table-column prop="appendix" label="附件">
+      <template slot-scope="scope">
+        <span @click="fujianLook(scope.row)" class="text_css">查看</span>
+      </template>
         </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="操作人">
+		<el-table-column prop="operator" label="操作人">
         </el-table-column>
-		<el-table-column prop="operatorMajorRoleName" label="操作时间">
+		<el-table-column prop="createDate" label="操作时间">
         </el-table-column>
      </el-table>
-	 <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true" title="还款">
+	 <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true" title="还款" :before-close="paymentFormRemove">
       <div class="tanchuang">
         <ws-form>
           <ws-info-table>
-            <ws-form-item label="待还金额(元)" prop="amountNotPayable">
+            <ws-form-item label="待还金额(元)" prop="amountToRepaid">
               {{
-              payments.amountNotPayable
+               stillMoney.amountToRepaid
               }}
             </ws-form-item>
             <ws-form-item label="本次还款金额(元)" prop="money">
-              <ws-input type="number" @mousewheel.native.prevent v-model="payments.money" placeholder="请输入本次付款金额(元)"
+              <ws-input type="number" @mousewheel.native.prevent v-model="stillMoney.repaymentEdAmount" placeholder="请输入本次付款金额(元)"
                 maxlength="100" size="small" />
             </ws-form-item>
-            <ws-form-item label="上传还款截图" prop=" paymentScreenshot"></ws-form-item>
+            <ws-form-item label="付款日期" prop="repaymentDate">
+              <el-date-picker v-model="stillMoney.repaymentDate" type="date" placeholder="选择日期"></el-date-picker>
+            </ws-form-item>
+            <ws-form-item label="上传还款截图" prop="paymentScreenshot"></ws-form-item>
             <div class="upLoad">
-              <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+              <!-- <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
                 :on-success="handleAvatarSuccess">
                 <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-              </el-upload>
+              </el-upload> -->
+               <!-- <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            list-type="picture-card"
+            :on-success="handleAvatarSuccess"
+            :on-remove="handleRemove"
+            class="photo2"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload> -->
+           <ws-upload ref="upload" :comp-id="compId" :appendix-ids="stillMoney.repaymentScreenshot" @onChange="handleAvatarSuccess" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
             </div>
           </ws-info-table>
           <div style="text-align: center; margin-top: 20px">
-            <el-button @click="paymentForm = false">取消</el-button>
+            <el-button @click="paymentFormRemove ">取消</el-button>
             <el-button @click="paymentSubmit">提交</el-button>
           </div>
         </ws-form>
       </div>
     </el-dialog>
+    <div class="pageNumber">
+    <!-- 页数 -->
+      <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>
+      <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+			@on-cancel="handleClose">
+			<ws-upload ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
+				accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+		</WinseaContentModal>
 	</div>
 </template>
 <script>
 	import {
-		getList,
-	
+	getRepaymentList,
+  repaymentSubmit,
+  getWarehouseReceiptLook
 	} from '@/model/tradeServicesManagement/index'
+   import WsUpload from '@/components/WsUpload'
 	export default {
-		components: {},
+		components: {
+        WsUpload,
+    },
 		data() {
 			return {
 				recordList:[],
@@ -88,39 +126,138 @@
 				isShowadjustment:false,
 				pickerOptions:[],
 				paymentForm:false,
-				payments:{}
+				payments:{},
+        imageUrl:"",
+        repayment:{
+          repaymentScreenshot:"",
+          repaymentEdAmount:0,
+        },
+        currentPage:1,
+        pageSize:10,
+        deptCircularPage:{},
+        stillMoney:{},
+        deptBudgetTotal:0,
+        compId:sessionStorage.getItem('ws-pf_compId'),
+        id:"",
+        accessoryTFs:false,
+        appendixIdss:"",
 			}
 		},
 		activated() {
-			
+     this.id = this.$route.query.id;
+		this.getList()
 		},
 		methods: {
+      handleClose(){
+       this.accessoryTFs = false
+      },
+      
+      getList(){
+        getWarehouseReceiptLook({id:this.id})
+        .toPromise()
+        .then((response) => {
+         this.repayment = response
+         this.stillMoney.amountToRepaid =  this.repayment.amountToRepaid
+          getRepaymentList({compId:this.repayment.compId,tradeWarehouseReceiptid:this.repayment.id,currentPage:this.currentPage,pageSize:this.pageSize}).toPromise()
+          .then((response) => {
+            this.recordList = response.records
+            //  this.stillMoney.amountToRepaid =  this.repayment.amountToRepaid
+           this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+          })
+        })
+        .catch((req) => {
+          // this.tableData = response.records
+          // this.$message.success('提交失败')
+        })
+      },
+      //成功付款截图
+      handleAvatarSuccess(e){
+         this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+              this.stillMoney.repaymentScreenshot = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      //付款提交
+      paymentSubmit(){
+        if(!this.stillMoney.repaymentEdAmount){
+          this.$message.error("请输入本次还款金额!")
+          return
+        }
+        if(this.stillMoney.repaymentEdAmount <= 0 || this.stillMoney.repaymentEdAmount > this.stillMoney.amountToRepaid){
+          this.$message.error("本次还款金额输入错误,不能小于等于0且不能大于待还金额!")
+          return
+        }
+        if (
+        (String(this.stillMoney.repaymentEdAmount).indexOf('.') != -1 &&
+          String(this.stillMoney.repaymentEdAmount).length -
+            (String(this.stillMoney.repaymentEdAmount).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message.error("本次还款金额需保留两位小数,请重新输入!")
+        return
+      }
+      if(!this.stillMoney.repaymentDate){
+        this.$message.error("还款日期不能为空!")
+        return
+      }
+      if(!this.stillMoney.repaymentScreenshot){
+        this.$message.error("请上传附件!")
+        return
+      }
+        this.$confirm('确定提交付款信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+             this.stillMoney.tradeWarehouseReceiptId = this.repayment.id
+            this.stillMoney.operator = sessionStorage.getItem('ws-pf_staffName')
+             this.stillMoney.compId = this.repayment.compId
+             this.stillMoney.contractNo = this.repayment.contractNo
+            repaymentSubmit(this.stillMoney).toPromise()
+            .then((response) => {
+              this.$message.success("还款成功!")
+              this.paymentForm = false
+              this.stillMoney = {}
+              this.getList()
+          })
+          }).catch(() =>{
+            return false
+          })
+      },
+      paymentFormRemove(){
+        this.paymentForm = false
+        this.stillMoney.repaymentScreenshot = ""
+        this.stillMoney.repaymentEdAmount = ""
+        this.stillMoney.repaymentDate = ""
+      },
+      //查看附件
+      fujianLook(row){
+        this.appendixIdss = row.repaymentScreenshot
+        this.accessoryTFs = true
+      },
+       handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
 			returnsales() {
 				this.$router.go(-1)
-			},
-			selectType(){
-
-			},
-			typePrintClick(){
-
-			},
-			selectInit(){
-
 			},
 			payment() {
-				// this.imageUrl = ''
-				// if (this.modification.length == 0) {
-				// this.$message.warning('请选择要付款的条目')
-				// } else {
-				// let sum = 0
-				// let count = 0
-				// for (let i = 0; i < this.modification.length; i++) {
-				// 	sum += this.modification[i].amountIngPayable
-				// 	count += this.modification[i].amountEdPayable
-				// }
-				// this.payments.amountNotPayable = (sum - count).toFixed(2)
 				this.paymentForm = true
-				// }
 			},
 		},
 	}
@@ -181,4 +318,21 @@
   /deep/.ws-info-table .el-form-item .el-form-item__content {
     border: none;
   }
+  .span_css span{
+    margin-left: 20px;
+    font-size: 16px;
+  }
+  .pageNumber{
+    text-align: center;
+  }
+  .text_css {
+    color: #5878e8;
+  }
+   /deep/.el-table .cell{
+    text-align: center;
+  }
+  .upLoad{
+    width: 50%;
+    margin: 0 auto;
+  }
 </style>

+ 552 - 21
src/views/tradeServicesManagement/reviewWarehouseReceipt.vue

@@ -1,29 +1,560 @@
 //审核仓单
 <template>
-	<div>
-		
-	</div>
+  <div class="center">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left titleup">审核仓单</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <el-form
+      ref="deptBudgetList"
+      :rules="rules"
+      :model="deptBudgetList"
+      class="content2"
+      :inline="true"
+      label-position="right"
+      label-width="120px"
+    >
+      <!-- <ws-info-table class="el-table"> -->
+      <div class="title1">申请信息</div>
+      <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
+        <el-input
+          v-model="deptBudgetList.billNo"
+          placeholder="请输入任务编号"
+          maxlength="20"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="名头" span="1" prop="taskNo" class="renown">
+        <el-select
+          v-model="deptBudgetList.renown"
+          placeholder="请选择名头"
+          disabled
+        >
+          <el-option
+            :label="item.compName"
+            :value="item.compId"
+            v-for="(item, index) in compOptionList"
+            :Key="index"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="仓库名称"
+        span="1"
+        prop="warehouseName"
+        class="forlist"
+      >
+        <el-select
+          v-model="deptBudgetList.warehouseName"
+          placeholder="请选择仓库"
+          disabled
+        >
+          <el-option
+            :label="item.warehouseName"
+            :value="item.id"
+            v-for="(item, index) in warehouseList"
+            :key="index"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
+        <el-select
+          v-model="deptBudgetList.warehouseNo"
+          placeholder="请选择仓位号"
+          disabled
+        >
+          <el-option
+            :label="item.binNumber"
+            :value="item.id"
+            v-for="(item, index) in cwNumberList"
+            :key="index"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="仓库地址"
+        span="1"
+        prop="warehouseAddress"
+        class="forlist"
+      >
+        <el-input
+          disabled
+          v-model="deptBudgetList.warehouseAddress"
+          placeholder="请输入仓库地址"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item prop="goodsName" label="货名" span="1">
+        <el-select
+          v-model="deptBudgetList.goodsName"
+          placeholder="请选择货名"
+          disabled
+        >
+          <el-option
+            v-for="(item, index) in goodsList"
+            :key="index"
+            :label="item.goodsName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="grade" label="品级" span="1">
+        <el-select
+          v-model="deptBudgetList.grade"
+          placeholder="请选择品级"
+          disabled
+        >
+          <el-option label="一等" value="一等"></el-option>
+          <el-option label="二等" value="二等"></el-option>
+          <el-option label="三等" value="三等"></el-option>
+          <el-option label="等外" value="等外"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        label="现有储量"
+        span="1"
+        prop="nowWeight"
+        class="forlist"
+        disabled
+      >
+        <el-input
+          disabled
+          v-model="deptBudgetList.nowWeight"
+          placeholder="请输入现有储量"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="可用储量(吨)"
+        span="1"
+        prop="useWeight"
+        class="forlist"
+      >
+        <el-input
+          disabled
+          v-model="deptBudgetList.useWeight"
+          placeholder="请输入可用储量"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="本单重量(吨)"
+        span="1"
+        prop="weight"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.weight"
+          placeholder="输入本次仓单申请所需的重量"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="单价(元/吨)"
+        span="1"
+        prop="unitPrice"
+        class="forlist"
+        disabled
+      >
+        <el-input
+          v-model="deptBudgetList.unitPrice"
+          placeholder="输入粮食单价"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="总价值(元)"
+        span="1"
+        prop="totalValue"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.totalValue"
+          disabled
+          placeholder="自动计算,不可编辑"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="申请比例(%)"
+        span="1"
+        prop="applicationProportion"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.applicationProportion"
+          placeholder="输入申请比例"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="申请金额(元)"
+        span="1"
+        prop="interest"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.interest"
+          placeholder="输入申请金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <div>附件</div>
+      <ws-upload
+        ref="upload"
+        :comp-id="compId"
+        :appendix-ids="deptBudgetList.appendix"
+        :size-limit="size"
+        @onChange="onChange"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        :editable="false"
+      />
+      <div>外审部门</div>
+      <el-form-item prop="bank" label="银行" span="1">
+        <el-select
+          v-model="deptBudgetList.bank"
+          placeholder="请选择银行"
+          disabled
+        >
+          <el-option label="区域一" value="shanghai"></el-option>
+          <el-option label="区域二" value="beijing"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
+        <el-input
+          v-model="deptBudgetList.three"
+          placeholder="无"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <div>
+        <el-button @click="outerVisible = true" type="primary">驳回</el-button>
+        <el-button @click="outerVisible1 = true" type="primary">通过</el-button>
+      </div>
+      <div>审核记录</div>
+      <el-table class="wenzi" :data="taskhistories" style="width: 100%">
+        <el-table-column prop="operatorMajorRoleName" label="审核人">
+          <template scope="scope">
+            {{ scope.row.operatorMajorRoleName }}{{ scope.row.operatorName }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="inOutTaskNo" label="审核结果">
+          <template scope="scope">
+            <span v-if="scope.row.approved">通过</span>
+            <span v-if="!scope.row.approved">驳回</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="endTime" label="审核时间"></el-table-column>
+        <el-table-column prop="auditMind" label="审核意见"></el-table-column>
+      </el-table>
+      <!-- </ws-info-table> -->
+    </el-form>
+    <WinseaContentModal
+      v-model="outerVisible"
+      title="驳回原因"
+      @on-cancel="handleClose"
+    >
+      <el-input
+        type="textarea"
+        :rows="2"
+        maxlength="50"
+        placeholder="请输入驳回原因,1~50个字"
+        v-model="rejectText"
+      ></el-input>
+      <div class="dialog-footer">
+        <el-button @click="outerVisible = false">取 消</el-button>
+        <el-button type="primary" @click="rejectSubmit">确定</el-button>
+      </div>
+    </WinseaContentModal>
+    <WinseaContentModal
+      v-model="outerVisible1"
+      title="审核意见"
+      @on-cancel="handleClose"
+    >
+      <el-input
+        type="textarea"
+        :rows="2"
+        maxlength="50"
+        placeholder="请输入审核意见,1~50个字"
+        v-model="adoptText"
+      ></el-input>
+      <div class="dialog-footer">
+        <el-button @click="outerVisible1 = false">取 消</el-button>
+        <el-button type="primary" @click="adoptSubmit">确定</el-button>
+      </div>
+    </WinseaContentModal>
+  </div>
 </template>
 <script>
-	import {
-		getList,
-	
-	} from '@/model/tradeServicesManagement/index'
-	export default {
-		components: {},
-		data() {
-			return {
-				
-			}
-		},
-		activated() {
-			
-		},
-		methods: {
-		
-		},
-	}
+import { getcompList } from '@/model/signIn/index'
+import { woekflowhandle } from '@/model/tasksport/index'
+import {
+  getWarehouseReceiptLook,
+  getWarehouseReceiptExamine,
+} from '@/model/tradeServicesManagement/index'
+import { selectWarehouseSelf } from '@/model/houseSelfCollect/index'
+import WsUpload from '@/components/WsUpload'
+export default {
+  components: {
+    WsUpload,
+  },
+  data() {
+    return {
+      deptBudgetList: {},
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      compOptionList: [],
+      taskhistories: [],
+      warehouseList: [],
+      cwNumberList: [],
+      goodsList: [],
+      rules: {
+        // unitPrice: [
+        //   { required: true, message: '单价不能为空!', trigger: 'blur' },
+        //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+        // ],
+      },
+      outerVisible: false, //驳回
+      outerVisible1: false, //通过
+      rejectText: '', //驳回原因
+      adoptText: '', //审核意见
+    }
+  },
+  activated() {
+    // this.id = this.$route.query.id
+    this.getList(this.$route.query.id)
+    this.getcompList()
+  },
+  methods: {
+    //返回
+    cancel() {
+      this.$router.push({
+        path: 'warehouseReceiptRegulation',
+      })
+    },
+    handleClose() {
+      if (this.outerVisible) {
+        this.outerVisible = false
+      }
+      if (this.outerVisible1) {
+        this.outerVisible1 = false
+      }
+    },
+    //驳回
+    rejectSubmit() {
+      if (!this.rejectText || this.rejectText.length > 50) {
+        this.$message.error('驳回原因不能为空且不能超出50字')
+        return
+      } else {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: false,
+          auditMind: this.rejectText,
+          needReapply: true,
+        })
+          .toPromise()
+          .then((response) => {
+            this.$message.success('驳回成功')
+            this.$router.push({
+          path: 'warehouseReceiptRegulation'
+        })
+          })
+      }
+    },
+    // 提交
+    adoptSubmit() {
+      if (!this.adoptText || this.adoptText.length > 50) {
+        this.$message.error('审核意见不能为空且不能超出50字')
+      } else {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: true,
+          auditMind: this.adoptText,
+          needReapply: false,
+        })
+          .toPromise()
+          .then((response) => {
+            this.$message.success('审核成功')
+            this.$router.push({
+          path: 'warehouseReceiptRegulation'
+        })
+          })
+      }
+    },
+    getcompList() {
+      getcompList()
+        .toPromise()
+        .then((res) => {
+          this.compOptionList = res
+          this.deptBudgetList.renown = res[0].compName
+        })
+        .catch((err) => {})
+    },
+    getWarehouse() {
+      //获取仓库
+      selectWarehouseSelf({
+        compId: this.compId,
+      })
+        .toPromise()
+        .then((response) => {
+          console.log('仓库信息', response)
+          this.warehouseList = response
+          this.deptBudgetList.warehouseName = response[0].warehouseName
+          this.cwNumberList = response[0].positionInfos
+          this.deptBudgetList.warehouseNo =
+            response[0].positionInfos.length != 0
+              ? response[0].positionInfos[0].binNumber
+              : ''
+          this.deptBudgetList.baseId =
+            response[0].positionInfos.length != 0
+              ? response[0].positionInfos[0].baseId
+              : ''
+          this.deptBudgetList.warehouseAddress =
+            response[0].warehousePrivate +
+            response[0].warehouseCity +
+            response[0].warehouseArea +
+            response[0].detailedAddress
+          this.goodsList = response[0].goodsNameInfos
+          this.deptBudgetList.nowWeight =
+            response[0].goodsNameInfos.length != 0
+              ? response[0].goodsNameInfos[0].storage
+              : ''
+          // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
+          this.deptBudgetList.useWeight = '10'
+          this.deptBudgetList.goodsName =
+            response[0].goodsNameInfos.length != 0
+              ? response[0].goodsNameInfos[0].goodsName
+              : ''
+          this.deptBudgetList.warehouseId = response[0].id
+          if (!this.deptBudgetList.renown)
+            this.deptBudgetList.renown = this.compOptionList[0].compName
+          if (!this.deptBudgetList.renownId)
+            this.deptBudgetList.renownId = this.compOptionList[0].compId
+          this.deptBudgetList.bankId = 'bankId'
+          this.deptBudgetList.threeId = 'threeId'
+          this.deptBudgetList.warehouseNoId =
+            response[0].positionInfos.length != 0
+              ? response[0].positionInfos[0].id
+              : ''
+          this.deptBudgetList.goodsNameKey =
+            response[0].goodsNameInfos.length != 0
+              ? response[0].goodsNameInfos[0].goodsNameKey
+              : ''
+        })
+    },
+    getList(id) {
+      //审核记录
+      getWarehouseReceiptExamine({
+        businessKey: id,
+        workflowId: this.$route.query.workflowId,
+      })
+        .toPromise()
+        .then((response) => {
+          this.taskhistories = response
+        })
+      getWarehouseReceiptLook({ id: id })
+        .toPromise()
+        .then((response) => {
+          console.log('mdl;sgjkdl', response)
+          this.deptBudgetList = response
+        })
+        .catch((req) => {
+          // this.tableData = response.records
+          this.$message.success('提交失败')
+        })
+    },
+
+    // 附件改变事件
+    onChange() {
+      this.$refs.upload
+        .handleSaveBill()
+        .then(async (response) => {
+          this.deptBudgetList.appendix = response
+          console.log('dfvbgf', this.deptBudgetList.appendix)
+        })
+        .catch((res) => {
+          EventBus.$emit('error', (JSON.parse(res) || {}).message)
+          this.$refs.upload.clearFiles()
+        })
+    },
+  },
+}
 </script>
 <style lang="scss" scoped>
+/deep/.el-form-item__content {
+  width: 400px;
+}
+
+/deep/.el-select {
+  width: 100%;
+}
+
+.el-form {
+  overflow: scroll;
+  height: 94vh;
+}
+
+.bg-left {
+  padding-left: 30px;
+}
+
+.bg-bottom {
+  margin: 15px 0px;
+}
+
+.titleup {
+  position: relative;
+}
+
+.titleup::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+
+.center {
+  background: #f6f7fc;
+}
+
+.content2 {
+  background: white;
+  // padding:0 200px;
+  // text-align: center;
+  padding-left: 40px;
+}
 
+.title1 {
+  font-size: 20px;
+  font-weight: 600;
+  margin: 20px 0;
+}
 </style>

+ 29 - 11
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -83,15 +83,14 @@
         @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
       <div>外审部门</div>
       <el-form-item prop="bank" label="银行">
-        <el-select v-model="deptBudgetList.bank" placeholder="请选择银行">
-          <el-option label="中国银行" value="bank1"></el-option>
-          <el-option label="营口银行" value="bank2"></el-option>
+        <el-select v-model="deptBudgetList.bank" placeholder="请选择银行" @change="bankChange">
+          <el-option :label="item.constName" :value="item.constName" v-for="(item,index) in bankList" :key="index"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="第三方" span="1" prop="three" class="forlist">
-        <el-select v-model="deptBudgetList.three" placeholder="请选择银行">
-          <el-option label="第三方1" value="three1"></el-option>
-          <el-option label="第三方2" value="three2"></el-option>
+        <el-select v-model="deptBudgetList.three" placeholder="无" @change="threeChange">
+          <el-option :label="item1.constName" :value="item1.constName" v-for="(item1,index) in threeList" :key="index"></el-option>
+          <!-- <el-option label="第三方2" value="three2"></el-option> -->
         </el-select>
       </el-form-item>
       <div>
@@ -109,7 +108,8 @@
   } from '@/model/signIn/index'
   import {
     addList,
-    getbillno
+    getbillno,
+    WarehouseReceiptBankList,
   } from '@/model/tradeServicesManagement/index'
   import {
     selectWarehouseSelf,
@@ -141,7 +141,9 @@
           //   { required: true, message: '单价不能为空!', trigger: 'blur' },
           //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
           // ],
-        }
+        },
+        bankList:[],
+        threeList:[],
       }
     },
     activated() {
@@ -155,10 +157,24 @@
         if (this.deptBudgetList.unitPrice && this.deptBudgetList.weight) {
           this.deptBudgetList.totalValue = this.deptBudgetList.unitPrice * this.deptBudgetList.weight
         }
-        console.log(e)
+      },
+      //银行改变
+      bankChange(e){ 
+           this.deptBudgetList.bank = e
+      },
+      //第三方
+      threeChange(e){
+             this.deptBudgetList.three = e
       },
       getList() {
-        this.deptBudgetList.grade = '二等'
+        // this.deptBudgetList.grade = '二等'
+        WarehouseReceiptBankList({constId:"BANK1"}).toPromise().then((response) => {
+          this.bankList = response
+        })
+         WarehouseReceiptBankList({constId:"THREE1"}).toPromise().then((response) => {
+          this.threeList = response
+        })
+
         // 获取业务编号
         getbillno().toPromise().then((response) => {
           this.deptBudgetList.billNo = response
@@ -296,7 +312,7 @@
           let _pointVal1 = _val1.toString().split('.')[1]
           if (_pointVal1 == undefined) _pointVal1 = 0
           if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
-          if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum) {
+          if (Number(_val1) <= Number(max) && Number(_val1) >= Number(min) && _pointVal1 <= saveNum) {
             return false
           }
           return true
@@ -356,6 +372,7 @@
           this.$message.error('第三方不能为空!')
           return false
         }
+        return true
       },
       submit() {
         let isValidate = false
@@ -450,6 +467,7 @@
     padding-left: 40px;
   }
 
+
   .title1 {
     font-size: 20px;
     font-weight: 600;

+ 530 - 191
src/views/tradeServicesManagement/warehouseReceiptEdit.vue

@@ -1,220 +1,559 @@
 // 修改仓单
 <template>
-	<div>
-		 <el-form
+  <div class="center">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left titleup">修改仓单</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <el-form
       ref="deptBudgetList"
-      :rules="mainReportAdd"
+      :rules="rules"
       :model="deptBudgetList"
+      class="content2"
+      :inline="true"
+      label-position="right"
+      label-width="120px"
     >
       <!-- <ws-info-table class="el-table"> -->
-		  <div>申请信息</div>
-        <el-form-item label="业务编号" span="1" prop="taskNo" class="forlist">
-          <el-input
-            v-model="deptBudgetList.taskNo"
-            placeholder="请输入任务编号"
-            maxlength="20"
-            size="small"
-            disabled
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="名头" span="1" prop="taskNo" class="forlist">
-		  	<el-select v-model="deptBudgetList.region" placeholder="请选择名头">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="仓库名称" span="1" prop="taskNo" class="forlist">
-         	<el-select v-model="deptBudgetList.region" placeholder="请选择仓库">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="仓位号" span="1" prop="taskNo" class="forlist">
-         	<el-select v-model="deptBudgetList.region" placeholder="请选择仓位号">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="仓库地址" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            disabled
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入仓库地址"
-            size="small"
-          ></el-input>
-        </el-form-item>
-        <el-form-item prop="goodsName" label="货名" span="1">
-            <el-select v-model="deptBudgetList.region" placeholder="请选择货名">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item prop="goodsName" label="货名" span="1">
-            <el-select v-model="deptBudgetList.region" placeholder="请选择货名">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item prop="goodsName" label="品级" span="1">
-            <el-select v-model="deptBudgetList.region" placeholder="请选择品级">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="现有储量" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            disabled
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入现有储量"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="可用储量(吨)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            disabled
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入可用储量"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="本单重量(吨)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入本次仓单申请所需的重量"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="单价(元/吨)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入粮食单价"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="总价值(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="自动计算,不可编辑"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="申请比例(%)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入申请比例"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="申请金额(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入申请金额"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<div>附件</div>
-		<ws-upload
+      <div class="title1">申请信息</div>
+      <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
+        <el-input
+          v-model="deptBudgetList.billNo"
+          placeholder="请输入任务编号"
+          maxlength="20"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="名头" span="1" prop="taskNo" class="renown">
+        <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" @change="changeCompOptionList">
+          <el-option :label="item.compName" :value="item.compId" v-for="(item,index) in compOptionList" :Key="index"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="仓库名称" span="1" prop="warehouseName" class="forlist">
+        <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" @change="changeWarehouse">
+          <el-option :label="item.warehouseName" :value="item.id" v-for="(item,index) in warehouseList" :key="index"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
+        <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号"  @change="changeWarehouseNo">
+           <el-option :label="item.binNumber" :value="item.id" v-for="(item,index) in cwNumberList" :key='index'></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="仓库地址" span="1" prop="warehouseAddress" class="forlist">
+        <el-input
+          disabled
+          v-model="deptBudgetList.warehouseAddress"
+          placeholder="请输入仓库地址"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item prop="goodsName" label="货名" span="1">
+           <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="changeGoodsName">
+          <el-option v-for="(item,index) in goodsList" :key='index' :label="item.goodsName" :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="grade" label="品级" span="1">
+      <el-select v-model="deptBudgetList.grade" placeholder="请选择品级">
+          <el-option label="一等" value="一等"></el-option>
+          <el-option label="二等" value="二等"></el-option>
+          <el-option label="三等" value="三等"></el-option>
+          <el-option label="等外" value="等外"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="现有储量" span="1" prop="nowWeight" class="forlist">
+        <el-input
+          disabled
+          v-model="deptBudgetList.nowWeight"
+          placeholder="请输入现有储量"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="可用储量(吨)"
+        span="1"
+        prop="useWeight"
+        class="forlist"
+      >
+        <el-input
+          disabled
+          v-model="deptBudgetList.useWeight"
+          placeholder="请输入可用储量"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="本单重量(吨)"
+        span="1"
+        prop="weight"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.weight"
+          placeholder="输入本次仓单申请所需的重量"
+          size="small"
+          @input='inputChange'
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="单价(元/吨)"
+        span="1"
+        prop="unitPrice"
+        class="forlist"
+        @input='inputChange'
+      >
+        <el-input
+          v-model="deptBudgetList.unitPrice"
+          placeholder="输入粮食单价"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="总价值(元)" span="1" prop="totalValue" class="forlist">
+        <el-input
+          v-model="deptBudgetList.totalValue"
+          disabled
+          placeholder="自动计算,不可编辑"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="申请比例(%)"
+        span="1"
+        prop="applicationProportion"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.applicationProportion"
+          placeholder="输入申请比例"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="申请金额(元)"
+        span="1"
+        prop="interest"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.interest"
+          placeholder="输入申请金额"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <div>附件</div>
+      <ws-upload
         ref="upload"
         :comp-id="compId"
-        :appendix-ids="deptBudgetList.addressUrl"
+        :appendix-ids="deptBudgetList.appendix"
         :size-limit="size"
         @onChange="onChange"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
       />
-	  <div>外审部门</div>
-	  	<el-form-item prop="goodsName" label="银行" span="1">
-            <el-select v-model="deptBudgetList.region" placeholder="请选择银行">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="无"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<div>
-			 <el-button @click='inoutput' type="primary">出入库记录</el-button>
-			  <el-button @click='submit'  type="primary">重提交</el-button>
-		</div>
-		<div>审核记录</div>
-		 <el-table
-        class="wenzi"
-        :data="taskhistories"
-        style="width: 100%"
-      >
+      <div class="title1">外审部门</div>
+      <el-form-item prop="bank" label="银行" span="1">
+        <el-select v-model="deptBudgetList.bank" placeholder="请选择银行" @change="bankChange">
+         <el-option :label="item.constName" :value="item.constName" v-for="(item,index) in bankList" :key="index"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="第三方" span="1" prop="taskNo" class="forlist" >
+          <el-select v-model="deptBudgetList.three" placeholder="无" @change="threeChange">
+        <el-option :label="item1.constName" :value="item1.constName" v-for="(item1,index) in threeList" :key="index"></el-option>
+        </el-select>
+      </el-form-item>
+      <div>
+        <el-button @click="inoutput" type="primary">出入库记录</el-button>
+        <el-button @click="submit" type="primary">重新提交</el-button>
+      </div>
+      <div class="title1">审核记录</div>
+      <el-table class="wenzi" :data="taskhistories" style="width: 100%">
         <el-table-column prop="operatorMajorRoleName" label="审核人">
           <template scope="scope">
-            {{scope.row.operatorMajorRoleName}}{{scope.row.operatorName}}
-            </template>
+            {{ scope.row.operatorMajorRoleName }}{{ scope.row.operatorName }}
+          </template>
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="审核结果">
           <template scope="scope">
-            <span v-if='scope.row.approved'>通过</span>
-            <span v-if='!scope.row.approved'>驳回</span>
+            <span v-if="scope.row.approved">通过</span>
+            <span v-if="!scope.row.approved">驳回</span>
           </template>
         </el-table-column>
         <el-table-column prop="endTime" label="审核时间"></el-table-column>
         <el-table-column prop="auditMind" label="审核意见"></el-table-column>
-     </el-table>
+      </el-table>
       <!-- </ws-info-table> -->
-		 </el-form>
-	</div>
+    </el-form>
+  </div>
 </template>
 <script>
-	import {
-		getwarehousewarrantList,
-    editList
-	} from '@/model/tradeServicesManagement/index'
-	import WsUpload from '@/components/WsUpload'
-	export default {
-		components: {
-			WsUpload,
-		},
-		data() {
-			return {
-				deptBudgetList:{},
-				size: 10,
-				compId: sessionStorage.getItem('ws-pf_compId'),
-			}
-		},
-		activated() {
-			this.getList()
-		},
-		methods: {
-		inoutput(){
-			this.$router.push({ name: 'inOutRecord' })
-		},
-    getList(){
-      getwarehousewarrantList.toPromise().then((response) => {
-        this.deptBudgetList=response
-      })
+import {
+    getcompList,
+  } from '@/model/signIn/index'
+import {
+  getwarehousewarrantList,
+  getWarehouseReceiptLook,
+  editList,
+  WarehouseReceiptUpdate,
+  getWarehouseReceiptExamine,//审核记录
+  WarehouseReceiptBankList ,
+} from '@/model/tradeServicesManagement/index'
+import {
+    selectWarehouseSelf,
+  } from '@/model/houseSelfCollect/index'
+import WsUpload from '@/components/WsUpload'
+export default {
+  components: {
+    WsUpload,
+  },
+  data() {
+    return {
+      deptBudgetList: {},
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+         rules: {
+          // unitPrice: [
+          //   { required: true, message: '单价不能为空!', trigger: 'blur' },
+          //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+          // ],
+        },
+      compOptionList:[],
+      taskhistories:[],
+        warehouseList: [],
+        cwNumberList:[],
+        goodsList:[],
+        bankList:[],
+        threeList:[],
+    }
+  },
+  activated() {
+    this.getList()
+    this.getcompList()
+    this.getWarehouse()
+  },
+  methods: {
+      inputChange(e) {
+        if (this.deptBudgetList.unitPrice && this.deptBudgetList.weight) {
+          this.deptBudgetList.totalValue = this.deptBudgetList.unitPrice * this.deptBudgetList.weight
+        }
+      },
+      //银行改变
+      bankChange(e){ 
+           this.deptBudgetList.bank = e
+      },
+      //第三方
+      threeChange(e){
+             this.deptBudgetList.three = e
+      },
+    //返回
+    cancel() {
+      this.$router.push({
+          path: 'warehouseReceiptRegulation'
+        })
+    },
+    //出入库记录
+    inoutput() {
+      this.$router.push({ name: 'inOutRecord' })
+    },
+    //名头改变
+    changeCompOptionList(val){
+       let _data = this.compOptionList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].compId == val) {
+            this.deptBudgetList.renownId = _data[i].compId
+            this.deptBudgetList.renown = _data[i].compName
+            this.compId = val
+            this.getWarehouse()
+          }
+        }
+    },
+      //货名切换
+      changeGoodsName(val) {
+        console.log(val)
+        let _data = this.goodsList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].id == val) {
+            this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
+            this.deptBudgetList.goodsName = _data[i].goodsName
+          }
+        }
+      },
+    //仓库切换
+    changeWarehouse(val) {
+        console.log('切换后仓库数据', val)
+        let _data = this.warehouseList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].id == val) {
+            this.deptBudgetList.warehouseName = _data[i].warehouseName
+            this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
+            this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber :
+              ''
+            this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity +
+              _data[i].warehouseArea + _data[i].detailedAddress
+            this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
+            this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage :
+              ''
+            // this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useWeight:''
+            this.deptBudgetList.useWeight = '10'
+            this.deptBudgetList.goodsName = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsName :
+              ''
+            this.deptBudgetList.warehouseId = _data[i].id
+            this.deptBudgetList.goodsNameKey = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0]
+              .goodsNameKey : ''
+              this.deptBudgetList.warehouseNoId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
+                .id : ''
+                this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
+                  .baseId : ''
+          }
+        }
+      },
+       //仓位号切换
+      changeWarehouseNo(val) {
+        let _data = this.cwNumberList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].id == val) {
+            this.deptBudgetList.warehouseNoId = _data[i].id
+            this.deptBudgetList.warehouseNo = _data[i].binNumber
+            this.deptBudgetList.baseId = _data.baseId
+          }
+        }
+      },
+    getcompList(){
+       getcompList()
+          .toPromise()
+          .then((res) => {
+            this.compOptionList = res
+            this.deptBudgetList.renown = res[0].compName
+          })
+          .catch((err) => {})
+    },
+    getWarehouse(){
+      //获取仓库
+        selectWarehouseSelf({
+            compId: this.compId
+          }).toPromise()
+          .then(response => {
+            console.log('仓库信息', response)
+            this.warehouseList = response
+            this.deptBudgetList.warehouseName = response[0].warehouseName
+            this.cwNumberList = response[0].positionInfos
+            this.deptBudgetList.warehouseNo = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
+              .binNumber : ''
+            this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
+              .baseId : ''
+            this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity +
+              response[0].warehouseArea + response[0].detailedAddress
+            this.goodsList = response[0].goodsNameInfos
+            this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
+              .storage : ''
+            // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
+            this.deptBudgetList.useWeight = '10'
+            this.deptBudgetList.goodsName = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
+              .goodsName : ''
+            this.deptBudgetList.warehouseId = response[0].id
+            if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
+            if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
+            this.deptBudgetList.bankId = 'bankId'
+            this.deptBudgetList.threeId = 'threeId'
+            this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
+              .id : ''
+            this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
+              .goodsNameKey : ''
+          })
+    },
+    getList() {
+      WarehouseReceiptBankList({constId:"BANK1"}).toPromise().then((response) => {
+          this.bankList = response
+        })
+         WarehouseReceiptBankList({constId:"THREE1"}).toPromise().then((response) => {
+          this.threeList = response
+        })
+      //审核记录
+      getWarehouseReceiptExamine({businessKey: this.$route.query.id,workflowId: this.$route.query.workflowId}).toPromise()
+          .then((response) => {
+            this.taskhistories=response
+          })
+       getWarehouseReceiptLook({id:this.$route.query.id,workflowId:this.$route.query.workflowId})
+        .toPromise()
+        .then((response) => {
+         this.deptBudgetList = response
+        })
+        .catch((req) => {
+          // this.tableData = response.records
+          // this.$message.success('提交失败')
+        })
     },
-		submit(){
-      editList().toPromise().then((response) => {
-						// this.tableData = response.records
-						 this.$message.success('提交成功')
-					}).catch((req) => {
-						// this.tableData = response.records
-						 this.$message.success('提交失败')
-					})
-		},
-		onChange() {
-			this.$refs.upload
-				.handleSaveBill()
-				.then(async response => {
-				this.deptBudgetList.addressUrl = response
-				})
-				.catch(res => {
-				EventBus.$emit('error', (JSON.parse(res) || {}).message)
-				this.$refs.upload.clearFiles()
-				})
-			},
-		},
-	}
+    submit() {
+      let isValidate = false
+        isValidate = this.validate()
+        if(isValidate){
+           WarehouseReceiptUpdate(this.deptBudgetList)
+        .toPromise()
+        .then((response) => {
+           this.$message.success('提交成功')
+             this.$router.push({
+                path: 'warehouseReceiptRegulation'
+              })
+        //  this.deptBudgetList = response
+        })
+        .catch((req) => {
+          // this.tableData = response.records
+          this.$message.success('提交失败')
+        })
+        }
+    },
+    // 附件改变事件
+    onChange() {
+      this.$refs.upload
+        .handleSaveBill()
+        .then(async (response) => {
+          this.deptBudgetList.appendix = response
+          console.log( "dfvbgf",this.deptBudgetList.appendix)
+        })
+        .catch((res) => {
+          EventBus.$emit('error', (JSON.parse(res) || {}).message)
+          this.$refs.upload.clearFiles()
+        })
+    },
+    validate() {
+        function _Validate(min, max, saveNum, type, inputVal) {
+          let _val1 = inputVal
+          let _pointVal1 = _val1.toString().split('.')[1]
+          if (_pointVal1 == undefined) _pointVal1 = 0
+          if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
+          if (Number(_val1) <= Number(max) && Number(_val1) >= Number(min) && _pointVal1 <= saveNum) {
+            return false
+          }
+          return true
+        }
+        if (!this.deptBudgetList.weight || _Validate(0, this.deptBudgetList.useWeight, 3, '', this.deptBudgetList
+            .weight)) {
+          if (!this.deptBudgetList.weight) {
+            this.$message.error('本单重量不能为空!');
+          } else {
+            this.$message.error('本单重量输入错误且本单重量不可超过可用重量!');
+          }
+          return false
+        }
+        if (!this.deptBudgetList.unitPrice || _Validate(1, 20000, 3, '', this.deptBudgetList
+            .unitPrice)) {
+          if (!this.deptBudgetList.unitPrice) {
+            this.$message.error('单价不能为空!');
+          } else {
+            this.$message.error('单价输入错误,1-20000之间,最多保留3位小数!');
+          }
+          return false
+        }
+        if (!this.deptBudgetList.totalValue) {
+          this.$message.error('总价值不能为空!');
+          return false
+        }
+        if (!this.deptBudgetList.applicationProportion || _Validate(10, 100, 2, '', this.deptBudgetList
+            .applicationProportion)) {
+          if (!this.deptBudgetList.applicationProportion) {
+            this.$message.error('申请比例不能为空!');
+          } else {
+            this.$message.error('申请比例输入错误,10-100之间,最多保留2位小数!');
+          }
+          return false
+        }
+        if (!this.deptBudgetList.interest || _Validate(1, 1000000000, 2, '', this.deptBudgetList
+            .interest)) {
+          if (!this.deptBudgetList.interest) {
+            this.$message.error('申请金额不能为空!');
+          } else {
+            this.$message.error('申请金额输入错误,1-10亿之间,最多保留2位小数!');
+          }
+          return false
+        }
+        if (!this.deptBudgetList.appendix) {
+          this.$message.error('附件不能为空!');
+          return false
+        } else if (this.deptBudgetList.appendix.split(',').length > 30) {
+          this.$message.error('附件数量需小于30!');
+          return false
+        }
+        if (!this.deptBudgetList.bank) {
+          this.$message.error('银行不能为空!');
+          return false
+        }
+        if (!this.deptBudgetList.three) {
+          this.$message.error('第三方不能为空!')
+          return false
+        }
+        return true
+      },
+  },
+}
 </script>
 <style lang="scss" scoped>
+/deep/.el-form-item__content {
+    width: 400px;
+  }
+
+  /deep/.el-select {
+    width: 100%;
+  }
+
+  .el-form {
+    overflow: scroll;
+    height: 94vh;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .titleup {
+    position: relative;
+  }
+
+  .titleup::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .center {
+    background: #f6f7fc;
+  }
+
+  .content2 {
+    background: white;
+    // padding:0 200px;
+    // text-align: center;
+    padding-left: 40px;
+  }
+
+  .title1 {
+    font-size: 20px;
+    font-weight: 600;
+    margin: 20px 0;
+  }
 
 </style>

+ 456 - 179
src/views/tradeServicesManagement/warehouseReceiptLook.vue

@@ -1,208 +1,485 @@
 // 查看仓单
 <template>
-	<div>
-		 <el-form
+  <div class="center">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left titleup">修改仓单</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <el-form
       ref="deptBudgetList"
-      :rules="mainReportAdd"
+      :rules="rules"
       :model="deptBudgetList"
+      class="content2"
+      :inline="true"
+      label-position="right"
+      label-width="120px"
     >
       <!-- <ws-info-table class="el-table"> -->
-		  <div>申请信息</div>
-        <el-form-item label="业务编号" span="1" prop="taskNo" class="forlist">
-          <el-input
-            v-model="deptBudgetList.taskNo"
-            placeholder="请输入任务编号"
-            maxlength="20"
-            size="small"
-            disabled
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="名头" span="1" prop="taskNo" class="forlist">
-		  	<el-select v-model="deptBudgetList.region" placeholder="请选择名头">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="仓库名称" span="1" prop="taskNo" class="forlist">
-         	<el-select v-model="deptBudgetList.region" placeholder="请选择仓库">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="仓位号" span="1" prop="taskNo" class="forlist">
-         	<el-select v-model="deptBudgetList.region" placeholder="请选择仓位号">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="仓库地址" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            disabled
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入仓库地址"
-            size="small"
-          ></el-input>
-        </el-form-item>
-        <el-form-item prop="goodsName" label="货名" span="1">
-            <el-select v-model="deptBudgetList.region" placeholder="请选择货名">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item prop="goodsName" label="货名" span="1">
-            <el-select v-model="deptBudgetList.region" placeholder="请选择货名">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item prop="goodsName" label="品级" span="1">
-            <el-select v-model="deptBudgetList.region" placeholder="请选择品级">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="现有储量" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            disabled
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入现有储量"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="可用储量(吨)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            disabled
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入可用储量"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="本单重量(吨)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入本次仓单申请所需的重量"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="单价(元/吨)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入粮食单价"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="总价值(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="自动计算,不可编辑"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="申请比例(%)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入申请比例"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<el-form-item label="申请金额(元)" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="输入申请金额"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<div>附件</div>
-		<ws-upload
+      <div class="title1">申请信息</div>
+      <el-form-item label="业务编号" span="1" prop="billNo" class="forlist">
+        <el-input
+          v-model="deptBudgetList.billNo"
+          placeholder="请输入任务编号"
+          maxlength="20"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="名头" span="1" prop="taskNo" class="renown">
+        <el-select v-model="deptBudgetList.renown" placeholder="请选择名头"  disabled>
+          <el-option :label="item.compName" :value="item.compId" v-for="(item,index) in compOptionList" :Key="index"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="仓库名称" span="1" prop="warehouseName" class="forlist">
+        <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" @change="changeWarehouse" disabled>
+          <el-option :label="item.warehouseName" :value="item.id" v-for="(item,index) in warehouseList" :key="index"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="仓位号" span="1" prop="warehouseNo" class="forlist">
+        <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号"  @change="changeWarehouseNo" disabled>
+           <el-option :label="item.binNumber" :value="item.id" v-for="(item,index) in cwNumberList" :key='index'></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="仓库地址" span="1" prop="warehouseAddress" class="forlist">
+        <el-input
+          disabled
+          v-model="deptBudgetList.warehouseAddress"
+          placeholder="请输入仓库地址"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item prop="goodsName" label="货名" span="1">
+        <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" disabled>
+          <el-option v-for="(item,index) in goodsList" :key='index' :label="item.goodsName" :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="grade" label="品级" span="1">
+      <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled>
+          <el-option label="一等" value="一等"></el-option>
+          <el-option label="二等" value="二等"></el-option>
+          <el-option label="三等" value="三等"></el-option>
+          <el-option label="等外" value="等外"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="现有储量" span="1" prop="nowWeight" class="forlist" disabled>
+        <el-input
+          disabled
+          v-model="deptBudgetList.nowWeight"
+          placeholder="请输入现有储量"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="可用储量(吨)"
+        span="1"
+        prop="useWeight"
+        class="forlist"
+      >
+        <el-input
+          disabled
+          v-model="deptBudgetList.useWeight"
+          placeholder="请输入可用储量"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="本单重量(吨)"
+        span="1"
+        prop="weight"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.weight"
+          placeholder="输入本次仓单申请所需的重量"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="单价(元/吨)"
+        span="1"
+        prop="unitPrice"
+        class="forlist"
+        disabled
+      >
+        <el-input
+          v-model="deptBudgetList.unitPrice"
+          placeholder="输入粮食单价"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="总价值(元)" span="1" prop="totalValue" class="forlist">
+        <el-input
+          v-model="deptBudgetList.totalValue"
+          disabled
+          placeholder="自动计算,不可编辑"
+          size="small"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="申请比例(%)"
+        span="1"
+        prop="applicationProportion"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.applicationProportion"
+          placeholder="输入申请比例"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        label="申请金额(元)"
+        span="1"
+        prop="interest"
+        class="forlist"
+      >
+        <el-input
+          v-model="deptBudgetList.interest"
+          placeholder="输入申请金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <div>附件</div>
+      <ws-upload
         ref="upload"
         :comp-id="compId"
-        :appendix-ids="deptBudgetList.addressUrl"
+        :appendix-ids="deptBudgetList.appendix"
         :size-limit="size"
         @onChange="onChange"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        :editable="false"
       />
-	  <div>外审部门</div>
-	  	<el-form-item prop="goodsName" label="银行" span="1">
-            <el-select v-model="deptBudgetList.region" placeholder="请选择银行">
-				<el-option label="区域一" value="shanghai"></el-option>
-				<el-option label="区域二" value="beijing"></el-option>
-			</el-select>
-        </el-form-item>
-		<el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
-         	<el-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="无"
-            size="small"
-          ></el-input>
-        </el-form-item>
-		<div>
-			 <el-button @click='inoutput' type="primary">出入库记录</el-button>
-			  <el-button @click='submit'  type="primary">提交审核</el-button>
-		</div>
-		<div>审核记录</div>
-		 <el-table
-        class="wenzi"
-        :data="taskhistories"
-        style="width: 100%"
-      >
+      <div>
+      <div class="title1">发放信息</div>
+       <el-form-item prop="contractNo" label="合同编号" span="1">
+        <el-input
+          v-model="deptBudgetList.contractNo"
+          placeholder="请输入合同编号"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="发放金额(元)" span="1" prop="taskNo">
+        <el-input
+          v-model="deptBudgetList.paymentAmount"
+          placeholder="请输入发放金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item :label="deptBudgetList.modifyExpense1" span="1" prop="taskNo" v-if="deptBudgetList.applicationAmountFlag == '显示中'">
+        <el-input
+          v-model="deptBudgetList.applicationAmount"
+          placeholder="请输入发放金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item :label="deptBudgetList.modifyExpense2" span="1" prop="taskNo" v-if="deptBudgetList.supervisionFeeFlag == '显示中'">
+        <el-input
+          v-model="deptBudgetList.supervisionFee"
+          placeholder="请输入发放金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+     <el-form-item :label="deptBudgetList.modifyExpense3" span="1" prop="taskNo" v-if="deptBudgetList.insurancePremiumFlag == '显示中'">
+        <el-input
+          v-model="deptBudgetList.insurancePremium"
+          placeholder="请输入发放金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item :label="deptBudgetList.modifyExpense4" span="1" prop="taskNo" v-if="deptBudgetList.otherFeeFlag == '显示中'">
+        <el-input
+          v-model="deptBudgetList.otherFee"
+          placeholder="请输入发放金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="合计应还(元)" span="1" prop="amountDue">
+        <el-input
+          v-model="deptBudgetList.amountDue"
+          placeholder="请输入发放金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="已还(元)" span="1" prop="amountRepaid">
+        <el-input
+          v-model="deptBudgetList.amountRepaid"
+          placeholder="请输入发放金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="未还(元)" span="1" prop="taskNo">
+        <el-input
+          v-model="deptBudgetList.amountToRepaid"
+          placeholder="请输入发放金额"
+          size="small"
+          disabled
+        ></el-input>
+      </el-form-item>
+      </div>
+      <div class="title1">审核记录</div>
+      <el-table class="wenzi" :data="taskhistories" style="width: 100%">
         <el-table-column prop="operatorMajorRoleName" label="审核人">
           <template scope="scope">
-            {{scope.row.operatorMajorRoleName}}{{scope.row.operatorName}}
-            </template>
+            {{ scope.row.operatorMajorRoleName }}{{ scope.row.operatorName }}
+          </template>
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="审核结果">
           <template scope="scope">
-            <span v-if='scope.row.approved'>通过</span>
-            <span v-if='!scope.row.approved'>驳回</span>
+            <span v-if="scope.row.approved">通过</span>
+            <span v-if="!scope.row.approved">驳回</span>
           </template>
         </el-table-column>
         <el-table-column prop="endTime" label="审核时间"></el-table-column>
         <el-table-column prop="auditMind" label="审核意见"></el-table-column>
-     </el-table>
+      </el-table>
       <!-- </ws-info-table> -->
-		 </el-form>
-	</div>
+    </el-form>
+  </div>
 </template>
 <script>
-	import {
-		getList,
-	} from '@/model/tradeServicesManagement/index'
-	import WsUpload from '@/components/WsUpload'
-	export default {
-		components: {
-			WsUpload,
-		},
-		data() {
-			return {
-				deptBudgetList:{},
-				size: 10,
-				compId: sessionStorage.getItem('ws-pf_compId'),
-			}
-		},
-		activated() {
-			
-		},
-		methods: {
-		inoutput(){
-			this.$router.push({ name: 'inOutRecord' })
-		},
-		submit(){
+import {
+    getcompList,
+  } from '@/model/signIn/index'
+import {
+  getWarehouseReceiptLook,
+  getWarehouseReceiptExamine
+} from '@/model/tradeServicesManagement/index'
+import {
+    selectWarehouseSelf,
+  } from '@/model/houseSelfCollect/index'
+import WsUpload from '@/components/WsUpload'
+export default {
+  components: {
+    WsUpload,
+  },
+  data() {
+    return {
+      deptBudgetList: {},
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+         rules: {
+          // unitPrice: [
+          //   { required: true, message: '单价不能为空!', trigger: 'blur' },
+          //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+          // ],
+        },
+      compOptionList:[],
+      taskhistories:[],
+        warehouseList: [],
+        cwNumberList:[],
+        goodsList:[],
+    }
+  },
+  activated() {
+    this.getList(this.$route.query.id)
+    this.getcompList()
+  },
+  methods: {
+    //返回
+    cancel() {
+      this.$router.push({
+          path: 'warehouseReceiptRegulation'
+        })
+    },
+    //仓库切换
+    changeWarehouse(val) {
+        console.log('切换后仓库数据', val)
+        let _data = this.warehouseList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].id == val) {
+            this.deptBudgetList.warehouseName = _data[i].warehouseName
+            this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
+            this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber :
+              ''
+            this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity +
+              _data[i].warehouseArea + _data[i].detailedAddress
+            this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
+            this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage :
+              ''
+            // this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useWeight:''
+            this.deptBudgetList.useWeight = '10'
+            this.deptBudgetList.goodsName = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsName :
+              ''
+            this.deptBudgetList.warehouseId = _data[i].id
+            this.deptBudgetList.goodsNameKey = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0]
+              .goodsNameKey : ''
+              this.deptBudgetList.warehouseNoId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
+                .id : ''
+                this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
+                  .baseId : ''
+          }
+        }
+      },
+       //仓位号切换
+      changeWarehouseNo(val) {
+        let _data = this.cwNumberList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].id == val) {
+            this.deptBudgetList.warehouseNoId = _data[i].id
+            this.deptBudgetList.warehouseNo = _data[i].binNumber
+            this.deptBudgetList.baseId = _data.baseId
+          }
+        }
+      },
+    getcompList(){
+       getcompList()
+          .toPromise()
+          .then((res) => {
+            this.compOptionList = res
+            this.deptBudgetList.renown = res[0].compName
+          })
+          .catch((err) => {})
+    },
+    getWarehouse(){
+      //获取仓库
+        selectWarehouseSelf({
+            compId: this.compId
+          }).toPromise()
+          .then(response => {
+            console.log('仓库信息', response)
+            this.warehouseList = response
+            this.deptBudgetList.warehouseName = response[0].warehouseName
+            this.cwNumberList = response[0].positionInfos
+            this.deptBudgetList.warehouseNo = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
+              .binNumber : ''
+            this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
+              .baseId : ''
+            this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity +
+              response[0].warehouseArea + response[0].detailedAddress
+            this.goodsList = response[0].goodsNameInfos
+            this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
+              .storage : ''
+            // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
+            this.deptBudgetList.useWeight = '10'
+            this.deptBudgetList.goodsName = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
+              .goodsName : ''
+            this.deptBudgetList.warehouseId = response[0].id
+            if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
+            if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
+            this.deptBudgetList.bankId = 'bankId'
+            this.deptBudgetList.threeId = 'threeId'
+            this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
+              .id : ''
+            this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
+              .goodsNameKey : ''
+          })
+    },
+    getList(id) {
+        //审核记录
+      getWarehouseReceiptExamine({businessKey: id,workflowId: this.$route.query.workflowId}).toPromise()
+          .then((response) => {
+            this.taskhistories=response
+          })
+       getWarehouseReceiptLook({id:id})
+        .toPromise()
+        .then((response) => {
+         console.log("mdl;sgjkdl",response)
+         this.deptBudgetList = response
+        })
+        .catch((req) => {
+          // this.tableData = response.records
+          // this.$message.success('提交失败')
+        })
+    },
 
-		},
-		onChange() {
-			this.$refs.upload
-				.handleSaveBill()
-				.then(async response => {
-				this.deptBudgetList.addressUrl = response
-				})
-				.catch(res => {
-				EventBus.$emit('error', (JSON.parse(res) || {}).message)
-				this.$refs.upload.clearFiles()
-				})
-			},
-		},
-	}
+    // 附件改变事件
+    onChange() {
+      this.$refs.upload
+        .handleSaveBill()
+        .then(async (response) => {
+          this.deptBudgetList.appendix = response
+          console.log( "dfvbgf",this.deptBudgetList.appendix)
+        })
+        .catch((res) => {
+          EventBus.$emit('error', (JSON.parse(res) || {}).message)
+          this.$refs.upload.clearFiles()
+        })
+    },
+  },
+}
 </script>
 <style lang="scss" scoped>
+/deep/.el-form-item__content {
+    width: 400px;
+  }
+
+  /deep/.el-select {
+    width: 100%;
+  }
+
+  .el-form {
+    overflow: scroll;
+    height: 94vh;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .titleup {
+    position: relative;
+  }
+
+  .titleup::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .center {
+    background: #f6f7fc;
+  }
+
+  .content2 {
+    background: white;
+    // padding:0 200px;
+    // text-align: center;
+    padding-left: 40px;
+  }
+
+  .title1 {
+    font-size: 20px;
+    font-weight: 600;
+    margin: 20px 0;
+  }
 
 </style>

+ 21 - 12
src/views/tradeServicesManagement/warehouseReceiptRegulation.vue

@@ -62,7 +62,7 @@
               审批</el-button>
             <el-button v-hasPermission=" `tradeServicesManagement.tradeService.return`" size="mini" @click="repaymentBtnClick(scope.row, 2)">
               还款</el-button>
-            <el-button v-hasPermission=" `tradeServicesManagement.tradeService.edit`" size="mini" @click="rowEditBtnClick(scope.row, 3)">修改</el-button>
+            <el-button v-hasPermission=" `tradeServicesManagement.tradeService.edit`" size="mini" @click="rowEditBtnClick(scope.row)">修改</el-button>
             <el-button v-hasPermission=" `tradeServicesManagement.tradeService.delete`" size="mini" type="danger" @click="rowDeleteBtnClick(scope.row)">删除</el-button>
           </template>
         </el-table-column>
@@ -149,29 +149,35 @@
         // this.pageSize=10
         // this.getList()
       },
-      lookBtnClick(val1, val2) {
+      lookBtnClick(row, val2) {
         this.$router.push({
-          name: 'warehouseReceiptLook'
+          name: 'warehouseReceiptLook',
+          query:{id:row.id, workflowId: row.workflowId}
         })
       },
-      toExamineBtnClick(val1, val2) {
+      toExamineBtnClick(row, val2) {
         this.$router.push({
-          name: 'reviewWarehouseReceipt'
+          name: 'reviewWarehouseReceipt',
+          query: { id: row.id}
         })
       },
-      approveBtnClick(val1, val2) {
+      approveBtnClick(row, val2) {
         this.$router.push({
-          name: 'approveWarehouseReceipt'
+          name: 'approveWarehouseReceipt',
+            query:{id:row.id,workflowId: row.workflowId}
         })
       },
-      repaymentBtnClick(val1, val2) {
+      repaymentBtnClick(row, val2) {
+        let repayment = JSON.stringify(row)
         this.$router.push({
-          name: 'repayment'
+          name: 'repayment',
+          query:{id:row.id}
         })
       },
-      rowEditBtnClick(val1, val2) {
+      rowEditBtnClick(row) {
         this.$router.push({
-          name: 'warehouseReceiptEdit'
+          name: 'warehouseReceiptEdit',
+          query: { id: row.id, workflowId: row.workflowId }
         })
       },
       rowDeleteBtnClick(val1) {
@@ -207,7 +213,7 @@
             this.warehouseList = response
           })
       },
-      getList(val, type) {debugger
+      getList(val, type) {
         // type=1 地图点击
         if (type == 1) {
           this.isActive = true
@@ -298,4 +304,7 @@
     margin-top: 10px;
     text-align: center;
   }
+  /deep/.el-table .cell{
+    text-align: center;
+  }
 </style>