| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737 |
- <template>
- <div class="table-box button-table">
- <ProTable
- ref="proTable"
- :columns="columns"
- :request-api="getTableList"
- :init-param="initParam"
- :data-callback="dataCallback"
- :key="activeName"
- >
- <!-- 表格 header 按钮 -->
- <template #tableHeader="scope">
- <div class="table-header-btn">
- <div class="header-actions">
- <el-tabs v-model="activeName" class="tabs" @tab-click="handleClick">
- <el-tab-pane v-for="tab in allTabOptions" :key="tab.name" :label="tab.label" :name="tab.name" />
- </el-tabs>
- </div>
- </div>
- </template>
- <template #tableHeaderRight="scope">
- <div class="action-buttons">
- <el-button :icon="Plus" class="button" type="primary" @click="newGroupBuying" v-if="type"> 新建代金券 </el-button>
- <el-button :icon="Plus" class="button" type="primary" @click="newCoupon" v-if="typeCoupon"> 新建优惠券 </el-button>
- </div>
- </template>
- <template #status="scope">
- <!-- 代金券:显示状态和审核状态两行 -->
- <template v-if="activeName === '1'">
- <p style="margin: 0; line-height: 1.5">
- 状态:{{ scope.row.dataType === 1 ? "草稿" : scope.row.statusName ? scope.row.statusName : "--" }}
- </p>
- <p style="margin: 0; line-height: 1.5" v-if="scope.row.dataType == 0">审核状态:{{ scope.row.reviewType || "--" }}</p>
- </template>
- <!-- 优惠券:只显示状态一行 -->
- <template v-else>
- <span>{{ getStatusLabel(scope.row.status) }}</span>
- </template>
- </template>
- <!-- 表格操作 -->
- <template #operation="scope">
- <!-- 上架按钮 -->
- <el-button
- v-if="canShowButton(scope.row.status, currentOperationPermissions.上架)"
- link
- type="primary"
- @click="changeTypes(scope.row, isVoucher ? 1 : 5)"
- >
- 上架
- </el-button>
- <!-- 下架按钮 -->
- <el-button
- v-if="canShowButton(scope.row.status, currentOperationPermissions.下架)"
- link
- type="primary"
- @click="changeTypes(scope.row, 6)"
- >
- 下架
- </el-button>
- <!-- 修改库存按钮(仅代金券) -->
- <el-button
- v-if="isVoucher && canShowButton(scope.row.status, VOUCHER_OPERATION_PERMISSIONS.修改库存)"
- link
- type="primary"
- @click="changeInventory(scope.row)"
- >
- 修改库存
- </el-button>
- <!-- 查看详情按钮 -->
- <el-button
- v-if="
- isVoucher
- ? canShowButton(scope.row.status, currentOperationPermissions.查看详情) && scope.row.dataType == 0
- : canShowButton(scope.row.status, currentOperationPermissions.查看详情)
- "
- link
- type="primary"
- @click="toDetail(scope.row)"
- >
- 查看详情
- </el-button>
- <!-- 编辑按钮 -->
- <el-button
- v-if="
- isVoucher
- ? canShowButton(scope.row.status, currentOperationPermissions.编辑) || scope.row.dataType == 1
- : canShowButton(scope.row.status, currentOperationPermissions.编辑)
- "
- link
- type="primary"
- @click="editRow(scope.row)"
- >
- 编辑
- </el-button>
- <!-- 删除按钮 -->
- <el-button
- v-if="
- isVoucher
- ? canShowButton(scope.row.status, currentOperationPermissions.删除) || scope.row.dataType == 1
- : canShowButton(scope.row.status, currentOperationPermissions.删除)
- "
- link
- type="primary"
- @click="deleteRow(scope.row)"
- >
- 删除
- </el-button>
- <!-- 查看拒绝原因按钮(仅代金券) -->
- <el-button
- v-if="isVoucher && canShowButton(scope.row.status, VOUCHER_OPERATION_PERMISSIONS.查看拒绝原因)"
- link
- type="primary"
- @click="viewRejectReason(scope.row)"
- >
- 查看拒绝原因
- </el-button>
- </template>
- </ProTable>
- <el-dialog v-model="dialogFormVisible" title="修改库存" width="500">
- <el-form ref="ruleFormRef" :model="formInventory" :rules="rules" @submit.prevent>
- <el-form-item label="套餐名">
- {{ formInventory.name }}
- </el-form-item>
- <el-form-item label="剩余库存"> {{ formInventory.singleQty }}张 </el-form-item>
- <el-form-item label="修改库存" prop="newInventory">
- <el-input v-model="formInventory.newInventory" placeholder="请输入" />
- </el-form-item>
- </el-form>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="closeDialog"> 取消 </el-button>
- <el-button type="primary" @click="handleSubmit"> 确定 </el-button>
- </div>
- </template>
- </el-dialog>
- <!-- 查看拒绝原因弹窗 -->
- <el-dialog v-model="rejectReasonDialogVisible" title="查看拒绝原因" width="600px">
- <div class="reject-reason-content">
- <div class="reject-reason-item">
- <div class="reject-reason-label">代金券名称:</div>
- <div class="reject-reason-value">
- {{ rejectReasonData.name || "--" }}
- </div>
- </div>
- <div class="reject-reason-item">
- <div class="reject-reason-label">拒绝原因:</div>
- <div class="reject-reason-value reject-reason-text">
- {{ rejectReasonData.approvalComments || "暂无拒绝原因" }}
- </div>
- </div>
- </div>
- <template #footer>
- <div class="dialog-footer">
- <el-button type="primary" @click="closeRejectReasonDialog"> 确定 </el-button>
- </div>
- </template>
- </el-dialog>
- </div>
- </template>
- <script setup lang="tsx" name="voucherManagement">
- import { computed, onActivated, onMounted, reactive, ref, watch } from "vue";
- import { useRouter, useRoute } from "vue-router";
- import type { FormInstance, FormRules } from "element-plus";
- import { ElMessage } from "element-plus";
- import ProTable from "@/components/ProTable/index.vue";
- import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface";
- import { Plus } from "@element-plus/icons-vue";
- import { delThaliById, getThaliList, updateNum, updateStatus } from "@/api/modules/voucherManagement";
- import { delCouponById, updateCouponSingleQty, updateCouponStatus } from "@/api/modules/couponManagement";
- import { ElMessageBox } from "element-plus/es";
- import { localGet, usePermission } from "@/utils";
- import { formatCurrency } from "@/utils/formatCurrency";
- const router = useRouter();
- const route = useRoute();
- const dialogFormVisible = ref(false);
- const formInventory: any = ref({
- id: "",
- name: "",
- singleQty: "",
- newInventory: ""
- });
- const activeName = ref("1");
- // 查看拒绝原因弹窗相关
- const rejectReasonDialogVisible = ref(false);
- const rejectReasonData = ref<any>({
- name: "",
- approvalComments: ""
- });
- // 定义表单类型
- interface RuleForm {
- newInventory: string;
- }
- const ruleFormRef = ref<FormInstance>();
- const rules = reactive<FormRules<RuleForm>>({
- newInventory: [
- { required: true, message: "请输入库存数量", trigger: "blur" },
- {
- pattern: /^(0|[1-9][0-9]*)$/,
- message: "请输入整数,不允许输入小数,负数",
- trigger: "blur"
- },
- {
- validator: (rule: any, value: any, callback: any) => {
- if (value) {
- const numValue = Number(value);
- if (!isNaN(numValue) && numValue > 10000) {
- callback(new Error("库存不得大于10000"));
- return;
- }
- // 验证新库存值不能小于剩余库存
- const currentQty = Number(formInventory.value.singleQty) || 0;
- if (numValue < currentQty) {
- callback(new Error(`新库存值不能小于剩余库存(${currentQty})张`));
- return;
- }
- }
- callback();
- },
- trigger: "blur"
- }
- ]
- });
- const statusEnum = [
- { label: "草稿", value: "0" },
- { label: "进行中", value: "5" },
- { label: "未开始", value: "2" },
- { label: "已下架", value: "6" },
- { label: "已售罄", value: "4" },
- { label: "已结束", value: "7" }
- ];
- const statusEnumY = [
- { label: "草稿", value: "3" },
- { label: "进行中", value: "1" },
- { label: "已结束", value: "2" }
- ];
- // ProTable 实例(需要在使用它的地方之前定义)
- const proTable = ref<ProTableInstance>();
- // 代金券表格列配置
- const voucherColumns = reactive<ColumnProps<any>[]>([
- {
- prop: "name",
- label: "券名称",
- search: {
- el: "input"
- }
- },
- {
- prop: "price",
- label: "价格",
- render: (scope: any) => {
- return formatCurrency(scope.row.price, 2, "¥") || "--";
- }
- },
- {
- prop: "saleNum",
- label: "已售",
- render: scope => {
- return scope.row.saleNum === null || scope.row.saleNum === undefined || scope.row.saleNum === "" ? 0 : scope.row.saleNum;
- }
- },
- {
- prop: "singleQty",
- label: "剩余库存",
- render: scope => {
- return scope.row.singleQty === null || scope.row.singleQty === undefined || scope.row.singleQty === ""
- ? 0
- : scope.row.singleQty + "张";
- }
- },
- {
- prop: "endDate",
- label: "结束时间",
- render: (scope: any) => {
- return scope.row.endDate?.replace(/-/g, "/") || "--";
- }
- },
- {
- prop: "status",
- label: "状态",
- search: {
- el: "select",
- props: { placeholder: "请选择" }
- },
- enum: statusEnum,
- fieldNames: { label: "label", value: "value" }
- },
- { prop: "operation", label: "操作", fixed: "right", width: 330 }
- ]);
- // 优惠券表格列配置
- const couponColumns = reactive<ColumnProps<any>[]>([
- {
- prop: "name",
- label: "券名称",
- search: {
- el: "input"
- }
- },
- {
- prop: "quantityClaimed",
- label: "已领",
- render: scope => {
- return scope.row.quantityClaimed === null || scope.row.quantityClaimed === undefined || scope.row.quantityClaimed === ""
- ? 0
- : scope.row.quantityClaimed;
- }
- },
- {
- prop: "singleQty",
- label: "剩余库存",
- render: scope => {
- return scope.row.singleQty === null || scope.row.singleQty === undefined || scope.row.singleQty === ""
- ? 0
- : scope.row.singleQty + "张";
- }
- },
- {
- prop: "endGetDate",
- label: "结束时间",
- render: (scope: any) => {
- return scope.row.endGetDate?.replace(/-/g, "/") || "--";
- }
- },
- {
- prop: "couponStatus",
- label: "状态",
- isShow: false,
- search: {
- el: "select",
- props: { placeholder: "请选择" }
- },
- enum: statusEnumY,
- fieldNames: { label: "label", value: "value" }
- },
- {
- prop: "status",
- label: "状态"
- },
- { prop: "operation", label: "操作", fixed: "right", width: 330 }
- ]);
- // 根据当前选中的tab动态返回列配置
- const columns = computed(() => {
- return activeName.value === "1" ? voucherColumns : couponColumns;
- });
- const allTabOptions = [
- { label: "代金券", name: "1" },
- { label: "优惠券", name: "2" }
- ];
- // 状态枚举: 1待审核 2未开始 3审核拒绝 4已售罄 5进行中 6已下架 7已结束
- const VO_STATUS = {
- 待审核: 1,
- 未开始: 2,
- 审核拒绝: 3,
- 已售罄: 4,
- 进行中: 5,
- 已下架: 6,
- 已结束: 7
- } as const;
- // 状态枚举:0进行中 1已结束 2未开始 3已下架 4已售罄 5草稿
- const CO_STATUS = {
- 进行中: 0,
- 已结束: 1,
- 未开始: 2,
- 已下架: 3,
- 已售罄: 4,
- 草稿: 5
- } as const;
- // 代金券操作按钮权限配置:定义每个操作按钮在哪些状态下显示 草稿单独判断
- const VOUCHER_OPERATION_PERMISSIONS = {
- // 查看详情:待审核、未开始、审核拒绝、进行中、已售罄、已下架
- 查看详情: [VO_STATUS.待审核, VO_STATUS.未开始, VO_STATUS.审核拒绝, VO_STATUS.进行中, VO_STATUS.已售罄, VO_STATUS.已下架],
- // 上架:未开始、已下架
- 上架: [VO_STATUS.未开始, VO_STATUS.已下架],
- // 下架:进行中
- 下架: [VO_STATUS.进行中],
- // 修改库存:未开始、进行中、已售罄
- 修改库存: [VO_STATUS.未开始, VO_STATUS.进行中, VO_STATUS.已售罄],
- // 编辑:审核拒绝、已售罄、已下架、已结束
- 编辑: [VO_STATUS.审核拒绝, VO_STATUS.已售罄, VO_STATUS.已下架, VO_STATUS.已结束],
- // 删除:未开始、审核拒绝、已售罄、已结束
- 删除: [VO_STATUS.未开始, VO_STATUS.审核拒绝, VO_STATUS.已售罄, VO_STATUS.已结束],
- // 查看拒绝原因:审核拒绝
- 查看拒绝原因: [VO_STATUS.审核拒绝]
- } as const;
- // 优惠券操作按钮权限配置
- const COUPON_OPERATION_PERMISSIONS = {
- // 查看详情:草稿、未开始、进行中、已下架、已结束、已售罄
- 查看详情: [CO_STATUS.草稿, CO_STATUS.未开始, CO_STATUS.进行中, CO_STATUS.已下架, CO_STATUS.已结束, CO_STATUS.已售罄],
- // 上架:未开始、已下架
- 上架: [CO_STATUS.未开始, CO_STATUS.已下架],
- // 下架:进行中
- 下架: [CO_STATUS.进行中],
- // 编辑:草稿、未开始、进行中、已下架、已结束、已售罄
- 编辑: [CO_STATUS.草稿, CO_STATUS.未开始, CO_STATUS.进行中, CO_STATUS.已下架, CO_STATUS.已结束, CO_STATUS.已售罄],
- // 删除:草稿、已结束、已售罄
- 删除: [CO_STATUS.草稿, CO_STATUS.已结束, CO_STATUS.已售罄]
- } as const;
- // 判断按钮是否显示的工具函数
- const canShowButton = (status: number, allowedStatuses: readonly number[]) => {
- return allowedStatuses.includes(status);
- };
- // 根据当前tab获取操作权限配置
- const currentOperationPermissions = computed(() => {
- return activeName.value === "1" ? VOUCHER_OPERATION_PERMISSIONS : COUPON_OPERATION_PERMISSIONS;
- });
- // 判断是否为代金券
- const isVoucher = computed(() => activeName.value === "1");
- // 判断是否为优惠券
- const isCoupon = computed(() => activeName.value === "2");
- // 获取状态标签
- const getStatusLabel = (status: any) => {
- // 根据当前选中的tab选择对应的状态枚举
- const statusEnum = CO_STATUS;
- // 从状态枚举中查找对应的标签
- for (const [label, value] of Object.entries(statusEnum)) {
- if (value === status) {
- return label;
- }
- }
- return "--";
- };
- // 如果表格需要初始化请求参数,直接定义传给 ProTable (之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
- const initParam = reactive({
- storeId: localGet("createdId"),
- groupType: localGet("businessSection"),
- couponType: activeName
- });
- const type = ref(false);
- const typeCoupon = ref(false);
- // 恢复 activeName 的函数
- const restoreActiveName = () => {
- const savedActiveName = sessionStorage.getItem("ticketManagement_activeName");
- if (savedActiveName && (savedActiveName === "1" || savedActiveName === "2")) {
- activeName.value = savedActiveName;
- // 恢复后清除 sessionStorage,避免影响其他场景
- sessionStorage.removeItem("ticketManagement_activeName");
- }
- };
- // 页面加载时触发查询
- onMounted(async () => {
- type.value = await usePermission("新建代金券");
- typeCoupon.value = await usePermission("新建优惠券");
- // 从 sessionStorage 恢复 activeName
- restoreActiveName();
- proTable.value?.getTableList();
- });
- // 从其他页面返回时触发查询
- onActivated(() => {
- // 从 sessionStorage 恢复 activeName
- restoreActiveName();
- proTable.value?.getTableList();
- });
- // 监听路由变化,当从详情页或编辑页返回时恢复 activeName
- watch(
- () => route.path,
- (newPath, oldPath) => {
- // 如果当前路径是列表页,且之前路径是详情页或编辑页,则恢复 activeName
- if (
- newPath.includes("/ticketManagement") &&
- !newPath.includes("/detail") &&
- !newPath.includes("/newVoucher") &&
- !newPath.includes("/newCoupon") &&
- (oldPath?.includes("/ticketManagement/detail") ||
- oldPath?.includes("/ticketManagement/couponDetail") ||
- oldPath?.includes("/ticketManagement/newVoucher") ||
- oldPath?.includes("/ticketManagement/newCoupon"))
- ) {
- restoreActiveName();
- }
- },
- { immediate: false }
- );
- // dataCallback 是对于返回的表格数据做处理,如果你后台返回的数据不是 list && total 这些字段,可以在这里进行处理成这些字段
- // 或者直接去 hooks/useTable.ts 文件中把字段改为你后端对应的就行
- const dataCallback = (data: any) => {
- // 代金券从 couponList.records 取值,优惠券从 discountList.records 取值
- if (activeName.value === "1") {
- // 代金券
- return {
- list: data.couponList?.records || [],
- total: data.couponList?.total || 0
- };
- } else {
- // 优惠券
- return {
- list: data.discountList?.records || [],
- total: data.discountList?.total || 0
- };
- }
- };
- // 如果你想在请求之前对当前请求参数做一些操作,可以自定义如下函数:params 为当前所有的请求参数(包括分页),最后返回请求列表接口
- // 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
- const getTableList = (params: any) => {
- let newParams = JSON.parse(JSON.stringify(params));
- if (activeName.value === "1") {
- // 代金券
- if (newParams.status === "0") {
- newParams.dataType = 1; // 草稿
- } else if (newParams.status) {
- newParams.dataType = 0;
- } else {
- newParams.dataType = 2;
- }
- } else {
- // 优惠券
- delete newParams.dataType;
- newParams.couponsFromType = 1;
- }
- return getThaliList(newParams);
- };
- const newGroupBuying = () => {
- router.push(`/ticketManagement/newVoucher?type=add`);
- };
- const newCoupon = () => {
- router.push(`/ticketManagement/newCoupon?type=add`);
- };
- // 跳转详情页 - 根据类型跳转不同页面
- const toDetail = (row: any) => {
- // 保存当前 activeName 到 sessionStorage
- sessionStorage.setItem("ticketManagement_activeName", activeName.value);
- const path = isVoucher.value ? `/ticketManagement/detail?id=${row.id}` : `/ticketManagement/couponDetail?id=${row.id}`;
- router.push(path);
- };
- // 编辑行数据
- const editRow = (row: any) => {
- // 保存当前 activeName 到 sessionStorage
- sessionStorage.setItem("ticketManagement_activeName", activeName.value);
- const path = isVoucher.value
- ? `/ticketManagement/newVoucher?id=${row.id}&type=edit`
- : `/ticketManagement/newCoupon?id=${row.id}&type=edit`;
- router.push(path);
- };
- // 删除行数据
- const deleteRow = (row: any) => {
- ElMessageBox.confirm("确定要删除吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- if (isVoucher.value) {
- // 代金券删除逻辑
- const params = {
- id: row.id,
- groupType: localGet("businessSection")
- };
- return delThaliById(params);
- } else {
- // 优惠券删除逻辑
- const params = {
- id: row.id,
- groupType: localGet("businessSection")
- };
- return delCouponById(params);
- }
- })
- .then(() => {
- ElMessage.success("删除成功");
- proTable.value?.getTableList();
- })
- .catch(() => {
- // 用户取消删除,不做任何操作
- });
- };
- // Tab切换处理
- const handleClick = () => {
- // initParam 中的 couponType 是响应式的,当 activeName 变化时会自动触发 ProTable 内部的 watch 监听,无需手动调用
- // proTable.value?.getTableList();
- };
- // 修改状态(上架/下架)
- const changeTypes = async (row: any, status: number) => {
- if (isVoucher.value) {
- // 代金券上架/下架逻辑
- const res = await updateStatus({ id: row.id, status: status, approvalComments: "" });
- if (res && res.code == 200) {
- ElMessage.success("操作成功");
- proTable.value?.getTableList();
- }
- } else {
- // 优惠券上架/下架逻辑
- const res = await updateCouponStatus({ counponId: row.id });
- if (res && res.code == 200) {
- ElMessage.success("操作成功");
- proTable.value?.getTableList();
- }
- }
- };
- // 修改库存
- const changeInventory = (row: any) => {
- formInventory.value = {
- id: row.id,
- name: row.name,
- singleQty: row.singleQty,
- newInventory: ""
- };
- dialogFormVisible.value = true;
- };
- // 提交修改库存
- const handleSubmit = async () => {
- if (!ruleFormRef.value) return;
- await ruleFormRef.value.validate(async valid => {
- if (valid) {
- const params = {
- id: formInventory.value.id,
- singleQty: formInventory.value.newInventory
- };
- if (isVoucher.value) {
- const res = await updateNum(params);
- if (res && res.code == 200) {
- ElMessage.success("修改成功");
- closeDialog();
- proTable.value?.getTableList();
- }
- } else {
- const res = await updateCouponSingleQty(params);
- if (res && res.code == 200) {
- ElMessage.success("修改成功");
- closeDialog();
- proTable.value?.getTableList();
- }
- }
- }
- });
- };
- // 关闭弹窗
- const closeDialog = () => {
- dialogFormVisible.value = false;
- formInventory.value = {
- id: "",
- name: "",
- singleQty: "",
- newInventory: ""
- };
- };
- // 查看拒绝原因
- const viewRejectReason = (row: any) => {
- rejectReasonData.value = {
- name: row.name || "--",
- approvalComments: row.approvalComments || "--"
- };
- rejectReasonDialogVisible.value = true;
- };
- // 关闭拒绝原因弹窗
- const closeRejectReasonDialog = () => {
- rejectReasonDialogVisible.value = false;
- rejectReasonData.value = {
- name: "",
- approvalComments: ""
- };
- };
- </script>
- <style lang="scss" scoped>
- // 在组件样式中添加
- .date-range {
- display: block; // 确保换行生效
- padding: 0 8px; // 可选:增加内边距
- word-wrap: break-word; // 长单词内换行
- white-space: normal; // 允许自然换行
- }
- .table-header-btn {
- .header-actions {
- display: flex;
- justify-content: space-between;
- width: 100%;
- .tabs {
- flex: 0 0 auto;
- :deep(.el-tabs__nav-wrap::after) {
- height: 0;
- }
- }
- }
- }
- .action-buttons {
- display: flex;
- flex: 0 0 auto;
- gap: 10px;
- margin-right: 20px;
- .button {
- margin-bottom: 0;
- }
- }
- .reject-reason-content {
- padding: 20px 0;
- .reject-reason-item {
- display: flex;
- margin-bottom: 20px;
- &:last-child {
- margin-bottom: 0;
- }
- .reject-reason-label {
- flex-shrink: 0;
- min-width: 100px;
- font-size: 14px;
- font-weight: 500;
- color: #606266;
- }
- .reject-reason-value {
- flex: 1;
- font-size: 14px;
- color: #303133;
- word-break: break-word;
- &.reject-reason-text {
- min-height: 80px;
- padding: 12px;
- line-height: 1.6;
- white-space: pre-wrap;
- background-color: #f5f7fa;
- border-radius: 4px;
- }
- }
- }
- }
- </style>
|