|
@@ -0,0 +1,460 @@
|
|
|
+<template>
|
|
|
+ <div class="snapshot-re-audit-special-container layout-padding">
|
|
|
+ <div class="layout-padding-auto layout-padding-view pd20">
|
|
|
+ <vxe-grid v-bind="gridOptions" ref="gridRef" @checkbox-all="selectAllChangeEvent" @checkbox-change="selectChangeEvent">
|
|
|
+ <template #form>
|
|
|
+ <el-form :model="state.queryParams" ref="ruleFormRef" inline @submit.native.prevent :disabled="gridOptions.loading">
|
|
|
+ <el-form-item label="审批状态" prop="Status">
|
|
|
+ <el-select v-model="state.queryParams.Status" class="w100" placeholder="请选择审批状态" @change="handleQuery">
|
|
|
+ <el-option v-for="item in statusOptions" :key="item.key" :label="item.value" :value="item.key" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="工单编码" prop="No">
|
|
|
+ <el-input v-model="state.queryParams.No" placeholder="请填写工单编码" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="工单标题" prop="Title">
|
|
|
+ <el-input v-model="state.queryParams.Title" placeholder="请填写工单标题" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
+ <el-button @click="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
+ <template #toolbar_buttons>
|
|
|
+ <!-- <el-button type="primary" @click="onRemark" :disabled="isChecked" v-auth="'snapshot:reAudit:citizen:remark'" v-if="state.queryParams.Status === 1">
|
|
|
+ <SvgIcon name="ele-Plus" class="mr5" />添加备注
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="onSupply" v-auth="'snapshot:reAudit:citizen:supply'" :disabled="isChecked" :loading="state.loading" v-if="state.queryParams.Status === 1"
|
|
|
+ ><SvgIcon name="ele-Plus" class="mr5" />补充发放
|
|
|
+ </el-button>-->
|
|
|
+ </template>
|
|
|
+ <template #order_detail="{ row }">
|
|
|
+ <order-detail :order="{ id: row.orderId }" @updateList="queryList">{{ row.title }}</order-detail>
|
|
|
+ </template>
|
|
|
+ <template #action="{ row }">
|
|
|
+ <el-button link type="primary" @click="onAudit(row)" v-auth="'snapshot:reAudit:citizen:audit'" v-if="row.auditStatus === 0">
|
|
|
+ 审批
|
|
|
+ </el-button>
|
|
|
+ <el-button link type="danger" @click="onReturn(row)" v-auth="'snapshot:reAudit:citizen:return'" v-if="row.auditStatus === 0">
|
|
|
+ 退回
|
|
|
+ </el-button>
|
|
|
+ <el-button link type="primary" @click="onRemark(row)" v-auth="'snapshot:reAudit:citizen:remark'" v-if="row.auditStatus === 1">
|
|
|
+ 添加备注
|
|
|
+ </el-button>
|
|
|
+ <el-button link type="primary" @click="onSupply(row)" v-auth="'snapshot:reAudit:citizen:supply'" v-if="row.auditStatus === 1">
|
|
|
+ 补充发放
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template #pager>
|
|
|
+ <pagination
|
|
|
+ @pagination="queryList"
|
|
|
+ :total="state.total"
|
|
|
+ v-model:current-page="state.queryParams.PageIndex"
|
|
|
+ v-model:page-size="state.queryParams.PageSize"
|
|
|
+ :disabled="state.loading"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </vxe-grid>
|
|
|
+ </div>
|
|
|
+ <!-- 更多查询 -->
|
|
|
+ <el-drawer v-model="drawer" title="更多查询" size="500px">
|
|
|
+ <el-form :model="state.queryParams" ref="drawerRuleFormRef" @submit.native.prevent label-width="110px" :disabled="gridOptions.loading">
|
|
|
+ <el-form-item label="受理时间" prop="slTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="state.queryParams.slTime"
|
|
|
+ type="datetimerange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ @change="handleQuery"
|
|
|
+ value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
+ :default-time="defaultTimeStartEnd"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="审批时间" prop="spTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="state.queryParams.spTime"
|
|
|
+ type="datetimerange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ @change="handleQuery"
|
|
|
+ value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
+ :default-time="defaultTimeStartEnd"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="来电人电话" prop="FromPhone">
|
|
|
+ <el-input v-model="state.queryParams.FromPhone" placeholder="请填写来电人电话" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="审批金额" prop="AcutalAmount">
|
|
|
+ <el-input v-model="state.queryParams.AcutalAmount" placeholder="请填写审批金额" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="补充发放金额" prop="AcutalAmount">
|
|
|
+ <el-input v-model="state.queryParams.AcutalAmount" placeholder="请填写补充发放金额" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="补发卡号" prop="ApprovedAmount">
|
|
|
+ <el-input v-model="state.queryParams.ApprovedAmount" placeholder="请填写补发卡号" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="区域" prop="ApprovedAmount">
|
|
|
+ <el-input v-model="state.queryParams.ApprovedAmount" placeholder="请填写区域" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
+ <el-button @click="resetQuery(drawerRuleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
|
|
|
+ </template>
|
|
|
+ </el-drawer>
|
|
|
+ <!-- 红包审批 -->
|
|
|
+ <re-audit ref="reAuditRef" @updateList="queryList" />
|
|
|
+ <!-- 红包退回 -->
|
|
|
+ <re-return ref="reReturnRef" @updateList="queryList" />
|
|
|
+ <!-- 红包补充 -->
|
|
|
+ <re-supply ref="reSupplyRef" @updateList="queryList" />
|
|
|
+ <!-- 红包备注 -->
|
|
|
+ <re-remark ref="reRemarkRef" @updateList="queryList" />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="tsx" setup name="snapshotReAuditSpecial">
|
|
|
+import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
+import { ElMessage, FormInstance } from 'element-plus';
|
|
|
+import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
|
|
|
+import {
|
|
|
+ getCitizenRedEnvelopeApprovalBaseData,
|
|
|
+ getCitizenRedEnvelopeApprovalExport,
|
|
|
+ getCitizenRedEnvelopeApprovalList,
|
|
|
+} from '@/api/snapshot/reAudit';
|
|
|
+import Other from '@/utils/other';
|
|
|
+
|
|
|
+// 引入组件
|
|
|
+const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
|
|
|
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
+const ReAudit = defineAsyncComponent(() => import('@/views/snapshot/reAudit/components/Re-audit.vue')); // 红包审批
|
|
|
+const ReReturn = defineAsyncComponent(() => import('@/views/snapshot/reAudit/components/Re-return.vue')); // 红包退回
|
|
|
+const ReRemark = defineAsyncComponent(() => import('@/views/snapshot/reAudit/components/Re-remark.vue')); // 红包备注
|
|
|
+const ReSupply = defineAsyncComponent(() => import('@/views/snapshot/reAudit/components/Re-supply.vue')); // 红包补充
|
|
|
+
|
|
|
+// 定义变量内容
|
|
|
+const state = reactive<any>({
|
|
|
+ loading: false,
|
|
|
+ queryParams: {
|
|
|
+ // 查询参数
|
|
|
+ PageIndex: 1,
|
|
|
+ PageSize: 20,
|
|
|
+ Status: 0, // 审批状态 默认审批
|
|
|
+ No: null, // 工单编码
|
|
|
+ Title: null, // 工单标题
|
|
|
+ slTime: [], // 受理时间
|
|
|
+ BeginCreationTime: null,
|
|
|
+ EndCreationTime: null,
|
|
|
+ spTime: [], // 审批时间
|
|
|
+ BeginAuditTime: null,
|
|
|
+ EndAuditTime: null,
|
|
|
+ FromPhone: null, // 来电人电话
|
|
|
+ IsDeal: null, // 网格员是否办理
|
|
|
+ IsTruth: null, // 网格员是否属实
|
|
|
+ IsTruthDepartment: null, // 部门是否属实
|
|
|
+ IsIssued: null, // 是否发放红包
|
|
|
+ IndustryId: null, // 行业
|
|
|
+ CaseName: null, // 线索名称
|
|
|
+ IndustryName: null, // 行业类型
|
|
|
+ AcutalAmount: null, // 实发金额
|
|
|
+ ApprovedAmount: null, // 审批金额
|
|
|
+ IsDanger: null, // 是否安全生成
|
|
|
+ ConfigAmount: null, // 配置金额
|
|
|
+ },
|
|
|
+ total: 0, // 总条数
|
|
|
+});
|
|
|
+
|
|
|
+const requestParams = ref<EmptyObjectType>({});
|
|
|
+const gridOptions = reactive<any>({
|
|
|
+ loading: false,
|
|
|
+ border: true,
|
|
|
+ showOverflow: true,
|
|
|
+ columnConfig: {
|
|
|
+ resizable: true,
|
|
|
+ },
|
|
|
+ scrollY: {
|
|
|
+ enabled: true,
|
|
|
+ gt: 100,
|
|
|
+ },
|
|
|
+ toolbarConfig: {
|
|
|
+ zoom: true,
|
|
|
+ custom: true,
|
|
|
+ refresh: {
|
|
|
+ queryMethod: () => {
|
|
|
+ handleQuery();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ slots: {
|
|
|
+ buttons: 'toolbar_buttons',
|
|
|
+ },
|
|
|
+ tools: [{ toolRender: { name: 'exportCurrent' } }, { toolRender: { name: 'exportAll' } }],
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ exportMethod: getCitizenRedEnvelopeApprovalExport,
|
|
|
+ exportParams: requestParams,
|
|
|
+ },
|
|
|
+ customConfig: {
|
|
|
+ storage: true,
|
|
|
+ },
|
|
|
+ id: 'snapshotReSendCitizen',
|
|
|
+ rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
|
|
|
+ height: 'auto',
|
|
|
+ columns: [
|
|
|
+ { type: 'checkbox', width: 50, align: 'center' },
|
|
|
+ {
|
|
|
+ field: 'sourceChannel',
|
|
|
+ title: '来源渠道',
|
|
|
+ width: 110,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'no',
|
|
|
+ title: '工单编码',
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'title',
|
|
|
+ title: '工单标题',
|
|
|
+ slots: { default: 'order_detail' },
|
|
|
+ minWidth: 200,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'industryName',
|
|
|
+ title: '行业',
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'isDanger',
|
|
|
+ title: '标记为安全生产',
|
|
|
+ width: 120,
|
|
|
+ slots: {
|
|
|
+ default: ({ row }) => {
|
|
|
+ return row.isDanger === null ? '' : row.isDanger ? '是' : '否';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'fromName',
|
|
|
+ title: '来电人姓名',
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'fromPhone',
|
|
|
+ title: '来电人电话',
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'auditTime',
|
|
|
+ title: '审批时间',
|
|
|
+ formatter: 'formatDate',
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'approvedAmount',
|
|
|
+ title: '审批金额',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'replenishAmount',
|
|
|
+ title: '补充发放金额',
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'replenishAmount',
|
|
|
+ title: '补发姓名',
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'bankCardNo',
|
|
|
+ title: '补发卡号',
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'openBank',
|
|
|
+ title: '补发开户行',
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'county',
|
|
|
+ title: '区域',
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'isRectify',
|
|
|
+ title: '部门是否整改完成',
|
|
|
+ width: 140,
|
|
|
+ slots: {
|
|
|
+ default: ({ row }) => {
|
|
|
+ return row.isRectify === null ? '' : row.isRectify ? '是' : '否';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'isTruthDepartment',
|
|
|
+ title: '部门是否属实',
|
|
|
+ width: 120,
|
|
|
+ slots: {
|
|
|
+ default: ({ row }) => {
|
|
|
+ return row.isTruthDepartment === null ? '' : row.isTruthDepartment ? '是' : '否';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'creationTime',
|
|
|
+ title: '受理时间',
|
|
|
+ formatter: 'formatDate',
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'auditStatusTxt',
|
|
|
+ title: '审批状态',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'auditName',
|
|
|
+ title: '审批人',
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'auditOrgName',
|
|
|
+ title: '审批部门',
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'auditRemark',
|
|
|
+ title: '审批意见',
|
|
|
+ minWidth: 200,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ width: 160,
|
|
|
+ fixed: 'right',
|
|
|
+ showOverflow: false,
|
|
|
+ align: 'center',
|
|
|
+ slots: { default: 'action' },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ data: [],
|
|
|
+});
|
|
|
+/** 搜索按钮操作 节流操作 */
|
|
|
+const handleQuery = () => {
|
|
|
+ state.queryParams.PageIndex = 1;
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+// 获取参数列表
|
|
|
+const queryList = () => {
|
|
|
+ state.loading = true;
|
|
|
+ gridOptions.loading = true;
|
|
|
+ requestParams.value = Other.deepClone(state.queryParams);
|
|
|
+ requestParams.value.BeginCreationTime = state.queryParams.slTime === null ? null : state.queryParams.slTime[0]; // 受理时间
|
|
|
+ requestParams.value.EndCreationTime = state.queryParams.slTime === null ? null : state.queryParams.slTime[1];
|
|
|
+ Reflect.deleteProperty(requestParams.value, 'slTime'); // 删除无用的参数
|
|
|
+ requestParams.value.BeginAuditTime = state.queryParams.spTime === null ? null : state.queryParams.spTime[0]; // 审批时间
|
|
|
+ requestParams.value.EndAuditTime = state.queryParams.spTime === null ? null : state.queryParams.spTime[1];
|
|
|
+ Reflect.deleteProperty(requestParams.value, 'spTime'); // 删除无用的参数
|
|
|
+ getCitizenRedEnvelopeApprovalList(requestParams.value)
|
|
|
+ .then((res) => {
|
|
|
+ state.loading = false;
|
|
|
+ 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 = [];
|
|
|
+ });
|
|
|
+};
|
|
|
+// 重置表单
|
|
|
+const drawerRuleFormRef = ref<RefType>();
|
|
|
+const ruleFormRef = ref<any>(null); // 表单ref
|
|
|
+const drawer = ref(false);
|
|
|
+const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
+ if (!formEl) return;
|
|
|
+ formEl.resetFields();
|
|
|
+ ruleFormRef.value?.resetFields();
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+
|
|
|
+const checkTable = ref<EmptyArrayType>([]);
|
|
|
+const gridRef = ref<RefType>();
|
|
|
+const selectAllChangeEvent = ({ checked }) => {
|
|
|
+ if (gridRef.value) {
|
|
|
+ const records = gridRef.value.getCheckboxRecords();
|
|
|
+ checkTable.value = records;
|
|
|
+ console.log(checked ? '所有勾选事件' : '所有取消事件', records);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const selectChangeEvent = ({ checked }) => {
|
|
|
+ if (gridRef.value) {
|
|
|
+ const records = gridRef.value.getCheckboxRecords();
|
|
|
+ checkTable.value = records;
|
|
|
+ console.log(checked ? '勾选事件' : '取消事件', records);
|
|
|
+ }
|
|
|
+};
|
|
|
+const isChecked = computed(() => {
|
|
|
+ return !Boolean(checkTable.value.length);
|
|
|
+});
|
|
|
+
|
|
|
+// 审批
|
|
|
+const reAuditRef = ref<RefType>();
|
|
|
+const onAudit = (row: any) => {
|
|
|
+ reAuditRef.value.openDialog(row);
|
|
|
+};
|
|
|
+// 退回
|
|
|
+const reReturnRef = ref<RefType>();
|
|
|
+const onReturn = (row: any) => {
|
|
|
+ reReturnRef.value.openDialog(row);
|
|
|
+};
|
|
|
+// 添加备注
|
|
|
+const reRemarkRef = ref<RefType>();
|
|
|
+const onRemark = (row: any) => {
|
|
|
+ if (checkTable.value.length > 1) {
|
|
|
+ ElMessage.warning('只能选择1个添加备注。');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ reRemarkRef.value.openDialog(row);
|
|
|
+};
|
|
|
+// 补充
|
|
|
+const reSupplyRef = ref<RefType>();
|
|
|
+const onSupply = (row: any) => {
|
|
|
+ if (checkTable.value.length > 1) {
|
|
|
+ ElMessage.warning('只能添加1个补充发放。');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ reSupplyRef.value.openDialog(row);
|
|
|
+};
|
|
|
+// 获取基础信息
|
|
|
+const statusOptions = ref<EmptyArrayType>([]); // 状态
|
|
|
+const industryOptions = ref<EmptyArrayType>([]); // 行业
|
|
|
+const configAmountOptions = ref<EmptyArrayType>([]);
|
|
|
+const getBaseData = async () => {
|
|
|
+ try {
|
|
|
+ const { result } = await getCitizenRedEnvelopeApprovalBaseData();
|
|
|
+ statusOptions.value = result.status ?? [];
|
|
|
+ statusOptions.value.push({
|
|
|
+ key: -1,
|
|
|
+ value: '全部',
|
|
|
+ });
|
|
|
+ industryOptions.value = result.industry ?? [];
|
|
|
+ configAmountOptions.value = result.configAmount ?? [];
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+};
|
|
|
+// 页面加载时
|
|
|
+onMounted(() => {
|
|
|
+ queryList();
|
|
|
+ getBaseData();
|
|
|
+});
|
|
|
+</script>
|