Procházet zdrojové kódy

已办待办修改

yusheng před 1 rokem
rodič
revize
43908d0439

+ 1 - 0
src/components/CommomSelect/dept-select.vue

@@ -11,6 +11,7 @@
     :placeholder="placeholder"
     :placeholder="placeholder"
     @input="updateValue"
     @input="updateValue"
     @change="changeChoose"
     @change="changeChoose"
+    :filterable="true"
     v-bind="$attrs"
     v-bind="$attrs"
   />
   />
 </template>
 </template>

+ 14 - 0
src/views/bpm/done/index.vue

@@ -161,6 +161,20 @@
             showOverflowTooltip: true,
             showOverflowTooltip: true,
             minWidth: 120
             minWidth: 120
           },
           },
+          {
+            prop: 'businessName',
+            label: '单据名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'businessType',
+            label: '单据类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
           {
           {
             prop: 'processInstance.startUserNickname',
             prop: 'processInstance.startUserNickname',
             label: '流程发起人',
             label: '流程发起人',

+ 58 - 25
src/views/bpm/handleTask/components/purchasePlanManage/submit.vue

@@ -1,6 +1,18 @@
 <template>
 <template>
   <el-col :span="16" :offset="6">
   <el-col :span="16" :offset="6">
     <el-form label-width="100px" ref="formRef" :model="form">
     <el-form label-width="100px" ref="formRef" :model="form">
+      <el-form-item
+        v-if="taskDefinitionKey === 'deptLeaderAssign'"
+        label="采购部门"
+        prop="userId"
+        style="margin-bottom: 20px"
+      >
+        <deptSelect
+          :disabled="type == 'detail'"
+          v-model="form.useDeptId"
+          @changeGroup="searchDeptNodeClick"
+        />
+      </el-form-item>
       <el-form-item
       <el-form-item
         v-if="taskDefinitionKey === 'deptLeaderAssign'"
         v-if="taskDefinitionKey === 'deptLeaderAssign'"
         label="采购员"
         label="采购员"
@@ -51,10 +63,13 @@
         >通过
         >通过
       </el-button>
       </el-button>
 
 
-      <el-dropdown @command="(command) => handleCommand(command)" style="margin-left: 30px;">
-                  <span class="el-dropdown-link">
-                    更多<i class="el-icon-arrow-down el-icon--right"></i>
-                  </span>
+      <el-dropdown
+        @command="(command) => handleCommand(command)"
+        style="margin-left: 30px"
+      >
+        <span class="el-dropdown-link">
+          更多<i class="el-icon-arrow-down el-icon--right"></i>
+        </span>
         <el-dropdown-menu slot="dropdown">
         <el-dropdown-menu slot="dropdown">
           <el-dropdown-item command="cancel">作废</el-dropdown-item>
           <el-dropdown-item command="cancel">作废</el-dropdown-item>
         </el-dropdown-menu>
         </el-dropdown-menu>
@@ -96,16 +111,21 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
+  import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
   import { listAllUserBind } from '@/api/system/organization';
   import { listAllUserBind } from '@/api/system/organization';
-  import { assign, cancel,UpdateInformation } from '@/api/bpm/components/purchasingManage/purchasePlanManage';
-
+  import {
+    assign,
+    cancel,
+    UpdateInformation
+  } from '@/api/bpm/components/purchasingManage/purchasePlanManage';
+  import deptSelect from '@/components/CommomSelect/dept-select.vue';
+  import { getUserPage } from '@/api/system/organization';
 
 
   // 流程实例的详情页,可用于审批
   // 流程实例的详情页,可用于审批
   export default {
   export default {
     name: '',
     name: '',
     components: {
     components: {
-      //   Parser
+      deptSelect
     },
     },
     props: {
     props: {
       businessId: {
       businessId: {
@@ -125,7 +145,8 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
       return {
       return {
         form: {
         form: {
           userId: '',
           userId: '',
-          reason: ''
+          reason: '',
+          useDeptId:''
         },
         },
         userOptions: []
         userOptions: []
       };
       };
@@ -145,6 +166,15 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
       handleBackList() {
       handleBackList() {
         this.$emit('handleBackList');
         this.$emit('handleBackList');
       },
       },
+      searchDeptNodeClick(val){
+        console.log(val,'val')
+        getUserPage({
+          groupId: val,
+          size:999
+        }).then((data) => {
+        this.userOptions=data.list
+      });
+      },
 
 
       async handleAudit(status) {
       async handleAudit(status) {
         let userInfo = this.userOptions.find(
         let userInfo = this.userOptions.find(
@@ -176,9 +206,9 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
         API({
         API({
           id: this.taskId,
           id: this.taskId,
           reason: this.form.reason,
           reason: this.form.reason,
-          variables:{
+          variables: {
             userId: userInfo?.id,
             userId: userInfo?.id,
-            pass:!!status
+            pass: !!status
           }
           }
         });
         });
         this.$emit('handleAudit', {
         this.$emit('handleAudit', {
@@ -196,24 +226,27 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
       //更多
       //更多
       handleCommand(command) {
       handleCommand(command) {
         if (command === 'cancel') {
         if (command === 'cancel') {
-          this.$confirm("是否确认作废?", {
+          this.$confirm('是否确认作废?', {
             type: 'warning',
             type: 'warning',
             cancelButtonText: '取消',
             cancelButtonText: '取消',
             confirmButtonText: '确定'
             confirmButtonText: '确定'
-          }).then(() => {
-            cancel({
-              id: this.taskId,
-              reason: this.form.reason,
-              businessId: this.businessId,
-            }).then(() => {
-              this.$emit('handleClose');
-            }).catch(() => {
-              this.$message.error("流程作废失败");
-            });
-          }).catch(() => {});
+          })
+            .then(() => {
+              cancel({
+                id: this.taskId,
+                reason: this.form.reason,
+                businessId: this.businessId
+              })
+                .then(() => {
+                  this.$emit('handleClose');
+                })
+                .catch(() => {
+                  this.$message.error('流程作废失败');
+                });
+            })
+            .catch(() => {});
         }
         }
-      },
-
+      }
     }
     }
   };
   };
 </script>
 </script>

+ 14 - 0
src/views/bpm/todo/index.vue

@@ -213,6 +213,20 @@
             showOverflowTooltip: true,
             showOverflowTooltip: true,
             minWidth: 120
             minWidth: 120
           },
           },
+          {
+            prop: 'businessName',
+            label: '单据名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'businessType',
+            label: '单据类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
           {
           {
             prop: 'processInstance.startUserNickname',
             prop: 'processInstance.startUserNickname',
             label: '流程发起人',
             label: '流程发起人',