搜索条件等

master
xy 2 years ago
parent 049ce19adb
commit f7f79119ab

@ -2862,6 +2862,10 @@ export default {
this.select.is_substitute = 0;//is_substitute 1 this.select.is_substitute = 0;//is_substitute 1
//this.select.contract_type = 2; //this.select.contract_type = 2;
} }
if (/waitPay/g.test(this.$route.path)) {
this.select.wait_pay = 1;
this.select.is_simple = 0;
}
}, },
destroyed() { destroyed() {
window.onfocus = null; window.onfocus = null;

@ -391,11 +391,21 @@ import { listdeptNoAuth } from '@/api/system/department'
} }
}, },
{ {
label: "已经使用", label: "实付金额",
prop: 'has_money_total', prop: "use_money_total",
width: 136, width: 120,
align: 'right', 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() { 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({ console.log({
id: this.registrationId, id: this.registrationId,
contract_id: this.contract.id, contract_id: this.contract.id,
@ -565,6 +564,14 @@ import { listdeptNoAuth } from '@/api/system/department'
money_way_id: this.paymentRegistrationForm.moneyWay.toString(), money_way_id: this.paymentRegistrationForm.moneyWay.toString(),
contract_plan_act_links: this.paymentRegistrationForm.plan 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({ editorFundLog({
id: this.registrationId, id: this.registrationId,
contract_id: this.contract.id, contract_id: this.contract.id,
@ -573,6 +580,7 @@ import { listdeptNoAuth } from '@/api/system/department'
apply_money: this.paymentRegistrationForm.applyMoney, apply_money: this.paymentRegistrationForm.applyMoney,
discount_money: this.paymentRegistrationForm.deductionMoney, discount_money: this.paymentRegistrationForm.deductionMoney,
money_way_id: this.paymentRegistrationForm.moneyWay.toString(), 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_plan_act_links: this.$refs["planTable"].getSelection().map(item => ({
contract_id: this.contract.id, contract_id: this.contract.id,
plan_id: item.id, plan_id: item.id,

@ -7,15 +7,62 @@
> >
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<span style="padding: 0 6px; word-break: keep-all"> 业务科室 </span>
<span>
<el-select
v-model="select.department_id"
clearable
placeholder="业务科室选择"
size="small"
style="width: 120px"
>
<el-option
v-for="item in departments"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</span>
<span style="padding: 0 6px; word-break: keep-all">确认日期</span>
<span>
<DatePicker
:value="[select.start_audit_date, select.end_audit_date]"
placeholder="请选择日期"
type="daterange"
placement="bottom-start"
style="width: 180px"
@on-change="(e) => {
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 = '';
}
}"
></DatePicker>
</span>
<span style="padding: 0 6px; word-break: keep-all">创建日期</span> <span style="padding: 0 6px; word-break: keep-all">创建日期</span>
<span> <span>
<DatePicker <DatePicker
:value="selectDate" :value="selectDate"
placeholder="请选择日期" placeholder="请选择日期"
type="date" type="daterange"
placement="bottom-start" placement="bottom-start"
style="width: 180px" style="width: 180px"
@on-change="(e) => (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] = '';
}
}"
></DatePicker> ></DatePicker>
</span> </span>
@ -90,16 +137,17 @@
style=" style="
margin: 10px 0; margin: 10px 0;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
" "
> >
<span>是否选择为父级</span>
<el-switch v-model="isPlanSearchPid" style="padding: 0 4px;" active-text="是" inactive-text="否"></el-switch>
<div> <div>
已选择<span style="margin-right: 10px">{{ 已选择<span style="margin-right: 10px">{{
select.plan_name select.plan_name
}}</span> }}</span>
</div> </div>
<el-link type="success" @click="clearSelectForSearch" <el-link style="margin-left: auto;" type="success" @click="clearSelectForSearch"
>清空选择</el-link >清空选择</el-link
> >
</div> </div>
@ -192,12 +240,16 @@ import { Message } from "element-ui";
import { getBudget } from "@/api/budget/budget"; import { getBudget } from "@/api/budget/budget";
import { getparameter } from "@/api/system/dictionary"; import { getparameter } from "@/api/system/dictionary";
import examineRegistration from "./components/examineRegistration"; import examineRegistration from "./components/examineRegistration";
import { listdeptNoAuth } from '@/api/system/department'
export default { export default {
components: { components: {
examineRegistration, examineRegistration,
}, },
data() { data() {
return { return {
planSearchPid: "",
isPlanSearchPid: false,
departments: [],
moneyWay: [], moneyWay: [],
plan: [], plan: [],
planTableSearch: [ planTableSearch: [
@ -249,8 +301,11 @@ export default {
year: "", year: "",
plan_id: "", plan_id: "",
plan_name: "", plan_name: "",
department_id: "",
start_audit_date: "",
end_audit_date: "",
}, },
selectDate: "", selectDate: [],
list: [], list: [],
total: 0, total: 0,
pageIndex: 1, pageIndex: 1,
@ -377,6 +432,11 @@ export default {
}; };
}, },
methods: { methods: {
//
async getDepartment() {
this.departments = await listdeptNoAuth();
},
planPageChange(e) { planPageChange(e) {
this.plansPageIndex = e; this.plansPageIndex = e;
this.getBudgets(); this.getBudgets();
@ -390,6 +450,8 @@ export default {
).detail; ).detail;
}, },
clearSelectForSearch() { clearSelectForSearch() {
this.isPlanSearchPid = false;
this.planSearchPid = "";
this.select.plan_id = ""; this.select.plan_id = "";
this.select.plan_name = "请选择预算计划"; this.select.plan_name = "请选择预算计划";
}, },
@ -432,7 +494,7 @@ export default {
page: this.plansPageIndex, page: this.plansPageIndex,
plan_department_id: this.planSearch.plan_department_id, plan_department_id: this.planSearch.plan_department_id,
top_pid: 1, 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) => { }).then((res) => {
this.plans = res.list.data; this.plans = res.list.data;
@ -454,9 +516,11 @@ export default {
selectPlanForSearch(sel) { selectPlanForSearch(sel) {
console.log(sel); console.log(sel);
if (sel) { if (sel) {
this.planSearchPid = sel.pid;
this.select.plan_id = sel.id; 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 { } else {
this.planSearchPid = "";
this.select.plan_id = ""; this.select.plan_id = "";
this.select.plan_name = ""; this.select.plan_name = "";
} }
@ -486,13 +550,27 @@ export default {
this.getFundLogs(true); this.getFundLogs(true);
}, },
async getFundLogs(is_export) { async getFundLogs(is_export) {
let pidPlans = []
if (this.isPlanSearchPid) {
pidPlans = (await getBudget({
pid: this.planSearchPid,
page: 1,
page_size: 999,
})).list.data
}
await getFundLog({ await getFundLog({
page_size: this.pageSize, page_size: this.pageSize,
page: this.pageIndex, page: this.pageIndex,
keyword: this.keyword, keyword: this.keyword,
date: this.selectDate, start_date: this.selectDate[0],
end_date: this.selectDate[1],
status: this.status, 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) => { }).then((res) => {
let tokens = getToken(); let tokens = getToken();
if (is_export) { if (is_export) {
@ -545,6 +623,9 @@ export default {
this.getMoneyWay(); this.getMoneyWay();
this.getFundLogs(); this.getFundLogs();
}, },
created() {
this.getDepartment()
}
}; };
</script> </script>

@ -8,6 +8,13 @@
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div class="select-bar"> <div class="select-bar">
<div>
<span style="padding: 0 6px">关键词</span>
<span>
<Input v-model="select.keyword" placeholder="请输入关键词" clearable style="width: 114px"/>
</span>
</div>
<div> <div>
<span style="padding: 0 6px">创建日期</span> <span style="padding: 0 6px">创建日期</span>
<span> <span>
@ -52,7 +59,7 @@
<Select <Select
placeholder="科室选择" placeholder="科室选择"
clearable clearable
v-model="select.department" v-model="select.department_id"
style="width: 130px" style="width: 130px"
> >
<Option <Option
@ -299,6 +306,7 @@ export default {
otherType: [], otherType: [],
total: 0, total: 0,
select: { select: {
keyword: "",
page: 1, page: 1,
page_size: 10, page_size: 10,
start_created_at: "", start_created_at: "",
@ -389,11 +397,11 @@ export default {
align: "left", align: "left",
customFn: (row) => { customFn: (row) => {
{ {
return row.plans.map((item) => { return row.plan_act_link.map((item) => {
return ( return (
<div> <div>
{" "} {" "}
[{item.year}] {item.pid_info ? item.pid_info.name : ''} - {item.name}{" "} [{item.plan?.year}] {item.plan?.pid_info ? item.plan?.pid_info.name : ''} - {item.plan?.name}{" "} [使用金额] {item.use_money}
</div> </div>
); );
}); });

Loading…
Cancel
Save