Parcourir la source

履职任务下发流程变更

jiawuxian il y a 1 an
Parent
commit
e8d8989fc6

+ 21 - 3
src/components/message/threeStateMessageBox.vue

@@ -8,9 +8,9 @@
   >
     <div>{{ message }}</div>
     <div slot="footer" class="dialog-footer">
-      <el-button type="primary" @click="onYes">是</el-button>
-      <el-button @click="onNo">否</el-button>
-      <el-button @click="onCanel">取消</el-button>
+      <el-button size="small" type="primary" @click="onYes">是</el-button>
+      <el-button size="small" @click="onNo">否</el-button>
+      <el-button size="small" @click="onCanel">取消</el-button>
     </div>
   </DialogCom>
 </template>
@@ -63,5 +63,23 @@ export default {
     left: 50% !important;
     transform: translate(-50%, -50%);
   }
+
+  ::v-deep .el-dialog__header {
+    position: relative;
+    padding: 15px;
+    padding-bottom: 10px;
+    height: 43px;
+  }
+
+  ::v-deep .el-dialog__body {
+    padding: 10px 15px;
+    color: #606266;
+    font-size: inherit;
+  }
+
+  ::v-deep .dialog-footer {
+    padding: 5px 15px 0;
+    text-align: right;
+  }
 }
 </style>

+ 30 - 24
src/views/resumption/plan/dialog.edit.vue

@@ -20,19 +20,19 @@
             <el-col :span="6">
               <el-form-item prop="planName" label="任务名称:">
                 <el-input
-                  :disabled="isChildren()"
                   v-model.trim="formData.planName"
                   :maxlength="50"
                   name="planName"
                   placeholder="请输入任务名称"
                   clearable
+                  style="width:217px"
                 />
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item prop="planType" label="任务类型:">
                 <el-select
-                  :disabled="isChildren()"
+                  :disabled="canEdit()"
                   @change="changeData"
                   label="任务类型"
                   v-model="formData.planType"
@@ -54,7 +54,7 @@
               <el-form-item prop="planCycle" label="任务周期:">
                 <el-select
                   @change="changeBuildTime"
-                  :disabled="isChildren()"
+                  :disabled="canEdit()"
                   prop="planCycle"
                   label="任务周期"
                   v-model="formData.planCycle"
@@ -79,7 +79,7 @@
             <el-col :span="6">
               <el-form-item prop="planExec" label="任务时间:">
                 <el-select
-                  :disabled="isChildren()"
+                  :disabled="canEdit()"
                   label="任务时间"
                   v-model="formData.planExec"
                   placeholder="请选择任务时间"
@@ -125,7 +125,7 @@
             <el-col :span="6">
               <el-form-item prop="execOrgType" label="机构类型:">
                 <el-select
-                  :disabled="isChildren()"
+                  :disabled="canEdit()"
                   label="机构类型"
                   v-model="formData.execOrgType"
                   placeholder="请选择机构类型"
@@ -145,7 +145,7 @@
             <el-col :span="6">
               <el-form-item prop="roleList" label="履职人员:">
                 <el-select
-                  :disabled="isChildren()"
+                  :disabled="canEdit()"
                   label="履职人员"
                   v-model="formData.roleList"
                   placeholder="请选择用户角色"
@@ -167,6 +167,7 @@
             <el-col :span="6">
               <el-form-item prop="count" label="任务次数:">
                 <el-input-number
+                  :disabled="canEdit()"
                   style="margin-left: 10px"
                   v-model="formData.count"
                   controls-position="right"
@@ -196,7 +197,7 @@
           </el-row>
           <el-form-item prop="note" label="备注">
             <el-input
-              :disabled="isChildren()"
+              :disabled="canEdit()"
               v-model="formData.note"
               :maxlength="255"
               clearable
@@ -491,19 +492,23 @@ export default {
       }
     },
     //编辑内容判断
-    isChildren() {
-      // console.log(this.formData.distributePlanStatus,"distributePlanStatus")
-      //计划所属机构id等于当前机构id并且不存在已完成或者已逾期或者
-      //计划所属机构类型不等于行社并且不存在已完成或者已逾期或者
-      //新增
-      if (
-        (this.formData.planCreateOrgId == this.orgId &&
-          this.formData.hasEdit != 1) ||
-        (this.formData.planOfOrgType != 3 && this.formData.hasEdit != 1) ||
-        this.id == null
-      ) {
-        return false;
-      } else return true;
+    // isChildren() {
+    //   // console.log(this.formData.distributePlanStatus,"distributePlanStatus")
+    //   //计划所属机构id等于当前机构id并且不存在已完成或者已逾期或者
+    //   //计划所属机构类型不等于行社并且不存在已完成或者已逾期或者
+    //   //新增
+    //   if (
+    //     (this.formData.planCreateOrgId == this.orgId &&
+    //       this.formData.hasEdit != 1) ||
+    //     (this.formData.planOfOrgType != 3 && this.formData.hasEdit != 1) ||
+    //     this.id == null
+    //   ) {
+    //     return false;
+    //   } else return true;
+    // },
+    canEdit() {
+      //停用和使用中的任务,只能编辑名称和履职内容
+      return !(this.formData.planStatus==null || this.formData.plansStatus==0);
     },
     //省联社履职内容不能删除
     getshenglianshe(row) {
@@ -825,13 +830,14 @@ export default {
           this.selectedValues.length == 0 ? null : this.selectedValues;
 
         //停用、使用中编辑
-        if (this.formData.status > 0) {
-          this.refs["DialogThreeState"].show(
-            true,
-            "本周期未完成任务是否使用新的任务内容)?",
+        if (this.formData.planStatus > 0) {
+          this.$refs["DialogThreeState"].show(
+            "本周期未完成任务是否使用新的任务内容?",
             (state) => {
               if (state == 0 || state == 1) {
                 this.update(this.formData, state == 1);
+              }else{
+                this.loading = false;
               }
             }
           );

+ 2 - 2
src/views/resumption/plan/index.vue

@@ -621,7 +621,7 @@ export default {
       if (row.planStatus == 0) {
         msg = "是否立即生成任务?";
       } else {
-        msg = "是否立即生效";
+        msg = "本周期未完成任务应用最新任务内容";
       }
       this.$refs["DialogThreeState"].show(msg, async (state) => {
         if (state == 2) {
@@ -646,7 +646,7 @@ export default {
     distributeHS(id, immediateEffect) {
       this.loading = true;
       api
-        .distributeHS(row.id, true)
+        .distributeHS(id, immediateEffect)
         .then((response) => {
           // console.log(response, "then");
           if (response.data == 0) {