高敬炎 hace 1 año
padre
commit
a690293a55

+ 5 - 1
src/api/V2/tradeServicesManagement/index.js

@@ -40,4 +40,8 @@ export const API_GET_SETDEFAULT = '/enabledInfo/getEnabledInfo'
 // 贸易服务设置显示
 export const API_SET_SETDEFAULT = '/enabledInfo/api/setEnabledInfo'
 // 开锁关锁
-export const API_OPENLOCK = '/warehousePositionInfo/api/openLock'
+export const API_OPENLOCK = '/warehousePositionInfo/api/openLock'
+// 借款公司
+export const API_COMPANY = '/tradeWarehouseReceiptAppl/selectBorrowingCompany'
+// 在押
+export const API_GET_DETAINEDWEIGHT = '/tradeWarehouseReceiptAppl/detainedWeight'

+ 0 - 1
src/components/WsUpload/index.vue

@@ -240,7 +240,6 @@ export default {
         companyId: this.compId,
         basePath: '', //config.getUploadPath(this.ossKey, this.compId)
       },
-
       clientFag: localStorage.getItem('ws-pf_clientFag'),
     }
   },

+ 4 - 0
src/lang/zh.js

@@ -573,10 +573,14 @@ export default {
     onWaywarehouseReceiptRegulation: '在途贸易服务',
     warehouseReceiptAdd: '创建仓单',
     warehouseReceiptgoods:'创建仓单  /  选择货源',
+    warehouseReceipteditgoods:'修改仓单  /  选择货源',
+    payInterest:'库存贸易服务  /  付息',
     inOutRecord: '出入库记录',
     reviewWarehouseReceipt: '审核仓单',
     approveWarehouseReceipt: '审批仓单',
     repayment: '还款',
+    payInterest:'付息',
+    releaseGrain:'放粮',
     warehouseReceiptEdit: '修改仓单',
     warehouseReceiptLook: '查看仓单',
 

+ 1 - 0
src/layout/index/top/index.vue

@@ -497,6 +497,7 @@
             localStorage.setItem('ws-pf_compName', res1.compName)
             localStorage.setItem('ws-pf_compDomainName', res1.compDomainName)
             localStorage.setItem('ws-pf_compSimpleNameEn', res1.compSimpleNameEn)
+            localStorage.setItem('ws-pf_compFax', res1.compFax)
             localStorage.setItem('ws-pf_organMonetaryValue', res1.organizationMonetaryValue)
            this.getUserInfo({ vesselBankFlag, compName:res1.compName })
           })

+ 8 - 2
src/model/tradeServicesManagement/index.js

@@ -20,7 +20,9 @@ import {
     API_GET_WAREHOUSERECEIPT_BANKLIST,
     API_GET_SETDEFAULT,
     API_SET_SETDEFAULT,
-    API_OPENLOCK
+    API_OPENLOCK,
+    API_COMPANY,
+    API_GET_DETAINEDWEIGHT
 } from '@/api/V2/tradeServicesManagement'
 // 列表
 export const getList = appRx.get(API_GET_TRADESERVICES_LIST, errorCatcher, errorHandle, filter)
@@ -61,4 +63,8 @@ export const getDefault = appRx.get(API_GET_SETDEFAULT, errorCatcher, errorHandl
 // 贸易服务设置显示
 export const setDefault = appRx.post(API_SET_SETDEFAULT, errorCatcher, errorHandle, filter)
 // 开锁关锁
-export const openlock = appRx.post(API_OPENLOCK, errorCatcher, errorHandle, filter)
+export const openlock = appRx.post(API_OPENLOCK, errorCatcher, errorHandle, filter)
+// 借款公司下拉
+export const getCompany = appRx.get(API_COMPANY, errorCatcher, errorHandle, filter)
+// 在押重量
+export const getdetainedweight = appRx.get(API_GET_DETAINEDWEIGHT, errorCatcher, errorHandle, filter)

+ 2 - 0
src/store/modules/user.js

@@ -144,12 +144,14 @@ const actions = {
             compName,
             compDomainName,
             compSimpleNameEn,
+            compFax,
             organizationMonetaryValue
         } = await companyInfo({ compId: compId }).toPromise()
         localStorage.setItem('ws-pf_organMonetaryKey', organizationMonetaryKey)
         localStorage.setItem('ws-pf_compName', compName)
         localStorage.setItem('ws-pf_compDomainName', compDomainName)
         localStorage.setItem('ws-pf_compSimpleNameEn', compSimpleNameEn)
+        localStorage.setItem('ws-pf_compFax', compFax)
         localStorage.setItem('ws-pf_organMonetaryValue', organizationMonetaryValue)
         dispatch('getUserInfo', { vesselBankFlag, compName })
         dispatch('toSetShow', userId)

+ 30 - 0
src/views/tradeServicesManagement/component/routers/route.js

@@ -224,6 +224,36 @@ const tradeServicesManagementRouter = {
       },
       hidden: true
     },
+    //付息
+    {
+      path: 'payInterest',
+      component: () =>
+        import( /* webpackChunkName: "applDetail" */ '@/views/tradeServicesManagement/payInterest'),
+      name: 'payInterest',
+      meta: {
+        title: 'payInterest',
+        shortcutEntrance: 'warehouseReceiptRegulation',
+        module: 'tradeServicesManagement.tradeService.view',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+    //放粮
+    {
+      path: 'releaseGrain',
+      component: () =>
+        import( /* webpackChunkName: "applDetail" */ '@/views/tradeServicesManagement/releaseGrain'),
+      name: 'releaseGrain',
+      meta: {
+        title: 'releaseGrain',
+        shortcutEntrance: 'warehouseReceiptRegulation',
+        module: 'tradeServicesManagement.tradeService.view',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
   ],
 
 };

+ 11 - 4
src/views/tradeServicesManagement/editgoods.vue

@@ -9,7 +9,7 @@
       </el-col>
     </el-row>
     <el-row class="top-row">
-      <el-col :span="18">
+      <el-col style="padding:15px;" :span="18">
         <el-date-picker style="margin: 0 10px 0 0" class="dataClass" value-format='yyyy-MM-dd' v-model="value2"
           @change='datechange' type="daterange" align="right" range-separator="至" start-placeholder="出入库日期起"
           end-placeholder="出入库日期止">
@@ -33,11 +33,12 @@
       </el-col>
     </el-row>
     <el-row class="top-row">
-      <el-col :span="18">
+      <el-col style="padding:15px;" :span="18">
         <el-button @click="bindedChange('')" :type="binded==''?'primary':''" size="small">全部</el-button>
         <el-button @click="bindedChange('0')" :type="binded=='0'?'primary':''" size="small">未绑定</el-button>
         <el-button @click="bindedChange('1')" :type="binded=='1'?'primary':''" size="small">已绑定</el-button>
-        <span>库点:{{deptBudgetList.warehouseName}}</span>
+        <span  style="padding:10px;">库点:{{deptBudgetList.warehouseName}}</span>
+        <span v-if='modification.length>0' style="padding:10px;">合计纯重:{{weight}}</span>
       </el-col>
       <el-col :span="6" class="bg-right">
         <el-button type="primary" @click="bindedselect">确定货源</el-button>
@@ -200,7 +201,8 @@
         printList: [], //批量打印数据
         warehouseAllXiaLa:[],
         billNo:'',
-        db:{}
+        db:{},
+        weight:0
       }
     },
 
@@ -312,6 +314,11 @@
       },
       handleSelectionChange(val) {
         this.modification = val
+        this.weight=0
+        for (let i = 0; i < this.modification.length; i++) {
+          this.weight+=this.modification[i].pureWeight
+        }
+        this.weight= this.weight.toFixed(2)
         console.log("sfasa", this.modification)
       },
       selectInit(row) {

+ 25 - 12
src/views/tradeServicesManagement/goods.vue

@@ -9,7 +9,7 @@
       </el-col>
     </el-row>
     <el-row class="top-row">
-      <el-col :span="18">
+      <el-col style="padding-left:15px;" :span="16">
         <el-date-picker style="margin: 0 10px 0 0" class="dataClass" value-format='yyyy-MM-dd' v-model="value2"
           @change='datechange' type="daterange" align="right" range-separator="至" start-placeholder="出入库日期起"
           end-placeholder="出入库日期止">
@@ -21,10 +21,10 @@
               :value="item.constValue" />
           </el-select>
       </el-col>
-      <el-col :span="6" class="bg-right">
-        <ws-input v-model="searchKeyWord" placeholder="可按货主或合同编号查找" clearable maxlength="250" type="input"
+      <el-col :span="8" class="bg-right">
+        <el-input style="width:80%;" v-model="searchKeyWord" placeholder="可按货源归属(货主)、所属仓单搜索" clearable maxlength="250" type="input"
           class="input">
-        </ws-input>
+        </el-input>
         <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
         <ws-button class="find" type="primary" @click="find()">
           <img width="16" height="16" style="vertical-align: text-top; position: relative; top: 0px"
@@ -33,11 +33,12 @@
       </el-col>
     </el-row>
     <el-row class="top-row">
-      <el-col :span="18">
-        <el-button @click="bindedChange('')" :type="binded==''?'primary':''" size="small">全部</el-button>
+      <el-col style="padding-left:15px;" :span="18">
         <el-button @click="bindedChange('0')" :type="binded=='0'?'primary':''" size="small">未绑定</el-button>
         <el-button @click="bindedChange('1')" :type="binded=='1'?'primary':''" size="small">已绑定</el-button>
-        <span>库点:{{deptBudgetList.warehouseName}}</span>
+        <el-button @click="bindedChange('')" :type="binded==''?'primary':''" size="small">全部</el-button>
+        <span style="padding:10px;">库点:{{deptBudgetList.warehouseName}}</span>
+        <span v-if='modification.length>0' style="padding:10px;">合计纯重:{{weight}}</span>
       </el-col>
       <el-col :span="6" class="bg-right">
         <el-button type="primary" @click="bindedselect">确定货源</el-button>
@@ -147,7 +148,7 @@
         contractNo:{},
         show:false,
         srcList: [],
-        binded:'',
+        binded:'0',
         goodsName:'',
         currectdata:{
           compId: localStorage.getItem('ws-pf_compId'),
@@ -198,7 +199,8 @@
         accessoryTFs: false,
         modification: [],
         printList: [], //批量打印数据
-        warehouseAllXiaLa:[]
+        warehouseAllXiaLa:[],
+        weight:0
       }
     },
 
@@ -207,6 +209,7 @@
       // this.deptBudgetList.positionId = this.$route.query.positionId
       this.deptBudgetList.warehouseName = this.$route.query.warehouseName
       this.remark = this.$route.query.remark
+      this.billNo = this.$route.query.billNo
       // this.binNumber = this.$route.query.binNumber
       this.capacity = this.$route.query.capacity
       this.warehouseType = this.$route.query.warehouseType
@@ -308,12 +311,20 @@
       },
       handleSelectionChange(val) {
         this.modification = val
+        this.weight=0
+        for (let i = 0; i < this.modification.length; i++) {
+          this.weight+=this.modification[i].pureWeight
+        }
+        this.weight= this.weight.toFixed(2)
         console.log("sfasa", this.modification)
       },
       selectInit(row) {
-        if (row.binded ==0||!row.binded) {
+        
+        if (row.warehouseReceipt == this.billNo||!row.warehouseReceipt) {
+          console.log(row.warehouseReceipt != this.billNo,this.billNo,1111111)
           return true
         } else {
+          console.log(row.warehouseReceipt != this.billNo,this.billNo,222222)
           return false
         }
       },
@@ -382,9 +393,11 @@
 				return fmt
 			},
 			datechange(){
+        this.currentPage = 1
 				this.getList()
 			},
 			find() {
+        this.currentPage = 1
       			this.getList()
     		},
 			handleClose() {
@@ -822,7 +835,7 @@
   }
 
   .bg-right {
-    padding-right: 10px;
+    padding-right: 15px;
     text-align: right;
   }
 
@@ -845,7 +858,7 @@
   }
 
   .center {
-    padding: 0 1%;
+    padding: 0 15px;
   }
 
   .el-form-item__label {

+ 370 - 0
src/views/tradeServicesManagement/payInterest.vue

@@ -0,0 +1,370 @@
+// 还款
+<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="cancel"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+			</el-col>
+		</el-row>
+		<div class="span_css">
+			<span>{{repayment.bank}}</span><span>{{repayment.warehouseName}}</span><span>{{repayment.goodsName}}</span><span>{{repayment.weight}}吨</span><span>业务编号:{{repayment.billNo}}</span><span>合计付息:{{payInterest}}</span>
+		</div>
+		<el-row>
+			<el-col :span="12">
+        <div class="span_css">
+				&nbsp;
+			</div>
+      </el-col>
+			<el-col :span="12" class="bg-right">
+				<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">
+          <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="repaymentEdAmount" label="付息金额(元)">
+        </el-table-column>
+		<el-table-column prop="repaymentDate" label="付息日期">
+        </el-table-column>
+		<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="operator" label="操作人">
+        </el-table-column>
+		<el-table-column prop="createDate" label="操作时间">
+        </el-table-column>
+     </el-table>
+	 <el-dialog width="40%" :visible.sync="paymentForm" :close-on-click-modal='false' :append-to-body="true" title="付息" :before-close="paymentFormRemove">
+      <div class="tanchuang">
+        <ws-form>
+          <ws-info-table>
+            <ws-form-item label="本次付息金额(元)" prop="money">
+              <ws-input type="number" @mousewheel.native.prevent v-model="stillMoney.repaymentEdAmount" placeholder="请输入本次付款金额(元)"
+                maxlength="100" size="small" />
+            </ws-form-item>
+            <ws-form-item label="付息日期" prop="repaymentDate">
+              <el-date-picker value-format="yyyy-MM-dd"  v-model="stillMoney.repaymentDate" type="date" placeholder="选择日期"></el-date-picker>
+            </ws-form-item>
+            <div class="upLoad">
+              <!-- <el-upload class="avatar-uploader" :action="global.uploadPath" :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
+            :action="global.uploadPath"
+            list-type="picture-card"
+            :on-success="handleAvatarSuccess"
+            :on-remove="handleRemove"
+            class="photo2"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload> -->
+           <ws-upload ref="upload" :button-name="'上传付息截图'" :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="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 {
+	getRepaymentList,
+  repaymentSubmit,
+  getWarehouseReceiptLook
+	} from '@/model/tradeServicesManagement/index'
+   import WsUpload from '@/components/WsUpload'
+	export default {
+		components: {
+        WsUpload,
+    },
+		data() {
+			return {
+				recordList:[],
+				value2:'',
+				isShowadjustment:false,
+				pickerOptions:[],
+				paymentForm:false,
+				payments:{},
+        imageUrl:"",
+        repayment:{
+          repaymentScreenshot:"",
+          repaymentEdAmount:0,
+          
+        },
+        currentPage:1,
+        pageSize:10,
+        deptCircularPage:{},
+        stillMoney:{
+          repaymentDate:'',
+          repaymentEdAmount:''
+        },
+        deptBudgetTotal:0,
+        compId:localStorage.getItem('ws-pf_compId'),
+        id:"",
+        contractNo:"",
+        accessoryTFs:false,
+        appendixIdss:"",
+        payInterest:0,
+			}
+		},
+		activated() {
+     this.id = this.$route.query.id;
+     this.contractNo = this.$route.query.contractNo
+     this.getNowTime()
+     this.getList()
+		},
+		methods: {
+      handleClose(){
+       this.accessoryTFs = false
+      },
+      cancel() {
+        this.$router.push({
+          path: 'warehouseReceiptRegulation'
+        })
+      },
+      getNowTime() {
+       var now = new Date();
+       var year = now.getFullYear(); //得到年份
+       var month = now.getMonth(); //得到月份
+       var date = now.getDate(); //得到日期
+       month = month + 1;
+       month = month.toString().padStart(2, "0");
+       date = date.toString().padStart(2, "0");
+       var defaultDate = `${year}-${month}-${date}`;
+       this.$set(this.stillMoney, "repaymentDate", defaultDate);
+   },
+      getList(){
+        getWarehouseReceiptLook({id:this.id})
+        .toPromise()
+        .then((response) => {
+         this.repayment = response
+         this.stillMoney.amountToRepaid =  this.repayment.amountToRepaid
+          getRepaymentList({interestFlag:1,compId:this.repayment.compId,tradeWarehouseReceiptId:this.repayment.id,currentPage:this.currentPage,pageSize:this.pageSize,contractNo:this.contractNo}).toPromise()
+          .then((response) => {
+            this.payInterest=0
+            this.recordList = response.records
+            if(response.records.length>0){
+              for (let i = 0; i < response.records.length; i++) {
+                this.payInterest+=response.records[i].repaymentEdAmount
+              }
+              this.payInterest=Number(this.payInterest).toFixed(2)
+            }
+            //  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.$message.error("本次付息金额输入错误!")
+          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
+      }
+      console.log("图片",this.stillMoney.repaymentScreenshot)
+        this.$confirm('付息信息提交后不可修改,确定提交?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+             this.stillMoney.tradeWarehouseReceiptId = this.repayment.id
+            this.stillMoney.operator = localStorage.getItem('ws-pf_staffName')
+             this.stillMoney.compId = this.repayment.compId
+             this.stillMoney.interestFlag = 1
+            repaymentSubmit(this.stillMoney).toPromise()
+            .then((response) => {
+              this.$message.success("付息成功!")
+               this.stillMoney = { repaymentDate:'',repaymentEdAmount:''}
+               this.$refs.upload.clearFiles()
+               this.stillMoney.repaymentScreenshot = ""
+               this.getNowTime()
+               this.paymentForm = false
+              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)
+			},
+			payment() {
+        console.log(this.stillMoney.repaymentScreenshot)
+				this.paymentForm = true
+			},
+		},
+	}
+</script>
+<style lang="scss" scoped>
+	.bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+	.title {
+    position: relative;
+  }
+.bg-bottom {
+    margin: 15px 0px;
+  }
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+	.tanchuang {
+    margin: 0 auto;
+  }
+
+  .tanchuang .ws-info-table {
+    display: initial;
+  }
+
+  .tanchuang .ws-info-table .el-form-item {
+    margin: 0 auto;
+    text-align: center;
+  }
+   .ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    min-width: 125px;
+    text-align: center;
+    background: #ffffff;
+    color: #8890b1;
+  }
+
+  /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>

+ 465 - 0
src/views/tradeServicesManagement/releaseGrain.vue

@@ -0,0 +1,465 @@
+// 还款
+<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="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-row>
+			<el-col :span="12">
+          <el-date-picker
+          style="width:50% !important;"
+          v-model="value2"
+          type="daterange"
+          value-format='yyyy-MM-dd'
+          @change='datechange'
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+        <el-select v-model="borrowingCompany" placeholder="选择公司" class="typeselect" @change="getList"
+          :value="searchType">
+          <ws-option key="全部公司" label="全部公司" value="" style="color: #8890b1" />
+          <ws-option v-for="item in companyList1" :key="item.id" :label="item.compName" :value="item.compName"
+            style="color: #8890b1" />
+        </el-select>
+        <el-select v-model="borrowingWarehouse" placeholder="选择仓库" class="typeselect" @change="getList"
+          :value="searchType">
+          <ws-option key="全部仓库" label="全部仓库" value="" style="color: #8890b1" />
+          <ws-option v-for="item in warehouseList1" :key="item.id" :label="item.warehouseName" :value="item.warehouseName"
+            style="color: #8890b1" />
+        </el-select>
+      </el-col>
+			<el-col :span="12" class="bg-right">
+				<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 prop="borrowingCompany" label="公司名称">
+        </el-table-column>
+		  <el-table-column prop="borrowingWarehouse" label="出库名称">
+        </el-table-column>
+        <el-table-column prop="repaymentEdAmount" label="放粮重量(吨)">
+        </el-table-column>
+        <el-table-column prop="repaymentIngAmount" label="放粮后在押(吨)">
+        </el-table-column>
+		<el-table-column prop="appendix" label="备注">
+      <template slot-scope="scope">
+        <span @click="remarkLook(scope.row)" class="text_css">查看</span>
+      </template>
+        </el-table-column>
+		<el-table-column prop="operator" label="操作人">
+        </el-table-column>
+		<el-table-column prop="createDate" label="操作时间">
+        </el-table-column>
+     </el-table>
+	 <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="money">
+              <el-select v-model="stillMoney.borrowingCompany" placeholder="选择借款公司" filterable clearable class="typeselect" @change="companyChange"
+                :value="searchType">
+                <ws-option v-for="item in companyList" :key="item.renownId" :label="item.renown" :value="item.renown"
+                  style="color: #8890b1" />
+              </el-select>
+            </ws-form-item>
+            <ws-form-item label="借款库点" prop="repaymentDate">
+              <el-select v-model="stillMoney.borrowingWarehouse" placeholder="选择借款仓库" class="typeselect" filterable clearable  @change="warehouseChange"
+                :value="searchType">
+                <ws-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.warehouseName"
+                  style="color: #8890b1" />
+              </el-select>
+            </ws-form-item>
+            <ws-form-item label="货名" prop="repaymentDate">
+              <el-select v-model="stillMoney.goodsName" placeholder="选择货名" class="typeselect" filterable clearable  @change="goodsChange"
+                :value="searchType">
+                <ws-option v-for="item in goodsList" :key="item.id" :label="item.goodsName" :value="item.goodsName"
+                  style="color: #8890b1" />
+              </el-select>
+            </ws-form-item>
+            <ws-form-item label="在押重量" prop="money">
+              <ws-input type="number" disabled v-model="stillMoney.amount" placeholder="自动获取,不可编辑"
+                maxlength="100" size="small" />
+            </ws-form-item>
+            <ws-form-item label="放粮重量" prop="money">
+              <ws-input type="number" v-model="stillMoney.repaymentEdAmount" placeholder="输入放粮重量"
+                maxlength="100" size="small" />
+            </ws-form-item>
+            <ws-form-item label="备注(选填)" prop="money">
+            </ws-form-item>
+            <div style="width:50%;margin:0 auto;">
+                <el-input
+                type="textarea"
+                :rows="2"
+                placeholder="输入备注信息"
+                v-model="stillMoney.remark">
+              </el-input>
+            </div>
+            
+          </ws-info-table>
+          <div style="text-align: center; margin-top: 20px">
+            <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="备注"
+			@on-cancel="handleClose">
+		{{ appendixIdss }}
+		</WinseaContentModal>
+	</div>
+</template>
+<script>
+  import {
+    getcompList,
+  } from '@/model/signIn/index'
+	import {
+	getRepaymentList,
+  repaymentSubmit,
+  getWarehouseReceiptLook,
+  getCompany,
+  getdetainedweight
+	} from '@/model/tradeServicesManagement/index'
+  import {
+    xiala
+  } from '@/model/warehouse/index'
+   import WsUpload from '@/components/WsUpload'
+	export default {
+		components: {
+        WsUpload,
+    },
+		data() {
+			return {
+				recordList:[],
+				value2:'',
+				isShowadjustment:false,
+				pickerOptions:[],
+        borrowingWarehouse:'',
+        borrowingCompany:'',
+				paymentForm:false,
+				payments:{},
+        companyList:[],
+        imageUrl:"",
+        repayment:{
+          repaymentScreenshot:"",
+          repaymentEdAmount:0,
+        },
+        currentPage:1,
+        pageSize:10,
+        deptCircularPage:{},
+        stillMoney:{
+          repaymentDate:'',
+          goodsName:'',
+          borrowingCompany:'',
+          bankId:localStorage.getItem('ws-pf_compId'),
+        },
+        value2:[],
+        deptBudgetTotal:0,
+        compId:localStorage.getItem('ws-pf_compId'),
+        id:"",
+        contractNo:"",
+        accessoryTFs:false,
+        appendixIdss:"",
+        bankId:'',
+        warehouseList:[],
+        goodsList:[],
+        companyList1:[],
+        warehouseList1:[],
+        borrowingWarehouse:'',
+        repaymentIngAmount:0
+			}
+		},
+		activated() {
+     this.getNowTime()
+     this.getCompList()
+     this.getWarehouse()
+     this.getList()
+		},
+		methods: {
+      datechange(){
+        this.currentPage = 1
+				this.getList()
+			},
+      getCompList(){
+         getcompList()
+          .toPromise()
+          .then((res) => {
+            this.companyList1 = res
+          })
+          .catch((err) => {})
+      },
+      getWarehouse() {
+        //获取仓库
+        xiala({
+            compId: this.compId,
+            warehouseType:1
+          }).toPromise()
+          .then(response => {
+            this.warehouseList1 = response
+          })
+      },
+      goodsChange(e){
+        console.log(e)
+        getdetainedweight({bankId:this.compId,compId:this.stillMoney.compId,warehouseId:this.stillMoney.warehouseId,goodsName:e,warehouseName:this.stillMoney.borrowingWarehouse}).toPromise()
+        .then((response) => {
+         console.log(response)
+         this.$set(this.stillMoney,'goodsName',e)
+         this.$set(this.stillMoney,'amount',response)
+        })
+      },
+      companyChange(e){
+        console.log(e)
+        for (let i = 0; i < this.companyList.length; i++) {
+         if(this.companyList[i].renown==this.stillMoney.borrowingCompany){
+          this.$set(this.stillMoney,'borrowingWarehouse','')
+          this.$set(this.stillMoney,'borrowingCompany',e)
+            this.stillMoney.compId = this.companyList[i].renownId
+            this.warehouseList = this.companyList[i].warehouseNameList
+         }
+        }
+      },
+      warehouseChange(e){
+        for (let i = 0; i < this.warehouseList.length; i++) {
+         if(this.warehouseList[i].warehouseName==this.stillMoney.borrowingWarehouse){
+          this.stillMoney.warehouseId = this.companyList[i].warehouseId
+          this.$set(this.stillMoney,'goodsName','')
+            this.goodsList = this.warehouseList[i].goodsNameList
+         }
+        }
+      },
+      handleClose(){
+       this.accessoryTFs = false
+      },
+      cancel() {
+        this.$router.push({
+          path: 'warehouseReceiptRegulation'
+        })
+      },
+      getNowTime() {
+       var now = new Date();
+       var year = now.getFullYear(); //得到年份
+       var month = now.getMonth(); //得到月份
+       var date = now.getDate(); //得到日期
+       month = month + 1;
+       month = month.toString().padStart(2, "0");
+       date = date.toString().padStart(2, "0");
+       var defaultDate = `${year}-${month}-${date}`;
+       this.$set(this.stillMoney, "repaymentDate", defaultDate);
+   },
+      getList(){
+        var startDate=''
+					var endDate=''
+					if(this.value2){
+					startDate=this.value2[0]?this.value2[0]:''
+					endDate=this.value2[1]?this.value2[1]:''
+				}
+        getCompany({bankId:this.compId}).toPromise()
+        .then((response) => {
+          this.companyList=response
+        })
+       
+          getRepaymentList({interestFlag:2,
+            compId:this.repayment.compId,currentPage:this.currentPage,
+            pageSize:this.pageSize,
+            startDate:startDate,
+       			endDate:endDate,
+             borrowingCompany:this.borrowingCompany,
+             borrowingWarehouse:this.borrowingWarehouse
+            }).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
+          
+          })
+      },
+      //成功付款截图
+      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.$message.error("放粮重量输入错误!")
+          return
+        }
+        this.stillMoney.repaymentIngAmount = this.stillMoney.amount - this.stillMoney.repaymentEdAmount
+        if( this.stillMoney.repaymentEdAmount > this.stillMoney.repaymentIngAmount){
+          this.$message.error("放粮重量不可大于在押重量!")
+          return
+        }
+        if (
+        (String(this.stillMoney.repaymentEdAmount).indexOf('.') != -1 &&
+          String(this.stillMoney.repaymentEdAmount).length -
+            (String(this.stillMoney.repaymentEdAmount).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message.error("放粮重量需保留两位小数,请重新输入!")
+        return
+      }
+      console.log("图片",this.stillMoney.repaymentScreenshot)
+        this.$confirm('付息信息提交后不可修改,确定提交?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            this.stillMoney.operator = localStorage.getItem('ws-pf_staffName')
+             this.stillMoney.interestFlag = 2
+            repaymentSubmit(this.stillMoney).toPromise()
+            .then((response) => {
+              this.$message.success("放粮成功!")
+               this.stillMoney = { repaymentDate:''}
+               this.stillMoney.repaymentScreenshot = ""
+               this.getNowTime()
+               this.paymentForm = false
+              this.getList()
+          })
+          }).catch(() =>{
+            return false
+          })
+      },
+      paymentFormRemove(){
+        this.paymentForm = false
+        this.stillMoney.repaymentScreenshot = ""
+        this.stillMoney.repaymentEdAmount = ""
+        this.stillMoney.repaymentDate = ""
+      },
+      //查看附件
+      remarkLook(row){
+        this.appendixIdss = row.remark
+        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)
+			},
+			payment() {
+        console.log(this.stillMoney.repaymentScreenshot)
+				this.paymentForm = true
+			},
+		},
+	}
+</script>
+<style lang="scss" scoped>
+	.bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+	.title {
+    position: relative;
+  }
+.bg-bottom {
+    margin: 15px 0px;
+  }
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+	.tanchuang {
+    margin: 0 auto;
+  }
+
+  .tanchuang .ws-info-table {
+    display: initial;
+  }
+
+  .tanchuang .ws-info-table .el-form-item {
+    margin: 0 auto;
+    text-align: center;
+  }
+   .ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    min-width: 125px;
+    text-align: center;
+    background: #ffffff;
+    color: #8890b1;
+  }
+
+  /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>

+ 3 - 2
src/views/tradeServicesManagement/repayment.vue

@@ -17,7 +17,7 @@
 		<el-row>
 			<el-col :span="12">
         <div class="span_css">
-				<span>合同编号:{{repayment.contractNo}}</span><span>发放金额:{{repayment.paymentAmount}}元</span><span>应还金额:{{repayment.amountDue}}元</span><span>已还金额:{{repayment.amountRepaid}}元</span><span>待还金额:{{repayment.amountToRepaid}}元</span>
+				<span>放金额:{{repayment.paymentAmount}}元</span><span>已还金额:{{repayment.amountRepaid}}元</span><span>待还金额:{{repayment.amountToRepaid}}元</span>
 			</div>
       </el-col>
 			<el-col :span="12" class="bg-right">
@@ -50,7 +50,7 @@
 		<el-table-column prop="createDate" label="操作时间">
         </el-table-column>
      </el-table>
-	 <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true" title="还款" :before-close="paymentFormRemove">
+	 <el-dialog width="40%" :visible.sync="paymentForm" :close-on-click-modal='false' :append-to-body="true" title="还款" :before-close="paymentFormRemove">
       <div class="tanchuang">
         <ws-form>
           <ws-info-table>
@@ -236,6 +236,7 @@
                this.stillMoney = {}
                this.stillMoney.repaymentScreenshot = ""
                this.paymentForm = false
+               this.$refs.upload.clearFiles()
               this.getList()
           })
           }).catch(() =>{

+ 2 - 2
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -269,13 +269,13 @@
       },
       getcompList() {
         //获取银行
-        getcompList({reserved01:1})
+        getcompList({compFax:1})
           .toPromise()
           .then((res) => {
             this.bankList = res
           })
           .catch((err) => {})
-          getcompList({reserved01:2})
+          getcompList({compFax:2})
           .toPromise()
           .then((res) => {
             this.threeList = res

+ 5 - 5
src/views/tradeServicesManagement/warehouseReceiptEdit.vue

@@ -99,13 +99,13 @@
       <div class="title1">外审部门</div>
       <el-form-item prop="bank" label="银行" span="1">
         <el-select v-model="deptBudgetList.bank" placeholder="请选择银行" @change="bankChange" filterable clearable>
-          <el-option :label="item.constValue" :value="item.constValue" v-for="(item,index) in bankList" :key="index">
+          <el-option :label="item.compName" :value="item.compName" 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" filterable clearable>
-          <el-option :label="item1.constValue" :value="item1.constValue" v-for="(item1,index) in threeList"
+          <el-option :label="item1.compName" :value="item1.compName" v-for="(item1,index) in threeList"
             :key="index"></el-option>
         </el-select>
       </el-form-item>
@@ -379,13 +379,13 @@
       },
       getcompList() {
         //获取银行
-        getcompList({reserved01:1})
+        getcompList({compFax:1})
           .toPromise()
           .then((res) => {
             this.bankList = res
           })
           .catch((err) => {})
-          getcompList({reserved01:2})
+          getcompList({compFax:2})
           .toPromise()
           .then((res) => {
             this.threeList = res
@@ -550,7 +550,7 @@
 
   .el-form {
     overflow: scroll;
-    height: 94vh;
+    height: 79vh;
   }
 
   .bg-left {

+ 24 - 6
src/views/tradeServicesManagement/warehouseReceiptLook.vue

@@ -88,10 +88,22 @@
       <el-form-item label="申请金额(元)" span="1" prop="interest" class="forlist">
         <el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small" disabled></el-input>
       </el-form-item>
+      <el-form-item prop="bank" label="银行" span="1">
+        <el-select disabled v-model="deptBudgetList.bank" placeholder="请选择银行" @change="bankChange" filterable clearable>
+          <el-option :label="item.compName" :value="item.compName" 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 disabled v-model="deptBudgetList.three" placeholder="无" @change="threeChange" filterable clearable>
+          <el-option :label="item1.compName" :value="item1.compName" v-for="(item1,index) in threeList"
+            :key="index"></el-option>
+        </el-select>
+      </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 v-if="deptBudgetList.status == '待还款'">
+      <!-- <div v-if="deptBudgetList.status == '待还款'">
         <div class="title1">发放信息</div>
         <el-form-item prop="contractNo" label="合同编号" span="1">
           <el-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" size="small" disabled></el-input>
@@ -132,7 +144,7 @@
           <el-input type='number' v-model="deptBudgetList.amountToRepaid" placeholder="请输入发放金额" size="small" disabled>
           </el-input>
         </el-form-item>
-      </div>
+      </div> -->
       <div class="title1">审核记录</div>
       <el-table class="wenzi" :data="taskhistories" style="width: 100%">
         <el-table-column prop="operatorMajorRoleName" label="审核人">
@@ -190,7 +202,7 @@
     activated() {
       localStorage.removeItem('pageUp')
       this.getList(this.$route.query.id)
-      // this.getcompList()
+      this.getcompList()
     },
     methods: {
       //返回
@@ -240,11 +252,17 @@
         }
       },
       getcompList() {
-        getcompList()
+        //获取银行
+        getcompList({compFax:1})
+          .toPromise()
+          .then((res) => {
+            this.bankList = res
+          })
+          .catch((err) => {})
+          getcompList({compFax:2})
           .toPromise()
           .then((res) => {
-            this.compOptionList = res
-            this.deptBudgetList.renown = res[0].compName
+            this.threeList = res
           })
           .catch((err) => {})
       },

+ 55 - 10
src/views/tradeServicesManagement/warehouseReceiptRegulation.vue

@@ -23,9 +23,10 @@
         <el-button :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(2)">待审批</el-button>
         <el-button :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(3)">待还</el-button>
         <el-button :type="searchType == 4 ? 'primary' : ''" @click="handlestatus(4)">已还</el-button>
-        <el-input @keyup.enter.native="findList()" placeholder="可按业务编号、合同编号、仓库名查找" class="search-input" v-model="searchKeyWord"></el-input>
+        <el-input @keyup.enter.native="findList()" placeholder="可按业务编号、仓库名查找" class="search-input" v-model="searchKeyWord"></el-input>
         <el-button type="primary" @click='findList'>查找</el-button>
         <el-button type="" @click='handle'>电子锁操作记录</el-button>
+        <el-button type="primary" v-if="compFax==1"  class="releaseGrain" @click="releaseGrain">放粮</el-button>
         <el-button type="primary" v-hasPermission=" `tradeServicesManagement.tradeService.add`" class="add" @click="add">添加</el-button>
       </div>
       <el-table :data="tradeServicesList" style="width: 100%; margin-top: 20px" ref="tradeServicesList" border
@@ -43,28 +44,40 @@
         <el-table-column prop="dryOutWeight" label="折干重量(吨)" width="150"></el-table-column>
         <el-table-column prop="unitPrice" label="单价(元/吨)" width="100"></el-table-column>
         <el-table-column prop="totalValue" label="货值(元)" width="100"></el-table-column>
-        <el-table-column prop="paymentAmount" label="放金额(元)" width="150"></el-table-column>
-        <el-table-column prop="amountDue" label="应还金额(元)" width="150"></el-table-column>
+        <el-table-column prop="paymentAmount" label="放金额(元)" width="150"></el-table-column>
+        <!-- <el-table-column prop="amountDue" label="应还金额(元)" width="150"></el-table-column> -->
         <el-table-column prop="amountRepaid" label="已还金额(元)" width="150"></el-table-column>
         <el-table-column prop="amountToRepaid" label="待还金额(元)" width="150"></el-table-column>
+        <el-table-column prop="applicationAmount" label="已付利息(元)" width="150"></el-table-column>
         <el-table-column prop="approveStatus" label="状态" width="100">
           <template slot-scope="scope">
             <span v-if="scope.row.status == '待还款'">{{scope.row.status}}</span>
             <span v-else>{{scope.row.approveStatus?scope.row.approveStatus:scope.row.status}}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="address" label="操作" width="500">
+        <el-table-column prop="address" label="操作" width="700">
           <template slot-scope="scope">
             <el-button size="mini" v-hasPermission=" `tradeServicesManagement.tradeService.view`" @click="lookBtnClick(scope.row, 2)">
               查看</el-button>
             <el-button v-if="scope.row.taskId && scope.row.approveStatus=='待决策人审核'" size="mini" @click="toExamineBtnClick(scope.row, 2)">
-              审核</el-button>
+              确认</el-button>
                 <el-button v-if="scope.row.taskId && scope.row.approveStatus=='待第三方审核'" size="mini" @click="toExamineBtnClick(scope.row, 2)">
-              审核</el-button>
+                确认</el-button>
             <el-button v-if="scope.row.taskId && scope.row.approveStatus=='待银行审批'" size="mini" @click="approveBtnClick(scope.row, 2)">
-              审批</el-button>
-            <el-button v-hasPermission=" `tradeServicesManagement.tradeService.return`" size="mini" @click="repaymentBtnClick(scope.row, 2)" v-if="scope.row.status == '待还款'">
+              确认</el-button>
+              <div  style="display:inline-block;" v-if="scope.row.status == '待还款'&&compFax!=1">
+                 <el-button v-hasPermission=" `tradeServicesManagement.tradeService.return`" size="mini" @click="repaymentBtnClick(scope.row, 2)">
               还款</el-button>
+              </div>
+            <div style="display:inline-block;" v-if="scope.row.status == '待还款'&&compFax!=1">
+              <el-button v-hasPermission=" `tradeServicesManagement.tradeService.return`" size="mini" @click="payinterestBtnClick(scope.row)" >
+              付息</el-button>
+            </div>
+              <div style="display:inline-block;" v-if="!scope.row.approveStatus&&scope.row.status != '已结束'&&compFax==1">
+                <el-button v-hasPermission=" `tradeServicesManagement.tradeService.return`" size="mini" @click="finishBtnClick(scope.row)" >
+                结束</el-button>
+              </div>
+              
             <el-button v-hasPermission=" `tradeServicesManagement.tradeService.edit`" size="mini" @click="rowEditBtnClick(scope.row)" v-if="!scope.row.approveStatus&&scope.row.status=='已驳回'">修改</el-button>
             <el-button v-hasPermission=" `tradeServicesManagement.tradeService.delete`" size="mini" type="danger" @click="rowDeleteBtnClick(scope.row)" v-if="!scope.row.approveStatus&&scope.row.status=='已驳回'">删除</el-button>
             <el-button v-if="scope.row.lockedStatusFlag==1" size="mini" type="success" @click="rowhandleBtnClick(scope.row,0)" >电子锁(已开)</el-button>
@@ -132,10 +145,12 @@
     deleteTrageInfo,
     getDefault,
     setDefault,
-    openlock
+    openlock,
+    WarehouseReceiptUpdate
   } from '@/model/tradeServicesManagement/index'
   import {
     selectWarehouseSelf,
+    
   } from '@/model/houseSelfCollect/index'
   import {
     billoperatehis,
@@ -165,7 +180,8 @@
         dialogVisible1:false,
         dataList:[],
         checkList:[],
-        currectData:{}
+        currectData:{},
+        compFax:localStorage.getItem('ws-pf_compFax')
       }
     },
     activated() {
@@ -204,6 +220,31 @@
 
     },
     methods: {
+      releaseGrain(){
+        this.$router.push({
+          name: 'releaseGrain'
+        })
+      },
+      payinterestBtnClick(row){
+        this.$router.push({
+          name: 'payInterest',
+          query:{id:row.id,contractNo:row.contractNo}
+        })
+      },
+      finishBtnClick(row){
+        this.$confirm('确定结束仓单?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            row.editFlag=2
+            WarehouseReceiptUpdate(row).toPromise().then((response) => {
+              this.$message.success('结束成功')
+              this.getList()
+            })
+          })
+      },
       handle(){
         billoperatehis({id:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
               this.dataList=response
@@ -439,6 +480,10 @@
         position: absolute;
         right: 0;
       }
+      .releaseGrain{
+        position: absolute;
+        right: 80px;
+      }
     }
 
     .search-input {