|  | @@ -471,6 +471,8 @@ import Vue from "vue";
 | 
											
												
													
														|  |  import Cookies from "js-cookie";
 |  |  import Cookies from "js-cookie";
 | 
											
												
													
														|  |  import { addSet, select } from "@/api/system/set";
 |  |  import { addSet, select } from "@/api/system/set";
 | 
											
												
													
														|  |  import { getVesselName, listChange } from '@/api/finance/applyForInvoice/feeDetail'
 |  |  import { getVesselName, listChange } from '@/api/finance/applyForInvoice/feeDetail'
 | 
											
												
													
														|  | 
 |  | +import { MessageBox } from 'element-ui'
 | 
											
												
													
														|  | 
 |  | +import store from '@/store'
 | 
											
												
													
														|  |  Vue.directive("dialogDrag", {
 |  |  Vue.directive("dialogDrag", {
 | 
											
												
													
														|  |    bind(el, binding, vnode, oldVnode) {
 |  |    bind(el, binding, vnode, oldVnode) {
 | 
											
												
													
														|  |      const dialogHeaderEl = el.querySelector(".el-dialog__header");
 |  |      const dialogHeaderEl = el.querySelector(".el-dialog__header");
 | 
											
										
											
												
													
														|  | @@ -787,30 +789,35 @@ export default {
 | 
											
												
													
														|  |      // this.getRow();
 |  |      // this.getRow();
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    activated() {
 |  |    activated() {
 | 
											
												
													
														|  | -    this.doNot = true
 |  | 
 | 
											
												
													
														|  | -    listCorps().then((response) => {
 |  | 
 | 
											
												
													
														|  | -      this.fMblnoOptions = response;
 |  | 
 | 
											
												
													
														|  | -      let data = JSON.parse(this.$route.query.data)
 |  | 
 | 
											
												
													
														|  | -      this.queryParams.fCorpid = data.fCorpid
 |  | 
 | 
											
												
													
														|  | -      this.queryParams.fSrcidList = data.fSrcid
 |  | 
 | 
											
												
													
														|  | -      this.queryParams.fSrcpidList = data.fSrcpid
 |  | 
 | 
											
												
													
														|  | -      this.queryParams.billsType = data.billsType
 |  | 
 | 
											
												
													
														|  | -      let list = this.queryParams
 |  | 
 | 
											
												
													
														|  | -      console.log(this.fMblnoOptions)
 |  | 
 | 
											
												
													
														|  | -      for (let item in this.fMblnoOptions){
 |  | 
 | 
											
												
													
														|  | -        console.log(data.fCorpid)
 |  | 
 | 
											
												
													
														|  | -        if (data.fCorpid == this.fMblnoOptions[item].fName){
 |  | 
 | 
											
												
													
														|  | -          list.fCorpid = this.fMblnoOptions[item].fId
 |  | 
 | 
											
												
													
														|  | -          console.log('1111')
 |  | 
 | 
											
												
													
														|  | -          getcontrastList(list).then(response=>{
 |  | 
 | 
											
												
													
														|  | -            console.log(response)
 |  | 
 | 
											
												
													
														|  | -            if(response.rows){
 |  | 
 | 
											
												
													
														|  | -              this.chargeList = response.rows
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | -          })
 |  | 
 | 
											
												
													
														|  | 
 |  | +    if(this.$route.query.data){
 | 
											
												
													
														|  | 
 |  | +      listCorps().then((response) => {
 | 
											
												
													
														|  | 
 |  | +        this.fMblnoOptions = response;
 | 
											
												
													
														|  | 
 |  | +        let data = JSON.parse(this.$route.query.data)
 | 
											
												
													
														|  | 
 |  | +        let queryParams = {}
 | 
											
												
													
														|  | 
 |  | +        this.queryParams.fCorpid = data.fCorpid
 | 
											
												
													
														|  | 
 |  | +        queryParams.fCorpid = data.fCorpid
 | 
											
												
													
														|  | 
 |  | +        queryParams.fCorpid = data.fCorpid
 | 
											
												
													
														|  | 
 |  | +        queryParams.fSrcidList = data.fSrcid
 | 
											
												
													
														|  | 
 |  | +        queryParams.fSrcpidList = data.fSrcpid
 | 
											
												
													
														|  | 
 |  | +        queryParams.billsType = data.billsType
 | 
											
												
													
														|  | 
 |  | +        this.queryParams.fId = data.fId
 | 
											
												
													
														|  | 
 |  | +        // let list = queryParams
 | 
											
												
													
														|  | 
 |  | +        for (let item in this.fMblnoOptions){
 | 
											
												
													
														|  | 
 |  | +          if (data.fCorpid == this.fMblnoOptions[item].fName){
 | 
											
												
													
														|  | 
 |  | +            this.doNot = true
 | 
											
												
													
														|  | 
 |  | +            queryParams.fCorpid = this.fMblnoOptions[item].fId
 | 
											
												
													
														|  | 
 |  | +            this.queryParams.fCorpid = this.fMblnoOptions[item].fId
 | 
											
												
													
														|  | 
 |  | +            console.log(queryParams.fCorpid)
 | 
											
												
													
														|  | 
 |  | +            getcontrastList(queryParams).then(response=>{
 | 
											
												
													
														|  | 
 |  | +              console.log(response)
 | 
											
												
													
														|  | 
 |  | +              if(response.rows){
 | 
											
												
													
														|  | 
 |  | +                this.chargeList = response.rows
 | 
											
												
													
														|  | 
 |  | +              }
 | 
											
												
													
														|  | 
 |  | +            })
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | -    });
 |  | 
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    methods: {
 |  |    methods: {
 | 
											
												
													
														|  |      //提交按钮
 |  |      //提交按钮
 | 
											
										
											
												
													
														|  | @@ -828,34 +835,84 @@ export default {
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  |            if(value === 1 ){
 |  |            if(value === 1 ){
 | 
											
												
													
														|  |              for(let item in this.fMblnoOptions){
 |  |              for(let item in this.fMblnoOptions){
 | 
											
												
													
														|  | -              this.queryParams.fCtrlcorpid = this.fMblnoOptions[item].fName
 |  | 
 | 
											
												
													
														|  | 
 |  | +              if(this.queryParams.fCtrlcorpid == this.fMblnoOptions[item].fId){
 | 
											
												
													
														|  | 
 |  | +                this.queryParams.fCtrlcorpid = this.fMblnoOptions[item].fName
 | 
											
												
													
														|  | 
 |  | +              }
 | 
											
												
													
														|  | 
 |  | +              console.log(this.fMblnoOptions[item].fName)
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  | 
 |  | +          let aug = []
 | 
											
												
													
														|  | 
 |  | +          let bug = []
 | 
											
												
													
														|  | 
 |  | +          for (let item in this.selection) {
 | 
											
												
													
														|  | 
 |  | +            for (let li in this.selection) {
 | 
											
												
													
														|  | 
 |  | +              if (item != li) {
 | 
											
												
													
														|  | 
 |  | +                if (this.selection[item].fSrcid == this.selection[li].fSrcid) {
 | 
											
												
													
														|  | 
 |  | +                  console.log(this.selection[item], this.selection[li])
 | 
											
												
													
														|  | 
 |  | +                  aug.push({
 | 
											
												
													
														|  | 
 |  | +                    index: this.selection[item].fSrcid,
 | 
											
												
													
														|  | 
 |  | +                    id: item,
 | 
											
												
													
														|  | 
 |  | +                    index2: this.selection[li].fSrcid,
 | 
											
												
													
														|  | 
 |  | +                    id2: li
 | 
											
												
													
														|  | 
 |  | +                  })
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +              }
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  | -          this.queryParams.tMblno = this.queryParams.fMblno
 |  | 
 | 
											
												
													
														|  | -          let formData = new window.FormData();
 |  | 
 | 
											
												
													
														|  | -          formData.append('tFee',JSON.stringify(this.queryParams))
 |  | 
 | 
											
												
													
														|  | -          formData.append('tFeeDo',JSON.stringify(this.chargeList))
 |  | 
 | 
											
												
													
														|  | -          formData.append('billsType',this.queryParams.billsType)
 |  | 
 | 
											
												
													
														|  | -          formData.append('tFeeInvoice','')
 |  | 
 | 
											
												
													
														|  | -          addPreservation(formData).then(response=>{
 |  | 
 | 
											
												
													
														|  | -            this.$message.success("操作成功")
 |  | 
 | 
											
												
													
														|  | -            if(this.queryParams.billsType == 'ApplyFP'){
 |  | 
 | 
											
												
													
														|  | -              this.$router.push({path:'/finance/invoiceInformation'})
 |  | 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            }else if(this.queryParams.billsType == 'DZ'){
 |  | 
 | 
											
												
													
														|  | -              this.$router.push({path:'/finance/contrast'})
 |  | 
 | 
											
												
													
														|  | 
 |  | +          console.log(aug)
 | 
											
												
													
														|  | 
 |  | +          let add =''
 | 
											
												
													
														|  | 
 |  | +          let addold =''
 | 
											
												
													
														|  | 
 |  | +          for(let li in aug){
 | 
											
												
													
														|  | 
 |  | +            for(let item in aug)
 | 
											
												
													
														|  | 
 |  | +            if(aug[item].id == aug[li].id2 && aug[item].id2 == aug[li].id){
 | 
											
												
													
														|  | 
 |  | +              aug.splice(item, 1);
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  | 
 |  | +          if(aug.length != 0){
 | 
											
												
													
														|  | 
 |  | +            for (let item in aug){
 | 
											
												
													
														|  | 
 |  | +              addold = parseInt(aug[item].id2)+1
 | 
											
												
													
														|  | 
 |  | +              add += Number(aug[item].id)+1 +'行、'+ addold + '行/'
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            MessageBox.confirm("第" + add + "重复,请重新选择",{
 | 
											
												
													
														|  | 
 |  | +                confirmButtonText: '确定',
 | 
											
												
													
														|  | 
 |  | +                cancelButtonText: '取消',
 | 
											
												
													
														|  | 
 |  | +                type: 'warning'
 | 
											
												
													
														|  | 
 |  | +              }
 | 
											
												
													
														|  | 
 |  | +            ).then(() => {
 | 
											
												
													
														|  | 
 |  | +              return
 | 
											
												
													
														|  | 
 |  | +            })
 | 
											
												
													
														|  | 
 |  | +          }else {
 | 
											
												
													
														|  | 
 |  | +            this.queryParams.tMblno = this.queryParams.fMblno
 | 
											
												
													
														|  | 
 |  | +            for(let item in this.fMblnoOptions){
 | 
											
												
													
														|  | 
 |  | +              if(this.queryParams.fToCorpid == this.fMblnoOptions[item].fId){
 | 
											
												
													
														|  | 
 |  | +                this.queryParams.fToCorpid = this.fMblnoOptions[item].fName
 | 
											
												
													
														|  | 
 |  | +              }
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            let formData = new window.FormData();
 | 
											
												
													
														|  | 
 |  | +            formData.append('tFee',JSON.stringify(this.queryParams))
 | 
											
												
													
														|  | 
 |  | +            formData.append('tFeeDo',JSON.stringify(this.selection))
 | 
											
												
													
														|  | 
 |  | +            formData.append('billsType',this.queryParams.billsType)
 | 
											
												
													
														|  | 
 |  | +            formData.append('tFeeInvoice','')
 | 
											
												
													
														|  | 
 |  | +            addPreservation(formData).then(response=>{
 | 
											
												
													
														|  | 
 |  | +              this.$message.success("操作成功")
 | 
											
												
													
														|  | 
 |  | +              if(this.queryParams.billsType == 'ApplyFP'){
 | 
											
												
													
														|  | 
 |  | +                this.$router.push({path:'/finance/invoiceInformation'})
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            }else if(this.queryParams.billsType == 'SF'){
 |  | 
 | 
											
												
													
														|  | -              this.$router.push({path:'/finance/charge'})
 |  | 
 | 
											
												
													
														|  | 
 |  | +              }else if(this.queryParams.billsType == 'DZ'){
 | 
											
												
													
														|  | 
 |  | +                this.$router.push({path:'/finance/contrast'})
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            }else if(this.queryParams.billsType == 'FF'){
 |  | 
 | 
											
												
													
														|  | -              this.$router.push({path:'/finance/payment'})
 |  | 
 | 
											
												
													
														|  | 
 |  | +              }else if(this.queryParams.billsType == 'SF'){
 | 
											
												
													
														|  | 
 |  | +                this.$router.push({path:'/finance/charge'})
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            }else if(this.queryParams.billsType == 'invoiceFP'){
 |  | 
 | 
											
												
													
														|  | -              this.$router.push({path:'/finance/controlOverInvoices/invoice'})
 |  | 
 | 
											
												
													
														|  | 
 |  | +              }else if(this.queryParams.billsType == 'FF'){
 | 
											
												
													
														|  | 
 |  | +                this.$router.push({path:'/finance/payment'})
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | -          })
 |  | 
 | 
											
												
													
														|  | 
 |  | +              }else if(this.queryParams.billsType == 'invoiceFP'){
 | 
											
												
													
														|  | 
 |  | +                this.$router.push({path:'/finance/controlOverInvoices/invoice'})
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +              }
 | 
											
												
													
														|  | 
 |  | +            })
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |        })
 |  |        })
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
										
											
												
													
														|  | @@ -1060,7 +1117,11 @@ export default {
 | 
											
												
													
														|  |      getList() {
 |  |      getList() {
 | 
											
												
													
														|  |        this.loading = true;
 |  |        this.loading = true;
 | 
											
												
													
														|  |        getcontrastList(this.queryParams).then((response) => {
 |  |        getcontrastList(this.queryParams).then((response) => {
 | 
											
												
													
														|  | 
 |  | +        if(this.doNot == true){
 | 
											
												
													
														|  | 
 |  | +          this.chargeList = this.chargeList.concat(response.rows)
 | 
											
												
													
														|  | 
 |  | +        }else {
 | 
											
												
													
														|  |            this.chargeList = response.rows;
 |  |            this.chargeList = response.rows;
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |            this.total = response.total;
 |  |            this.total = response.total;
 | 
											
												
													
														|  |            this.loading = false;
 |  |            this.loading = false;
 | 
											
												
													
														|  |          });
 |  |          });
 |