xia %!s(int64=4) %!d(string=hai) anos
pai
achega
10dea6748e

+ 2 - 0
src/api/index.ts

@@ -288,6 +288,8 @@ export const getRegisterData = (
   query: Partial<{
     ad_lid: number;
     back_platform: string;
+    is_paid:number;
+    show_all:number;
     page: number;
   }> = { page: 1 }
 ): AxiosPromise<IList<RegisterData>> => {

+ 2 - 0
src/plugins/install.ts

@@ -6,6 +6,7 @@ import {
   Form,
   Input,
   Layout,
+  Radio,
   Menu,
   message,
   Modal,
@@ -34,6 +35,7 @@ const install = (app: App<Element>) => {
 
   return app
     .use(VueClipboard3)
+    .use(Radio)
     .use(VueConfirmDirective)
     .use(VueQrCode)
     .use(ConfigProvider)

+ 18 - 2
src/views/_pageOptions/table-put.ts

@@ -574,6 +574,22 @@ export const MatchList = [
     width: 150,
   },
   {
+    title: "首次充值时间",
+    dataIndex: "first_recharge_time",
+    width: 150,
+  },
+  {
+    title: "首次充值金额",
+    dataIndex: "first_recharge_amount",
+    width: 150,
+  },
+  {
+    title: "充值总额",
+    dataIndex: "recharge_total",
+    width: 150,
+  },
+
+  {
     title: "注册上报",
     dataIndex: "report_register_num",
     width: 100,
@@ -589,9 +605,9 @@ export const MatchList = [
       customRender: "report_recharge_num",
     },
   },
-/*   {
+   {
     title: "次留上报",
     dataIndex: "report_sactive_num",
     width: 100,
-  }, */
+  }, 
 ]

+ 13 - 9
src/views/put/put-ad-plan.vue

@@ -81,7 +81,7 @@
                 <a-tab-pane
                   v-for="(d, i) in popForm"
                   :key="i"
-                  :tab="`配置-${i + 1}`"
+                  :tab="d.desc"
                 ></a-tab-pane>
               </a-tabs>
             </div>
@@ -92,12 +92,10 @@
                 size="small"
                 v-model:value="popForm[currentTbs].condition"
               >
-                <a-select-option value="common">
-                  普通都回传
-                </a-select-option>
-                <a-select-option value="current_day_register">
-                  当日注册/当日付费
+                <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">
@@ -125,6 +123,15 @@
               </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"
@@ -138,10 +145,8 @@
               <a-popconfirm
                 title="是否要修改回传配置?"
                 ok-text="是"
-                :visible="popconfirmShow"
                 cancel-text="否"
                 @confirm="confirmEdit"
-                @visibleChange="handleVisibleChange"
               >
                 <a-button
                   type="primary"
@@ -432,7 +437,6 @@ const PutAdPlan = defineComponent({
       }
     },
     confirmEdit() {
-      console.log(this.currentTbs);
       let { id, back_on, rate, condition, price } = this.popForm[
         this.currentTbs
       ];

+ 70 - 21
src/views/put/register-data.vue

@@ -1,5 +1,20 @@
 <template>
   <div class="page-wrap page-wrap-put-books">
+    <div class="table-filter">
+      <div class="item-right">
+        <a-radio-group v-model:value="selectValue" @change="onChange">
+          <a-radio-button value="paid">
+            付费
+          </a-radio-button>
+          <a-radio-button value="unpaid">
+            未付费
+          </a-radio-button>
+          <a-radio-button value="all">
+            显示全部
+          </a-radio-button>
+        </a-radio-group>
+      </div>
+    </div>
     <a-table
       :columns="columns"
       :data-source="list"
@@ -20,7 +35,7 @@
           @confirm="confirmEdit"
         >
           <p
-            @click="mustUp(record, 'register','report_register_num')"
+            @click="mustUp(record, 'register', 'report_register_num')"
             v-if="record.report_register_num <= 0"
           >
             <a>强制回传</a>
@@ -38,8 +53,8 @@
           @confirm="confirmEdit"
         >
           <p
-            @click="mustUp(record, 'recharge','report_recharge_num')"
-             v-if="record.report_recharge_num <= 0"
+            @click="mustUp(record, 'recharge', 'report_recharge_num')"
+            v-if="record.report_recharge_num <= 0"
           >
             <a>强制回传</a>
           </p>
@@ -74,67 +89,101 @@ const RegisterDatad = defineComponent({
       loading,
       tablePageOptions,
       tableIndex: 0,
+      filterList:[],
+      selectValue: "all",
+      selectValueAll: 1,
+      selectValuePaid: 1,
       form: {
         report_type: "",
         uid: 0,
         platform: "",
-        val:''
+        val: "",
       },
     });
 
     const getData = (
       ad_lid = props.ad_lid,
-      back_platform = props.back_platform
+      back_platform = props.back_platform,
+      page = 1,
+      is_paid = 0,
+      show_all = 1
     ) => {
       getRegisterData({
         ad_lid,
         back_platform,
-        page: state.tablePageOptions.current,
-      }).then((res) => {
+        page,
+        is_paid,
+        show_all,
+      }).then((res:any) => {
         state.list = res.data.list;
         meta.value = res.data.meta;
+        let nCloumn = MatchList.filter(r=>{
+           return !res.data.hiddenFields.includes(r.dataIndex);  
+        })
+        state.columns = nCloumn;
+
       });
     };
     watchEffect(() => {
-      
-      getData(props.ad_lid, props.back_platform);
+      getData(
+        props.ad_lid,
+        props.back_platform,
+        1,
+        state.selectValuePaid,
+        state.selectValueAll
+      );
     });
+
+    const onChange = (e: any) => {
+      if (e.target.value == "all") {
+        state.selectValueAll = 1;
+      } else {
+        state.selectValueAll = 0;
+        if (e.target.value == "paid") {
+          state.selectValuePaid = 1;
+        } else {
+          state.selectValuePaid = 0;
+        }
+      }
+    };
+
     const handleTableChange = (pagination: PageOptions) => {
       const { current, pageSize, total } = pagination;
-      console.log(current)
       meta.value.current_page = current;
       getRegisterData({
         ad_lid: props.ad_lid,
         back_platform: props.back_platform,
+        is_paid: state.selectValuePaid,
+        show_all: state.selectValueAll,
         page: current,
       }).then((res) => {
         state.list = res.data.list;
         meta.value = res.data.meta;
       });
     };
-    return { ...toRefs(state), handleTableChange, meta };
+    return { ...toRefs(state), handleTableChange, meta, onChange };
   },
   methods: {
     confirmEdit() {
       setMustUpback(this.form).then((res) => {
         this.$message.success("修改成功!");
-         let list =  this.list.map((d:any,i:number)=>{
-             if(i==this.tableIndex){
-                 d[this.form.val] = 1;
-             }
-             return d;
-         });
-        this.list = list; 
+        let list = this.list.map((d: any, i: number) => {
+          if (i == this.tableIndex) {
+            d[this.form.val] = 1;
+          }
+          return d;
+        });
+        this.list = list;
       });
     },
-    mustUp(record: any, type: string,val:string) {
+    mustUp(record: any, type: string, val: string) {
       let { uid, platform } = record;
-      console.log(uid)
+      console.log(uid);
       this.form.uid = uid;
       this.form.platform = platform;
       this.form.val = val;
       this.form.report_type = type;
-      this.tableIndex = this.list.findIndex((r: any) => (r.uid == uid));
+      this.tableIndex = this.list.findIndex((r: any) => r.uid == uid);
     },
   },
 });