|
@@ -120,7 +120,7 @@
|
|
|
style="border-color: #52c41a; color: #52c41a; font-weight: 500"
|
|
style="border-color: #52c41a; color: #52c41a; font-weight: 500"
|
|
|
>
|
|
>
|
|
|
<svg-icon icon-class="edit" class="mr-1" style="font-size: 16px" />
|
|
<svg-icon icon-class="edit" class="mr-1" style="font-size: 16px" />
|
|
|
- 申请开卡
|
|
|
|
|
|
|
+ 直接申请
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
@@ -191,6 +191,7 @@
|
|
|
|
|
|
|
|
<AssignCardDialog
|
|
<AssignCardDialog
|
|
|
v-model="assignCardOpen"
|
|
v-model="assignCardOpen"
|
|
|
|
|
+ :selected-cards="selectedRows"
|
|
|
:school-list="schoolList"
|
|
:school-list="schoolList"
|
|
|
:card-type-options="card_type"
|
|
:card-type-options="card_type"
|
|
|
@success="handleDialogSuccess"
|
|
@success="handleDialogSuccess"
|
|
@@ -285,7 +286,7 @@ import ApplyCardDialog from "./components/ApplyCardDialog.vue";
|
|
|
import formInfo from "./config/form.js";
|
|
import formInfo from "./config/form.js";
|
|
|
import tableConfig from "./config/table.js";
|
|
import tableConfig from "./config/table.js";
|
|
|
import { listUniversity } from "@/api/dz/school";
|
|
import { listUniversity } from "@/api/dz/school";
|
|
|
-import { assignCard, issueCard } from "@/api/dz/cards";
|
|
|
|
|
|
|
+import { assignCard, issueCard, getCampusList } from "@/api/dz/cards";
|
|
|
import { listDept } from "@/api/system/dept";
|
|
import { listDept } from "@/api/system/dept";
|
|
|
import { listAgent } from "@/api/dz/agent";
|
|
import { listAgent } from "@/api/dz/agent";
|
|
|
|
|
|
|
@@ -308,6 +309,7 @@ const {
|
|
|
|
|
|
|
|
const cardsList = ref([]);
|
|
const cardsList = ref([]);
|
|
|
const schoolList = ref([]);
|
|
const schoolList = ref([]);
|
|
|
|
|
+const campusList = ref([]); // 校区列表
|
|
|
const classList = ref([]); // 班级列表
|
|
const classList = ref([]); // 班级列表
|
|
|
const open = ref(false);
|
|
const open = ref(false);
|
|
|
const cardGenerationOpen = ref(false); // 制卡对话框
|
|
const cardGenerationOpen = ref(false); // 制卡对话框
|
|
@@ -317,7 +319,7 @@ const closeCardOpen = ref(false); // 关卡对话框
|
|
|
const reopenCardOpen = ref(false); // 重开对话框
|
|
const reopenCardOpen = ref(false); // 重开对话框
|
|
|
const refundOpen = ref(false); // 退费对话框
|
|
const refundOpen = ref(false); // 退费对话框
|
|
|
const associateCampusOpen = ref(false); // 关联校区对话框
|
|
const associateCampusOpen = ref(false); // 关联校区对话框
|
|
|
-const applyCardOpen = ref(false); // 申请开卡对话框
|
|
|
|
|
|
|
+const applyCardOpen = ref(false); // 直接申请对话框
|
|
|
const currentCardNo = ref([]); // 当前缴费的卡号(支持数组)
|
|
const currentCardNo = ref([]); // 当前缴费的卡号(支持数组)
|
|
|
const currentCloseCardNo = ref([]); // 当前关卡的卡号(支持数组)
|
|
const currentCloseCardNo = ref([]); // 当前关卡的卡号(支持数组)
|
|
|
const currentReopenCardNo = ref([]); // 当前重开的卡号(支持数组)
|
|
const currentReopenCardNo = ref([]); // 当前重开的卡号(支持数组)
|
|
@@ -369,6 +371,9 @@ const searchConfig = computed(() => {
|
|
|
case "registerSchoolId":
|
|
case "registerSchoolId":
|
|
|
item.option = schoolList.value || [];
|
|
item.option = schoolList.value || [];
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case "campusId":
|
|
|
|
|
+ item.option = campusList.value || [];
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -577,6 +582,46 @@ function getSchoolList() {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/** 获取校区列表 */
|
|
|
|
|
+function getCampusListData() {
|
|
|
|
|
+ getCampusList({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 9999, // 获取所有校区
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((response) => {
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
|
+ // 处理API返回的数据结构
|
|
|
|
|
+ let campusData = [];
|
|
|
|
|
+ if (response.data) {
|
|
|
|
|
+ campusData = Array.isArray(response.data) ? response.data : [];
|
|
|
|
|
+ } else if (response.rows) {
|
|
|
|
|
+ campusData = response.rows;
|
|
|
|
|
+ } else if (response.list) {
|
|
|
|
|
+ campusData = response.list;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 确保数据格式符合配置要求
|
|
|
|
|
+ campusData = campusData.map((item) => {
|
|
|
|
|
+ // 如果API返回的是 {id, name, ...} 格式,直接使用
|
|
|
|
|
+ if (item.id && item.name) {
|
|
|
|
|
+ return item;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 如果是其他格式,需要转换
|
|
|
|
|
+ return {
|
|
|
|
|
+ id: item.id || item.value || item.campusId,
|
|
|
|
|
+ name: item.name || item.label || item.campusName || item.title,
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ campusList.value = campusData;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((error) => {
|
|
|
|
|
+ console.error("获取校区列表失败:", error);
|
|
|
|
|
+ campusList.value = [];
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 取消按钮
|
|
// 取消按钮
|
|
|
// 处理弹窗成功事件
|
|
// 处理弹窗成功事件
|
|
|
function handleDialogSuccess(message) {
|
|
function handleDialogSuccess(message) {
|
|
@@ -851,7 +896,7 @@ async function getAgentListData() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 申请开卡按钮操作 */
|
|
|
|
|
|
|
+/** 直接申请按钮操作 */
|
|
|
function handleApplyCard() {
|
|
function handleApplyCard() {
|
|
|
if (selectedRows.value.length === 0) {
|
|
if (selectedRows.value.length === 0) {
|
|
|
// proxy.$modal.msgWarning("请选择要申请开卡的卡片");
|
|
// proxy.$modal.msgWarning("请选择要申请开卡的卡片");
|
|
@@ -860,16 +905,16 @@ function handleApplyCard() {
|
|
|
applyCardOpen.value = true;
|
|
applyCardOpen.value = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 处理申请开卡成功
|
|
|
|
|
|
|
+// 处理直接申请成功
|
|
|
function handleApplyCardSuccess(message) {
|
|
function handleApplyCardSuccess(message) {
|
|
|
proxy.$modal.msgSuccess(message);
|
|
proxy.$modal.msgSuccess(message);
|
|
|
getList();
|
|
getList();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 处理申请开卡确认
|
|
|
|
|
|
|
+// 处理直接申请确认
|
|
|
function handleApplyCardConfirm(data) {
|
|
function handleApplyCardConfirm(data) {
|
|
|
proxy.$modal.msgSuccess(
|
|
proxy.$modal.msgSuccess(
|
|
|
- `申请开卡成功!卡号段:${data.beginCardNo}-${data.endCardNo}`
|
|
|
|
|
|
|
+ `直接申请成功!卡号段:${data.beginCardNo}-${data.endCardNo}`
|
|
|
);
|
|
);
|
|
|
getList(); // 刷新列表
|
|
getList(); // 刷新列表
|
|
|
}
|
|
}
|
|
@@ -998,6 +1043,7 @@ function handleExport() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
getList();
|
|
getList();
|
|
|
|
|
+getCampusListData(); // 获取校区列表
|
|
|
|
|
|
|
|
// 监听地址选择变化,自动获取学校列表
|
|
// 监听地址选择变化,自动获取学校列表
|
|
|
watch(
|
|
watch(
|