高敬炎 1 سال پیش
والد
کامیت
98cb24ee6c

+ 1 - 0
src/lang/zh.js

@@ -581,6 +581,7 @@ export default {
     repayment: '还款',
     payInterest:'付息',
     releaseGrain:'放粮',
+    lookgoods:'查看货源',
     warehouseReceiptEdit: '修改仓单',
     warehouseReceiptLook: '查看仓单',
 

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

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

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

+ 38 - 17
src/views/tradeServicesManagement/releaseGrain.vue

@@ -24,14 +24,13 @@
           start-placeholder="开始日期"
           end-placeholder="结束日期">
         </el-date-picker>
-        <el-select v-model="borrowingCompany" placeholder="选择公司" class="typeselect" @change="getList"
-          :value="searchType">
-          <ws-option key="全部公司" label="全部公司" value="" style="color: #8890b1" />
-          <ws-option v-for="item in companyList1" :key="item.id" :label="item.compName" :value="item.compName"
+        <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"
-          :value="searchType">
+        <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" />
@@ -70,22 +69,19 @@
         <ws-form>
           <ws-info-table>
             <ws-form-item label="借款公司" prop="money">
-              <el-select v-model="stillMoney.borrowingCompany" placeholder="选择借款公司" filterable clearable class="typeselect" @change="companyChange"
-                :value="searchType">
+              <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"
-                :value="searchType">
+              <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"
-                :value="searchType">
+              <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>
@@ -178,6 +174,7 @@
           goodsName:'',
           borrowingCompany:'',
           bankId:localStorage.getItem('ws-pf_compId'),
+          repaymentEdAmount:''
         },
         value2:[],
         deptBudgetTotal:0,
@@ -189,7 +186,6 @@
         bankId:'',
         warehouseList:[],
         goodsList:[],
-        companyList1:[],
         warehouseList1:[],
         borrowingWarehouse:'',
         repaymentIngAmount:0
@@ -244,12 +240,21 @@
          }
         }
       },
+      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.companyList[i].warehouseId
+          this.stillMoney.warehouseId = this.warehouseList[i].warehouseId
           this.$set(this.stillMoney,'goodsName','')
             this.goodsList = this.warehouseList[i].goodsNameList
+            // console.log(this.goodsList,11111)
          }
         }
       },
@@ -314,6 +319,19 @@
       },
       //付款提交
       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
@@ -337,7 +355,7 @@
         return
       }
       console.log("图片",this.stillMoney.repaymentScreenshot)
-        this.$confirm('付息信息提交后不可修改,确定提交?', '提示', {
+        this.$confirm('放粮信息提交后不可修改,确定提交?', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
@@ -348,8 +366,11 @@
             repaymentSubmit(this.stillMoney).toPromise()
             .then((response) => {
               this.$message.success("放粮成功!")
-               this.stillMoney = { repaymentDate:''}
-               this.stillMoney.repaymentScreenshot = ""
+               this.stillMoney = { repaymentDate:'',
+                goodsName:'',
+                borrowingCompany:'',
+                bankId:localStorage.getItem('ws-pf_compId'),
+                repaymentEdAmount:''}
                this.getNowTime()
                this.paymentForm = false
               this.getList()

+ 11 - 0
src/views/tradeServicesManagement/warehouseReceiptRegulation.vue

@@ -49,6 +49,11 @@
         <el-table-column prop="amountRepaid" label="已还金额(元)" width="150"></el-table-column>
         <el-table-column prop="amountToRepaid" label="待还金额(元)" width="150"></el-table-column>
         <el-table-column prop="applicationAmount" label="已付利息(元)" width="150"></el-table-column>
+        <el-table-column prop="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>
@@ -220,6 +225,12 @@
 
     },
     methods: {
+      lookGoods(row){
+        this.$router.push({
+          name: 'lookgoods',
+          query:{id:row.id}
+        })
+      },
       releaseGrain(){
         this.$router.push({
           name: 'releaseGrain'