|
@@ -17,6 +17,7 @@
|
|
|
@selection="handleaaa"
|
|
|
@check="handleCheck"
|
|
|
@edit="handleEdit"
|
|
|
+ @approve="handleApprove"
|
|
|
></simple-table>
|
|
|
<simple-pagination
|
|
|
:page="page"
|
|
@@ -77,13 +78,18 @@
|
|
|
:loading="table_loading_approve"
|
|
|
></simple-table>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="审批意见" prop="desc" v-if="edit_visible">
|
|
|
- <el-input type="textarea" v-model="add_form.desc"></el-input>
|
|
|
+ <el-form-item
|
|
|
+ label="审批意见"
|
|
|
+ prop="desc"
|
|
|
+ v-if="edit_visible && approve_visible"
|
|
|
+ >
|
|
|
+ <el-input type="textarea" v-model="add_form.remark"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template v-slot:footer>
|
|
|
<div v-if="!isCheck">
|
|
|
<el-button @click="handleSubmit" type="primary">保存</el-button>
|
|
|
+ <el-button type="primary">重新提交</el-button>
|
|
|
<el-button @click="handleVisible('add')" type="default"
|
|
|
>取消</el-button
|
|
|
>
|
|
@@ -145,6 +151,8 @@ export default {
|
|
|
add_visible: false,
|
|
|
summary_visible: false,
|
|
|
edit_visible: false,
|
|
|
+ approve_visible: false,
|
|
|
+ ids:[],
|
|
|
add_form: {},
|
|
|
table_handle: [
|
|
|
{
|
|
@@ -204,10 +212,17 @@ export default {
|
|
|
props: "check",
|
|
|
},
|
|
|
{
|
|
|
- label: "处理",
|
|
|
+ label: "编辑",
|
|
|
props: "edit",
|
|
|
visible: {
|
|
|
- sts: ['0'],
|
|
|
+ sts: ["0"],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "处理",
|
|
|
+ props: "approve",
|
|
|
+ visible: {
|
|
|
+ sts: ["0"],
|
|
|
},
|
|
|
},
|
|
|
],
|
|
@@ -228,7 +243,6 @@ export default {
|
|
|
{
|
|
|
label: "发起时间",
|
|
|
props: "createTime",
|
|
|
- type: "date",
|
|
|
},
|
|
|
{
|
|
|
label: "状态",
|
|
@@ -248,15 +262,15 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "流程环节",
|
|
|
- props: "actionName",
|
|
|
+ props: "procName",
|
|
|
},
|
|
|
{
|
|
|
label: "处理人",
|
|
|
- props: "proposer",
|
|
|
+ props: "opName",
|
|
|
},
|
|
|
{
|
|
|
label: "处理工号",
|
|
|
- props: "procId",
|
|
|
+ props: "opNo",
|
|
|
},
|
|
|
{
|
|
|
label: "处理时间",
|
|
@@ -265,9 +279,9 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "审批意见",
|
|
|
- props: "status",
|
|
|
- type: "dictionary",
|
|
|
- dictionary: { 0: "同意", 1: "不同意" },
|
|
|
+ props: "remark",
|
|
|
+ // type: "dictionary",
|
|
|
+ // dictionary: { 0: "同意", 1: "不同意" },
|
|
|
},
|
|
|
],
|
|
|
};
|
|
@@ -275,7 +289,7 @@ export default {
|
|
|
mounted() {
|
|
|
this.handleInit({
|
|
|
...this.table_search,
|
|
|
- type: "0",
|
|
|
+ type: "1",
|
|
|
page: this.page,
|
|
|
pageSize: this.rows,
|
|
|
});
|
|
@@ -311,6 +325,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleVisible(props) {
|
|
|
+ this.approve_visible = false;
|
|
|
switch (props) {
|
|
|
case "add":
|
|
|
this.add_visible = !this.add_visible;
|
|
@@ -402,28 +417,86 @@ export default {
|
|
|
});
|
|
|
this.handleVisible("edit");
|
|
|
},
|
|
|
+ // 处理按钮
|
|
|
+ handleApprove(row) {
|
|
|
+ let id = row.id;
|
|
|
+ let type = row.parentId === null ? "1" : "0";
|
|
|
+ this.$http({
|
|
|
+ url: "/mkWangge/getMkWanggeById",
|
|
|
+ method: "get",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ id,
|
|
|
+ type,
|
|
|
+ },
|
|
|
+ }).then(({ data }) => {
|
|
|
+ let body = data.body;
|
|
|
+ console.log(body, "body");
|
|
|
+ this.ids = [body.id.toString()]
|
|
|
+ this.add_form = {
|
|
|
+ id: body.id,
|
|
|
+ proposer: body.proposer,
|
|
|
+ telephone: body.telephone,
|
|
|
+ wanggeText: body.wanggeText,
|
|
|
+ };
|
|
|
+ this.table_list_approve = body.bpmTaskList;
|
|
|
+ });
|
|
|
+ this.handleVisible("edit");
|
|
|
+ this.approve_visible = true;
|
|
|
+ },
|
|
|
handleSubmit() {
|
|
|
- console.log(this.add_form);
|
|
|
+ // console.log(this.add_form);
|
|
|
// let _this = this;
|
|
|
this.$refs.add_ref.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- let reqdata = [{ ...this.add_form, procId: "729294602773110788",draft:'1',num: '1' }];
|
|
|
- this.$http({
|
|
|
- url: "/mkWangge/saveOrUpdateList",
|
|
|
- method: "post",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
+ let reqdata = [
|
|
|
+ {
|
|
|
+ ...this.add_form,
|
|
|
+ procId: "729294602773110788",
|
|
|
+ draft: "1",
|
|
|
+ num: "1",
|
|
|
},
|
|
|
- data: reqdata,
|
|
|
- }).then((res) => {
|
|
|
- console.log(res);
|
|
|
- });
|
|
|
- this.handleInit({
|
|
|
- ...this.table_search,
|
|
|
- type: "0",
|
|
|
- page: this.page,
|
|
|
- pageSize: this.rows,
|
|
|
- });
|
|
|
+ ];
|
|
|
+ if (!this.approve_visible) {
|
|
|
+ // 编辑
|
|
|
+ this.$http({
|
|
|
+ url: "/mkWangge/saveOrUpdateList",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: reqdata,
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ });
|
|
|
+ this.handleInit({
|
|
|
+ ...this.table_search,
|
|
|
+ type: "0",
|
|
|
+ page: this.page,
|
|
|
+ pageSize: this.rows,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 审批
|
|
|
+ let reqdata = {
|
|
|
+ ids: this.ids,
|
|
|
+ remark: this.add_form.remark,
|
|
|
+ type: '0'
|
|
|
+ }
|
|
|
+ console.log(reqdata,'reqdata');
|
|
|
+ this.$http({
|
|
|
+ url: "/mkWangge/review",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ ...reqdata
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
this.edit_visible = false;
|
|
|
this.add_visible = false;
|
|
|
}
|
|
@@ -452,7 +525,7 @@ export default {
|
|
|
message: res.data.desc,
|
|
|
type: "error",
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$message({
|
|
|
message: res.data.desc,
|
|
|
type: "success",
|