wyh преди 1 година
родител
ревизия
2210428188

+ 3 - 0
itdmWeb/src/api/api.js

@@ -118,6 +118,8 @@ const getYeWU = (params)=>getAction("flowpath/itdmRunFlowPath/queryById",params)
 const getFirNextZrr = (params)=>getAction("/flowpath/itdmRunFlowPathStep/AddSelectNextStepUser",params);
 // 下一步的时候选择操作人的下拉列表
 const getNextZrr = (params)=>getAction("/flowpath/itdmRunFlowPathStep/selectNextStepUser",params);
+// 判断下一步是否为最后一步(最后一步没有责任人)
+const getNextTF = (params)=>getAction("/flowpath/itdmFlowPathStep/getSortByFlowPathId",params);
 // 绩效导出
 const getExportJx = (params)=>downFile("/jixiaoPersonPrice/jixiaoPersonPrice/exportXlsByTime",params);
 
@@ -311,6 +313,7 @@ export {
   jixiaoPersonPrice,
   getFirNextZrr,
   getNextZrr,
+  getNextTF,
   getExportJx
 }
 

+ 25 - 10
itdmWeb/src/views/module-iTDM/flowpath/ItdmRunFlowPathList.vue

@@ -173,7 +173,7 @@ import { mixinDevice } from '@/utils/mixin'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import ItdmRunFlowPathModal from './modules/ItdmRunFlowPathModal'
 import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
-import { queryFlowPathSelectList, runFlowPathPass1, getWeituoClientList, getWeituoInfoListByClient } from '@api/api'
+import { queryFlowPathSelectList, runFlowPathPass1, getWeituoClientList, getWeituoInfoListByClient, getNextTF } from '@api/api'
 import { Modal } from 'ant-design-vue'
 import ItdmRunFlowPathShenhel from './modules/ItdmRunFlowPathShenhel.vue'
 import ItdmRunFlowPathShenhel1 from './modules/ItdmRunFlowPathShenhel1.vue'
@@ -360,15 +360,30 @@ export default {
     // 17写的
     tongguo: function(record) {
       console.log(666,record)
-      this.$refs.nextChoose.next(record);
-      // let that = this
-      // var data = { 'runFlowPath': record.id }
-      // runFlowPathPass1(data).then(response => {
-      //   if (response.code == '500') {
-      //     that.$message.error(response.message)
-      //   }
-      //   that.loadData(1);
-      // })
+      // 判断下一步是否需要选责任人
+      var dataTF = { 'dqStep': record.dqSetp}
+      getNextTF(dataTF).then((res) => {
+        console.log(res)
+        if (res == 1) {
+          this.$refs.nextChoose.next(record);
+        } else {
+          let that = this
+          Modal.confirm({
+            title: '流程完结',
+            content: '该流程是否完结',
+            onOk() {
+              var data = { 'runFlowPath': record.id }
+              runFlowPathPass1(data).then(response => {
+                if (response.code == '500') {
+                  that.$message.error(response.message)
+                }
+                that.loadData(1);
+              })
+            },
+            onCancel() {},
+          });
+        }
+      })
     },
     bohui: function(record) {
       console.log('123123')

+ 22 - 28
itdmWeb/src/views/module-iTDM/flowpath/modules/ItdmNextModal.vue

@@ -39,7 +39,7 @@
 
 <script>
 
-import { getNextZrr, runFlowPathPass1} from '@/api/api'
+import { getNextZrr, runFlowPathPass1 } from '@/api/api'
 
 export default{
     props: {
@@ -91,35 +91,29 @@ export default{
       handleOk () {
         const that = this;
         // 触发表单验证
-        this.$refs.form.validate(valid => {
+        that.$refs.form.validate(valid => {
           if (valid) {
-            console.log(this.record.id)
-            let that = this
-            if (that.record.id != undefined) {
-                // 下一步
-                const data = {
-                    runFlowPath: that.record.id,
-                    nextStepUser: that.model.username
-                }
-                // var data = { 'runFlowPath': that.record.id, 'nextStepUser': that.model.username}
-                runFlowPathPass1(data).then(response => {
-                    if (response.code == '200') {
-                        that.visible=false
-                        that.record = {};
-                        that.model= {}
-                        // 调用父页面方法
-                        // window.parent.loadData(1);
-                        if (this.fatherMethod) {
-                            this.fatherMethod(1);
-                        }
-                    }
-                    if (response.code == '500') {
-                        that.$message.error(response.message)
-                    }
-                })
-            } else {
-                // 新增
+            console.log(that.record.id)
+            // 下一步
+            const data = {
+                runFlowPath: that.record.id,
+                nextStepUser: that.model.username
             }
+            // var data = { 'runFlowPath': that.record.id, 'nextStepUser': that.model.username}
+            runFlowPathPass1(data).then(response => {
+                if (response.code == '200') {
+                    that.visible=false
+                    that.record = {};
+                    that.model= {}
+                    // 调用父页面方法
+                    if (that.fatherMethod) {
+                        that.fatherMethod(1);
+                    }
+                }
+                if (response.code == '500') {
+                    that.$message.error(response.message)
+                }
+            })
           }
         })