|
@@ -75,13 +75,16 @@
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
editButtonName="编辑"
|
|
editButtonName="编辑"
|
|
|
button1Name="删除"
|
|
button1Name="删除"
|
|
|
|
|
+ button2Name="查看"
|
|
|
|
|
+ button2Background="#409eff"
|
|
|
:showBatchDelete="false"
|
|
:showBatchDelete="false"
|
|
|
:showBatchPrint="true"
|
|
:showBatchPrint="true"
|
|
|
:showOperation="true"
|
|
:showOperation="true"
|
|
|
@findPage="findPage"
|
|
@findPage="findPage"
|
|
|
:isshowpagination="true"
|
|
:isshowpagination="true"
|
|
|
- @handleEdit="expendEdit"
|
|
|
|
|
|
|
+ @handleEdit="expendEdit($event, 1)"
|
|
|
@handleButton1="expendDelete"
|
|
@handleButton1="expendDelete"
|
|
|
|
|
+ @handleButton2="expendEdit($event, 2)"
|
|
|
@selectionChange="selectionChange"
|
|
@selectionChange="selectionChange"
|
|
|
></kt-common-table>
|
|
></kt-common-table>
|
|
|
<!-- 申请资金弹框 -->
|
|
<!-- 申请资金弹框 -->
|
|
@@ -101,6 +104,7 @@
|
|
|
label-width="130px"
|
|
label-width="130px"
|
|
|
size="small"
|
|
size="small"
|
|
|
class="tableForm"
|
|
class="tableForm"
|
|
|
|
|
+ :disabled="formDisable"
|
|
|
>
|
|
>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -327,9 +331,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="resetForm" size="small">取 消</el-button>
|
|
<el-button @click="resetForm" size="small">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitForm" size="small">{{
|
|
|
|
|
- buttonValue
|
|
|
|
|
- }}</el-button>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="!formDisable"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="submitForm"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ >{{ buttonValue }}</el-button
|
|
|
|
|
+ >
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<!-- <el-dialog
|
|
<!-- <el-dialog
|
|
@@ -360,7 +368,7 @@
|
|
|
import ExpenseComponent from "./ExpenseComponent.vue"; //新增账户信息弹框
|
|
import ExpenseComponent from "./ExpenseComponent.vue"; //新增账户信息弹框
|
|
|
// import ExpenseManagement from "./ExpenseManagement.vue"; //新增账户信息
|
|
// import ExpenseManagement from "./ExpenseManagement.vue"; //新增账户信息
|
|
|
import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
|
|
import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
|
|
|
-import { toChies } from "../../../utils/moneyTransition";
|
|
|
|
|
|
|
+import { toChies, convertPositive } from "../../../utils/moneyTransition";
|
|
|
export default {
|
|
export default {
|
|
|
name: "ExpenseApplyFor",
|
|
name: "ExpenseApplyFor",
|
|
|
components: { KtCommonTable, ExpenseComponent },
|
|
components: { KtCommonTable, ExpenseComponent },
|
|
@@ -374,10 +382,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
return {
|
|
return {
|
|
|
|
|
+ formDisable: false, //资金申请form表单是否可选状态
|
|
|
expentList: [], //批量导出数据
|
|
expentList: [], //批量导出数据
|
|
|
expenseaaa: true,
|
|
expenseaaa: true,
|
|
|
expendTitle: "新增资金使用申请单", //弹框标题
|
|
expendTitle: "新增资金使用申请单", //弹框标题
|
|
|
- operationWidth: 200, //操作单元格宽度
|
|
|
|
|
|
|
+ operationWidth: 250, //操作单元格宽度
|
|
|
queryFrom: {}, //查询form表单
|
|
queryFrom: {}, //查询form表单
|
|
|
pageRequest: {
|
|
pageRequest: {
|
|
|
// 列表查询条件
|
|
// 列表查询条件
|
|
@@ -590,45 +599,24 @@ export default {
|
|
|
bigApplyAmount: "", //大写金额
|
|
bigApplyAmount: "", //大写金额
|
|
|
payMethod: [], //支付方式
|
|
payMethod: [], //支付方式
|
|
|
},
|
|
},
|
|
|
- profitObj: {
|
|
|
|
|
- outProfitValue: "", //支出资金归属
|
|
|
|
|
- outProfitName: "", //支出利润
|
|
|
|
|
- entProfitValue: "", //收入资金归属
|
|
|
|
|
- entProfitName: "", //收入利润
|
|
|
|
|
- },
|
|
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
expenseDialog(n) {
|
|
expenseDialog(n) {
|
|
|
if (!n) {
|
|
if (!n) {
|
|
|
- this.tableForm = {
|
|
|
|
|
- company: "", //单位
|
|
|
|
|
- applicant: "", //申请人
|
|
|
|
|
- applySector: "", //申请部门
|
|
|
|
|
- applyTime: "", //申请日期
|
|
|
|
|
- collectionMessage: "", //收款单位信息
|
|
|
|
|
- fundFlow: "", //资金流程
|
|
|
|
|
- fundUse: "", //资金用途
|
|
|
|
|
- remark: "", //备注
|
|
|
|
|
- applyAmount: "", //申请金额
|
|
|
|
|
- bigApplyAmount: "", //大写金额
|
|
|
|
|
- payMethod: [], //支付方式
|
|
|
|
|
- };
|
|
|
|
|
- this.profitObj = {
|
|
|
|
|
- outProfitValue: "", //支出资金归属
|
|
|
|
|
- outProfitName: "", //支出利润
|
|
|
|
|
- entProfitValue: "", //收入资金归属
|
|
|
|
|
- entProfitName: "", //收入利润
|
|
|
|
|
- };
|
|
|
|
|
- this.tableForm.payMethod = [
|
|
|
|
|
- this.payment_methodsData.find((item) => item.value == 2).label,
|
|
|
|
|
- ];
|
|
|
|
|
|
|
+ this.formDisable = false;
|
|
|
|
|
+ this.$refs.tableForm.resetFields();
|
|
|
|
|
+ // this.tableForm.payMethod = [
|
|
|
|
|
+ // this.payment_methodsData.find((item) => item.value == 2).label,
|
|
|
|
|
+ // ];
|
|
|
|
|
+ //清除支出收入方资金归属值
|
|
|
this.affiliationData.forEach((item) => {
|
|
this.affiliationData.forEach((item) => {
|
|
|
item.profit = 0;
|
|
item.profit = 0;
|
|
|
});
|
|
});
|
|
|
this.affiliationData2.forEach((item) => {
|
|
this.affiliationData2.forEach((item) => {
|
|
|
item.profit = 0;
|
|
item.profit = 0;
|
|
|
});
|
|
});
|
|
|
|
|
+ //清除支出收入方资金归属值
|
|
|
this.expendDataId = "";
|
|
this.expendDataId = "";
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -662,7 +650,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- //导出
|
|
|
|
|
|
|
+ //导出公共方法
|
|
|
expendDataup(e, idList) {
|
|
expendDataup(e, idList) {
|
|
|
idList = idList || this.expentList;
|
|
idList = idList || this.expentList;
|
|
|
this.$api.expense.excel(idList).then((response) => {
|
|
this.$api.expense.excel(idList).then((response) => {
|
|
@@ -685,15 +673,19 @@ export default {
|
|
|
this.$message.error(response.msg);
|
|
this.$message.error(response.msg);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- // }
|
|
|
|
|
},
|
|
},
|
|
|
//点击编辑按钮
|
|
//点击编辑按钮
|
|
|
- expendEdit(index) {
|
|
|
|
|
|
|
+ expendEdit(index, type) {
|
|
|
let row = index.row;
|
|
let row = index.row;
|
|
|
- if (row.transferFlag == 0) {
|
|
|
|
|
- this.$message.error("已转账数据不能操作");
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if (type == 1) {
|
|
|
|
|
+ if (row.transferFlag == 0) {
|
|
|
|
|
+ this.$message.error("已转账数据不能操作");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.formDisable = true;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
this.expendDataId = row.excelAccountOperateId;
|
|
this.expendDataId = row.excelAccountOperateId;
|
|
|
this.$api.expense
|
|
this.$api.expense
|
|
|
.getAccountExcelById(row.excelAccountOperateId)
|
|
.getAccountExcelById(row.excelAccountOperateId)
|
|
@@ -711,14 +703,14 @@ export default {
|
|
|
for (let key in res.data.outProfit) {
|
|
for (let key in res.data.outProfit) {
|
|
|
this.affiliationData2.forEach((item) => {
|
|
this.affiliationData2.forEach((item) => {
|
|
|
if (item.profitEng == key) {
|
|
if (item.profitEng == key) {
|
|
|
- item.profit = res.data.outProfit[key];
|
|
|
|
|
|
|
+ item.profit = convertPositive(res.data.outProfit[key] * -1);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
for (let key in res.data.entProfit) {
|
|
for (let key in res.data.entProfit) {
|
|
|
this.affiliationData.forEach((item) => {
|
|
this.affiliationData.forEach((item) => {
|
|
|
if (item.profitEng == key) {
|
|
if (item.profitEng == key) {
|
|
|
- item.profit = res.data.entProfit[key];
|
|
|
|
|
|
|
+ item.profit = convertPositive(res.data.entProfit[key]);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -806,109 +798,109 @@ export default {
|
|
|
.then(data != null ? data.callback : "");
|
|
.then(data != null ? data.callback : "");
|
|
|
},
|
|
},
|
|
|
//选择证书有效日期区间
|
|
//选择证书有效日期区间
|
|
|
- setDateInterval(e) {
|
|
|
|
|
- if (e != null && e != "") {
|
|
|
|
|
- this.formData.startCertExpirationDate = e[0];
|
|
|
|
|
- this.formData.endCertExpirationDate = e[1];
|
|
|
|
|
- } else {
|
|
|
|
|
- this.formData.startCertExpirationDate = "";
|
|
|
|
|
- this.formData.endCertExpirationDate = "";
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // setDateInterval(e) {
|
|
|
|
|
+ // if (e != null && e != "") {
|
|
|
|
|
+ // this.formData.startCertExpirationDate = e[0];
|
|
|
|
|
+ // this.formData.endCertExpirationDate = e[1];
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.formData.startCertExpirationDate = "";
|
|
|
|
|
+ // this.formData.endCertExpirationDate = "";
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
//新增用户信息提交
|
|
//新增用户信息提交
|
|
|
- submitUserForm() {
|
|
|
|
|
- let params = JSON.parse(JSON.stringify(this.formData));
|
|
|
|
|
- delete params.certExpirationDate;
|
|
|
|
|
- //新增
|
|
|
|
|
- this.$api.expense.insertAccount(params).then((res) => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- message: "添加成功",
|
|
|
|
|
- type: "success",
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- message: `添加失败, ${res.msg}`,
|
|
|
|
|
- type: "error",
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- this.getAllUser();
|
|
|
|
|
- this.closeForm();
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // submitUserForm() {
|
|
|
|
|
+ // let params = JSON.parse(JSON.stringify(this.formData));
|
|
|
|
|
+ // delete params.certExpirationDate;
|
|
|
|
|
+ // //新增
|
|
|
|
|
+ // this.$api.expense.insertAccount(params).then((res) => {
|
|
|
|
|
+ // if (res.code == 200) {
|
|
|
|
|
+ // this.$message({
|
|
|
|
|
+ // message: "添加成功",
|
|
|
|
|
+ // type: "success",
|
|
|
|
|
+ // });
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.$message({
|
|
|
|
|
+ // message: `添加失败, ${res.msg}`,
|
|
|
|
|
+ // type: "error",
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.getAllUser();
|
|
|
|
|
+ // this.closeForm();
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
//弹框重新赋值
|
|
//弹框重新赋值
|
|
|
- outChange(e) {
|
|
|
|
|
- if (e == 1) {
|
|
|
|
|
- this.formData = {
|
|
|
|
|
- outerFlag: e, //账户类别
|
|
|
|
|
- accountName: this.formData.accountName, //户名
|
|
|
|
|
- accountQuality: this.formData.accountQuality, //账户性质
|
|
|
|
|
- bankCardNum: this.formData.bankCardNum, //银行卡号
|
|
|
|
|
- bank: this.formData.bank, //开户行
|
|
|
|
|
- };
|
|
|
|
|
- } else {
|
|
|
|
|
- this.formData = {
|
|
|
|
|
- outerFlag: e, //账户类别
|
|
|
|
|
- accountName: this.formData.accountName, //户名
|
|
|
|
|
- accountQuality: this.formData.accountQuality, //账户性质
|
|
|
|
|
- bankCardNum: this.formData.bankCardNum, //银行卡号
|
|
|
|
|
- bank: this.formData.bank, //开户行
|
|
|
|
|
- bankName: "", //开户行名称
|
|
|
|
|
- bankNum: "", //开户行号
|
|
|
|
|
- certExpirationDate: "", //证书有效期
|
|
|
|
|
- clearingProfit: "", //结算卡
|
|
|
|
|
- dayStrokeNum: "", //单日转账笔数限制
|
|
|
|
|
- exteriorProfit: "", //外部过账金额
|
|
|
|
|
- fiscalProfit: "", //财税公司利润
|
|
|
|
|
- insuranceProfit: "", //保险公司回款
|
|
|
|
|
- otherProfit: "", //其他利润
|
|
|
|
|
- parkProfit: "", //园区利润
|
|
|
|
|
- priDayLines: "", //对私单日限额
|
|
|
|
|
- priSingleLines: "", //对私单笔限额
|
|
|
|
|
- priYearExcess: "", //对私年剩余额度
|
|
|
|
|
- priYearLines: "", //对私年额度
|
|
|
|
|
- pubDayLines: "", //对公单日限额
|
|
|
|
|
- pubSingleLines: "", //对公单笔限额
|
|
|
|
|
- pubYearExcess: "", //对公年剩余额度
|
|
|
|
|
- pubYearLines: "", //对公年额度
|
|
|
|
|
- tianqinProfit: "", //天勤利润
|
|
|
|
|
- };
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // outChange(e) {
|
|
|
|
|
+ // if (e == 1) {
|
|
|
|
|
+ // this.formData = {
|
|
|
|
|
+ // outerFlag: e, //账户类别
|
|
|
|
|
+ // accountName: this.formData.accountName, //户名
|
|
|
|
|
+ // accountQuality: this.formData.accountQuality, //账户性质
|
|
|
|
|
+ // bankCardNum: this.formData.bankCardNum, //银行卡号
|
|
|
|
|
+ // bank: this.formData.bank, //开户行
|
|
|
|
|
+ // };
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.formData = {
|
|
|
|
|
+ // outerFlag: e, //账户类别
|
|
|
|
|
+ // accountName: this.formData.accountName, //户名
|
|
|
|
|
+ // accountQuality: this.formData.accountQuality, //账户性质
|
|
|
|
|
+ // bankCardNum: this.formData.bankCardNum, //银行卡号
|
|
|
|
|
+ // bank: this.formData.bank, //开户行
|
|
|
|
|
+ // bankName: "", //开户行名称
|
|
|
|
|
+ // bankNum: "", //开户行号
|
|
|
|
|
+ // certExpirationDate: "", //证书有效期
|
|
|
|
|
+ // clearingProfit: "", //结算卡
|
|
|
|
|
+ // dayStrokeNum: "", //单日转账笔数限制
|
|
|
|
|
+ // exteriorProfit: "", //外部过账金额
|
|
|
|
|
+ // fiscalProfit: "", //财税公司利润
|
|
|
|
|
+ // insuranceProfit: "", //保险公司回款
|
|
|
|
|
+ // otherProfit: "", //其他利润
|
|
|
|
|
+ // parkProfit: "", //园区利润
|
|
|
|
|
+ // priDayLines: "", //对私单日限额
|
|
|
|
|
+ // priSingleLines: "", //对私单笔限额
|
|
|
|
|
+ // priYearExcess: "", //对私年剩余额度
|
|
|
|
|
+ // priYearLines: "", //对私年额度
|
|
|
|
|
+ // pubDayLines: "", //对公单日限额
|
|
|
|
|
+ // pubSingleLines: "", //对公单笔限额
|
|
|
|
|
+ // pubYearExcess: "", //对公年剩余额度
|
|
|
|
|
+ // pubYearLines: "", //对公年额度
|
|
|
|
|
+ // tianqinProfit: "", //天勤利润
|
|
|
|
|
+ // };
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
//弹框取消重置
|
|
//弹框取消重置
|
|
|
- closeForm() {
|
|
|
|
|
- this.dialogFormVisible = false;
|
|
|
|
|
- this.formData = {
|
|
|
|
|
- outerFlag: "0", //账户类别
|
|
|
|
|
- accountName: "", //户名
|
|
|
|
|
- accountQuality: "", //账户性质
|
|
|
|
|
- bankCardNum: "", //银行卡号
|
|
|
|
|
- bank: "", //开户行
|
|
|
|
|
- bankName: "", //开户行名称
|
|
|
|
|
- bankNum: "", //开户行号
|
|
|
|
|
- certExpirationDate: "", //证书有效期
|
|
|
|
|
- clearingProfit: "", //结算卡
|
|
|
|
|
- dayStrokeNum: "", //单日转账笔数限制
|
|
|
|
|
- exteriorProfit: "", //外部过账金额
|
|
|
|
|
- fiscalProfit: "", //财税公司利润
|
|
|
|
|
- insuranceProfit: "", //保险公司回款
|
|
|
|
|
- otherProfit: "", //其他利润
|
|
|
|
|
- parkProfit: "", //园区利润
|
|
|
|
|
- priDayLines: "", //对私单日限额
|
|
|
|
|
- priSingleLines: "", //对私单笔限额
|
|
|
|
|
- priYearExcess: "", //对私年剩余额度
|
|
|
|
|
- priYearLines: "", //对私年额度
|
|
|
|
|
- pubDayLines: "", //对公单日限额
|
|
|
|
|
- pubSingleLines: "", //对公单笔限额
|
|
|
|
|
- pubYearExcess: "", //对公年剩余额度
|
|
|
|
|
- pubYearLines: "", //对公年额度
|
|
|
|
|
- tianqinProfit: "", //天勤利润
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // closeForm() {
|
|
|
|
|
+ // this.dialogFormVisible = false;
|
|
|
|
|
+ // this.formData = {
|
|
|
|
|
+ // outerFlag: "0", //账户类别
|
|
|
|
|
+ // accountName: "", //户名
|
|
|
|
|
+ // accountQuality: "", //账户性质
|
|
|
|
|
+ // bankCardNum: "", //银行卡号
|
|
|
|
|
+ // bank: "", //开户行
|
|
|
|
|
+ // bankName: "", //开户行名称
|
|
|
|
|
+ // bankNum: "", //开户行号
|
|
|
|
|
+ // certExpirationDate: "", //证书有效期
|
|
|
|
|
+ // clearingProfit: "", //结算卡
|
|
|
|
|
+ // dayStrokeNum: "", //单日转账笔数限制
|
|
|
|
|
+ // exteriorProfit: "", //外部过账金额
|
|
|
|
|
+ // fiscalProfit: "", //财税公司利润
|
|
|
|
|
+ // insuranceProfit: "", //保险公司回款
|
|
|
|
|
+ // otherProfit: "", //其他利润
|
|
|
|
|
+ // parkProfit: "", //园区利润
|
|
|
|
|
+ // priDayLines: "", //对私单日限额
|
|
|
|
|
+ // priSingleLines: "", //对私单笔限额
|
|
|
|
|
+ // priYearExcess: "", //对私年剩余额度
|
|
|
|
|
+ // priYearLines: "", //对私年额度
|
|
|
|
|
+ // pubDayLines: "", //对公单日限额
|
|
|
|
|
+ // pubSingleLines: "", //对公单笔限额
|
|
|
|
|
+ // pubYearExcess: "", //对公年剩余额度
|
|
|
|
|
+ // pubYearLines: "", //对公年额度
|
|
|
|
|
+ // tianqinProfit: "", //天勤利润
|
|
|
|
|
+ // };
|
|
|
|
|
+ // },
|
|
|
//新增账户信息
|
|
//新增账户信息
|
|
|
- addUserFn() {
|
|
|
|
|
- this.dialogFormVisible = true;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // addUserFn() {
|
|
|
|
|
+ // this.dialogFormVisible = true;
|
|
|
|
|
+ // },
|
|
|
//获取所有账户信息
|
|
//获取所有账户信息
|
|
|
getAllUser() {
|
|
getAllUser() {
|
|
|
this.$api.expense.getAccountByAccountName().then((res) => {
|
|
this.$api.expense.getAccountByAccountName().then((res) => {
|
|
@@ -997,7 +989,7 @@ export default {
|
|
|
params.entProfit[item.profitEng] = item.profit;
|
|
params.entProfit[item.profitEng] = item.profit;
|
|
|
});
|
|
});
|
|
|
this.affiliationData2.forEach((item) => {
|
|
this.affiliationData2.forEach((item) => {
|
|
|
- params.outProfit[item.profitEng] = item.profit;
|
|
|
|
|
|
|
+ params.outProfit[item.profitEng] = item.profit*-1;
|
|
|
});
|
|
});
|
|
|
//转化资金归属
|
|
//转化资金归属
|
|
|
if (this.expendDataId) {
|
|
if (this.expendDataId) {
|