From f7f79119ab87a852af90042d45e023c5e23a94e8 Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Tue, 25 Jun 2024 17:23:34 +0800
Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6=E7=AD=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/contract/contractList.vue | 4 +
.../components/examineRegistration.vue | 40 +++++---
src/views/finance/paymentRegistrationList.vue | 99 +++++++++++++++++--
src/views/inOut/expenseAccount.vue | 14 ++-
4 files changed, 129 insertions(+), 28 deletions(-)
diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue
index 1146238..62f0af4 100644
--- a/src/views/contract/contractList.vue
+++ b/src/views/contract/contractList.vue
@@ -2862,6 +2862,10 @@ export default {
this.select.is_substitute = 0;//is_substitute 用于是否有采购流程,1为合同台账中增加(没有流程)
//this.select.contract_type = 2;
}
+ if (/waitPay/g.test(this.$route.path)) {
+ this.select.wait_pay = 1;
+ this.select.is_simple = 0;
+ }
},
destroyed() {
window.onfocus = null;
diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue
index 4be450a..572a57b 100644
--- a/src/views/finance/components/examineRegistration.vue
+++ b/src/views/finance/components/examineRegistration.vue
@@ -391,11 +391,21 @@ import { listdeptNoAuth } from '@/api/system/department'
}
},
{
- label: "已经使用",
- prop: 'has_money_total',
- width: 136,
- align: 'right',
- }
+ label: "实付金额",
+ prop: "use_money_total",
+ width: 120,
+ align: "right",
+ formatter: (v1, v2, value) =>
+ value ? `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : "",
+ },
+ {
+ label: "已用金额",
+ prop: "has_money_total",
+ width: 120,
+ align: "right",
+ formatter: (v1, v2, value) =>
+ value ? `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : "",
+ },
],
}
},
@@ -546,17 +556,6 @@ import { listdeptNoAuth } from '@/api/system/department'
//确认审核
editor() {
- let total = 0
- this.paymentRegistrationForm.plan.forEach(item => {
- total += Number(item.use_money)
- })
- // if (Number(this.paymentRegistrationForm.actMoney).toFixed(2) !== total.toFixed(2)) {
- // Message({
- // type: 'warning',
- // message: '实际付款金额与计划总金额不符'
- // })
- // return
- // }
console.log({
id: this.registrationId,
contract_id: this.contract.id,
@@ -565,6 +564,14 @@ import { listdeptNoAuth } from '@/api/system/department'
money_way_id: this.paymentRegistrationForm.moneyWay.toString(),
contract_plan_act_links: this.paymentRegistrationForm.plan
})
+ let total = this.$refs["planTable"].getSelection().reduce((pre,cur) => pre + Number(cur.use_money),0)
+ if (Number(this.paymentRegistrationForm.actMoney) !== total) {
+ this.$message({
+ type: 'warning',
+ message: '实际付款金额与计划总金额不符'
+ })
+ return
+ }
editorFundLog({
id: this.registrationId,
contract_id: this.contract.id,
@@ -573,6 +580,7 @@ import { listdeptNoAuth } from '@/api/system/department'
apply_money: this.paymentRegistrationForm.applyMoney,
discount_money: this.paymentRegistrationForm.deductionMoney,
money_way_id: this.paymentRegistrationForm.moneyWay.toString(),
+ audit_date: this.$moment().format('YYYY-MM-DD'),
contract_plan_act_links: this.$refs["planTable"].getSelection().map(item => ({
contract_id: this.contract.id,
plan_id: item.id,
diff --git a/src/views/finance/paymentRegistrationList.vue b/src/views/finance/paymentRegistrationList.vue
index 0e39c0d..f550e63 100644
--- a/src/views/finance/paymentRegistrationList.vue
+++ b/src/views/finance/paymentRegistrationList.vue
@@ -7,15 +7,62 @@
>
+ 业务科室
+
+
+
+
+
+
+
+ 确认日期
+
+ {
+ if (e[0] && e[1]) {
+ select.start_audit_date = $moment(e[0]).format('YYYY-MM-DD');
+ select.end_audit_date = $moment(e[1]).format('YYYY-MM-DD');
+ } else {
+ select.start_audit_date = '';
+ select.end_audit_date = '';
+ }
+ }"
+ >
+
+
创建日期
(selectDate = e)"
+ @on-change="(e) => {
+ if (e[0] && e[1]) {
+ selectDate[0] = $moment(e[0]).format('YYYY-MM-DD');
+ selectDate[1] = $moment(e[1]).format('YYYY-MM-DD');
+ } else {
+ selectDate[0] = '';
+ selectDate[1] = '';
+ }
+ }"
>
@@ -90,16 +137,17 @@
style="
margin: 10px 0;
display: flex;
- justify-content: space-between;
align-items: center;
"
>
+ 是否选择为父级
+
已选择:{{
select.plan_name
}}
- 清空选择
@@ -192,12 +240,16 @@ import { Message } from "element-ui";
import { getBudget } from "@/api/budget/budget";
import { getparameter } from "@/api/system/dictionary";
import examineRegistration from "./components/examineRegistration";
+import { listdeptNoAuth } from '@/api/system/department'
export default {
components: {
examineRegistration,
},
data() {
return {
+ planSearchPid: "",
+ isPlanSearchPid: false,
+ departments: [],
moneyWay: [],
plan: [],
planTableSearch: [
@@ -249,8 +301,11 @@ export default {
year: "",
plan_id: "",
plan_name: "",
+ department_id: "",
+ start_audit_date: "",
+ end_audit_date: "",
},
- selectDate: "",
+ selectDate: [],
list: [],
total: 0,
pageIndex: 1,
@@ -377,6 +432,11 @@ export default {
};
},
methods: {
+ //获取科室
+ async getDepartment() {
+ this.departments = await listdeptNoAuth();
+ },
+
planPageChange(e) {
this.plansPageIndex = e;
this.getBudgets();
@@ -390,6 +450,8 @@ export default {
).detail;
},
clearSelectForSearch() {
+ this.isPlanSearchPid = false;
+ this.planSearchPid = "";
this.select.plan_id = "";
this.select.plan_name = "请选择预算计划";
},
@@ -432,7 +494,7 @@ export default {
page: this.plansPageIndex,
plan_department_id: this.planSearch.plan_department_id,
top_pid: 1,
- year: this.planSearch.year ? this.$moment(this.planSearch.year).format("YYYY") : ""
+ year: this.planSearch.year ? this.$moment(this.planSearch.year).format("YYYY") : "",
}).then((res) => {
this.plans = res.list.data;
@@ -454,9 +516,11 @@ export default {
selectPlanForSearch(sel) {
console.log(sel);
if (sel) {
+ this.planSearchPid = sel.pid;
this.select.plan_id = sel.id;
- this.select.plan_name = "[" + sel.year + "]-" + sel.name;
+ this.select.plan_name = this.isPlanSearchPid ? "[" + sel.pid_info?.year + "]-" + sel.pid_info?.name : "[" + sel.year + "]-" + sel.name;
} else {
+ this.planSearchPid = "";
this.select.plan_id = "";
this.select.plan_name = "";
}
@@ -486,13 +550,27 @@ export default {
this.getFundLogs(true);
},
async getFundLogs(is_export) {
+ let pidPlans = []
+ if (this.isPlanSearchPid) {
+ pidPlans = (await getBudget({
+ pid: this.planSearchPid,
+ page: 1,
+ page_size: 999,
+ })).list.data
+ }
await getFundLog({
page_size: this.pageSize,
page: this.pageIndex,
keyword: this.keyword,
- date: this.selectDate,
+ start_date: this.selectDate[0],
+ end_date: this.selectDate[1],
status: this.status,
- act_plan_link_id: this.select.plan_id,
+ act_plan_link_id: this.isPlanSearchPid ? pidPlans.map(i => i.id).toString() : this.select.plan_id,
+ department_id: this.select.department_id,
+ start_audit_date: this.select.start_audit_date,
+ end_audit_date: this.select.end_audit_date,
+ sort_name: "updated_at",
+ sort_type: "desc",
}).then((res) => {
let tokens = getToken();
if (is_export) {
@@ -545,6 +623,9 @@ export default {
this.getMoneyWay();
this.getFundLogs();
},
+ created() {
+ this.getDepartment()
+ }
};
diff --git a/src/views/inOut/expenseAccount.vue b/src/views/inOut/expenseAccount.vue
index fdd0d86..731d8a6 100644
--- a/src/views/inOut/expenseAccount.vue
+++ b/src/views/inOut/expenseAccount.vue
@@ -8,6 +8,13 @@
+
+ 关键词
+
+
+
+
+
创建日期
@@ -52,7 +59,7 @@