Commit 0f2cff00 authored by Mac's avatar Mac

行政接口的更换

parent f341cc82
...@@ -218,6 +218,76 @@ export function getleaveCmd(data,cmd) { ...@@ -218,6 +218,76 @@ export function getleaveCmd(data,cmd) {
data data
}); });
} }
/**
*我发起 获取详情
*/
export function getAuditInfo(data) {
return request({
url: '/workflow/GetAuditInfo',
method: 'post',
data
});
}
/**
*我发起 撤回
*/
export function undoAudit(data) {
return request({
url: '/workflow/UndoAudit',
method: 'post',
data
});
}
/**
*我发起 同意
*/
export function setConsent(data) {
return request({
url: '/workflow/SetConsent',
method: 'post',
data
});
}
/**
*我发起 不同意
*/
export function setNotConsent(data) {
return request({
url: '/workflow/SetNotConsent',
method: 'post',
data
});
}
/**
*我发起 转交
*/
export function setCareOf(data) {
return request({
url: '/workflow/SetCareOf',
method: 'post',
data
});
}
/**
*抄送 获取列表
*/
export function copyTomyaudit(data) {
return request({
url: '/workflow/CopyTomyaudit',
method: 'post',
data
});
}
/**
*我的审批 获取列表
*/
export function myAudit(data) {
return request({
url: '/workflow/MyAudit',
method: 'post',
data
});
}
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
show-checkbox show-checkbox
accordion accordion
@check-change="handleNodeChange" @check-change="handleNodeChange"
node-key="DepartmentId" node-key="DeptId"
ref="tree" ref="tree"
check-strictly check-strictly
> >
...@@ -257,13 +257,27 @@ ...@@ -257,13 +257,27 @@
</template> </template>
<script> <script>
import {
myInitiateAudit,
gettemplatetype,
getMyInitiateAuditStatus,
getAuditInfo,
undoAudit,//撤回
setConsent,
setNotConsent,
setCareOf,
myAudit
} from '../../api/administration/administration';
import {
getEmployeeAddrBook
} from '../../api/users/user'
export default { export default {
data() { data() {
return { return {
filterText:"", filterText:"",
defaultProps: { defaultProps: {
children: 'ChildList', children: 'ChildList',
label: 'DepartmentName', label: 'DeptName',
disabled: "Disabled" disabled: "Disabled"
}, },
fileList:[], fileList:[],
...@@ -378,7 +392,7 @@ ...@@ -378,7 +392,7 @@
}, },
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
return data.DepartmentName.indexOf(value) !== -1; return data.DeptName.indexOf(value) !== -1;
}, },
openDialog(IsAgree,workFlowId,templateType){ openDialog(IsAgree,workFlowId,templateType){
this.agree=IsAgree this.agree=IsAgree
...@@ -392,11 +406,18 @@ ...@@ -392,11 +406,18 @@
this.outerVisible1=true; this.outerVisible1=true;
this.workFlowId=workFlowId; this.workFlowId=workFlowId;
this.templateType=templateType; this.templateType=templateType;
this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => { getEmployeeAddrBook({}).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
this.memberList = res.data.data this.memberList = res.Data;
} }
}, err => {}) }).catch(() => {
})
// this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => {
// if(res.data.resultCode == 1) {
// this.memberList = res.data.data
// }
// }, err => {})
}, },
clearTransferDialog(done){ clearTransferDialog(done){
done() done()
...@@ -409,10 +430,10 @@ ...@@ -409,10 +430,10 @@
}, },
handleNodeChange(data,checked, node){ handleNodeChange(data,checked, node){
if(checked){ if(checked){
if(data.DepartmentId!=0){ if(data.DeptId!=0){
this.arr.push(data.DepartmentId) this.arr.push(data.DeptId)
this.$refs.tree.setCheckedKeys([data.DepartmentId]); this.$refs.tree.setCheckedKeys([data.DeptId]);
this.transferMsg.CareOfEmId=data.DepartmentId; this.transferMsg.CareOfEmId=data.DeptId;
} }
}else{ }else{
if(this.arr.length==1){ if(this.arr.length==1){
...@@ -433,47 +454,51 @@ ...@@ -433,47 +454,51 @@
this.$message.warning('请选择转交人!') this.$message.warning('请选择转交人!')
return return
} }
this.apipost('WorkFlow_post_SetCareOf',this.transferMsg,res=>{ setCareOf(this.transferMsg).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
this.$message.success(res.data.message) this.$message.success(res.Message)
this.outerVisible1=false; this.outerVisible1=false;
this.getList() this.getList()
this.closeLayer() }else {
}else{ this.$message.error(res.Message)
this.$message.error(res.data.message)
} }
},err=>{}) }).catch(() => {
})
}, },
agreeApproval(){ agreeApproval(){
this.appMsg.WorkFlowId=this.workFlowId this.appMsg.WorkFlowId=this.workFlowId
this.appMsg.TemplateType=this.templateType this.appMsg.TemplateType=this.templateType
this.apipost('WorkFlow_post_SetConsent',this.appMsg,res=>{ setConsent(this.appMsg).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
this.$message.success(res.data.message) this.$message.success(res.Message)
this.outerVisible=false; this.outerVisible=false;
this.getList() this.getList()
this.btnClearDialogMsg() this.btnClearDialogMsg()
this.closeLayer() this.closeLayer()
}else {
}else{ this.$message.error(res.Message)
this.$message.error(res.data.message)
} }
},err=>{}) }).catch(() => {
})
}, },
rejectApproval(){ rejectApproval(){
this.appMsg.WorkFlowId=this.workFlowId this.appMsg.WorkFlowId=this.workFlowId
this.appMsg.TemplateType=this.templateType this.appMsg.TemplateType=this.templateType
this.apipost('WorkFlow_post_SetNotConsent',this.appMsg,res=>{ setNotConsent(this.appMsg).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
this.$message.success(res.data.message) this.$message.success(res.Message)
this.outerVisible=false; this.outerVisible=false;
this.getList() this.getList()
this.btnClearDialogMsg() this.btnClearDialogMsg()
this.closeLayer() this.closeLayer()
}else{ }else {
this.$message.error(res.data.message) this.$message.error(res.Message)
} }
},err=>{}) }).catch(() => {
})
}, },
withdrawAapproval(workFlowId,templateType){ withdrawAapproval(workFlowId,templateType){
...@@ -482,12 +507,15 @@ ...@@ -482,12 +507,15 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.apipost('app_user_workflow_wndoaudit',{workFlowId:workFlowId,templateType:templateType},res=>{ undoAudit({workFlowId:workFlowId,templateType:templateType}).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
this.$message.success('撤回成功。') this.$message.success('撤回成功。')
this.getList() this.getList()
this.showlayer = false;
} }
},err=>{}) }).catch(() => {
})
}).catch(() => { }).catch(() => {
this.$message.info('已取消撤回。') this.$message.info('已取消撤回。')
}); });
...@@ -510,29 +538,35 @@ ...@@ -510,29 +538,35 @@
}, },
getDetail(id,type){ getDetail(id,type){
this.showLayer(); this.showLayer();
this.apipost('app_user_workflow_GetAuditInfo',{WorkFlowId:id,TemplateType:type},res=>{ getAuditInfo({WorkFlowId:id,TemplateType:type}).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
this.detailList=res.data.data this.detailList=res.Data
this.IsAudit=res.data.data.IsAudit this.IsAudit=res.Data.IsAudit
this.IsCancel=res.data.data.IsCancel this.IsCancel=res.Data.IsCancel
this.IsUpdate=res.data.data.IsUpdate this.IsUpdate=res.Data.IsUpdate
} }
},err=>{}) }).catch(() => {
})
}, },
getList(){ getList(){
this.loading=true; this.loading=true;
this.apipost('app_user_workflow_my_audit',this.msg,res=>{
if(res.data.resultCode == 1) { myAudit(this.msg).then(res => {
this.list=res.data.data.pageData; if(res.Code == 1) {
this.total=res.data.data.count; this.list=res.Data.PageData;
this.total=res.Data.Count;
this.loading=false this.loading=false
} }
},err=>{}) }).catch(() => {
})
}, },
getApplyType(){ //模板类型 getApplyType(){ //模板类型
this.apipost('app_user_workflow_get_templatetype',{},res=>{ gettemplatetype({}).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
res.data.data.forEach(item=>{ res.Data.forEach(item=>{
for(let key in item){ for(let key in item){
if (item.hasOwnProperty(key)){ if (item.hasOwnProperty(key)){
this.ApplyTypeList.push({label:key,value:item[key]}) this.ApplyTypeList.push({label:key,value:item[key]})
...@@ -540,12 +574,14 @@ ...@@ -540,12 +574,14 @@
} }
}) })
} }
},err=>{}) }).catch(() => {
})
}, },
getAppAuditStatus(){ getAppAuditStatus(){
this.apipost('app_user_workflow_get_myinitiate_auditstatus',{},res=>{ getMyInitiateAuditStatus({}).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
res.data.data.forEach(item=>{ res.Data.forEach(item=>{
for(let key in item){ for(let key in item){
if (item.hasOwnProperty(key)){ if (item.hasOwnProperty(key)){
this.appAuditStatusList.push({label:key,value:item[key]}) this.appAuditStatusList.push({label:key,value:item[key]})
...@@ -553,7 +589,9 @@ ...@@ -553,7 +589,9 @@
} }
}) })
} }
},err=>{}) }).catch(() => {
})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
......
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
let newArr = []; let newArr = [];
newArr.push(file.file) newArr.push(file.file)
UploadSelfFile('Temporary', file.file, x => { UploadSelfFile('Temporary', file.file, x => {
console.log(x)
let url = x.FileUrl let url = x.FileUrl
this.submitFileList.push(url) this.submitFileList.push(url)
this.fileList.push({ this.fileList.push({
...@@ -427,6 +428,8 @@ ...@@ -427,6 +428,8 @@
this.loading = false this.loading = false
} }
}).catch(() => { }).catch(() => {
this.loading = false
}) })
}, },
}, },
......
...@@ -224,7 +224,8 @@ ...@@ -224,7 +224,8 @@
show-checkbox show-checkbox
accordion accordion
@check-change="handleNodeChange" @check-change="handleNodeChange"
node-key="DepartmentId" empty-text="DeptName"
node-key="DeptId"
ref="tree" ref="tree"
check-strictly check-strictly
> >
...@@ -254,15 +255,23 @@ ...@@ -254,15 +255,23 @@
import { import {
myInitiateAudit, myInitiateAudit,
gettemplatetype, gettemplatetype,
getMyInitiateAuditStatus getMyInitiateAuditStatus,
getAuditInfo,
undoAudit,//撤回
setConsent,
setNotConsent,
setCareOf
} from '../../api/administration/administration'; } from '../../api/administration/administration';
import {
getEmployeeAddrBook
} from '../../api/users/user'
export default { export default {
data() { data() {
return { return {
filterText:"", filterText:"",
defaultProps: { defaultProps: {
children: 'ChildList', children: 'ChildList',
label: 'DepartmentName', label: 'DeptName',
disabled: "Disabled" disabled: "Disabled"
}, },
fileList:[], fileList:[],
...@@ -379,7 +388,7 @@ ...@@ -379,7 +388,7 @@
}, },
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
return data.DepartmentName.indexOf(value) !== -1; return data.DeptName.indexOf(value) !== -1;
}, },
openDialog(IsAgree,workFlowId,templateType){ openDialog(IsAgree,workFlowId,templateType){
this.agree=IsAgree this.agree=IsAgree
...@@ -393,11 +402,18 @@ ...@@ -393,11 +402,18 @@
this.outerVisible1=true; this.outerVisible1=true;
this.workFlowId=workFlowId; this.workFlowId=workFlowId;
this.templateType=templateType; this.templateType=templateType;
this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => { getEmployeeAddrBook({}).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
this.memberList = res.data.data this.memberList = res.Data;
} }
}, err => {}) }).catch(() => {
})
// this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => {
// if(res.data.resultCode == 1) {
// this.memberList = res.data.data
// }
// }, err => {})
}, },
clearTransferDialog(){ clearTransferDialog(){
this.filterText='' this.filterText=''
...@@ -409,10 +425,10 @@ ...@@ -409,10 +425,10 @@
}, },
handleNodeChange(data,checked, node){ handleNodeChange(data,checked, node){
if(checked){ if(checked){
if(data.DepartmentId!=0){ if(data.DeptId!=0){
this.arr.push(data.DepartmentId) this.arr.push(data.DeptId)
this.$refs.tree.setCheckedKeys([data.DepartmentId]); this.$refs.tree.setCheckedKeys([data.DeptId]);
this.transferMsg.CareOfEmId=data.DepartmentId; this.transferMsg.CareOfEmId=data.DeptId;
} }
}else{ }else{
if(this.arr.length==1){ if(this.arr.length==1){
...@@ -433,45 +449,54 @@ ...@@ -433,45 +449,54 @@
this.$message.warning('请选择转交人!') this.$message.warning('请选择转交人!')
return return
} }
this.apipost('WorkFlow_post_SetCareOf',this.transferMsg,res=>{
if(res.data.resultCode == 1) { setCareOf(this.transferMsg).then(res => {
this.$message.success(res.data.message) if(res.Code == 1) {
this.$message.success(res.Message)
this.outerVisible1=false; this.outerVisible1=false;
this.getList() this.getList()
}else{ }else {
this.$message.error(res.data.message) this.$message.error(res.Message)
} }
},err=>{}) }).catch(() => {
})
}, },
agreeApproval(){ agreeApproval(){
this.appMsg.WorkFlowId=this.workFlowId this.appMsg.WorkFlowId=this.workFlowId
this.appMsg.TemplateType=this.templateType this.appMsg.TemplateType=this.templateType
this.apipost('WorkFlow_post_SetConsent',this.appMsg,res=>{
if(res.data.resultCode == 1) { setConsent(this.appMsg).then(res => {
this.$message.success(res.data.message) if(res.Code == 1) {
this.$message.success(res.Message)
this.outerVisible=false; this.outerVisible=false;
this.getList() this.getList()
this.btnClearDialogMsg() this.btnClearDialogMsg()
this.closeLayer() this.closeLayer()
}else{ }else {
this.$message.error(res.data.message) this.$message.error(res.Message)
} }
},err=>{}) }).catch(() => {
})
}, },
rejectApproval(){ rejectApproval(){
this.appMsg.WorkFlowId=this.workFlowId this.appMsg.WorkFlowId=this.workFlowId
this.appMsg.TemplateType=this.templateType this.appMsg.TemplateType=this.templateType
this.apipost('WorkFlow_post_SetNotConsent',this.appMsg,res=>{ setNotConsent(this.appMsg).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
this.$message.success(res.data.message) this.$message.success(res.Message)
this.outerVisible=false; this.outerVisible=false;
this.getList() this.getList()
this.btnClearDialogMsg() this.btnClearDialogMsg()
this.closeLayer() this.closeLayer()
}else{ }else {
this.$message.error(res.data.message) this.$message.error(res.Message)
} }
},err=>{}) }).catch(() => {
})
}, },
withdrawAapproval(workFlowId,templateType){ withdrawAapproval(workFlowId,templateType){
...@@ -480,18 +505,22 @@ ...@@ -480,18 +505,22 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.apipost('app_user_workflow_wndoaudit',{workFlowId:workFlowId,templateType:templateType},res=>{
if(res.data.resultCode == 1) { undoAudit({workFlowId:workFlowId,templateType:templateType}).then(res => {
if(res.Code == 1) {
this.$message.success('撤回成功。') this.$message.success('撤回成功。')
this.getList() this.getList()
this.showlayer = false;
} }
},err=>{}) }).catch(() => {
})
}).catch(() => { }).catch(() => {
this.$message.info('已取消撤回。') this.$message.info('已取消撤回。')
}); });
}, },
updateAapproval(path,cmd,submitCmd,workFlowId,templateId){ updateAapproval(path,cmd,submitCmd,workFlowId,templateId){
this.$router.push({ name: path, query:{cmd:cmd,submitCmd:submitCmd,workFlowId:workFlowId,templateId:templateId}}) this.$router.push({ path: path, query:{cmd:cmd,submitCmd:submitCmd,workFlowId:workFlowId,templateId:templateId}})
}, },
toArr(val){ toArr(val){
let arr=[] let arr=[]
...@@ -505,20 +534,22 @@ ...@@ -505,20 +534,22 @@
}, },
getDetail(id,type){ getDetail(id,type){
this.showLayer(); this.showLayer();
this.apipost('app_user_workflow_GetAuditInfo',{WorkFlowId:id,TemplateType:type},res=>{ getAuditInfo({WorkFlowId:id,TemplateType:type}).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
this.detailList=res.data.data this.detailList=res.Data
this.IsAudit=res.data.data.IsAudit this.IsAudit=res.Data.IsAudit
this.IsCancel=res.data.data.IsCancel this.IsCancel=res.Data.IsCancel
this.IsUpdate=res.data.data.IsUpdate this.IsUpdate=res.Data.IsUpdate
} }
},err=>{}) }).catch(() => {
})
}, },
getList(){ getList(){
this.loading=true; this.loading=true;
myInitiateAudit({}).then(res => { myInitiateAudit(this.msg).then(res => {
if(res.Code == 1) { if(res.Code == 1) {
this.list=res.Data.pageData; this.list=res.Data.PageData;
this.total=res.Data.Count; this.total=res.Data.Count;
this.loading=false this.loading=false
} }
......
...@@ -173,7 +173,8 @@ ...@@ -173,7 +173,8 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog custom-class='w500' :title="dialogTitle" :visible.sync="outerVisible" center before-close="clearDialogMsg"> <el-dialog custom-class='w500' :title="dialogTitle" :visible.sync="outerVisible" center >
<!-- <el-dialog custom-class='w500' :title="dialogTitle" :visible.sync="outerVisible" center before-close="clearDialogMsg">-->
<table class="layerTable" border="0" cellspacing="0" cellpadding="0"> <table class="layerTable" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td>审批意见</td> <td>审批意见</td>
...@@ -255,6 +256,17 @@ ...@@ -255,6 +256,17 @@
</template> </template>
<script> <script>
import {
myInitiateAudit,
gettemplatetype,
getMyInitiateAuditStatus,
getAuditInfo,
undoAudit,//撤回
setConsent,
setNotConsent,
setCareOf,
copyTomyaudit
} from '../../api/administration/administration';
export default { export default {
data() { data() {
return { return {
...@@ -351,11 +363,11 @@ ...@@ -351,11 +363,11 @@
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning('最多只能上传9张图片!'); this.$message.warning('最多只能上传9张图片!');
}, },
clearDialogMsg(done){ // clearDialogMsg(done){
done() // done()
this.appMsg.Description='' // this.appMsg.Description=''
// this.appMsg.Image=[] // // this.appMsg.Image=[]
}, // },
btnClearDialogMsg(){ btnClearDialogMsg(){
this.outerVisible=false this.outerVisible=false
this.appMsg.Description='' this.appMsg.Description=''
...@@ -521,20 +533,29 @@ ...@@ -521,20 +533,29 @@
}, },
getList(){ getList(){
this.loading=true; this.loading=true;
this.apipost('app_user_workflow_copy_tomyaudit',this.msg,res=>{
if(res.data.resultCode == 1) {
this.list=res.data.data.pageData; copyTomyaudit(this.msg).then(res => {
this.total=res.data.data.count; if(res.Code == 1) {
this.list=res.Data.PageData;
this.total=res.Data.Count;
this.loading=false this.loading=false
} }
},err=>{}) }).catch(() => {
})
// this.apipost('app_user_workflow_copy_tomyaudit',this.msg,res=>{
// if(res.data.resultCode == 1) {
//
// this.list=res.data.data.pageData;
// this.total=res.data.data.count;
// this.loading=false
// }
// },err=>{})
}, },
getApplyType(){ //模板类型 getApplyType(){ //模板类型
this.apipost('app_user_workflow_get_templatetype',{},res=>{ gettemplatetype({}).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
res.Data.forEach(item=>{
res.data.data.forEach(item=>{
for(let key in item){ for(let key in item){
if (item.hasOwnProperty(key)){ if (item.hasOwnProperty(key)){
this.ApplyTypeList.push({label:key,value:item[key]}) this.ApplyTypeList.push({label:key,value:item[key]})
...@@ -542,13 +563,14 @@ ...@@ -542,13 +563,14 @@
} }
}) })
} }
},err=>{}) }).catch(() => {
})
}, },
getAppAuditStatus(){ getAppAuditStatus(){
this.apipost('app_user_workflow_get_myinitiate_auditstatus',{},res=>{ getMyInitiateAuditStatus({}).then(res => {
if(res.data.resultCode == 1) { if(res.Code == 1) {
res.Data.forEach(item=>{
res.data.data.forEach(item=>{
for(let key in item){ for(let key in item){
if (item.hasOwnProperty(key)){ if (item.hasOwnProperty(key)){
this.appAuditStatusList.push({label:key,value:item[key]}) this.appAuditStatusList.push({label:key,value:item[key]})
...@@ -556,7 +578,9 @@ ...@@ -556,7 +578,9 @@
} }
}) })
} }
},err=>{}) }).catch(() => {
})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment