zhuangyunsheng 1 год назад
Родитель
Сommit
3396beeafb

+ 4 - 0
src/api/model/procurement.js

@@ -49,6 +49,10 @@ export default {
 
 		saveApprove: async function (data = {}) { // 审核
 			return await http.post(`${this.url}/saveApprove`, data);
+		},
+
+		resubmit: async function (data = {}) { // 重新发起
+			return await http.post(`${this.url}/resubmit`, data);
 		}
 	},
 

+ 1 - 2
src/components/scChengTou/purchase/plan.vue

@@ -174,8 +174,7 @@
 					budgetAmount: null,
 					enterDate: null,
 					beginDate: null,
-					endDate: null,
-					templateId: null
+					endDate: null
 				},
 				rules: {
 					planName: [{ required: true, message: "请输入采购名称" }],

+ 5 - 5
src/views/procurement/plan/detail.vue

@@ -64,9 +64,10 @@
 			},
 
 			// 表单注入数据
-			setData({ id, status, processInstanceId }) {
+			setData({ id, status, processTaskId, processInstanceId }) {
 				this.form["id"] = id;
 				this.form["status"] = status;
+				this.form["processTaskId"] = processTaskId;
 				this.form["processInstanceId"] = processInstanceId;
 			},
 
@@ -78,9 +79,7 @@
 							if (!this.form.status) {
 								this.popoverShow = true;
 								this.$nextTick(() => this.$refs.approveIframe.open().setData());
-							} else {
-								console.log("重新发起");
-							}
+							} else this.submit("resubmit");
 						} else this.submit(mode);
 					} else {
 						return false;
@@ -91,7 +90,8 @@
 			submit(mode, templateId) {
 				const data = Object.assign({}, this.$refs.scPlan.form);
 				if (templateId) data["templateId"] = templateId;
-				
+				if (mode == "resubmit") data["processTaskId"] = this.form.processTaskId;
+
 				this.isSaveing = true;
 				this.$API.procurement.plan[mode](data).then(() => {
 					this.isSaveing = false;

+ 1 - 1
src/views/system/orgPerson/index.vue

@@ -74,7 +74,7 @@
 				<el-main class="nopadding">
 					<scTable class="scTable" ref="table" row-key="id" :apiObj="table.api" :params="table.params" :data="table.list" :column="table.column" tableName="userTable">
 						<el-table-column label="序号" type="index" align="center" width="60"></el-table-column>
-						<template #deptName="scope">{{ scope.row.dept.name }}</template>
+						<template #deptName="scope">{{ scope.row.dept && scope.row.dept.name }}</template>
 						<template #jobNames="scope">{{ formatJobs(scope.row.jobs) }}</template>
 						<el-table-column label="操作" fixed="right" align="center" width="120">
 							<template #default="scope">