From a68195121e02f4294542a11ac96e48047f0fde24 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期三, 28 十月 2026 18:09:09 +0800
Subject: [PATCH] 绩效科室
---
src/views/project/fund/performancedetails/index.vue | 55 ++++++++++++++++++
src/views/project/externalperson/index.vue | 71 +++++++++++++++++++++++
2 files changed, 124 insertions(+), 2 deletions(-)
diff --git a/src/views/project/externalperson/index.vue b/src/views/project/externalperson/index.vue
index cbc851f..043b51e 100644
--- a/src/views/project/externalperson/index.vue
+++ b/src/views/project/externalperson/index.vue
@@ -56,6 +56,7 @@
</el-table-column>
<el-table-column label="璐﹀彿缂栧彿" align="center" prop="userno" />
<el-table-column label="璐﹀彿鍚嶇О" align="center" prop="username" />
+ <el-table-column label="缁╂晥绉戝" align="center" prop="deptName" width="140" />
<el-table-column label="韬唤璇佸彿" width="200" align="center" prop="idcardno" />
<el-table-column label="鑱岀О" align="center" prop="title">
<template slot-scope="scope">
@@ -117,6 +118,27 @@
dict.label
}}</el-radio>
</el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row v-if="hasUserType(form.usertype, 'performance')">
+ <el-col :span="12">
+ <el-form-item label="缁╂晥绉戝" prop="deptId">
+ <el-select
+ v-model="form.deptId"
+ placeholder="璇烽�夋嫨缁╂晥绉戝"
+ clearable
+ filterable
+ style="width: 100%"
+ @change="handleDeptChange"
+ >
+ <el-option
+ v-for="dept in deptList"
+ :key="dept.deptId"
+ :label="dept.deptName"
+ :value="dept.deptId"
+ />
+ </el-select>
</el-form-item>
</el-col>
</el-row>
@@ -217,6 +239,7 @@
} from "@/api/project/organization";
import { getUserProfile } from "@/api/system/user";
+import { listDept } from "@/api/system/dept";
export default {
name: "Externalperson",
@@ -242,6 +265,8 @@
//鍖荤枟鏈烘瀯鍒楄〃
unitList: [],
+ // 缁╂晥绉戝鍒楄〃
+ deptList: [],
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -293,6 +318,20 @@
],
depositbank: [
{ required: true, message: "璇疯緭鍏ュ紑鎴烽摱琛�", trigger: "blur" }
+ ],
+ deptId: [
+ {
+ validator: (rule, value, callback) => {
+ if (
+ this.hasUserType(this.form.usertype, "performance") &&
+ (value === null || value === undefined || value === "")
+ ) {
+ return callback(new Error("璇烽�夋嫨缁╂晥绉戝"));
+ }
+ return callback();
+ },
+ trigger: "change"
+ }
]
},
};
@@ -306,6 +345,7 @@
created() {
this.getUserProfile();
this.getUnitList();
+ this.getDeptList();
// 榛樿涓嶆墦寮�
// this.getList();
},
@@ -381,7 +421,9 @@
updateBy: null,
updateTime: null,
pym: null,
- wbm: null
+ wbm: null,
+ deptId: null,
+ deptName: null
};
this.resetForm("form");
},
@@ -427,6 +469,9 @@
this.form = response.data;
//璐﹀彿绫诲埆涓哄鍊硷紙閫楀彿鍒嗛殧锛夛紝琛ㄥ崟鐢ㄦ暟缁勫洖鏄�
this.form.usertype = this.splitUserType(response.data.usertype);
+ if (this.form.deptId !== null && this.form.deptId !== undefined && this.form.deptId !== "") {
+ this.form.deptId = Number(this.form.deptId);
+ }
this.open = true;
this.title = "浜哄憳/鍗曚綅璐﹀彿淇℃伅淇敼";
});
@@ -440,6 +485,13 @@
if (res.organizationid == this.form.unitno)
this.form.unitname = res.organizationname;
});
+ //缁╂晥绉戝锛氭彁浜ゅ墠鎸� deptId 鍥炲~ deptName
+ if (this.form.deptId !== null && this.form.deptId !== undefined && this.form.deptId !== "") {
+ const dept = this.deptList.find(
+ item => String(item.deptId) === String(this.form.deptId)
+ );
+ this.form.deptName = dept ? dept.deptName : this.form.deptName;
+ }
//璐﹀彿绫诲埆涓哄鍊硷細鎻愪氦鍓嶈浆鍥為�楀彿鍒嗛殧鐨勫瓧绗︿覆
this.form.usertype = this.joinUserType(this.form.usertype);
console.log(this.form);
@@ -525,6 +577,23 @@
console.log(this.unitList);
}
});
+ },
+ /** 缁╂晥绉戝鍒楄〃 */
+ getDeptList() {
+ listDept({}).then(response => {
+ this.deptList = response.data || [];
+ });
+ },
+ /** 缁╂晥绉戝閫夋嫨鍙樺寲锛氬悓姝ュ悕绉� */
+ handleDeptChange(deptId) {
+ if (deptId === null || deptId === undefined || deptId === "") {
+ this.form.deptName = null;
+ return;
+ }
+ const dept = this.deptList.find(
+ item => String(item.deptId) === String(deptId)
+ );
+ this.form.deptName = dept ? dept.deptName : null;
}
}
};
diff --git a/src/views/project/fund/performancedetails/index.vue b/src/views/project/fund/performancedetails/index.vue
index fcc2577..bbddd00 100644
--- a/src/views/project/fund/performancedetails/index.vue
+++ b/src/views/project/fund/performancedetails/index.vue
@@ -296,6 +296,31 @@
</template>
</el-table-column>
<el-table-column
+ prop="deptName"
+ align="center"
+ label="缁╂晥绉戝"
+ width="160"
+ >
+ <template slot-scope="scope">
+ <el-select
+ v-model="scope.row.deptId"
+ size="mini"
+ clearable
+ filterable
+ placeholder="璇烽�夋嫨缁╂晥绉戝"
+ style="width: 100%"
+ @change="value => handleRowDeptChange(scope.row, value)"
+ >
+ <el-option
+ v-for="dept in deptList"
+ :key="dept.deptId"
+ :label="dept.deptName"
+ :value="dept.deptId"
+ />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column
prop="isunit"
align="center"
label="浜哄憳绫诲埆"
@@ -871,7 +896,8 @@
:label="city"
:key="city.id"
>{{ city.username }}{{ city.isUnitPerson ? "锛堝崟浣嶏級" : ""
- }}{{ city.unitname ? " 路 " + city.unitname : "" }}</el-checkbox
+ }}{{ city.unitname ? " 路 " + city.unitname : ""
+ }}{{ city.deptName ? " 路 绉戝锛�" + city.deptName : "" }}</el-checkbox
>
</el-checkbox-group>
</div>
@@ -928,6 +954,7 @@
import { listItemexpense } from "@/api/project/itemexpense";
import { getUserProfile } from "@/api/system/user";
+import { listDept } from "@/api/system/dept";
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import { getToken } from "@/utils/auth";
@@ -983,6 +1010,8 @@
expertlist: [],
//鍖荤枟鏈烘瀯鍒楄〃
unitList: [],
+ //缁╂晥绉戝鍒楄〃
+ deptList: [],
//璐圭敤鎶ラ攢鏈烘瀯鍒楄〃
feeUnitList: [],
batchdialogVisible: false,
@@ -2015,6 +2044,25 @@
});
},
+ /** 缁╂晥绉戝鍒楄〃 */
+ getDeptList() {
+ listDept({}).then(res => {
+ this.deptList = res.data || [];
+ });
+ },
+
+ /** 琛ㄦ牸鍐呯洿鎺ヤ慨鏀圭哗鏁堢瀹わ細鍚屾鍚嶇О */
+ handleRowDeptChange(row, deptId) {
+ if (deptId === null || deptId === undefined || deptId === "") {
+ this.$set(row, "deptName", null);
+ return;
+ }
+ const dept = this.deptList.find(
+ item => String(item.deptId) === String(deptId)
+ );
+ this.$set(row, "deptName", dept ? dept.deptName : null);
+ },
+
//鑾峰彇鍖荤枟鏈烘瀯鍒楄〃
getUnitList() {
listOrganization(3).then(response => {
@@ -2522,6 +2570,8 @@
isunit: isunit ? 1 : 0,
unitname: item.unitname,
unitno: item.unitno,
+ deptId: item.deptId,
+ deptName: item.deptName,
uintuserno: null,
title: item.title,
idcardtype: null,
@@ -2747,6 +2797,8 @@
singleDetail.title = person.title;
singleDetail.unitname = person.unitname;
singleDetail.unitno = person.unitno;
+ singleDetail.deptId = person.deptId;
+ singleDetail.deptName = person.deptName;
} else {
// 鎵嬪伐杈撳叆鐨勪汉鍛橈細鍙啓濮撳悕锛岃韩浠借瘉鍙�/閾惰璐﹀彿鐢辩粡鍔炰汉濉啓
singleDetail.beneficiaryname = String(key);
@@ -3175,6 +3227,7 @@
this.getExternalList();
this.getFeeUnitList();
this.listperformance();
+ this.getDeptList();
},
//鐢熷懡鍛ㄦ湡 - 鎸傝浇瀹屾垚锛堝彲浠ヨ闂瓺OM鍏冪礌锛�
--
Gitblit v1.9.3