搜索条件等

master
xy 1 year ago
parent 049ce19adb
commit f7f79119ab

@ -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;

@ -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,

@ -7,15 +7,62 @@
>
<div slot="content"></div>
<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>
<DatePicker
:value="selectDate"
placeholder="请选择日期"
type="date"
type="daterange"
placement="bottom-start"
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>
</span>
@ -90,16 +137,17 @@
style="
margin: 10px 0;
display: flex;
justify-content: space-between;
align-items: center;
"
>
<span>是否选择为父级</span>
<el-switch v-model="isPlanSearchPid" style="padding: 0 4px;" active-text="是" inactive-text="否"></el-switch>
<div>
已选择<span style="margin-right: 10px">{{
select.plan_name
}}</span>
</div>
<el-link type="success" @click="clearSelectForSearch"
<el-link style="margin-left: auto;" type="success" @click="clearSelectForSearch"
>清空选择</el-link
>
</div>
@ -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()
}
};
</script>

@ -8,6 +8,13 @@
<div slot="content"></div>
<slot>
<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>
<span style="padding: 0 6px">创建日期</span>
<span>
@ -52,7 +59,7 @@
<Select
placeholder="科室选择"
clearable
v-model="select.department"
v-model="select.department_id"
style="width: 130px"
>
<Option
@ -299,6 +306,7 @@ export default {
otherType: [],
total: 0,
select: {
keyword: "",
page: 1,
page_size: 10,
start_created_at: "",
@ -389,11 +397,11 @@ export default {
align: "left",
customFn: (row) => {
{
return row.plans.map((item) => {
return row.plan_act_link.map((item) => {
return (
<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>
);
});

Loading…
Cancel
Save