高敬炎 hace 1 año
padre
commit
d86127ab28

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

@@ -496,6 +496,7 @@
             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_organMonetaryValue', res1.organizationMonetaryValue)
            this.getUserInfo({ vesselBankFlag, compName:res1.compName })
           })

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

@@ -143,11 +143,13 @@ const actions = {
             organizationMonetaryKey,
             compName,
             compDomainName,
+            compSimpleNameEn,
             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_organMonetaryValue', organizationMonetaryValue)
         dispatch('getUserInfo', { vesselBankFlag, compName })
         dispatch('toSetShow', userId)

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

@@ -146,12 +146,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: [],

+ 77 - 50
src/views/tradeServicesManagement/editgoods.vue

@@ -44,8 +44,7 @@
       </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 +79,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 +198,19 @@
         accessoryTFs: false,
         modification: [],
         printList: [], //批量打印数据
-        warehouseAllXiaLa:[]
+        warehouseAllXiaLa:[],
+        billNo:'',
+        db:{}
       }
     },
 
-    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 +238,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)
@@ -348,9 +315,12 @@
         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 +425,7 @@
 				// // this.newAppendixs = files
 				// this.onChangeFlag = true
 			},
-			getList() {
+			async getList() {
         
 					var startDate=''
 					var endDate=''
@@ -463,7 +433,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 +455,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 +523,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()
+                      }
+                      
+                    }
+                  })
+                  
+                }
+
+              }
 						})
             
 				}

+ 54 - 40
src/views/tradeServicesManagement/goods.vue

@@ -44,8 +44,7 @@
       </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 +79,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">
@@ -276,7 +239,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{
@@ -485,7 +448,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 +457,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 +512,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()
+                      }
+                      
+                    }
+                  })
+                  
+                }
+              }
 						})
             
 				}

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

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

+ 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({reserved01:1})
+          .toPromise()
+          .then((res) => {
+            this.bankList = res
+          })
+          .catch((err) => {})
+          getcompList({reserved01: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'
         })

+ 74 - 28
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">
@@ -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({reserved01:1})
           .toPromise()
           .then((res) => {
-            this.compOptionList = res
-            // this.deptBudgetList.renown = res[0].compName
-            this.changeCompOptionList(res[0].compId)
+            this.bankList = res
+          })
+          .catch((err) => {})
+          getcompList({reserved01: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'
               })

+ 7 - 6
src/views/tradeServicesManagement/warehouseReceiptRegulation.vue

@@ -30,23 +30,24 @@
       </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="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="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>