|
|
@@ -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 />
|
|
|
@@ -115,10 +115,10 @@
|
|
|
<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" />
|
|
|
修改
|
|
|
@@ -129,7 +129,8 @@
|
|
|
</CustomButton>
|
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
- <card-table :data="cardList" :loading="loading" :hide-actions="true" @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" />
|
|
|
@@ -156,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();
|
|
|
@@ -237,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;
|
|
|
@@ -284,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('缴费成功')
|
|
|
@@ -311,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('退费成功')
|
|
|
@@ -320,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('结算成功')
|