ソースを参照

RING:配置比例小数验证&公众号取消状态筛选和展示

ringcode 3 年 前
コミット
e409a322d8

+ 8 - 8
src/views/_pageOptions/table-account.ts

@@ -52,14 +52,14 @@ export const TableColumnOfAccount = [
       customRender: "rate"
     }
   },
-  {
-    title: "回传状态",
-    dataIndex: "report_status",
-    width: 150,
-    slots: {
-      customRender: "status"
-    }
-  },
+  // {
+  //   title: "回传状态",
+  //   dataIndex: "report_status",
+  //   width: 150,
+  //   slots: {
+  //     customRender: "status"
+  //   }
+  // },
   {
     title: "操作",
     dataIndex: "action",

+ 2 - 2
src/views/_pageOptions/table_yuewen.ts

@@ -26,7 +26,7 @@ export const TableColumnOfYuewen = [
 // 用户数据
 export const TableColumnOfUserData = [
   {
-    title: 'uuid',
+    title: 'uid',
     dataIndex: 'uid',
   },
   {
@@ -34,7 +34,7 @@ export const TableColumnOfUserData = [
     dataIndex: 'register_at',
   },
   {
-    title: '推广计划ID',
+    title: '计划ID',
     dataIndex: 'aid',
   },
   {

+ 7 - 7
src/views/account/account.vue

@@ -18,14 +18,14 @@
           >
         </a-select>
       </div> -->
-      <div class="tool-bar-item">
+      <!-- <div class="tool-bar-item">
         <p class="label">回传状态</p>
         <a-select class="full-width" v-model:value="query.report_status">
           <a-select-option :key="-1" :value="-1">全部</a-select-option>
           <a-select-option :key="1" :value="1">开启</a-select-option>
           <a-select-option :key="0" :value="0">关闭</a-select-option>
         </a-select>
-      </div>
+      </div> -->
       <div class="tool-bar-item">
         <p class="label">回传方式</p>
         <a-select class="full-width" v-model:value="query.report_module">
@@ -258,7 +258,7 @@ const Account = defineComponent({
         official_name: "",
         platform: "",
         page: 1,
-        report_status: -1,
+        // report_status: -1,
         report_module: "",
       },
       hasPopFormData: false,
@@ -292,7 +292,7 @@ const Account = defineComponent({
       onLoadOfficials();
     };
     const onCancel = () => {
-      state.query.report_status = -1;
+      // state.query.report_status = -1;
       state.query.report_module = "";
       onSearch({ name: "" });
     };
@@ -301,7 +301,7 @@ const Account = defineComponent({
       let params = JSON.parse(JSON.stringify(state.query));
       if (query) params.page = query.current;
       loading.value = true;
-      if (state.query.report_status === -1) delete params.report_status;
+      // if (state.query.report_status === -1) delete params.report_status;
       if (state.query.report_module === "") delete params.report_module;
       getOfficialAccounts(params).then(({ data }) => {
         state.list = data.list;
@@ -345,7 +345,7 @@ const Account = defineComponent({
     const onRateChange = () => {
       const { rate, channel_id } = state.ad_config;
       setChannelRate({ rate, channel_id }).then((res) => {
-        onLoadOfficials()
+        onLoadOfficials();
         message.success("修改回传比例成功!");
         state.visible = false;
       });
@@ -356,7 +356,7 @@ const Account = defineComponent({
         state.report_channel_id,
         state.report_module
       ).then((_) => {
-        onLoadOfficials()
+        onLoadOfficials();
         message.success("修改回传方式成功!");
       });
     };

+ 5 - 4
src/views/read/quick-app.vue

@@ -154,7 +154,7 @@ import UserData from "./components/user-data.vue";
 const PutDataIndex = defineComponent({
   components: { UserData },
   setup() {
-    let {  tablePageOptions } = usePagination();
+    let { tablePageOptions } = usePagination();
     const formRef = ref();
     const state = reactive({
       search: {
@@ -188,7 +188,7 @@ const PutDataIndex = defineComponent({
         ],
       },
     });
-    return { ...toRefs(state), formRef,tablePageOptions };
+    return { ...toRefs(state), formRef, tablePageOptions };
   },
   mounted() {
     this.getList({ current: 1 });
@@ -219,8 +219,7 @@ const PutDataIndex = defineComponent({
     },
     // 确认增加派单链接
     async onEmitLink() {
-      this.formRef.validate().then(() => {
-      });
+      this.formRef.validate().then(() => {});
       if (!this.addLink.channel_name) return message.warn("请输入渠道名称");
       if (!this.addLink.channel_id) return message.warn("请输入链接ID");
       if (!this.addLink.book_name) return message.warn("请输入推广作品");
@@ -253,6 +252,8 @@ const PutDataIndex = defineComponent({
     async onEmitRate() {
       if (this.rate > 100 || this.rate < 0)
         return message.error("回传比例应在0~100之间");
+      if (parseInt(this.rate) !== parseFloat(this.rate))
+        return message.warn("请输入整数");
       try {
         await updateReportConfig({
           channel_id: this.channelId,