|
|
@@ -42,8 +42,8 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="卡分配日期" prop="assignTimeRange">
|
|
|
- <el-date-picker v-model="queryParams.assignTimeRange" type="daterange" range-separator="至" start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期" value-format="YYYY-MM-DD" class="w-[282px]!" />
|
|
|
+ <el-date-picker v-model="queryParams.assignTimeRange" type="daterange" range-separator="至"
|
|
|
+ start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD" class="w-[282px]!" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="平台机构" prop="deptId">
|
|
|
<ie-institution-select v-model="queryParams.deptId" class="w-[180px]!" clearable />
|
|
|
@@ -65,7 +65,10 @@
|
|
|
<el-form-item label="过期状态" prop="timeStatus">
|
|
|
<ie-select v-model="queryParams.timeStatus" :options="card_time_status" class="w-[180px]!" clearable />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="结算状态" prop="payStatus">
|
|
|
+ <el-form-item label="结算状态" prop="isSettlement">
|
|
|
+ <ie-select v-model="queryParams.isSettlement" :options="card_settlement_status" class="w-[180px]!" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="缴费状态" prop="payStatus">
|
|
|
<ie-select v-model="queryParams.payStatus" :options="card_pay_status" class="w-[180px]!" clearable />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -105,17 +108,17 @@
|
|
|
直接开卡
|
|
|
</CustomButton>
|
|
|
<CustomButton icon="delete" color="#F56C6C" v-hasPermi="['dz:cards:remove']" :disabled="batchDisabled"
|
|
|
- @click="handleDeleteBatch">
|
|
|
+ @click="handleDeleteBatch" v-if="false">
|
|
|
删除
|
|
|
</CustomButton>
|
|
|
<CustomButton color="#FFC107" :disabled="batchDisabled" @click="handleSettle">
|
|
|
<svg-icon icon-class="chart" class="mr-1" style="font-size: 12px" />
|
|
|
结算
|
|
|
</CustomButton>
|
|
|
- <CustomButton color="#009688" :disabled="batchDisabled" @click="handleRenew">
|
|
|
+ <!-- <CustomButton color="#009688" :disabled="batchDisabled" @click="handleRenew">
|
|
|
<svg-icon icon-class="time" class="mr-1" style="font-size: 14px" />
|
|
|
续期
|
|
|
- </CustomButton>
|
|
|
+ </CustomButton> -->
|
|
|
<CustomButton color="#673AB7" :disabled="editDisabled" @click="handleEdit">
|
|
|
<svg-icon icon-class="edit" class="mr-1" style="font-size: 12px" />
|
|
|
修改
|
|
|
@@ -126,7 +129,8 @@
|
|
|
</CustomButton>
|
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
- <card-table :data="cardList" :loading="loading" @selectionChange="handleSelectionChange" @delete="handleDelete" />
|
|
|
+ <card-table :data="cardList" :loading="loading" :hide-actions="true" @selectionChange="handleSelectionChange"
|
|
|
+ @delete="handleDelete" />
|
|
|
<div class="flex justify-end">
|
|
|
<Pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
|
|
@pagination="getList" />
|
|
|
@@ -153,7 +157,7 @@ import AssignDialog from './components/AssignDialog.vue';
|
|
|
import EditDialog from './components/EditDialog.vue';
|
|
|
import RelateDialog from './components/RelateDialog.vue';
|
|
|
import { listCards, delCards, payCard, closeCard, reopenCard, refundCard, settleCard, renewCard } from '@/api/dz/cards';
|
|
|
-import { CARD_STATUS } from '@/common/enum';
|
|
|
+import { CARD_STATUS, EnumCardType } from '@/common/enum';
|
|
|
import { getCurrentInstance, nextTick } from 'vue';
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
@@ -173,19 +177,19 @@ const {
|
|
|
} = useSchool({ loadCampus: true, loadCampusClass: true, loadClass: true });
|
|
|
const {
|
|
|
exam_type,
|
|
|
- card_status,
|
|
|
card_distribute_status,
|
|
|
card_time_status,
|
|
|
- bool_values,
|
|
|
+ card_settlement_status,
|
|
|
card_pay_status,
|
|
|
card_type,
|
|
|
-} = proxy.useDict("exam_type", "card_status", "card_distribute_status", "card_time_status", "bool_values", "card_pay_status", "card_type");
|
|
|
+} = proxy.useDict("exam_type", "card_distribute_status", "card_time_status", "card_settlement_status", "card_pay_status", "card_type");
|
|
|
const cascaderProps = {
|
|
|
label: "areaName",
|
|
|
value: "areaId",
|
|
|
checkStrictly: true,
|
|
|
}
|
|
|
const queryParams = ref({
|
|
|
+ pageNum: 1,
|
|
|
pageSize: 20
|
|
|
})
|
|
|
const showSearch = ref(true)
|
|
|
@@ -214,12 +218,13 @@ watchEffect(() => {
|
|
|
})
|
|
|
|
|
|
const handleQuery = () => {
|
|
|
- queryParams.page = 1;
|
|
|
+ queryParams.pageNum = 1;
|
|
|
getList();
|
|
|
}
|
|
|
|
|
|
const resetQuery = () => {
|
|
|
queryParams.value = {
|
|
|
+ pageNum: 1,
|
|
|
pageSize: 20
|
|
|
};
|
|
|
reset();
|
|
|
@@ -233,7 +238,6 @@ const getList = () => {
|
|
|
assignTimeEnd: queryParams.value.assignTimeRange?.[1],
|
|
|
};
|
|
|
delete params.assignTimeRange;
|
|
|
- console.log(params)
|
|
|
listCards(params).then(res => {
|
|
|
cardList.value = res.rows;
|
|
|
total.value = res.total;
|
|
|
@@ -280,6 +284,12 @@ const handleOpenCard = () => {
|
|
|
}
|
|
|
|
|
|
const handlePay = () => {
|
|
|
+ // 体验卡禁止缴费
|
|
|
+ const isExperienceCard = selectedRows.value.some(item => item.type === EnumCardType.EXPERIENCE);
|
|
|
+ if (isExperienceCard) {
|
|
|
+ proxy.$modal.msgError('体验卡禁止缴费');
|
|
|
+ return;
|
|
|
+ }
|
|
|
proxy.$modal.confirm(`是否确认缴费所选数据 (${ids.value.length}项) ?`).then(() => {
|
|
|
payCard(ids.value).then(() => {
|
|
|
proxy.$modal.msgSuccess('缴费成功')
|
|
|
@@ -307,6 +317,12 @@ const handleReopen = () => {
|
|
|
}
|
|
|
|
|
|
const handleRefund = () => {
|
|
|
+ // 体验卡禁止退费
|
|
|
+ const isExperienceCard = selectedRows.value.some(item => item.type === EnumCardType.EXPERIENCE);
|
|
|
+ if (isExperienceCard) {
|
|
|
+ proxy.$modal.msgError('体验卡禁止退费');
|
|
|
+ return;
|
|
|
+ }
|
|
|
proxy.$modal.confirm(`是否确认退费所选数据 (${ids.value.length}项) ?`).then(() => {
|
|
|
refundCard(ids.value).then(() => {
|
|
|
proxy.$modal.msgSuccess('退费成功')
|
|
|
@@ -316,6 +332,12 @@ const handleRefund = () => {
|
|
|
}
|
|
|
|
|
|
const handleSettle = () => {
|
|
|
+ // 体验卡禁止结算
|
|
|
+ const isExperienceCard = selectedRows.value.some(item => item.type === EnumCardType.EXPERIENCE);
|
|
|
+ if (isExperienceCard) {
|
|
|
+ proxy.$modal.msgError('体验卡禁止结算');
|
|
|
+ return;
|
|
|
+ }
|
|
|
proxy.$modal.confirm(`是否确认结算所选数据 (${ids.value.length}项) ?`).then(() => {
|
|
|
settleCard(ids.value).then(() => {
|
|
|
proxy.$modal.msgSuccess('结算成功')
|