|
|
@@ -423,7 +423,7 @@
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="resetForm" size="small">取 消</el-button>
|
|
|
- <el-button @click="submitInfo" type="primary" size="small">{{
|
|
|
+ <el-button @click="submitInfo" type="primary" :disabled="confirmDisabled" size="small">{{
|
|
|
modelText
|
|
|
}}</el-button>
|
|
|
</div>
|
|
|
@@ -522,8 +522,8 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
- tableForm:{},
|
|
|
- detailDialogVisible:false,
|
|
|
+ tableForm: {},
|
|
|
+ detailDialogVisible: false,
|
|
|
affiliationData: [], //归属字典数据
|
|
|
affiliationData2: [], //归属字典数据
|
|
|
allNumObj: {}, //合计对象
|
|
|
@@ -539,7 +539,7 @@ export default {
|
|
|
//查询条件
|
|
|
},
|
|
|
pageResult: {
|
|
|
- content: [],
|
|
|
+ content: []
|
|
|
}, //表格参数
|
|
|
pageRequest: {
|
|
|
// 列表查询条件
|
|
|
@@ -549,30 +549,35 @@ export default {
|
|
|
applyTime: "", //进账日期
|
|
|
invoiceBy: "", //开票方
|
|
|
biller: "", //开票员
|
|
|
- invoiceType: "", //开票类型
|
|
|
+ invoiceType: "" //开票类型
|
|
|
},
|
|
|
columns: [
|
|
|
{ prop: "invoiceId", label: "发票号码", type: "text", minWidth: 160 },
|
|
|
{ prop: "invoiceNum", label: "发票数", type: "text", minWidth: 60 },
|
|
|
{ prop: "invoiceBy", label: "开票方", type: "text", minWidth: 360 },
|
|
|
- { prop: "businessQuality", label: "公司类型", type: "text", minWidth: 80 },
|
|
|
+ {
|
|
|
+ prop: "businessQuality",
|
|
|
+ label: "公司类型",
|
|
|
+ type: "text",
|
|
|
+ minWidth: 80
|
|
|
+ },
|
|
|
{
|
|
|
prop: "otherUnit",
|
|
|
label: "对方单位名称",
|
|
|
type: "text",
|
|
|
- minWidth: 360,
|
|
|
+ minWidth: 360
|
|
|
},
|
|
|
{
|
|
|
prop: "invoiceTypeName",
|
|
|
label: "发票类型",
|
|
|
type: "text",
|
|
|
- minWidth: 80,
|
|
|
+ minWidth: 80
|
|
|
},
|
|
|
{
|
|
|
prop: "invoiceMoney",
|
|
|
label: "开票金额",
|
|
|
type: "text",
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 100
|
|
|
},
|
|
|
{ prop: "invoiceTime", label: "开票日期", type: "text", minWidth: 100 },
|
|
|
{ prop: "biller", label: "开票员", type: "text", minWidth: 70 },
|
|
|
@@ -580,54 +585,54 @@ export default {
|
|
|
prop: "invoiceSubjects",
|
|
|
label: "开票科目",
|
|
|
type: "text",
|
|
|
- minWidth: 120,
|
|
|
+ minWidth: 120
|
|
|
},
|
|
|
{
|
|
|
prop: "payoutMoney",
|
|
|
label: "进账金额",
|
|
|
type: "text",
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 100
|
|
|
},
|
|
|
{
|
|
|
prop: "notPayoutMoney",
|
|
|
label: "未进账金额",
|
|
|
type: "text",
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 100
|
|
|
},
|
|
|
{
|
|
|
prop: "rate",
|
|
|
label: "税率(%)",
|
|
|
type: "text",
|
|
|
- minWidth: 70,
|
|
|
+ minWidth: 70
|
|
|
},
|
|
|
{
|
|
|
prop: "tax",
|
|
|
label: "税额",
|
|
|
type: "text",
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 100
|
|
|
},
|
|
|
{
|
|
|
prop: "noHasTax",
|
|
|
label: "不含税金额",
|
|
|
type: "text",
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 100
|
|
|
},
|
|
|
{
|
|
|
prop: "clearFlagName",
|
|
|
label: "转账状态",
|
|
|
type: "text",
|
|
|
- minWidth: 100,
|
|
|
- },
|
|
|
+ minWidth: 100
|
|
|
+ }
|
|
|
],
|
|
|
detailData: [],
|
|
|
detailParams: {
|
|
|
pageNo: 1,
|
|
|
pageSize: 20,
|
|
|
- teamOrUserFlag: "2",
|
|
|
+ teamOrUserFlag: "2"
|
|
|
},
|
|
|
modelText: "提 交",
|
|
|
formData: {
|
|
|
- accountName:"",
|
|
|
+ accountName: "",
|
|
|
revBankCardNum: "", //收入卡号
|
|
|
outBankCardNum: "", //支出卡号
|
|
|
biller: "", //开票员
|
|
|
@@ -644,55 +649,55 @@ export default {
|
|
|
rate: 0, //税率
|
|
|
payoutTime: "", //进账日期
|
|
|
payMethod: [], //支付方式
|
|
|
- fundUse: "", //资金用途
|
|
|
+ fundUse: "" //资金用途
|
|
|
},
|
|
|
rules: {
|
|
|
//内部表单规则
|
|
|
invoiceBy: [
|
|
|
- { required: true, message: "请选择开票方", trigger: "change" },
|
|
|
+ { required: true, message: "请选择开票方", trigger: "change" }
|
|
|
],
|
|
|
invoiceMoney: [
|
|
|
- { required: true, message: "开票金额不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "开票金额不能为空", trigger: "change" }
|
|
|
],
|
|
|
invoiceNum: [
|
|
|
- { required: true, message: "发票数不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "发票数不能为空", trigger: "blur" }
|
|
|
],
|
|
|
invoiceSubjects1: [
|
|
|
- { required: true, message: "开票科目不能为空", trigger: "change" },
|
|
|
+ { required: true, message: "开票科目不能为空", trigger: "change" }
|
|
|
],
|
|
|
invoiceSubjectsValue: [
|
|
|
- { validator: invoiceSubjectsRules, trigger: "blur" },
|
|
|
+ { validator: invoiceSubjectsRules, trigger: "blur" }
|
|
|
],
|
|
|
invoiceType: [
|
|
|
- { required: true, message: "请选择发票类型", trigger: "blur" },
|
|
|
+ { required: true, message: "请选择发票类型", trigger: "blur" }
|
|
|
],
|
|
|
otherUnit: [
|
|
|
- { required: true, message: "对方单位不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "对方单位不能为空", trigger: "blur" }
|
|
|
],
|
|
|
payoutMoney: [
|
|
|
- { required: true, message: "进账金额不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "进账金额不能为空", trigger: "blur" }
|
|
|
],
|
|
|
rate: [{ required: true, message: "税率不能为空", trigger: "blur" }],
|
|
|
payoutTime: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择进账日期",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
payMethod: [
|
|
|
- { required: true, message: "请选择支付方式", trigger: "change" },
|
|
|
+ { required: true, message: "请选择支付方式", trigger: "change" }
|
|
|
],
|
|
|
fundUse: [
|
|
|
- { required: true, message: "请选择资金用途", trigger: "change" },
|
|
|
+ { required: true, message: "请选择资金用途", trigger: "change" }
|
|
|
],
|
|
|
invoiceTime: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择开票日期",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
- ],
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
collectionData: [], //所有内部账户信息列表
|
|
|
allCollectionData: [], //所有账户信息列表
|
|
|
@@ -708,48 +713,49 @@ export default {
|
|
|
prop: "revenueOutlayName",
|
|
|
label: "转账类型",
|
|
|
minWidth: 80,
|
|
|
- sortable: false,
|
|
|
+ sortable: false
|
|
|
},
|
|
|
{
|
|
|
prop: "company",
|
|
|
label: "支出单位",
|
|
|
minWidth: 350,
|
|
|
- sortable: false,
|
|
|
+ sortable: false
|
|
|
},
|
|
|
{
|
|
|
prop: "payMethod",
|
|
|
label: "支付方式",
|
|
|
minWidth: 100,
|
|
|
- sortable: false,
|
|
|
+ sortable: false
|
|
|
},
|
|
|
{
|
|
|
prop: "payoutTime",
|
|
|
label: "支付时间",
|
|
|
minWidth: 100,
|
|
|
- sortable: false,
|
|
|
+ sortable: false
|
|
|
},
|
|
|
{ prop: "applyAmount", label: "金额", minWidth: 100, sortable: false },
|
|
|
{
|
|
|
prop: "fundUse",
|
|
|
label: "资金用途",
|
|
|
minWidth: 150,
|
|
|
- sortable: false,
|
|
|
+ sortable: false
|
|
|
},
|
|
|
{
|
|
|
prop: "fundFen",
|
|
|
label: "资金用途分项",
|
|
|
minWidth: 150,
|
|
|
- sortable: false,
|
|
|
- },
|
|
|
+ sortable: false
|
|
|
+ }
|
|
|
],
|
|
|
expendDialogVisible: false, //记录弹框显示状态
|
|
|
expendPageResult: {
|
|
|
//记录表格参数
|
|
|
pageNo: 1,
|
|
|
- pageSize: 20,
|
|
|
+ pageSize: 20
|
|
|
},
|
|
|
invoiceId: "", //记录id
|
|
|
num: 1,
|
|
|
+ confirmDisabled: false //开票确认按钮防止多次点击
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -774,13 +780,13 @@ export default {
|
|
|
payoutMoney: 0, //进账金额
|
|
|
rate: 0, //税率
|
|
|
payoutTime: "", //进账日期
|
|
|
- payMethod: [], //支付方式
|
|
|
+ payMethod: [] //支付方式
|
|
|
};
|
|
|
//支出收入资金归属值清空
|
|
|
- this.affiliationData.forEach((item) => {
|
|
|
+ this.affiliationData.forEach(item => {
|
|
|
item.profit = 0;
|
|
|
});
|
|
|
- this.affiliationData2.forEach((item) => {
|
|
|
+ this.affiliationData2.forEach(item => {
|
|
|
item.profit = 0;
|
|
|
});
|
|
|
//支出收入资金归属值清空
|
|
|
@@ -789,36 +795,40 @@ export default {
|
|
|
this.$refs.formData.clearValidate();
|
|
|
});
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- handleTablerecordDetail({row}){
|
|
|
- for (let key in row.entProfit) {
|
|
|
- this.affiliationData.forEach((item) => {
|
|
|
- if (item.profitEng == key) {
|
|
|
- item.profit = convertPositive(row.entProfit[key]);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- this.detailDialogVisible=true
|
|
|
+ handleTablerecordDetail({ row }) {
|
|
|
+ for (let key in row.entProfit) {
|
|
|
+ this.affiliationData.forEach(item => {
|
|
|
+ if (item.profitEng == key) {
|
|
|
+ item.profit = convertPositive(row.entProfit[key]);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.detailDialogVisible = true;
|
|
|
},
|
|
|
/**
|
|
|
* 撤销转账记录
|
|
|
*/
|
|
|
- handleTableRepeal(index) {
|
|
|
+ handleTableRepeal(index) {
|
|
|
let row = index.row;
|
|
|
console.log(row);
|
|
|
- this.$confirm("确认撤销该 “"+row.revenueOutlayName+"” 记录吗?", "提示", {
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
+ this.$confirm(
|
|
|
+ "确认撤销该 “" + row.revenueOutlayName + "” 记录吗?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ type: "warning"
|
|
|
+ }
|
|
|
+ )
|
|
|
.then(() => {
|
|
|
this.$api.expense
|
|
|
.accountOperateDelete(row.accountOperateId)
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success("撤销成功");
|
|
|
this.getRecordData();
|
|
|
- this.expendDialogVisible=false;
|
|
|
+ this.expendDialogVisible = false;
|
|
|
this.findPage();
|
|
|
} else {
|
|
|
this.$message.error(res.msg);
|
|
|
@@ -840,12 +850,12 @@ export default {
|
|
|
let obj = {
|
|
|
pageNo: this.expendPageResult.pageNo,
|
|
|
pageSize: this.expendPageResult.pageSize,
|
|
|
- invoiceId: this.invoiceId,
|
|
|
+ invoiceId: this.invoiceId
|
|
|
};
|
|
|
this.$api.expense
|
|
|
.getAccountOperate(obj)
|
|
|
- .then((res) => {
|
|
|
- res.data.records.forEach((item) => {
|
|
|
+ .then(res => {
|
|
|
+ res.data.records.forEach(item => {
|
|
|
if (
|
|
|
item.revenueOutlay != null &&
|
|
|
item.revenueOutlay != undefined &&
|
|
|
@@ -860,7 +870,7 @@ export default {
|
|
|
pageNo: res.data.current,
|
|
|
pageSize: res.data.size,
|
|
|
totalPages: res.data.pages,
|
|
|
- totalSize: res.data.total,
|
|
|
+ totalSize: res.data.total
|
|
|
};
|
|
|
})
|
|
|
.then(data != null ? data.callback : "");
|
|
|
@@ -878,7 +888,7 @@ export default {
|
|
|
},
|
|
|
//转换
|
|
|
businessZh(data, label, value) {
|
|
|
- let obj = data.find((item) => item[value] == label);
|
|
|
+ let obj = data.find(item => item[value] == label);
|
|
|
if (obj) {
|
|
|
return obj;
|
|
|
} else {
|
|
|
@@ -887,9 +897,9 @@ export default {
|
|
|
},
|
|
|
//获取归属数据
|
|
|
getAffiliationData() {
|
|
|
- this.$api.expense.getList().then((res) => {
|
|
|
+ this.$api.expense.getList().then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- res.data.forEach((item) => {
|
|
|
+ res.data.forEach(item => {
|
|
|
item.profit = 0;
|
|
|
});
|
|
|
this.affiliationData = JSON.parse(JSON.stringify(res.data));
|
|
|
@@ -902,7 +912,7 @@ export default {
|
|
|
//导出开票记录
|
|
|
expentData() {
|
|
|
let params = {
|
|
|
- ...JSON.parse(JSON.stringify(this.pageRequest)),
|
|
|
+ ...JSON.parse(JSON.stringify(this.pageRequest))
|
|
|
};
|
|
|
if (params.invoiceTime != null && params.invoiceTime.length > 0) {
|
|
|
params.invoiceTimeStart = params.invoiceTime[0];
|
|
|
@@ -916,7 +926,7 @@ export default {
|
|
|
delete params.invoiceTime;
|
|
|
delete params.pageNo;
|
|
|
delete params.pageSize;
|
|
|
- this.$api.expense.invAccountExcel(params).then((res) => {
|
|
|
+ this.$api.expense.invAccountExcel(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
if (res.data == null) {
|
|
|
this.$message.error("暂无导出数据,请重试!");
|
|
|
@@ -937,7 +947,7 @@ export default {
|
|
|
},
|
|
|
//获取资金用途树数据
|
|
|
getTreeList() {
|
|
|
- this.$api.expense.getAccountExpensesTreeList().then((res) => {
|
|
|
+ this.$api.expense.getAccountExpensesTreeList().then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.fundFlowData = res.data;
|
|
|
this.fundFlowSet();
|
|
|
@@ -961,23 +971,21 @@ export default {
|
|
|
handleTableDelete(index) {
|
|
|
let row = index.row;
|
|
|
this.$confirm("确认撤销该记录吗?", "提示", {
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.$api.expense
|
|
|
- .deleteInvAccountIncoice(row.invoiceId)
|
|
|
- .then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success("撤销成功");
|
|
|
- this.findPage();
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
+ this.$api.expense.deleteInvAccountIncoice(row.invoiceId).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.findPage();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
- invoiceTypeChange(item){
|
|
|
+ invoiceTypeChange(item) {
|
|
|
// if(item==2){
|
|
|
// this.formData.rate='6'
|
|
|
// }
|
|
|
@@ -987,10 +995,10 @@ export default {
|
|
|
},
|
|
|
//选择开票方change事件
|
|
|
companyChange(item) {
|
|
|
- if(item.accountName=="太原天勤保险代理有限公司"){
|
|
|
- this.formData.invoiceSubjects1 ='经纪代理服务'
|
|
|
- this.formData.invoiceSubjects2 ='保险代理手续费'
|
|
|
- }
|
|
|
+ if (item.accountName == "太原天勤保险代理有限公司") {
|
|
|
+ this.formData.invoiceSubjects1 = "经纪代理服务";
|
|
|
+ this.formData.invoiceSubjects2 = "保险代理手续费";
|
|
|
+ }
|
|
|
// else{
|
|
|
// this.formData.invoiceSubjects1 =''
|
|
|
// this.formData.invoiceSubjects2 =''
|
|
|
@@ -1006,12 +1014,12 @@ export default {
|
|
|
},
|
|
|
//获取所有内部账户信息
|
|
|
getAllUser() {
|
|
|
- this.$api.expense.getAccountByAccountName().then((res) => {
|
|
|
+ this.$api.expense.getAccountByAccountName().then(res => {
|
|
|
if (res.code == 200) {
|
|
|
let arr = [];
|
|
|
res.data.forEach((item, index) => {
|
|
|
if (item.invAccountCardList != null) {
|
|
|
- item.invAccountCardList.forEach((it) => {
|
|
|
+ item.invAccountCardList.forEach(it => {
|
|
|
it = { ...it, ...item };
|
|
|
it.name =
|
|
|
(it.outerFlag == 0 ? "内部用户" : "外部用户") +
|
|
|
@@ -1030,7 +1038,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- let outArr = arr.filter((item) => item.outerFlag == 0);
|
|
|
+ let outArr = arr.filter(item => item.outerFlag == 0);
|
|
|
this.allCollectionData = arr;
|
|
|
this.collectionData = outArr;
|
|
|
}
|
|
|
@@ -1038,7 +1046,7 @@ export default {
|
|
|
},
|
|
|
//数据字典
|
|
|
business(typeName) {
|
|
|
- this.$api.dict.findByLableName(typeName).then((res) => {
|
|
|
+ this.$api.dict.findByLableName(typeName).then(res => {
|
|
|
this[typeName + "Data"] = res.data;
|
|
|
if (
|
|
|
(typeName == "account_quality" || typeName == "invoice_type") &&
|
|
|
@@ -1051,8 +1059,8 @@ export default {
|
|
|
//新增开票
|
|
|
addPayment() {
|
|
|
this.title = "开票新增";
|
|
|
- this.formData={
|
|
|
- accountName:"",
|
|
|
+ this.formData = {
|
|
|
+ accountName: "",
|
|
|
revBankCardNum: "", //收入卡号
|
|
|
outBankCardNum: "", //支出卡号
|
|
|
biller: "", //开票员
|
|
|
@@ -1069,35 +1077,37 @@ export default {
|
|
|
rate: 0, //税率
|
|
|
payoutTime: "", //进账日期
|
|
|
payMethod: [], //支付方式
|
|
|
- fundUse: "", //资金用途
|
|
|
- }
|
|
|
- this.formData.invoiceTime= this.getTodayDate()
|
|
|
+ fundUse: "" //资金用途
|
|
|
+ };
|
|
|
+ this.formData.invoiceTime = this.getTodayDate();
|
|
|
this.detailDialog = true;
|
|
|
-
|
|
|
},
|
|
|
getTodayDate() {
|
|
|
const today = new Date();
|
|
|
const year = today.getFullYear();
|
|
|
const month = today.getMonth() + 1; // 月份是从0开始的
|
|
|
const day = today.getDate();
|
|
|
- return `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
|
|
|
+ return `${year}-${month
|
|
|
+ .toString()
|
|
|
+ .padStart(2, "0")}-${day.toString().padStart(2, "0")}`;
|
|
|
},
|
|
|
//新增编辑开票信息
|
|
|
submitInfo() {
|
|
|
+ this.confirmDisabled = true;
|
|
|
let params = JSON.parse(JSON.stringify(this.formData));
|
|
|
- this.$refs.formData.validate((valid) => {
|
|
|
+ this.$refs.formData.validate(valid => {
|
|
|
if (valid) {
|
|
|
//进账
|
|
|
if (this.formDataId && this.typeStatus == 2) {
|
|
|
- console.log(params.payoutTime)
|
|
|
+ console.log(params.payoutTime);
|
|
|
//转化资金归属
|
|
|
params.entProfit = {};
|
|
|
params.outProfit = {};
|
|
|
- this.affiliationData.forEach((item) => {
|
|
|
+ this.affiliationData.forEach(item => {
|
|
|
params.entProfit[item.profitEng] =
|
|
|
item.profit == null ? 0 : item.profit;
|
|
|
});
|
|
|
- this.affiliationData2.forEach((item) => {
|
|
|
+ this.affiliationData2.forEach(item => {
|
|
|
params.outProfit[item.profitEng] =
|
|
|
item.profit == 0 || item.profit == null ? 0 : item.profit * -1;
|
|
|
});
|
|
|
@@ -1120,14 +1130,20 @@ export default {
|
|
|
fundFen: this.formData.fundUse[this.formData.fundUse.length - 1], //资金用途分项
|
|
|
payoutTime: params.payoutTime, //进账日期
|
|
|
entProfit: params.entProfit, //收入方资金归属
|
|
|
- outProfit: params.outProfit, //支出方资金归属
|
|
|
+ outProfit: params.outProfit //支出方资金归属
|
|
|
};
|
|
|
- this.$api.expense.putInvAccountIncoice(obj).then((res) => {
|
|
|
+ this.$api.expense.putInvAccountIncoice(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.detailDialog = false;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.confirmDisabled = false;
|
|
|
+ }, 500);
|
|
|
this.findPage();
|
|
|
} else {
|
|
|
this.$message.error(res.msg);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.confirmDisabled = false;
|
|
|
+ }, 500);
|
|
|
}
|
|
|
});
|
|
|
//编辑
|
|
|
@@ -1140,12 +1156,18 @@ export default {
|
|
|
params.company = params.otherUnit; //单位
|
|
|
delete params.payMethod;
|
|
|
delete params.payoutTime;
|
|
|
- this.$api.expense.updateIncoice(params).then((res) => {
|
|
|
+ this.$api.expense.updateIncoice(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.detailDialog = false;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.confirmDisabled = false;
|
|
|
+ }, 500);
|
|
|
this.findPage();
|
|
|
} else {
|
|
|
this.$message.error(res.msg);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.confirmDisabled = false;
|
|
|
+ }, 500);
|
|
|
}
|
|
|
});
|
|
|
//新增
|
|
|
@@ -1158,16 +1180,25 @@ export default {
|
|
|
params.company = params.otherUnit; //单位
|
|
|
delete params.payMethod;
|
|
|
delete params.payoutTime;
|
|
|
- this.$api.expense.addInvAccountIncoice(params).then((res) => {
|
|
|
+ this.$api.expense.addInvAccountIncoice(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.detailDialog = false;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.confirmDisabled = false;
|
|
|
+ }, 500);
|
|
|
this.findPage();
|
|
|
} else {
|
|
|
this.$message.error(res.msg);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.confirmDisabled = false;
|
|
|
+ }, 500);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.confirmDisabled = false;
|
|
|
+ }, 500);
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
@@ -1183,7 +1214,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 换页刷新
|
|
|
- refreshPageRequest: function (pageNum) {
|
|
|
+ refreshPageRequest: function(pageNum) {
|
|
|
this.detailParams.pageNo = pageNum;
|
|
|
this.getDetailData();
|
|
|
},
|
|
|
@@ -1213,13 +1244,13 @@ export default {
|
|
|
},
|
|
|
// 详情接口
|
|
|
getDetailData(id) {
|
|
|
- this.$api.expense.detailInvAccountIncoice(id).then((res) => {
|
|
|
+ this.$api.expense.detailInvAccountIncoice(id).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
let obj = this.collectionData.find(
|
|
|
- (item) => item.bankCardNum == res.data.revBankCardNum
|
|
|
+ item => item.bankCardNum == res.data.revBankCardNum
|
|
|
);
|
|
|
let obj2 = this.collectionData.find(
|
|
|
- (item) => item.bankCardNum == res.data.outBankCardNum
|
|
|
+ item => item.bankCardNum == res.data.outBankCardNum
|
|
|
);
|
|
|
if (obj) {
|
|
|
res.data.invoiceBy = obj;
|
|
|
@@ -1257,9 +1288,9 @@ export default {
|
|
|
delete params.applyTime;
|
|
|
this.$api.expense
|
|
|
.getInvAccountIncoice(params)
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- res.data.records.forEach((item) => {
|
|
|
+ res.data.records.forEach(item => {
|
|
|
item.clearFlagName = item.clearFlag == 0 ? "未清" : "已清";
|
|
|
item.invoiceTypeName = this.businessZh(
|
|
|
this.invoice_typeData,
|
|
|
@@ -1279,7 +1310,7 @@ export default {
|
|
|
pageNum: res.data.current,
|
|
|
pageSize: res.data.size,
|
|
|
totalPages: res.data.pages,
|
|
|
- totalSize: res.data.total,
|
|
|
+ totalSize: res.data.total
|
|
|
};
|
|
|
this.allNumObj = {
|
|
|
invoiceMoneySum: res.data.invoiceMoneySum,
|
|
|
@@ -1287,7 +1318,7 @@ export default {
|
|
|
noHasTaxSum: res.data.noHasTaxSum,
|
|
|
notPayoutMoneySum: res.data.notPayoutMoneySum,
|
|
|
payoutMoneySum: res.data.payoutMoneySum,
|
|
|
- taxSum: res.data.taxSum,
|
|
|
+ taxSum: res.data.taxSum
|
|
|
};
|
|
|
this.loading = false;
|
|
|
} else {
|
|
|
@@ -1301,8 +1332,8 @@ export default {
|
|
|
this.pageRequest.pageNo = 1;
|
|
|
this.pageRequest.pageSize = 20;
|
|
|
this.findPage();
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|