5 Commit-ok 6cec21e5d1 ... aa8365922a

Szerző SHA1 Üzenet Dátum
  高敬炎 aa8365922a 前端 1 éve
  高敬炎 a690293a55 前端 1 éve
  高敬炎 de3348f653 Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc 1 éve
  高敬炎 56ec18343b Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc 1 éve
  高敬炎 d86127ab28 前端 1 éve

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

@@ -41,6 +41,10 @@ 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_COMPANY = '/tradeWarehouseReceiptAppl/selectBorrowingCompany'
+// 在押
+export const API_GET_DETAINEDWEIGHT = '/tradeWarehouseReceiptAppl/detainedWeight'
 
 export const API_GET_VIDEO_LIST = '/tradeWarehouseReceiptAppl/selectmonitorList'
 

+ 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: '查看仓单',
 

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

@@ -496,6 +496,8 @@
             localStorage.setItem('ws-pf_organMonetaryKey', res1.organizationMonetaryKey)
             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

@@ -22,7 +22,9 @@ import {
     API_SET_SETDEFAULT,
     API_OPENLOCK,
     API_GET_VIDEO_LIST,
-    API_GET_VIDEO_LIST_MORE
+    API_GET_VIDEO_LIST_MORE,
+    API_COMPANY,
+    API_GET_DETAINEDWEIGHT
 } from '@/api/V2/tradeServicesManagement'
 // 列表
 export const getList = appRx.get(API_GET_TRADESERVICES_LIST, errorCatcher, errorHandle, filter)
@@ -68,4 +70,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)

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

@@ -143,11 +143,15 @@ const actions = {
             organizationMonetaryKey,
             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)

+ 32 - 2
src/views/tradeServicesManagement/component/routers/route.js

@@ -196,12 +196,12 @@ const tradeServicesManagementRouter = {
     },
     //修改仓单
     {
-      path: 'warehouseReceiptgoods',
+      path: 'warehouseReceipteditgoods',
       component: () =>
         import( /* webpackChunkName: "applDetail" */ '@/views/tradeServicesManagement/editgoods'),
       name: 'warehouseReceipteditgoods',
       meta: {
-        title: 'warehouseReceiptgoods',
+        title: 'warehouseReceipteditgoods',
         shortcutEntrance: 'warehouseReceiptRegulation',
         module: 'tradeServicesManagement.tradeService.edit',
         permissicon: [],
@@ -240,6 +240,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
+    },
   ],
 
 };

+ 87 - 53
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,19 +33,19 @@
       </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>
       </el-col>
     </el-row>
     <div class="center">
-        <el-table ref="tableData" :data="warehouseList.records" height="570"
-          v-show="this.warehouseType== '1'" @selection-change="handleSelectionChange">
+        <el-table ref="tableData" :data="warehouseList.records" height="570" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
           <el-table-column prop="warehouseReceipt" label="所属仓单" width="180">
           </el-table-column>
@@ -80,42 +80,6 @@
           </el-table-column>
 
         </el-table>
-        <el-table @selection-change="handleSelectionChange" :data="warehouseList.records" height="560"
-          v-show="this.warehouseType== '2'">
-          <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
-          <el-table-column prop="warehouseReceipt" label="所属仓单" width="180">
-          </el-table-column>
-          <el-table-column prop="inOutTaskNo" label="业务编号" width="180">
-          </el-table-column>
-          <el-table-column prop="cargoRights" label="货源归属" width="180"> </el-table-column>
-          <el-table-column prop="inOutType" label="入库类型" width="100"> </el-table-column>
-          <el-table-column prop="carNo" label="车牌号">
-            <template slot-scope="scope">
-              <span style="color: #8890b1">{{ scope.row.carNo }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="goodsName" label="货名"> </el-table-column>
-          <el-table-column prop="netWeight" label="净重(吨)"></el-table-column>
-          <el-table-column prop="pureWeight" label="纯重(吨)"> </el-table-column>
-          <el-table-column label="水分(%)" span="1" prop="waterContent"></el-table-column>
-          <el-table-column label="容重(g/l)" span="1" prop="bulkDensity"></el-table-column>
-          <!-- <el-table-column prop="type" label="类型" width="60px"> </el-table-column> -->
-          <el-table-column prop="cost" label="单价(元/吨)">
-          </el-table-column>
-          <el-table-column prop="price" label="粮款(元)"> </el-table-column>
-         
-          <!-- <el-table-column prop="inOutDate" label="入库日期" width="100px">
-            <template slot-scope="scope">
-              <span style="color: #8890b1">{{ scope.row.inOutDate }}</span>
-            </template>
-          </el-table-column> -->
-          <el-table-column prop="createDate" label="入库日期">
-            <template slot-scope="scope">
-              <span style="color: #8890b1">{{ scope.row.createDate }}</span>
-            </template>
-          </el-table-column>
-
-        </el-table>
 
 
         <div style="text-align: center; padding: 10px">
@@ -235,15 +199,20 @@
         accessoryTFs: false,
         modification: [],
         printList: [], //批量打印数据
-        warehouseAllXiaLa:[]
+        warehouseAllXiaLa:[],
+        billNo:'',
+        db:{},
+        weight:0
       }
     },
 
-    activated() {
+    async activated() {
+      this.db=await global.default.openDB('warehouseReceipt')
       this.deptBudgetList.baseId = this.$route.query.baseId
       // 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
@@ -271,16 +240,16 @@
           this.$message.error("请选择相同货名的条目!")
           return
         }
-        var db=await global.default.openDB('warehouseReceipt')
+        
         console.log(this.modification)
         console.log()
-        var data=await global.default.getDataByKey(db,'signalChat',1)
+        var data=await global.default.getDataByKey(this.db,'signalChat',2)
         if(data){
-          if(data.modification&&data.modification.length>0){
-            global.default.updateDB(db,'signalChat',{sequenceId:1,modification:this.modification})
+          if(data.modification){
+            global.default.updateDB(this.db,'signalChat',{sequenceId:2,modification:this.modification})
           }
         }else{
-          global.default.addData(db,'signalChat',{sequenceId:1,modification:this.modification})
+          global.default.addData(this.db,'signalChat',{sequenceId:2,modification:this.modification})
         }
         // localStorage.setItem('warehouseReceiptGood',this.modification)
         this.$router.go(-1)
@@ -345,12 +314,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
         }
       },
@@ -455,7 +432,7 @@
 				// // this.newAppendixs = files
 				// this.onChangeFlag = true
 			},
-			getList() {
+			async getList() {
         
 					var startDate=''
 					var endDate=''
@@ -463,7 +440,7 @@
 					startDate=this.value2[0]?this.value2[0]:''
 					endDate=this.value2[1]?this.value2[1]:''
 				}
-       
+        var data=await global.default.getDataByKey(this.db,'signalChat',2)
 				if (this.warehouseType == 1) {
 					
 					addselectinfoList({
@@ -485,15 +462,45 @@
 						.then((response) => {
 							for (var i = 0; i < response.records.length; i++) {
 								if (response.records[i].cost&&response.records[i].pureWeight) {
-									response.records[i].price=response.records[i].cost*response.records[i].pureWeight
+									response.records[i].price=Number(response.records[i].cost*response.records[i].pureWeight).toFixed(2)
 								} else {
 									response.records[i].price=0
 								}
 							}
-							this.deptCircularPage.currentPage = response.current
+              this.deptCircularPage.currentPage = response.current
 							this.deptCircularPage.pageSize = response.size
 							this.deptBudgetTotal = response.total
 							this.warehouseList = response
+              if(localStorage.getItem('warehouseReceipteditdata')||data.modification&&data.modification.length>0){
+
+                
+                if(data&&data.modification&&data.modification.length>0){
+                  this.$nextTick(()=>{
+                    for (let i = 0; i <data.modification.length; i++) {
+                      var index=this.warehouseList.records.findIndex((item)=>{return item.id==data.modification[i].id})
+                      this.$refs.tableData.toggleRowSelection(this.warehouseList.records[index],true)
+                    }
+                  })
+                }else{
+                  var modification1 = JSON.parse(localStorage.getItem('warehouseReceipteditdata')).warehouseInOutInfoList
+          
+                  this.$nextTick(()=>{
+                    for (let i = 0; i < this.warehouseList.records.length; i++) {
+                    var index=modification1.findIndex((item)=>{return item.id==this.warehouseList.records[i].id})
+
+                      if(index!=-1){
+                        console.log(i)
+                        this.$refs.tableData.toggleRowSelection(this.warehouseList.records[i],true)
+                        this.$forceUpdate()
+                      }
+                      
+                    }
+                  })
+                  
+                }
+                
+              }
+							
 						})
 				} else if (this.warehouseType == 2) {
 					recordss({
@@ -523,6 +530,33 @@
 							this.deptCircularPage.pageSize = response.size
 							this.deptBudgetTotal = response.total
 							this.warehouseList = response
+              if(localStorage.getItem('warehouseReceipteditdata')||data.modification&&data.modification.length>0){
+                if(data&&data.modification&&data.modification.length>0){
+                  this.$nextTick(()=>{
+                    for (let i = 0; i <data.modification.length; i++) {
+                      var index=this.warehouseList.records.findIndex((item)=>{return item.id==data.modification[i].id})
+                      this.$refs.tableData.toggleRowSelection(this.warehouseList.records[index],true)
+                    }
+                  })
+                }else{
+                  var modification1 = JSON.parse(localStorage.getItem('warehouseReceipteditdata')).warehouseInOutInfoList
+
+                  this.$nextTick(()=>{
+                    for (let i = 0; i < this.warehouseList.records.length; i++) {
+                    var index=modification1.findIndex((item)=>{return item.id==this.warehouseList.records[i].id})
+
+                      if(index!=-1){
+                        console.log(i)
+                        this.$refs.tableData.toggleRowSelection(this.warehouseList.records[i],true)
+                        this.$forceUpdate()
+                      }
+                      
+                    }
+                  })
+                  
+                }
+
+              }
 						})
             
 				}

+ 79 - 52
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,19 +33,19 @@
       </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>
       </el-col>
     </el-row>
     <div class="center">
-        <el-table ref="tableData" :data="warehouseList.records" height="570"
-          v-show="this.warehouseType== '1'" @selection-change="handleSelectionChange">
+        <el-table ref="tableData" :data="warehouseList.records" height="570" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
           <el-table-column prop="warehouseReceipt" label="所属仓单" width="180">
           </el-table-column>
@@ -80,42 +80,6 @@
           </el-table-column>
 
         </el-table>
-        <el-table @selection-change="handleSelectionChange" :data="warehouseList.records" height="560"
-          v-show="this.warehouseType== '2'">
-          <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
-          <el-table-column prop="warehouseReceipt" label="所属仓单" width="180">
-          </el-table-column>
-          <el-table-column prop="inOutTaskNo" label="业务编号" width="180">
-          </el-table-column>
-          <el-table-column prop="cargoRights" label="货源归属" width="180"> </el-table-column>
-          <el-table-column prop="inOutType" label="入库类型" width="100"> </el-table-column>
-          <el-table-column prop="carNo" label="车牌号">
-            <template slot-scope="scope">
-              <span style="color: #8890b1">{{ scope.row.carNo }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="goodsName" label="货名"> </el-table-column>
-          <el-table-column prop="netWeight" label="净重(吨)"></el-table-column>
-          <el-table-column prop="pureWeight" label="纯重(吨)"> </el-table-column>
-          <el-table-column label="水分(%)" span="1" prop="waterContent"></el-table-column>
-          <el-table-column label="容重(g/l)" span="1" prop="bulkDensity"></el-table-column>
-          <!-- <el-table-column prop="type" label="类型" width="60px"> </el-table-column> -->
-          <el-table-column prop="cost" label="单价(元/吨)">
-          </el-table-column>
-          <el-table-column prop="price" label="粮款(元)"> </el-table-column>
-         
-          <!-- <el-table-column prop="inOutDate" label="入库日期" width="100px">
-            <template slot-scope="scope">
-              <span style="color: #8890b1">{{ scope.row.inOutDate }}</span>
-            </template>
-          </el-table-column> -->
-          <el-table-column prop="createDate" label="入库日期">
-            <template slot-scope="scope">
-              <span style="color: #8890b1">{{ scope.row.createDate }}</span>
-            </template>
-          </el-table-column>
-
-        </el-table>
 
 
         <div style="text-align: center; padding: 10px">
@@ -184,7 +148,7 @@
         contractNo:{},
         show:false,
         srcList: [],
-        binded:'',
+        binded:'0',
         goodsName:'',
         currectdata:{
           compId: localStorage.getItem('ws-pf_compId'),
@@ -235,7 +199,8 @@
         accessoryTFs: false,
         modification: [],
         printList: [], //批量打印数据
-        warehouseAllXiaLa:[]
+        warehouseAllXiaLa:[],
+        weight:0
       }
     },
 
@@ -244,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
@@ -276,7 +242,7 @@
         console.log()
         var data=await global.default.getDataByKey(db,'signalChat',1)
         if(data){
-          if(data.modification&&data.modification.length>0){
+          if(data.modification){
             global.default.updateDB(db,'signalChat',{sequenceId:1,modification:this.modification})
           }
         }else{
@@ -345,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
         }
       },
@@ -419,9 +393,11 @@
 				return fmt
 			},
 			datechange(){
+        this.currentPage = 1
 				this.getList()
 			},
 			find() {
+        this.currentPage = 1
       			this.getList()
     		},
 			handleClose() {
@@ -485,7 +461,7 @@
 						.then((response) => {
 							for (var i = 0; i < response.records.length; i++) {
 								if (response.records[i].cost&&response.records[i].pureWeight) {
-									response.records[i].price=response.records[i].cost*response.records[i].pureWeight
+									response.records[i].price=Number(response.records[i].cost*response.records[i].pureWeight).toFixed(2)
 								} else {
 									response.records[i].price=0
 								}
@@ -494,6 +470,32 @@
 							this.deptCircularPage.pageSize = response.size
 							this.deptBudgetTotal = response.total
 							this.warehouseList = response
+              if(localStorage.getItem('warehouseReceiptdata')||data.modification&&data.modification.length>0){       
+                if(data&&data.modification&&data.modification.length>0){
+                  this.$nextTick(()=>{
+                    for (let i = 0; i <data.modification.length; i++) {
+                      var index=this.warehouseList.records.findIndex((item)=>{return item.id==data.modification[i].id})
+                      this.$refs.tableData.toggleRowSelection(this.warehouseList.records[index],true)
+                    }
+                  })
+                }else{
+                  var modification1 = JSON.parse(localStorage.getItem('warehouseReceiptdata')).warehouseInOutInfoList
+                  this.$nextTick(()=>{
+                    for (let i = 0; i < this.warehouseList.records.length; i++) {
+                    var index=modification1.findIndex((item)=>{return item.id==this.warehouseList.records[i].id})
+
+                      if(index!=-1){
+                        console.log(i)
+                        this.$refs.tableData.toggleRowSelection(this.warehouseList.records[i],true)
+                        this.$forceUpdate()
+                      }
+                      
+                    }
+                  })
+                  
+                }
+
+              }
 						})
 				} else if (this.warehouseType == 2) {
 					recordss({
@@ -523,6 +525,31 @@
 							this.deptCircularPage.pageSize = response.size
 							this.deptBudgetTotal = response.total
 							this.warehouseList = response
+              if(localStorage.getItem('warehouseReceipteditdata')||data.modification&&data.modification.length>0){
+                if(data&&data.modification&&data.modification.length>0){
+                  this.$nextTick(()=>{
+                    for (let i = 0; i <data.modification.length; i++) {
+                      var index=this.warehouseList.records.findIndex((item)=>{return item.id==data.modification[i].id})
+                      this.$refs.tableData.toggleRowSelection(this.warehouseList.records[index],true)
+                    }
+                  })
+                }else{
+                  var modification1 = JSON.parse(localStorage.getItem('warehouseReceipteditdata')).warehouseInOutInfoList
+                  this.$nextTick(()=>{
+                    for (let i = 0; i < this.warehouseList.records.length; i++) {
+                    var index=modification1.findIndex((item)=>{return item.id==this.warehouseList.records[i].id})
+
+                      if(index!=-1){
+                        console.log(i)
+                        this.$refs.tableData.toggleRowSelection(this.warehouseList.records[i],true)
+                        this.$forceUpdate()
+                      }
+                      
+                    }
+                  })
+                  
+                }
+              }
 						})
             
 				}
@@ -808,7 +835,7 @@
   }
 
   .bg-right {
-    padding-right: 10px;
+    padding-right: 15px;
     text-align: right;
   }
 
@@ -831,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>

+ 5 - 4
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>
@@ -64,7 +64,7 @@
                 maxlength="100" size="small" />
             </ws-form-item>
             <ws-form-item label="付款日期" prop="repaymentDate">
-              <el-date-picker v-model="stillMoney.repaymentDate" type="date" placeholder="选择日期"></el-date-picker>
+              <el-date-picker value-format="yyyy-MM-dd"  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">
@@ -167,7 +167,7 @@
         .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,contractNo:this.contractNo}).toPromise()
+          getRepaymentList({compId:this.repayment.compId,tradeWarehouseReceiptId:this.repayment.id,currentPage:this.currentPage,pageSize:this.pageSize,contractNo:this.contractNo}).toPromise()
           .then((response) => {
             this.recordList = response.records
             //  this.stillMoney.amountToRepaid =  this.repayment.amountToRepaid
@@ -236,6 +236,7 @@
                this.stillMoney = {}
                this.stillMoney.repaymentScreenshot = ""
                this.paymentForm = false
+               this.$refs.upload.clearFiles()
               this.getList()
           })
           }).catch(() =>{

+ 9 - 8
src/views/tradeServicesManagement/reviewWarehouseReceipt.vue

@@ -46,14 +46,14 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="grade" label="品级" span="1">
+      <!-- <el-form-item prop="grade" label="品级" span="1">
         <el-select v-model="deptBudgetList.grade" placeholder="请选择品级" disabled filterable clearable>
           <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> -->
       <!-- <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>
@@ -70,13 +70,13 @@
       <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-form-item label="值(元)" span="1" prop="totalValue" class="forlist">
         <el-input type='number' v-model="deptBudgetList.totalValue" disabled placeholder="自动计算,不可编辑" size="small">
         </el-input>
       </el-form-item>
-      <el-form-item label="申请比例(%)" span="1" prop="applicationProportion" class="forlist">
+      <!-- <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> -->
       <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>
@@ -123,7 +123,7 @@
       </div>
     </WinseaContentModal>
     <WinseaContentModal v-model="outerVisible1" title="审核意见" @on-cancel="handleClose" class="sh-content">
-      <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入审核意见,1~50个字" v-model="adoptText"></el-input>
+      <el-input type="textarea" :rows="2" maxlength="50" placeholder="请输入审核意见,0~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>
@@ -207,6 +207,7 @@
             .toPromise()
             .then((response) => {
               this.$message.success('驳回成功')
+              this.rejectText=''
               this.handleClose()
               this.$router.push({
                 path: 'warehouseReceiptRegulation'
@@ -216,8 +217,8 @@
       },
       // 提交
       adoptSubmit() {
-        if (!this.adoptText || this.adoptText.length > 50) {
-          this.$message.error('审核意见不能为空且不能超出50字')
+        if ( this.adoptText.length > 50) {
+          this.$message.error('审核意见不能超出50字')
         } else {
           woekflowhandle({
               taskId: this.deptBudgetList.taskId,

+ 70 - 28
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -43,6 +43,11 @@
       </el-form-item> -->
       <el-form-item label="仓库地址" prop="warehouseAddress" class="forlist">
         <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
+      </el-form-item> 
+      <el-form-item label="货源" prop="weight" class="forlist supplyofgoods">
+        <el-input disabled v-model="goodstext" placeholder="" size="small" @input='inputChange'>
+        </el-input>
+        <el-button @click='selectgoods' type="primary">选择货源</el-button>
       </el-form-item>
       <el-form-item prop="goodsName" label="货名">
         <el-select disabled v-model="deptBudgetList.goodsName" placeholder="自动获取,不可编辑" @change="dataFlush" filterable clearable>
@@ -65,13 +70,9 @@
       <el-form-item label="可用储量(吨)" prop="useWeight" class="forlist">
         <el-input disabled v-model="deptBudgetList.useWeight" placeholder="请输入可用储量" size="small"></el-input>
       </el-form-item> -->
-      <el-form-item label="货源" prop="weight" class="forlist supplyofgoods">
-        <el-input disabled v-model="goodstext" placeholder="" size="small" @input='inputChange'>
-        </el-input>
-        <el-button @click='selectgoods' type="primary">选择货源</el-button>
-      </el-form-item>
+     
       <el-form-item label="本单重量(吨)" prop="weight" class="forlist">
-        <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" >
+        <el-input disabled v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" >
         </el-input>
       </el-form-item>
       <el-form-item label="折干重量(吨)" prop="weight" class="forlist">
@@ -93,12 +94,12 @@
       <div>外审部门</div>
       <el-form-item prop="bank" label="银行">
         <el-select v-model="deptBudgetList.bank" placeholder="请选择银行" @change="bankChange">
-          <el-option :label="item.constValue" :value="item.constValue" v-for="(item,index) in bankList" :key="index"></el-option>
+          <el-option :label="item.compName" :value="item.compName" v-for="(item,index) in bankList" :key="'yinhang'+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="无" @change="threeChange" filterable clearable>
-          <el-option :label="item1.constValue" :value="item1.constValue" v-for="(item1,index) in threeList" :key="index"></el-option>
+          <el-option :label="item1.compName" :value="item1.compName" v-for="(item1,index) in threeList" :key="index"></el-option>
           <!-- <el-option label="第三方2" value="three2"></el-option> -->
         </el-select>
       </el-form-item>
@@ -149,7 +150,6 @@
         size: 10,
         compId: '',
         warehouseList: [],
-        compOptionList: [],
         cwNumberList: [],
         goodsList: [],
         db:{},
@@ -165,6 +165,7 @@
       }
     },
     async activated() {
+      console.log(this.$refs)
       this.compId = localStorage.getItem('ws-pf_compId')
       this.deptBudgetList.compId = this.compId
       this.deptBudgetList.renownId = this.compId
@@ -172,7 +173,7 @@
       // 
       let i = localStorage.getItem('pageUp')
       this.getList()
-      
+      this.getcompList()
       // getcomp({userMobilePhone:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')).loginInfo.userMobilePhone}).toPromise().then((res)=>{
         console.log(localStorage.getItem('ws-pf_compName'))
         this.deptBudgetList.renown=localStorage.getItem('ws-pf_compName')
@@ -211,8 +212,12 @@
         
     },
     methods: {
-      selectgoods(){
+      async selectgoods(){
         localStorage.setItem('warehouseReceiptdata',JSON.stringify(this.deptBudgetList))
+        var data=await global.default.getDataByKey(this.db,'signalChat',1)
+        if(data){
+          global.default.deleteDB(this.db,'signalChat',1)
+        }
         this.$router.push({
           name: 'warehouseReceiptgoods',
           query: {
@@ -221,6 +226,7 @@
             warehouseName: this.deptBudgetList.warehouseName,
             warehouseType: this.deptBudgetList.warehouseType,
             warehouseNo:this.deptBudgetList.warehouseNo,
+            billNo:this.deptBudgetList.billNo,
           }
         })
       },
@@ -231,36 +237,48 @@
         }
       },
       //银行改变
-      bankChange(e){ 
-           this.deptBudgetList.bank = e
+      bankChange(e){
+          for (let i = 0; i < this.bankList.length; i++) {
+            if(this.bankList[i].compName == e){
+              this.deptBudgetList.bankId = this.bankList[i].compId
+            }
+          }
       },
       //第三方
       threeChange(e){
-             this.deptBudgetList.three = e
+        for (let i = 0; i < this.threeList.length; i++) {
+            if(this.threeList[i].compName == e){
+              this.deptBudgetList.threeId = this.threeList[i].compId
+            }
+          }
       },
       getList() {
         // this.deptBudgetList.grade = '二等'
-        WarehouseReceiptBankList({constId:'BANK1'}).toPromise().then((response) => {
-          this.bankList = response
-        })
-         WarehouseReceiptBankList({constId:'THREE1'}).toPromise().then((response) => {
-          this.threeList = response
-        })
+        // 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 =  localStorage.getItem('ws-pf_compDomainName')+response
+          this.deptBudgetList.billNo =  localStorage.getItem('ws-pf_compSimpleNameEn')+response
         })
         this.getWarehouse()
       },
       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.changeCompOptionList(res[0].compId)
+            this.threeList = res
           })
           .catch((err) => {})
       },
@@ -490,7 +508,7 @@
         isValidate = this.validate()
         console.log(isValidate)
         if (isValidate) {
-          this.$confirm(`确定提交审核?`, {
+         this.$confirm(`确定提交审核?`, {
             cancelButtonText: '取消',
             confirmButtonText: '确定',
             type: 'warning',
@@ -501,6 +519,19 @@
               localStorage.removeItem('warehouseReceiptdata')
               this.$message.success('提交成功')
               global.default.deleteDB(this.db,'signalChat',1)
+              this.goodstext='已选0辆车'
+              this.$refs.upload.clearFiles()
+              this.deptBudgetList={
+                goodsName:'',
+                goodsNameKey:'',
+                useWeight:'',
+                nowWeight:'',
+                warehouseNo:'',
+                warehouseName:'',
+                renown:'',
+                weight:'',
+                interest:''
+              },
               this.$router.push({
                 path: 'warehouseReceiptRegulation'
               })
@@ -523,10 +554,21 @@
           })
       },
       cancel() {
-        localStorage.removeItem('pageUp')
         localStorage.removeItem('pageUp')
         localStorage.removeItem('warehouseReceiptdata')
         global.default.deleteDB(this.db,'signalChat',1)
+        this.goodstext='已选0辆车'
+              this.deptBudgetList={
+                goodsName:'',
+                goodsNameKey:'',
+                useWeight:'',
+                nowWeight:'',
+                warehouseNo:'',
+                warehouseName:'',
+                renown:'',
+                weight:'',
+                interest:''
+              },
         this.$router.push({
           path: 'warehouseReceiptRegulation'
         })

+ 77 - 31
src/views/tradeServicesManagement/warehouseReceiptEdit.vue

@@ -29,7 +29,7 @@
         </el-select> -->
       </el-form-item>
       <el-form-item label="仓库名称" span="1" prop="warehouseName" class="forlist">
-        <el-select v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" @change="changeWarehouse" filterable
+        <el-select disabled v-model="deptBudgetList.warehouseName" placeholder="请选择仓库" @change="changeWarehouse" filterable
           clearable>
           <el-option :label="item.warehouseName" :value="item.id" v-for="(item,index) in warehouseList" :key="index">
           </el-option>
@@ -45,6 +45,11 @@
       <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 label="货源" prop="weight" class="forlist supplyofgoods">
+        <el-input disabled v-model="goodstext" placeholder="" size="small" >
+        </el-input>
+        <el-button @click='selectgoods' type="primary">选择货源</el-button>
+      </el-form-item>
       <el-form-item prop="goodsName" label="货名" span="1">
         <el-select v-model="deptBudgetList.goodsName" disabled placeholder="请选择货名" @change="changeGoodsName" filterable
           clearable>
@@ -66,21 +71,17 @@
       <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="货源" prop="weight" class="forlist supplyofgoods">
-        <el-input disabled v-model="goodstext" placeholder="" size="small" >
-        </el-input>
-        <el-button @click='selectgoods' type="primary">选择货源</el-button>
-      </el-form-item>
+      
       <el-form-item label="本单重量(吨)" span="1" prop="weight" class="forlist">
-        <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small">
+        <el-input disabled v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small">
         </el-input>
       </el-form-item>
       <el-form-item label="折干重量(吨)" prop="weight" class="forlist">
         <el-input v-model="deptBudgetList.dryOutWeight" 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 label="单价(元/吨)" span="1" prop="unitPrice" class="forlist">
+        <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" @input='inputChange' size="small"></el-input>
       </el-form-item>
       <el-form-item label="货值(元)" span="1" prop="totalValue" class="forlist">
         <el-input type='number' v-model="deptBudgetList.totalValue" disabled placeholder="自动计算,不可编辑" size="small">
@@ -98,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>
@@ -188,7 +189,7 @@
       
       if(localStorage.getItem('warehouseReceipteditdata')){
         this.deptBudgetList=JSON.parse(localStorage.getItem('warehouseReceipteditdata'))
-        var data=await global.default.getDataByKey(this.db,'signalChat',1)
+        var data=await global.default.getDataByKey(this.db,'signalChat',2)
         if(data){
           this.deptBudgetList.weight=''
           var weight = 0
@@ -216,8 +217,12 @@
       }
     },
     methods: {
-      selectgoods(){
+      async selectgoods(){
         localStorage.setItem('warehouseReceipteditdata',JSON.stringify(this.deptBudgetList))
+        // var data=await global.default.getDataByKey(this.db,'signalChat',2)
+        // if(data){
+        //   global.default.deleteDB(this.db,'signalChat',2)
+        // }
         console.log(this.deptBudgetList)
         this.$router.push({
           name: 'warehouseReceipteditgoods',
@@ -227,6 +232,7 @@
             warehouseName: this.deptBudgetList.warehouseName,
             warehouseType: this.deptBudgetList.warehouseType,
             warehouseNo:this.deptBudgetList.warehouseNo,
+            billNo:this.deptBudgetList.billNo,
           }
         })
       },
@@ -237,15 +243,37 @@
         }
       },
       //银行改变
-      bankChange(e) {
-        this.deptBudgetList.bank = e
+      bankChange(e){
+          for (let i = 0; i < this.bankList.length; i++) {
+            if(this.bankList[i].compName == e){
+              this.deptBudgetList.bankId = this.bankList[i].compId
+            }
+          }
       },
       //第三方
-      threeChange(e) {
-        this.deptBudgetList.three = e
+      threeChange(e){
+        for (let i = 0; i < this.threeList.length; i++) {
+            if(this.threeList[i].compName == e){
+              this.deptBudgetList.threeId = this.threeList[i].compId
+            }
+          }
       },
       //返回
       cancel() {
+        localStorage.removeItem('warehouseReceipteditdata')
+        global.default.deleteDB(this.db,'signalChat',2)
+        this.goodstext='已选0辆车'
+              this.deptBudgetList={
+                goodsName:'',
+                goodsNameKey:'',
+                useWeight:'',
+                nowWeight:'',
+                warehouseNo:'',
+                warehouseName:'',
+                renown:'',
+                weight:'',
+                interest:''
+              },
         this.$router.push({
           path: 'warehouseReceiptRegulation'
         })
@@ -293,17 +321,15 @@
         let _data = this.warehouseList
         for (let i = 0; i < _data.length; i++) {
           if (_data[i].id == val) {
-            var data=await global.default.getDataByKey(this.db,'signalChat',1)
+            var data=await global.default.getDataByKey(this.db,'signalChat',2)
             if(data){
               if(data.modification&&data.modification.length>0){
-                global.default.deleteDB(this.db,'signalChat',1)
+                global.default.deleteDB(this.db,'signalChat',2)
                 this.deptBudgetList.weight = ''
                 this.deptBudgetList.dryOutWeight = ''
+                this.goodstext='已选0辆车'
               }
             }
-            
-            this.goodstext='已选0辆车'
-            
             this.deptBudgetList.warehouseName = _data[i].warehouseName
             this.deptBudgetList.warehouseType =_data[i].warehouseType
             this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
@@ -352,13 +378,17 @@
         }
       },
       getcompList() {
-        //公司名下拉
-        getcompList()
+        //获取银行
+        getcompList({compFax:1})
           .toPromise()
           .then((res) => {
-            this.compOptionList = res
-            // this.deptBudgetList.renown = res[0].compName
-            this.changeCompOptionList(res[0].compId)
+            this.bankList = res
+          })
+          .catch((err) => {})
+          getcompList({compFax:2})
+          .toPromise()
+          .then((res) => {
+            this.threeList = res
           })
           .catch((err) => {})
       },
@@ -368,7 +398,7 @@
             compId: this.compId,
             warehouseType:1
           }).toPromise()
-            var data=await global.default.getDataByKey(this.db,'signalChat',1)
+            var data=await global.default.getDataByKey(this.db,'signalChat',2)
             if(data){
               if(!data.modification||data.modification.length==0){
                 this.changeWarehouse(this.deptBudgetList.warehouseId)
@@ -390,6 +420,9 @@
             workflowId: this.$route.query.workflowId
           })
           .toPromise()
+          if(this.deptBudgetList.warehouseInOutInfoList.length>0){
+            this.goodstext=`已选${this.deptBudgetList.warehouseInOutInfoList.length}辆车`
+          }
         //审核记录
         this.taskhistories = await  getWarehouseReceiptExamine({
             businessKey: this.$route.query.id,
@@ -398,7 +431,7 @@
           this.getcompList()
       },
       async submit() {
-        var data=await global.default.getDataByKey(this.db,'signalChat',1)
+        var data=await global.default.getDataByKey(this.db,'signalChat',2)
         if(data){
           if(data.modification){
             this.deptBudgetList.warehouseInOutInfoList=data.modification
@@ -412,7 +445,20 @@
             .then((response) => {
               localStorage.removeItem('warehouseReceipteditdata')
               this.$message.success('提交成功')
-              global.default.deleteDB(this.db,'signalChat',1)
+              global.default.deleteDB(this.db,'signalChat',2)
+              this.$refs.upload.clearFiles()
+              this.goodstext='已选0辆车'
+              this.deptBudgetList={
+                goodsName:'',
+                goodsNameKey:'',
+                useWeight:'',
+                nowWeight:'',
+                warehouseNo:'',
+                warehouseName:'',
+                renown:'',
+                weight:'',
+                interest:''
+              }
               this.$router.push({
                 path: 'warehouseReceiptRegulation'
               })
@@ -504,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) => {})
       },

+ 62 - 16
src/views/tradeServicesManagement/warehouseReceiptRegulation.vue

@@ -23,47 +23,61 @@
         <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
         height="calc(100% - 100px)">
-        <el-table-column type="index" label="序号">
+        <el-table-column fixed type="index" label="序号">
           <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="billNo" label="业务编号"></el-table-column>
-        <el-table-column prop="warehouseName" label="仓库名"></el-table-column>
+        <el-table-column fixed prop="billNo" label="业务编号" width="130"></el-table-column>
+        <el-table-column fixed prop="warehouseName" label="仓库名" width="130"></el-table-column>
         <el-table-column prop="goodsName" label="货名" width="130"></el-table-column>
-        <el-table-column prop="weight" label="重量(吨)" width="100"></el-table-column>
+        <el-table-column prop="weight" label="净重(吨)" width="100"></el-table-column>
+        <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="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="amountRepaid" label="已还金额(元)" width="150"></el-table-column>
         <el-table-column prop="amountToRepaid" label="待还金额(元)" width="150"></el-table-column>
-        <el-table-column prop="approveStatus" label="状态">
+        <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>
@@ -131,10 +145,12 @@
     deleteTrageInfo,
     getDefault,
     setDefault,
-    openlock
+    openlock,
+    WarehouseReceiptUpdate
   } from '@/model/tradeServicesManagement/index'
   import {
     selectWarehouseSelf,
+    
   } from '@/model/houseSelfCollect/index'
   import {
     billoperatehis,
@@ -164,7 +180,8 @@
         dialogVisible1:false,
         dataList:[],
         checkList:[],
-        currectData:{}
+        currectData:{},
+        compFax:localStorage.getItem('ws-pf_compFax')
       }
     },
     activated() {
@@ -203,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
@@ -438,6 +480,10 @@
         position: absolute;
         right: 0;
       }
+      .releaseGrain{
+        position: absolute;
+        right: 80px;
+      }
     }
 
     .search-input {