daiqisheng пре 3 година
родитељ
комит
6c7c00facc

+ 19 - 1
src/pages/main/performance/components/form.vue

@@ -2,7 +2,7 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-11-01 18:03:02
  * @LastEditors: daiqisheng
- * @LastEditTime: 2022-03-31 16:39:39
+ * @LastEditTime: 2022-04-06 16:57:36
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\form.vue
 -->
 <template>
@@ -157,6 +157,24 @@ export default {
   data: () => ({
     object: {},
   }),
+  // watch: {
+  //   form() {
+  //     this.form.forEach((el) => {
+  //       if (el.default) {
+  //         this.object[el.props] = el.default;
+  //         console.log(this.object[el.props], "this.object[el.props]");
+  //       }
+  //     });
+  //   },
+  // },
+  created() {
+    this.form.forEach((el) => {
+      if (el.default) {
+        this.object[el.props] = el.default;
+        console.log(this.object[el.props], "this.object[el.props]");
+      }
+    });
+  },
   methods: {
     handleSearch() {
       this.$emit("search", this.object);

+ 35 - 6
src/pages/main/performance/department.vue

@@ -10,6 +10,7 @@
         @check="handleCheck"
         @edit="handleEdit"
         @delete="handleDelete"
+        @remove="handleRemove"
         @urge="handleUrge"
         @receiverName="handleReceiver"
       ></simple-table>
@@ -481,20 +482,28 @@ export default {
           },
         },
         {
-          label: "催办",
-          props: "urge",
+          label: "撤回",
+          props: "delete",
+          popconfirm: true,
           visible: {
-            superviseFlag: ["1"],
+            withdrawFlag: ["0"],
           },
         },
         {
-          label: "撤回",
-          props: "delete",
+          label: "删除",
+          props: "remove",
           popconfirm: true,
           visible: {
             withdrawFlag: ["0"],
           },
         },
+        {
+          label: "催办",
+          props: "urge",
+          visible: {
+            superviseFlag: ["1"],
+          },
+        },
       ],
       //  表头配置
       table_config: [
@@ -719,6 +728,26 @@ export default {
         });
       });
     },
+    handleRemove({ id }) {
+      console.log(id, "id");
+      this.$http({
+        url: "/market/CMKIssued/CMKRemoveIssuedById",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          id,
+        },
+      }).then(() => {
+        this.$message.success("删除成功, 请重新创建模版");
+        this.handleInit({
+          ...this.table_search,
+          page: this.page,
+          pageSize: this.rows,
+        });
+      });
+    },
     // dialog事件
     //权限管理事件
     handleApprove() {
@@ -1031,7 +1060,7 @@ export default {
       }
       return arr.join(",");
     },
-    handleUrge(){
+    handleUrge() {
       console.log("这里是催办的方法");
     },
     handleConfirm(visible) {

+ 9 - 2
src/pages/main/performance/reply.vue

@@ -41,9 +41,10 @@ export default {
       table_search: {},
       table_form: [
         {
-          label: "统计月份",
+          label: "统计时间",
           props: "Time",
           type: "dateRange",
+          default: [new Date(), new Date().setDate(new Date().getDate() + 1)],
         },
         {
           label: "模板类型",
@@ -225,7 +226,13 @@ export default {
     },
   },
   mounted() {
-    this.handleInit({});
+    this.handleInit({
+      startTime: this.$formatDate(new Date(), "YYYY-MM-DD"),
+      endTime: this.$formatDate(
+        new Date().setDate(new Date().getDate() + 1),
+        "YYYY-MM-DD"
+      ),
+    });
   },
 };
 </script>