|
@@ -31,18 +31,13 @@
|
|
|
</el-form>
|
|
|
</template>
|
|
|
<template #toolbar_buttons>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="onSend"
|
|
|
- v-if="state.queryParams.Status === 1"
|
|
|
- v-auth="'snapshot:reSend:citizen:send'"
|
|
|
- :disabled="isChecked"
|
|
|
- :loading="state.loading"
|
|
|
+ <!-- v-if="state.queryParams.Status === 1"-->
|
|
|
+ <el-button type="primary" @click="onSend" v-auth="'snapshot:reSend:citizen:send'" :disabled="isChecked" :loading="state.loading"
|
|
|
>批量发送红包<span v-if="checkTable.length">({{ checkTable.length }})</span>
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template #order_detail="{ row }">
|
|
|
- <order-detail :order="row" @updateList="queryList">{{ row.title }}</order-detail>
|
|
|
+ <order-detail :order="{ id: row.orderId }" @updateList="queryList">{{ row.no }}</order-detail>
|
|
|
</template>
|
|
|
<template #pager>
|
|
|
<pagination
|
|
@@ -83,9 +78,11 @@
|
|
|
|
|
|
<script lang="tsx" setup name="snapshotReSendCitizen">
|
|
|
import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
-import { FormInstance } from 'element-plus';
|
|
|
+import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
|
|
|
import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
|
|
|
-import { getCitizenRedEnvelopeApprovalList } from '@/api/snapshot/reSend';
|
|
|
+import { citizenRedEnvelopeApproval, getCitizenRedEnvelopeApprovalList } from '@/api/snapshot/reSend';
|
|
|
+import Other from '@/utils/other';
|
|
|
+import { knowledgeLexiconDelete } from '@/api/auxiliary/knowledgeLexicon';
|
|
|
|
|
|
// 引入组件
|
|
|
const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
|
|
@@ -140,38 +137,38 @@ const gridOptions = reactive<any>({
|
|
|
columns: [
|
|
|
{ type: 'checkbox', width: 50, align: 'center' },
|
|
|
{
|
|
|
- field: 'name',
|
|
|
+ field: 'no',
|
|
|
title: '工单编码',
|
|
|
slots: { default: 'order_detail' },
|
|
|
},
|
|
|
{
|
|
|
- field: 'citizenReadPackAmountTxt',
|
|
|
+ field: 'creationTime',
|
|
|
title: '增加时间',
|
|
|
- // formatter: 'formatDate',
|
|
|
+ formatter: 'formatDate',
|
|
|
},
|
|
|
{
|
|
|
- field: 'guiderReadPackAmountTxt',
|
|
|
+ field: 'phoneNumber',
|
|
|
title: '手机号',
|
|
|
},
|
|
|
{
|
|
|
- field: 'displayOrder',
|
|
|
+ field: 'amount',
|
|
|
title: '金额',
|
|
|
},
|
|
|
{
|
|
|
- field: 'citizenReadPackAmountTxt',
|
|
|
+ field: 'receiveTime',
|
|
|
title: '发放时间',
|
|
|
- // formatter: 'formatDate',
|
|
|
+ formatter: 'formatDate',
|
|
|
},
|
|
|
{
|
|
|
- field: 'citizenReadPackAmountTxt',
|
|
|
+ field: 'distributionStateTxt',
|
|
|
title: '状态',
|
|
|
},
|
|
|
{
|
|
|
- field: 'citizenReadPackAmountTxt',
|
|
|
+ field: 'pickupStatusTxt',
|
|
|
title: '领取状态',
|
|
|
},
|
|
|
{
|
|
|
- field: 'displayOrder',
|
|
|
+ field: 'remark',
|
|
|
title: '备注',
|
|
|
minWidth: 200,
|
|
|
},
|
|
@@ -188,6 +185,7 @@ const requestParams = ref<EmptyObjectType>({});
|
|
|
const queryList = () => {
|
|
|
state.loading = true;
|
|
|
gridOptions.loading = true;
|
|
|
+ requestParams.value = Other.deepClone(state.queryParams);
|
|
|
requestParams.value.BeginCreationTime = state.queryParams.zjTime === null ? null : state.queryParams.zjTime[0]; // 增加时间
|
|
|
requestParams.value.EndCreationTime = state.queryParams.zjTime === null ? null : state.queryParams.zjTime[1];
|
|
|
Reflect.deleteProperty(requestParams.value, 'zjTime'); // 删除无用的参数
|
|
@@ -197,10 +195,14 @@ const queryList = () => {
|
|
|
gridOptions.data = res.result.items ?? [];
|
|
|
state.total = res.result.total ?? 0;
|
|
|
gridOptions.loading = false;
|
|
|
+ gridRef.value.clearCheckboxRow();
|
|
|
+ checkTable.value = [];
|
|
|
})
|
|
|
.finally(() => {
|
|
|
state.loading = false;
|
|
|
gridOptions.loading = false;
|
|
|
+ gridRef.value.clearCheckboxRow();
|
|
|
+ checkTable.value = [];
|
|
|
});
|
|
|
};
|
|
|
// 重置表单
|
|
@@ -236,7 +238,24 @@ const isChecked = computed(() => {
|
|
|
});
|
|
|
|
|
|
// 批量发送红包
|
|
|
-const onSend = () => {};
|
|
|
+const onSend = () => {
|
|
|
+ const ids = checkTable.value.map((item: any) => item.id);
|
|
|
+ ElMessageBox.confirm(`您确认要批量发送红包选中的工单?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ draggable: true,
|
|
|
+ cancelButtonClass: 'default-button',
|
|
|
+ autofocus: false,
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ citizenRedEnvelopeApproval({ ids }).then(() => {
|
|
|
+ ElMessage.success('批量发送成功');
|
|
|
+ queryList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+};
|
|
|
// 页面加载时
|
|
|
onMounted(() => {
|
|
|
queryList();
|