|
@@ -302,6 +302,7 @@ import { shallowRef } from 'vue'
|
|
|
import CollectService from '@/api/materialManagement/CollectService'
|
|
|
import WareHouseService from '@/api/materialManagement/WareHouseService'
|
|
|
import ProjectReportArchiveService from '@/api/cw/projectRecords/ProjectReportArchiveService'
|
|
|
+import pick from "lodash.pick";
|
|
|
export default {
|
|
|
collectService: null,
|
|
|
wareHouseService: null,
|
|
@@ -1322,6 +1323,18 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 关闭
|
|
|
+ cancel () {
|
|
|
+ this.changeBusiness()
|
|
|
+ useTabs.close()
|
|
|
+ if (!this.commonJS.isEmpty(this.$route.query.routePath)) {
|
|
|
+ this.$router.push({path: this.$route.query.routePath})
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/dashboard/index',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 自定义按钮提交
|
|
|
commit(vars) {
|
|
|
if (this.formType === "2") {
|
|
@@ -1508,12 +1521,104 @@ export default {
|
|
|
case '_flow_reback':// 撤回
|
|
|
this.reback()
|
|
|
break
|
|
|
-
|
|
|
+ case '_fileApply':// 文件补充
|
|
|
+ this.fileApply()
|
|
|
+ break
|
|
|
+ case '_cancel':// 关闭
|
|
|
+ this.cancel()
|
|
|
+ break
|
|
|
default:
|
|
|
this.commit(vars); // 自定义按钮提交
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ //文件补充
|
|
|
+ fileApply(vars){
|
|
|
+ if (this.formType === "2") {
|
|
|
+ // 外置表单
|
|
|
+ this.$refs.form.fileApply(
|
|
|
+ (businessTable, businessId, inputForm,recordType,createById,newTitle,title,procDefId,procDefKey) => {
|
|
|
+ vars = { ...vars, ...inputForm ,recordType}
|
|
|
+ console.log(vars)
|
|
|
+ if (procDefId) {
|
|
|
+ this.procDefId = procDefId
|
|
|
+ }
|
|
|
+ if (procDefKey) {
|
|
|
+ this.procDefKey = procDefKey
|
|
|
+ inputForm.procDefKey = procDefKey
|
|
|
+ }
|
|
|
+ // if (newTitle) {
|
|
|
+ // this.title = newTitle
|
|
|
+ // }
|
|
|
+ if (title) {
|
|
|
+ this.formTitle = title
|
|
|
+ }
|
|
|
+ if (recordType) {
|
|
|
+ this.recordType = recordType
|
|
|
+ }
|
|
|
+ if (inputForm.days){
|
|
|
+ this.days=inputForm.days
|
|
|
+ }
|
|
|
+
|
|
|
+ let assignee = createById
|
|
|
+ if (!this.commonJS.isEmpty(createById)) {
|
|
|
+ assignee = createById
|
|
|
+ }
|
|
|
+ taskService
|
|
|
+ .start({
|
|
|
+ procDefId: this.procDefId,
|
|
|
+ procDefKey: this.procDefKey,
|
|
|
+ businessTable: businessTable,
|
|
|
+ businessId: businessId,
|
|
|
+ ...vars,
|
|
|
+ title: newTitle,
|
|
|
+ assignee: assignee,
|
|
|
+ recordType: this.recordType,
|
|
|
+ days: this.days,
|
|
|
+ })
|
|
|
+ .then((data) => {
|
|
|
+ this.$message.success("启动成功");
|
|
|
+ // this.changeBusiness()
|
|
|
+ // useTabs.close();
|
|
|
+ // if (!this.commonJS.isEmpty(this.$route.query.routePath)) {
|
|
|
+ // this.$router.push({path: this.$route.query.routePath})
|
|
|
+ // } else {
|
|
|
+ // this.$router.push({
|
|
|
+ // path: '/dashboard/index',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // this.cc(data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // 动态表单
|
|
|
+ this.$refs.form.submitStartFormData(
|
|
|
+ {
|
|
|
+ processDefinitionId: this.procDefId,
|
|
|
+ ...vars,
|
|
|
+ title: this.title,
|
|
|
+ assignee: this.auditForm.assignee,
|
|
|
+ },
|
|
|
+ (data) => {
|
|
|
+ this.changeBusiness()
|
|
|
+ useTabs.close();
|
|
|
+ if (!this.commonJS.isEmpty(this.$route.query.routePath)) {
|
|
|
+ this.$router.push({path: this.$route.query.routePath})
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/sys/dashboard/workBench/PendingList',
|
|
|
+ query: {
|
|
|
+ num: 3
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.cc(data);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
|
|
|
myNotice (taskId, proDefId, title, userName, createDate) {
|