Procházet zdrojové kódy

后台管理系统—推广列表+巨量账户级回传

pansl před 1 rokem
rodič
revize
5ff4bd9325

+ 7 - 1
src/api/applet/index.ts

@@ -12,7 +12,13 @@ export function manageMiniprogramIndex(params: object) {
   return http.get('/manage/miniprogram/index', params);
 }
 /**
- * 小程序列表
+ * 小程序-公司列表
+ */
+export function manageMiniprogramCompanylist(params?: object) {
+  return http.get('/manage/miniprogram/companylist', params);
+}
+/**
+ * 小程序详情
  */
 export function manageMiniprogramShow(id: number | string, params?: object) {
   return http.get(`/manage/miniprogram/show/${id}`, params);

+ 6 - 0
src/api/backConfig/index.ts

@@ -30,3 +30,9 @@ export function callbackJuliangAccountAddAccount(params: object) {
 export function callbackJuliangAccountLogCallbackAgain(params: object) {
   return http.post(`/callback/juliangAccount/log/callbackAgain`, params);
 }
+/**
+ * 巨量账户级回传-回传开关
+ */
+export function callbackJuliangAccountTurnCallbackState(params: object) {
+  return http.post(`/callback/juliangAccount/turnCallbackState`, params);
+}

+ 23 - 6
src/layout/components/header/index.vue

@@ -74,30 +74,47 @@ const isShowNavData = computed(() => {
   console.log(userStore.getRoles, 'getRoles');
   if (userStore.getRoles?.some(el => (el?.identify == 'optimizer'))) {
     navData.value.advertiser = navDataArr.value[0]
-    miniPrograms.value = navDataArr.value[0]?.miniPrograms
     isAdverDisabled.value = true;
+    miniPrograms.value = navDataArr.value[0]?.miniPrograms
+    // miniPrograms.value = [{
+    //   app_name: "weixin",
+    //   id: 13,
+    //   name: "三个十千短剧", type: 1
+    // }, ...miniPrograms.value]
   }
   return userStore.getRoles?.some(el => (el?.identify == 'optimizer'))
 })
 const appChange = (e) => {
+  console.log(e, 'appChange', userStore.roles, navData.value, 'appChange.valappChangeappChangeue');
   Cache.set('nav_data', JSON.stringify(navData.value));
   router.push('/')
   let timer = setTimeout(() => {
     location.reload()
     clearTimeout(timer)
-  }, 500)
+  }, 100)
   searchMenuVisiable.value = false
 }
 
-const init = (params: object) => {
+const init = (params?: object) => {
   advertiserListAdvertiser({ ...params, limit: 50 }).then(res => {
     console.log(res, 'advertiserListAdvertiseradvertiserListAdvertiser');
     navDataArr.value = res.data
   })
 }
 onMounted(() => {
-  init({})
-  navData.value = JSON.parse(Cache.get('nav_data')) || {}
-  miniPrograms.value = JSON.parse(Cache.get('nav_data'))?.advertiser?.miniPrograms || []
+  init()
+  let timer = setTimeout(() => {
+    if (JSON.parse(Cache.get('nav_data'))) {
+      navData.value = JSON.parse(Cache.get('nav_data')) || {}
+      miniPrograms.value = JSON.parse(Cache.get('nav_data'))?.advertiser?.miniPrograms || []
+    } else {
+      // if (miniPrograms.value.length == 1) {
+      //   navData.value.app = miniPrograms.value[0].app_name
+      //   Cache.set('nav_data', JSON.stringify(navData.value));
+      //   location.reload()
+      // }
+    }
+    clearTimeout(timer)
+  }, 300);
 })
 </script>

+ 1 - 1
src/layout/components/header/menuSelect.vue

@@ -6,7 +6,7 @@
       <Teleport to="body">
         <el-dialog v-model="searchMenuVisiable" width="30%" draggable>
           <el-select v-model="navData.app" class="m-2 rounded" clearable filterable @change="appChange"
-            placeholder="Select" size="large">
+            placeholder="请选择" size="large">
             <el-option v-for="item in navDataArr" :key="item.name" :label="item.title" :value="item.name" />
           </el-select>
         </el-dialog>

+ 5 - 2
src/layout/components/header/profile.vue

@@ -2,12 +2,15 @@
   <div class="flex w-2/5 pl-1 pr-1 hover:cursor-pointer">
     <el-dropdown size="large" placement="bottom-end" class="flex items-center justify-center w-full hover:cursor-pointer">
       <div class="flex lg:items-center">
-        <img :src="userStore.getAvatar" class="rounded-full w-7 h-7" />
+        <div class="rounded-full w-7 h-7"></div>
+        <!-- <img :src="userStore.getAvatar" class="rounded-full w-7 h-7" /> -->
         <div class="hidden ml-2 lg:block">{{ userStore.getNickname }}</div>
       </div>
       <template #dropdown>
         <el-dropdown-menu class="w-28">
-          <el-dropdown-item> <Icon name="user" /> <router-link :to="{ path: '/user/center' }">个人信息</router-link> </el-dropdown-item>
+          <el-dropdown-item>
+            <Icon name="user" /> <router-link :to="{ path: '/user/center' }">个人信息</router-link>
+          </el-dropdown-item>
           <el-dropdown-item divided @click="logout">
             <Icon name="power" className="mr-1 w-4 h-4" />
             退 出

+ 24 - 4
src/views/appletManage/index.vue

@@ -6,12 +6,20 @@
           <el-form-item label="小程序名称">
             <el-input v-model="query.name" clearable />
           </el-form-item>
-          <el-form-item label="所属公司">
-            <el-input v-model="query.company" clearable />
-          </el-form-item>
           <el-form-item label="对应剧场名称">
             <el-input v-model="query.play_name" clearable />
           </el-form-item>
+          <!-- <el-form-item label="所属公司">
+            <el-select v-model="query.company" clearable filterable placeholder="请选择">
+              <el-option v-for="(item, index) in companylist" :key="index" :label="item" :value="item" />
+            </el-select>
+          </el-form-item> -->
+          <el-form-item label="类型">
+            <el-select v-model="query.type" clearable filterable placeholder="请选择">
+              <el-option v-for="(item, index) in miniprogramTypelist" :key="index" :label="item.name"
+                :value="item.value" />
+            </el-select>
+          </el-form-item>
         </template>
       </Search>
       <div class="table-default">
@@ -27,7 +35,7 @@
               <span v-else>{{ scope.row.name }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="company" label="所属公司" />
+          <!-- <el-table-column prop="company" label="所属公司" /> -->
           <el-table-column prop="play_name" label="对应剧场名称" />
           <el-table-column prop="status_name" label="状态" />
           <el-table-column prop="type_name" label="类型" />
@@ -59,10 +67,13 @@ import Create from './form/create.vue';
 import depotsTransfer from './form/depotsTransfer.vue';
 import { useGetList } from '@/hook/curd/useGetList';
 import { useOpen } from '@/hook/curd/useOpen';
+import { manageMiniprogramCompanylist, manageMiniprogramTypelist } from '@/api/applet/index'
 
 const api = '/manage/miniprogram/index';
 const depotsVisible = ref(false)
 const depotsData = ref({})
+const companylist = ref([])
+const miniprogramTypelist = ref([])
 
 const { data, query, search, reset, loading } = useGetList(api);
 const { open, close, title, visible, id } = useOpen();
@@ -78,8 +89,17 @@ const closeDeptos = () => {
   depotsVisible.value = false
   search()
 }
+const init = () => {
+  // manageMiniprogramCompanylist().then(res => {
+  //   companylist.value = res.data
+  // })
+  manageMiniprogramTypelist().then(res => {
+    miniprogramTypelist.value = res.data
+  })
+}
 
 onMounted(() => {
+  init()
   search();
 });
 </script>

+ 5 - 3
src/views/chargeManage/chargeTemplate/form/create.vue

@@ -8,12 +8,12 @@
     <el-form :model="dataForm" label-width="120px" ref="form" v-loading="loading" class="pr-6">
       <el-form-item label="模板名称" prop="name"
         :rules="[{ required: true, message: '模板名称必须填写' }, { max: 20, message: '至多输入20个字符', trigger: 'blur' }]">
-        <el-input :disabled="props.primary" class="item" v-model="dataForm.name" clearable />
+        <el-input :disabled="Boolean(props.primary)" class="item" v-model="dataForm.name" clearable />
       </el-form-item>
       <el-form-item label="充值档位" prop="options" :rules="[{ required: true, message: '请添加充值档位' }]">
         <el-card class="w-full" shadow="never">
           <div class="pt-5 pl-2">
-            <Add @click="openGears(null, null)" v-if="tableData.length < 6" />
+            <Add @click="openGears(null, null)" />
           </div>
           <el-table :data="tableData" class="w-full mt-3" v-loading="loading">
             <el-table-column prop="price" label="价格">
@@ -102,10 +102,12 @@ const openGears = (index: number | null, row: object) => {
   if (row) {
     gearsData.value = row
     gearsData.value.index = index
+    visibleGears.value = true
   } else {
+    if (tableData.value.length >= 6) return ElMessageBox.alert('当前充值档位位置已满')
     gearsData.value = null
+    visibleGears.value = true
   }
-  visibleGears.value = true
 }
 const deleteRow = (index: number) => {
   ElMessageBox.confirm(

+ 4 - 3
src/views/payBack/juliangAccount/index.vue

@@ -3,10 +3,10 @@
     <el-card shadow="always" :body-style="{ padding: '20px' }">
       <el-tabs v-model="activeName" class="demo-tabs" @tab-change="handChange">
         <el-tab-pane label="广告主列表" name="advertiser">
-          <advertiser></advertiser>
+          <advertiser v-if="activeName == 'advertiser'"></advertiser>
         </el-tab-pane>
         <el-tab-pane label="回传日志" name="log">
-
+          <logList v-if="activeName == 'log'"></logList>
         </el-tab-pane>
       </el-tabs>
     </el-card>
@@ -17,6 +17,7 @@
 import { useRouter, useRoute } from 'vue-router'
 import type { TabsPaneContext } from 'element-plus'
 import advertiser from "./tabs/advertiserList/index.vue"
+import logList from "./tabs/logList/index.vue"
 const router = useRouter()
 const route = useRoute()
 const handChange = (tab: TabsPaneContext, event: Event) => {
@@ -25,7 +26,7 @@ const handChange = (tab: TabsPaneContext, event: Event) => {
 }
 const activeName = ref('advertiser')
 onMounted(() => {
-
+  activeName.value = route.query.tab || 'advertiser'
 });
 </script>
 

+ 9 - 9
src/views/payBack/juliangAccount/tabs/advertiserList/form/create.vue

@@ -1,9 +1,5 @@
 <template>
   <el-form :model="formCallback" label-width="120px" ref="form" v-loading="loading" class="pr-4">
-    <!-- <el-form-item label="推广ID" v-if="promotion" prop="account_name" label-width="120px"
-      :rules="[{ required: false, message: '巨量账户名称必须填写' }, { max: 20, message: '至多输入20个字符', trigger: 'blur' }]">
-      <el-input disabled v-model="promotion" auto-complete="off" placeholder="请输入巨量账户名称"></el-input>
-    </el-form-item> -->
     <el-form-item label="巨量账户ID" prop="account_id" :rules="[{ required: true, message: '巨量账户ID必须填写' }]"
       label-width="120px">
       <el-input v-model.number="formCallback.account_id" type="number" auto-complete="off"
@@ -120,10 +116,11 @@ const submitForm = (formEl: FormInstance | undefined) => {
       if (valid) {
         callbackJuliangAccountAddAccount(formCallback.value).then(res => {
           ElMessage.success(res.message)
-          console.log(res, 'callbackJuliangAccountAddAccountcallbackJuliangAccountAddAccount');
           emit('close')
+          if (promotion.value) {
+            router.push({ path: '/promotion/promotionList', query: { tab: 0 } })
+          }
         })
-        console.log(formCallback.value, 'formCallbackformCallback');
         loading.value = false;
       } else {
         loading.value = false;
@@ -141,6 +138,7 @@ const ValiteFunc1 = () => {
       item.end_time &&
       item.start_time != item.end_time
     ) {
+      console.log(item.start_time, item.end_time, item.start_time != item.end_time);
       dateArr.push({
         start_time: item.start_time,
         end_time: item.end_time
@@ -150,12 +148,14 @@ const ValiteFunc1 = () => {
     }
   });
   //时间都填写的情况下,在去判断是否重叠时间
-  valite = isHasRepeatTime(dateArr);
+  if (dateArr.length > 0 && formCallback.value.rate_time_config.length == dateArr.length) {
+    valite = isHasRepeatTime(dateArr);
+  }
+
   let configBool = formCallback.value.rate_time_config.every(el => {
     return el.config_per && el.end_time && el.start_time
   })
 
-
   if (formCallback.value.min_money == null || formCallback.value.max_money == null) {
     ElMessage.error('请输入回传金额')
     valite = false;
@@ -191,7 +191,7 @@ const isHasRepeatTime = (dateArr = []) => {
   const allEndTime = endTimeArr.sort();
   let result = 0;
   for (let k = 1; k < allStartTime.length; k++) {
-    if (allStartTime[k] < allEndTime[k - 1]) {
+    if (allStartTime[k] <= allEndTime[k - 1]) {
       result += 1;
       break;
     }

+ 3 - 9
src/views/payBack/juliangAccount/tabs/advertiserList/form/paybackConfig.vue

@@ -1,9 +1,5 @@
 <template>
   <el-form :model="formCallback" label-width="120px" ref="form" v-loading="loading" class="pr-4">
-    <!-- <el-form-item label="推广ID" v-if="promotion" prop="account_name" label-width="120px"
-      :rules="[{ required: false, message: '巨量账户名称必须填写' }, { max: 20, message: '至多输入20个字符', trigger: 'blur' }]">
-      <el-input disabled v-model="promotion" auto-complete="off" placeholder="请输入巨量账户名称"></el-input>
-    </el-form-item> -->
     <el-form-item label="巨量账户ID" prop="ids" :rules="[{ required: false, message: '巨量账户ID必须填写' }]" label-width="120px">
       <span v-for="item in formCallback.account_ids" :key="item" class="account-ids">{{ item }}</span>
     </el-form-item>
@@ -116,10 +112,8 @@ const submitForm = (formEl: FormInstance | undefined) => {
       if (valid) {
         callbackJuliangAccountUpdateCallbackConfig(formCallback.value).then(res => {
           ElMessage.success(res.message)
-          console.log(res, 'callbackJuliangAccountAddAccountcallbackJuliangAccountAddAccount');
           emit('close')
         })
-        console.log(formCallback.value, 'formCallbackformCallback');
         loading.value = false;
       } else {
         loading.value = false;
@@ -146,7 +140,9 @@ const ValiteFunc1 = () => {
     }
   });
   //时间都填写的情况下,在去判断是否重叠时间
-  valite = isHasRepeatTime(dateArr);
+  if (dateArr.length > 0 && formCallback.value.rate_time_config.length == dateArr.length) {
+    valite = isHasRepeatTime(dateArr);
+  }
   let configBool = formCallback.value.rate_time_config.every(el => {
     return el.config_per && el.end_time && el.start_time
   })
@@ -202,8 +198,6 @@ const addBack = () => {
     config_per: 100
   });
 }
-const cancel = () => {
-};
 
 if (props.primary) {
   formCallback.value = JSON.parse(JSON.stringify(props.primary))

+ 11 - 29
src/views/payBack/juliangAccount/tabs/advertiserList/index.vue

@@ -10,10 +10,9 @@
     </template>
   </Search>
   <div class="table-default">
-    <div class="pt-5 pl-2">
+    <div class="pt-5 pl-2" v-action="'JuliangAccount@JuliangAccount@addAccount'">
       <el-button type="primary" size="default" @click="openForm(null)">新增账户</el-button>
       <el-button type="primary" size="default" @click="mulSet">批量设置</el-button>
-
     </div>
     <el-table :data="tableData" class="mt-3" v-loading="loading" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="80">
@@ -21,7 +20,7 @@
       <el-table-column label="巨量账户ID" width="260" prop="adv_account_id"></el-table-column>
       <el-table-column label="巨量账户" width="260" prop="adv_account_name">
       </el-table-column>
-      <el-table-column label="回传开关" width="150">
+      <el-table-column label="回传开关" width="150" v-action="'JuliangAccount@JuliangAccount@turnCallbackState'">
         <template #default="scope">
           <div>
             <el-switch v-model="scope.row.state" @change="switchStatus(scope.row)" :active-value="1" :inactive-value="0">
@@ -31,7 +30,8 @@
       </el-table-column>
       <el-table-column label="操作">
         <template #default="scope">
-          <el-button link type="primary" size="default" @click="handleEdit(scope.$index, scope.row)">回传配置</el-button>
+          <el-button link type="primary" size="default" @click="handleEdit(scope.$index, scope.row)"
+            v-action="'JuliangAccount@JuliangAccount@updateCallbackConfig'">回传配置</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -53,27 +53,17 @@ import { computed, onMounted, ref } from 'vue';
 import create from './form/create.vue';
 import paybackConfig from './form/paybackConfig.vue';
 import { useGetList } from '@/hook/curd/useGetList';
-import { useDestroy } from '@/hook/curd/useDestroy';
-import { noticesTypesList } from '@/api/notice/index';
+import { callbackJuliangAccountTurnCallbackState } from '@/api/backConfig/index'
 
 const api = 'callback/juliangAccount/list';
-const delapi = 'system/notices/notice/del';
-const noticesTypes = ref([]);
 
 const { data, query, search, reset, loading } = useGetList(api, true);
-const { destroy, deleted } = useDestroy('post');
 const tableData = computed(() => data.value?.data);
 const addAccountVisible = ref(false)
 const currentPayback = ref({})
 
-const searchForm = ref({
-  advertiser_id: "",
-  advertiser_name: "",
-  send_order_id: ""
-})
 const multipleSelection = ref([])
 const paybackVisible = ref(false) //设置回传弹窗
-const mutSetdialogVisible = ref(false) //批量设置弹窗
 
 const closeType = (type: string) => {
   switch (type) {
@@ -87,19 +77,12 @@ const closeType = (type: string) => {
   search()
 }
 
-
-const delAdvertiser = (data) => {
-  // advertiserDel(data.id).then(res => {
-  //   // 重新请求数据
-  //   this.getData(this.searchForm, (data) => {
-  //     this.tableData = data.list;
-  //     this.meta = data.meta;
-  //   })
-  // })
-}
-// 更改广告主配置状态
-const switchStatus = (data) => {
-
+const switchStatus = (data: object) => {
+  console.log({ id: data.id, state: data.state }, 'data', data);
+  callbackJuliangAccountTurnCallbackState({ id: data.id, state: data.state }).then(res => {
+    ElMessage.success(res.message)
+    search()
+  })
 }
 
 // 批量设置
@@ -169,7 +152,6 @@ const openForm = (data: any) => {
 };
 onMounted(() => {
   search();
-  deleted(search);
 });
 </script>
 <style  lang='scss' scoped></style>

+ 16 - 0
src/views/payBack/juliangAccount/tabs/logList/excelTitle.ts

@@ -0,0 +1,16 @@
+// 导出中文/字段
+export const titleObj = {
+  所属账户ID: 'advertiser_id',
+  所属账户: 'advertiser_name',
+  订单号: 'order_no',
+  用户ID: 'uid',
+  注册IP: 'user_ranse_ip',
+  注册时间: 'user_ranse_start_at',
+  充值时间: 'order_created_at',
+  充值金额: 'order_price',
+  是否回传: 'filter_type_str',
+  备注: 'filter_reason',
+  回传百分比: 'current_rate',
+  回传配置百分比: 'config_rate',
+  广告计划ID: 'adv_promotion_id'
+};

+ 233 - 0
src/views/payBack/juliangAccount/tabs/logList/index.vue

@@ -0,0 +1,233 @@
+<template>
+  <div>
+    <Search :search="search" :reset="resetQuery">
+      <template v-slot:body>
+        <el-form-item label="所属账户ID" prop="advertiser_id">
+          <el-input v-model="query.advertiser_id" placeholder="请输入所属账户ID" clearable />
+        </el-form-item>
+        <el-form-item label="所属账户" prop="advertiser_id">
+          <el-select v-model="query.advertiser_id" filterable remote clearable :remote-method="remoteMethod"
+            placeholder="选择所属账户">
+            <el-option v-for="item in adNameOtion" :key="item.id" :label="item.adv_account_name"
+              :value="item.adv_account_id" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="用户ID" prop="uid">
+          <el-input v-model="query.uid" placeholder="请输入用户ID" clearable />
+        </el-form-item>
+        <el-form-item label="广告计划ID" prop="adv_promotion_id">
+          <el-input v-model="query.adv_promotion_id" placeholder="请输入广告计划ID" clearable />
+        </el-form-item>
+        <el-form-item label="注册时间">
+          <el-date-picker unlink-panels clearable @change="timeChange($event, 'user')" format="YYYY/MM/DD"
+            value-format="YYYY-MM-DD" v-model="query.userTime" type="daterange" :shortcuts="shortcuts"
+            range-separator="To" start-placeholder="开始时间" end-placeholder="结束时间" />
+        </el-form-item>
+        <el-form-item label="充值时间">
+          <el-date-picker unlink-panels clearable @change="timeChange($event, 'order')" format="YYYY/MM/DD"
+            value-format="YYYY-MM-DD" v-model="query.orderTime" type="daterange" :shortcuts="shortcuts"
+            range-separator="To" start-placeholder="开始时间" end-placeholder="结束时间" />
+        </el-form-item>
+      </template>
+      <template v-slot:extra_button>
+        <exportExcel api="callback/juliangAccount/log/list" sheet_name="(巨量账户级)回传日志" :title_obj="titleObj"
+          :extro_params="{ is_export: true, ...query }">
+        </exportExcel>
+      </template>
+    </Search>
+    <div class="table-default">
+      <el-table :data="tableData" class="mt-3" v-loading="loading">
+        <el-table-column prop="advertiser_id" label="所属账户ID" fixed="left" min-width="200px" />
+        <el-table-column label="所属账户" prop="advertiser_name" show-overflow-tooltip fixed="left" min-width="200px">
+        </el-table-column>
+        <el-table-column prop="order_no" show-overflow-tooltip label="订单号" min-width="200px">
+        </el-table-column>
+        <el-table-column prop="uid" label="用户ID" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="user_ranse_ip" label="注册IP" show-overflow-tooltip min-width="200px">
+        </el-table-column>
+        <el-table-column prop="user_ranse_start_at" label="注册时间" show-overflow-tooltip min-width="200px" />
+        <el-table-column prop="order_created_at" label="充值时间" show-overflow-tooltip min-width="200px" />
+        <el-table-column prop="order_price" label="充值金额" show-overflow-tooltip min-width="150px">
+        </el-table-column>
+        <el-table-column prop="filter_type_str" label="是否回传" show-overflow-tooltip>
+          <template #default="scope">
+            <div class="wrapper">
+              <span class="text-lg font-bold content">
+                {{ scope.row.filter_type_str }}
+              </span>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="filter_reason" label="备注" show-overflow-tooltip min-width="200px">
+        </el-table-column>
+        <el-table-column prop="current_rate" label="回传百分比" show-overflow-tooltip min-width="150px">
+          <template #header>
+            <div class="flex items-center">
+              <span>回传百分比</span>
+              <el-tooltip placement="top">
+                <template #content>
+                  回传百分比=已成功回传的订单数(不包括补传)/(比例过滤掉的订单数+成功回传的订单数(不包括补传))*100%</template>
+                <el-icon>
+                  <InfoFilled />
+                </el-icon>
+              </el-tooltip>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="config_rate" label="回传配置百分比" show-overflow-tooltip min-width="150px">
+        </el-table-column>
+        <el-table-column prop="adv_promotion_id" label="广告计划ID" show-overflow-tooltip min-width="150px">
+        </el-table-column>
+        <el-table-column label="操作" fixed="right">
+          <template #default="scope">
+            <el-button @click="openType('repairVisible', scope.row)" link type="primary" size="small"
+              v-action="'JuliangAccount@CallbackLog@callbackAgain'">补传</el-button>
+            <br />
+            <el-button link type="primary" size="small" @click="openType('backConfigVisible', scope.row)">回传信息</el-button>
+            <br />
+          </template>
+        </el-table-column>
+      </el-table>
+      <Paginate />
+    </div>
+    <el-dialog v-model="repairVisible" destroy-on-close title="补传" draggable width="30%">
+      <div>金额: <span class="text-lg font-bold content">{{ repairData.order_price }}</span></div>
+      <div>订单号:<span class="text-lg font-bold content">{{ repairData.order_no }}</span></div>
+      <template #footer>
+        <el-button @click="repairVisible = false">取消</el-button>
+        <el-button type="primary" @click="repairChange">
+          确定
+        </el-button>
+      </template>
+    </el-dialog>
+    <el-dialog v-model="backConfigVisible" destroy-on-close draggable title="回传信息" width="30%">
+      <el-form ref="form" :model="backConfigData" label-width="80px">
+        <el-form-item label="请求信息">
+          <el-input type="textarea" v-model="backConfigData.report_param" :rows="6" disabled></el-input>
+        </el-form-item>
+        <el-form-item label="请求结果">
+          <el-input type="textarea" v-model="backConfigData.report_result" :rows="6" disabled></el-input>
+        </el-form-item>
+      </el-form>
+      <!-- <template #footer>
+        <el-button @click="backConfigVisible = false">取消</el-button>
+        <el-button type="primary" @click="backConfigVisible = false">
+          确定
+        </el-button>
+      </template> -->
+    </el-dialog>
+  </div>
+</template>
+
+<script lang="ts" setup>
+import { shortcuts } from '@/utils/shortcuts'
+import { useRouter, useRoute } from 'vue-router'
+import { InfoFilled } from '@element-plus/icons-vue';
+import { useGetList } from '@/hook/curd/useGetList';
+import { titleObj } from "./excelTitle"
+import { callbackJuliangAccountList, callbackJuliangAccountLogCallbackAgain } from '@/api/backConfig/index'
+const api = 'callback/juliangAccount/log/list';
+const router = useRouter()
+const route = useRoute()
+const { data, query, search, reset, loading } = useGetList(api);
+const repairVisible = ref(false)
+const repairData = ref({})
+const backConfigVisible = ref(false)
+const backConfigData = ref({})
+const current = ref({})
+const adNameOtion = ref([])
+
+const timeChange = (e: object, type: string) => {
+  console.log(e, type, 'timeChangetimeChangetimeChange');
+  if (query.value.userTime || query.value.orderTime) {
+    const timeArr = toRaw(e);
+    if (type == 'user') {
+      query.value.user_ranse_start_at_begin_time = timeArr[0]
+      query.value.user_ranse_start_at_end_time = timeArr[1]
+    } else if (type == 'order') {
+      query.value.order_created_at_begin_time = timeArr[0]
+      query.value.order_created_at_end_time = timeArr[1]
+    }
+  } else {
+    if (type == 'user') {
+      delete query.value.user_ranse_start_at_begin_time
+      delete query.value.user_ranse_start_at_end_time
+    } else if (type == 'order') {
+      delete query.value.order_created_at_begin_time
+      delete query.value.order_created_at_end_time
+    }
+  }
+}
+//补传
+const repairChange = () => {
+  callbackJuliangAccountLogCallbackAgain({ log_id: repairData.value.id }).then(res => {
+    console.log(res, 'callbackJuliangAccountLogCallbackAgain');
+    if (res.data == '补传失败') {
+      ElMessage.error(res.data)
+    } else if (res.data == '补传成功') {
+      ElMessage.success(res.data)
+    }
+  })
+}
+
+const remoteMethod = (query: string) => {
+  if (query) {
+    initAdNameOtion({ account_name: query })
+  } else {
+    initAdNameOtion()
+  }
+}
+
+const initAdNameOtion = (params?: object) => {
+  callbackJuliangAccountList({ limit: 30, ...params }).then(res => {
+    adNameOtion.value = res.data
+  })
+}
+
+const resetQuery = () => {
+  reset()
+}
+const openType = (type: string, data: object) => {
+  current.value = data;
+  switch (type) {
+    case 'repairVisible':
+      repairVisible.value = true
+      repairData.value = data
+      break;
+    case 'backConfigVisible':
+      backConfigVisible.value = true
+      backConfigData.value = data
+      break;
+  }
+}
+const tableData = computed(() => data.value?.data);
+
+onMounted(() => {
+  initAdNameOtion()
+  search();
+});
+</script>
+
+<style scoped lang="scss">
+.table-default {
+  .set-warpper {
+    height: 60px;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+  }
+
+  .wrapper {
+    margin: 8px;
+
+    .label {
+      margin-right: 6px;
+    }
+
+    .content {
+      font-size: 15px;
+    }
+  }
+}
+</style>

+ 18 - 23
src/views/promotion/promotionList/index.vue

@@ -22,8 +22,7 @@
             </template>
           </Search>
           <div class="table-default">
-            <el-table :data="tableData" class="mt-3" v-loading="loading" @selection-change="handleSelectionChange">
-              <el-table-column type="selection" />
+            <el-table :data="tableData" class="mt-3" v-loading="loading">
               <el-table-column prop="id" label="推广ID" />
               <el-table-column label="推广名称" show-overflow-tooltip>
                 <template #default="scope">
@@ -112,9 +111,10 @@
               <el-table-column label="操作">
                 <template #default="scope">
                   <el-button @click="openType('promotionVisible', scope.row)" link type="primary"
-                    size="small">编辑</el-button>
+                    v-action="'Promotion@Promotion@updateSeriesSequence'" size="small">编辑</el-button>
                   <br />
-                  <el-button link type="primary" size="small" @click="deletePromotion(scope.row)">删除</el-button>
+                  <el-button link type="primary" size="small" @click="deletePromotion(scope.row)"
+                    v-action="'Promotion@Promotion@delete'">删除</el-button>
                   <br />
                 </template>
               </el-table-column>
@@ -154,12 +154,13 @@
               <el-table-column label="操作">
                 <template #default="scope">
                   <el-button @click="openType('promotionVisible', scope.row)" link type="primary"
-                    size="small">编辑</el-button>
+                    v-action="'Promotion@Promotion@updateSeriesSequence'" size="small">编辑</el-button>
                   <br />
-                  <el-button link type="primary" size="small" @click="deletePromotion(scope.row)">删除</el-button>
+                  <el-button link type="primary" size="small" @click="deletePromotion(scope.row)"
+                    v-action="'Promotion@Promotion@delete'">删除</el-button>
                   <br />
-                  <el-button link type="primary" size="small"
-                    @click="openType('backConfigVisible', scope.row)">回传配置</el-button>
+                  <el-button link type="primary" size="small" @click="openType('backConfigVisible', scope.row)"
+                    v-action="'Promotion@Promotion@updateCallbackConfig'">回传配置</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -185,19 +186,12 @@ import { InfoFilled } from '@element-plus/icons-vue';
 import Create from './form/create.vue';
 import backConfig from './form/backConfig.vue';
 import { useGetList } from '@/hook/curd/useGetList';
-import { useDestroy } from '@/hook/curd/useDestroy';
-import { useOpen } from '@/hook/curd/useOpen';
-import { useUserStore } from '@/stores/modules/user/index'
-import Cache from '@/support/cache';
 const activeName = ref(1)
 import { tuiguangPromotionDel } from '@/api/promotion/index'
 const api = 'tuiguang/promotion/list';
-const multipleSelection = ref([]);
 const router = useRouter()
 const route = useRoute()
 const { data, query, search, reset, loading } = useGetList(api);
-const { deleted } = useDestroy();
-const uploadBooksVisible = ref(false)
 const promotionVisible = ref(false)
 const promotionData = ref({})
 const backConfigVisible = ref(false)
@@ -263,14 +257,8 @@ const openType = (type: string, data: object) => {
   }
 }
 const tableData = computed(() => data.value?.data);
-const { open, close, title, visible, id } = useOpen();
-
-const handleSelectionChange = (val: []) => {
-  console.log(toRaw(val));
-  multipleSelection.value = val;
-};
 
-const closeType = (type) => {
+const closeType = (type: string) => {
   console.log(type, 'typetype');
   switch (type) {
     case 'promotionVisible':
@@ -278,13 +266,20 @@ const closeType = (type) => {
       break;
     case 'backConfigVisible':
       backConfigVisible.value = false
+      ElMessageBox.alert('去复制推广链接', '配置完成', {
+        draggable: true,
+        confirmButtonText: '确认',
+        callback: (action: any) => {
+          router.push({ path: '/promotion/promotionList', query: { tab: 1 } })
+          activeName.value = 1
+        },
+      })
       break;
   }
   search()
 }
 
 onMounted(() => {
-  console.log(route, 'routerrouter', route.query);
   activeName.value = Number(route.query.tab || 1)
   query.value.is_config = activeName.value
   search();

+ 1 - 1
src/views/user/caster/create.vue

@@ -84,7 +84,7 @@ const rules = reactive({
   ],
   remark: [
     {
-      required: true,
+      required: false,
       message: '请输入备注',
       trigger: 'blur'
     }

+ 3 - 3
src/views/user/user/components/profile.vue

@@ -1,9 +1,9 @@
 <template>
   <el-form :model="profile" ref="form" v-loading="loading" label-position="top">
-    <Upload class="w-28 h-28 rounded-full mx-auto" action="upload/image" :show-file-list="false" name="image" :on-success="uploadAvatar">
-      <img :src="profile.avatar" class="h-28 rounded-full" v-if="profile.avatar" />
+    <!-- <Upload class="mx-auto rounded-full w-28 h-28" action="upload/image" :show-file-list="false" name="image" :on-success="uploadAvatar">
+      <img :src="profile.avatar" class="rounded-full h-28" v-if="profile.avatar" />
       <Icon name="plus" v-else />
-    </Upload>
+    </Upload> -->
     <el-form-item label="昵称" prop="username" class="mt-2" :rules="[
         {
           required: true,

+ 2 - 2
src/views/user/user/index.vue

@@ -19,11 +19,11 @@
         <Operate :show="open" />
         <el-table :data="tableData" class="mt-3" v-loading="loading">
           <el-table-column prop="username" label="用户名" width="150" />
-          <el-table-column prop="avatar" label="头像">
+          <!-- <el-table-column prop="avatar" label="头像">
             <template #default="scope">
               <el-avatar :src="scope.row.avatar" />
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column prop="email" label="邮箱" />
           <el-table-column prop="status" label="状态">
             <template #default="scope">

+ 2 - 1
src/views/videoManage/detail.vue

@@ -13,7 +13,8 @@
         <el-table-column label="操作" width="200">
           <template #default="scope">
             <el-button link type="primary" size="small" @click="play(scope.row)">播放</el-button>
-            <el-button link type="primary" size="small" @click="createLink(scope.row)">创建推广链接</el-button>
+            <el-button link type="primary" size="small" @click="createLink(scope.row)"
+              v-action="'Promotion@Promotion@add'">创建推广链接</el-button>
           </template>
         </el-table-column>
       </el-table>

+ 1 - 1
src/views/videoManage/index.vue

@@ -102,7 +102,7 @@
             <el-button link type="primary" size="small" @click="openType('videoDLVisible', scope.row)"
               v-action="'video.episode.downloadList'">视频下载</el-button>
             <br />
-            <el-button link type="primary" size="small" v-if="isShowCreatePromotion"
+            <el-button link type="primary" size="small" v-if="isShowCreatePromotion" v-action="'Promotion@Promotion@add'"
               @click="openType('videoDetailVisible', scope.row)">生成推广链接</el-button>
           </template>
         </el-table-column>