xia 4 年 前
コミット
14eadb2e49

+ 0 - 1
.env.development

@@ -2,5 +2,4 @@ NODE_ENV = development
 VUE_APP_BASE_URL = '/'
 VUE_APP_PUB_URL = '/'
 PROXY_API_URL = 'https://t-promoter.58duke.com/'
-
 MAIN_API_URL = 'https://t-promoter.58duke.com/'

+ 8 - 0
src/api/index.ts

@@ -440,3 +440,11 @@ export const getadDataSum = (
 ) => {
   return axios("/ad/adSumData", { params: query });
 };
+
+//设置回传付费最低金额
+export const setBackMinimum = (data: {
+  advertiser_id: string;
+  back_min_price: number | string;
+}) => {
+  return axios.post("/setAdAdvertiserBackMinPrice", data);
+};

+ 16 - 8
src/views/_pageOptions/table-put.ts

@@ -706,7 +706,7 @@ export const AdCoundCloumn:Array<colunm>= [
       {
         title: "总计",
         dataIndex: "campaign_name",
-        width: 200,
+        width: 160,
         slots: {
           customRender: "info",
         },
@@ -721,7 +721,7 @@ export const AdCoundCloumn:Array<colunm>= [
   {
     title: "账户预算(最低1000元)",
     dataIndex: "firle",
-    width: 130,
+    width: 160,
     slots: {
       customRender: "budget",
     },
@@ -734,31 +734,39 @@ export const AdCoundCloumn:Array<colunm>= [
   {
     title: "转化成本",
     dataIndex: "convert_cost",
-    width: 100,
+    width: 80,
   },
   {
     title: "展示量",
     dataIndex: "show",
-    width: 100,
+    width: 80,
   },
   {
     title: "点击量",
     dataIndex: "click",
-    width: 100,
+    width: 80,
   },
   {
     title: "点击率",
     dataIndex: "ctr",
-    width: 100,
+    width: 80,
   },
   {
     title: "转化数",
     dataIndex: "convert",
-    width: 100,
+    width: 80,
   },
   {
     title: "转化率",
     dataIndex: "convert_rate",
-    width: 100,
+    width: 80,
   },
+  {
+    title: "回传最小金额",
+    dataIndex: "back_min_price",
+    width: 130,
+    slots: {
+      customRender: "operte",
+    },
+  }
 ];

+ 30 - 11
src/views/put/ad-countdata.vue

@@ -50,6 +50,14 @@
             @change="(val) => onCellChange(record, 'budget', val)"
           />
         </template>
+        <template #operte="{ text, record }">
+          <editable-cell
+            :text="`${text}`"
+            :minValue="0"
+            title="回传最小金额设置"
+            @change="(val) => onCellChange(record, 'min_amout', val)"
+          />
+        </template>
       </a-table>
     </template>
   </div>
@@ -66,6 +74,7 @@ import {
   setGroupStatus,
   setGroupDay,
   ALLAcountGroupData,
+  setBackMinimum
 } from "@/api";
 import usePagination from "@/hooks/usePagination";
 import EditableCell from "@/components/edit-cell/index.vue";
@@ -88,7 +97,7 @@ const Adgroup = defineComponent({
       pickered: [moment().subtract(30, "d"), moment()],
       columns: ref<any[]>([]),
       fields: {},
-      tableLoading:false,
+      tableLoading: false,
       cost_order: 0,
       balance_order: 0,
       showTable: false,
@@ -130,7 +139,7 @@ const Adgroup = defineComponent({
         const { data: totals } = await ALLAcountGroupData(datas);
 
         let mainCloumn = AdCoundCloumn.map((r) => {
-          if (r.dataIndex != "firle" && r.dataIndex !== "campaign_name") {
+          if (r.dataIndex != "firle" && r.dataIndex !== "campaign_name" && r.dataIndex!=='back_min_price') {
             r.children = [
               {
                 title: totals[r.dataIndex],
@@ -206,15 +215,25 @@ const Adgroup = defineComponent({
   methods: {
     moment,
     onCellChange(record: any, dataIndex: string, value: string) {
-      let data = {
-        advertiser_id: record.advertiser_id,
-        budget_mode:
-          value == "不限" ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY",
-        budget: value == "不限" ? "0" : Number(value),
-      };
-      setGroupDay(data).then((res) => {
-        this.$message.success("修改成功!");
-      });
+      if (dataIndex === "budget") {
+        let data = {
+          advertiser_id: record.advertiser_id,
+          budget_mode:
+            value == "不限" ? "BUDGET_MODE_INFINITE" : "BUDGET_MODE_DAY",
+          budget: value == "不限" ? "0" : Number(value),
+        };
+        setGroupDay(data).then((res) => {
+          this.$message.success("修改成功!");
+        });
+      } else {
+        let data = {
+          advertiser_id: record.advertiser_id,
+          back_min_price: value
+        }
+        setBackMinimum(data).then(res=>{
+          this.$message.success("修改成功!");
+        })
+      }
     },
   },
 });

+ 1 - 1
src/views/put/put-ad-plan.vue

@@ -61,7 +61,7 @@
         @change="handleTableChange"
         rowKey="id"
         bordered
-        :scroll="{ x: 3000, y: scrollY }"
+        :scroll="{ x: 1600, y: scrollY }"
       >
         <template #switch="{ text, record }">
           <a-switch