XiaBx 3 rokov pred
rodič
commit
345762649d

+ 1 - 0
package.json

@@ -7,6 +7,7 @@
     "build": "vue-cli-service build"
   },
   "dependencies": {
+    "@antv/g2plot": "^2.3.21",
     "ant-design-vue": "^2.0.0-beta.15",
     "axios": "^0.21.0",
     "clipboard": "^2.0.6",

+ 13 - 3
src/App.vue

@@ -1,3 +1,11 @@
+<!--
+ * @Author: your name
+ * @Date: 2020-11-23 15:23:19
+ * @LastEditTime: 2021-05-31 14:27:02
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\App.vue
+-->
 <template>
   <a-config-provider :locale="locale">
     <router-view />
@@ -7,13 +15,15 @@
 <script lang="ts">
 import { defineComponent, ref } from "vue";
 import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
-
+import { useWatermark } from "@/hooks/useWatermark";
 const App = defineComponent({
   setup() {
     const locale = ref(zhCN);
-    return { locale };
+    const { setWatermark, clear } = useWatermark();
+    setWatermark();
+    return { locale, setWatermark, clear };
   },
 });
 
 export default App;
-</script>
+</script>

+ 8 - 0
src/api/config.ts

@@ -1,3 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2020-11-23 14:07:38
+ * @LastEditTime: 2021-05-31 11:39:47
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\api\config.ts
+ */
 import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
 import { message } from "ant-design-vue";
 import store from "@/store";

+ 50 - 1
src/api/index.ts

@@ -95,6 +95,8 @@ export const getOfficialAccounts = (query: {
   official_name: string;
   platform: string;
   page: number;
+  report_module: any;
+  report_status: any;
 }): AxiosPromise<IList<IOfficials>> => {
   return axios("/userOfficialAccounts", { params: query });
 };
@@ -339,6 +341,7 @@ export const getFinanceList = (
     start_ymd: string;
     end_ymd: string;
     page: number;
+    advertiser_id: string;
   }> = { page: 1 }
 ): AxiosPromise<IList<FinanceData>> => {
   return axios("/ad/adFinanceStat", { params: query });
@@ -563,7 +566,7 @@ export const landingCharpter = (data: { bid?: string }) => {
  * 落地页我得图片
  * @returns
  */
-export const landingMypic = (data:any) => {
+export const landingMypic = (data: any) => {
   return axios("/landingPage/myDocuments", { params: data });
 };
 
@@ -675,3 +678,49 @@ export const onUpload = (
 export const getLandingTempalte = (): any => {
   return axios("/landingPage/bodyTemplates");
 };
+
+/**
+ * 修改密码
+ * @param opasswd
+ * @param new_passwd
+ * @param new_passwd_repeat
+ * @returns
+ */
+export const changePwdApi = (data: {
+  opasswd: string;
+  new_passwd: string;
+  new_passwd_repeat: string;
+}): any => {
+  return axios.post("/user/resetPassword", data);
+};
+
+/**
+ * 模板列表
+ * @param campaign_id
+ * @param budget_mode
+ * @returns
+ */
+export const changeAdgroupBudget = (data: {
+  campaign_id: string;
+  budget_mode: string;
+  budget: number;
+}): any => {
+  return axios.post("/ad/updateCampaignBudget", data);
+};
+
+/**
+ * 财务统计
+ * @param campaign_id
+ * @param budget_mode
+ * @returns
+ */
+export const getFinanceSum = (
+  query: Partial<{
+    start_ymd: string;
+    end_ymd: string;
+    page: number;
+    advertiser_id: string;
+  }>
+): any => {
+  return axios("/ad/adFinanceStatSum", { params: query });
+};

+ 100 - 0
src/hooks/useWatermark.ts

@@ -0,0 +1,100 @@
+/*
+ * @Author: your name
+ * @Date: 2021-05-31 11:35:48
+ * @LastEditTime: 2021-06-01 14:59:00
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\hooks\useWatermark.ts
+ */
+import { getCurrentInstance, onBeforeUnmount, ref, Ref, unref } from "vue";
+import store from "@/store";
+
+const domSymbol = Symbol("watermark-dom");
+
+export function useWatermark(
+  appendEl: Ref<HTMLElement | null> = ref(document.body)
+) {
+  let func: Fn = () => {};
+  const id = domSymbol.toString();
+
+  //清除水印
+  const clear = () => {
+    const domId = document.getElementById(id);
+    if (domId) {
+      const el = unref(appendEl);
+      el && el.removeChild(domId);
+    }
+    window.removeEventListener("resize", func);
+  };
+  //创建水印
+  const createWatermark = (str: string) => {
+    clear();
+
+    const can = document.createElement("canvas");
+    can.width = 300;
+    can.height = 240;
+
+    const cans = can.getContext("2d");
+    if (cans) {
+      cans.rotate((-20 * Math.PI) / 120);
+      cans.font = "30px Vedana";
+      cans.fillStyle = "rgba(0, 0, 0, 0.15)";
+      cans.textAlign = "left";
+      cans.textBaseline = "middle";
+      cans.fillText(str, can.width / 20, can.height);
+    }
+
+    const div = document.createElement("div");
+    div.id = id;
+    div.style.pointerEvents = "none";
+    div.style.top = "0px";
+    div.style.left = "0px";
+    div.style.position = "absolute";
+    div.style.zIndex = "100000";
+    div.style.width = document.documentElement.clientWidth + "px";
+    div.style.height = document.documentElement.clientHeight + "px";
+    div.style.background =
+      "url(" + can.toDataURL("image/png") + ") left top repeat";
+    const el = unref(appendEl);
+    el && el.appendChild(div);
+
+    //监听dom树发现DOM改变重新生成水印防止人为F12清除dom节点
+    const MutationObserver =
+      window.MutationObserver || window.WebKitMutationObserver;
+    if (MutationObserver) {
+      let mo: any = new MutationObserver(function() {
+        const __wm = document.getElementById(id);
+        if (!__wm) {
+          mo.disconnect();
+          mo = null;
+          createWatermark(str);
+        }
+      });
+      mo.observe(document.body, {
+        attributes: true,
+        subtree: true,
+        childList: true,
+      });
+    }
+
+    return id;
+  };
+  //设置水印
+  function setWatermark(
+    str: string = store.state.app.user.nickname || "内部资料"
+  ) {
+    createWatermark(str);
+    func = () => {
+      createWatermark(str);
+    };
+    window.addEventListener("resize", func);
+    const instance = getCurrentInstance();
+    if (instance) {
+      onBeforeUnmount(() => {
+        clear();
+      });
+    }
+  }
+
+  return { setWatermark, clear };
+}

+ 25 - 1
src/layout/components/AppHeaderUser.vue

@@ -1,3 +1,11 @@
+<!--
+ * @Author: your name
+ * @Date: 2020-12-01 16:37:56
+ * @LastEditTime: 2021-06-01 18:40:37
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\layout\components\AppHeaderUser.vue
+-->
 <template>
   <a-popover trigger="click">
     <template v-slot:content>
@@ -6,6 +14,10 @@
            @click="onLogout">
           <PoweroffOutlined />安全退出
         </p>
+        <p class="cursor"
+           @click="changePwd">
+          <LockOutlined />修改密码
+        </p>
       </div>
     </template>
     <div class="user-wrap">
@@ -22,6 +34,7 @@ import {
   UserOutlined,
   CaretDownFilled,
   PoweroffOutlined,
+  LockOutlined 
 } from "@ant-design/icons-vue";
 import useApp from "@/hooks/useApp";
 import { logout } from "@/api";
@@ -32,6 +45,7 @@ const AppHeaderUser = defineComponent({
     UserOutlined,
     CaretDownFilled,
     PoweroffOutlined,
+    LockOutlined
   },
   props: {
     name: String,
@@ -48,10 +62,20 @@ const AppHeaderUser = defineComponent({
         console.log("logout error");
       }
     };
+    const changePwd = () =>{
+      router.replace("/forgetpwd");
+    }
 
-    return { onLogout };
+    return { onLogout,changePwd };
   },
 });
 
 export default AppHeaderUser;
 </script>
+<style lang="less" scoped>
+  .setting-group{
+    p{
+      line-height:30px;
+    }
+  }
+</style>

+ 13 - 1
src/router/async.ts

@@ -154,6 +154,18 @@ export const Financial: RouteConfig = {
   component: () => import("@/views/financial/index.vue")
 };
 
-const asyncRoutes: RouteConfig[] = [AccountManager, PutManager, Financial];
+export const ForgetPwd: RouteConfig = {
+  name: "ForgetPwd",
+  path: "/forgetpwd",
+  hidden: true,
+  meta: {
+    title: "忘记密码",
+  },
+  component: () => import("@/views/Password.vue"),
+};
+
+
+
+const asyncRoutes: RouteConfig[] = [AccountManager, PutManager, Financial,ForgetPwd];
 
 export default asyncRoutes;

+ 8 - 0
src/router/modules/constant.ts

@@ -1,3 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2020-12-31 16:33:24
+ * @LastEditTime: 2021-06-01 15:55:08
+ * @LastEditors: your name
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\router\modules\constant.ts
+ */
 import { RouteConfig } from "#/route";
 
 export const Login: RouteConfig = {

+ 6 - 0
src/scss/index.scss

@@ -197,3 +197,9 @@ body {
   display: flex;
   align-items: center;
 }
+.small-font{
+  font-size :10px !important;
+}
+.single-line{
+  @include single-line();
+}

+ 8 - 2
src/store/modules/app/actions.ts

@@ -1,3 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2020-11-26 16:48:54
+ * @LastEditTime: 2021-06-01 11:07:46
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\store\modules\app\actions.ts
+ */
 import { ActionTree } from "vuex";
 import { Actions, ActionType, MutationType, State } from "./_type";
 import { RootState } from "@/store";
@@ -41,7 +49,6 @@ const actions: ActionTree<State, RootState> & Actions = {
       const storeOfficials = formatSelectOptions<number>(data, "name", "id");
       commit(MutationType.setOfficial, storeOfficials);
     } catch (e) {
-
       console.log("error", e);
     }
   },
@@ -51,7 +58,6 @@ const actions: ActionTree<State, RootState> & Actions = {
       const storePlatforms = formatSelectOptions<string>(data, "desc", "name");
       commit(MutationType.setPlatforms, storePlatforms);
     } catch (e) {
-  
       console.log("error", e);
     }
   },

+ 117 - 0
src/views/Password.vue

@@ -0,0 +1,117 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-06-01 16:06:10
+ * @LastEditTime: 2021-06-01 17:07:00
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\views\Password.vue
+-->
+<template>
+  <div class="page-wrap page-wrap-account page-adplan">
+    <div class="form-content">
+      <a-form :model="forms" v-bind="layout" :rules="rules" ref="formRef">
+        <a-form-item name="opasswd">
+          <a-input
+            v-model:value="forms.opasswd"
+            size="large"
+            placeholder="请输入原密码"
+          >
+          </a-input>
+        </a-form-item>
+        <a-form-item name="new_passwd">
+          <a-input-password
+            v-model:value="forms.new_passwd"
+            size="large"
+            type="password"
+            placeholder="请输入密码"
+          >
+          </a-input-password>
+        </a-form-item>
+        <a-form-item name="new_passwd_repeat">
+          <a-input-password
+            v-model:value="forms.new_passwd_repeat"
+            size="large"
+            type="password"
+            placeholder="请再次输入密码"
+          >
+          </a-input-password>
+        </a-form-item>
+        <a-form-item>
+          <a-button
+            type="primary"
+            block
+            size="large"
+            shape="round"
+            :loading="loading"
+            @click="changePwd"
+            >修改密码</a-button
+          >
+        </a-form-item>
+      </a-form>
+    </div>
+  </div>
+</template>
+<script lang="ts">
+import { defineComponent, reactive, toRefs, ref } from "vue";
+import useFormLayout from "@/hooks/useFormLayout";
+import { changePwdApi } from "@/api";
+import { message } from "ant-design-vue";
+import useApp from "@/hooks/useApp";
+import { MutationType } from "@/store/modules/app/_type";
+
+const ForgetPwd = defineComponent({
+  setup(props, context) {
+    const formLayout = useFormLayout(0);
+    const formRef = ref();
+    const { store, router } = useApp();
+
+    const data = reactive({
+      forms: {
+        opasswd: "",
+        new_passwd: "",
+        new_passwd_repeat: "",
+      },
+      loading: false,
+      layout: formLayout,
+    });
+    const rules = {
+      opasswd: [
+        { required: true, message: "请填写原始密码", trigger: "change" },
+      ],
+      new_passwd: [
+        { required: true, message: "请填写密码", trigger: "change" },
+      ],
+      new_passwd_repeat: [
+        { required: true, message: "请二次填写密码", trigger: "change" },
+      ],
+    };
+    const changePwd = async () => {
+      formRef.value.validate().then(() => {
+        if (data.forms.new_passwd != data.forms.new_passwd_repeat) {
+          message.error("2次密码必须保持一致");
+          return false;
+        }
+        if (data.forms.new_passwd.length <= 5) {
+          message.error("密码必须大于5位");
+          return false;
+        }
+        changePwdApi(data.forms).then((res: any) => {
+          if (!res.code) {
+            message.success("修改成功!");
+            store.commit(MutationType.setUser, {});
+            router.replace("/login");
+          }
+        });
+      });
+    };
+    return { ...toRefs(data), changePwd, rules, formRef };
+  },
+});
+
+export default ForgetPwd;
+</script>
+<style lang="less" scoped>
+.form-content {
+  width: 600px;
+}
+</style>

+ 16 - 0
src/views/_pageOptions/table-account.ts

@@ -1,3 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2021-04-28 09:14:49
+ * @LastEditTime: 2021-06-03 19:21:42
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\views\_pageOptions\table-account.ts
+ */
 export const TableColumnOfAccount = [
   {
     title: "公众号名称",
@@ -45,6 +53,14 @@ export const TableColumnOfAccount = [
   //   }
   // },
   {
+    title: "回传状态",
+    dataIndex: "report_status",
+    width: 150,
+    slots: {
+      customRender: "status"
+    }
+  },
+  {
     title: "操作",
     dataIndex: "action",
     width: 150,

+ 428 - 159
src/views/_pageOptions/table-put.ts

@@ -7,6 +7,7 @@ interface colunm {
   children?: Array<colunm>;
   ellipsis?: boolean;
   sortDirections?: (string | false)[];
+  fixed?: string;
 }
 export const TableColumnOfPutBooks = [
   {
@@ -18,7 +19,7 @@ export const TableColumnOfPutBooks = [
     title: "公众号名称",
     dataIndex: "official_name",
     width: 150,
-    slots: {customRender: "official_name"},
+    slots: { customRender: "official_name" },
   },
   {
     title: "书籍",
@@ -33,18 +34,18 @@ export const TableColumnOfPutBooks = [
     title: "开始时间/结束时间",
     dataIndex: "start_time",
     width: 200,
-    slots: {customRender: "time"},
+    slots: { customRender: "time" },
   },
   {
     title: "监测链接",
     dataIndex: "monitor_link",
-    slots: {customRender: "link"},
+    slots: { customRender: "link" },
     width: 120,
   },
   {
     title: "操作",
     key: "operator",
-    slots: {customRender: "operator"},
+    slots: { customRender: "operator" },
     width: 100,
   },
 ];
@@ -62,7 +63,7 @@ export const TableColumnOfPutAdAccount = [
     dataIndex: "account_id",
     key: "account_id",
     ellipsis: true,
-    slots: {customRender: "email"},
+    slots: { customRender: "email" },
   },
   {
     title: "用户名",
@@ -89,7 +90,7 @@ export const TableColumnOfPutAdAccount = [
   {
     title: "是否同步",
     key: "operator",
-    slots: {customRender: "operator"},
+    slots: { customRender: "operator" },
     width: 100,
   },
 ];
@@ -202,7 +203,7 @@ export const TableColumnOfPutLog = [
     title: "日志",
     key: "content_log",
     width: 500,
-    slots: {customRender: "log"},
+    slots: { customRender: "log" },
   },
 ];
 
@@ -309,126 +310,126 @@ export const TableColumnOfMoreStat = [
     title: "bid",
     dataIndex: "bid",
   },
-  {title: "1日回本率", dataIndex: "d1_recovery_rate", width: 150},
-  {title: "2日回本率", dataIndex: "d2_recovery_rate", width: 150},
-  {title: "3日回本率", dataIndex: "d3_recovery_rate", width: 150},
-  {title: "4日回本率", dataIndex: "d4_recovery_rate", width: 150},
-  {title: "5日回本率", dataIndex: "d5_recovery_rate", width: 150},
-  {title: "6日回本率", dataIndex: "d6_recovery_rate", width: 150},
-  {title: "7日回本率", dataIndex: "d7_recovery_rate", width: 150},
-  {title: "8日回本率", dataIndex: "d8_recovery_rate", width: 150},
-  {title: "9日回本率", dataIndex: "d9_recovery_rate", width: 150},
-  {title: "10日回本率", dataIndex: "d10_recovery_rate", width: 150},
-  {title: "11日回本率", dataIndex: "d11_recovery_rate", width: 150},
-  {title: "12日回本率", dataIndex: "d12_recovery_rate", width: 150},
-  {title: "13日回本率", dataIndex: "d13_recovery_rate", width: 150},
-  {title: "14日回本率", dataIndex: "d14_recovery_rate", width: 150},
-  {title: "15日回本率", dataIndex: "d15_recovery_rate", width: 150},
-  {title: "16日回本率", dataIndex: "d16_recovery_rate", width: 150},
-  {title: "17日回本率", dataIndex: "d17_recovery_rate", width: 150},
-  {title: "18日回本率", dataIndex: "d18_recovery_rate", width: 150},
-  {title: "19日回本率", dataIndex: "d19_recovery_rate", width: 150},
-  {title: "20日回本率", dataIndex: "d20_recovery_rate", width: 150},
-  {title: "21日回本率", dataIndex: "d21_recovery_rate", width: 150},
-  {title: "22日回本率", dataIndex: "d22_recovery_rate", width: 150},
-  {title: "23日回本率", dataIndex: "d23_recovery_rate", width: 150},
-  {title: "24日回本率", dataIndex: "d24_recovery_rate", width: 150},
-  {title: "25日回本率", dataIndex: "d25_recovery_rate", width: 150},
-  {title: "26日回本率", dataIndex: "d26_recovery_rate", width: 150},
-  {title: "27日回本率", dataIndex: "d27_recovery_rate", width: 150},
-  {title: "28日回本率", dataIndex: "d28_recovery_rate", width: 150},
-  {title: "29日回本率", dataIndex: "d29_recovery_rate", width: 150},
-  {title: "30日回本率", dataIndex: "d30_recovery_rate", width: 150},
-  {title: "31日回本率", dataIndex: "d31_recovery_rate", width: 150},
-  {title: "32日回本率", dataIndex: "d32_recovery_rate", width: 150},
-  {title: "33日回本率", dataIndex: "d33_recovery_rate", width: 150},
-  {title: "34日回本率", dataIndex: "d34_recovery_rate", width: 150},
-  {title: "35日回本率", dataIndex: "d35_recovery_rate", width: 150},
-  {title: "36日回本率", dataIndex: "d36_recovery_rate", width: 150},
-  {title: "37日回本率", dataIndex: "d37_recovery_rate", width: 150},
-  {title: "38日回本率", dataIndex: "d38_recovery_rate", width: 150},
-  {title: "39日回本率", dataIndex: "d39_recovery_rate", width: 150},
-  {title: "40日回本率", dataIndex: "d40_recovery_rate", width: 150},
-  {title: "41日回本率", dataIndex: "d41_recovery_rate", width: 150},
-  {title: "42日回本率", dataIndex: "d42_recovery_rate", width: 150},
-  {title: "43日回本率", dataIndex: "d43_recovery_rate", width: 150},
-  {title: "44日回本率", dataIndex: "d44_recovery_rate", width: 150},
-  {title: "45日回本率", dataIndex: "d45_recovery_rate", width: 150},
-  {title: "46日回本率", dataIndex: "d46_recovery_rate", width: 150},
-  {title: "47日回本率", dataIndex: "d47_recovery_rate", width: 150},
-  {title: "48日回本率", dataIndex: "d48_recovery_rate", width: 150},
-  {title: "49日回本率", dataIndex: "d49_recovery_rate", width: 150},
-  {title: "50日回本率", dataIndex: "d50_recovery_rate", width: 150},
-  {title: "51日回本率", dataIndex: "d51_recovery_rate", width: 150},
-  {title: "52日回本率", dataIndex: "d52_recovery_rate", width: 150},
-  {title: "53日回本率", dataIndex: "d53_recovery_rate", width: 150},
-  {title: "54日回本率", dataIndex: "d54_recovery_rate", width: 150},
-  {title: "55日回本率", dataIndex: "d55_recovery_rate", width: 150},
-  {title: "56日回本率", dataIndex: "d56_recovery_rate", width: 150},
-  {title: "57日回本率", dataIndex: "d57_recovery_rate", width: 150},
-  {title: "58日回本率", dataIndex: "d58_recovery_rate", width: 150},
-  {title: "59日回本率", dataIndex: "d59_recovery_rate", width: 150},
-  {title: "60日回本率", dataIndex: "d60_recovery_rate", width: 150},
-  {title: "61日回本率", dataIndex: "d61_recovery_rate", width: 150},
-  {title: "62日回本率", dataIndex: "d62_recovery_rate", width: 150},
-  {title: "63日回本率", dataIndex: "d63_recovery_rate", width: 150},
-  {title: "64日回本率", dataIndex: "d64_recovery_rate", width: 150},
-  {title: "65日回本率", dataIndex: "d65_recovery_rate", width: 150},
-  {title: "66日回本率", dataIndex: "d66_recovery_rate", width: 150},
-  {title: "67日回本率", dataIndex: "d67_recovery_rate", width: 150},
-  {title: "68日回本率", dataIndex: "d68_recovery_rate", width: 150},
-  {title: "69日回本率", dataIndex: "d69_recovery_rate", width: 150},
-  {title: "70日回本率", dataIndex: "d70_recovery_rate", width: 150},
-  {title: "71日回本率", dataIndex: "d71_recovery_rate", width: 150},
-  {title: "72日回本率", dataIndex: "d72_recovery_rate", width: 150},
-  {title: "73日回本率", dataIndex: "d73_recovery_rate", width: 150},
-  {title: "74日回本率", dataIndex: "d74_recovery_rate", width: 150},
-  {title: "75日回本率", dataIndex: "d75_recovery_rate", width: 150},
-  {title: "76日回本率", dataIndex: "d76_recovery_rate", width: 150},
-  {title: "77日回本率", dataIndex: "d77_recovery_rate", width: 150},
-  {title: "78日回本率", dataIndex: "d78_recovery_rate", width: 150},
-  {title: "79日回本率", dataIndex: "d79_recovery_rate", width: 150},
-  {title: "80日回本率", dataIndex: "d80_recovery_rate", width: 150},
-  {title: "81日回本率", dataIndex: "d81_recovery_rate", width: 150},
-  {title: "82日回本率", dataIndex: "d82_recovery_rate", width: 150},
-  {title: "83日回本率", dataIndex: "d83_recovery_rate", width: 150},
-  {title: "84日回本率", dataIndex: "d84_recovery_rate", width: 150},
-  {title: "85日回本率", dataIndex: "d85_recovery_rate", width: 150},
-  {title: "86日回本率", dataIndex: "d86_recovery_rate", width: 150},
-  {title: "87日回本率", dataIndex: "d87_recovery_rate", width: 150},
-  {title: "88日回本率", dataIndex: "d88_recovery_rate", width: 150},
-  {title: "89日回本率", dataIndex: "d89_recovery_rate", width: 150},
-  {title: "90日回本率", dataIndex: "d90_recovery_rate", width: 150},
-  {title: "91日回本率", dataIndex: "d91_recovery_rate", width: 150},
-  {title: "92日回本率", dataIndex: "d92_recovery_rate", width: 150},
-  {title: "93日回本率", dataIndex: "d93_recovery_rate", width: 150},
-  {title: "94日回本率", dataIndex: "d94_recovery_rate", width: 150},
-  {title: "95日回本率", dataIndex: "d95_recovery_rate", width: 150},
-  {title: "96日回本率", dataIndex: "d96_recovery_rate", width: 150},
-  {title: "97日回本率", dataIndex: "d97_recovery_rate", width: 150},
-  {title: "98日回本率", dataIndex: "d98_recovery_rate", width: 150},
-  {title: "99日回本率", dataIndex: "d99_recovery_rate", width: 150},
-  {title: "100日回本率", dataIndex: "d100_recovery_rate", width: 150},
-  {title: "101日回本率", dataIndex: "d101_recovery_rate", width: 150},
-  {title: "102日回本率", dataIndex: "d102_recovery_rate", width: 150},
-  {title: "103日回本率", dataIndex: "d103_recovery_rate", width: 150},
-  {title: "104日回本率", dataIndex: "d104_recovery_rate", width: 150},
-  {title: "105日回本率", dataIndex: "d105_recovery_rate", width: 150},
-  {title: "106日回本率", dataIndex: "d106_recovery_rate", width: 150},
-  {title: "107日回本率", dataIndex: "d107_recovery_rate", width: 150},
-  {title: "108日回本率", dataIndex: "d108_recovery_rate", width: 150},
-  {title: "109日回本率", dataIndex: "d109_recovery_rate", width: 150},
-  {title: "110日回本率", dataIndex: "d110_recovery_rate", width: 150},
-  {title: "111日回本率", dataIndex: "d111_recovery_rate", width: 150},
-  {title: "112日回本率", dataIndex: "d112_recovery_rate", width: 150},
-  {title: "113日回本率", dataIndex: "d113_recovery_rate", width: 150},
-  {title: "114日回本率", dataIndex: "d114_recovery_rate", width: 150},
-  {title: "115日回本率", dataIndex: "d115_recovery_rate", width: 150},
-  {title: "116日回本率", dataIndex: "d116_recovery_rate", width: 150},
-  {title: "117日回本率", dataIndex: "d117_recovery_rate", width: 150},
-  {title: "118日回本率", dataIndex: "d118_recovery_rate", width: 150},
-  {title: "119日回本率", dataIndex: "d119_recovery_rate", width: 150},
-  {title: "120日回本率", dataIndex: "d120_recovery_rate", width: 150},
+  { title: "1日回本率", dataIndex: "d1_recovery_rate", width: 150 },
+  { title: "2日回本率", dataIndex: "d2_recovery_rate", width: 150 },
+  { title: "3日回本率", dataIndex: "d3_recovery_rate", width: 150 },
+  { title: "4日回本率", dataIndex: "d4_recovery_rate", width: 150 },
+  { title: "5日回本率", dataIndex: "d5_recovery_rate", width: 150 },
+  { title: "6日回本率", dataIndex: "d6_recovery_rate", width: 150 },
+  { title: "7日回本率", dataIndex: "d7_recovery_rate", width: 150 },
+  { title: "8日回本率", dataIndex: "d8_recovery_rate", width: 150 },
+  { title: "9日回本率", dataIndex: "d9_recovery_rate", width: 150 },
+  { title: "10日回本率", dataIndex: "d10_recovery_rate", width: 150 },
+  { title: "11日回本率", dataIndex: "d11_recovery_rate", width: 150 },
+  { title: "12日回本率", dataIndex: "d12_recovery_rate", width: 150 },
+  { title: "13日回本率", dataIndex: "d13_recovery_rate", width: 150 },
+  { title: "14日回本率", dataIndex: "d14_recovery_rate", width: 150 },
+  { title: "15日回本率", dataIndex: "d15_recovery_rate", width: 150 },
+  { title: "16日回本率", dataIndex: "d16_recovery_rate", width: 150 },
+  { title: "17日回本率", dataIndex: "d17_recovery_rate", width: 150 },
+  { title: "18日回本率", dataIndex: "d18_recovery_rate", width: 150 },
+  { title: "19日回本率", dataIndex: "d19_recovery_rate", width: 150 },
+  { title: "20日回本率", dataIndex: "d20_recovery_rate", width: 150 },
+  { title: "21日回本率", dataIndex: "d21_recovery_rate", width: 150 },
+  { title: "22日回本率", dataIndex: "d22_recovery_rate", width: 150 },
+  { title: "23日回本率", dataIndex: "d23_recovery_rate", width: 150 },
+  { title: "24日回本率", dataIndex: "d24_recovery_rate", width: 150 },
+  { title: "25日回本率", dataIndex: "d25_recovery_rate", width: 150 },
+  { title: "26日回本率", dataIndex: "d26_recovery_rate", width: 150 },
+  { title: "27日回本率", dataIndex: "d27_recovery_rate", width: 150 },
+  { title: "28日回本率", dataIndex: "d28_recovery_rate", width: 150 },
+  { title: "29日回本率", dataIndex: "d29_recovery_rate", width: 150 },
+  { title: "30日回本率", dataIndex: "d30_recovery_rate", width: 150 },
+  { title: "31日回本率", dataIndex: "d31_recovery_rate", width: 150 },
+  { title: "32日回本率", dataIndex: "d32_recovery_rate", width: 150 },
+  { title: "33日回本率", dataIndex: "d33_recovery_rate", width: 150 },
+  { title: "34日回本率", dataIndex: "d34_recovery_rate", width: 150 },
+  { title: "35日回本率", dataIndex: "d35_recovery_rate", width: 150 },
+  { title: "36日回本率", dataIndex: "d36_recovery_rate", width: 150 },
+  { title: "37日回本率", dataIndex: "d37_recovery_rate", width: 150 },
+  { title: "38日回本率", dataIndex: "d38_recovery_rate", width: 150 },
+  { title: "39日回本率", dataIndex: "d39_recovery_rate", width: 150 },
+  { title: "40日回本率", dataIndex: "d40_recovery_rate", width: 150 },
+  { title: "41日回本率", dataIndex: "d41_recovery_rate", width: 150 },
+  { title: "42日回本率", dataIndex: "d42_recovery_rate", width: 150 },
+  { title: "43日回本率", dataIndex: "d43_recovery_rate", width: 150 },
+  { title: "44日回本率", dataIndex: "d44_recovery_rate", width: 150 },
+  { title: "45日回本率", dataIndex: "d45_recovery_rate", width: 150 },
+  { title: "46日回本率", dataIndex: "d46_recovery_rate", width: 150 },
+  { title: "47日回本率", dataIndex: "d47_recovery_rate", width: 150 },
+  { title: "48日回本率", dataIndex: "d48_recovery_rate", width: 150 },
+  { title: "49日回本率", dataIndex: "d49_recovery_rate", width: 150 },
+  { title: "50日回本率", dataIndex: "d50_recovery_rate", width: 150 },
+  { title: "51日回本率", dataIndex: "d51_recovery_rate", width: 150 },
+  { title: "52日回本率", dataIndex: "d52_recovery_rate", width: 150 },
+  { title: "53日回本率", dataIndex: "d53_recovery_rate", width: 150 },
+  { title: "54日回本率", dataIndex: "d54_recovery_rate", width: 150 },
+  { title: "55日回本率", dataIndex: "d55_recovery_rate", width: 150 },
+  { title: "56日回本率", dataIndex: "d56_recovery_rate", width: 150 },
+  { title: "57日回本率", dataIndex: "d57_recovery_rate", width: 150 },
+  { title: "58日回本率", dataIndex: "d58_recovery_rate", width: 150 },
+  { title: "59日回本率", dataIndex: "d59_recovery_rate", width: 150 },
+  { title: "60日回本率", dataIndex: "d60_recovery_rate", width: 150 },
+  { title: "61日回本率", dataIndex: "d61_recovery_rate", width: 150 },
+  { title: "62日回本率", dataIndex: "d62_recovery_rate", width: 150 },
+  { title: "63日回本率", dataIndex: "d63_recovery_rate", width: 150 },
+  { title: "64日回本率", dataIndex: "d64_recovery_rate", width: 150 },
+  { title: "65日回本率", dataIndex: "d65_recovery_rate", width: 150 },
+  { title: "66日回本率", dataIndex: "d66_recovery_rate", width: 150 },
+  { title: "67日回本率", dataIndex: "d67_recovery_rate", width: 150 },
+  { title: "68日回本率", dataIndex: "d68_recovery_rate", width: 150 },
+  { title: "69日回本率", dataIndex: "d69_recovery_rate", width: 150 },
+  { title: "70日回本率", dataIndex: "d70_recovery_rate", width: 150 },
+  { title: "71日回本率", dataIndex: "d71_recovery_rate", width: 150 },
+  { title: "72日回本率", dataIndex: "d72_recovery_rate", width: 150 },
+  { title: "73日回本率", dataIndex: "d73_recovery_rate", width: 150 },
+  { title: "74日回本率", dataIndex: "d74_recovery_rate", width: 150 },
+  { title: "75日回本率", dataIndex: "d75_recovery_rate", width: 150 },
+  { title: "76日回本率", dataIndex: "d76_recovery_rate", width: 150 },
+  { title: "77日回本率", dataIndex: "d77_recovery_rate", width: 150 },
+  { title: "78日回本率", dataIndex: "d78_recovery_rate", width: 150 },
+  { title: "79日回本率", dataIndex: "d79_recovery_rate", width: 150 },
+  { title: "80日回本率", dataIndex: "d80_recovery_rate", width: 150 },
+  { title: "81日回本率", dataIndex: "d81_recovery_rate", width: 150 },
+  { title: "82日回本率", dataIndex: "d82_recovery_rate", width: 150 },
+  { title: "83日回本率", dataIndex: "d83_recovery_rate", width: 150 },
+  { title: "84日回本率", dataIndex: "d84_recovery_rate", width: 150 },
+  { title: "85日回本率", dataIndex: "d85_recovery_rate", width: 150 },
+  { title: "86日回本率", dataIndex: "d86_recovery_rate", width: 150 },
+  { title: "87日回本率", dataIndex: "d87_recovery_rate", width: 150 },
+  { title: "88日回本率", dataIndex: "d88_recovery_rate", width: 150 },
+  { title: "89日回本率", dataIndex: "d89_recovery_rate", width: 150 },
+  { title: "90日回本率", dataIndex: "d90_recovery_rate", width: 150 },
+  { title: "91日回本率", dataIndex: "d91_recovery_rate", width: 150 },
+  { title: "92日回本率", dataIndex: "d92_recovery_rate", width: 150 },
+  { title: "93日回本率", dataIndex: "d93_recovery_rate", width: 150 },
+  { title: "94日回本率", dataIndex: "d94_recovery_rate", width: 150 },
+  { title: "95日回本率", dataIndex: "d95_recovery_rate", width: 150 },
+  { title: "96日回本率", dataIndex: "d96_recovery_rate", width: 150 },
+  { title: "97日回本率", dataIndex: "d97_recovery_rate", width: 150 },
+  { title: "98日回本率", dataIndex: "d98_recovery_rate", width: 150 },
+  { title: "99日回本率", dataIndex: "d99_recovery_rate", width: 150 },
+  { title: "100日回本率", dataIndex: "d100_recovery_rate", width: 150 },
+  { title: "101日回本率", dataIndex: "d101_recovery_rate", width: 150 },
+  { title: "102日回本率", dataIndex: "d102_recovery_rate", width: 150 },
+  { title: "103日回本率", dataIndex: "d103_recovery_rate", width: 150 },
+  { title: "104日回本率", dataIndex: "d104_recovery_rate", width: 150 },
+  { title: "105日回本率", dataIndex: "d105_recovery_rate", width: 150 },
+  { title: "106日回本率", dataIndex: "d106_recovery_rate", width: 150 },
+  { title: "107日回本率", dataIndex: "d107_recovery_rate", width: 150 },
+  { title: "108日回本率", dataIndex: "d108_recovery_rate", width: 150 },
+  { title: "109日回本率", dataIndex: "d109_recovery_rate", width: 150 },
+  { title: "110日回本率", dataIndex: "d110_recovery_rate", width: 150 },
+  { title: "111日回本率", dataIndex: "d111_recovery_rate", width: 150 },
+  { title: "112日回本率", dataIndex: "d112_recovery_rate", width: 150 },
+  { title: "113日回本率", dataIndex: "d113_recovery_rate", width: 150 },
+  { title: "114日回本率", dataIndex: "d114_recovery_rate", width: 150 },
+  { title: "115日回本率", dataIndex: "d115_recovery_rate", width: 150 },
+  { title: "116日回本率", dataIndex: "d116_recovery_rate", width: 150 },
+  { title: "117日回本率", dataIndex: "d117_recovery_rate", width: 150 },
+  { title: "118日回本率", dataIndex: "d118_recovery_rate", width: 150 },
+  { title: "119日回本率", dataIndex: "d119_recovery_rate", width: 150 },
+  { title: "120日回本率", dataIndex: "d120_recovery_rate", width: 150 },
 ];
 
 export const TableColumnOfPutAdPlan = [
@@ -644,11 +645,13 @@ export const AdgroupCloumn: Array<colunm> = [
     slots: {
       customRender: "switch",
     },
+    fixed: "left",
   },
   {
     title: "广告组名称",
     dataIndex: "campaign_name",
     width: 150,
+
     children: [
       {
         title: "总计",
@@ -661,49 +664,181 @@ export const AdgroupCloumn: Array<colunm> = [
     ],
   },
   {
-    title: "消耗",
-    dataIndex: "cost",
+    title: "组预算",
+    dataIndex: "budget",
     width: 100,
+    slots: {
+      customRender: "budget",
+    },
   },
   {
-    title: "转化成本",
-    dataIndex: "convert_cost",
+    title: "消耗",
+    dataIndex: "cost",
     width: 100,
   },
+
   {
     title: "展示量",
     dataIndex: "show",
-    width: 100,
+    width: 80,
+  },
+  {
+    title: "点击率",
+    dataIndex: "ctr",
+    width: 80,
   },
   {
     title: "点击量",
     dataIndex: "click",
-    width: 100,
+    width: 80,
   },
   {
-    title: "点击率",
-    dataIndex: "ctr",
-    width: 100,
+    title: "平均点击单价",
+    dataIndex: "avg_click_cost",
+    width: 80,
+  },
+  {
+    title: "平均千次展现费用",
+    dataIndex: "avg_show_cost",
+    width: 80,
   },
   {
     title: "转化数",
     dataIndex: "convert",
-    width: 100,
+    width: 80,
+  },
+  {
+    title: "转化成本",
+    dataIndex: "convert_cost",
+    width: 80,
   },
   {
     title: "转化率",
     dataIndex: "convert_rate",
-    width: 100,
+    width: 80,
   },
   {
-    title: "平均千次展现费用",
-    dataIndex: "avg_show_cost",
-    width: 100,
+    title: "注册用户数",
+    dataIndex: "register_num",
+    width: 80,
   },
   {
-    title: "平均点击单价",
-    dataIndex: "avg_click_cost",
-    width: 100,
+    title: "充值人数",
+    dataIndex: "paid_user_num",
+    width: 80,
+  },
+  {
+    title: "充值金额",
+    dataIndex: "paid_order_num",
+    width: 80,
+  },
+  {
+    title: "付费用户成本",
+    dataIndex: "paid_user_cost",
+    width: 80,
+  },
+  {
+    title: "订单数(小额)",
+    dataIndex: "bellow_thirty_paid_order_num",
+    width: 80,
+  },
+  {
+    title: "订单数(包年)",
+    dataIndex: "year_paid_order_num",
+    width: 80,
+  },
+  {
+    title: "付费率",
+    dataIndex: "paid_user_rate",
+    width: 80,
+  },
+  {
+    title: "回本率",
+    dataIndex: "back_rate",
+    width: 80,
+  },
+  {
+    title: "复充人数(小额)",
+    dataIndex: "bellow_thirty_mult_paid_user_num",
+    width: 80,
+  },
+  {
+    title: "充值人数(小额)",
+    dataIndex: "bellow_thirty_paid_user_num",
+    width: 80,
+  },
+
+  {
+    title: "充值金额(小额)",
+    dataIndex: "bellow_thirty_paid_order_amount",
+    width: 80,
+  },
+  {
+    title: "复充人数(包年)",
+    dataIndex: "year_mult_paid_user_num",
+    width: 80,
+  },
+
+  {
+    title: "充值金额(包年)",
+    dataIndex: "year_paid_order_amount",
+    width: 80,
+  },
+  {
+    title: "充值人数(包年)",
+    dataIndex: "year_paid_user_num",
+    width: 80,
+  },
+  {
+    title: "注册用户成本",
+    dataIndex: "register_user_cost",
+    width: 80,
+  },
+  {
+    title: "充值金额(非小额非包年)",
+    dataIndex: "over_thirty_not_year_paid_order_amount",
+    width: 80,
+  },
+  {
+    title: "回本率(非小额非包年",
+    dataIndex: "over_thirty_not_year_back_rate",
+    width: 80,
+  },
+  {
+    title: "回本率(非包年",
+    dataIndex: "not_year_back_rate",
+    width: 80,
+  },
+
+  {
+    title: "点赞",
+    dataIndex: "like",
+    width: 80,
+  },
+  {
+    title: "播完率",
+    dataIndex: "play_over_rate",
+    width: 80,
+  },
+  {
+    title: "激活数",
+    dataIndex: "active",
+    width: 80,
+  },
+  {
+    title: "播放数",
+    dataIndex: "total_play",
+    width: 80,
+  },
+  {
+    title: "播完数",
+    dataIndex: "play_100_feed_break",
+    width: 80,
+  },
+  {
+    title: "注册数(头条)",
+    dataIndex: "register",
+    width: 80,
   },
 ];
 
@@ -716,7 +851,7 @@ export const AdCoundCloumn: Array<colunm> = [
       {
         title: "总计",
         dataIndex: "campaign_name",
-        width: 160,
+        width: 200,
         slots: {
           customRender: "info",
         },
@@ -731,24 +866,33 @@ export const AdCoundCloumn: Array<colunm> = [
   {
     title: "账户预算(最低1000元)",
     dataIndex: "firle",
-    width: 160,
+    width: 200,
     slots: {
       customRender: "budget",
     },
   },
   {
+    title: "回传最小金额",
+    dataIndex: "back_min_price",
+    width: 130,
+    slots: {
+      customRender: "operte",
+    },
+  },
+  {
     title: "消耗",
     dataIndex: "cost",
     width: 100,
   },
+
   {
-    title: "转化成本",
-    dataIndex: "convert_cost",
+    title: "展示量",
+    dataIndex: "show",
     width: 80,
   },
   {
-    title: "展示量",
-    dataIndex: "show",
+    title: "点击率",
+    dataIndex: "ctr",
     width: 80,
   },
   {
@@ -757,8 +901,13 @@ export const AdCoundCloumn: Array<colunm> = [
     width: 80,
   },
   {
-    title: "点击率",
-    dataIndex: "ctr",
+    title: "平均点击单价",
+    dataIndex: "avg_click_cost",
+    width: 80,
+  },
+  {
+    title: "平均千次展现费用",
+    dataIndex: "avg_show_cost",
     width: 80,
   },
   {
@@ -767,17 +916,137 @@ export const AdCoundCloumn: Array<colunm> = [
     width: 80,
   },
   {
+    title: "转化成本",
+    dataIndex: "convert_cost",
+    width: 80,
+  },
+  {
     title: "转化率",
     dataIndex: "convert_rate",
     width: 80,
   },
   {
-    title: "回传最小金额",
-    dataIndex: "back_min_price",
-    width: 130,
-    slots: {
-      customRender: "operte",
-    },
+    title: "注册用户数",
+    dataIndex: "register_num",
+    width: 80,
+  },
+  {
+    title: "充值人数",
+    dataIndex: "paid_user_num",
+    width: 80,
+  },
+  {
+    title: "充值金额",
+    dataIndex: "paid_order_num",
+    width: 80,
+  },
+  {
+    title: "付费用户成本",
+    dataIndex: "paid_user_cost",
+    width: 80,
+  },
+  {
+    title: "订单数(小额)",
+    dataIndex: "bellow_thirty_paid_order_num",
+    width: 80,
+  },
+  {
+    title: "订单数(包年)",
+    dataIndex: "year_paid_order_num",
+    width: 80,
+  },
+  {
+    title: "付费率",
+    dataIndex: "paid_user_rate",
+    width: 80,
+  },
+  {
+    title: "回本率",
+    dataIndex: "back_rate",
+    width: 80,
+  },
+  {
+    title: "复充人数(小额)",
+    dataIndex: "bellow_thirty_mult_paid_user_num",
+    width: 80,
+  },
+  {
+    title: "充值人数(小额)",
+    dataIndex: "bellow_thirty_paid_user_num",
+    width: 80,
+  },
+
+  {
+    title: "充值金额(小额)",
+    dataIndex: "bellow_thirty_paid_order_amount",
+    width: 80,
+  },
+  {
+    title: "复充人数(包年)",
+    dataIndex: "year_mult_paid_user_num",
+    width: 80,
+  },
+
+  {
+    title: "充值金额(包年)",
+    dataIndex: "year_paid_order_amount",
+    width: 80,
+  },
+  {
+    title: "充值人数(包年)",
+    dataIndex: "year_paid_user_num",
+    width: 80,
+  },
+  {
+    title: "注册用户成本",
+    dataIndex: "register_user_cost",
+    width: 80,
+  },
+  {
+    title: "充值金额(非小额非包年)",
+    dataIndex: "over_thirty_not_year_paid_order_amount",
+    width: 80,
+  },
+  {
+    title: "回本率(非小额非包年",
+    dataIndex: "over_thirty_not_year_back_rate",
+    width: 80,
+  },
+  {
+    title: "回本率(非包年",
+    dataIndex: "not_year_back_rate",
+    width: 80,
+  },
+
+  {
+    title: "点赞",
+    dataIndex: "like",
+    width: 80,
+  },
+  {
+    title: "播完率",
+    dataIndex: "play_over_rate",
+    width: 80,
+  },
+  {
+    title: "激活数",
+    dataIndex: "active",
+    width: 80,
+  },
+  {
+    title: "播放数",
+    dataIndex: "total_play",
+    width: 80,
+  },
+  {
+    title: "播完数",
+    dataIndex: "play_100_feed_break",
+    width: 80,
+  },
+  {
+    title: "注册数(头条)",
+    dataIndex: "register",
+    width: 80,
   },
 ];
 
@@ -787,7 +1056,7 @@ export const landingCloumn: Array<colunm> = [
     dataIndex: "id",
     width: 100,
   },
-  
+
   {
     title: "落地页名称",
     dataIndex: "title",

+ 12 - 2
src/views/_pageOptions/table_financial.ts

@@ -1,3 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2021-01-07 15:24:09
+ * @LastEditTime: 2021-06-03 11:59:53
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\views\_pageOptions\table_financial.ts
+ */
 export const TableColumnOfFinancial = [
   {
     title: "日期",
@@ -7,7 +15,7 @@ export const TableColumnOfFinancial = [
     width:150
   },
   {
-    title: "账户信息",
+    title: "账户",
     dataIndex: "advertiser_name",
     slots: { customRender: "advertiser" },
     fixed: "left",
@@ -15,7 +23,7 @@ export const TableColumnOfFinancial = [
     width:220
   },
   {
-    title: "所属代理商信息",
+    title: "所属代理商",
     dataIndex: "agent_name",
     slots: { customRender: "agent" },
     fixed: "left",
@@ -32,6 +40,8 @@ export const TableColumnOfFinancial = [
   {
     title: "现金支出",
     dataIndex: "cash_cost",
+    sorter:true,
+    sortDirections: ['descend', 'ascend',false],
   },
   {
     title: "赠款支出",

+ 42 - 17
src/views/account/account.vue

@@ -6,7 +6,7 @@
       v-model:loading="searching"
       @confirm="onSearch"
     >
-      <div class="tool-bar-item">
+      <!-- <div class="tool-bar-item">
         <p class="label">小说平台</p>
         <a-select class="full-width" v-model:value="query.platform">
           <a-select-option
@@ -16,6 +16,24 @@
             >{{ 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="10086" :value="10086">全部</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="all">全部</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>
     </tool-bar>
     <a-table
@@ -40,6 +58,9 @@
       <template #module="{ record }">
         <p>{{ moduleType[record.report_module] }}</p>
       </template>
+      <template #status="{text}">
+        <p>{{ text == 0 ? "关闭" : "开启" }}</p>
+      </template>
       <template #time="{ text, record }">
         <p>起:{{ record.start_time }}</p>
         <p>止:{{ record.end_time }}</p>
@@ -88,7 +109,7 @@
           </a-form-item>
         </a-form>
       </div>
-      <div class="wrap-box">
+      <div class="wrap-box"  v-show="showConfig">
         <p class="title">按站点回传配置</p>
         <a-tabs size="small" @change="onTabChange">
           <a-tab-pane
@@ -193,7 +214,7 @@ import {
   onMounted,
   reactive,
   ref,
-  toRefs
+  toRefs,
 } from "vue";
 import EditableCell from "@/components/edit-cell/index.vue";
 import ToolBar from "@/components/tool-bar/index.vue";
@@ -204,21 +225,21 @@ import { TableColumnOfAccount } from "@/views/_pageOptions/table-account";
 import {
   getOfficialAccounts,
   setChannelRate,
-  getOfficialBackConfig
+  getOfficialBackConfig,
 } from "@/api";
 import { IOfficials, PlanBack } from "#/api";
 import { message } from "ant-design-vue";
 import { InfoCircleOutlined } from "@ant-design/icons-vue";
 import {
   setOfficialBackConfig,
-  onUpdateOfficialReportType
+  onUpdateOfficialReportType,
 } from "../../api/index";
 
 const Account = defineComponent({
   components: {
     ToolBar,
     EditableCell,
-    InfoCircleOutlined
+    InfoCircleOutlined,
   },
   setup() {
     let { loading, meta, tablePageOptions } = usePagination();
@@ -230,12 +251,14 @@ const Account = defineComponent({
       searching: false,
       moduleType: ref<any>({
         channel: "按站点回传",
-        ad: "按计划回传"
+        ad: "按计划回传",
       }),
       query: {
         official_name: "",
         platform: "",
-        page: 1
+        page: 1,
+        report_status: ref<string | undefined>(undefined),
+        report_module: "",
       },
       hasPopFormData: false,
       popForm: ref<any[]>([
@@ -246,19 +269,20 @@ const Account = defineComponent({
           condition: "",
           price: 0,
           float_rate: 0,
-          desc: ""
-        }
+          desc: "",
+        },
       ]),
       ad_config: {
         channel_id: "",
         id: 0,
-        rate: 0
+        rate: 0,
       },
       report_module: "ad",
       report_channel_id: 0,
+      showConfig: false,
       visible: false,
       saving: false,
-      currentTab: 0
+      currentTab: 0,
     });
 
     const onSearch = (fields: Record<string, string>) => {
@@ -288,6 +312,7 @@ const Account = defineComponent({
         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;
@@ -316,8 +341,8 @@ const Account = defineComponent({
         state.visible = false;
       });
     };
-
     const onReportModuleChange = () => {
+      state.showConfig = state.report_module == "ad" ? false : true;
       onUpdateOfficialReportType(
         state.report_channel_id,
         state.report_module
@@ -343,7 +368,7 @@ const Account = defineComponent({
         rate,
         condition,
         price,
-        float_rate
+        float_rate,
       };
 
       setOfficialBackConfig(data)
@@ -370,7 +395,7 @@ const Account = defineComponent({
       onTabChange,
       onRateChange,
       onSaveConfig,
-      onReportModuleChange
+      onReportModuleChange,
     };
   },
   methods: {
@@ -383,8 +408,8 @@ const Account = defineComponent({
           this.$message.success("修改回传比例成功!");
         }
       );
-    }
-  }
+    },
+  },
 });
 
 export default Account;

+ 50 - 19
src/views/financial/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="page-wrap page-finacial">
     <tool-bar
-      :text="[]"
-      :label="[]"
+      :text="['advertiser_id']"
+      :label="['广告主名/ID']"
       v-model:loading="inSearching"
       @confirm="onSearch"
     >
@@ -20,16 +20,18 @@
       :columns="columns"
       :data-source="list"
       :scroll="{ x: 1500, y: 600 }"
+      size="small"
       @change="handleTableChange"
+      rowKey="id"
       bordered
     >
       <template #advertiser="{ text, record }">
-        <p>账户名:{{ record.advertiser_name }}</p>
-        <p>账户ID:{{ record.advertiser_id }}</p>
+        <p class="small-font single-line">{{ record.advertiser_name }}</p>
+        <p class="small-font single-line">ID:{{ record.advertiser_id }}</p>
       </template>
       <template #agent="{ text, record }">
-        <p>代理商名:{{ record.agent_name }}</p>
-        <p>代理商Id:{{ record.agent_id }}</p>
+        <p class="small-font single-line">{{ record.agent_name }}</p>
+        <p class="small-font single-line">ID:{{ record.agent_id }}</p>
       </template>
     </a-table>
   </div>
@@ -47,7 +49,7 @@ import {
 
 import ToolBar from "@/components/tool-bar/index.vue";
 import usePagination from "@/hooks/usePagination";
-import { getFinanceList } from "@/api";
+import { getFinanceList, getFinanceSum } from "@/api";
 import { picker } from "@/helper/config/range";
 import { PageOptions, FinanceData } from "#/api";
 import moment from "moment";
@@ -63,16 +65,20 @@ const Finance = defineComponent({
     const state = reactive({
       inSearching: false,
       open: false,
+      fields: ref<any>({}),
       inConfirm: false,
       list: ref<FinanceData[]>([]),
       rangePick: picker,
       cost_order: 0,
       balance_order: 0,
+      cash_cost_order: 0,
       pickered: [moment().subtract(30, "d"), moment()],
-      columns: TableColumnOfFinancial,
+      columns: ref<any[]>([]),
     });
 
     const onSearch = (fields: Record<string, string>) => {
+      const { advertiser_id } = fields;
+      state.fields = fields;
       getData({ current: 1 });
     };
 
@@ -82,19 +88,40 @@ const Finance = defineComponent({
         let [begin_dates, end_dates] = state.pickered;
         let start_ymd = moment(begin_dates).format("YYYY-MM-DD");
         let end_ymd = moment(end_dates).format("YYYY-MM-DD");
-        const { data } = await getFinanceList(
-          Object.assign(
+        let parmas = Object.assign(
+          {
+            cost_order: state.cost_order,
+            balance_order: state.balance_order,
+            cash_cost_order: state.cash_cost_order,
+          },
+          {
+            start_ymd,
+            end_ymd,
+            page: query?.current ?? 1,
+            advertiser_id: state.fields?.advertiser_id ?? "",
+          }
+        );
+        const { data } = await getFinanceList(parmas);
+        const { data: taotals } = await getFinanceSum(parmas);
+        let sortList = ["cost", "balance", "cash_cost"];
+        let newlist = TableColumnOfFinancial.map((r: any) => {
+          r.children = [
             {
-              cost_order: state.cost_order,
-              balance_order: state.balance_order,
+              title: taotals[r.dataIndex],
+              dataIndex: r.dataIndex,
+              width: r.width,
+              ellipsis: true,
+              sorter: sortList.includes(r.dataIndex) ? true : false,
+              sortDirections: ["descend", "ascend", false],
+              slots: r.slots ?? "",
             },
-            {
-              start_ymd,
-              end_ymd,
-              page: query?.current ?? 1,
-            }
-          )
-        );
+          ];
+          if (r.dataIndex == "date") {
+            r.children[0].title = "总计";
+          }
+          return r;
+        });
+        state.columns = newlist;
         state.list = data.list as Array<FinanceData>;
         meta.value = data.meta;
       } catch (error) {
@@ -107,6 +134,7 @@ const Finance = defineComponent({
     const setSateSwitch = (val: string, name: string) => {
       state.cost_order = 0;
       state.balance_order = 0;
+      state.cash_cost_order = 0;
       switch (val) {
         case "ascend":
           (state as any)[name] = 2;
@@ -130,6 +158,9 @@ const Finance = defineComponent({
       if (sorter.columnKey == "balance") {
         setSateSwitch(sorter.order, "balance_order");
       }
+      if (sorter.columnKey == "cash_cost") {
+        setSateSwitch(sorter.order, "cash_cost_order");
+      }
       const { current, pageSize, total } = pagination;
       getData({ current: current });
     };

+ 5 - 4
src/views/put/ad-countdata.vue

@@ -42,15 +42,16 @@
         :pagination="tablePageOptions"
         bordered
         :loading="tableLoading"
-        :scroll="{ y: scrollY, x: 1000 }"
+        :scroll="{ y: scrollY, x: 1200 }"
+        size="small"
         @change="handleTableChange"
         rowKey="id"
       >
         <template #info="{ text, record }">
-          <p @click="goAdlgroup(record.advertiser_id)">
-            <a href="javascript:;">广告主名:{{ record.advertiser_name }}</a>
+          <p @click="goAdlgroup(record.advertiser_id)" class="small-font single-line">
+            <a href="javascript:;">{{ record.advertiser_name }}</a>
           </p>
-          <p @click="goAdlgroup(record.advertiser_id)">
+          <p @click="goAdlgroup(record.advertiser_id)"  class="small-font single-line">
             <a href="javascript:;">广告主ID:{{ record.advertiser_id }}</a>
           </p>
         </template>

+ 103 - 22
src/views/put/ad-group.vue

@@ -42,24 +42,50 @@
         :data-source="list"
         :pagination="tablePageOptions"
         rowKey="id"
+        size="small"
         bordered
         :loading="tableLoading"
         :scroll="{ x: 1300, y: scrollY }"
         @change="handleTableChange"
       >
-        <template #adgroup="{ text, record }">
-          <p @click="goAdlgroup(record.advertiser_id, record.campaign_id)">
+        <template #adgroup="{ record }">
+          <p
+            class="small-font"
+            @click="goAdlgroup(record.advertiser_id, record.campaign_id)"
+          >
             <a href="javascript:;">{{ record.campaign_name }} </a>
           </p>
         </template>
-        <template #switch="{ text, record }">
+        <template #switch="{ record }">
           <a-switch
             v-model:checked="record.is_enable"
             @change="switchMethod(record)"
           />
         </template>
+        <template #budget="{ record }">
+          <a href="javascript:;" @click="changeBudget(record)">{{record.budget}}</a>
+        </template>
       </a-table>
     </template>
+    <a-modal
+      v-model:visible="visibleChange"
+      title="修改组预算"
+      @ok="popConfirm"
+    >
+      <div class="flex-box pop-group">
+        <label>组预算</label
+        ><a-input prefix="¥" v-model:value="tempBudget">
+          <template #suffix>
+            <a-tooltip
+              title="广告组日预算不能低于300元,预算单次修改幅度不能低于100元)"
+            >
+              元(查看规则)
+            </a-tooltip>
+          </template>
+        </a-input>
+      </div>
+      <div>无输入则不限预算</div>
+    </a-modal>
   </div>
 </template>
 <script lang="ts">
@@ -69,14 +95,20 @@ import {
   toRefs,
   ref,
   onMounted,
-  computed
+  computed,
 } from "vue";
 import { picker } from "@/helper/config/range";
 import ToolBar from "@/components/tool-bar/index.vue";
 import moment from "moment";
+import { message } from "ant-design-vue";
 import { AdgroupCloumn } from "../_pageOptions/table-put";
 import useApp from "@/hooks/useApp";
-import { getAdgroupList, setGroupStatus, ALLadGroupData } from "@/api";
+import {
+  getAdgroupList,
+  setGroupStatus,
+  ALLadGroupData,
+  changeAdgroupBudget,
+} from "@/api";
 import usePagination from "@/hooks/usePagination";
 import { MutationType } from "@/store/modules/app/_type";
 import { AdGroupData, PageOptions, GroupDatas } from "#/api";
@@ -84,7 +116,7 @@ import useAuthUser from "@/hooks/composable/useAuthUser";
 
 const Adgroup = defineComponent({
   components: {
-    ToolBar
+    ToolBar,
   },
   setup() {
     let { loading, meta, tablePageOptions } = usePagination();
@@ -94,11 +126,14 @@ const Adgroup = defineComponent({
 
     const state = reactive({
       inSearching: false,
+      visibleChange: false,
       open: false,
+      curentItem: ref<any>({}),
       inConfirm: false,
       list: ref<any[]>([]),
       rangePick: picker,
       cost_order: 0,
+      tempBudget: 0,
       convert_order: 0,
       convert_cost_order: 0,
       showTable: false,
@@ -107,7 +142,7 @@ const Adgroup = defineComponent({
         store.getters.selectTime.length > 0
           ? [
               moment(store.getters.selectTime[0]),
-              moment(store.getters.selectTime[1])
+              moment(store.getters.selectTime[1]),
             ]
           : [moment().subtract(30, "d"), moment()]
       ),
@@ -115,14 +150,14 @@ const Adgroup = defineComponent({
       fields: {},
       tableLoading: false,
       defaultToolvalue: {},
-      uids: ref<number[]>([])
+      uids: ref<number[]>([]),
     });
     if (route.query && route.query.advertiser_id) {
       state.defaultToolvalue = {
-        advertiser_id: route.query.advertiser_id as string
+        advertiser_id: route.query.advertiser_id as string,
       };
       state.fields = {
-        advertiser_id: route.query.advertiser_id as string
+        advertiser_id: route.query.advertiser_id as string,
       };
     }
 
@@ -153,13 +188,13 @@ const Adgroup = defineComponent({
             end_date,
             advertiser_id: query?.advertiser_id,
             campaign_id: query?.campaign_id,
-            page: query?.current ?? 1
+            page: query?.current ?? 1,
           },
           {
             cost_order: state.cost_order,
             convert_order: state.convert_order,
             convert_cost_order: state.convert_cost_order,
-            uids: state.uids.toString()
+            uids: state.uids.toString(),
           }
         );
         const { data } = await getAdgroupList(datas);
@@ -180,9 +215,15 @@ const Adgroup = defineComponent({
                 width: r.width,
                 sorter: sortList.includes(r.dataIndex) ? true : false,
                 sortDirections: ["descend", "ascend", false],
-                ellipsis: true
-              }
+                ellipsis: true,
+              },
             ];
+            if (r.slots) {
+              r.children[0].slots = r.slots;
+            }
+          }
+          if (r.dataIndex == "budget") {
+            console.log(r);
           }
           return r;
         });
@@ -197,7 +238,11 @@ const Adgroup = defineComponent({
         state.tableLoading = false;
       }
     };
-
+    const changeBudget = (record: any) => {
+      state.visibleChange = true;
+      state.curentItem = record;
+      state.tempBudget = record.budget;
+    };
     const setSateSwitch = (val: string, name: string) => {
       state.cost_order = 0;
       state.convert_order = 0;
@@ -232,11 +277,38 @@ const Adgroup = defineComponent({
       let data = Object.assign({ current, ...state.fields });
       getData(data);
     };
-
+    const popConfirm = () => {
+      let budget = state.tempBudget;
+      let data = {
+        campaign_id: state.curentItem.campaign_id,
+        budget_mode: "",
+        budget: 0,
+      };
+      if (budget && Number(budget) > 0) {
+        data.budget_mode = "BUDGET_MODE_DAY";
+        if (budget < 300) {
+          message.error("广告预算必须大于300");
+          return false;
+        }
+        if (Math.abs(state.curentItem.budget - budget) < 100) {
+          message.error("单次修改幅度不能低于100元");
+          return false;
+        }
+        data.budget = budget;
+      } else {
+        data.budget_mode = "BUDGET_MODE_INFINITE";
+      }
+      changeAdgroupBudget(data).then((res: any) => {
+        if (!res.code) {
+          message.error("修改预算成功!");
+          location.reload();
+        }
+      });
+    };
     onMounted(() => {
       getData({
         advertiser_id: route.query?.advertiser_id ?? "",
-        current: 1
+        current: 1,
       });
     });
     const goAdlgroup = (id: string, campaign_id: string) => {
@@ -250,7 +322,7 @@ const Adgroup = defineComponent({
       }
       router.push({
         path: "/put/datas/ad-plan",
-        query: { campaign_id, begin_date, end_date }
+        query: { campaign_id, begin_date, end_date },
       });
     };
 
@@ -268,7 +340,9 @@ const Adgroup = defineComponent({
       onSearch,
       handleTableChange,
       goAdlgroup,
-      changeTime
+      changeTime,
+      changeBudget,
+      popConfirm,
     };
   },
   mounted() {
@@ -282,14 +356,21 @@ const Adgroup = defineComponent({
     switchMethod(record: any) {
       let data = {
         campaign_id: record.campaign_id,
-        status: Number(!record.is_enable) == 1 ? "enable" : "disable"
+        status: Number(!record.is_enable) == 1 ? "enable" : "disable",
       };
       setGroupStatus(data).then((res) => {
         this.$message.success("状态修改成功");
       });
-    }
-  }
+    },
+  },
 });
 
 export default Adgroup;
 </script>
+<style lang="less" scoped>
+.pop-group {
+  label {
+    width: 100px;
+  }
+}
+</style>

+ 2 - 1
src/views/put/put-ad-account.vue

@@ -18,6 +18,7 @@
       :pagination="tablePageOptions"
       :loading="loading.value"
       bordered
+      size="small"
       @change="handleTableChange"
       :scroll="{ y: 600 }"
       rowKey="id"
@@ -93,7 +94,7 @@ const PutAdAccount = defineComponent({
     const switchMethod = (record: any) => {
       let data = {
         advertiser_id: record.advertiser_id,
-        is_enable: Number(!record.is_enable),
+        is_enable: Number(record.is_enable),
       };
       statusAdChange(data).then((res) => {
         message.success("修改成功!");

+ 132 - 26
src/views/put/put-ad-count.vue

@@ -1,71 +1,167 @@
 <template>
   <div class="page-wrap page-wrap-put-books">
-    <a-table
+    <a-card :title="title" style="width: 1300px">
+      <div class="flex-box card-top">
+        <div style="margin-right:20px;">
+          <span class="label">自定义天数</span>
+          <a-input-number
+            id="inputNumber"
+            v-model:value="filterNumber"
+            :min="7"
+            :max="120"
+          />
+        </div>
+        <div>
+          <span class="label">筛选条件:</span>
+          <a-range-picker
+            v-model:value="pickerFilter"
+            @change="switchDate"
+            :ranges="rangePick"
+            format="YYYY/MM/DD"
+          />
+        </div>
+      </div>
+      <div id="containers" style="margin-top:20px;"></div>
+    </a-card>
+
+    <!--   <a-table
       :columns="columns"
       :data-source="list"
       rowKey="id"
+      size="small"
       :pagination="tablePageOptions"
       :loading="loading.value"
       bordered
       @change="handleTableChange"
-      :scroll="{ x: 1500,y:700 }"
+      :scroll="{ x: 1500, y: 700 }"
     >
-    </a-table>
+    </a-table> -->
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, reactive, toRefs, ref,watchEffect } from "vue";
-
+import {
+  defineComponent,
+  reactive,
+  toRefs,
+  ref,
+  watchEffect,
+  onMounted,
+  computed,
+  watch,
+} from "vue";
+import { picker } from "@/helper/config/range";
 import ToolBar from "@/components/tool-bar/index.vue";
-import moment from "moment";
-
+import moment, { Moment } from "moment";
 import { getAdplanData, getAdplanTable } from "@/api";
 import usePagination from "@/hooks/usePagination";
-
-import { adPlanCount, PageOptions} from "#/api";
+import { adPlanCount, PageOptions } from "#/api";
 import useApp from "@/hooks/useApp";
+import { Line } from "@antv/g2plot";
+import { MutationType } from "@/store/modules/app/_type";
 
 const PutCount = defineComponent({
   components: {
     ToolBar,
   },
   props: {
-    ids: String,
+    ids: Number,
     begin_date: String,
     end_date: String,
     field: String,
   },
   setup(props: any) {
     let { loading, meta, tablePageOptions } = usePagination();
-    const { router } = useApp();
+    const { router, route, store } = useApp();
     let list: any[] = [];
 
     const state = reactive({
-      list: ref<adPlanCount[]>([]),
+      liveData: ref<any>({}),
       columns: list,
       picker: [],
       inSearching: false,
+      title:'回本数据',
       tablePageOptions,
       loading,
+      rangePick: picker,
+      hasInitChart: false,
+      pickerFilter: computed(() =>
+        store.getters.selectTime.length > 0
+          ? [
+              moment(store.getters.selectTime[0]),
+              moment(store.getters.selectTime[1]),
+            ]
+          : [moment(), moment()]
+      ),
+      filterNumber: 120,
+      line: ref<any>(),
     });
-
-
-    const getData = (page=1) => {
+    const switchDate = (date: any, dateString: any[]) => {
+      store.commit(MutationType.setSelectTime, dateString);
+      //getData();
+    };
+    //监听原始数据重新创建视图
+    watch(state.liveData, () => {});
+    const formats = (data: any) => {
+      let result: any[] = [];
+      Object.keys(data).map((item) => {
+        if (item.includes("_paid_order_amount")) {
+          result.push({
+            label: `T+${item.split("_")[1]}`,
+            value: Number(data[item]),
+          });
+        }
+      });
+      return result;
+    };
+    const initChart = () => {
+      state.hasInitChart = true;
+    };
+    const getData = (page = 1) => {
+      const { pickerFilter } = state;
+      let [begin_dates, end_dates] = pickerFilter;
+      let begin_date = moment(begin_dates).format("YYYY-MM-DD");
+      let end_date = moment(end_dates).format("YYYY-MM-DD");
       let query = {
-        ids:props.ids,
-        begin_date:props.begin_date,
-        end_date:props.end_date,
-        field:props.field
-      }
+        ids: props.ids,
+        begin_date: begin_date,
+        end_date: end_date,
+        field: props.field,
+        day_num: state.filterNumber,
+      };
 
-      
-      let data = Object.assign(query,{ page});
+      let data = Object.assign(query, { page });
       getAdplanData(data).then((res) => {
-        state.list = res.data.list;
+        const liveData = formats(res.data.list[0]);
+        let cans = res.data.list[0];
+        state.title = `注册用户:${cans.register_num},累计充值:${cans.paid_order_amount}`
+        state.liveData = liveData;
         meta.value = res.data.meta;
+        if (!state.hasInitChart) {
+          const line = new Line("containers", {
+            data: state.liveData,
+            padding: "auto",
+            xField: "label",
+            yField: "value",
+
+            height: 500,
+            xAxis: {
+              // type: 'timeCat',
+              tickCount: 5,
+            },
+            smooth: true,
+          });
+          state.line = line;
+          state.hasInitChart = true;
+          line.render();
+        } else {
+          if (state.liveData.length > 0 && state.line) {
+            state.line.changeData(state.liveData);
+          }
+        }
       });
     };
+
     watchEffect(() => {
       getData();
     });
@@ -74,7 +170,7 @@ const PutCount = defineComponent({
       getData(current);
     };
 
-    getAdplanTable({field:props.field}).then((res) => {
+    /*  getAdplanTable({ field: props.field }).then((res) => {
       let columns: any[] = [];
       let fixedList = [
         "account_name",
@@ -107,9 +203,10 @@ const PutCount = defineComponent({
         return ~!!a.fixed - ~!!b.fixed;
       });
       state.columns.push(...columnSort);
-    });
+    }); */
+    onMounted(() => {});
 
-    return { ...toRefs(state) ,handleTableChange};
+    return { ...toRefs(state), handleTableChange, switchDate };
   },
   methods: {
     moment,
@@ -118,3 +215,12 @@ const PutCount = defineComponent({
 
 export default PutCount;
 </script>
+<style lang="less" scoped>
+.card-top {
+  justify-content: flex-end;
+  .label {
+    line-height: 20px;
+    margin-right: 20px;
+  }
+}
+</style>

+ 173 - 158
src/views/put/put-ad-plan.vue

@@ -79,6 +79,7 @@
         :loading="tableLoading"
         @change="handleTableChange"
         rowKey="id"
+        size="small"
         bordered
         :scroll="{ x: 1600, y: scrollY }"
       >
@@ -92,122 +93,125 @@
           <p @click="onGo(record)"><a>前往落地页链接</a></p>
         </template>
         <template #ad_name="{ text, record }">
-          <p>账户名:{{ record.account_name }}</p>
-          <p>广告名:{{ record.ad_name }}</p>
-          <p>广告ID:{{ record.ad_id }}</p>
+          <p class="small-font">{{ record.ad_name }}</p>
+          <!-- <p>广告名:{{ record.ad_name }}</p>
+          <p>广告ID:{{ record.ad_id }}</p> -->
         </template>
 
         <template #dayt="{ text, record }">
-          <a-popover title="回传配置" placement="left" trigger="click">
-            <template #content>
-              <div class="tab-list" style="width: 220px">
-                <a-tabs size="small" @change="tabChangeBack">
-                  <a-tab-pane
-                    v-for="(d, i) in popForm"
-                    :key="i"
-                    :tab="d.desc"
-                  ></a-tab-pane>
-                </a-tabs>
-              </div>
-              <div class="hover-content">
-                <span class="label">回传条件</span
-                ><a-select
-                  style="width: 150px"
-                  size="small"
-                  v-model:value="popForm[currentTbs].condition"
-                >
-                  <a-select-option
-                    :value="item.name"
-                    v-for="item in popForm[currentTbs].report_conditions"
+          <div class="flex-box line-box">
+            <a-popover title="回传配置" placement="left" trigger="click">
+              <template #content>
+                <div class="tab-list" style="width: 220px">
+                  <a-tabs size="small" @change="tabChangeBack">
+                    <a-tab-pane
+                      v-for="(d, i) in popForm"
+                      :key="i"
+                      :tab="d.desc"
+                    ></a-tab-pane>
+                  </a-tabs>
+                </div>
+                <div class="hover-content">
+                  <span class="label">回传条件</span
+                  ><a-select
+                    style="width: 150px"
+                    size="small"
+                    v-model:value="popForm[currentTbs].condition"
                   >
-                    {{ item.desc }}
-                  </a-select-option>
-                </a-select>
-              </div>
-              <div class="hover-content">
-                <span class="label">回传开关</span>
-                <a-switch
-                  v-model:checked="popForm[currentTbs].back_on"
-                  checked-children="开"
-                  un-checked-children="关"
-                />
-              </div>
-              <div class="hover-content">
-                <span class="label">回传比例</span
-                ><a-input
-                  v-model:value="popForm[currentTbs].rate"
-                  size="small"
-                  style="width: 150px"
-                  type="number"
-                  placeholder="回传比例"
-                >
-                  <template #suffix>
-                    <a-tooltip title="比例0-100">
-                      <info-circle-outlined style="color: rgba(0,0,0,.45)" />
-                    </a-tooltip>
-                  </template>
-                </a-input>
-              </div>
-              <div class="hover-content">
-                <span class="label">回传平台</span
-                ><a-input
-                  v-model:value="popForm[currentTbs].back_platform"
-                  disabled
-                  size="small"
-                  style="width: 150px"
-                />
-              </div>
-              <div
-                class="hover-content"
-                v-if="popForm[currentTbs].report_type == 'recharge'"
-              >
-                <span class="label">回传付费最低金额</span
-                ><a-input
-                  v-model:value="popForm[currentTbs].price"
-                  size="small"
-                  style="width: 150px"
-                  type="number"
-                  placeholder="回传付费最低金额"
-                />
-              </div>
-              <div class="hover-content">
-                <span class="label">浮动回传比例</span
-                ><a-input
-                  v-model:value="popForm[currentTbs].float_rate"
-                  size="small"
-                  style="width: 150px"
-                  type="number"
-                  placeholder="浮动回传比例"
-                >
-                  <template #suffix>
-                    <a-tooltip title="浮动比例小于固定回传比例">
-                      <info-circle-outlined style="color: rgba(0,0,0,.45)" />
-                    </a-tooltip>
-                  </template>
-                </a-input>
-              </div>
-              <div class="footer-slot">
-                <a-popconfirm
-                  title="是否要修改回传配置?"
-                  ok-text="是"
-                  cancel-text="否"
-                  @confirm="confirmEdit"
+                    <a-select-option
+                      :value="item.name"
+                      v-for="item in popForm[currentTbs].report_conditions"
+                    >
+                      {{ item.desc }}
+                    </a-select-option>
+                  </a-select>
+                </div>
+                <div class="hover-content">
+                  <span class="label">回传开关</span>
+                  <a-switch
+                    v-model:checked="popForm[currentTbs].back_on"
+                    checked-children="开"
+                    un-checked-children="关"
+                  />
+                </div>
+                <div class="hover-content">
+                  <span class="label">回传比例</span
+                  ><a-input
+                    v-model:value="popForm[currentTbs].rate"
+                    size="small"
+                    style="width: 150px"
+                    type="number"
+                    placeholder="回传比例"
+                  >
+                    <template #suffix>
+                      <a-tooltip title="比例0-100">
+                        <info-circle-outlined style="color: rgba(0,0,0,.45)" />
+                      </a-tooltip>
+                    </template>
+                  </a-input>
+                </div>
+                <div class="hover-content">
+                  <span class="label">回传平台</span
+                  ><a-input
+                    v-model:value="popForm[currentTbs].back_platform"
+                    disabled
+                    size="small"
+                    style="width: 150px"
+                  />
+                </div>
+                <div
+                  class="hover-content"
+                  v-if="popForm[currentTbs].report_type == 'recharge'"
                 >
-                  <a-button
-                    type="primary"
+                  <span class="label">回传付费最低金额</span
+                  ><a-input
+                    v-model:value="popForm[currentTbs].price"
+                    size="small"
+                    style="width: 150px"
+                    type="number"
+                    placeholder="回传付费最低金额"
+                  />
+                </div>
+                <div class="hover-content">
+                  <span class="label">浮动回传比例</span
+                  ><a-input
+                    v-model:value="popForm[currentTbs].float_rate"
                     size="small"
-                    :disabled="!hasPopFormData"
-                    @click="editBackConfig"
+                    style="width: 150px"
+                    type="number"
+                    placeholder="浮动回传比例"
                   >
-                    修改
-                  </a-button>
-                </a-popconfirm>
-              </div>
-            </template>
-            <p @click="getBackData(record)"><a>回传</a></p>
-          </a-popover>
-          <p @click="getregister(record)"><a>注册用户</a></p>
-          <p @click="getmoreLineData(record)"><a>更多数据</a></p>
+                    <template #suffix>
+                      <a-tooltip title="浮动比例小于固定回传比例">
+                        <info-circle-outlined style="color: rgba(0,0,0,.45)" />
+                      </a-tooltip>
+                    </template>
+                  </a-input>
+                </div>
+                <div class="footer-slot">
+                  <a-popconfirm
+                    title="是否要修改回传配置?"
+                    ok-text="是"
+                    cancel-text="否"
+                    @confirm="confirmEdit"
+                  >
+                    <a-button
+                      type="primary"
+                      size="small"
+                      :disabled="!hasPopFormData"
+                      @click="editBackConfig"
+                    >
+                      修改
+                    </a-button>
+                  </a-popconfirm>
+                </div>
+              </template>
+              <p @click="getBackData(record)"><a>回传</a></p>
+            </a-popover>
+            <p @click="getregister(record)"><a>注册用户</a></p>
+           <p @click="getmoreLineData(record)"><a>更多数据</a></p> 
+            <!-- <p @click="openBackDrawer(reocrd)"><a>更多数据</a></p> -->
+          </div>
         </template>
 
         <template #cpa_bid="{ text, record }">
@@ -271,6 +275,12 @@
       :closable="false"
       v-model:visible="registerVisable"
     >
+      <put-count
+        :ids="backData.ids"
+        :begin_date="backData.begin_date"
+        :end_date="backData.end_date"
+        :field="backData.field"
+      ></put-count>
       <register-datad
         :ad_lid="register.ad_lid"
         :back_platform="register.back_platform"
@@ -293,7 +303,7 @@ import {
   ref,
   unref,
   onMounted,
-  computed
+  computed,
 } from "vue";
 import moment, { Moment } from "moment";
 import ToolBar from "@/components/tool-bar/index.vue";
@@ -310,7 +320,7 @@ import { MutationType } from "@/store/modules/app/_type";
 
 import {
   TableColumnOfPutAdPlan,
-  ALLCloumnList
+  ALLCloumnList,
 } from "../_pageOptions/table-put";
 
 import {
@@ -323,7 +333,7 @@ import {
   getAdBackPlan,
   setBackConfig,
   getAdStatus,
-  getadDataSum
+  getadDataSum,
 } from "@/api";
 
 import { ADPlanItem, PageOptions, PlanBack } from "#/api";
@@ -337,7 +347,7 @@ const PutAdPlan = defineComponent({
     PutCount,
     InfoCircleOutlined,
     RegisterDatad,
-    CustomCloumn
+    CustomCloumn,
   },
 
   setup() {
@@ -371,13 +381,13 @@ const PutAdPlan = defineComponent({
       columnShow: false,
       register: {
         ad_lid: 0,
-        back_platform: ""
+        back_platform: "",
       },
       pickerFilter: computed(() =>
         store.getters.selectTime.length > 0
           ? [
               moment(store.getters.selectTime[0]),
-              moment(store.getters.selectTime[1])
+              moment(store.getters.selectTime[1]),
             ]
           : [moment(), moment()]
       ),
@@ -388,7 +398,7 @@ const PutAdPlan = defineComponent({
         ids: "",
         begin_date: "",
         end_date: "",
-        field: ""
+        field: "",
       },
 
       currentTbs: 0,
@@ -400,8 +410,8 @@ const PutAdPlan = defineComponent({
           rate: 0,
           condition: "",
           price: 0,
-          float_rate: 0
-        }
+          float_rate: 0,
+        },
       ],
       isInit: false,
       cost_order: 0,
@@ -413,7 +423,7 @@ const PutAdPlan = defineComponent({
       defaultColumns: TableColumnOfPutAdPlan,
       fields: {},
       rangePick: picker,
-      uids: ref<number[]>([])
+      uids: ref<number[]>([]),
     });
 
     if (
@@ -423,12 +433,12 @@ const PutAdPlan = defineComponent({
       state.defaultToolvalue = {
         campaign_id: route.query.campaign_id || "",
         channel_id: route.query.channel_id || "",
-        book_id: route.query.book_id || ""
+        book_id: route.query.book_id || "",
       };
       state.fields = {
         campaign_id: route.query.campaign_id || "",
         channel_id: route.query.channel_id || "",
-        book_id: route.query.book_id || ""
+        book_id: route.query.book_id || "",
       };
     }
     if (route.query.channel_id && route.query.book_id) {
@@ -437,14 +447,14 @@ const PutAdPlan = defineComponent({
     if (route.query && route.query.begin_date && route.query.end_date) {
       state.pickerFilter = [
         moment(route.query.begin_date as any),
-        moment(route.query.end_date as any)
+        moment(route.query.end_date as any),
       ];
     }
 
     getAddStatus().then((res) => {
       res.data.unshift({
         name: "",
-        desc: "不限"
+        desc: "不限",
       });
       state.optionList = res.data;
     });
@@ -457,7 +467,7 @@ const PutAdPlan = defineComponent({
           ad_id,
           status: state.currentSelect,
           campaign_id,
-          page: 1
+          page: 1,
         };
         getData(data);
       } catch (e) {
@@ -482,7 +492,7 @@ const PutAdPlan = defineComponent({
         {
           page: 1,
           status: "AD_STATUS_DELIVERY_OK",
-          ...state.fields
+          ...state.fields,
         },
         query || {},
         { begin_date, end_date, status: state.currentSelect },
@@ -490,7 +500,7 @@ const PutAdPlan = defineComponent({
           cost_order: state.cost_order,
           convert_order: state.convert_order,
           convert_cost_order: state.convert_cost_order,
-          uids: state.uids.toString()
+          uids: state.uids.toString(),
         }
       );
       const { data } = await getADPlanlist(datas);
@@ -503,18 +513,22 @@ const PutAdPlan = defineComponent({
       let sortList = ["cost", "convert", "convert_cost"];
       let columns = state.columns.map((r) => {
         if (r.dataIndex === "ad_name") {
+          r.width = 100;
           r.children = [
             {
               title: "总计",
               dataIndex: "ad_name",
               slots: {
-                customRender: "ad_name"
+                customRender: "ad_name",
               },
               width: r.width,
-              ellipsis: true
-            }
+              ellipsis: true,
+            },
           ];
         }
+        if (r.dataIndex == "ad_id" || r.dataIndex == "budget") {
+          r.width = 180;
+        }
         if (Object.keys(taotals).includes(r.dataIndex)) {
           r.children = [
             {
@@ -523,8 +537,8 @@ const PutAdPlan = defineComponent({
               width: r.width,
               ellipsis: true,
               sorter: sortList.includes(r.dataIndex) ? true : false,
-              sortDirections: ["descend", "ascend", false]
-            }
+              sortDirections: ["descend", "ascend", false],
+            },
           ];
         }
         return r;
@@ -545,9 +559,9 @@ const PutAdPlan = defineComponent({
       let blackList = [
         "email",
         "ad_name",
-        "account_name",
-        "ad_id",
-        "delivery_platform"
+        // "account_name",
+        // "ad_id",
+        "delivery_platform",
       ];
       let extendList = [
         "campaign_name",
@@ -559,7 +573,7 @@ const PutAdPlan = defineComponent({
         "inventory_type",
         "convert_id",
         "external_actions",
-        "ad_create_time"
+        "ad_create_time",
       ];
       res.data.map(
         (item: { desc: string; name: string; width?: number | string }) => {
@@ -575,7 +589,7 @@ const PutAdPlan = defineComponent({
             title: item.desc,
             dataIndex: item.name,
             width: item.width ? item.width : 95,
-            ellipsis: true
+            ellipsis: true,
           };
 
           if (item.name == "external_url") {
@@ -608,14 +622,14 @@ const PutAdPlan = defineComponent({
         title: "操作记录",
         dataIndex: "opertate",
         slots: { customRender: "opertate" },
-        width: 100
+        width: 100,
       });
       state.columns.push({
         title: "日志",
         dataIndex: "opertate",
         fixed: "right",
         slots: { customRender: "dayt" },
-        width: 100
+        width: 230,
       });
     });
 
@@ -655,7 +669,7 @@ const PutAdPlan = defineComponent({
         campaign_id: route.query?.campaign_id ?? "",
         channel_id: route.query?.channel_id ?? "",
         book_id: route.query?.book_id ?? "",
-        page: current
+        page: current,
       });
     };
 
@@ -665,7 +679,7 @@ const PutAdPlan = defineComponent({
           campaign_id: route.query?.campaign_id ?? "",
           channel_id: route.query?.channel_id ?? "",
           book_id: route.query?.book_id ?? "",
-          current: 1
+          current: 1,
         });
       }, 200);
     });
@@ -676,7 +690,7 @@ const PutAdPlan = defineComponent({
       available_uids,
       handleTableChange,
       onSearch,
-      switchDate
+      switchDate,
     };
   },
   mounted() {
@@ -724,7 +738,7 @@ const PutAdPlan = defineComponent({
         rate,
         condition,
         price,
-        float_rate
+        float_rate,
       };
 
       setBackConfig(data).then((res) => {
@@ -734,6 +748,13 @@ const PutAdPlan = defineComponent({
     getregister(record: any) {
       this.register.ad_lid = record.id;
       this.register.back_platform = record.delivery_platform;
+      let [begin_dates, end_dates] = this.pickerFilter;
+      let begin_date = moment(begin_dates).format("YYYY-MM-DD");
+      let end_date = moment(end_dates).format("YYYY-MM-DD");
+      this.backData.ids = record.id;
+      this.backData.begin_date = begin_date;
+      this.backData.end_date = end_date;
+      this.backData.field = this.currentStats;
       this.registerVisable = true;
     },
     onCellChange(record: any, dataIndex: string, value: string) {
@@ -765,29 +786,18 @@ const PutAdPlan = defineComponent({
       let ad_id = record.ad_id;
       statusChange({
         ad_id,
-        status: record.enable ? "disable" : "enable"
+        status: record.enable ? "disable" : "enable",
       }).then((res) => {
         this.$message.success("修改广告状态成功!");
       });
     },
-    openBackDrawer() {
-      let ids = "";
-      this.list.map((item: ADPlanItem) => {
-        ids = ids + `,${item.id}`;
-      });
-      let [begin_dates, end_dates] = this.pickerFilter;
-      let begin_date = moment(begin_dates).format("YYYY-MM-DD");
-      let end_date = moment(end_dates).format("YYYY-MM-DD");
-      this.backData.ids = ids.substring(1);
-      this.backData.begin_date = begin_date;
-      this.backData.end_date = end_date;
-      this.backData.field = this.currentStats;
+    openBackDrawer(record: any) {
       this.visible1 = true;
     },
     getBackData(record: any) {
       getAdBackPlan({
         ad_lid: record.id,
-        back_platform: record.delivery_platform
+        back_platform: record.delivery_platform,
       }).then((res) => {
         let list = res.data.map((r: PlanBack) => {
           r.price = r.extra?.price;
@@ -808,8 +818,8 @@ const PutAdPlan = defineComponent({
       setTimeout(() => {
         location.reload();
       }, 1500);
-    }
-  }
+    },
+  },
 });
 
 export default PutAdPlan;
@@ -836,6 +846,11 @@ export default PutAdPlan;
     min-width: 80px;
   }
 }
+.line-box {
+  > p {
+    margin-left: 10px;
+  }
+}
 .hover-content {
   margin: 8px 0 5px;
   display: flex;

+ 8 - 0
src/views/put/put-data-more.vue

@@ -1,3 +1,11 @@
+<!--
+ * @Author: your name
+ * @Date: 2020-12-31 09:44:33
+ * @LastEditTime: 2021-06-04 14:54:40
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\src\views\put\put-data-more.vue
+-->
 <template>
   <div class="page-wrap page-wrap-put-books">
     <tool-bar

+ 2 - 1
src/views/put/put-data.vue

@@ -2,7 +2,7 @@
   <div class="page-wrap page-wrap-put-books">
     <tool-bar
       :text="['official_name', 'book_name']"
-      :label="['公众号名称', '书名']"
+      :label="['公众号名称', '书名2']"
       :defaultVal="defaultToolvalue"
       @confirm="onSearch"
       v-model:loading="inSearching"
@@ -58,6 +58,7 @@
       :pagination="tablePageOptions"
       :scroll="{ x: 1200, y: 600 }"
       @change="handleTableChange"
+      size="small"
       bordered
     >
       <template #opertate="{ text, record }">

+ 9 - 0
types/window.d.ts

@@ -1,8 +1,17 @@
+/*
+ * @Author: your name
+ * @Date: 2020-11-23 14:07:39
+ * @LastEditTime: 2021-06-01 11:30:52
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \precise_delivery_distribution_front\types\window.d.ts
+ */
 import type { App } from 'vue';
 
 declare global {
   declare interface Window {
     __APP__: App<Element>;
+    WebKitMutationObserver:any;
   }
   declare interface String {
     parse<T>(): T | null | undefined;

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2688 - 2495
yarn.lock