Bladeren bron

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

achao 1 jaar geleden
bovenliggende
commit
508837cdb8

+ 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'),
     }
   },

+ 5 - 0
src/lang/zh.js

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

+ 48 - 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: [],
@@ -210,6 +210,22 @@ const tradeServicesManagementRouter = {
       },
       hidden: true
     },
+    //查看货源
+    {
+      path: 'lookgoods',
+      component: () =>
+        import( /* webpackChunkName: "applDetail" */ '@/views/tradeServicesManagement/lookgoods'),
+      name: 'lookgoods',
+      meta: {
+        title: 'lookgoods',
+        shortcutEntrance: 'warehouseReceiptRegulation',
+        module: 'tradeServicesManagement.tradeService.edit',
+        permissicon: [],
+        keepAlive: true,
+        _title:'查看货源'
+      },
+      hidden: true
+    },
     //查看仓单
     {
       path: 'warehouseReceiptLook',
@@ -240,6 +256,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 {

+ 878 - 0
src/views/tradeServicesManagement/lookgoods.vue

@@ -0,0 +1,878 @@
+<template>
+  <div class="container">
+    <el-row class="top">
+      <el-col :span="18">
+        <h2 class="bg-left title1">查看货源</h2>
+      </el-col>
+      <el-col :span="6" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnWarehouse()">返回</el-button>
+      </el-col>
+    </el-row>
+    <div class="center">
+        <el-table ref="tableData" :data="warehouseList" height="570" >
+          <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="contractNo" label="货源归属" width="130"> </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">
+          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+            :current-page="currentPage" :page-sizes="[10, 30, 50, 100,500,1000,9999]"
+            layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
+        </div>
+      </ws-form>
+    </div>
+    <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose">
+      <p>查看附件</p>
+      <el-image style="width: 100px; height: 100px" :src="appendixIdss" :preview-src-list="srcList">
+      </el-image>
+    </WinseaContentModal>
+  </div>
+
+</template>
+
+
+<script>
+  import {
+    addselectinfoList,
+    recordss,
+    getPrintInfo,
+    getExpense,
+
+  } from '@/model/warehouse/index'
+  import {
+    getWarehouseReceiptLook,
+  } from '@/model/tradeServicesManagement/index'
+  import {
+    packList,
+  } from '@/model/contarct/index'
+  import * as global from '@/global'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        binnumberList: [],
+        // 船舶类型
+        monetaryKey: null,
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        form:{},
+        contractNo:{},
+        show:false,
+        srcList: [],
+        binded:'0',
+        goodsName:'',
+        currectdata:{
+          compId: localStorage.getItem('ws-pf_compId'),
+        },
+        inOutType:'',
+        goodsList:[],
+        num:0,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        capacity: '',
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        remark: '',
+        binNumber: '全部仓位',
+        status: 1,
+        value2: [],
+        appendixIdss: '',
+        // 提交类型
+        submitType: true,
+        selectpackingMethod: {},
+        size: 10,
+        warehouseType: '1',
+        taskNolist1:[],
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        pcFlag: 1,
+        goodnameList:[],
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        warehouseList: [],
+        taskNolist:[],
+        taskNolist1:[],
+        arr2:[],
+        deptBudgetList: {},
+        historyList: [],
+        searchType: 3,
+        allurl: '../../../public/img/radio.png',
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+        modification: [],
+        printList: [], //批量打印数据
+        warehouseAllXiaLa:[],
+        weight:0,
+        id:''
+      }
+    },
+
+    activated() {
+      this.id = this.$route.query.id
+      this.getList()
+      // this.getPassYearFormatDate()
+      this.showType = this.isShow
+    },
+    updated() {
+      this.$nextTick(() => {
+        // this.$refs['tableData'].doLayout();
+      })
+    },
+    methods: {
+      async bindedselect(){
+        const newListLength = new Set(this.modification.map(item => item.goodsName)).size;
+        if ( newListLength>1) {
+          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)
+        if(data){
+          if(data.modification){
+            global.default.updateDB(db,'signalChat',{sequenceId:1,modification:this.modification})
+          }
+        }else{
+          global.default.addData(db,'signalChat',{sequenceId:1,modification:this.modification})
+        }
+        // localStorage.setItem('warehouseReceiptGood',this.modification)
+        this.$router.go(-1)
+      },
+      bindedChange(e){
+        this.binded=e
+        this.getList()
+      },
+      warehousechange(){
+        this.getList()
+      },
+      async salesTransfer(){
+        var arr=[]
+        if (this.modification.length == 0) {
+          this.$message.error("请勾选要转移的条目!")
+        } else {
+          this.num=0
+          for (var i = 0; i < this.modification.length; i++) {
+            if(this.modification[i].inOutType!='销售出库'){
+              this.$message.error("请勾选相同合同编号的销售出库记录!")
+              return
+            }
+            this.num+=Number(this.modification[i].netWeight)
+            if(arr.length==0){
+              arr.push(this.modification[i])
+            }
+            var arr1=arr.filter((item)=>{return item.contractNo==this.modification[i].contractNo})
+            if(arr1.length==0){
+              arr.push(this.modification[i])
+            }
+          }
+          if(arr.length>1){
+            this.$message.error("请勾选相同合同编号的销售出库记录!")
+            return
+          }
+          var contractNo=await getExpense({ contractNo: arr[0].contractNo, compId: this.compId }).toPromise()
+          if(contractNo.status=='已完成'||contractNo.status=='已结算'){
+            this.$message.error("已完成的合同记录不可转移!")
+            return
+          }
+          this.currectdata.warehouseInOutInfoList=this.modification
+          
+          let map = new Map();
+          for (let item of this.modification) {
+            map.set(item.inOutTaskNo, item.inOutTaskNo);
+          }
+          var arr = [...map.values()]
+          console.log(arr)
+          this.currectdata.taskNo=arr.toString()
+          this.currectdata.contractNo=this.modification[0].contractNo
+          this.currectdata.pointOut=contractNo.pointOut
+          this.taskNolist=this.taskNolist1
+          this.arr2=[]
+          for (let i = 0; i < this.taskNolist.length; i++) {
+            if(this.taskNolist[i].contractNo&&this.taskNolist[i].contractNo!=this.currectdata.contractNo||this.taskNolist[i].moveTaskNo&&this.taskNolist[i].moveTaskNo!=this.currectdata.contractNo){
+              this.arr2.push(this.taskNolist[i])
+            }
+          }
+          console.log(this.arr2)
+          this.show=true
+        }
+      },
+      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.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
+        }
+      },
+      binNumberChange(e) {
+        console.log(e)
+        if (e ) {
+         this.goodsName=e
+        } else {
+          this.goodsName=''
+        }
+        this.getList()
+      },
+		/* 获取现在时间,并接受过去时间的值 */
+        getNowFormatDate (formatDate) {
+			var date = new Date()
+			date.setTime(date.getTime()+24*60*60*1000)
+			var seperator1 = '-'
+			var year = date.getFullYear()
+			var month = date.getMonth() + 1
+			var strDate = date.getDate()
+			if (month >= 1 && month <= 9) {
+				month = '0' + month
+			}
+			if (strDate >= 0 && strDate <= 9) {
+				strDate = '0' + strDate
+			}
+			var nowData = year + seperator1 + month + seperator1 + strDate
+			this.value2= [formatDate, nowData]  // 默认赋值一年时间
+   		 },
+			print(row){
+				sessionStorage.removeItem('record_print')
+				getPrintInfo({
+                        id: row.id
+                      })
+                        .toPromise()
+                        .then((response) => {
+                                     localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
+                        })
+			},
+			//返回按钮
+			returnWarehouse() {
+				this.$router.go(-1)
+			},
+			dateFormat(fmt, date) {
+				let ret
+				const opt = {
+					'Y+': date.getFullYear().toString(), // 年
+					'm+': (date.getMonth() + 1).toString(), // 月
+					'd+': date.getDate().toString(), // 日
+					'H+': date.getHours().toString(), // 时
+					// "M+": date.getMinutes().toString(),         // 分
+					// "S+": date.getSeconds().toString()          // 秒
+					// 有其他格式化字符需求可以继续添加,必须转化成字符串
+				}
+				for (let k in opt) {
+					ret = new RegExp('(' + k + ')').exec(fmt)
+					if (ret) {
+						fmt = fmt.replace(
+							ret[1],
+							ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+						)
+					}
+				}
+				return fmt
+			},
+			datechange(){
+        this.currentPage = 1
+				this.getList()
+			},
+			find() {
+        this.currentPage = 1
+      			this.getList()
+    		},
+			handleClose() {
+				this.accessoryTFs = false
+        this.show=true
+			},
+			handleSizeChange(val) {
+				console.log(`每页 ${val} 条`)
+				this.pageSize = val
+				this.getList()
+			},
+			handleCurrentChange(val) {
+				this.currentPage = val
+				console.log(`当前页: ${val}`)
+				this.getList()
+			},
+			record(status, status1) {
+				this.status = status1
+				this.searchType = status
+				this.currentPage = '1'
+				this.getList()
+			},
+			// 上传附件
+			uploadSuccess(data, files, url) {
+				console.log(data, files, url)
+
+				// this.deptBudgetList.
+				// this.formData.append('files', files)
+				// this.feedbackObj.uploadNameAttachment = data.appendixName
+				// this.feedbackObj.pathUploadAttachment = data.appendixPath
+				// // this.newAppendixs = files
+				// this.onChangeFlag = true
+			},
+			getList() {
+        getWarehouseReceiptLook({
+            id: this.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList = response.warehouseInOutInfoList
+          })
+          .catch((req) => {
+            // this.tableData = response.records
+            // this.$message.success('提交失败')
+          })
+			},
+			selecttaskType(e) {
+				for (var i = 0; i < this.taskTypeList.length; i++) {
+					if (this.taskTypeList[i].value == e) {
+						this.searchType = this.taskTypeList[i].type
+					}
+				}
+			},
+			fujian(row) {
+				if (
+					row.addressUrl === null ||
+					row.addressUrl === ''
+				) {
+					EventBus.$emit(
+						'warning',
+						this.$t('system.noticeCircular.NoInformation')
+					)
+				} else {
+					this.accessoryTFs = true
+				}
+				this.appendixIdss = row.addressUrl
+				this.srcList=[row.addressUrl]
+			},
+			// 关闭 dialog时 处理文件url 初始化upload组件
+			handleCloe() {
+				this.dialogViewSpareMoney = false
+			},
+			history(row) {
+				console.log(row)
+				billoperatehis({
+						id: row.id
+					})
+					.toPromise()
+					.then((response) => {
+						this.historyList = response
+					})
+			},
+			// async exportlist() {
+			//   const { data } = await export1(
+			//     {
+			//       compId: localStorage.getItem('ws-pf_compId'),
+			//       contractType: this.contractType,
+			//       currentPage: this.currentPage,
+			//       pageSize: this.pageSize,
+			//       searchType: this.searchType,
+			//       searchKeyWord: this.searchKeyWord,
+			//       startDate: this.startDate,
+			//       endDate: this.endDate,
+			//     },
+			//     {},
+			//     { responseType: 'blob' }
+			//   ).toPromise()
+			//   downloadFile({
+			//     res: data,
+			//     fileName: `${
+			//       this.date.year + (this.date.month ? `-${this.date.month}` : '')
+			//     }_采购合同`,
+			//     type: 'xls',
+			//   })
+			// },
+			// deletecontract(){},
+			//删除
+
+			approve() {},
+			listQuery() {},
+			total() {},
+			clearfiltQuery() {},
+			selectCrtDuty() {},
+		},
+	}
+</script>
+<style lang="scss" scoped>
+  /deep/.totalStorage .el-input__inner {
+    color: #afb5cb;
+    background: #f5f7fa;
+  }
+
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
+
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 13px;
+  }
+
+  .position {
+    position: relative;
+  }
+
+  .add,
+  .del {
+    position: absolute;
+    right: -38px;
+    top: 9px;
+    cursor: pointer;
+  }
+
+  .del {
+    right: -70px;
+  }
+
+  .amap-page-container {
+    width: 300px;
+    height: 300px;
+  }
+
+  .ware {
+    font-size: 12px;
+    color: rgb(255, 255, 255);
+    padding: 3px;
+    position: relative;
+    top: -1px;
+    border-radius: 3px;
+    display: inline-block;
+    text-align: center;
+  }
+
+  .title1 {
+    position: relative;
+  }
+
+  .title1::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .ws-info-table {
+    border-left: 1px solid transparent;
+    border-top: 1px solid transparent;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .adjustment.el-button--primary {
+    background-color: #51cdd9;
+    border-color: #51cdd9;
+  }
+
+  .top .el-col {
+    background: #f6f7fc;
+  }
+
+  .record {
+    background: #fff;
+    color: #8890b1;
+    border-color: #fff;
+    display: inline-block;
+    margin-bottom: 10px;
+    cursor: pointer;
+    margin-left: 5px;
+    margin-right: 5px;
+  }
+
+  .record img {
+    position: relative;
+    top: 2px;
+  }
+
+  .record.active img {
+    position: relative;
+    top: 4px;
+  }
+
+  .record.active {
+    color: #262626;
+  }
+
+  .button-container {
+    display: flex;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+    align-items: center;
+    background-color: #fff;
+    width: 100%;
+    height: 50px;
+    padding: 0 10px;
+
+    &>div {
+      margin-left: 10px;
+      display: flex;
+      flex-wrap: nowrap;
+      flex-direction: row;
+
+      &>span {
+        line-height: 50px;
+      }
+    }
+
+    /deep/.auditFlow-box {
+      position: unset;
+      margin-left: 10px;
+
+      &/deep/.auditFlow-icon {
+        width: auto;
+        padding-right: 30px;
+      }
+
+      &/deep/.auditFlow-main {
+        position: absolute;
+      }
+    }
+  }
+
+  .box-app {
+    display: inline-block;
+    float: left;
+    margin-left: 30px;
+    line-height: 50px;
+  }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .top-grade {
+    background: linear-gradient(90deg, #5678e9, #7993f6);
+    color: #fff;
+    padding: 3px;
+    border-radius: 2px;
+  }
+
+  .second-class {
+    background: linear-gradient(90deg, #50cdd9, #82e2ea);
+    color: #fff;
+    padding: 3px;
+    border-radius: 2px;
+  }
+
+  .third-class {
+    background: linear-gradient(90deg, #ffa735, #ffbf70);
+    color: #fff;
+    padding: 3px;
+    border-radius: 2px;
+  }
+
+  .substandard {
+    background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+    color: #fff;
+    padding: 3px;
+    border-radius: 2px;
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 15px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .wenzi {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 10px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    padding: 0 15px;
+  }
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  .ce {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  .hide-sel {
+    .el-input__inner {
+      border: 0px;
+    }
+
+    .el-icon-arrow-up {
+      display: none;
+    }
+
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+    }
+
+    .el-date-editor {
+      i {
+        display: none;
+      }
+    }
+
+    .is-disabled {
+      .el-input__inner:hover {
+        background-color: #fff !important;
+        border: 0;
+      }
+
+      color: #606266;
+
+      .el-input__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+
+      .el-textarea__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+    }
+  }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  .el-textarea__inner {
+    display: none;
+  }
+
+  .readonly {
+    width: 16%;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 14.28%;
+  }
+
+  .dataClass {
+    width: 20% !important;
+  }
+
+  .input {
+    width: 50% !important;
+  }
+
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    background-color: #f6f7fc;
+    font-size: 12px;
+    height: 45px;
+  }
+
+  //去边框
+  /deep/.el-form-item {
+    border-right: 0px;
+    border-bottom: 0px;
+  }
+
+  /deep/.ws-info-table {
+    border-left: 0px;
+    border-top: 0px;
+  }
+
+  .ws-info-table .el-form-item .el-form-item__content {
+    border-right: 0px;
+    border-bottom: 0px;
+    border-left: 0px;
+    border-top: 0px;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 0px;
+    border-bottom: 0px;
+    border-left: 0px;
+    border-top: 0px;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    background: #f5f7fa;
+    border-radius: 4px;
+    border: 1px solid #d8dce6;
+    font-family: PingFangSC-Regular, PingFang SC;
+    margin-bottom: 5px;
+    background-color: #fff;
+    font-size: 14px;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: 0px;
+  }
+
+  /deep/.el-table td,
+  /deep/.el-table .el-table__header .cell {
+    text-align: center;
+  }
+
+  .binNo {
+    color: #333;
+    font-size: 18px;
+    margin-left: 20px;
+  }
+  .top-row{
+    margin:10px 0;
+  }
+</style>

+ 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>

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

@@ -0,0 +1,486 @@
+// 还款
+<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="companyChange1"
+  >
+          <el-option key="全部公司" label="全部公司" value="" style="color: #8890b1" />
+          <el-option v-for="item in companyList" :key="item.renownId" :label="item.renown" :value="item.renown"
+            style="color: #8890b1" />
+        </el-select>
+        <el-select v-model="borrowingWarehouse" placeholder="选择仓库" class="typeselect" @change="getList">
+          <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">
+                <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">
+                <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">
+                <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'),
+          repaymentEdAmount:''
+        },
+        value2:[],
+        deptBudgetTotal:0,
+        compId:localStorage.getItem('ws-pf_compId'),
+        id:"",
+        contractNo:"",
+        accessoryTFs:false,
+        appendixIdss:"",
+        bankId:'',
+        warehouseList:[],
+        goodsList:[],
+        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
+         }
+        }
+      },
+      companyChange1(e){
+        console.log(e,1111111)
+        for (let i = 0; i < this.companyList.length; i++) {
+         if(this.companyList[i].renown==this.borrowingCompany){
+            this.warehouseList1 = 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.warehouseList[i].warehouseId
+          this.$set(this.stillMoney,'goodsName','')
+            this.goodsList = this.warehouseList[i].goodsNameList
+            // console.log(this.goodsList,11111)
+         }
+        }
+      },
+      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.borrowingCompany){
+          this.$message.error("请选择借款公司!")
+          return
+        }
+        if(!this.stillMoney.borrowingWarehouse){
+          this.$message.error("请选择借款仓库!")
+          return
+        }
+        if(!this.stillMoney.goodsName){
+          this.$message.error("请选择货名!")
+          return
+        }
+        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:'',
+                goodsName:'',
+                borrowingCompany:'',
+                bankId:localStorage.getItem('ws-pf_compId'),
+                repaymentEdAmount:''}
+               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) => {})
       },

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

@@ -23,47 +23,66 @@
         <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="applicationAmount" label="货源" width="150">
+          <template scope="scope">
+            <el-button @click="lookGoods(scope.row)" type="text">查看</el-button>
+          </template>
+        </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 +150,12 @@
     deleteTrageInfo,
     getDefault,
     setDefault,
-    openlock
+    openlock,
+    WarehouseReceiptUpdate
   } from '@/model/tradeServicesManagement/index'
   import {
     selectWarehouseSelf,
+    
   } from '@/model/houseSelfCollect/index'
   import {
     billoperatehis,
@@ -164,7 +185,8 @@
         dialogVisible1:false,
         dataList:[],
         checkList:[],
-        currectData:{}
+        currectData:{},
+        compFax:localStorage.getItem('ws-pf_compFax')
       }
     },
     activated() {
@@ -203,6 +225,37 @@
 
     },
     methods: {
+      lookGoods(row){
+        this.$router.push({
+          name: 'lookgoods',
+          query:{id:row.id}
+        })
+      },
+      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 +491,10 @@
         position: absolute;
         right: 0;
       }
+      .releaseGrain{
+        position: absolute;
+        right: 80px;
+      }
     }
 
     .search-input {