需求计划撤回
This commit is contained in:
parent
4fa9c58e7b
commit
4043dfe869
|
|
@ -163,6 +163,7 @@
|
||||||
window.history.pushState({}, 0, url);
|
window.history.pushState({}, 0, url);
|
||||||
}
|
}
|
||||||
initPage(miniAdmin);
|
initPage(miniAdmin);
|
||||||
|
sessionStorage.setItem('us', JSON.stringify(result.data));
|
||||||
} else if (result.code === 401) {
|
} else if (result.code === 401) {
|
||||||
closeWindowOpen();
|
closeWindowOpen();
|
||||||
}
|
}
|
||||||
|
|
@ -224,9 +225,9 @@
|
||||||
// 登录获取token
|
// 登录获取token
|
||||||
let login_url = dataUrl + 'login/userLogin'
|
let login_url = dataUrl + 'login/userLogin'
|
||||||
const params = {
|
const params = {
|
||||||
"username": 'bns',
|
"username": 'sa',
|
||||||
// "password": '3NBzZK7qxhMhrmvi63FnuQ==',
|
// "password": '3NBzZK7qxhMhrmvi63FnuQ==',
|
||||||
"password": '1769fb2837e10e9d22c1c25add76355a',
|
"password": 'ebbd6ea34bbab2b0813afcf59c8c9556',
|
||||||
}
|
}
|
||||||
ajaxRequest(login_url, "POST", params, true, function () {
|
ajaxRequest(login_url, "POST", params, true, function () {
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ function initTable() {
|
||||||
let auditStatus = d.auditStatus;
|
let auditStatus = d.auditStatus;
|
||||||
let html = "";
|
let html = "";
|
||||||
html += "<a onclick='applyPlanDetail(" + JSON.stringify(d) + ")'>详情</a>";
|
html += "<a onclick='applyPlanDetail(" + JSON.stringify(d) + ")'>详情</a>";
|
||||||
if (auditStatus.indexOf('驳回') > -1) {
|
if (auditStatus.indexOf('驳回') > -1 || auditStatus.indexOf('已撤回') > -1) {
|
||||||
html += "<div class='splitLine'>|</div><a onclick='editApplyPlan(" + JSON.stringify(d) + ")'>修改</a>";
|
html += "<div class='splitLine'>|</div><a onclick='editApplyPlan(" + JSON.stringify(d) + ")'>修改</a>";
|
||||||
}
|
}
|
||||||
return html;
|
return html;
|
||||||
|
|
@ -208,6 +208,9 @@ function exportExcel() {
|
||||||
//审核状态// 审核状态
|
//审核状态// 审核状态
|
||||||
function getCheckStatus(statusType, status) {
|
function getCheckStatus(statusType, status) {
|
||||||
var company = "";
|
var company = "";
|
||||||
|
if(statusType === 0 && status === 0){
|
||||||
|
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>已撤回";
|
||||||
|
}
|
||||||
if (statusType === 1) {
|
if (statusType === 1) {
|
||||||
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
|
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
|
||||||
} else if (statusType === 2) {
|
} else if (statusType === 2) {
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ function setOperRecordInfo(list, obj) {
|
||||||
if (item.hours === 0 && item.minutes === 0) {
|
if (item.hours === 0 && item.minutes === 0) {
|
||||||
minutes = 1;
|
minutes = 1;
|
||||||
}
|
}
|
||||||
if (item.auditType === '0' || item.auditType === '1') {
|
if (item.auditType === '0' || item.auditType === '1' || item.auditType === '-1') {
|
||||||
dept = '项目部';
|
dept = '项目部';
|
||||||
} else if (item.auditType === '2') {
|
} else if (item.auditType === '2') {
|
||||||
dept = '分公司';
|
dept = '分公司';
|
||||||
|
|
@ -356,6 +356,8 @@ function setOperRecordInfo(list, obj) {
|
||||||
// 操作流程
|
// 操作流程
|
||||||
if (index === 0 && item.auditType === '1') {
|
if (index === 0 && item.auditType === '1') {
|
||||||
operData = '发起申请';
|
operData = '发起申请';
|
||||||
|
} else if (item.auditType === '-1') {
|
||||||
|
operData = '撤回申请';
|
||||||
} else if (index > 0 && item.auditType === '1') {
|
} else if (index > 0 && item.auditType === '1') {
|
||||||
operData = '重新提交申请';
|
operData = '重新提交申请';
|
||||||
} else if (item.auditType === '2' && item.auditStatus === '2') {
|
} else if (item.auditType === '2' && item.auditStatus === '2') {
|
||||||
|
|
@ -405,11 +407,23 @@ function setOperRecordInfo(list, obj) {
|
||||||
function setCheckStatus(obj) {
|
function setCheckStatus(obj) {
|
||||||
$('#code').empty().html(obj.code);
|
$('#code').empty().html(obj.code);
|
||||||
$('#checkStatus').html(getCheckStatus(obj.statusType, obj.status));
|
$('#checkStatus').html(getCheckStatus(obj.statusType, obj.status));
|
||||||
|
if(obj.statusType === 2 && obj.status === 1 && objParam.checkType !== 2){ // 待分公司审核可以撤回 && 申请人可以撤回 && 不是审核页面跳转
|
||||||
|
let user = sessionStorage.getItem('us');
|
||||||
|
if(user){
|
||||||
|
let userObj = JSON.parse(user);
|
||||||
|
if(userObj.username === obj.userName){
|
||||||
|
$('#print').before("<button type='button' style='margin-left:10px;' class='layui-btn layui-bg-orange' onclick='withdrawData("+JSON.stringify(obj)+")'>撤回</button>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 审核状态
|
// 审核状态
|
||||||
function getCheckStatus(statusType, status) {
|
function getCheckStatus(statusType, status) {
|
||||||
var company = "";
|
var company = "";
|
||||||
|
if(statusType === 0 && status === 0){
|
||||||
|
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>已撤回";
|
||||||
|
}
|
||||||
if (statusType === 1) {
|
if (statusType === 1) {
|
||||||
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
|
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
|
||||||
} else if (statusType === 2) {
|
} else if (statusType === 2) {
|
||||||
|
|
@ -445,6 +459,32 @@ function print() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 撤回
|
||||||
|
function withdrawData(data) {
|
||||||
|
layer.confirm("确定撤回此条数据吗?", { 'title': '操作提示', move: false }, function () {
|
||||||
|
let loadingMsg = layer.msg('数据撤回中,请稍候...', { icon: 16, scrollbar: false, time: 0 });
|
||||||
|
let url = dataUrl + "backstage/carNeedPlan/withdrawData"
|
||||||
|
let obj = { id: data.id }
|
||||||
|
let params = {
|
||||||
|
encryptedData: JSON.stringify(obj)
|
||||||
|
}
|
||||||
|
ajaxRequest(url, "POST", params, true, function () {
|
||||||
|
}, function (result) {
|
||||||
|
console.error(result);
|
||||||
|
layer.close(loadingMsg); // 关闭提示层
|
||||||
|
if (result.code === 200) {
|
||||||
|
parent.layer.msg(result.msg, { icon: 1 })
|
||||||
|
closePage();
|
||||||
|
} else {
|
||||||
|
layer.msg(result.msg, { icon: 2 })
|
||||||
|
}
|
||||||
|
}, function (xhr) {
|
||||||
|
layer.close(loadingMsg); // 关闭提示层
|
||||||
|
error(xhr)
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 需求计划申请审核
|
// 需求计划申请审核
|
||||||
function check() {
|
function check() {
|
||||||
objParam.checkType = '2'; // 需求计划申请审核
|
objParam.checkType = '2'; // 需求计划申请审核
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue