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