谢杰标 2 жил өмнө
parent
commit
6cd8fa2250

+ 2 - 3
src/views/financed/cost/dislogSet.vue

@@ -293,17 +293,16 @@ export default {
       this.$refs["form"].resetFields();
       this.$refs["form"].resetFields();
     },
     },
     changeEduType() {},
     changeEduType() {},
-    submit() {},
     resetForm() {
     resetForm() {
       this.form = {
       this.form = {
         itemList: [
         itemList: [
           {
           {
             projectId: undefined,
             projectId: undefined,
             itemName: 456,
             itemName: 456,
-            itemCategory: "1",
+            itemCategory: 1,
             businessId: undefined,
             businessId: undefined,
             educationTypeId: 21,
             educationTypeId: 21,
-            itemType: "1",
+            itemType: 1,
             typeValue: undefined,
             typeValue: undefined,
             minValue: undefined,
             minValue: undefined,
             maxValue: undefined,
             maxValue: undefined,

+ 5 - 6
src/views/financed/cost/index.vue

@@ -24,7 +24,7 @@
         <el-checkbox
         <el-checkbox
           :true-label="1"
           :true-label="1"
           :false-label="0"
           :false-label="0"
-          @change="(val) => changeStatus(props.scope.row.tpId, val)"
+          @change="(val) => changeStatus(props.scope.row, val)"
           v-model="props.scope.row.defaultStatus"
           v-model="props.scope.row.defaultStatus"
         >
         >
         </el-checkbox>
         </el-checkbox>
@@ -133,18 +133,17 @@ export default {
       this.type = type;
       this.type = type;
       this.tpId = tpId;
       this.tpId = tpId;
     },
     },
-    changeStatus(tpId, defaultStatus) {
-      editDefaultStatus({ tpId, defaultStatus }).then((res) => {
+    changeStatus({ tpId, tenantId }, defaultStatus) {
+      editDefaultStatus({ tpId, tenantId, defaultStatus }).then((res) => {
         this.$message.success("状态修改成功");
         this.$message.success("状态修改成功");
         this.search();
         this.search();
       });
       });
     },
     },
     batchDel() {
     batchDel() {
-      let len = this.$refs.tableList.allCheckData.length;
-      if (!len) {
+      const ids = this.$refs.tableList.allCheckData.map((item) => item.tpId);
+      if (!ids.length) {
         return this.$message.warning("请先勾选模板");
         return this.$message.warning("请先勾选模板");
       }
       }
-      const ids = this.$refs.tableList.allCheckData.map((item) => item.tpId);
       this.handelDel(ids, 1);
       this.handelDel(ids, 1);
     },
     },
     handelDel(tpId, type = 0) {
     handelDel(tpId, type = 0) {