Browse Source

快手修改橙子建站

Szx 3 năm trước cách đây
mục cha
commit
9830b71168

+ 2 - 0
src/api/index.ts

@@ -119,6 +119,7 @@ export const upDateReportConfigApi =(query:{
   appflag:string,
   rate:string,
   condition:string,
+  price:string
 })=>{
   return axios("/yuewenfx/updateReportConfig",{params:query})
 }
@@ -465,6 +466,7 @@ export const setChannelRate = (data: {
   rate: string | number;
   channel_id: string;
   report_platform?: string
+  
 }) => {
   return axios.post("/setChannelConfig", data);
 };

+ 1 - 1
src/components/tool-bar/index.vue

@@ -16,7 +16,7 @@
         <template #icon>
           <search-outlined />
         </template>
-        查询
+        搜索
       </a-button>
       <a-button type="primary" @click="reset" style="margin-left: 10px">
         <template #icon>

+ 30 - 9
src/views/_pageOptions/table-account.ts

@@ -1,4 +1,4 @@
-import { right } from "@antv/g2plot/lib/plots/sankey/sankey";
+import { left, right } from "@antv/g2plot/lib/plots/sankey/sankey";
 
 /*
  * @Author: your name
@@ -72,25 +72,24 @@ export const TableColumnOfLog = [
   {
     title: "订单名称",
     dataIndex: "order_no",
-    ellipsis: true,
+    width:"140",
+    fixed:"left",
   },
   {
     title: "uid",
     dataIndex: "uid",
-    ellipsis: true,
+    width: 140,
   },
   {
     title: "计划平台",
     dataIndex: "report_platform",
-    ellipsis: true,
   },
   {
     title: "注册时间",
     dataIndex: "register_time",
-    ellipsis: true,
   },
   {
-    title: "支付时间",
+    title: "充值时间",
     width: 140,
     dataIndex: "pay_time",
   },
@@ -102,12 +101,34 @@ export const TableColumnOfLog = [
   {
     title: "回传状态",
     width: 140,
-    dataIndex: "report_status",
+    dataIndex: "",
+  },
+  {
+    title: "备注",
+    width: 140,
+    dataIndex: "reason",
+  },
+  {
+    title: "回传百分比(%)",
+    width: 140,
+    dataIndex: "rate",
+  },
+  {
+    title: "回传配置百分比(%)",
+    width: 140,
+    dataIndex: "config_rate",
+  },
+  {
+    title: "计划ID",
+    width: 140,
+    dataIndex: "ad_id",
   },
   {
     title: "操作",
     dataIndex: "action",
-    width: 250,
+    width: 140,
+    fixed:"right",
+
     slots: {
       customRender: "report_status",
     },
@@ -125,7 +146,7 @@ export const TableColumnOfOrange = [
     ellipsis: true,
   },
   {
-    title: "回传比例",
+    title: "回传比例 (%)",
     dataIndex: "rate",
     ellipsis: true,
   },

+ 111 - 227
src/views/account/kuaishou.vue

@@ -7,16 +7,6 @@
       @confirm="onSearch"
       @cancel="onCancel"
     >
-      <!-- <div class="tool-bar-item">
-        <p class="label">回传方式</p>
-        <a-select class="full-width" v-model:value="query.report_module">
-          <a-select-option key="all" :value="''">全部</a-select-option>
-          <a-select-option key="channel" value="channel"
-            >按站点回传</a-select-option
-          >
-          <a-select-option key="ad" value="ad">按计划回传</a-select-option>
-        </a-select>
-      </div> -->
     </tool-bar>
     <a-table
       rowKey="id"
@@ -27,16 +17,8 @@
       bordered
       :data-source="list"
       @change="onLoadOfficials"
+      
     >
-      <!-- <template #rate="{ text, record }">
-        <editable-cell
-          :text="`${text}`"
-          title="回传比例"
-          :maxValue="100"
-          :minValue="1"
-          @change="(val) => onCellChange(record, 'rate', val)"
-        />
-      </template> -->
       <template #module="{ record }">
         <p>{{ moduleType[record.report_module] }}</p>
       </template>
@@ -52,151 +34,78 @@
           回传配置
         </a-button>
         <a-button style="margin-left: 5px" @click="getLogs(record)">
-          操作日志
+          回传日志
         </a-button>
       </template>
-      <!-- <template #operte="{ text, record }">
-        <p
-          v-clipboard:copy="record.fans_add_monitor_link"
-          v-clipboard:success="copySuccess"
-        >
-          <a>复制监测链接</a>
-        </p>
-      </template> -->
     </a-table>
     <!-- 站点回传配置drawer -->
-    <a-drawer
+    <a-modal
       v-model:visible="visible"
       title="回传配置"
       width="40%"
       class="drawer-back-config"
+      @ok="handleOk"
+      centered="true"
     >
-      <div class="wrap-box">
-        <p class="title">回传方式</p>
-        <a-radio-group
-          v-model:value="report_module"
-          @change="showConfig = report_module == 'ad' ? false : true"
-        >
-          <a-radio value="ad">计划</a-radio>
-          <a-radio value="channel">站点</a-radio>
-        </a-radio-group>
-        <a href="javascript:;" @click="onReportModuleChange">保存</a>
-      </div>
-      <div class="wrap-box" v-show="!showConfig">
-        <p class="title">按计划回传配置</p>
-        <a-form :label-col="{ span: 6 }" :wrapper-col="{ offset: 1, span: 11 }">
-          <a-form-item label="回传比例">
-            <a-input-number v-model:value="ad_config.rate" />
-          </a-form-item>
-          <a-form-item :wrapper-col="{ offset: 7 }">
-            <a-button type="primary" @click="onRateChange"> 保存 </a-button>
-          </a-form-item>
-        </a-form>
-      </div>
-      <div class="wrap-box" v-show="showConfig">
-        <p class="title">按站点回传配置</p>
-        <a-tabs size="small" @change="onTabChange">
-          <a-tab-pane
-            v-for="(d, i) in popForm"
-            :key="i"
-            :tab="d.desc"
-          ></a-tab-pane>
-        </a-tabs>
-        <a-form :label-col="{ span: 6 }" :wrapper-col="{ offset: 1, span: 11 }">
-          <a-form-item label="回传条件">
-            <a-select
-              style="width: 150px"
-              size="small"
-              v-model:value="popForm[currentTab].condition"
-            >
-              <a-select-option
-                :value="item.name"
-                v-for="item in popForm[currentTab].report_conditions"
-                :key="item.name"
-              >
-                {{ item.desc }}
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-          <a-form-item label="回传开关">
-            <a-switch
-              v-model:checked="popForm[currentTab].back_on"
-              checked-children="开"
-              un-checked-children="关"
-            />
-          </a-form-item>
-          <a-form-item label="回传比例">
-            <a-input
-              v-model:value="popForm[currentTab].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, 0.45)" />
-                </a-tooltip>
-              </template>
-            </a-input>
-          </a-form-item>
-          <a-form-item label="回传平台">
-            <a-input
-              v-model:value="popForm[currentTab].back_platform"
-              disabled
-              size="small"
-              style="width: 150px"
-            />
-          </a-form-item>
-          <a-form-item
-            label="回传付费最低金额"
-            v-if="popForm[currentTab].report_type === 'recharge'"
+      <a-form :label-col="{ span: 6 }" :wrapper-col="{ offset: 1, span: 11 }">
+        <a-form-item label="回传条件">
+          <a-select
+            style="width: 150px"
+            size="small"
+            v-model:value="popForm[currentTab].condition"
           >
-            <a-input
-              v-model:value="popForm[currentTab].price"
-              size="small"
-              style="width: 150px"
-              type="number"
-              placeholder="回传付费最低金额"
-            />
-          </a-form-item>
-          <a-form-item label="浮动回传比例">
-            <a-input
-              v-model:value="popForm[currentTab].float_rate"
-              size="small"
-              style="width: 150px"
-              type="number"
-              placeholder="浮动回传比例"
+            <a-select-option
+              :value="item.name"
+              v-for="item in popForm[currentTab].report_conditions"
+              :key="item.name"
             >
-              <template #suffix>
-                <a-tooltip title="浮动比例小于固定回传比例">
-                  <info-circle-outlined style="color: rgba(0, 0, 0, 0.45)" />
-                </a-tooltip>
-              </template>
-            </a-input>
-          </a-form-item>
-          <a-form-item :wrapper-col="{ offset: 7 }">
-            <a-button
-              :disabled="!hasPopFormData"
-              :loading="saving"
-              type="primary"
-              @click="onSaveConfig"
-            >
-              保存
-            </a-button>
-          </a-form-item>
-        </a-form>
-      </div>
-    </a-drawer>
+              {{ item.desc }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item label="回传比例">
+          <a-input
+            v-model:value="ad_config.rate"
+            size="small"
+            style="width: 150px"
+            type="number"
+            placeholder="回传比例"
+            :min="0"
+            :max="100"
+          >
+            <template #suffix>
+              <a-tooltip title="比例0-100">
+                <info-circle-outlined style="color: rgba(0, 0, 0, 0.45)" />
+              </a-tooltip>
+            </template>
+          </a-input>
+        </a-form-item>
+        <a-form-item label="回传付费最低金额">
+          <a-input
+            v-model:value="ad_config.lowestMoney"
+            size="small"
+            style="width: 150px"
+            type="number"
+            placeholder="回传比例"
+          >
+            <template #suffix>
+              <a-tooltip title="元">
+                <span>元</span>
+              </a-tooltip>
+            </template>
+          </a-input>
+        </a-form-item>
+      </a-form>
+    </a-modal>
     <!--回传日志-->
-    <a-drawer title="日志详情"
+    <a-drawer
+      title="回传日志"
       placement="right"
       :closable="true"
       width="80%"
-      v-model:visible="visibleLog">
-      <log-list :visible="visibleLog" :channel_id="curChannel_id">
-
-      </log-list>
+      v-model:visible="visibleLog"
+    >
+      <log-list :visible="visibleLog" :channel_id="curChannel_id"> </log-list>
     </a-drawer>
   </div>
 </template>
@@ -221,9 +130,10 @@ import {
   getOfficialAccounts,
   setChannelRate,
   getOfficialBackConfig,
+  backLogList,
 } from "@/api";
 import { IOfficials, PlanBack } from "#/api";
-import { message } from "ant-design-vue";
+import { message, Popconfirm } from "ant-design-vue";
 import { InfoCircleOutlined } from "@ant-design/icons-vue";
 import {
   setOfficialBackConfig,
@@ -235,7 +145,7 @@ const Account = defineComponent({
     ToolBar,
     EditableCell,
     InfoCircleOutlined,
-    logList
+    logList,
   },
   setup() {
     let { loading, meta, tablePageOptions } = usePagination();
@@ -263,7 +173,7 @@ const Account = defineComponent({
           back_on: false,
           rate: 0,
           condition: "",
-          price: 0,
+          price: 30,
           float_rate: 0,
           desc: "",
         },
@@ -272,32 +182,36 @@ const Account = defineComponent({
         channel_id: "",
         id: 0,
         rate: 0,
+        lowestMoney: 30,
+        condition: "current_day_register_first_recharge",
       },
       report_module: "ad",
       report_channel_id: 0,
       showConfig: false,
       visible: false,
       saving: false,
-      visibleLog:false,
-      curChannel_id:0,
+      visibleLog: false,
+      curChannel_id: 0,
       currentTab: 0,
     });
 
     const onSearch = (fields: Record<string, string>) => {
       const { name } = fields;
       state.query.official_name = name;
+      console.log(1);
       onLoadOfficials();
     };
+    //取消时触发
     const onCancel = () => {
-      // state.query.report_status = -1;
       state.query.report_module = "";
       onSearch({ name: "" });
+      onLoadOfficials();
     };
 
     const onLoadOfficials = (query?: { current: number }) => {
       let params = JSON.parse(JSON.stringify(state.query));
       if (query) params.page = query.current;
-      params.report_platform = 'kuaishou';
+      params.report_platform = "kuaishou";
       loading.value = true;
       // if (state.query.report_status === -1) delete params.report_status;
       if (state.query.report_module === "") delete params.report_module;
@@ -308,15 +222,23 @@ const Account = defineComponent({
         state.searching = false;
       });
     };
-
+    //获得公众号"/userOfficialAccounts"
     onMounted(onLoadOfficials);
 
     const initBackData = async (item: IOfficials) => {
       try {
-        const { data } = await getOfficialBackConfig(item.channel_id,'kuaishou');
+        const { data } = await getOfficialBackConfig(
+          item.channel_id,
+          "kuaishou"
+        );
+        console.log(item);
+        if (data.channel_configs[0].id) {
+          state.ad_config.id = +data.channel_configs[0].id;
+        }
         state.ad_config.channel_id = data.ad_config.channel_id;
-        state.ad_config.id = data.ad_config.id;
-        state.ad_config.rate = data.ad_config.rate;
+        console.log(state.ad_config.id);
+        console.log(state.ad_config.channel_id);
+        state.ad_config.rate = data.channel_configs[0].rate;
         state.report_module = data.report_module;
         state.showConfig = data.report_module == "ad" ? false : true;
         state.report_channel_id = +data.channel_id;
@@ -330,70 +252,43 @@ const Account = defineComponent({
           ? (state.hasPopFormData = true)
           : (state.hasPopFormData = false);
         state.popForm = list;
+        console.log(state.popForm)
         state.visible = true;
       } catch (error) {
         console.log("error happened in get back plan data:", error.message);
       }
     };
-
+  const handlechange=(value:string)=>{
+      console.log(value)
+      state.ad_config.condition=value
+      console.log( state.ad_config.condition)
+  }
     const onTabChange = (key: number) => {
       state.currentTab = key;
     };
 
-    const onRateChange = () => {
-      const { rate, channel_id } = state.ad_config;
-      setChannelRate({ rate, channel_id,report_platform:'kuaishou' }).then((res) => {
-        onLoadOfficials();
-        message.success("修改回传比例成功!");
-        state.visible = false;
-      });
-    };
-    const onReportModuleChange = () => {
-      // state.showConfig = state.report_module == "ad" ? false : true;
-      onUpdateOfficialReportType(
-        state.report_channel_id,
-        state.report_module,
-        "kuaishou"
-      ).then((_) => {
-        onLoadOfficials();
-        message.success("修改回传方式成功!");
-      });
-    };
-
-    const onSaveConfig = () => {
-      let { id, back_on, rate, condition, price, float_rate } =
-        state.popForm[state.currentTab];
-      if (float_rate && float_rate >= rate) {
-        message.error("浮动比例必须小于固定回传比例");
-        return;
-      }
-
-      state.saving = true;
+    //保存站点回传比例
 
+    const SaveConfig = async () => {
+      state.visible = false;
       let data = {
-        id,
-        back_on: Number(back_on),
-        rate,
-        condition,
-        price,
-        float_rate,
-        report_platform:'kuaishou'
+        rate: state.ad_config.rate,
+        condition: state.popForm[state.currentTab].condition,
+        price: state.ad_config.lowestMoney,
+        report_platform: "kuaishou",
+        id: state.ad_config.id,
       };
-
-      setOfficialBackConfig(data)
-        .then((_) => {
-          onLoadOfficials();
-          message.success("保存成功");
-          state.visible = false;
-        })
-        .catch((e) => {
-          message.error(e.message || e.msg || "系统错误");
-        })
-        .finally(() => {
-          state.saving = false;
-        });
+      const res = await setOfficialBackConfig(data);
+      state.ad_config.lowestMoney = 30;
+      if (res.data.success == 0) {
+        message.success("保存成功");
+      }
+      onLoadOfficials()
+    };
+    //确定时提交表单
+    const handleOk = () => {
+      SaveConfig();
     };
-
     return {
       ...toRefs(state),
       loading,
@@ -403,25 +298,14 @@ const Account = defineComponent({
       onLoadOfficials,
       initBackData,
       onTabChange,
-      onRateChange,
-      onSaveConfig,
-      onReportModuleChange,
+      handleOk,
+      handlechange
     };
   },
   methods: {
-    copySuccess() {
-      this.$message.success("复制成功");
-    },
-    onCellChange(record: any, dataIndex: string, value: string) {
-      setChannelRate({ rate: value, channel_id: record.channel_id }).then(
-        (res) => {
-          this.$message.success("修改回传比例成功!");
-        }
-      );
-    },
-    getLogs(record:any){
-        this.curChannel_id = record.channel_id;
-        this.visibleLog = true;
+    getLogs(record: any) {
+      this.curChannel_id = record.channel_id;
+      this.visibleLog = true;
     },
   },
 });

+ 8 - 4
src/views/account/log.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <tool-bar :text="['uid']" :label="['uid']" v-model:loading="inSearching" @confirm="onSearch">
+    <tool-bar :text="['uid']" :label="['uid']" v-model:loading="inSearching" @confirm="onSearch" @cancel="onCancel">
       <template #picker>
         <p class="label">充值日期</p>
         <a-range-picker
@@ -19,6 +19,8 @@
       rowKey="order_no"
       :loading="loading"
       :pagination="tablePageOptions"
+      :scroll="{ x: 1650, y: 3000 }"
+
     >
       <template #report_status="{ text, record }">
         <p v-if="record.report_status == 'success'">已上报</p>
@@ -108,7 +110,6 @@ const CommonTable = defineComponent({
           moment(state.pickered[1]).format("YYYY-MM-DD"),
         ].join(",");
       }
-
       getList();
     };
     //强制回传
@@ -127,14 +128,17 @@ const CommonTable = defineComponent({
         store.commit(MutationType.setSelectTime, string);
       }
     };
-
+    const onCancel =()=>{
+      getList()
+    }
     return {
       ...toRefs(state),
       tablePageOptions,
       getList,
       confirmEdit,
       onSearch,
-      changeTime
+      changeTime,
+      onCancel
     };
   },
   mounted() { },

+ 150 - 149
src/views/account/orange.vue

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

+ 155 - 105
src/views/account/orangeform.vue

@@ -1,124 +1,174 @@
 <template>
-    <div>
-        <a-form :layout="formState.layout" :model="formState" v-bind="formItemLayout">
-            <a-form-item label=" 回传条件">
-                <a-select v-model:value="formState.condition" placeholder="请选择">
-                    <a-select-option value="注册且充值金额不小于30元">注册且充值金额不小于30元</a-select-option>
-                    <a-select-option value="充值金额不小于30元">充值金额不小于30元</a-select-option>
-                </a-select>
-            </a-form-item>
-            <a-form-item label="回传比例">
-                <a-input addon-after="%" v-model:value="formState.rate" placeholder="请输入回传比例" />
-            </a-form-item>
-            <!-- <a-form-item :wrapper-col="buttonItemLayout.wrapperCol">
+  <div>
+    <a-form
+      :layout="formState.layout"
+      :model="formState"
+      v-bind="formItemLayout"
+      :label-col="{ span: 6}" :wrapper-col="{ offset: 1, span: 11 }"
+    >
+      <a-form-item label=" 回传条件">
+        <a-select
+          v-model:value="formState.condition"
+          style="width: 150px"
+          size="small"
+        >
+          <a-select-option :value="'current_day_register_first_recharge'"
+            >当日注册当日首充</a-select-option
+          >
+          <a-select-option :value="' recharge_not_less_than_min_price'"
+            >充值金额不小于30元</a-select-option
+          >
+        </a-select>
+      </a-form-item>
+      <a-form-item label="回传比例">
+        <a-input
+          style="width: 150px"
+          v-model:value="formState.rate"
+          placeholder="请输入回传比例"
+          :min="0"
+          :max="100"
+          type="number"
+        >
+          <template #suffix>
+            <a-tooltip title="比例0-100">
+              <info-circle-outlined style="color: rgba(0, 0, 0, 0.45)" />
+            </a-tooltip>
+          </template>
+        </a-input>
+      </a-form-item>
+      <a-form-item label="回传付费最低金额">
+        <a-input
+          v-model:value="formState.price"
+          size="small"
+          style="width: 150px"
+          type="number"
+          placeholder="回传比例"
+        >
+          <template #suffix>
+            <a-tooltip title="元">
+              <span>元</span>
+            </a-tooltip>
+          </template>
+        </a-input>
+      </a-form-item>
+      <!-- <a-form-item :wrapper-col="buttonItemLayout.wrapperCol">
                 <a-button type="primary" @click="submit">确定</a-button>
                 <span style="padding:20px;"></span>
                 <a-button type="primary" @click="cancel">取消</a-button>
             </a-form-item>-->
-        </a-form>
-    </div>
+    </a-form>
+  </div>
 </template>
 <script lang="ts">
 import {
-    computed,
-    defineComponent,
-    reactive,
-    UnwrapRef,
-    toRefs,
-    onMounted,
-    ref,
-    watch,
+  computed,
+  defineComponent,
+  reactive,
+  UnwrapRef,
+  toRefs,
+  onMounted,
+  ref,
+  watch,
 } from "vue";
 import { upDateReportConfigApi } from "@/api";
 import { message } from "ant-design-vue";
 interface FormState {
-    layout: "horizontal" | "vertical" | "inline";
-    condition: string;
-    rate: string;
+  layout: "horizontal" | "vertical" | "inline";
+  condition: string;
+  rate: string;
+  price: string;
 }
 interface OrangeForm {
-    value: string;
-    reportresult: {
-        appflag: string;
-        rate: string;
-        condition: string;
-    };
+  value: string;
+  reportresult: {
+    appflag: string;
+    rate: string;
+    condition: string;
+    price: string;
+  };
 }
 export default defineComponent({
-    name:'OrangeForm',
-    props: {
-        formrate: String || undefined,
-    },
-    emits: ["getShowFlag",'handleOk'],
-    setup(props, ctx) {
-        const state: OrangeForm = reactive({
-            value: "",
-            reportresult: {
-                appflag: "",
-                rate: "",
-                condition: "",
-            },
-        });
-        const showFlag = reactive({
-            showflag: true
-        })
-        const formState: UnwrapRef<FormState> = reactive({
-            layout: "horizontal",
-            rate: "100",
-            condition: "",
-        });
-        const OrangeFormMsg=ref('OrangeForm')
-        const formItemLayout = computed(() => {
-            const { layout } = formState;
-            return layout === "horizontal"
-                ? {
-                    labelCol: { span: 4 },
-                    wrapperCol: { span: 14 },
-                }
-                : {};
-        });
-        const buttonItemLayout = computed(() => {
-            const { layout } = formState;
-            return layout === "horizontal"
-                ? {
-                    wrapperCol: { span: 14, offset: 4 },
-                }
-                : {};
-        });
-        //获得app标识
-        console.log(props.formrate);
-        watch(props, () => {
-            console.log(props.formrate);
-            formState.rate = props.formrate as string;
-        });
+  name: "OrangeForm",
+  props: {
+    formrate: String || undefined,
+  },
+  emits: ["getShowFlag", "handleOk", "initOrangeList", "add"],
+  setup(props, ctx) {
+    const state: OrangeForm = reactive({
+      value: "",
+      reportresult: {
+        appflag: "",
+        rate: "",
+        condition: "",
+        price: "",
+      },
+    });
+    const showFlag = reactive({
+      showflag: true,
+    });
+    const formState: UnwrapRef<FormState> = reactive({
+      layout: "horizontal",
+      rate: "100",
+      condition: "",
+      price: "30",
+    });
+    const OrangeFormMsg = ref("OrangeForm");
+    const formItemLayout = computed(() => {
+      const { layout } = formState;
+      return layout === "horizontal"
+        ? {
+            labelCol: { span: 4 },
+            wrapperCol: { span: 14 },
+          }
+        : {};
+    });
+    const buttonItemLayout = computed(() => {
+      const { layout } = formState;
+      return layout === "horizontal"
+        ? {
+            wrapperCol: { span: 14, offset: 4 },
+          }
+        : {};
+    });
+    //获得app标识
+    console.log(props.formrate);
+    watch(props, () => {
+      console.log(props.formrate);
+      formState.rate = props.formrate as string;
+    });
+
+    onMounted(() => {
+      formState.rate = props.formrate as string;
+    });
+    const submit = async () => {
+      state.reportresult.rate = formState.rate;
+      state.reportresult.condition = formState.condition;
+      state.reportresult.appflag = localStorage.getItem("OrangeAppflag") || "0";
+      state.reportresult.price = formState.price;
+      console.log(state.reportresult);
+      const res = await upDateReportConfigApi(state.reportresult);
+      if (res.data.result == 1) {
+        console.log(res.data.result);
+        ctx.emit("initOrangeList");
+        console.log(ctx, "ctx");
+        ctx.emit("add");
+        message.success("修改回传比例成功!");
+        formState.price = "30";
+      } else {
+        message.error("修改失败,暂无配置");
+      }
+      ctx.emit("getShowFlag", showFlag.showflag);
+    };
+    //点击关闭抽屉层
 
-        onMounted(() => {
-            formState.rate = props.formrate as string;
-        });
-        const submit = async () => {
-            state.reportresult.rate = formState.rate;
-            state.reportresult.condition = formState.condition;
-            state.reportresult.appflag = localStorage.getItem("OrangeAppflag") || "0";
-            console.log(state.reportresult);
-            const res = await upDateReportConfigApi(state.reportresult);
-            if (res.data.result == 1) {
-                console.log(res.data.result)
-                message.success("修改回传比例成功!");
-            } else {
-                message.error("修改失败,暂无配置");
-            }
-            ctx.emit('getShowFlag', showFlag.showflag)
-        };
-        //点击关闭抽屉层
-   
-        return {
-            formState,
-            formItemLayout,
-            buttonItemLayout,
-            ...toRefs(state),
-            submit,
-            OrangeFormMsg
-        };
-    },
+    return {
+      formState,
+      formItemLayout,
+      buttonItemLayout,
+      ...toRefs(state),
+      submit,
+      OrangeFormMsg,
+    };
+  },
 });
 </script>

+ 3 - 4
src/views/account/orangelog.vue

@@ -128,16 +128,15 @@ export default defineComponent({
         //强制回传操作
         const getOrangeActionRes = async () => {
             const res = await getforceReportApi(state.orangeActionList as any)
-            console.log(res.data.result)
             
         }
         const orangeAction = (record: ILogitem) => {
-            console.log(record)
-            console.log(1)
             state.orangeActionList.guid = record.guid
             state.orangeActionList.reportType = record.report_type
             state.orangeActionList.platform = record.platform
-            getOrangeActionRes()
+            console.log(1)
+            // getOrangeActionRes()
+            getLogOrangeList()
         }
         return {
             ...toRefs(state),