Quellcode durchsuchen

1-17需求申请单

yangbifan vor 2 Jahren
Ursprung
Commit
6016c71e25

+ 2 - 2
config/dev.env.js

@@ -8,8 +8,8 @@ module.exports = merge(prodEnv, {
   ctx:'"http://127.0.0.1:8080"',
   // ctxForm: '"http://10.149.85.91:8000"',//dev
   // ctxForm: '"http://43.138.50.94:8880"',//test
-  ctxForm: '"http://192.168.2.44:8880"',//test
-  // ctxForm: '"http://10.230.26.15:8000"',//生产
+  // ctxForm: '"http://192.168.2.44:8880"',//test
+  ctxForm: '"http://10.230.26.15:8000"',//生产
 
   excludeMeWhenSelectNextHandler:false,
   excludeFormerHanlder:false,

+ 2 - 2
public/index.html

@@ -31,8 +31,8 @@
   <div id="app"></div>
   <!-- built files will be auto injected -->
   <script type="text/javascript">
-    // window.staticHost = 'http://10.230.26.15:8000/mkt'; // 正式
-    window.staticHost = 'http://10.149.85.91:8000/spfm'; // 测试
+    window.staticHost = 'http://10.230.26.15:8000/mkt'; // 正式
+    // window.staticHost = 'http://10.149.85.91:8000/spfm'; // 测试
     // window.staticHost = 'http://192.168.0.103:9600/';
     // window.staticHost = 'http://43.138.50.94:9600/';
 

+ 10 - 10
src/assets/js/common.js

@@ -263,16 +263,16 @@ let common = {
                     if (!obj.disableLoading) {
                         loading.close()
                     }
-                    // if (response.data.code === 1 ||response.data.code == '1') {
-                    //     bus.$message.success(response.data.message)
-                    //      loading.close()
-                    //      success(response.data.data)
-                    //      return response
-                        if (response.code === 1 ||response.code == '1') {
-                            bus.$message.success(response.data.message)
-                             loading.close()
-                             success(response.data)
-                             return response
+                    if (response.data.code === 1 ||response.data.code == '1') {
+                        bus.$message.success(response.data.data.message)
+                         loading.close()
+                         success(response.data.data)
+                         return response
+                        // if (response.code === 1 ||response.code == '1') {
+                        //     bus.$message.success(response.data.message)
+                        //      loading.close()
+                        //      success(response.data)
+                        //      return response
                     } else {
                         if (obj.printMsg) {
                             if (response.message) {

+ 2 - 2
src/components/workDeptThree.vue

@@ -159,7 +159,7 @@ export default {
             i < this.$refs.tree.store._getAllNodes().length;
             i++
           ) {
-            console.log(this.$refs.tree.store._getAllNodes()[i]);
+
             this.$refs.tree.store._getAllNodes()[i].expanded = true;
           }
         } else {
@@ -168,7 +168,7 @@ export default {
             i < this.$refs.tree.store._getAllNodes().length;
             i++
           ) {
-            console.log(this.$refs.tree.store._getAllNodes()[i]);
+
             this.$refs.tree.store._getAllNodes()[i].expanded =false;
           }
         }

+ 79 - 26
src/components/workflow.vue

@@ -9,7 +9,20 @@
               选择路径
 
               <div class="flex-path-list">
-                <div v-if="transferStatus" :class="active" @click="clickTransfer(1)">转派</div>
+                <div
+                  v-if="manyReassignment"
+                  :class="actives"
+                  @click="clickManyTransfer(1)"
+                >
+                  转派
+                </div>
+                <div
+                  v-if="transferStatus"
+                  :class="active"
+                  @click="clickTransfer(1)"
+                >
+                  转派
+                </div>
                 <div v-if="copyStatus" @click="clickTransfer(2)">抄送</div>
                 <div
                   v-for="(item, index) in node.nextShapes"
@@ -136,14 +149,14 @@ export default {
   name: "workflow",
   data() {
     return {
-      active:'',
+      active: "",
       transferStatus: false, //转派按钮控制
       manyPeopleStatus: false, //多人处理下发任务
       TransferStatus: false, //是否点击转派状态
       copyStatus: false, //抄送按钮控制
       CopyStatus: false, //是否点击抄送状态
       node: [], //路径列表
-      seleIndex: "", //点击路径下标
+      seleIndex: "1099", //点击路径下标
       commonlyList: [], //常用意见数组
       textarea: "未填写意见", //意见内容字段
       copyUser: "", //抄送人员列表
@@ -159,6 +172,8 @@ export default {
       demand: "",
       nextDealManList: "",
       isLastManStatus: false,
+      manyReassignment: false,
+      actives: "",
     };
   },
   props: {
@@ -170,12 +185,24 @@ export default {
     requestForm: {
       type: Object,
     },
+    adminResourceId: {
+      type: String,
+    },
   },
   created() {
+    if (this.adminResourceId) {
+      this.manyReassignment = true;
+    }
     this.getNextPath(this.list.resourceId, 1);
     this.getMetirialType();
   },
   methods: {
+    //多人转派
+    clickManyTransfer() {
+      (this.actives = this.actives != "" ? "" : "active"),
+        (this.seleIndex = "1099");
+      this.getNextPath(this.adminResourceId, 3);
+    },
     //生成需求决策编号接口
     getDemand() {
       this.$http({
@@ -204,26 +231,49 @@ export default {
       function success(data) {}
     },
     async nextWorks(lists, list) {
-      let _this = this;
-      let obj = {
-        url: _this.$url.formList.nextWork, //下一步工作流接口
-        data: lists,
-        status: "form",
-      };
-      await this.common.httpPost(obj, success);
-      function success(data) {
-        console.log(data);
-        let updateList = {
-          taskId: data.taskid,
-          id: _this.list.id,
-          resourceId: _this.nodes.currentShape[0].resourceId,
+     let listss = {
+          userId:this.nextDealManList , //人员id
+          taskId: this.list.taskId, //表单标识
+          loginstr: JSON.parse(window.sessionStorage.userInfo).loginNoStr,
+          // taskName: this.clicknextName, //流程节点
+          content: this.textarea, //意见内容
+        };
+      if (this.manyReassignment == true) {
+        let _this = this;
+        let obj = {
+          url: _this.$url.formList.getNewTransferTask + _this.list.taskId, //下一步工作流接口
+          data: listss,
+          status: "form",
+        };
+        await this.common.httpPost(obj, success);
+        function success(data) {
+          _this.$emit("beforeClose", true);
+        }
+      } else {
+        let _this = this;
+        let obj = {
+          url: _this.$url.formList.nextWork, //下一步工作流接口
+          data: lists,
+          status: "form",
         };
-        list.taskId = data.taskid;
-        _this.setUpdate(updateList);
-        _this.getLastManList(list);
+        await this.common.httpPost(obj, success);
+        function success(data) {
+          console.log(data);
+          let updateList = {
+            taskId: data.taskid,
+            id: _this.list.id,
+            resourceId: _this.nodes.currentShape[0].resourceId,
+          };
+          list.taskId = data.taskid;
+          _this.setUpdate(updateList);
+          _this.getLastManList(list);
+        }
       }
     },
     submitWork() {
+      console.log(this.nodes);
+      //多人转派环节
+
       //多人会签处理环节
       let list = {
         userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
@@ -232,6 +282,7 @@ export default {
         taskName: this.clicknextName, //流程节点
         userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
         content: this.textarea, //意见内容
+        resourceId: this.nodes.currentShape[0].resourceId,
       };
       let newlist = {
         userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
@@ -241,13 +292,14 @@ export default {
         userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
         content: this.textarea, //意见内容
       };
+
       if (this.manyPeopleStatus == true) {
         list.procinstid = this.list.processId;
         // if (this.backThree.length <= 1) {
         //   this.$message.error("请选择多人");
         //   return;
         // } else {
-          list.lastmanList = this.nextDealManList;
+        list.lastmanList = this.nextDealManList;
         // }
         if (this.nodes.currentShape) {
           newlist.resolution = this.nodes.currentShape[0].condition.resolution;
@@ -462,7 +514,7 @@ export default {
       }
 
       this.$http({
-       url: "/market/api/user/info/queryNodePers?params=" + id,
+        url: "/market/api/user/info/queryNodePers?params=" + id,
         method: "post",
         headers: {
           "Content-Type": "application/json",
@@ -478,20 +530,20 @@ export default {
           // let list = []
           // list.push(res.data)
           // this.treeList = list; //抄送
-          this.treeList = res.data
+          this.treeList = res.data;
           // this.$refs.defTree.treeList = res.data;
         }
       });
     },
 
-   
     //转派按钮方法
     clickTransfer(e) {
       this.$refs.defTree.userList = [];
       this.backThree = [];
       this.treeList = [];
       if (e == 1) {
-        this.active = this.active!=""?'':'active'
+        this.seleIndex = "";
+        this.active = this.active != "" ? "" : "active";
         this.manyPeopleStatus = false;
         this.TransferStatus = true;
       } else if (e == 2) {
@@ -501,13 +553,15 @@ export default {
     },
     //点击节点获取下一步的处理人字段
     clickGetTree(e, index) {
-      this.active = ''
+      this.active = "";
+      this.actives = "";
       this.$refs.defTree.userList = [];
       this.backThree = [];
       // this.CopyStatus = false;
       this.TransferStatus = false;
       //   this.clickTaskName = e.properties.name;
       this.clicknextName = e.properties.name;
+      console.log(index);
       this.seleIndex = index;
       this.getNextPath(e.resourceId, 3); //1 为点击后获取线
     },
@@ -521,7 +575,6 @@ export default {
     },
     //选择树的回调
     changeTree(e) {
-
       if (this.manyPeopleStatus == true) {
         this.backThree = e;
 

+ 8 - 6
src/components/workflowEntrance.vue

@@ -161,6 +161,7 @@ export default {
       treeCopyList: [],
       demand: "",
       close: "",
+      nextDealManLists:''
     };
   },
   props: {
@@ -221,6 +222,7 @@ export default {
         // taskName: this.clicknextName, //流程节点
         userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
         content: this.textarea, //意见内容
+        resourceId:this.list.resourceId
       };
       let obj = {};
       if (this.close == "1") {
@@ -229,7 +231,7 @@ export default {
           (obj.data = list);
       } else {
         let listss = {
-          userId: _this.backThree[0].loginNoStr, //人员id
+          userId: _this.nextDealManLists, //人员id
           taskId: this.list.taskId, //表单标识
           loginstr: JSON.parse(window.sessionStorage.userInfo).loginNoStr,
           // taskName: this.clicknextName, //流程节点
@@ -532,12 +534,12 @@ export default {
     //选择树的回调
     changeTree(e) {
       if (this.MultipersonTransfer) {
-        if (e.length > 1) {
-          this.$message.error("只能选择一个人");
-          return;
-        } else {
           this.backThree = e;
-        }
+        let arr = [];
+        this.backThree.map((item) => {
+          arr.push(item.loginNoStr);
+        });
+        this.nextDealManLists = arr.toString();
       }
     },
     //获取字典表常用意见

+ 31 - 12
src/pages/main/leader/demand/demandHome.vue

@@ -55,7 +55,7 @@
         <el-button type="primary" v-if="closeStatus" @click="handleClose"
           >关闭</el-button
         >
-        
+
         <el-button
           type="primary"
           v-if="forwardStatus"
@@ -94,10 +94,12 @@
         :destroy-on-close="true"
       >
         <Workflow
+          ref="workflow"
           :list="fromList"
           v-if="isWorkflowStatus == true"
           @beforeClose="beforeClose"
           :requestForm="requestForm"
+          :adminResourceId="adminResourceId"
         />
         <WorkflowEntrance
           :list="fromList"
@@ -157,7 +159,7 @@ export default {
     deptTree,
     Workflow,
     WorkflowEntrance,
-    Tables
+    Tables,
   },
   data() {
     return {
@@ -196,9 +198,9 @@ export default {
         processDefinitionKey: "request_form_process",
       },
       requestForm: {
-        fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
+        // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
         // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
-        // fresourceId:'81455799-600d-11ed-b399-e00084564cce',//生产环境
+        fresourceId:'81455799-600d-11ed-b399-e00084564cce',//生产环境
         processDefinitionKey: "request_form_process",
       },
       treeList: [], //候选人列表
@@ -585,7 +587,7 @@ export default {
                 this.disabled = true;
                 this.buttonStatus = false;
                 this.getReadList(r.copytaskid);
-                this.clickForm(r)
+                this.clickForm(r);
               }, // 自定义事件
             },
           ],
@@ -760,6 +762,7 @@ export default {
       seachLists: {},
       timeList: {},
       lastManList: [],
+      adminResourceId: "", //转派多人id
     };
   },
   created() {
@@ -877,8 +880,15 @@ export default {
 
       let res = await this.common.httpPost(obj, success);
       function success(data) {
+        console.log(data);
+        if (data.lastMan == true) {
+          _this.adminResourceId = data.adminResourceId;
+        }
+        _this.destroy = true;
+        _this.handleStatus = true;
         _this.isWorkflowStatus = data.lastMan == false ? false : true;
         _this.lastManList = data;
+
         // console.log(_this.isWorkflowStatus);
       }
     },
@@ -979,12 +989,11 @@ export default {
         },
         data: this.$refs.formTable.form,
       }).then((res) => {
-        if(res.data.result === 1) {
+        if (res.data.result === 1) {
           this.$message.success(res.data.desc);
-        }else{
+        } else {
           this.$message.error(res.data.desc);
         }
-        
       });
     },
     //批量导出搜索
@@ -1360,14 +1369,25 @@ export default {
         data: list,
       }).then((res) => {
         if (res.data.body.nextShapes[0].multi) {
+          console.log('这是mulit节点');
           if (res.data.body.nextShapes[0].multi.multi === "true") {
+             console.log('这是mulit节点');
             this.getLastName();
+          } else {
+            this.adminResourceId = ''
+            console.log('这不是mulit节点');
+            this.destroy = true;
+            this.handleStatus = true;
+            this.getMetirialType();
           }
-        }
-        if (this.fromList.taskId) {
+        } else {
+          this.adminResourceId = ''
+          console.log('这不是mulit节点');
           this.destroy = true;
           this.handleStatus = true;
           this.getMetirialType();
+        }
+        if (this.fromList.processId) {
         } else {
           this.$message.error("请先点击保存按钮");
         }
@@ -1375,7 +1395,6 @@ export default {
     },
     //处理按钮,开始工作流接口
     clickHandles() {
-      console.log(this.fromList);
       this.getNextPath(this.fromList.resourceId || "");
     },
 
@@ -1412,7 +1431,7 @@ export default {
 
       let res = await this.common.httpPost(obj, success);
       function success(data) {
-        console.log('[ 接口返回值第一曾 ] >', data)
+        console.log("[ 接口返回值第一曾 ] >", data);
         let list = [];
         list = data.data.data;
         // list.map((item,index) => {