Commit 0f2cff00 authored by Mac's avatar Mac

行政接口的更换

parent f341cc82
......@@ -218,6 +218,76 @@ export function getleaveCmd(data,cmd) {
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 @@
show-checkbox
accordion
@check-change="handleNodeChange"
node-key="DepartmentId"
node-key="DeptId"
ref="tree"
check-strictly
>
......@@ -257,13 +257,27 @@
</template>
<script>
import {
myInitiateAudit,
gettemplatetype,
getMyInitiateAuditStatus,
getAuditInfo,
undoAudit,//撤回
setConsent,
setNotConsent,
setCareOf,
myAudit
} from '../../api/administration/administration';
import {
getEmployeeAddrBook
} from '../../api/users/user'
export default {
data() {
return {
filterText:"",
defaultProps: {
children: 'ChildList',
label: 'DepartmentName',
label: 'DeptName',
disabled: "Disabled"
},
fileList:[],
......@@ -378,7 +392,7 @@
},
filterNode(value, data) {
if (!value) return true;
return data.DepartmentName.indexOf(value) !== -1;
return data.DeptName.indexOf(value) !== -1;
},
openDialog(IsAgree,workFlowId,templateType){
this.agree=IsAgree
......@@ -392,11 +406,18 @@
this.outerVisible1=true;
this.workFlowId=workFlowId;
this.templateType=templateType;
this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => {
if(res.data.resultCode == 1) {
this.memberList = res.data.data
getEmployeeAddrBook({}).then(res => {
if(res.Code == 1) {
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){
done()
......@@ -409,10 +430,10 @@
},
handleNodeChange(data,checked, node){
if(checked){
if(data.DepartmentId!=0){
this.arr.push(data.DepartmentId)
this.$refs.tree.setCheckedKeys([data.DepartmentId]);
this.transferMsg.CareOfEmId=data.DepartmentId;
if(data.DeptId!=0){
this.arr.push(data.DeptId)
this.$refs.tree.setCheckedKeys([data.DeptId]);
this.transferMsg.CareOfEmId=data.DeptId;
}
}else{
if(this.arr.length==1){
......@@ -433,47 +454,51 @@
this.$message.warning('请选择转交人!')
return
}
this.apipost('WorkFlow_post_SetCareOf',this.transferMsg,res=>{
if(res.data.resultCode == 1) {
this.$message.success(res.data.message)
setCareOf(this.transferMsg).then(res => {
if(res.Code == 1) {
this.$message.success(res.Message)
this.outerVisible1=false;
this.getList()
this.closeLayer()
}else{
this.$message.error(res.data.message)
}else {
this.$message.error(res.Message)
}
},err=>{})
}).catch(() => {
})
},
agreeApproval(){
this.appMsg.WorkFlowId=this.workFlowId
this.appMsg.TemplateType=this.templateType
this.apipost('WorkFlow_post_SetConsent',this.appMsg,res=>{
if(res.data.resultCode == 1) {
this.$message.success(res.data.message)
setConsent(this.appMsg).then(res => {
if(res.Code == 1) {
this.$message.success(res.Message)
this.outerVisible=false;
this.getList()
this.btnClearDialogMsg()
this.closeLayer()
}else{
this.$message.error(res.data.message)
}else {
this.$message.error(res.Message)
}
},err=>{})
}).catch(() => {
})
},
rejectApproval(){
this.appMsg.WorkFlowId=this.workFlowId
this.appMsg.TemplateType=this.templateType
this.apipost('WorkFlow_post_SetNotConsent',this.appMsg,res=>{
if(res.data.resultCode == 1) {
this.$message.success(res.data.message)
setNotConsent(this.appMsg).then(res => {
if(res.Code == 1) {
this.$message.success(res.Message)
this.outerVisible=false;
this.getList()
this.btnClearDialogMsg()
this.closeLayer()
}else{
this.$message.error(res.data.message)
}else {
this.$message.error(res.Message)
}
},err=>{})
}).catch(() => {
})
},
withdrawAapproval(workFlowId,templateType){
......@@ -482,12 +507,15 @@
cancelButtonText: '取消',
type: 'warning'
}).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.getList()
this.showlayer = false;
}
},err=>{})
}).catch(() => {
})
}).catch(() => {
this.$message.info('已取消撤回。')
});
......@@ -510,29 +538,35 @@
},
getDetail(id,type){
this.showLayer();
this.apipost('app_user_workflow_GetAuditInfo',{WorkFlowId:id,TemplateType:type},res=>{
if(res.data.resultCode == 1) {
this.detailList=res.data.data
this.IsAudit=res.data.data.IsAudit
this.IsCancel=res.data.data.IsCancel
this.IsUpdate=res.data.data.IsUpdate
getAuditInfo({WorkFlowId:id,TemplateType:type}).then(res => {
if(res.Code == 1) {
this.detailList=res.Data
this.IsAudit=res.Data.IsAudit
this.IsCancel=res.Data.IsCancel
this.IsUpdate=res.Data.IsUpdate
}
},err=>{})
}).catch(() => {
})
},
getList(){
this.loading=true;
this.apipost('app_user_workflow_my_audit',this.msg,res=>{
if(res.data.resultCode == 1) {
this.list=res.data.data.pageData;
this.total=res.data.data.count;
myAudit(this.msg).then(res => {
if(res.Code == 1) {
this.list=res.Data.PageData;
this.total=res.Data.Count;
this.loading=false
}
},err=>{})
}).catch(() => {
})
},
getApplyType(){ //模板类型
this.apipost('app_user_workflow_get_templatetype',{},res=>{
if(res.data.resultCode == 1) {
res.data.data.forEach(item=>{
gettemplatetype({}).then(res => {
if(res.Code == 1) {
res.Data.forEach(item=>{
for(let key in item){
if (item.hasOwnProperty(key)){
this.ApplyTypeList.push({label:key,value:item[key]})
......@@ -540,12 +574,14 @@
}
})
}
},err=>{})
}).catch(() => {
})
},
getAppAuditStatus(){
this.apipost('app_user_workflow_get_myinitiate_auditstatus',{},res=>{
if(res.data.resultCode == 1) {
res.data.data.forEach(item=>{
getMyInitiateAuditStatus({}).then(res => {
if(res.Code == 1) {
res.Data.forEach(item=>{
for(let key in item){
if (item.hasOwnProperty(key)){
this.appAuditStatusList.push({label:key,value:item[key]})
......@@ -553,7 +589,9 @@
}
})
}
},err=>{})
}).catch(() => {
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
......
......@@ -146,6 +146,7 @@
let newArr = [];
newArr.push(file.file)
UploadSelfFile('Temporary', file.file, x => {
console.log(x)
let url = x.FileUrl
this.submitFileList.push(url)
this.fileList.push({
......@@ -427,6 +428,8 @@
this.loading = false
}
}).catch(() => {
this.loading = false
})
},
},
......
......@@ -224,7 +224,8 @@
show-checkbox
accordion
@check-change="handleNodeChange"
node-key="DepartmentId"
empty-text="DeptName"
node-key="DeptId"
ref="tree"
check-strictly
>
......@@ -254,15 +255,23 @@
import {
myInitiateAudit,
gettemplatetype,
getMyInitiateAuditStatus
getMyInitiateAuditStatus,
getAuditInfo,
undoAudit,//撤回
setConsent,
setNotConsent,
setCareOf
} from '../../api/administration/administration';
import {
getEmployeeAddrBook
} from '../../api/users/user'
export default {
data() {
return {
filterText:"",
defaultProps: {
children: 'ChildList',
label: 'DepartmentName',
label: 'DeptName',
disabled: "Disabled"
},
fileList:[],
......@@ -379,7 +388,7 @@
},
filterNode(value, data) {
if (!value) return true;
return data.DepartmentName.indexOf(value) !== -1;
return data.DeptName.indexOf(value) !== -1;
},
openDialog(IsAgree,workFlowId,templateType){
this.agree=IsAgree
......@@ -393,11 +402,18 @@
this.outerVisible1=true;
this.workFlowId=workFlowId;
this.templateType=templateType;
this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => {
if(res.data.resultCode == 1) {
this.memberList = res.data.data
getEmployeeAddrBook({}).then(res => {
if(res.Code == 1) {
this.memberList = res.Data;
}
}, err => {})
}).catch(() => {
})
// this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => {
// if(res.data.resultCode == 1) {
// this.memberList = res.data.data
// }
// }, err => {})
},
clearTransferDialog(){
this.filterText=''
......@@ -409,10 +425,10 @@
},
handleNodeChange(data,checked, node){
if(checked){
if(data.DepartmentId!=0){
this.arr.push(data.DepartmentId)
this.$refs.tree.setCheckedKeys([data.DepartmentId]);
this.transferMsg.CareOfEmId=data.DepartmentId;
if(data.DeptId!=0){
this.arr.push(data.DeptId)
this.$refs.tree.setCheckedKeys([data.DeptId]);
this.transferMsg.CareOfEmId=data.DeptId;
}
}else{
if(this.arr.length==1){
......@@ -433,45 +449,54 @@
this.$message.warning('请选择转交人!')
return
}
this.apipost('WorkFlow_post_SetCareOf',this.transferMsg,res=>{
if(res.data.resultCode == 1) {
this.$message.success(res.data.message)
setCareOf(this.transferMsg).then(res => {
if(res.Code == 1) {
this.$message.success(res.Message)
this.outerVisible1=false;
this.getList()
}else{
this.$message.error(res.data.message)
}else {
this.$message.error(res.Message)
}
},err=>{})
}).catch(() => {
})
},
agreeApproval(){
this.appMsg.WorkFlowId=this.workFlowId
this.appMsg.TemplateType=this.templateType
this.apipost('WorkFlow_post_SetConsent',this.appMsg,res=>{
if(res.data.resultCode == 1) {
this.$message.success(res.data.message)
setConsent(this.appMsg).then(res => {
if(res.Code == 1) {
this.$message.success(res.Message)
this.outerVisible=false;
this.getList()
this.btnClearDialogMsg()
this.closeLayer()
}else{
this.$message.error(res.data.message)
}else {
this.$message.error(res.Message)
}
},err=>{})
}).catch(() => {
})
},
rejectApproval(){
this.appMsg.WorkFlowId=this.workFlowId
this.appMsg.TemplateType=this.templateType
this.apipost('WorkFlow_post_SetNotConsent',this.appMsg,res=>{
if(res.data.resultCode == 1) {
this.$message.success(res.data.message)
setNotConsent(this.appMsg).then(res => {
if(res.Code == 1) {
this.$message.success(res.Message)
this.outerVisible=false;
this.getList()
this.btnClearDialogMsg()
this.closeLayer()
}else{
this.$message.error(res.data.message)
}else {
this.$message.error(res.Message)
}
},err=>{})
}).catch(() => {
})
},
withdrawAapproval(workFlowId,templateType){
......@@ -480,18 +505,22 @@
cancelButtonText: '取消',
type: 'warning'
}).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.getList()
this.getList()
this.showlayer = false;
}
},err=>{})
}).catch(() => {
})
}).catch(() => {
this.$message.info('已取消撤回。')
});
},
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){
let arr=[]
......@@ -505,20 +534,22 @@
},
getDetail(id,type){
this.showLayer();
this.apipost('app_user_workflow_GetAuditInfo',{WorkFlowId:id,TemplateType:type},res=>{
if(res.data.resultCode == 1) {
this.detailList=res.data.data
this.IsAudit=res.data.data.IsAudit
this.IsCancel=res.data.data.IsCancel
this.IsUpdate=res.data.data.IsUpdate
getAuditInfo({WorkFlowId:id,TemplateType:type}).then(res => {
if(res.Code == 1) {
this.detailList=res.Data
this.IsAudit=res.Data.IsAudit
this.IsCancel=res.Data.IsCancel
this.IsUpdate=res.Data.IsUpdate
}
},err=>{})
}).catch(() => {
})
},
getList(){
this.loading=true;
myInitiateAudit({}).then(res => {
myInitiateAudit(this.msg).then(res => {
if(res.Code == 1) {
this.list=res.Data.pageData;
this.list=res.Data.PageData;
this.total=res.Data.Count;
this.loading=false
}
......
......@@ -173,7 +173,8 @@
</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">
<tr>
<td>审批意见</td>
......@@ -255,6 +256,17 @@
</template>
<script>
import {
myInitiateAudit,
gettemplatetype,
getMyInitiateAuditStatus,
getAuditInfo,
undoAudit,//撤回
setConsent,
setNotConsent,
setCareOf,
copyTomyaudit
} from '../../api/administration/administration';
export default {
data() {
return {
......@@ -351,11 +363,11 @@
handleExceed(files, fileList) {
this.$message.warning('最多只能上传9张图片!');
},
clearDialogMsg(done){
done()
this.appMsg.Description=''
// this.appMsg.Image=[]
},
// clearDialogMsg(done){
// done()
// this.appMsg.Description=''
// // this.appMsg.Image=[]
// },
btnClearDialogMsg(){
this.outerVisible=false
this.appMsg.Description=''
......@@ -521,20 +533,29 @@
},
getList(){
this.loading=true;
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;
copyTomyaudit(this.msg).then(res => {
if(res.Code == 1) {
this.list=res.Data.PageData;
this.total=res.Data.Count;
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(){ //模板类型
this.apipost('app_user_workflow_get_templatetype',{},res=>{
if(res.data.resultCode == 1) {
res.data.data.forEach(item=>{
gettemplatetype({}).then(res => {
if(res.Code == 1) {
res.Data.forEach(item=>{
for(let key in item){
if (item.hasOwnProperty(key)){
this.ApplyTypeList.push({label:key,value:item[key]})
......@@ -542,13 +563,14 @@
}
})
}
},err=>{})
}).catch(() => {
})
},
getAppAuditStatus(){
this.apipost('app_user_workflow_get_myinitiate_auditstatus',{},res=>{
if(res.data.resultCode == 1) {
res.data.data.forEach(item=>{
getMyInitiateAuditStatus({}).then(res => {
if(res.Code == 1) {
res.Data.forEach(item=>{
for(let key in item){
if (item.hasOwnProperty(key)){
this.appAuditStatusList.push({label:key,value:item[key]})
......@@ -556,7 +578,9 @@
}
})
}
},err=>{})
}).catch(() => {
})
},
handleCurrentChange(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