Jelajahi Sumber

新增订单数据

hurx 1 hari lalu
induk
melakukan
bb139e19fe

+ 70 - 0
src/api/order/orderSet/index.ts

@@ -0,0 +1,70 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { OrderSetVO, OrderSetForm, OrderSetQuery } from '@/api/order/orderSet/types';
+
+/**
+ * 查询订单超时设置列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listOrderSet = (query?: OrderSetQuery): AxiosPromise<OrderSetVO[]> => {
+  return request({
+    url: '/system/orderSet/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询订单超时设置详细
+ * @param id
+ */
+export const getOrderSet = (id: string | number): AxiosPromise<OrderSetVO> => {
+  return request({
+    url: '/system/orderSet/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增订单超时设置
+ * @param data
+ */
+export const addOrderSet = (data: OrderSetForm) => {
+  return request({
+    url: '/system/orderSet',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改订单超时设置
+ * @param data
+ */
+export const updateOrderSet = (data: OrderSetForm) => {
+  return request({
+    url: '/system/orderSet',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除订单超时设置
+ * @param id
+ */
+export const delOrderSet = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/orderSet/' + id,
+    method: 'delete'
+  });
+};
+
+export const getOrderSetData = (): AxiosPromise<OrderSetVO> => {
+  return request({
+    url: '/system/orderSet/getOrderSetData',
+    method: 'get'
+  });
+};

+ 125 - 0
src/api/order/orderSet/types.ts

@@ -0,0 +1,125 @@
+export interface OrderSetVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 秒杀订单超时自动取消时间(单位:分钟)
+   */
+  seckillTimeout: number;
+
+  /**
+   * 普通订单超时自动取消时间(单位:分钟)
+   */
+  normalTimeout: number;
+
+  /**
+   * 发货超时时间(单位:分钟)
+   */
+  shippingTimeout: number;
+
+  /**
+   * 确认收货后自动完成订单时间(单位:分钟)
+   */
+  completeTimeout: number;
+
+  /**
+   * 订单完成后可评价的超时时间(单位:分钟)
+   */
+  evaluationTimeout: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface OrderSetForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 秒杀订单超时自动取消时间(单位:分钟)
+   */
+  seckillTimeout?: number;
+
+  /**
+   * 普通订单超时自动取消时间(单位:分钟)
+   */
+  normalTimeout?: number;
+
+  /**
+   * 发货超时时间(单位:分钟)
+   */
+  shippingTimeout?: number;
+
+  /**
+   * 确认收货后自动完成订单时间(单位:分钟)
+   */
+  completeTimeout?: number;
+
+  /**
+   * 订单完成后可评价的超时时间(单位:分钟)
+   */
+  evaluationTimeout?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface OrderSetQuery extends PageQuery {
+  /**
+   * 秒杀订单超时自动取消时间(单位:分钟)
+   */
+  seckillTimeout?: number;
+
+  /**
+   * 普通订单超时自动取消时间(单位:分钟)
+   */
+  normalTimeout?: number;
+
+  /**
+   * 发货超时时间(单位:分钟)
+   */
+  shippingTimeout?: number;
+
+  /**
+   * 确认收货后自动完成订单时间(单位:分钟)
+   */
+  completeTimeout?: number;
+
+  /**
+   * 订单完成后可评价的超时时间(单位:分钟)
+   */
+  evaluationTimeout?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/order/paySet/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { PaySetVO, PaySetForm, PaySetQuery } from '@/api/order/paySet/types';
+
+/**
+ * 查询支付方式类型列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listPaySet = (query?: PaySetQuery): AxiosPromise<PaySetVO[]> => {
+  return request({
+    url: '/system/paySet/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询支付方式类型详细
+ * @param id
+ */
+export const getPaySet = (id: string | number): AxiosPromise<PaySetVO> => {
+  return request({
+    url: '/system/paySet/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增支付方式类型
+ * @param data
+ */
+export const addPaySet = (data: PaySetForm) => {
+  return request({
+    url: '/system/paySet',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改支付方式类型
+ * @param data
+ */
+export const updatePaySet = (data: PaySetForm) => {
+  return request({
+    url: '/system/paySet',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除支付方式类型
+ * @param id
+ */
+export const delPaySet = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/paySet/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/paySet/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 140 - 0
src/api/order/paySet/types.ts

@@ -0,0 +1,140 @@
+export interface PaySetVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 支付方式编码
+   */
+  payCode: string;
+
+  /**
+   * 支付方式名称
+   */
+  payName: string;
+
+  /**
+   * 支付方式描述
+   */
+  payDescription: string;
+
+  /**
+   * 适用环境
+   */
+  payEnvironment: string;
+
+  /**
+   * 是否显示
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface PaySetForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 支付方式编码
+   */
+  payCode?: string;
+
+  /**
+   * 支付方式名称
+   */
+  payName?: string;
+
+  /**
+   * 支付方式描述
+   */
+  payDescription?: string;
+
+  /**
+   * 适用环境
+   */
+  payEnvironment?: string;
+
+  /**
+   * 是否显示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface PaySetQuery extends PageQuery {
+  /**
+   * 支付方式编码
+   */
+  payCode?: string;
+
+  /**
+   * 支付方式名称
+   */
+  payName?: string;
+
+  /**
+   * 支付方式描述
+   */
+  payDescription?: string;
+
+  /**
+   * 适用环境
+   */
+  payEnvironment?: string;
+
+  /**
+   * 是否显示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/order/returnReason/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ReturnReasonVO, ReturnReasonForm, ReturnReasonQuery } from '@/api/order/returnReason/types';
+
+/**
+ * 查询退货原因列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listReturnReason = (query?: ReturnReasonQuery): AxiosPromise<ReturnReasonVO[]> => {
+  return request({
+    url: '/system/returnReason/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询退货原因详细
+ * @param id
+ */
+export const getReturnReason = (id: string | number): AxiosPromise<ReturnReasonVO> => {
+  return request({
+    url: '/system/returnReason/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增退货原因
+ * @param data
+ */
+export const addReturnReason = (data: ReturnReasonForm) => {
+  return request({
+    url: '/system/returnReason',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改退货原因
+ * @param data
+ */
+export const updateReturnReason = (data: ReturnReasonForm) => {
+  return request({
+    url: '/system/returnReason',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除退货原因
+ * @param id
+ */
+export const delReturnReason = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/returnReason/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/returnReason/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 110 - 0
src/api/order/returnReason/types.ts

@@ -0,0 +1,110 @@
+export interface ReturnReasonVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 退货原因编号
+   */
+  returnReasonCode: string;
+
+  /**
+   * 退货原因
+   */
+  returnReasonName: string;
+
+  /**
+   * 是否显示
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface ReturnReasonForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 退货原因编号
+   */
+  returnReasonCode?: string;
+
+  /**
+   * 退货原因
+   */
+  returnReasonName?: string;
+
+  /**
+   * 是否显示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface ReturnReasonQuery extends PageQuery {
+  /**
+   * 退货原因编号
+   */
+  returnReasonCode?: string;
+
+  /**
+   * 退货原因
+   */
+  returnReasonName?: string;
+
+  /**
+   * 是否显示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 74 - 0
src/api/order/workSlipType/index.ts

@@ -0,0 +1,74 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { WorkSlipTypeVO, WorkSlipTypeForm, WorkSlipTypeQuery } from '@/api/order/workSlipType/types';
+
+/**
+ * 查询工单类型列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listWorkSlipType = (query?: WorkSlipTypeQuery): AxiosPromise<WorkSlipTypeVO[]> => {
+  return request({
+    url: '/system/workSlipType/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询工单类型详细
+ * @param id
+ */
+export const getWorkSlipType = (id: string | number): AxiosPromise<WorkSlipTypeVO> => {
+  return request({
+    url: '/system/workSlipType/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增工单类型
+ * @param data
+ */
+export const addWorkSlipType = (data: WorkSlipTypeForm) => {
+  return request({
+    url: '/system/workSlipType',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改工单类型
+ * @param data
+ */
+export const updateWorkSlipType = (data: WorkSlipTypeForm) => {
+  return request({
+    url: '/system/workSlipType',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除工单类型
+ * @param id
+ */
+export const delWorkSlipType = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/workSlipType/' + id,
+    method: 'delete'
+  });
+};
+export function changeStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/workSlipType/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 110 - 0
src/api/order/workSlipType/types.ts

@@ -0,0 +1,110 @@
+export interface WorkSlipTypeVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 工单类型编号
+   */
+  workSlipTypeCode: string;
+
+  /**
+   * 工单类型名称
+   */
+  workSlipTypeName: string;
+
+  /**
+   * 是否显示
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface WorkSlipTypeForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 工单类型编号
+   */
+  workSlipTypeCode?: string;
+
+  /**
+   * 工单类型名称
+   */
+  workSlipTypeName?: string;
+
+  /**
+   * 是否显示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface WorkSlipTypeQuery extends PageQuery {
+  /**
+   * 工单类型编号
+   */
+  workSlipTypeCode?: string;
+
+  /**
+   * 工单类型名称
+   */
+  workSlipTypeName?: string;
+
+  /**
+   * 是否显示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 292 - 0
src/views/order/orderSet/index.vue

@@ -0,0 +1,292 @@
+<template>
+  <div class="p-2">
+    <el-card shadow="never" class="order-set-card">
+      <template #header>
+        <div class="card-header">
+          <span class="title">订单设置</span>
+        </div>
+      </template>
+
+      <div class="order-set-container">
+        <!-- 表单 -->
+        <el-form ref="orderSetFormRef" :model="form" :rules="rules" label-width="140px" class="order-form">
+          <div class="form-item-row">
+            <el-form-item label="秒杀订单超时:" prop="seckillTimeout" class="form-item-input">
+              <el-input v-model="form.seckillTimeout" placeholder="请输入" />
+            </el-form-item>
+            <div class="form-item-desc">未付款,订单自动关闭</div>
+          </div>
+
+          <div class="form-item-row">
+            <el-form-item label="普通订单超时:" prop="normalTimeout" class="form-item-input">
+              <el-input v-model="form.normalTimeout" placeholder="请输入" />
+            </el-form-item>
+            <div class="form-item-desc">未付款,订单自动关闭</div>
+          </div>
+
+          <div class="form-item-row">
+            <el-form-item label="发货超时:" prop="shippingTimeout" class="form-item-input">
+              <el-input v-model="form.shippingTimeout" placeholder="请输入" />
+            </el-form-item>
+            <div class="form-item-desc">未收货,订单自动完成</div>
+          </div>
+
+          <div class="form-item-row">
+            <el-form-item label="订单完成超时:" prop="completeTimeout" class="form-item-input">
+              <el-input v-model="form.completeTimeout" placeholder="请输入" />
+            </el-form-item>
+            <div class="form-item-desc">自动结束交易,不能申请售后</div>
+          </div>
+
+          <div class="form-item-row">
+            <el-form-item label="订单评价超时:" prop="evaluationTimeout" class="form-item-input">
+              <el-input v-model="form.evaluationTimeout" placeholder="请输入" />
+            </el-form-item>
+            <div class="form-item-desc">自动五星好评</div>
+          </div>
+        </el-form>
+        <el-button type="primary" @click="submitForm" class="submit-btn">保存</el-button>
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script setup name="OrderSet" lang="ts">
+import { listOrderSet, getOrderSet, delOrderSet, addOrderSet, updateOrderSet, getOrderSetData } from '@/api/order/orderSet';
+import { OrderSetVO, OrderSetQuery, OrderSetForm } from '@/api/order/orderSet/types';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+
+const orderSetList = ref<OrderSetVO[]>([]);
+const buttonLoading = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref<Array<string | number>>([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+
+const queryFormRef = ref<ElFormInstance>();
+const orderSetFormRef = ref<ElFormInstance>();
+
+const dialog = reactive<DialogOption>({
+  visible: false,
+  title: ''
+});
+
+const initFormData: OrderSetForm = {
+  id: undefined,
+  seckillTimeout: undefined,
+  normalTimeout: undefined,
+  shippingTimeout: undefined,
+  completeTimeout: undefined,
+  evaluationTimeout: undefined,
+  status: undefined,
+  remark: undefined
+};
+const data = reactive<PageData<OrderSetForm, OrderSetQuery>>({
+  form: { ...initFormData },
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    seckillTimeout: undefined,
+    normalTimeout: undefined,
+    shippingTimeout: undefined,
+    completeTimeout: undefined,
+    evaluationTimeout: undefined,
+    status: undefined,
+    platformCode: undefined,
+    params: {}
+  },
+  rules: {}
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 查询订单超时设置列表 */
+const getList = async () => {
+  loading.value = true;
+  const res = await listOrderSet(queryParams.value);
+  orderSetList.value = res.rows;
+  total.value = res.total;
+  loading.value = false;
+};
+
+/** 取消按钮 */
+const cancel = () => {
+  reset();
+  dialog.visible = false;
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  orderSetFormRef.value?.resetFields();
+};
+
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.value.pageNum = 1;
+  getList();
+};
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+  queryFormRef.value?.resetFields();
+  handleQuery();
+};
+
+/** 多选框选中数据 */
+const handleSelectionChange = (selection: OrderSetVO[]) => {
+  ids.value = selection.map((item) => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+};
+
+/** 新增按钮操作 */
+const handleAdd = () => {
+  reset();
+  dialog.visible = true;
+  dialog.title = '添加订单超时设置';
+};
+
+/** 修改按钮操作 */
+const handleUpdate = async (row?: OrderSetVO) => {
+  reset();
+  const _id = row?.id || ids.value[0];
+  const res = await getOrderSet(_id);
+  Object.assign(form.value, res.data);
+  dialog.visible = true;
+  dialog.title = '修改订单超时设置';
+};
+
+/** 提交按钮 */
+const submitForm = () => {
+  orderSetFormRef.value?.validate(async (valid: boolean) => {
+    if (valid) {
+      buttonLoading.value = true;
+      if (form.value.id) {
+        await updateOrderSet(form.value).finally(() => (buttonLoading.value = false));
+      } else {
+        await addOrderSet(form.value).finally(() => (buttonLoading.value = false));
+      }
+      proxy?.$modal.msgSuccess('操作成功');
+      dialog.visible = false;
+      await getList();
+    }
+  });
+};
+
+/** 删除按钮操作 */
+const handleDelete = async (row?: OrderSetVO) => {
+  const _ids = row?.id || ids.value;
+  await proxy?.$modal.confirm('是否确认删除订单超时设置编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
+  await delOrderSet(_ids);
+  proxy?.$modal.msgSuccess('删除成功');
+  await getList();
+};
+
+/** 导出按钮操作 */
+const handleExport = () => {
+  proxy?.download(
+    'system/orderSet/export',
+    {
+      ...queryParams.value
+    },
+    `orderSet_${new Date().getTime()}.xlsx`
+  );
+};
+
+onMounted(async () => {
+  const res = await getOrderSetData();
+  if (res && res.data) {
+    Object.assign(form.value, res.data);
+  }
+});
+</script>
+
+<style scoped lang="scss">
+.order-set-card {
+  :deep(.el-card__header) {
+    padding: 20px;
+    border-bottom: 1px solid #ebeef5;
+  }
+}
+
+.order-set-container {
+  display: flex;
+  flex-direction: column;
+  gap: 0;
+  padding: 10px 0;
+
+  .order-form {
+    :deep(.el-form-item) {
+      margin-bottom: 0;
+    }
+
+    :deep(.el-form-item__label) {
+      font-weight: 500;
+      color: #333;
+    }
+
+    :deep(.el-input__wrapper) {
+      background-color: #fafafa;
+      border: 1px solid #dcdfe6;
+      border-radius: 4px;
+
+      &:hover {
+        border-color: #b1b3b9;
+      }
+    }
+
+    :deep(.el-input.is-focus .el-input__wrapper),
+    :deep(.el-input__wrapper.is-focus) {
+      border-color: #409eff;
+      background-color: #fff;
+    }
+  }
+
+  .form-item-row {
+    display: flex;
+    align-items: center;
+    gap: 40px;
+    margin-bottom: 20px;
+
+    .form-item-input {
+      flex: 0 0 auto;
+      width: 400px;
+
+      :deep(.el-form-item__content) {
+        line-height: 32px;
+      }
+    }
+
+    .form-item-desc {
+      flex: 1;
+      color: #666;
+      font-size: 14px;
+      line-height: 32px;
+    }
+  }
+
+  .submit-btn {
+    margin-top: 10px;
+    padding: 8px 24px;
+    font-size: 14px;
+    width: fit-content;
+    margin-left: 140px;
+  }
+}
+
+.card-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    color: #333;
+  }
+}
+</style>

+ 229 - 0
src/views/order/paySet/index.vue

@@ -0,0 +1,229 @@
+<template>
+  <div class="p-2">
+    <el-card shadow="never">
+      <template #header>
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="22">
+            <span>支付设置信息列表</span>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:paySet:add']">新增</el-button>
+          </el-col>
+        </el-row>
+      </template>
+      <el-table v-loading="loading" border :data="paySetList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="编号" align="center" prop="payCode" />
+        <el-table-column label="支付方式名称" align="center" prop="payName" />
+        <el-table-column label="描述" align="center" prop="payDescription" />
+        <el-table-column label="环境" align="center" prop="payEnvironment" />
+        <el-table-column label="是否显示" align="center" prop="isShow">
+          <template #default="scope">
+            <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column label="数据来源" align="center" prop="dataSource" />
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template #default="scope">
+            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:paySet:edit']">编辑</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+    </el-card>
+    <!-- 添加或修改支付方式类型对话框 -->
+    <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
+      <el-form ref="paySetFormRef" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="支付方式" prop="payName">
+          <el-input v-model="form.payName" placeholder="请输入支付方式名称" />
+        </el-form-item>
+        <el-form-item label="支付环境" prop="payEnvironment">
+          <el-input v-model="form.payEnvironment" placeholder="请输入支付环境" />
+        </el-form-item>
+        <el-form-item label="是否显示" prop="isShow">
+          <el-radio-group v-model="form.isShow">
+            <el-radio v-for="dict in sys_platform_yes_no" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="描述" prop="payDescription">
+          <el-input v-model="form.payDescription" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="PaySet" lang="ts">
+import { listPaySet, getPaySet, delPaySet, addPaySet, updatePaySet, changeStatus } from '@/api/order/paySet';
+import { PaySetVO, PaySetQuery, PaySetForm } from '@/api/order/paySet/types';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { sys_platform_yes_no } = toRefs<any>(proxy?.useDict('sys_platform_yes_no'));
+
+const paySetList = ref<PaySetVO[]>([]);
+const buttonLoading = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref<Array<string | number>>([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+
+const queryFormRef = ref<ElFormInstance>();
+const paySetFormRef = ref<ElFormInstance>();
+
+const dialog = reactive<DialogOption>({
+  visible: false,
+  title: ''
+});
+
+const initFormData: PaySetForm = {
+  id: undefined,
+  payCode: undefined,
+  payName: undefined,
+  payDescription: undefined,
+  payEnvironment: undefined,
+  isShow: '0',
+  dataSource: undefined,
+  status: undefined,
+  remark: undefined
+};
+const data = reactive<PageData<PaySetForm, PaySetQuery>>({
+  form: { ...initFormData },
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    payCode: undefined,
+    payName: undefined,
+    payDescription: undefined,
+    payEnvironment: undefined,
+    isShow: undefined,
+    dataSource: undefined,
+    status: undefined,
+    platformCode: undefined,
+    params: {}
+  },
+  rules: {
+    payName: [{ required: true, message: '支付方式名称不能为空', trigger: 'blur' }],
+    isShow: [{ required: true, message: '是否显示不能为空', trigger: 'change' }]
+  }
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 查询支付方式类型列表 */
+const getList = async () => {
+  loading.value = true;
+  const res = await listPaySet(queryParams.value);
+  paySetList.value = res.rows;
+  total.value = res.total;
+  loading.value = false;
+};
+
+const handleStatusChange = async (row: PaySetVO) => {
+  const oldValue = row.isShow; // 保存旧值(0 或 1)
+
+  try {
+    await changeStatus(row.id, row.isShow); // 传新值
+    proxy?.$modal.msgSuccess('操作成功');
+  } catch {
+    row.isShow = oldValue; // 失败回滚
+    proxy?.$modal.msgError('操作失败,请重试');
+  }
+};
+
+/** 取消按钮 */
+const cancel = () => {
+  reset();
+  dialog.visible = false;
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  paySetFormRef.value?.resetFields();
+};
+
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.value.pageNum = 1;
+  getList();
+};
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+  queryFormRef.value?.resetFields();
+  handleQuery();
+};
+
+/** 多选框选中数据 */
+const handleSelectionChange = (selection: PaySetVO[]) => {
+  ids.value = selection.map((item) => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+};
+
+/** 新增按钮操作 */
+const handleAdd = () => {
+  reset();
+  dialog.visible = true;
+  dialog.title = '添加支付方式类型';
+};
+
+/** 修改按钮操作 */
+const handleUpdate = async (row?: PaySetVO) => {
+  reset();
+  const _id = row?.id || ids.value[0];
+  const res = await getPaySet(_id);
+  Object.assign(form.value, res.data);
+  dialog.visible = true;
+  dialog.title = '修改支付方式类型';
+};
+
+/** 提交按钮 */
+const submitForm = () => {
+  paySetFormRef.value?.validate(async (valid: boolean) => {
+    if (valid) {
+      buttonLoading.value = true;
+      if (form.value.id) {
+        await updatePaySet(form.value).finally(() => (buttonLoading.value = false));
+      } else {
+        await addPaySet(form.value).finally(() => (buttonLoading.value = false));
+      }
+      proxy?.$modal.msgSuccess('操作成功');
+      dialog.visible = false;
+      await getList();
+    }
+  });
+};
+
+/** 删除按钮操作 */
+const handleDelete = async (row?: PaySetVO) => {
+  const _ids = row?.id || ids.value;
+  await proxy?.$modal.confirm('是否确认删除支付方式类型编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
+  await delPaySet(_ids);
+  proxy?.$modal.msgSuccess('删除成功');
+  await getList();
+};
+
+/** 导出按钮操作 */
+const handleExport = () => {
+  proxy?.download(
+    'system/paySet/export',
+    {
+      ...queryParams.value
+    },
+    `paySet_${new Date().getTime()}.xlsx`
+  );
+};
+
+onMounted(() => {
+  getList();
+});
+</script>

+ 216 - 0
src/views/order/returnReason/index.vue

@@ -0,0 +1,216 @@
+<template>
+  <div class="p-2">
+    <el-card shadow="never">
+      <template #header>
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="22">
+            <span>退货原因设置信息列表</span>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:returnReason:add']">新增</el-button>
+          </el-col>
+        </el-row>
+      </template>
+      <el-table v-loading="loading" border :data="returnReasonList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="编号" align="center" prop="returnReasonCode" />
+        <el-table-column label="退货原因" align="center" prop="returnReasonName" />
+        <el-table-column label="是否显示" align="center" prop="isShow">
+          <template #default="scope">
+            <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column label="数据来源" align="center" prop="dataSource" />
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template #default="scope">
+            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:returnReason:edit']">编辑</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+    </el-card>
+    <!-- 添加或修改退货原因对话框 -->
+    <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
+      <el-form ref="returnReasonFormRef" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="原因" prop="returnReasonName">
+          <el-input v-model="form.returnReasonName" placeholder="请输入退货原因" />
+        </el-form-item>
+        <el-form-item label="是否显示" prop="isShow">
+          <el-radio-group v-model="form.isShow">
+            <el-radio v-for="dict in sys_platform_yes_no" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="ReturnReason" lang="ts">
+import { listReturnReason, getReturnReason, delReturnReason, addReturnReason, updateReturnReason, changeStatus } from '@/api/order/returnReason';
+import { ReturnReasonVO, ReturnReasonQuery, ReturnReasonForm } from '@/api/order/returnReason/types';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { sys_platform_yes_no } = toRefs<any>(proxy?.useDict('sys_platform_yes_no'));
+const returnReasonList = ref<ReturnReasonVO[]>([]);
+const buttonLoading = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref<Array<string | number>>([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+
+const queryFormRef = ref<ElFormInstance>();
+const returnReasonFormRef = ref<ElFormInstance>();
+
+const dialog = reactive<DialogOption>({
+  visible: false,
+  title: ''
+});
+
+const initFormData: ReturnReasonForm = {
+  id: undefined,
+  returnReasonCode: undefined,
+  returnReasonName: undefined,
+  isShow: '0',
+  dataSource: undefined,
+  status: undefined,
+  remark: undefined
+};
+const data = reactive<PageData<ReturnReasonForm, ReturnReasonQuery>>({
+  form: { ...initFormData },
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    returnReasonCode: undefined,
+    returnReasonName: undefined,
+    isShow: undefined,
+    dataSource: undefined,
+    status: undefined,
+    platformCode: undefined,
+    params: {}
+  },
+  rules: {
+    returnReasonName: [{ required: true, message: '退货原因不能为空', trigger: 'blur' }]
+  }
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 查询退货原因列表 */
+const getList = async () => {
+  loading.value = true;
+  const res = await listReturnReason(queryParams.value);
+  returnReasonList.value = res.rows;
+  total.value = res.total;
+  loading.value = false;
+};
+
+/** 取消按钮 */
+const cancel = () => {
+  reset();
+  dialog.visible = false;
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  returnReasonFormRef.value?.resetFields();
+};
+
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.value.pageNum = 1;
+  getList();
+};
+
+const handleStatusChange = async (row: ReturnReasonVO) => {
+  const oldValue = row.isShow; // 保存旧值(0 或 1)
+
+  try {
+    await changeStatus(row.id, row.isShow); // 传新值
+    proxy?.$modal.msgSuccess('操作成功');
+  } catch {
+    row.isShow = oldValue; // 失败回滚
+    proxy?.$modal.msgError('操作失败,请重试');
+  }
+};
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+  queryFormRef.value?.resetFields();
+  handleQuery();
+};
+
+/** 多选框选中数据 */
+const handleSelectionChange = (selection: ReturnReasonVO[]) => {
+  ids.value = selection.map((item) => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+};
+
+/** 新增按钮操作 */
+const handleAdd = () => {
+  reset();
+  dialog.visible = true;
+  dialog.title = '添加退货原因';
+};
+
+/** 修改按钮操作 */
+const handleUpdate = async (row?: ReturnReasonVO) => {
+  reset();
+  const _id = row?.id || ids.value[0];
+  const res = await getReturnReason(_id);
+  Object.assign(form.value, res.data);
+  dialog.visible = true;
+  dialog.title = '修改退货原因';
+};
+
+/** 提交按钮 */
+const submitForm = () => {
+  returnReasonFormRef.value?.validate(async (valid: boolean) => {
+    if (valid) {
+      buttonLoading.value = true;
+      if (form.value.id) {
+        await updateReturnReason(form.value).finally(() => (buttonLoading.value = false));
+      } else {
+        await addReturnReason(form.value).finally(() => (buttonLoading.value = false));
+      }
+      proxy?.$modal.msgSuccess('操作成功');
+      dialog.visible = false;
+      await getList();
+    }
+  });
+};
+
+/** 删除按钮操作 */
+const handleDelete = async (row?: ReturnReasonVO) => {
+  const _ids = row?.id || ids.value;
+  await proxy?.$modal.confirm('是否确认删除退货原因编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
+  await delReturnReason(_ids);
+  proxy?.$modal.msgSuccess('删除成功');
+  await getList();
+};
+
+/** 导出按钮操作 */
+const handleExport = () => {
+  proxy?.download(
+    'system/returnReason/export',
+    {
+      ...queryParams.value
+    },
+    `returnReason_${new Date().getTime()}.xlsx`
+  );
+};
+
+onMounted(() => {
+  getList();
+});
+</script>

+ 218 - 0
src/views/order/workSlipType/index.vue

@@ -0,0 +1,218 @@
+<template>
+  <div class="p-2">
+    <el-card shadow="never">
+      <template #header>
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="22">
+            <span>工单服务类型信息列表</span>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:workSlipType:add']">新增</el-button>
+          </el-col>
+        </el-row>
+      </template>
+
+      <el-table v-loading="loading" border :data="workSlipTypeList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="编号" align="center" prop="workSlipTypeCode" />
+        <el-table-column label="工单名称" align="center" prop="workSlipTypeName" />
+        <el-table-column label="是否显示" align="center" prop="isShow">
+          <template #default="scope">
+            <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column label="数据来源" align="center" prop="dataSource" />
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template #default="scope">
+            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:workSlipType:edit']">编辑</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+    </el-card>
+    <!-- 添加或修改工单类型对话框 -->
+    <el-dialog :title="dialog.title" v-model="dialog.visible" width="550px" append-to-body>
+      <el-form ref="workSlipTypeFormRef" :model="form" :rules="rules" label-width="110px">
+        <el-form-item label="工单类型名称" prop="workSlipTypeName">
+          <el-input v-model="form.workSlipTypeName" placeholder="请输入工单类型名称" />
+        </el-form-item>
+        <el-form-item label="是否显示" prop="isShow">
+          <el-radio-group v-model="form.isShow">
+            <el-radio v-for="dict in sys_platform_yes_no" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="WorkSlipType" lang="ts">
+import { listWorkSlipType, getWorkSlipType, delWorkSlipType, addWorkSlipType, updateWorkSlipType, changeStatus } from '@/api/order/workSlipType';
+import { WorkSlipTypeVO, WorkSlipTypeQuery, WorkSlipTypeForm } from '@/api/order/workSlipType/types';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { sys_platform_yes_no } = toRefs<any>(proxy?.useDict('sys_platform_yes_no'));
+
+const workSlipTypeList = ref<WorkSlipTypeVO[]>([]);
+const buttonLoading = ref(false);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref<Array<string | number>>([]);
+const single = ref(true);
+const multiple = ref(true);
+const total = ref(0);
+
+const queryFormRef = ref<ElFormInstance>();
+const workSlipTypeFormRef = ref<ElFormInstance>();
+
+const dialog = reactive<DialogOption>({
+  visible: false,
+  title: ''
+});
+
+const initFormData: WorkSlipTypeForm = {
+  id: undefined,
+  workSlipTypeCode: undefined,
+  workSlipTypeName: undefined,
+  isShow: '0',
+  dataSource: undefined,
+  status: undefined,
+  remark: undefined
+};
+const data = reactive<PageData<WorkSlipTypeForm, WorkSlipTypeQuery>>({
+  form: { ...initFormData },
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    workSlipTypeCode: undefined,
+    workSlipTypeName: undefined,
+    isShow: undefined,
+    dataSource: undefined,
+    status: undefined,
+    platformCode: undefined,
+    params: {}
+  },
+  rules: {
+    workSlipTypeName: [{ required: true, message: '工单类型名称不能为空', trigger: 'blur' }]
+  }
+});
+
+const { queryParams, form, rules } = toRefs(data);
+
+/** 查询工单类型列表 */
+const getList = async () => {
+  loading.value = true;
+  const res = await listWorkSlipType(queryParams.value);
+  workSlipTypeList.value = res.rows;
+  total.value = res.total;
+  loading.value = false;
+};
+
+/** 取消按钮 */
+const cancel = () => {
+  reset();
+  dialog.visible = false;
+};
+
+/** 表单重置 */
+const reset = () => {
+  form.value = { ...initFormData };
+  workSlipTypeFormRef.value?.resetFields();
+};
+
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.value.pageNum = 1;
+  getList();
+};
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+  queryFormRef.value?.resetFields();
+  handleQuery();
+};
+
+/** 多选框选中数据 */
+const handleSelectionChange = (selection: WorkSlipTypeVO[]) => {
+  ids.value = selection.map((item) => item.id);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+};
+
+const handleStatusChange = async (row: WorkSlipTypeVO) => {
+  const oldValue = row.isShow; // 保存旧值(0 或 1)
+
+  try {
+    await changeStatus(row.id, row.isShow); // 传新值
+    proxy?.$modal.msgSuccess('操作成功');
+  } catch {
+    row.isShow = oldValue; // 失败回滚
+    proxy?.$modal.msgError('操作失败,请重试');
+  }
+};
+
+/** 新增按钮操作 */
+const handleAdd = () => {
+  reset();
+  dialog.visible = true;
+  dialog.title = '添加工单类型';
+};
+
+/** 修改按钮操作 */
+const handleUpdate = async (row?: WorkSlipTypeVO) => {
+  reset();
+  const _id = row?.id || ids.value[0];
+  const res = await getWorkSlipType(_id);
+  Object.assign(form.value, res.data);
+  dialog.visible = true;
+  dialog.title = '修改工单类型';
+};
+
+/** 提交按钮 */
+const submitForm = () => {
+  workSlipTypeFormRef.value?.validate(async (valid: boolean) => {
+    if (valid) {
+      buttonLoading.value = true;
+      if (form.value.id) {
+        await updateWorkSlipType(form.value).finally(() => (buttonLoading.value = false));
+      } else {
+        await addWorkSlipType(form.value).finally(() => (buttonLoading.value = false));
+      }
+      proxy?.$modal.msgSuccess('操作成功');
+      dialog.visible = false;
+      await getList();
+    }
+  });
+};
+
+/** 删除按钮操作 */
+const handleDelete = async (row?: WorkSlipTypeVO) => {
+  const _ids = row?.id || ids.value;
+  await proxy?.$modal.confirm('是否确认删除工单类型编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
+  await delWorkSlipType(_ids);
+  proxy?.$modal.msgSuccess('删除成功');
+  await getList();
+};
+
+/** 导出按钮操作 */
+const handleExport = () => {
+  proxy?.download(
+    'system/workSlipType/export',
+    {
+      ...queryParams.value
+    },
+    `workSlipType_${new Date().getTime()}.xlsx`
+  );
+};
+
+onMounted(() => {
+  getList();
+});
+</script>