|
|
@@ -69,8 +69,8 @@
|
|
|
</template>
|
|
|
|
|
|
<!-- 原因插槽 -->
|
|
|
- <template #reason="{ row }">
|
|
|
- <span>{{ row.reason || "-" }}</span>
|
|
|
+ <template #auditDesc="{ row }">
|
|
|
+ <span>{{ row.auditDesc || "-" }}</span>
|
|
|
</template>
|
|
|
</Table>
|
|
|
|
|
|
@@ -83,8 +83,37 @@
|
|
|
<el-form-item label="截止卡号" prop="endNo">
|
|
|
<el-input v-model="form.endNo" placeholder="请输入截至卡号" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="学校" prop="schoolName">
|
|
|
- <el-input v-model="form.schoolName" placeholder="请输入学校" />
|
|
|
+ <!-- 省份 -->
|
|
|
+ <el-form-item label="省份" prop="province">
|
|
|
+ <el-select
|
|
|
+ v-model="form.province"
|
|
|
+ placeholder="请选择省份"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="getCampusListData(this.value)"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="province in provinceList"
|
|
|
+ :key="province.dictValue"
|
|
|
+ :label="province.dictLabel"
|
|
|
+ :value="province.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 学校 -->
|
|
|
+ <el-form-item label="学校" prop="schoolId">
|
|
|
+ <el-select
|
|
|
+ v-model="form.schoolId"
|
|
|
+ placeholder="请选择学校"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="school in schoolList"
|
|
|
+ :key="school.id"
|
|
|
+ :label="school.name"
|
|
|
+ :value="school.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="原因" prop="reason">-->
|
|
|
<!-- <el-input v-model="form.reason" placeholder="请输入原因" />-->
|
|
|
@@ -139,13 +168,13 @@
|
|
|
>
|
|
|
<el-form-item label="审核结果" prop="status">
|
|
|
<el-radio-group v-model="reviewForm.status">
|
|
|
- <el-radio :value="1">审核通过</el-radio>
|
|
|
- <el-radio :value="2">已拒绝</el-radio>
|
|
|
+ <el-radio :value="2">审核通过</el-radio>
|
|
|
+ <el-radio :value="3">已拒绝</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="原因" prop="reason">
|
|
|
+ <el-form-item label="原因" prop="auditDesc">
|
|
|
<el-input
|
|
|
- v-model="reviewForm.reason"
|
|
|
+ v-model="reviewForm.auditDesc"
|
|
|
placeholder="请输入审核原因"
|
|
|
type="textarea"
|
|
|
:rows="3"
|
|
|
@@ -168,12 +197,17 @@ import SearchForm from "@/components/SearchForm/index.vue";
|
|
|
import Table from "@/components/Table/index.vue";
|
|
|
import formConfig from "./config/form.js";
|
|
|
import tableConfig from "./config/table.js";
|
|
|
+import {ref} from "vue";
|
|
|
+import {getPaperProvinces} from "@/api/dz/papers.js";
|
|
|
+import {getCampusSchoolList} from "@/api/dz/cards.js";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
const openList = ref([]);
|
|
|
const open = ref(false);
|
|
|
const reviewOpen = ref(false);
|
|
|
+const provinceList = ref([]); // 省份列表
|
|
|
+const schoolList = ref([]); // 学校列表
|
|
|
const loading = ref(true);
|
|
|
const showSearch = ref(true);
|
|
|
const total = ref(0);
|
|
|
@@ -194,12 +228,13 @@ const data = reactive({
|
|
|
reviewForm: {
|
|
|
id: null,
|
|
|
status: null,
|
|
|
- reason: null,
|
|
|
+ auditDesc: null,
|
|
|
startNo: null,
|
|
|
endNo: null,
|
|
|
applicant: null,
|
|
|
createTime: null,
|
|
|
- schoolName: null,
|
|
|
+ province:null,
|
|
|
+ schoolId: null,
|
|
|
},
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
@@ -212,7 +247,8 @@ const data = reactive({
|
|
|
applicant: [{ required: true, message: "申请人不能为空", trigger: "blur" }],
|
|
|
startNo: [{ required: true, message: "起始卡号不能为空", trigger: "blur" }],
|
|
|
endNo: [{ required: true, message: "截至卡号不能为空", trigger: "blur" }],
|
|
|
- schoolName: [{ required: true, message: "学校不能为空", trigger: "blur" }],
|
|
|
+ province: [{ required: true, message: "省份不能为空", trigger: "change" }],
|
|
|
+ schoolId: [{ required: true, message: "学校不能为空", trigger: "change" }],
|
|
|
status: [
|
|
|
{ required: true, message: "申请状态不能为空", trigger: "change" },
|
|
|
],
|
|
|
@@ -221,7 +257,7 @@ const data = reactive({
|
|
|
status: [
|
|
|
{ required: true, message: "审核结果不能为空", trigger: "change" },
|
|
|
],
|
|
|
- reason: [],
|
|
|
+ auditDesc: [],
|
|
|
},
|
|
|
});
|
|
|
|
|
|
@@ -237,6 +273,32 @@ function getList() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+// 获取省份列表
|
|
|
+async function getProvinceList() {
|
|
|
+ try {
|
|
|
+ const response = await getPaperProvinces();
|
|
|
+ if (response.code === 200) {
|
|
|
+ provinceList.value = response.data || [];
|
|
|
+ }
|
|
|
+ schoolList.value = []
|
|
|
+ } catch (error) {
|
|
|
+ console.error("获取省份列表失败:", error);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 获取校区列表
|
|
|
+async function getCampusListData() {
|
|
|
+ try {
|
|
|
+ const response = await getCampusSchoolList({ campus: false, location: form.value.province, pageNum: 1, pageSize: 1000 });
|
|
|
+ if (response.code === 200) {
|
|
|
+ schoolList.value = response.data || [];
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error("获取校区列表失败:", error);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 计算申请数量
|
|
|
function calculateQuantity(startNo, endNo) {
|
|
|
if (!startNo || !endNo) return 0;
|
|
|
@@ -248,9 +310,9 @@ function calculateQuantity(startNo, endNo) {
|
|
|
// 获取状态文本
|
|
|
function getStatusText(status) {
|
|
|
const statusMap = {
|
|
|
- 0: "待审核",
|
|
|
- 1: "审核通过",
|
|
|
- 2: "已拒绝",
|
|
|
+ 1: "待审核",
|
|
|
+ 2: "审核通过",
|
|
|
+ 3: "已拒绝",
|
|
|
};
|
|
|
return statusMap[status] || "未知";
|
|
|
}
|
|
|
@@ -258,9 +320,9 @@ function getStatusText(status) {
|
|
|
// 获取状态类型
|
|
|
function getStatusType(status) {
|
|
|
const typeMap = {
|
|
|
- 0: "warning",
|
|
|
- 1: "success",
|
|
|
- 2: "danger",
|
|
|
+ 1: "warning",
|
|
|
+ 2: "success",
|
|
|
+ 3: "danger",
|
|
|
};
|
|
|
return typeMap[status] || "info";
|
|
|
}
|
|
|
@@ -297,7 +359,7 @@ function resetReview() {
|
|
|
reviewForm.value = {
|
|
|
id: null,
|
|
|
status: null,
|
|
|
- reason: null,
|
|
|
+ auditDesc: null,
|
|
|
startNo: null,
|
|
|
endNo: null,
|
|
|
applicant: null,
|
|
|
@@ -352,7 +414,7 @@ function handleReview(row) {
|
|
|
reviewForm.value = {
|
|
|
id: row.id,
|
|
|
status: null,
|
|
|
- reason: null,
|
|
|
+ auditDesc: null,
|
|
|
startNo: row.startNo || "-",
|
|
|
endNo: row.endNo || "-",
|
|
|
applicant: row.applicant || "-",
|
|
|
@@ -401,7 +463,7 @@ function submitReview() {
|
|
|
const updateData = {
|
|
|
id: reviewForm.value.id,
|
|
|
status: reviewForm.value.status,
|
|
|
- reason: reviewForm.value.reason,
|
|
|
+ auditDesc: reviewForm.value.auditDesc,
|
|
|
};
|
|
|
updateOpen(updateData).then((response) => {
|
|
|
proxy.$modal.msgSuccess("审核成功");
|
|
|
@@ -422,7 +484,7 @@ function handleExport() {
|
|
|
`open_${new Date().getTime()}.xlsx`
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
+getProvinceList();
|
|
|
getList();
|
|
|
</script>
|
|
|
<style>
|