szx vor 3 Jahren
Ursprung
Commit
cfd70032c6

+ 65 - 7
src/api/index.ts

@@ -4,6 +4,7 @@ import axios from "./config";
 // NOTE: 暂时使用ts-ignore忽略module not exported的问题
 // @ts-ignore
 import {
+  ILogitem,
   IUser,
   IList,
   IDeliveryBook,
@@ -24,8 +25,10 @@ import {
   IUserAdmin,
   AccountPlanConfig,
   IGZHItem,
+  OListItem,
   IDomainItem,
   IPBookItem,
+  
 } from "#/api";
 
 /**
@@ -87,6 +90,9 @@ export const getAdPushList = (
   return axios("/ad/userAdAdvertisers", { params: query });
 };
 
+
+
+
 /**
  * 获取公众号列表
  * @param query
@@ -98,11 +104,63 @@ export const getOfficialAccounts = (query: {
   report_module: any;
   report_status: any;
   report_platform?: string;
-  
+
 }): AxiosPromise<IList<IOfficials>> => {
   return axios("/userOfficialAccounts", { params: query });
 };
 
+
+//橙子列表的获取
+export const getOrangeProductListApi =(query:{app_name:string}):AxiosPromise<IList<OListItem>>=>{
+  return axios("/yuewenfx/getProductList",{params:query})
+}
+//橙子建站回传配置
+export const upDateReportConfigApi =(query:{
+  appflag:string,
+  rate:string,
+  condition:string,
+})=>{
+  return axios("/yuewenfx/updateReportConfig",{params:query})
+}
+//橙子建站回传日志
+
+export const getOrangeLogListApi =(query:{
+  guid?:string,
+  start_time?:string,
+  end_time?:string,
+  appflag:string,
+}): AxiosPromise<IList<ILogitem>>=>{
+  return axios("/yuewenfx/getYueWenFxReportLogList",{params:query})
+}
+// export const addDeliveryBook = (data: {
+//   delivery_bid: string | number;
+//   official_id: string | number;
+//   platform: string;
+// }) => {
+//   return axios.post("/addDeliveryBook", data);
+// };
+//橙子建站强制回传
+export const getforceReportApi =(data:{
+  guid:string,
+  paltform:string,
+  reportType:string
+
+})=>{
+  return axios.post("/yuewenfx/forceReport",data)
+}
+
+
+
+
+export const getOfficialOrangeApi = (query:{
+   appflag:string,
+   rate:string,
+   condition:string
+})=>{
+  return axios("api/yuewenfx/getProductList",{params:query})
+}
+
+
 /**
  * 获取公众号列表
  * @param query
@@ -315,7 +373,7 @@ export const setMustUpback = (data: {
   uid: string | number;
   platform: string;
   report_type: string;
-  report_platform?:string;
+  report_platform?: string;
 }) => {
   return axios.post("/forceReport", data);
 };
@@ -406,7 +464,7 @@ export const getCoustomClomuns = (): any => {
 export const setChannelRate = (data: {
   rate: string | number;
   channel_id: string;
-  report_platform?:string
+  report_platform?: string
 }) => {
   return axios.post("/setChannelConfig", data);
 };
@@ -490,7 +548,7 @@ export const getOfficialBackConfig = (
   channel_id: number,
   report_platform?: string,
 ): AxiosPromise<AccountPlanConfig> => {
-  return axios("/channel/reportConfig", { params: { channel_id,report_platform } });
+  return axios("/channel/reportConfig", { params: { channel_id, report_platform } });
 };
 
 // 保存公众号回传配置
@@ -849,7 +907,7 @@ export const deleteImage = (
 /**
  * 上传视频
  * @data
- */  
+ */
 export const uploadVideo = (data: {
   video: any,
   is_public: number | string,
@@ -1085,7 +1143,7 @@ export const createCustomCreative = (
  * 
  * @param
  */
- export const  getVideoLog = (
+export const getVideoLog = (
   query: {
     page?: string | number,
   }
@@ -1101,7 +1159,7 @@ export const createCustomCreative = (
  * @param budget_mode
  * @returns
  */
- export const backLogList = (
+export const backLogList = (
   query: Partial<{
     channel_id: string;
     platform: string;

+ 0 - 1
src/components/drawer-wrapper/index.vue

@@ -76,6 +76,5 @@ const DrawerWrapper = defineComponent({
     return { visible, tablePageOptions, onPageChange };
   },
 });
-
 export default DrawerWrapper;
 </script>

+ 22 - 24
src/components/edit-cell/index.vue

@@ -10,9 +10,7 @@
         @search="changeBtn"
       >
         <template #enterButton>
-          <a-button>
-            {{customTitle}}
-          </a-button>
+          <a-button>{{customTitle}}</a-button>
         </template>
       </a-input-search>
       <check-outlined class="editable-cell-icon-check" @click="check" />
@@ -28,7 +26,7 @@
 import {
   CheckOutlined,
   EditOutlined,
-  ExclamationCircleOutlined,
+  ExclamationCircleOutlined
 } from "@ant-design/icons-vue";
 import { Modal } from "ant-design-vue";
 import {
@@ -37,39 +35,39 @@ import {
   ref,
   watch,
   watchEffect,
-  createVNode,
+  createVNode
 } from "vue";
 const EditableCell = defineComponent({
   props: {
     text: String,
-    customTitle:String,
+    customTitle: String,
     onChange: Function,
     title: String,
     minValue: {
       type: Number,
-      default: 0,
+      default: 0
     },
-    maxValue:{
+    maxValue: {
       type: Number,
-      default: 0,
+      default: 0
     },
-    customValue:String,
+    customValue: String,
     muliteType: {
       type: Boolean,
-      default: false,
-    },
+      default: false
+    }
   },
   components: {
     CheckOutlined,
     EditOutlined,
-    ExclamationCircleOutlined,
+    ExclamationCircleOutlined
   },
   data() {
     return {
       value: this.text,
       editable: false,
       titles: this.title,
-      preValue: this.text,
+      preValue: this.text
     };
   },
   methods: {
@@ -78,25 +76,25 @@ const EditableCell = defineComponent({
       this.value = value;
     },
     changeBtn() {
-      this.value = this.customValue??'';
+      this.value = this.customValue ?? "";
     },
     check() {
       let _self = this;
-      if (this.value == undefined || this.value == null || this.value =='') {
+      if (this.value == undefined || this.value == null || this.value == "") {
         this.$message.error("请输入值");
         return;
       }
       if (this.minValue && this.value != this.customValue) {
-        if (this.minValue > Number(this.value)){
+        if (this.minValue > Number(this.value)) {
           this.$message.error(`最小值必须是${this.minValue}`);
           return;
-        } 
+        }
       }
       if (this.maxValue && this.value != this.customValue) {
-        if (this.maxValue < Number(this.value)){
+        if (this.maxValue < Number(this.value)) {
           this.$message.error(`最大值必须是${this.maxValue}`);
           return;
-        } 
+        }
       }
       Modal.confirm({
         title: `修改${this.titles}`,
@@ -111,13 +109,13 @@ const EditableCell = defineComponent({
           _self.editable = false;
           _self.value = _self.preValue;
           _self.$message.success("你取消了修改");
-        },
+        }
       });
     },
     edit() {
       this.editable = true;
-    },
-  },
+    }
+  }
 });
 
 export default EditableCell;
@@ -144,7 +142,7 @@ export default EditableCell;
     position: absolute;
     right: 0;
     width: 20px;
-    top:5px;
+    top: 5px;
     cursor: pointer;
   }
 

+ 9 - 0
src/components/orange-drawer/index.vue

@@ -0,0 +1,9 @@
+<template>
+    <div>
+      
+    </div>
+</template>
+<script lang="ts">
+import{} from  '@/components/tool-bar/index.vue'
+
+</script>

+ 11 - 1
src/router/async.ts

@@ -26,6 +26,15 @@ export const KuaiShou: RouteConfig = {
   },
   component: () => import("@/views/account/kuaishou.vue")
 };
+//橙子建站
+export const Orange: RouteConfig = {
+  name: "Orange",
+  path: "/orange",
+  meta: {
+    title: "橙子建站"
+  },
+  component: () => import("@/views/account/orange.vue")
+};
 
 export const BackManager: RouteConfig = {
   name: "BackManager",
@@ -38,7 +47,8 @@ export const BackManager: RouteConfig = {
   children: [
     AccountManager,
     QuickApp,
-    KuaiShou
+    KuaiShou,
+    Orange
   ]
 };
 

+ 1 - 1
src/store/modules/app/mutations.ts

@@ -26,7 +26,7 @@ const mutations: MutationTree<State> & Mutations = {
     if (!state.platforms.length) state.platforms = platforms;
   },
   [MutationType.setTemStepOne](state, setTemStepOne) {
-     state.setTemStepOne = setTemStepOne;
+    state.setTemStepOne = setTemStepOne;
   },
 };
 

+ 84 - 6
src/views/_pageOptions/table-account.ts

@@ -1,3 +1,5 @@
+import { right } from "@antv/g2plot/lib/plots/sankey/sankey";
+
 /*
  * @Author: your name
  * @Date: 2021-04-28 09:14:49
@@ -12,11 +14,11 @@ export const TableColumnOfAccount = [
     dataIndex: "account_name",
     ellipsis: true,
   },
-  {
-    title: "公众号appid",
-    dataIndex: "app_id",
-    ellipsis: true,
-  },
+  // {
+  //   title: "公众号appid",
+  //   dataIndex: "app_id",
+  //   ellipsis: true,
+  // },
   {
     title: "平台",
     dataIndex: "platform",
@@ -105,7 +107,6 @@ export const TableColumnOfLog = [
     title: "回传状态",
     width: 140,
     dataIndex: "report_status",
-    
   },
   {
     title: "操作",
@@ -116,3 +117,80 @@ export const TableColumnOfLog = [
     },
   },
 ];
+export const TableColumnOfOrange = [
+  {
+    title: "公众号名称",
+    dataIndex: "app_name",
+    ellipsis: true,
+  },
+  {
+    title: "所属平台",
+    dataIndex: "platform",
+    ellipsis: true,
+  },
+  {
+    title: "回传比例",
+    dataIndex: "rate",
+    ellipsis: true,
+  },
+  {
+    title: "操作",
+    dataIndex: "action",
+    width: 250,
+    slots: { customRender: "operation" },
+  },
+];
+
+export const TableColumnLogOfOrange = [
+  {
+    title: "订单编号",
+    dataIndex: "order_no",
+    ellipsis: true,
+    width: 200,
+  },
+  {
+    title: "uid",
+    dataIndex: "guid",
+    ellipsis: true,
+    width: 150,
+  },
+  {
+    title: "计划平台",
+    dataIndex: "platform",
+    ellipsis: true,
+
+  },
+  {
+    title: "注册时间",
+    dataIndex: "register_time",
+  },
+  {
+    title: "充值时间",
+    dataIndex: "pay_time",
+  },
+  {
+    title: "充值金额",
+    dataIndex: "pay_amount",
+  },
+  {
+    title: "回传状态",
+    dataIndex: "report_status",
+  },
+  {
+    title: "备注",
+    dataIndex: "reason",
+  },
+  {
+    title: "回传百分比(%)",
+    dataIndex: "back_percentage",
+  },
+  {
+    title: "回传配置百分比(%)",
+    dataIndex: "config_back_percentage",
+  },
+  {
+    title: "操作",
+    dataIndex: "action",
+    slots: { customRender: "report_status" },
+  },
+];

+ 0 - 1
src/views/_pageOptions/table_financial.ts

@@ -69,5 +69,4 @@ export const TableColumnOfFinancial = [
     sorter: true,
     sortDirections: ['descend', 'ascend', false],
   },
-
 ];

+ 13 - 33
src/views/account/account.vue

@@ -17,7 +17,7 @@
             >{{ platform.label }}</a-select-option
           >
         </a-select>
-      </div> -->
+      </div>-->
       <!-- <div class="tool-bar-item">
         <p class="label">回传状态</p>
         <a-select class="full-width" v-model:value="query.report_status">
@@ -25,14 +25,12 @@
           <a-select-option :key="1" :value="1">开启</a-select-option>
           <a-select-option :key="0" :value="0">关闭</a-select-option>
         </a-select>
-      </div> -->
+      </div>-->
       <div class="tool-bar-item">
         <p class="label">回传方式</p>
         <a-select class="full-width" v-model:value="query.report_module">
           <a-select-option key="all" :value="''">全部</a-select-option>
-          <a-select-option key="channel" value="channel"
-            >按站点回传</a-select-option
-          >
+          <a-select-option key="channel" value="channel">按站点回传</a-select-option>
           <a-select-option key="ad" value="ad">按计划回传</a-select-option>
         </a-select>
       </div>
@@ -55,7 +53,7 @@
           :minValue="1"
           @change="(val) => onCellChange(record, 'rate', val)"
         />
-      </template> -->
+      </template>-->
       <template #module="{ record }">
         <p>{{ moduleType[record.report_module] }}</p>
       </template>
@@ -67,9 +65,7 @@
         <p>止:{{ record.end_time }}</p>
       </template>
       <template #action="{ record }">
-        <a-button type="primary" @click="initBackData(record)">
-          回传配置
-        </a-button>
+        <a-button type="primary" @click="initBackData(record)">回传配置</a-button>
       </template>
       <!-- <template #operte="{ text, record }">
         <p
@@ -78,15 +74,10 @@
         >
           <a>复制监测链接</a>
         </p>
-      </template> -->
+      </template>-->
     </a-table>
     <!-- 站点回传配置drawer -->
-    <a-drawer
-      v-model:visible="visible"
-      title="回传配置"
-      width="40%"
-      class="drawer-back-config"
-    >
+    <a-drawer v-model:visible="visible" title="回传配置" width="40%" class="drawer-back-config">
       <div class="wrap-box">
         <p class="title">回传方式</p>
         <a-radio-group
@@ -105,18 +96,14 @@
             <a-input-number v-model:value="ad_config.rate" />
           </a-form-item>
           <a-form-item :wrapper-col="{ offset: 7 }">
-            <a-button type="primary" @click="onRateChange"> 保存 </a-button>
+            <a-button type="primary" @click="onRateChange">保存</a-button>
           </a-form-item>
         </a-form>
       </div>
       <div class="wrap-box" v-show="showConfig">
         <p class="title">按站点回传配置</p>
         <a-tabs size="small" @change="onTabChange">
-          <a-tab-pane
-            v-for="(d, i) in popForm"
-            :key="i"
-            :tab="d.desc"
-          ></a-tab-pane>
+          <a-tab-pane v-for="(d, i) in popForm" :key="i" :tab="d.desc"></a-tab-pane>
         </a-tabs>
         <a-form :label-col="{ span: 6 }" :wrapper-col="{ offset: 1, span: 11 }">
           <a-form-item label="回传条件">
@@ -129,9 +116,7 @@
                 :value="item.name"
                 v-for="item in popForm[currentTab].report_conditions"
                 :key="item.name"
-              >
-                {{ item.desc }}
-              </a-select-option>
+              >{{ item.desc }}</a-select-option>
             </a-select>
           </a-form-item>
           <a-form-item label="回传开关">
@@ -164,10 +149,7 @@
               style="width: 150px"
             />
           </a-form-item>
-          <a-form-item
-            label="回传付费最低金额"
-            v-if="popForm[currentTab].report_type === 'recharge'"
-          >
+          <a-form-item label="回传付费最低金额" v-if="popForm[currentTab].report_type === 'recharge'">
             <a-input
               v-model:value="popForm[currentTab].price"
               size="small"
@@ -197,9 +179,7 @@
               :loading="saving"
               type="primary"
               @click="onSaveConfig"
-            >
-              保存
-            </a-button>
+            >保存</a-button>
           </a-form-item>
         </a-form>
       </div>
@@ -334,7 +314,7 @@ const Account = defineComponent({
         state.popForm = list;
         state.visible = true;
       } catch (error) {
-        console.log("error happened in get back plan data:", error.message);
+        console.log("error happened in get back plan data:");
       }
     };
 

+ 106 - 75
src/views/account/kuaishou.vue

@@ -7,32 +7,11 @@
       @confirm="onSearch"
       @cancel="onCancel"
     >
-      <!-- <div class="tool-bar-item">
-        <p class="label">小说平台</p>
-        <a-select class="full-width" v-model:value="query.platform">
-          <a-select-option
-            v-for="platform in platforms"
-            :key="platform.value"
-            :value="platform.value"
-            >{{ platform.label }}</a-select-option
-          >
-        </a-select>
-      </div> -->
-      <!-- <div class="tool-bar-item">
-        <p class="label">回传状态</p>
-        <a-select class="full-width" v-model:value="query.report_status">
-          <a-select-option :key="-1" :value="-1">全部</a-select-option>
-          <a-select-option :key="1" :value="1">开启</a-select-option>
-          <a-select-option :key="0" :value="0">关闭</a-select-option>
-        </a-select>
-      </div> -->
       <div class="tool-bar-item">
         <p class="label">回传方式</p>
         <a-select class="full-width" v-model:value="query.report_module">
           <a-select-option key="all" :value="''">全部</a-select-option>
-          <a-select-option key="channel" value="channel"
-            >按站点回传</a-select-option
-          >
+          <a-select-option key="channel" value="channel">按站点回传</a-select-option>
           <a-select-option key="ad" value="ad">按计划回传</a-select-option>
         </a-select>
       </div>
@@ -55,7 +34,7 @@
           :minValue="1"
           @change="(val) => onCellChange(record, 'rate', val)"
         />
-      </template> -->
+      </template>-->
       <template #module="{ record }">
         <p>{{ moduleType[record.report_module] }}</p>
       </template>
@@ -67,12 +46,8 @@
         <p>止:{{ record.end_time }}</p>
       </template>
       <template #action="{ record }">
-        <a-button type="primary" @click="initBackData(record)">
-          回传配置
-        </a-button>
-        <a-button style="margin-left: 5px" @click="getLogs(record)">
-          操作日志
-        </a-button>
+        <a-button type="primary" @click="initBackData(record)">回传配置</a-button>
+        <a-button style="margin-left: 5px" @click="getLogs(record)">操作日志</a-button>
       </template>
       <!-- <template #operte="{ text, record }">
         <p
@@ -81,16 +56,27 @@
         >
           <a>复制监测链接</a>
         </p>
-      </template> -->
+      </template>-->
     </a-table>
     <!-- 站点回传配置drawer -->
-    <a-drawer
-      v-model:visible="visible"
-      title="回传配置"
-      width="40%"
-      class="drawer-back-config"
-    >
-      <div class="wrap-box">
+    <a-drawer v-model:visible="visible" title="回传配置" width="40%" class="drawer-back-config">
+      <a-form :layout="formState.layout" :model="formState" v-bind="formItemLayout">
+        <a-form-item label=" 回传条件">
+          <a-select v-model:value="formState.condition" placeholder="请选择">
+            <a-select-option value="当日金额不少于30元">当日金额不少于30元</a-select-option>
+            <a-select-option value="充值金额不小于30元">充值金额不小于30元</a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item label="回传比例">
+          <a-input addon-after="%" v-model:value="formState.rate" placeholder="请输入回传比例" />
+        </a-form-item>
+        <a-form-item :wrapper-col="buttonItemLayout.wrapperCol">
+          <a-button type="primary" @click="kuaishouFormSubmit">确定</a-button>
+          <span style="padding:20px;"></span>
+          <a-button type="primary" @click="kuaishouFormCanel">取消</a-button>
+        </a-form-item>
+      </a-form>
+      <!-- <div class="wrap-box">
         <p class="title">回传方式</p>
         <a-radio-group
           v-model:value="report_module"
@@ -205,17 +191,17 @@
             </a-button>
           </a-form-item>
         </a-form>
-      </div>
+      </div>-->
     </a-drawer>
     <!--回传日志-->
-    <a-drawer title="日志详情"
+    <a-drawer
+      title="日志详情"
       placement="right"
       :closable="true"
       width="80%"
-      v-model:visible="visibleLog">
-      <log-list :visible="visibleLog" :channel_id="curChannel_id">
-
-      </log-list>
+      v-model:visible="visibleLog"
+    >
+      <log-list :visible="visibleLog" :channel_id="curChannel_id"></log-list>
     </a-drawer>
   </div>
 </template>
@@ -229,6 +215,7 @@ import {
   reactive,
   ref,
   toRefs,
+  UnwrapRef
 } from "vue";
 import EditableCell from "@/components/edit-cell/index.vue";
 import ToolBar from "@/components/tool-bar/index.vue";
@@ -248,7 +235,11 @@ import {
   setOfficialBackConfig,
   onUpdateOfficialReportType,
 } from "../../api/index";
-
+interface FormState {
+  layout: "horizontal" | "vertical" | "inline";
+  condition: string;
+  rate: string;
+}
 const Account = defineComponent({
   components: {
     ToolBar,
@@ -260,6 +251,7 @@ const Account = defineComponent({
     let { loading, meta, tablePageOptions } = usePagination();
     const { store } = useApp();
     const state = reactive({
+      kuaishouRate:"",
       platforms: computed(() => store.getters.platforms),
       list: ref<IOfficials[]>([]),
       columns: TableColumnOfAccount,
@@ -297,11 +289,15 @@ const Account = defineComponent({
       showConfig: false,
       visible: false,
       saving: false,
-      visibleLog:false,
-      curChannel_id:0,
+      visibleLog: false,
+      curChannel_id: 0,
       currentTab: 0,
     });
-
+    const formState: UnwrapRef<FormState> = reactive({
+      layout: "horizontal",
+      rate: "100",
+      condition: "",
+    });
     const onSearch = (fields: Record<string, string>) => {
       const { name } = fields;
       state.query.official_name = name;
@@ -330,29 +326,37 @@ const Account = defineComponent({
 
     onMounted(onLoadOfficials);
 
-    const initBackData = async (item: IOfficials) => {
-      try {
-        const { data } = await getOfficialBackConfig(item.channel_id,'kuaishou');
-        state.ad_config.channel_id = data.ad_config.channel_id;
-        state.ad_config.id = data.ad_config.id;
-        state.ad_config.rate = data.ad_config.rate;
-        state.report_module = data.report_module;
-        state.showConfig = data.report_module == "ad" ? false : true;
-        state.report_channel_id = +data.channel_id;
-        let list = data.channel_configs.map((r: PlanBack) => {
-          r.price = r.extra?.price;
-          r.float_rate = r.extra?.float_rate;
-          r.back_on = !!Number(r.back_on);
-          return r;
-        });
-        list.length > 0
-          ? (state.hasPopFormData = true)
-          : (state.hasPopFormData = false);
-        state.popForm = list;
-        state.visible = true;
-      } catch (error) {
-        console.log("error happened in get back plan data:", error.message);
-      }
+    const initBackData = async (item: any) => {
+      console.log(item)
+      formState.rate=item.rate
+      state.visible = true;
+
+
+
+
+
+      // try {
+      //   const { data } = await getOfficialBackConfig(item.channel_id,'kuaishou');
+      //   state.ad_config.channel_id = data.ad_config.channel_id;
+      //   state.ad_config.id = data.ad_config.id;
+      //   state.ad_config.rate = data.ad_config.rate;
+      //   state.report_module = data.report_module;
+      //   state.showConfig = data.report_module == "ad" ? false : true;
+      //   state.report_channel_id = +data.channel_id;
+      //   let list = data.channel_configs.map((r: PlanBack) => {
+      //     r.price = r.extra?.price;
+      //     r.float_rate = r.extra?.float_rate;
+      //     r.back_on = !!Number(r.back_on);
+      //     return r;
+      //   });
+      //   list.length > 0
+      //     ? (state.hasPopFormData = true)
+      //     : (state.hasPopFormData = false);
+      //   state.popForm = list;
+
+      // } catch (error) {
+      //   console.log("error happened in get back plan data:", error.message);
+      // }
     };
 
     const onTabChange = (key: number) => {
@@ -361,7 +365,7 @@ const Account = defineComponent({
 
     const onRateChange = () => {
       const { rate, channel_id } = state.ad_config;
-      setChannelRate({ rate, channel_id,report_platform:'kuaishou' }).then((res) => {
+      setChannelRate({ rate, channel_id, report_platform: 'kuaishou' }).then((res) => {
         onLoadOfficials();
         message.success("修改回传比例成功!");
         state.visible = false;
@@ -379,6 +383,23 @@ const Account = defineComponent({
       });
     };
 
+    const formItemLayout = computed(() => {
+      const { layout } = formState;
+      return layout === "horizontal"
+        ? {
+          labelCol: { span: 4 },
+          wrapperCol: { span: 14 },
+        }
+        : {};
+    });
+    const buttonItemLayout = computed(() => {
+      const { layout } = formState;
+      return layout === "horizontal"
+        ? {
+          wrapperCol: { span: 14, offset: 4 },
+        }
+        : {};
+    });
     const onSaveConfig = () => {
       let { id, back_on, rate, condition, price, float_rate } =
         state.popForm[state.currentTab];
@@ -396,7 +417,7 @@ const Account = defineComponent({
         condition,
         price,
         float_rate,
-        report_platform:'kuaishou'
+        report_platform: 'kuaishou'
       };
 
       setOfficialBackConfig(data)
@@ -412,7 +433,12 @@ const Account = defineComponent({
           state.saving = false;
         });
     };
+    const kuaishouFormSubmit = () => {
 
+    }
+    const kuaishouFormCanel=()=>{
+           state.visible = false;
+    }
     return {
       ...toRefs(state),
       loading,
@@ -425,6 +451,11 @@ const Account = defineComponent({
       onRateChange,
       onSaveConfig,
       onReportModuleChange,
+      formState,
+      formItemLayout,
+      buttonItemLayout,
+      kuaishouFormSubmit,
+      kuaishouFormCanel
     };
   },
   methods: {
@@ -438,9 +469,9 @@ const Account = defineComponent({
         }
       );
     },
-    getLogs(record:any){
-        this.curChannel_id = record.channel_id;
-        this.visibleLog = true;
+    getLogs(record: any) {
+      this.curChannel_id = record.channel_id;
+      this.visibleLog = true;
     },
   },
 });

+ 12 - 24
src/views/account/log.vue

@@ -1,12 +1,6 @@
 <template>
   <div>
-    <tool-bar
-      :text="['uid']"
-      :label="['uid']"
-      v-model:loading="searching"
-      @confirm="onSearch"
-      @cancel="onCancel"
-    >
+    <tool-bar :text="['uid']" :label="['uid']" v-model:loading="inSearching" @confirm="onSearch">
       <template #picker>
         <p class="label">充值日期</p>
         <a-range-picker
@@ -27,15 +21,8 @@
       :pagination="tablePageOptions"
     >
       <template #report_status="{ text, record }">
-        <p v-if="record.report_status == 'success'">
-          已上报
-        </p>
-        <a-popconfirm
-          title="是否要继续强制回传?"
-          ok-text="是"
-          cancel-text="否"
-          @confirm="confirmEdit(record)"
-        >
+        <p v-if="record.report_status == 'success'">已上报</p>
+        <a-popconfirm title="是否要继续强制回传?" ok-text="是" cancel-text="否" @confirm="confirmEdit(record)">
           <p v-if="record.report_status != 'success'">
             <a>强制回传</a>
           </p>
@@ -47,7 +34,7 @@
 
 <script lang="ts">
 import usePagination from "@/hooks/usePagination";
-import PreviewBox from "./preview.vue";
+
 import { defineComponent, reactive, toRefs, ref, watch, computed } from "vue";
 import { TableColumnOfLog } from "@/views/_pageOptions/table-account";
 import { message } from "ant-design-vue";
@@ -72,16 +59,16 @@ const CommonTable = defineComponent({
       curPage: ref(1),
       inSearching: false,
       fields: ref({
-        date:''
+        date: ''
       }),
       defaultToolvalue: {},
       rangePick: picker,
       pickered: computed(() =>
         store.getters.selectTime.length > 0
           ? [
-              moment(store.getters.selectTime[0]),
-              moment(store.getters.selectTime[1]),
-            ]
+            moment(store.getters.selectTime[0]),
+            moment(store.getters.selectTime[1]),
+          ]
           : [moment().subtract(30, "d"), moment()]
       ),
     });
@@ -140,7 +127,7 @@ const CommonTable = defineComponent({
         store.commit(MutationType.setSelectTime, string);
       }
     };
-    
+
     return {
       ...toRefs(state),
       tablePageOptions,
@@ -150,9 +137,10 @@ const CommonTable = defineComponent({
       changeTime
     };
   },
-  mounted() {},
+  mounted() { },
 });
 
 export default CommonTable;
 </script>
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+</style>

+ 154 - 0
src/views/account/orange.vue

@@ -0,0 +1,154 @@
+<template>
+    <div class="page-wrap page-wrap-account">
+        <tool-bar
+            :text="['name']"
+            :label="['公众号名称']"
+            v-model:loading="searching"
+            @confirm="onSearch"
+            @cancel="onCancel"
+        ></tool-bar>
+        <a-table bordered :data-source="list" :columns="columns">
+            <template #operation="{ record }">
+                <a-button type="primary" @click="showDrawerMactch(record)">回传配置</a-button>
+                <span style="padding:10px"></span>
+                <a-button type="primary" @click="showDrawerLog(record)">回传日志</a-button>
+            </template>
+        </a-table>
+
+        <!-- 回传配置 -->
+
+        <a-drawer
+            title="回传配置"
+            placement="right"
+            :closable="true"
+            width="50%"
+            v-model:visible="visibleMatchLog"
+        >
+            <OrangeForm :formrate="formrate" @getShowFlag="getOrangeShowFlag"/>
+        </a-drawer>
+
+        <a-drawer
+            title="日志详情"
+            placement="right"
+            :closable="true"
+            width="80%"
+            v-model:visible="visibleLog"
+        >
+            <orange-log :Logappflag="Logappflag"></orange-log>
+        </a-drawer>
+    </div>
+</template>
+
+<script lang="ts">
+import usePagination from "@/hooks/usePagination";
+import { OListItem } from "#/api";
+import { TableColumnOfOrange } from "@/views/_pageOptions/table-account";
+import { defineComponent, onMounted, reactive, Ref, ref, toRefs } from "vue";
+import ToolBar from "@/components/tool-bar/index.vue";
+import OrangeForm from "./orangeform.vue";
+import {
+    //获取列表
+    getOrangeLogListApi,
+    getOrangeProductListApi,
+} from "@/api";
+import OrangeLog from "./orangelog.vue";
+
+export default defineComponent({
+    components: {
+        ToolBar,
+        OrangeLog,
+        OrangeForm,
+    },
+    setup() {
+        const state = reactive({
+            list: ref<OListItem[]>([]),
+            searching: false,
+            query: {
+                account_name: "",
+                platform: "",
+                page: 1,
+                report_module: "",
+            },
+            listlog: {
+                guid: "",
+                start_state: "",
+                end_time: "",
+                appflag: "",
+                platform: "",
+                report_platform: "",
+            },
+            appflag: "",
+            Logappflag: "",
+            formrate: "",
+            columns: TableColumnOfOrange,
+            visibleLog: false,
+            visibleMatchLog: false,
+        });
+        let { meta } = usePagination();
+        //回传日志抽屉层
+        //回传配置抽屉层
+
+        //日志
+        const showDrawerLog = async (match: OListItem) => {
+            state.visibleLog = true;
+            state.Logappflag = match.appflag;
+        };
+
+        //点击弹出回传配置
+        const showDrawerMactch = (match: OListItem) => {
+            state.visibleMatchLog = true;
+            state.appflag = match.appflag;
+            state.formrate = match.rate.toString();
+            localStorage.setItem("OrangeAppflag", state.appflag);
+        };
+
+        const initOrangedata = async () => {
+            let params = {
+                app_name: "",
+            };
+            const data = await getOrangeProductListApi(params);
+            state.list = data.data.list;
+        };
+        onMounted(() => {
+            initOrangedata();
+            console.log(1);
+        });
+
+        //搜索传入的值
+        const onLoadOfficials = (name: string) => {
+            let params = JSON.parse(JSON.stringify(state.query));
+            params.app_name = name;
+            getOrangeProductListApi(params).then(({ data }) => {
+                console.log(data);
+                meta.value = data.meta;
+                state.list = data.list;
+                state.searching = false;
+            });
+        };
+
+        //搜索按钮
+        const onSearch = (fields: Record<string, string>) => {
+            const name = fields.name;
+            //在此处发送搜索请求
+            onLoadOfficials(name);
+        };
+        //取消按钮
+        const onCancel = () => {
+            state.query.report_module = "";
+            onSearch({ name: "" });
+        };
+        const getOrangeShowFlag = (value:boolean) => {
+            console.log(value)
+            state.visibleMatchLog=!value
+        }
+        return {
+            ...toRefs(state),
+            onSearch,
+            onCancel,
+            showDrawerLog,
+            showDrawerMactch, 
+            getOrangeShowFlag
+        };
+    },
+});
+</script>

+ 121 - 0
src/views/account/orangeform.vue

@@ -0,0 +1,121 @@
+<template>
+    <div>
+        <a-form :layout="formState.layout" :model="formState" v-bind="formItemLayout">
+            <a-form-item label=" 回传条件">
+                <a-select v-model:value="formState.condition" placeholder="请选择">
+                    <a-select-option value="注册且充值金额不小于30元">注册且充值金额不小于30元</a-select-option>
+                    <a-select-option value="充值金额不小于30元">充值金额不小于30元</a-select-option>
+                </a-select>
+            </a-form-item>
+            <a-form-item label="回传比例">
+                <a-input addon-after="%" v-model:value="formState.rate" placeholder="请输入回传比例" />
+            </a-form-item>
+            <a-form-item :wrapper-col="buttonItemLayout.wrapperCol">
+                <a-button type="primary" @click="submit">确定</a-button>
+                <span style="padding:20px;"></span>
+                <a-button type="primary" @click="cancel">取消</a-button>
+            </a-form-item>
+        </a-form>
+    </div>
+</template>
+<script lang="ts">
+import {
+    computed,
+    defineComponent,
+    reactive,
+    UnwrapRef,
+    toRefs,
+    onMounted,
+    ref,
+    watch,
+} from "vue";
+import { upDateReportConfigApi } from "@/api";
+import { message } from "ant-design-vue";
+interface FormState {
+    layout: "horizontal" | "vertical" | "inline";
+    condition: string;
+    rate: string;
+}
+interface OrangeForm {
+    value: string;
+    reportresult: {
+        appflag: string;
+        rate: string;
+        condition: string;
+    };
+}
+export default defineComponent({
+    props: {
+        formrate: String || undefined,
+    },
+    emits: ["getShowFlag"],
+    setup(props, ctx) {
+        const state: OrangeForm = reactive({
+            value: "",
+            reportresult: {
+                appflag: "",
+                rate: "",
+                condition: "",
+            },
+        });
+        const showFlag = reactive({
+            showflag: true
+        })
+        const formState: UnwrapRef<FormState> = reactive({
+            layout: "horizontal",
+            rate: "100",
+            condition: "",
+        });
+
+        const formItemLayout = computed(() => {
+            const { layout } = formState;
+            return layout === "horizontal"
+                ? {
+                    labelCol: { span: 4 },
+                    wrapperCol: { span: 14 },
+                }
+                : {};
+        });
+        const buttonItemLayout = computed(() => {
+            const { layout } = formState;
+            return layout === "horizontal"
+                ? {
+                    wrapperCol: { span: 14, offset: 4 },
+                }
+                : {};
+        });
+        //获得app标识
+        console.log(props.formrate);
+        watch(props, () => {
+            console.log(props.formrate);
+            formState.rate = props.formrate as string;
+        });
+
+        onMounted(() => {
+            formState.rate = props.formrate as string;
+        });
+        const submit = async () => {
+            state.reportresult.rate = formState.rate;
+            state.reportresult.condition = formState.condition;
+            state.reportresult.appflag = localStorage.getItem("OrangeAppflag") || "0";
+            console.log(state.reportresult);
+            const res = await upDateReportConfigApi(state.reportresult);
+            if (res.data.result == 1) {
+                message.success("修改回传比例成功!");
+            }
+        };
+        //点击关闭抽屉层
+        const cancel = () => {
+            ctx.emit('getShowFlag', showFlag.showflag)
+        }
+        return {
+            formState,
+            formItemLayout,
+            buttonItemLayout,
+            ...toRefs(state),
+            submit,
+            cancel
+        };
+    },
+});
+</script>

+ 157 - 0
src/views/account/orangelog.vue

@@ -0,0 +1,157 @@
+<template>
+    <div>
+        <tool-bar :text="['uid']" :label="['uid']" @confirm="onSearch" @cancel="onCancel">
+            <template #picker>
+                <p class="label">充值日期</p>
+                <a-range-picker v-model:value="pickered" format="YYYY/MM/DD" @change="changeTime" />
+            </template>
+        </tool-bar>
+
+        <div>
+            <a-table :columns="columns" :data-source="loglist" bordered>
+                <!-- <template #operation="{ record }">
+                    <a @click="orangeAction(record)" v-if="isShowflag">强制回传</a>
+                    <div v-else>已上报</div>
+                </template> -->
+                <template #report_status="{ text, record }">
+                    <!-- <div>{{record.report_status}}</div> -->
+                    <p v-if="record.report_status == 'success'">已上报</p>
+                    <a-popconfirm
+                        title="是否要继续强制回传?"
+                        ok-text="是"
+                        cancel-text="否"
+                        @confirm="orangeAction(record)"
+                    >
+                        <p v-if="record.report_status != 'success'">
+                            <a>强制回传</a>
+                        </p>
+                    </a-popconfirm>
+                </template>
+            </a-table>
+        </div>
+    </div>
+</template>
+
+<script lang="ts">
+import logList from "./log.vue";
+import { TableColumnLogOfOrange } from "@/views/_pageOptions/table-account";
+import ToolBar from "@/components/tool-bar/index.vue";
+import {
+    defineComponent,
+    onMounted,
+    reactive,
+    watch,
+    toRefs,
+    computed,
+    ref,
+} from "@vue/runtime-core";
+import { getOrangeLogListApi, getforceReportApi } from "@/api";
+import useApp from "@/hooks/useApp";
+import { picker } from "@/helper/config/range";
+import { ILogitem } from "#/api";
+export default defineComponent({
+    component: {
+        logList,
+    },
+    props: {
+        Logappflag: String || undefined,
+    },
+    components: {
+        ToolBar,
+    },
+
+    setup(props) {
+        const state = reactive({
+            isShowflag: true,
+            rangePick: picker,
+            list: {
+                guid: "",
+                start_time: "",
+                end_time: "",
+                appflag: "",
+            },
+            orangeActionList: {
+                reportType: "",
+                guid: "",
+                platform: ""
+            },
+            loglist: ref<ILogitem[]>([]), //?
+            columns: TableColumnLogOfOrange,
+            pickered: []
+        });
+
+        const getLogOrangeList = async () => {
+            const res = await getOrangeLogListApi(state.list);
+            console.log(res);
+            if (res) {
+                state.loglist = res.data.list;
+            }
+        };
+        onMounted(() => {
+            console.log(props.Logappflag);
+            state.list.appflag = props.Logappflag as string;
+            getLogOrangeList();
+        });
+        //监听传过来的值appflag
+        watch(props, () => {
+            console.log("该拜年了", props.Logappflag);
+            state.list.appflag = props.Logappflag as string;
+            getLogOrangeList();
+        });
+        const changeTime = (time: string, stringtime: string) => {
+            console.log(stringtime)
+            state.list.start_time = stringtime[0];
+            state.list.end_time = stringtime[1]
+            console.log(state.list)
+        };
+        //搜索时发的异步请求
+        const getSearchList = async () => {
+            const Searchlist = await getOrangeLogListApi(state.list)
+            if (Searchlist.data) {
+                state.loglist = Searchlist.data.list
+                console.log(Searchlist)
+            }
+
+        }
+        const onSearch = (fields: Record<string, string>) => {
+            console.log(fields)
+            const uid = fields.uid
+            state.list.guid = uid
+            getSearchList()
+            // getOrangeLogListApi(state.list)
+        }
+        const onCancel = () => {
+            state.list.guid = ""
+            state.list.start_time = "",
+                state.list.end_time = "",
+                getSearchList()
+            console.log(2)
+        }
+        //强制回传操作
+        const getOrangeActionRes = async () => {
+            const res = await getforceReportApi(state.orangeActionList as any)
+            console.log(res.data.result)
+            if (res.data.result == "fail") {
+                state.isShowflag = false
+            }
+        }
+        const orangeAction = (record: ILogitem) => {
+            console.log(record)
+            console.log(1)
+            state.orangeActionList.guid = record.guid
+            state.orangeActionList.reportType = record.report_type
+            state.orangeActionList.platform = record.platform
+            getOrangeActionRes()
+        }
+        return {
+            ...toRefs(state),
+            changeTime,
+            onSearch,
+            onCancel,
+            orangeAction
+        };
+    },
+});
+</script>
+<style lang="scss" scoped>
+</style>

+ 0 - 1
src/views/put/put-book.vue

@@ -180,7 +180,6 @@ const PutBooks = defineComponent({
       official_name: "",
       book_name: "",
     });
-
     const addFormState = reactive({
       official_id: "",
       book: ref<Partial<IBookSearchResult>>({}),

+ 25 - 1
types/api.d.ts

@@ -70,13 +70,28 @@ export interface IOfficials {
   id: number;
   start_time: string;
   end_time: string;
-  app_id: string;
+  app_id?: string;
   platform: string;
   channel_id: number;
   account_name: string;
   nickname: string;
   report_module?: string;
 }
+export interface ILogitem{
+  order_no: string,
+  guid: string,
+  platform: string,
+  register_time: string,
+  pay_time: string,
+  pay_amount: string,
+  report_status: string,
+  reason: string,
+  back_percentage: number,
+  config_back_percentage: number,
+  report_type:string
+}
+
+
 
 export interface ADPlanItem {
   ad_id: string | number;
@@ -386,6 +401,14 @@ export interface GroupDatas {
   ctr: number;
 }
 
+export interface OListItem {
+  id: number;
+  app_name: string;
+  appflag: string;
+  rate: number;
+  platform: string;
+}
+
 interface IUserAdmin {
   uid: number;
   showDropDownBox: boolean;
@@ -426,3 +449,4 @@ interface IPBookItem {
   bid: string | number;
   book_name: string;
 }
+