312e6c30 by zhaoqian

自然幢多幢工作流整合

1 parent 821e66db
......@@ -195,9 +195,13 @@
</el-form>
<div class="header-button" :style="{width:mainBoxWidth+'px'}">
<el-button type="primary" class="saveBtn" @click="onSave" :disabled="disabled">保存</el-button>
<el-button type="primary" @click="onSubmit" :disabled="disabled">提交</el-button>
<el-button type="primary" @click="registerCall">登记调用</el-button>
</div>
<div class="sh-btn">
<el-button type="primary" @click="thdz">退回</el-button>
<el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button>
<el-button type="primary" @click="shdz" v-if="workFlowState">审核</el-button>
</div>
</div>
</template>
......@@ -206,7 +210,8 @@
import Qlr from "@components/formMenu/qlr";
import Qlxz from "@components/formMenu/qlxz";
import {saveDzInfo,getBdcdyh,getDzDetailByBsm} from "@api/dz";
import {getQjZdjbxxDetailById} from "@api/zd"
import {getQjZdjbxxDetailById} from "@api/zd";
import { getActivityDetail } from "@api/user";
import {submit,registerCall} from "@api/common"
export default {
name:'zrz',
......@@ -289,6 +294,8 @@
mainBoxWidth: 0,
rules:[],
workFlowState:false,
}
},
created() {
......@@ -303,11 +310,49 @@
}
},
mounted(){
this.getActivityDetail();
this.$nextTick(() => {
this.mainBoxWidth = this.$refs.mainBox.clientWidth;
})
},
methods: {
getActivityDetail(){
let params = {
"params": {},
"workflowPeriod": "current",
"workitemInstanceId": this.$route.query.workitemInstanceId
}
getActivityDetail(params).then(res => {
this.workFlowState = res.workitemInstance.apps.some(function(item) {
return item == 'shenpibiao';
});
})
},
shdz(){
let data = {
bdcdyh:this.form.bdcdyh,
zl:this.form.zl,
shyj:'',
shr:'admin',
shsj:'2021-01-22'
};
vm.setShDialog(true,data)
},
thdz(){
let data = {
bdcdyh:this.form.bdcdyh,
zl:this.form.zl,
shyj:'',
shr:'admin',
shsj:'2021-01-22'
}
vm.rollback(data);
},
registerCall(){
let data={
type:'dz',
......@@ -533,19 +578,20 @@
})
},
onSubmit(){
console.log(this.form)
let data={
glbsm:this.bsm,
status:1,
type:"dz"
}
submit(data).then((res)=>{
if(res.code===200){
this.$message.success("提交完成!");
this.getDzDetailByBsm(this.$route.query.bsm)
this.getTreeByBsm(this.$route.query.bsm,'dz','0,1,2')
}
})
vm.setTjDialog(true);
// console.log(this.form)
// let data={
// glbsm:this.bsm,
// status:1,
// type:"dz"
// }
// submit(data).then((res)=>{
// if(res.code===200){
// this.$message.success("提交完成!");
// this.getDzDetailByBsm(this.$route.query.bsm)
// this.getTreeByBsm(this.$route.query.bsm,'dz','0,1,2')
// }
// })
},
getZddm(zdbsm){
getQjZdjbxxDetailById(zdbsm).then((res)=>{
......@@ -716,5 +762,15 @@
border-color: rgba(0, 202, 205, .8);
}
}
.sh-btn{
position: fixed;
top: 74px;
right: 20px;
z-index: 999;
.el-button{
padding: 10px 30px;
}
}
}
</style>
......
......@@ -163,6 +163,7 @@ import { insertDzjbxx } from "@api/dz";
import { insertGzwjbxx } from "@api/gzw";
import { createProcessInstance } from "@api/user";
import { getZrzDetailByBsm} from "@api/zrz"
import { getDzDetailByBsm} from "@api/dz";
export default {
......@@ -410,7 +411,6 @@ export default {
type: "success",
});
this.close();
// 根据res.processInstance.businessId去查询zdbsm TODO
this.$store.state.zrzbsm = res.processInstance.title;
this.$nextTick(()=>{
......@@ -449,6 +449,15 @@ export default {
this.$store.state.newZdbsm = res.result.zdbsm;
}
})
}else if(type === 'dz'){
getDzDetailByBsm(bsm).then((res)=>{
if(res.code === 200){
this.$store.state.zdbsm=res.result.zdbsm;
this.$store.state.dzbsm=res.result.bsm;
this.$store.state.xmmc=res.result.xmmc;
this.$store.state.newZdbsm = res.result.zdbsm;
}
})
}
},
......@@ -491,28 +500,62 @@ export default {
this.$refs['ruleForm2'].validate((valid) => {
if (valid) {
this.ruleForm2.zdbsm = this.$store.state.zdbsm != '' ? this.$store.state.zdbsm : '';
insertDzjbxx(this.ruleForm2)
// insertDzjbxx(this.ruleForm2)
// .then((res) => {
// if (res.code == "200") {
// this.getTreeByBsm(res.result.bsm,'dz','0,1,2');
// this.$message({
// message: "创建成功!",
// type: "success",
// });
// this.$store.state.zdbsm=res.result.zdbsm;
// this.$store.state.dzbsm=res.result.bsm;
// this.$store.state.xmmc=res.result.xmmc;
// this.$store.state.newZdbsm = res.result.zdbsm;
// this.close();
// this.$router.push({
// path: '/dz', query:{
// source: 1,
// bsm:res.result.bsm,
// auth: '0,1,2'
// }
// });
// } else {
// this.$message.error("创建失败!");
// }
// })
// .catch((error) => {});
let data = {
params:this.ruleForm2,
workflowName:'新建多幢'
};
createProcessInstance(data)
.then((res) => {
if (res.code == "200") {
this.getTreeByBsm(res.result.bsm,'dz','0,1,2');
console.log(res);
if (res.needShow) {
this.getTreeByBsm(res.processInstance.title,"dz",'0,1,2');
this.$message({
message: "创建成功!",
type: "success",
});
this.$store.state.zdbsm=res.result.zdbsm;
this.$store.state.dzbsm=res.result.bsm;
this.$store.state.xmmc=res.result.xmmc;
this.$store.state.newZdbsm = res.result.zdbsm;
this.close();
this.$store.state.dzbsm = res.processInstance.title;
this.$nextTick(()=>{
this.loadCache(res.processInstance.title,'dz');
})
// todo 跳转到宗地基本信息内容表页面 (预留)
this.close();
this.$router.push({
path: '/dz', query:{
source: 1,
bsm:res.result.bsm,
auth: '0,1,2'
bsm:res.processInstance.title,
workitemInstanceId:res.workitemInstance.id,
auth: '0,1,2'
}
});
} else {
this.$message.error("创建失败");
this.$message.error("创建失败");
}
})
.catch((error) => {});
......
......@@ -279,7 +279,7 @@
</div>
</div>
<div class="sh-btn">
<el-button type="primary" @click="thzd">退回</el-button>
<el-button type="primary" @click="thzrz">退回</el-button>
<el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button>
<el-button type="primary" @click="shzrz" v-if="workFlowState">审核</el-button>
</div>
......@@ -661,6 +661,18 @@
};
vm.setShDialog(true,data)
},
thzrz(){
let data = {
bdcdyh:this.form.bdcdyh,
zl:this.form.zl,
shyj:'',
shr:'admin',
shsj:'2021-01-22'
}
vm.rollback(data);
},
open() {
const self = this;
this.$confirm('已经存在不动产单元号或者自然幢号, 是否继续?', '提示', {
......