6379e605 by xiaomiao

--no commit message

1 parent 311c676b
......@@ -4,82 +4,109 @@
* @LastEditTime: 2023-05-17 10:42:01
-->
<template>
<dialogBox title="转出" @submitForm="submitForm" saveButton="确认转出" width="45%" height='30%' @closeDialog="closeDialog"
v-model="value">
<div class="from-clues">
<!-- 表单部分 -->
<div class="from-clues-header">
<el-form :model="queryForm" ref="queryForm" label-width="120px">
<el-form-item label="下一环节名称:">
{{this.tableData.taskName}}
</el-form-item>
<el-form-item label="下一环节办理人:">
{{this.usernames}}
</el-form-item>
</el-form>
</div>
<div class="from-clues">
<!-- 表单部分 -->
<div class="from-clues-header">
<el-form ref="queryForm" label-width="180px" v-if="this.formData.obj">
<el-form-item label="下一环节名称:">
{{ this.formData.obj.taskName }}
</el-form-item>
<el-form-item label="下一环节办理人:">
{{ this.formData.obj.usernames.join(",") }}
</el-form-item>
</el-form>
<el-form ref="queryForm" label-width="180px" v-else>
<el-form-item label="">
此环节为流程最后环节,转出后流程将结束
</el-form-item>
</el-form>
<div class="invalid-reson">转出原因:</div>
<el-input
v-model="shyj"
placeholder="请输入转出原因"
type="textarea"
:rows="4"
></el-input>
<el-button style="float: right" @click="cancelBack">取消转出</el-button>
<el-button type="primary" @click="submitForm" style="float: right"
>确定转出</el-button
>
</div>
</dialogBox>
</div>
</template>
<script>
import { completeTask, getNextLinkInfo } from "@/api/workFlow.js"
export default {
components: {
import { completeTask, getNextLinkInfo } from "@/api/workFlow.js";
import { popupCacel } from "@/utils/popup.js";
export default {
components: {},
props: {
formData: {
type: Object,
default: {},
},
props: {
value: { type: Boolean, default: false },
queryForm: { type: Object, default: false }
},
data() {
return {
queryForm: {},
shyj: "",
};
},
mounted() {
// this.queryForm= this.queryForm.obj
console.log("formDataformDataformData", this.formData);
},
methods: {
/**
* @description: submitForm
* @author: renchao
*/
submitForm() {
this.queryForm = {
bsmSlsq: this.formData.bsmSlsq,
shyj: this.shyj,
stepform: JSON.stringify(this.formData.tabList),
};
console.log("this.queryForm", this.queryForm);
completeTask(this.queryForm).then((res) => {
if (res.code === 200) {
this.$message.success("转件成功");
// setTimeout(() => {
// window.opener = null;
// window.open("about:blank", "_self");
// window.close();
// this.$emit("input", false);
// }, 1000);
popupCacel();
setTimeout(() => {
// window.opener.location.reload(); //刷新父窗口
if (window.opener && window.opener.getBpageList) {
window.opener.getBpageList();
} else {
window.opener.frames[0].getBpageList();
}
window.close();
this.$emit("input", false);
}, 1000);
}else{
this.$message.error(res.message);
}
});
},
data () {
return {
tableData: {},
usernames: '',
}
/**
* @description: closeDialog
* @author: renchao
*/
cancelBack() {
popupCacel();
},
methods: {
/**
* @description: tablelistFn
* @author: renchao
*/
tablelistFn () {
getNextLinkInfo(this.queryForm).then(res => {
if (res.code === 200) {
this.tableData = res.result
if (res.result.usernames) {
this.usernames = String(res.result.usernames)
}
}
})
},
/**
* @description: submitForm
* @author: renchao
*/
submitForm () {
completeTask(this.queryForm).then(res => {
if (res.code === 200) {
this.$message.success('转件成功')
setTimeout(() => {
window.opener = null;
window.open("about:blank", "_self");
window.close();
this.$emit('input', false)
}, 1000);
}
})
},
/**
* @description: closeDialog
* @author: renchao
*/
closeDialog () {
this.$emit("input", false);
},
}
}
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/mixin.scss";
.el-button {
margin-top: 20px;
margin-right: 10px;
}
</style>
......
......@@ -403,7 +403,7 @@ export default {
djjgrules: [{ required: true, message: "登记机构", trigger: "blur" }],
dbrrules: [{ required: true, message: "登簿人", trigger: "blur" }],
djsjrules: [{ required: true, message: "登记时间", trigger: "blur" }],
djlxrules: [{ required: true, message: "登记类型", trigger: "blur" }],
djlxrules: [{ required: true, message: "登记类型", trigger: "change" }],
},
};
},
......
......@@ -325,18 +325,25 @@ export default {
* @author: renchao
*/
sendToNext (obj) {
this.$popupDialog("转出", "workflow/components/zc", {
this.$popupDialog("转出", "djbworkflow/components/zc", {
obj:obj,
bsmSlsq: this.bsmSlsq,
bestepid: this.bestepid
tabList: this.tabList
}, '800px', true)
},
//转出最后一个流程
/**
* @description: sendToEnd
* @description: 转出最后一个流程
* @author: renchao
*/
sendToEnd () {
this.$popupDialog("转出", "djbworkflow/components/zc", {
obj:"",
bsmSlsq: this.bsmSlsq,
tabList: this.tabList
}, '800px', true)
},
//批量操作
/**
* @description: 批量操作
......
......@@ -154,18 +154,10 @@
}
})
}
});
});
}
},
// 获取右侧选项卡
/**
* @description: 获取右侧选项卡
......
......@@ -4,70 +4,109 @@
* @LastEditTime: 2023-05-17 10:42:01
-->
<template>
<dialogBox title="转出" @submitForm="submitForm" saveButton="确认转出" width="45%" height='30%' @closeDialog="closeDialog"
v-model="value">
<div class="from-clues">
<!-- 表单部分 -->
<div class="from-clues-header">
<el-form :model="queryForm" ref="queryForm" label-width="120px">
<el-form-item label="下一环节名称:">
{{this.tableData.taskName}}
</el-form-item>
<el-form-item label="下一环节办理人:">
{{this.usernames}}
</el-form-item>
</el-form>
</div>
<div class="from-clues">
<!-- 表单部分 -->
<div class="from-clues-header">
<el-form ref="queryForm" label-width="180px" v-if="this.formData.obj">
<el-form-item label="下一环节名称:">
{{ this.formData.obj.taskName }}
</el-form-item>
<el-form-item label="下一环节办理人:">
{{ this.formData.obj.usernames.join(",") }}
</el-form-item>
</el-form>
<el-form ref="queryForm" label-width="180px" v-else>
<el-form-item label="">
此环节为流程最后环节,转出后流程将结束
</el-form-item>
</el-form>
<div class="invalid-reson">转出原因:</div>
<el-input
v-model="shyj"
placeholder="请输入转出原因"
type="textarea"
:rows="4"
></el-input>
<el-button style="float: right" @click="cancelBack">取消转出</el-button>
<el-button type="primary" @click="submitForm" style="float: right"
>确定转出</el-button
>
</div>
</dialogBox>
</div>
</template>
<script>
import { completeTask, getNextLinkInfo } from "@/api/workFlow.js"
export default {
components: {
import { completeTask, getNextLinkInfo } from "@/api/workFlow.js";
import { popupCacel } from "@/utils/popup.js";
export default {
components: {},
props: {
formData: {
type: Object,
default: {},
},
props: {
value: { type: Boolean, default: false },
queryForm: { type: Object, default: false }
},
data() {
return {
queryForm: {},
shyj: "",
};
},
mounted() {
// this.queryForm= this.queryForm.obj
console.log("formDataformDataformData", this.formData);
},
methods: {
/**
* @description: submitForm
* @author: renchao
*/
submitForm() {
this.queryForm = {
bsmSlsq: this.formData.bsmSlsq,
shyj: this.shyj,
stepform: JSON.stringify(this.formData.tabList),
};
console.log("this.queryForm", this.queryForm);
completeTask(this.queryForm).then((res) => {
if (res.code === 200) {
this.$message.success("转件成功");
// setTimeout(() => {
// window.opener = null;
// window.open("about:blank", "_self");
// window.close();
// this.$emit("input", false);
// }, 1000);
popupCacel();
setTimeout(() => {
// window.opener.location.reload(); //刷新父窗口
if (window.opener && window.opener.getBpageList) {
window.opener.getBpageList();
} else {
window.opener.frames[0].getBpageList();
}
window.close();
this.$emit("input", false);
}, 1000);
}else{
this.$message.error(res.message);
}
});
},
data () {
return {
tableData: {},
usernames: '',
}
/**
* @description: closeDialog
* @author: renchao
*/
cancelBack() {
popupCacel();
},
methods: {
tablelistFn () {
getNextLinkInfo(this.queryForm).then(res => {
if (res.code === 200) {
this.tableData = res.result
if (res.result.usernames) {
this.usernames = String(res.result.usernames)
}
}
})
},
submitForm () {
completeTask(this.queryForm).then(res => {
if (res.code === 200) {
this.$message.success('转件成功')
setTimeout(() => {
window.opener = null;
window.open("about:blank", "_self");
window.close();
this.$emit('input', false)
}, 1000);
}
})
},
closeDialog () {
this.$emit("input", false);
},
}
}
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/mixin.scss";
.el-button {
margin-top: 20px;
margin-right: 10px;
}
</style>
......
......@@ -254,100 +254,30 @@ export default {
});
});
},
//发送下一个环节
sendToNext (obj) {
const h = this.$createElement;
this.$msgbox({
title: "您确定转出吗?",
message: h("div", { style: "margin: auto" }, [
h("span", null, "下个环节名称:"),
h("i", { style: "color: teal" }, obj.taskName),
h("div", null, ""),
h("span", null, "下个环节经办人: "),
h("i", { style: "color: teal" }, obj.usernames.join(",")),
]),
showCancelButton: true,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
instance.confirmButtonLoading = true;
instance.confirmButtonText = "执行中...";
completeTask({
bsmSlsq: this.bsmSlsq,
shyj: "this.bestepid",
stepform: JSON.stringify(this.tabList),
}).then((res) => {
if (res.code === 200) {
instance.confirmButtonLoading = false;
this.$message.success("转件成功");
// window.opener.location.reload(); //刷新父窗口
if (window.opener && window.opener.getBpageList) {
window.opener.getBpageList();
} else {
window.opener.frames[0].getBpageList();
}
window.close();
this.$emit("input", false);
} else {
instance.confirmButtonLoading = false;
instance.confirmButtonText = "确定";
this.$message.error(res.message);
}
});
} else {
done();
}
},
}).then((action) => {
this.$message({
type: "info",
message: "action: " + action,
});
});
//发送下一个环节
/**
* @description: 发送下一个环节
* @param {*} obj
* @author: renchao
*/
sendToNext (obj) {
this.$popupDialog("转出", "djbworkflow/components/zc", {
obj:obj,
bsmSlsq: this.bsmSlsq,
tabList: this.tabList
}, '800px', true)
},
//转出最后一个流程
/**
* @description: 转出最后一个流程
* @author: renchao
*/
sendToEnd () {
let that = this
const h = this.$createElement;
this.$msgbox({
title: "您确定转出吗?",
message: "此环节为流程最后环节,转出后流程将结束",
showCancelButton: true,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
instance.confirmButtonLoading = true;
instance.confirmButtonText = "执行中...";
completeTask({
bsmSlsq: this.bsmSlsq,
shyj: "this.bestepid",
stepform: JSON.stringify(this.tabList),
}).then((res) => {
if (res.code === 200) {
instance.confirmButtonLoading = false;
that.$message.success("转件成功");
localStorage.setItem('transfer', true)
// window.opener.location.reload(); //刷新父窗口
if (window.opener && window.opener.getBpageList) {
window.opener.getBpageList();
} else {
window.opener.frames[0].getBpageList();
}
window.close();
that.$emit("input", false);
} else {
instance.confirmButtonLoading = false;
instance.confirmButtonText = "确定";
this.$message.error(res.message);
}
})
} else {
done();
}
},
}).then((action) => {
this.$message({
type: "info",
message: "action: " + action
})
})
this.$popupDialog("转出", "djbworkflow/components/zc", {
obj:"",
bsmSlsq: this.bsmSlsq,
tabList: this.tabList
}, '800px', true)
},
//批量操作
handleBatchDel () {
......