|
@@ -13,7 +13,7 @@
|
|
|
>
|
|
|
<template slot="menuLeft">
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="应收" name="first" :key="'first'">
|
|
|
+ <el-tab-pane label="应收" name="first" :key="'first'">
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="应付" name="second" :key="'second'">
|
|
|
</el-tab-pane>
|
|
@@ -103,7 +103,7 @@
|
|
|
v-model="row.quantity"
|
|
|
size="small"
|
|
|
placeholder="请输入"
|
|
|
- oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
|
|
|
@input="countChange(row)"
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.quantity }}</span>
|
|
@@ -226,11 +226,11 @@ import option from "./config/feeList.json";
|
|
|
import { getDeptLazyTree, customerList } from "@/api/basicData/basicFeesDesc";
|
|
|
import { delItem } from "@/api/feeInfo/fee-info";
|
|
|
import { isPercentage, micrometerFormat } from "@/util/validate";
|
|
|
-// import customerDialog from "@/components/customer-dialog/main";
|
|
|
import cropDialog from "@/components/crop-dialog/main";
|
|
|
import _ from "lodash";
|
|
|
import ApplyPayment from "../finance/applyPayment";
|
|
|
import {applyLoan,paymentApply} from "@/api/financialManagement/paymentRequest";
|
|
|
+import { contrastList } from "@/util/contrastData";
|
|
|
|
|
|
export default {
|
|
|
name: "feeInfo",
|
|
@@ -291,7 +291,6 @@ export default {
|
|
|
placeholder:'请点击右边按钮选择',
|
|
|
dicData:[]
|
|
|
},
|
|
|
- isUpdata:true,//是否需要触发监听
|
|
|
allData:[],
|
|
|
data_one:[],
|
|
|
data_two:[],
|
|
@@ -346,17 +345,15 @@ export default {
|
|
|
ApplyPayment
|
|
|
},
|
|
|
watch: {
|
|
|
- orderFeesList: function(rows) {
|
|
|
- this.allData = rows ? rows : [];
|
|
|
- if(this.allData.length !=0){
|
|
|
- this.data_one=this.allData.filter(item=>item.feesType === 1) //应收
|
|
|
- this.data_two=this.allData.filter(item=>item.feesType === 2) //应付
|
|
|
- if(this.isUpdata){
|
|
|
- if(this.selectTab == 1){
|
|
|
- this.feeData = this.data_one
|
|
|
- }else{
|
|
|
- this.feeData = this.data_two
|
|
|
- }
|
|
|
+ 'orderFeesList'(newVla,oldVal){
|
|
|
+ if(newVla !== oldVal){
|
|
|
+ this.allData = newVla
|
|
|
+ this.data_one = newVla.filter(item => item.feesType === 1) //应收
|
|
|
+ this.data_two = newVla.filter(item => item.feesType === 2) //应付
|
|
|
+ if (this.selectTab === 1) {
|
|
|
+ this.feeData = this.data_one
|
|
|
+ } else {
|
|
|
+ this.feeData = this.data_two
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -369,26 +366,22 @@ export default {
|
|
|
},
|
|
|
//选择应收应付
|
|
|
handleClick(tab){
|
|
|
- if(tab.name == "first") {
|
|
|
+ if(tab.name === "first"){
|
|
|
this.tab1 = true;
|
|
|
this.tab2 = false;
|
|
|
|
|
|
- //将上一个tab页数据放到 对应data上
|
|
|
this.data_two = this.feeData
|
|
|
|
|
|
this.selectTab = 1
|
|
|
- this.feeData = this.data_one //切换数据
|
|
|
- // this.selectionList = [];
|
|
|
-
|
|
|
- } else if(tab.name == "second") {
|
|
|
+ this.feeData = this.data_one
|
|
|
+ }else{
|
|
|
this.tab1 = false;
|
|
|
this.tab2 = true;
|
|
|
- if(this.selectTab === 1){
|
|
|
- this.data_one = this.feeData
|
|
|
- }
|
|
|
+
|
|
|
+ this.data_one = this.feeData
|
|
|
+
|
|
|
this.selectTab = 2
|
|
|
this.feeData = this.data_two
|
|
|
- // this.selectionList = [];
|
|
|
}
|
|
|
},
|
|
|
cellStyle() {
|
|
@@ -492,8 +485,10 @@ export default {
|
|
|
},
|
|
|
//新增
|
|
|
rowAdd() {
|
|
|
- this.$refs.feeCrud.rowCellAdd();
|
|
|
- // this.$refs.cropDialog.init();
|
|
|
+ const params = {
|
|
|
+ feesType:this.selectTab
|
|
|
+ }
|
|
|
+ this.$refs.feeCrud.rowCellAdd(params);
|
|
|
},
|
|
|
onLoad(page) {
|
|
|
this.loading = true;
|
|
@@ -571,23 +566,15 @@ export default {
|
|
|
this.feeDialog = false;
|
|
|
},
|
|
|
submitData() {
|
|
|
- this.allData = []
|
|
|
+ let list = []
|
|
|
//保存时 将所出的tab页数据赋值到相应 data上
|
|
|
- if(this.selectTab == 1){
|
|
|
- this.data_one = this.feeData
|
|
|
- this.data_one.map(item =>{
|
|
|
- delete item.$cellEdit
|
|
|
- delete item.$index
|
|
|
- })
|
|
|
+ if(this.selectTab === 1){
|
|
|
+ this.data_one = this.feeData
|
|
|
}else{
|
|
|
- this.data_two = this.feeData
|
|
|
- this.data_two.map(item =>{
|
|
|
- delete item.$cellEdit
|
|
|
- delete item.$index
|
|
|
- })
|
|
|
+ this.data_two = this.feeData
|
|
|
}
|
|
|
- this.allData.push(...this.data_one,...this.data_two)
|
|
|
- return this.allData;
|
|
|
+ list.push(...this.data_one,...this.data_two)
|
|
|
+ return list
|
|
|
},
|
|
|
|
|
|
billingDetails(type){
|
|
@@ -599,11 +586,10 @@ export default {
|
|
|
return this.$message.error('批量操作结算单位必须一致')
|
|
|
}
|
|
|
if(this.selectionList[i].isCheck == 1){
|
|
|
- return this.$message.error('批量操作结算单位必须一致b')
|
|
|
+ return this.$message.error("选中的数据已"+type+",请勿重复操作!")
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- this.isUpdata = false
|
|
|
this.selectionList.map(item =>{
|
|
|
// item.url = this.billUrl
|
|
|
item.srcOrderno = params.srcOrderno
|
|
@@ -630,6 +616,7 @@ export default {
|
|
|
applyLoan(data).then(res=>{
|
|
|
if(res.data.success){
|
|
|
this.$message.success("操作成功!")
|
|
|
+ this.$emit("afterFinance")
|
|
|
//跳转付费申请页面
|
|
|
if(this.$store.getters.pqStatus){
|
|
|
this.$alert("无法自动跳,因为付费申请页面已存在!", "温馨提示", {
|
|
@@ -648,7 +635,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}).finally(()=>{
|
|
|
- this.isUpdata = true
|
|
|
this.buttonLoading = false
|
|
|
})
|
|
|
})
|
|
@@ -662,9 +648,9 @@ export default {
|
|
|
paymentApply(data).then(res=>{
|
|
|
if(res.data.success){
|
|
|
this.$message.success("操作成功!")
|
|
|
+ this.$emit("afterFinance")
|
|
|
}
|
|
|
}).finally(()=>{
|
|
|
- this.isUpdata = true
|
|
|
this.buttonLoading = false
|
|
|
})
|
|
|
})
|