浏览代码

补单管理

ith5 2 月之前
父节点
当前提交
3e04d69c4b

+ 49 - 26
src/views/v1/api/customer/sdkOrder.js

@@ -1,4 +1,4 @@
-import { request } from '@/utils/request.js'
+import { request } from "@/utils/request.js";
 
 /**
  * 用户订单记录 API接口
@@ -10,10 +10,10 @@ export default {
    */
   getPageList(params = {}) {
     return request({
-      url: '/v1/customer/SdkOrder/index',
-      method: 'get',
-      params
-    })
+      url: "/v1/customer/SdkOrder/index",
+      method: "get",
+      params,
+    });
   },
 
   /**
@@ -22,10 +22,10 @@ export default {
    */
   save(params = {}) {
     return request({
-      url: '/v1/customer/SdkOrder/save',
-      method: 'post',
-      data: params
-    })
+      url: "/v1/customer/SdkOrder/save",
+      method: "post",
+      data: params,
+    });
   },
 
   /**
@@ -34,10 +34,10 @@ export default {
    */
   update(id, data = {}) {
     return request({
-      url: '/v1/customer/SdkOrder/update?id=' + id,
-      method: 'put',
-      data
-    })
+      url: "/v1/customer/SdkOrder/update?id=" + id,
+      method: "put",
+      data,
+    });
   },
 
   /**
@@ -46,9 +46,9 @@ export default {
    */
   read(id) {
     return request({
-      url: '/v1/customer/SdkOrder/read?id=' + id,
-      method: 'get'
-    })
+      url: "/v1/customer/SdkOrder/read?id=" + id,
+      method: "get",
+    });
   },
 
   /**
@@ -57,20 +57,43 @@ export default {
    */
   destroy(data) {
     return request({
-      url: '/v1/customer/SdkOrder/destroy',
-      method: 'delete',
-      data
-    })
+      url: "/v1/customer/SdkOrder/destroy",
+      method: "delete",
+      data,
+    });
   },
 
   /**
    * 补发
    * @returns
    */
-  send(order_id) {
+  send(params) {
     return request({
-      url: '/v1/customer/SdkOrder/send?order_id=' + order_id,
-      method: 'post'
-    })
-  }
-}
+      url: "/v1/customer/SdkOrder/send",
+      data: params,
+      method: "post",
+    });
+  },
+
+  /**
+   * 审核补单列表
+   */
+  getReissueAuditList(params = {}) {
+    return request({
+      url: "/v1/customer/SdkOrder/getReissueAuditList",
+      method: "get",
+      params,
+    });
+  },
+
+  /**
+   * 审核补单
+   */
+  reissueAudit(params = {}) {
+    return request({
+      url: "/v1/customer/SdkOrder/reissueAudit",
+      method: "post",
+      data: params,
+    });
+  },
+};

+ 22 - 22
src/views/v1/api/gameLog/sdkOrderSuccess.js

@@ -1,4 +1,4 @@
-import { request } from '@/utils/request.js'
+import { request } from "@/utils/request.js";
 
 /**
  * 订单记录表(支付成功) API接口
@@ -11,10 +11,10 @@ export default {
   getPageList(params = {}) {
     return request({
       // url: "/v1/dataReport/SdkOrderSuccess/index",
-      url: '/v1/dataReport/UserLog/getRechargeDetailList',
-      method: 'get',
-      params
-    })
+      url: "/v1/dataReport/UserLog/getRechargeDetailList",
+      method: "get",
+      params,
+    });
   },
 
   /**
@@ -23,10 +23,10 @@ export default {
    */
   save(params = {}) {
     return request({
-      url: '/v1/dataReport/SdkOrderSuccess/save',
-      method: 'post',
-      data: params
-    })
+      url: "/v1/dataReport/SdkOrderSuccess/save",
+      method: "post",
+      data: params,
+    });
   },
 
   /**
@@ -35,10 +35,10 @@ export default {
    */
   update(id, data = {}) {
     return request({
-      url: '/v1/dataReport/SdkOrderSuccess/update?id=' + id,
-      method: 'put',
-      data
-    })
+      url: "/v1/dataReport/SdkOrderSuccess/update?id=" + id,
+      method: "put",
+      data,
+    });
   },
 
   /**
@@ -47,9 +47,9 @@ export default {
    */
   read(id) {
     return request({
-      url: '/v1/dataReport/SdkOrderSuccess/read?id=' + id,
-      method: 'get'
-    })
+      url: "/v1/dataReport/SdkOrderSuccess/read?id=" + id,
+      method: "get",
+    });
   },
 
   /**
@@ -58,9 +58,9 @@ export default {
    */
   destroy(data) {
     return request({
-      url: '/v1/dataReport/SdkOrderSuccess/destroy',
-      method: 'delete',
-      data
-    })
-  }
-}
+      url: "/v1/dataReport/SdkOrderSuccess/destroy",
+      method: "delete",
+      data,
+    });
+  },
+};

+ 11 - 17
src/views/v1/customer/sdkOrder/index.vue

@@ -119,7 +119,8 @@
       <template #operationCell="{ record }">
         <a-button
           type="primary"
-          v-if="record?.send_status === 0 && record?.sync_status === 1"
+          size="mini"
+          v-if="record?.send_status === 0"
           @click="handleSend(record)"
           >补发</a-button
         >
@@ -128,19 +129,24 @@
 
     <!-- 编辑表单 -->
     <edit-form ref="editRef" @success="refresh" />
+
+    <!-- 补货表单 -->
+    <reissue-form ref="reissueRef" @success="refresh" />
   </div>
 </template>
 
 <script setup>
 import { onMounted, ref, reactive } from "vue";
-import { Message, Modal } from "@arco-design/web-vue";
+import { Message } from "@arco-design/web-vue";
 import EditForm from "./edit.vue";
+import ReissueForm from "./reissue.vue";
 import api from "../../api/customer/sdkOrder";
 import GameSelect from "@/components/game-select/index.vue";
 
 // 引用定义
 const crudRef = ref();
 const editRef = ref();
+const reissueRef = ref();
 
 // 搜索表单
 const searchForm = ref({
@@ -224,22 +230,10 @@ const columns = reactive([
 // 页面数据初始化
 const initPage = async () => {};
 
-// 补发
+// // 补发
 const handleSend = async (record) => {
-  console.log(record);
-  Modal.info({
-    title: "补发",
-    content: "确定要补发吗?",
-    okText: "确定",
-    cancelText: "取消",
-    onOk: async () => {
-      const resp = await api.send(record.order_id);
-      if (resp.code === 200) {
-        Message.success(`操作成功,请稍后刷新`);
-        crudRef.value?.refresh();
-      }
-    },
-  });
+  reissueRef.value?.open("add");
+  reissueRef.value?.setFormData(record);
 };
 
 // SaTable 数据请求

+ 114 - 0
src/views/v1/customer/sdkOrder/reissue.vue

@@ -0,0 +1,114 @@
+<template>
+  <component
+    is="a-modal"
+    :width="tool.getDevice() === 'mobile' ? '100%' : '600px'"
+    v-model:visible="visible"
+    :title="title"
+    :mask-closable="false"
+    :ok-loading="loading"
+    @cancel="close"
+    @before-ok="submit"
+  >
+    <!-- 表单信息 start -->
+    <a-form
+      ref="formRef"
+      :model="formData"
+      :rules="rules"
+      :auto-label-width="true"
+    >
+      <a-form-item label="订单号" field="order_id">
+        <a-input
+          v-model="formData.order_id"
+          placeholder="请输入订单号"
+          readonly
+        />
+      </a-form-item>
+      <a-form-item label="补单原因" field="desc">
+        <a-textarea v-model="formData.desc" placeholder="请输入补单原因" />
+      </a-form-item>
+    </a-form>
+    <!-- 表单信息 end -->
+  </component>
+</template>
+
+<script setup>
+import { ref, reactive, computed } from "vue";
+import tool from "@/utils/tool";
+import { Message, Modal } from "@arco-design/web-vue";
+import api from "../../api/customer/sdkOrder";
+
+const emit = defineEmits(["success"]);
+// 引用定义
+const visible = ref(false);
+const loading = ref(false);
+const formRef = ref();
+const mode = ref("");
+
+let title = computed(() => {
+  return "补发申请";
+});
+
+// 表单初始值
+const initialFormData = {
+  order_id: null,
+  desc: "",
+};
+
+// 表单信息
+const formData = reactive({ ...initialFormData });
+
+// 验证规则
+const rules = {
+  order_id: [{ required: true, message: "订单号必需填写" }],
+  desc: [{ required: true, message: "补单原因必须填写" }],
+};
+
+// 打开弹框
+const open = async (type = "add") => {
+  mode.value = type;
+  // 重置表单数据
+  Object.assign(formData, initialFormData);
+  formRef.value.clearValidate();
+  visible.value = true;
+  await initPage();
+};
+
+// 初始化页面数据
+const initPage = async () => {};
+
+// 设置数据
+const setFormData = async (data) => {
+  console.log(data);
+  for (const key in formData) {
+    if (data[key] != null && data[key] != undefined) {
+      formData[key] = data[key];
+    }
+  }
+};
+
+// 数据保存
+const submit = async (done) => {
+  const validate = await formRef.value?.validate();
+  if (!validate) {
+    loading.value = true;
+    let data = { ...formData };
+    let result = {};
+    result = await api.send(data);
+    if (result.code === 200) {
+      Message.success("操作成功");
+      emit("success");
+      done(true);
+    }
+    // 防止连续点击提交
+    setTimeout(() => {
+      loading.value = false;
+    }, 500);
+  }
+  done(false);
+};
+
+// 关闭弹窗
+const close = () => (visible.value = false);
+
+defineExpose({ open, setFormData });
+</script>

+ 70 - 47
src/views/v1/gameLog/sdkOrderSuccess/edit.vue

@@ -7,93 +7,116 @@
     :mask-closable="false"
     :ok-loading="loading"
     @cancel="close"
-    @before-ok="submit">
+    @before-ok="submit"
+  >
     <!-- 表单信息 start -->
-    <a-form ref="formRef" :model="formData" :rules="rules" :auto-label-width="true"> </a-form>
+    <a-form
+      ref="formRef"
+      :model="formData"
+      :rules="rules"
+      :auto-label-width="true"
+    >
+      <a-form-item label="订单号" field="order_id">
+        <a-input
+          v-model="formData.order_id"
+          placeholder="请输入订单号"
+          readonly
+        />
+      </a-form-item>
+      <a-form-item label="补单原因" field="desc">
+        <a-textarea v-model="formData.desc" placeholder="请输入补单原因" />
+      </a-form-item>
+      <a-form-item label="状态" field="status">
+        <a-select v-model="formData.status" placeholder="请选择状态">
+          <a-option :value="0">待发货</a-option>
+          <a-option :value="2">通过</a-option>
+          <a-option :value="3">拒绝</a-option>
+        </a-select>
+      </a-form-item>
+    </a-form>
     <!-- 表单信息 end -->
   </component>
 </template>
 
 <script setup>
-import { ref, reactive, computed } from 'vue'
-import tool from '@/utils/tool'
-import { Message, Modal } from '@arco-design/web-vue'
-import api from '../../api/gameLog/sdkOrderSuccess'
+import { ref, reactive, computed } from "vue";
+import tool from "@/utils/tool";
+import { Message, Modal } from "@arco-design/web-vue";
+import api from "../../api/customer/sdkOrder";
 
-const emit = defineEmits(['success'])
+const emit = defineEmits(["success"]);
 // 引用定义
-const visible = ref(false)
-const loading = ref(false)
-const formRef = ref()
-const mode = ref('')
+const visible = ref(false);
+const loading = ref(false);
+const formRef = ref();
+const mode = ref("");
 
 let title = computed(() => {
-  return '订单记录表(支付成功)' + (mode.value == 'add' ? '-新增' : '-编辑')
-})
+  return "补单审核";
+});
 
 // 表单初始值
 const initialFormData = {
   order_id: null,
-}
+  desc: "",
+  status: 0,
+  id: null,
+};
 
 // 表单信息
-const formData = reactive({ ...initialFormData })
+const formData = reactive({ ...initialFormData });
 
 // 验证规则
-const rules = {}
+const rules = {};
 
 // 打开弹框
-const open = async (type = 'add') => {
-  mode.value = type
+const open = async (type = "add") => {
+  mode.value = type;
   // 重置表单数据
-  Object.assign(formData, initialFormData)
-  formRef.value.clearValidate()
-  visible.value = true
-  await initPage()
-}
+  Object.assign(formData, initialFormData);
+  formRef.value.clearValidate();
+  visible.value = true;
+  await initPage();
+};
 
 // 初始化页面数据
-const initPage = async () => {}
+const initPage = async () => {};
 
 // 设置数据
 const setFormData = async (data) => {
   for (const key in formData) {
     if (data[key] != null && data[key] != undefined) {
-      formData[key] = data[key]
+      formData[key] = data[key];
     }
   }
-}
+};
 
 // 数据保存
 const submit = async (done) => {
-  const validate = await formRef.value?.validate()
+  const validate = await formRef.value?.validate();
   if (!validate) {
-    loading.value = true
-    let data = { ...formData }
-    let result = {}
-    if (mode.value === 'add') {
-      // 添加数据
-      data.order_id = undefined
-      result = await api.save(data)
-    } else {
-      // 修改数据
-      result = await api.update(data.order_id, data)
-    }
+    loading.value = true;
+    let data = { ...formData };
+    let result = {};
+
+    // 修改数据
+    result = await api.reissueAudit(data);
+
     if (result.code === 200) {
-      Message.success('操作成功')
-      emit('success')
-      done(true)
+      Message.success("操作成功");
+      emit("success");
+      done(true);
     }
     // 防止连续点击提交
     setTimeout(() => {
-      loading.value = false
-    }, 500)
+      loading.value = false;
+    }, 500);
   }
-  done(false)
-}
+  done(false);
+};
 
 // 关闭弹窗
-const close = () => (visible.value = false)
+const close = () => (visible.value = false);
 
-defineExpose({ open, setFormData })
+defineExpose({ open, setFormData });
 </script>

+ 237 - 146
src/views/v1/gameLog/sdkOrderSuccess/index.vue

@@ -1,206 +1,297 @@
 <template>
   <div class="ma-content-block">
-    <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
-      <!-- 搜索区 tableSearch -->
-      <template #tableSearch>
-        <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
-          <a-form-item label="游戏" field="game_id">
-            <game-select v-model="searchForm.game_id" multiple />
-          </a-form-item>
-        </a-col>
-        <a-col :sm="24" :md="17" :lg="17" :xl="12" :xxl="8" :xs="24">
-          <a-form-item label="充值日期" field="pay_time">
-            <a-space>
-              <a-range-picker class="w-full" v-model="searchForm.pay_time" :show-time="false" mode="date" />
-              <a-button size="mini" type="outline" @click="refreshDay('yesterday')">前一天</a-button>
-              <a-button size="mini" type="outline" @click="refreshDay('today')">当天</a-button>
-              <a-button size="mini" type="outline" @click="refreshDay('tomorrow')">后一天</a-button>
-            </a-space>
-          </a-form-item>
-        </a-col>
-        <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
-          <a-form-item label="注册日期" field="reg_time">
-            <a-range-picker class="w-full" v-model="searchForm.reg_time" :show-time="false" mode="date" />
-          </a-form-item>
-        </a-col>
-        <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
-          <a-form-item label="服务器ID" field="server_id">
-            <a-input v-model="searchForm.server_id" placeholder="请输入服务器ID" allow-clear />
-          </a-form-item>
-        </a-col>
-        <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
-          <a-form-item label="服务器名" field="server_name">
-            <a-input v-model="searchForm.server_name" placeholder="请输入服务器名" allow-clear />
-          </a-form-item>
-        </a-col>
-        <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
-          <a-form-item label="媒体类型" field="media_id">
-            <a-select v-model="searchForm.media_id" placeholder="请选择媒体类型" allow-clear allow-search>
-              <a-option
-                v-for="item in mediaOptions"
-                :key="item.id"
-                :value="item.id"
-                :label="`${item.id}:${item.name}`" />
-            </a-select>
-          </a-form-item>
-        </a-col>
-        <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
-          <a-form-item label="负责人" field="auth_id">
-            <auth-select v-model="searchForm.auth_id" multiple />
-          </a-form-item>
-        </a-col>
-        <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
-          <a-form-item label="渠道ID" field="agent_id">
-            <a-input v-model="searchForm.agent_id" placeholder="请输入渠道ID" allow-clear />
-          </a-form-item>
-        </a-col>
-        <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
-          <a-form-item label="广告位ID" field="site_id">
-            <a-input v-model="searchForm.site_id" placeholder="请输入广告位ID" allow-clear />
-          </a-form-item>
-        </a-col>
-        <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
-          <a-form-item label="用户名" field="user_name">
-            <a-input v-model="searchForm.user_name" placeholder="请输入用户名" allow-clear />
-          </a-form-item>
-        </a-col>
-      </template>
-      <template #tableSearchExtend>
-        <a-space> </a-space>
-      </template>
-      <!-- Table 自定义渲染 -->
-
-      <template #first_payment="{ record }">
-        <span>
-          {{ record.first_payment === 1 ? '是' : '否' }}
-        </span>
-      </template>
-    </sa-table>
-
-    <!-- 编辑表单 -->
-    <edit-form ref="editRef" @success="refresh" />
+    <a-tabs v-model:activeKey="activeTab" type="line">
+      <a-tab-pane key="payment" title="支付订单">
+        <sa-table
+          ref="crudRef"
+          :options="options"
+          :columns="columns"
+          :searchForm="searchForm"
+        >
+          <!-- 搜索区 tableSearch -->
+          <template #tableSearch>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="游戏" field="game_id">
+                <game-select v-model="searchForm.game_id" multiple />
+              </a-form-item>
+            </a-col>
+            <a-col :sm="24" :md="17" :lg="17" :xl="12" :xxl="8" :xs="24">
+              <a-form-item label="充值日期" field="pay_time">
+                <a-space>
+                  <a-range-picker
+                    class="w-full"
+                    v-model="searchForm.pay_time"
+                    :show-time="false"
+                    mode="date"
+                  />
+                  <a-button
+                    size="mini"
+                    type="outline"
+                    @click="refreshDay('yesterday')"
+                    >前一天</a-button
+                  >
+                  <a-button
+                    size="mini"
+                    type="outline"
+                    @click="refreshDay('today')"
+                    >当天</a-button
+                  >
+                  <a-button
+                    size="mini"
+                    type="outline"
+                    @click="refreshDay('tomorrow')"
+                    >后一天</a-button
+                  >
+                </a-space>
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="注册日期" field="reg_time">
+                <a-range-picker
+                  class="w-full"
+                  v-model="searchForm.reg_time"
+                  :show-time="false"
+                  mode="date"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="服务器ID" field="server_id">
+                <a-input
+                  v-model="searchForm.server_id"
+                  placeholder="请输入服务器ID"
+                  allow-clear
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="媒体类型" field="media_id">
+                <a-select
+                  v-model="searchForm.media_id"
+                  placeholder="请选择媒体类型"
+                  allow-clear
+                  allow-search
+                >
+                  <a-option
+                    v-for="item in mediaOptions"
+                    :key="item.id"
+                    :value="item.id"
+                    :label="`${item.id}:${item.name}`"
+                  />
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="负责人" field="auth_id">
+                <auth-select v-model="searchForm.auth_id" multiple />
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="渠道ID" field="agent_id">
+                <a-input
+                  v-model="searchForm.agent_id"
+                  placeholder="请输入渠道ID"
+                  allow-clear
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="广告位ID" field="site_id">
+                <a-input
+                  v-model="searchForm.site_id"
+                  placeholder="请输入广告位ID"
+                  allow-clear
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="用户名" field="user_name">
+                <a-input
+                  v-model="searchForm.user_name"
+                  placeholder="请输入用户名"
+                  allow-clear
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="订单号" field="order_id">
+                <a-input
+                  v-model="searchForm.order_id"
+                  placeholder="请输订单号"
+                  allow-clear
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="CP订单号" field="cp_order_id">
+                <a-input
+                  v-model="searchForm.cp_order_id"
+                  placeholder="请输CP订单号"
+                  allow-clear
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :sm="12" :md="6" :lg="7" :xl="6" :xxl="4" :xs="24">
+              <a-form-item label="角色ID" field="role_id">
+                <a-input
+                  v-model="searchForm.role_id"
+                  placeholder="请输角色ID"
+                  allow-clear
+                />
+              </a-form-item>
+            </a-col>
+          </template>
+          <template #tableSearchExtend>
+            <a-space> </a-space>
+          </template>
+          <!-- Table 自定义渲染 -->
+
+          <template #first_payment="{ record }">
+            <span>
+              {{ record.first_payment === 1 ? "是" : "否" }}
+            </span>
+          </template>
+        </sa-table>
+
+        <!-- 编辑表单 -->
+        <edit-form ref="editRef" @success="refresh" />
+      </a-tab-pane>
+
+      <a-tab-pane key="supplement" title="补单管理">
+        <Reissue />
+      </a-tab-pane>
+    </a-tabs>
   </div>
 </template>
 
 <script setup>
-import { onMounted, ref, reactive } from 'vue'
-import EditForm from './edit.vue'
-import api from '../../api/gameLog/sdkOrderSuccess'
-import dayjs from 'dayjs'
-import commonApi from '../../api/common'
-import GameSelect from '@/components/game-select/index.vue'
-import AuthSelect from '@/components/auth-select/index.vue'
+import { onMounted, ref, reactive } from "vue";
+import EditForm from "./edit.vue";
+import api from "../../api/gameLog/sdkOrderSuccess";
+import dayjs from "dayjs";
+import commonApi from "../../api/common";
+import GameSelect from "@/components/game-select/index.vue";
+import AuthSelect from "@/components/auth-select/index.vue";
+import Reissue from "./reissue.vue";
 
 // 引用定义
-const crudRef = ref()
-const editRef = ref()
-const mediaOptions = ref([])
+const crudRef = ref();
+const editRef = ref();
+const mediaOptions = ref([]);
+const activeTab = ref("payment");
 
 // 搜索表单
 const searchForm = ref({
-  game_id: '',
-  media_id: '',
-  auth_id: '',
-  agent_id: '',
-  site_id: '',
-  user_name: '',
-  server_id: '',
-  server_name: '',
+  game_id: "",
+  media_id: "",
+  auth_id: "",
+  agent_id: "",
+  site_id: "",
+  user_name: "",
+  server_id: "",
+  server_name: "",
   reg_time: [],
-  pay_time: [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')],
-})
+  pay_time: [dayjs().format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")],
+});
 
 // SaTable 基础配置
 const options = reactive({
   api: api.getPageList,
-  pk: 'order_id',
+  pk: "order_id",
   rowSelection: { showCheckedAll: true },
   showSort: false,
   export: {
     // // 导出url
     // url: "v1/gameLog/sdkOrderSuccess/export",
-    url: 'v1/gameLog/UserLog/exportRechargeDetailList',
+    url: "v1/gameLog/UserLog/exportRechargeDetailList",
     // 显示导出按钮的权限
-    auth: ['v1/gameLog/sdkOrderSuccess/export'],
+    auth: ["v1/gameLog/sdkOrderSuccess/export"],
     // 按钮文案
-    text: '导出',
+    text: "导出",
     // 是否显示
     show: true,
   },
   operationColumn: false,
-})
+});
 
 // SaTable 列配置
 const columns = reactive([
-  { title: '订单号', dataIndex: 'order_id', width: 110 },
-  { title: '用户名', dataIndex: 'user_name', width: 120 },
-  { title: '渠道ID', dataIndex: 'agent_id', width: 80 },
-  { title: '广告位ID', dataIndex: 'site_id', width: 80 },
+  { title: "订单号", dataIndex: "order_id", width: 110 },
+  { title: "用户名", dataIndex: "user_name", width: 120 },
+  { title: "渠道ID", dataIndex: "agent_id", width: 80 },
+  { title: "广告位ID", dataIndex: "site_id", width: 80 },
 
-  { title: '游戏名', dataIndex: 'game_name', width: 120 },
+  { title: "游戏名", dataIndex: "game_name", width: 120 },
 
-  { title: '服务器ID', dataIndex: 'server_id', width: 80 },
-  { title: '服务器名', dataIndex: 'server_name', width: 90 },
+  { title: "服务器ID", dataIndex: "server_id", width: 80 },
+  { title: "服务器名", dataIndex: "server_name", width: 90 },
 
-  { title: '支付方式', dataIndex: 'pay_channel_name', width: 120 },
-  { title: '充值金额', dataIndex: 'money', width: 100 },
+  { title: "支付方式", dataIndex: "pay_channel_name", width: 120 },
+  { title: "充值金额", dataIndex: "money", width: 100 },
 
-  { title: '充值日期', dataIndex: 'pay_date', width: 140 },
-  { title: '注册日期', dataIndex: 'reg_date', width: 140 },
-  { title: '首次充值', dataIndex: 'first_payment', width: 80 },
+  { title: "充值日期", dataIndex: "pay_date", width: 140 },
+  { title: "注册日期", dataIndex: "reg_date", width: 140 },
+  { title: "首次充值", dataIndex: "first_payment", width: 80 },
 
-  { title: '渠道名', dataIndex: 'agent_name', width: 120 },
-  { title: '负责人', dataIndex: 'auth_name', width: 70 },
-])
+  { title: "渠道名", dataIndex: "agent_name", width: 120 },
+  { title: "负责人", dataIndex: "auth_name", width: 70 },
+]);
 
 // 获取媒体类型
 const getMediaOptions = async () => {
-  const resp = await commonApi.getMediaOptionsApi()
+  const resp = await commonApi.getMediaOptionsApi();
   if (resp.code === 200) {
-    mediaOptions.value = resp.data
+    mediaOptions.value = resp.data;
   }
-}
+};
 
 // 页面数据初始化
 const initPage = async () => {
-  await getMediaOptions()
-}
+  await getMediaOptions();
+};
 
 const refreshDay = async (day) => {
   switch (day) {
-    case 'yesterday':
+    case "yesterday":
+      searchForm.value.pay_time = [
+        dayjs(searchForm.value.pay_time[0])
+          .subtract(1, "day")
+          .format("YYYY-MM-DD"),
+        dayjs(searchForm.value.pay_time[1])
+          .subtract(1, "day")
+          .format("YYYY-MM-DD"),
+      ];
+      break;
+    case "today":
       searchForm.value.pay_time = [
-        dayjs(searchForm.value.pay_time[0]).subtract(1, 'day').format('YYYY-MM-DD'),
-        dayjs(searchForm.value.pay_time[1]).subtract(1, 'day').format('YYYY-MM-DD'),
-      ]
-      break
-    case 'today':
-      searchForm.value.pay_time = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
-      break
-    case 'tomorrow':
+        dayjs().format("YYYY-MM-DD"),
+        dayjs().format("YYYY-MM-DD"),
+      ];
+      break;
+    case "tomorrow":
       searchForm.value.pay_time = [
-        dayjs(searchForm.value.pay_time[0]).add(1, 'day').format('YYYY-MM-DD'),
-        dayjs(searchForm.value.pay_time[1]).add(1, 'day').format('YYYY-MM-DD'),
-      ]
-      break
+        dayjs(searchForm.value.pay_time[0]).add(1, "day").format("YYYY-MM-DD"),
+        dayjs(searchForm.value.pay_time[1]).add(1, "day").format("YYYY-MM-DD"),
+      ];
+      break;
     default:
-      break
+      break;
   }
-  refresh()
-}
+  refresh();
+};
 
 // SaTable 数据请求
 const refresh = async () => {
-  crudRef.value?.refresh()
-}
+  crudRef.value?.refresh();
+};
 
 // 页面加载完成执行
 onMounted(async () => {
-  initPage()
-  refresh()
-})
+  initPage();
+  refresh();
+});
 </script>
 
 <script>
-export default { name: 'v1/user-logs/sdkOrderSuccess' }
+export default { name: "v1/user-logs/sdkOrderSuccess" };
 </script>

+ 138 - 0
src/views/v1/gameLog/sdkOrderSuccess/reissue.vue

@@ -0,0 +1,138 @@
+<template>
+  <div class="ma-content-block">
+    <sa-table
+      ref="crudRef"
+      :options="options"
+      :columns="columns"
+      :searchForm="searchForm"
+    >
+      <template #tableSearch>
+        <a-col :sm="6" :xs="24">
+          <a-form-item label="订单号" field="order_id">
+            <a-input
+              v-model="searchForm.order_id"
+              placeholder="请输入订单号"
+              allow-clear
+            />
+          </a-form-item>
+        </a-col>
+        <a-col :sm="6" :xs="24">
+          <a-form-item label="状态" field="status">
+            <a-select
+              v-model="searchForm.status"
+              placeholder="请选择状态"
+              allow-clear
+            >
+              <a-option value="0">未发货</a-option>
+              <a-option value="1">发放中</a-option>
+              <a-option value="2">已发货</a-option>
+              <a-option value="3">已拒绝</a-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :sm="6" :xs="24">
+          <a-form-item label="申请类型" field="resend_type">
+            <a-select
+              v-model="searchForm.resend_type"
+              placeholder="请选择申请类型"
+              allow-clear
+            >
+              <a-option value="1">人工</a-option>
+              <a-option value="2">自动</a-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </template>
+      <!-- 操作前 -->
+      <template #operationCell="{ record }">
+        <a-button
+          type="primary"
+          size="mini"
+          v-if="record.status === 0"
+          @click="handleAudit(record)"
+          >审核</a-button
+        >
+      </template>
+    </sa-table>
+    <!-- 审核表单弹框 -->
+    <audit-form ref="auditRef" @success="refresh" />
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, onMounted } from "vue";
+import AuditForm from "./edit.vue";
+import api from "../../api/customer/sdkOrder";
+
+const auditRef = ref();
+const crudRef = ref();
+
+const searchForm = ref({
+  order_id: "",
+  status: "",
+  resend_type: "",
+});
+
+const options = reactive({
+  api: api.getReissueAuditList,
+  pk: "id",
+  rowSelection: { showCheckedAll: true },
+  showSort: false,
+});
+
+const columns = reactive([
+  {
+    title: "订单号",
+    dataIndex: "order_id",
+  },
+  {
+    title: "申请类型",
+    type: "dict",
+    dict: "resend_type",
+    dataIndex: "resend_type",
+  },
+  {
+    title: "状态",
+    type: "dict",
+    dict: "resissue_status",
+    dataIndex: "status",
+  },
+  {
+    title: "申请时间",
+    dataIndex: "create_time",
+    width: 160,
+  },
+  {
+    title: "申请人",
+    dataIndex: "created_user_name",
+  },
+  {
+    title: "审批人",
+    dataIndex: "update_user_name",
+  },
+
+  {
+    title: "补单异常描述",
+    dataIndex: "error",
+  },
+  {
+    title: "更新时间",
+    width: 160,
+    dataIndex: "update_time",
+  },
+]);
+
+const handleAudit = (record) => {
+  auditRef.value.open("audit");
+  auditRef.value.setFormData(record);
+};
+
+onMounted(() => {
+  refresh();
+});
+
+// 刷新表格
+const refresh = () => {
+  crudRef.value.refresh();
+};
+</script>