diff --git a/index.html b/index.html
index d36954f..fadce1e 100644
--- a/index.html
+++ b/index.html
@@ -163,6 +163,7 @@
window.history.pushState({}, 0, url);
}
initPage(miniAdmin);
+ sessionStorage.setItem('us', JSON.stringify(result.data));
} else if (result.code === 401) {
closeWindowOpen();
}
@@ -224,10 +225,56 @@
// 登录获取token
let login_url = dataUrl + 'login/userLogin'
const params = {
- "username": 'bns',
+ "username": 'sa',
+ // "password": '3NBzZK7qxhMhrmvi63FnuQ==',
+ "password": 'ebbd6ea34bbab2b0813afcf59c8c9556',
+ }
+ /* const params = {
+ "username": 'fgs-check-001',
// "password": '3NBzZK7qxhMhrmvi63FnuQ==',
"password": '1769fb2837e10e9d22c1c25add76355a',
- }
+ } */
+ /* const params = {
+ "username": 'fgs-check-002',
+ // "password": '3NBzZK7qxhMhrmvi63FnuQ==',
+ "password": '1769fb2837e10e9d22c1c25add76355a',
+ } */
+ /* const params = {
+ "username": 'fgs-check-003',
+ // "password": '3NBzZK7qxhMhrmvi63FnuQ==',
+ "password": '1769fb2837e10e9d22c1c25add76355a',
+ } */
+ /* const params = {
+ "username": 'xgzx-check-001',
+ // "password": '3NBzZK7qxhMhrmvi63FnuQ==',
+ "password": '1769fb2837e10e9d22c1c25add76355a',
+ } */
+ /* const params = {
+ "username": 'xgzx-check-002',
+ // "password": '3NBzZK7qxhMhrmvi63FnuQ==',
+ "password": '1769fb2837e10e9d22c1c25add76355a',
+ } */
+ /* const params = {
+ "username": 'xgzx-check-003',
+ // "password": '3NBzZK7qxhMhrmvi63FnuQ==',
+ "password": '1769fb2837e10e9d22c1c25add76355a',
+ } */
+ /* const params = {
+ "username": 'jj-check-001',
+ // "password": '3NBzZK7qxhMhrmvi63FnuQ==',
+ "password": '1769fb2837e10e9d22c1c25add76355a',
+ } */
+ /* const params = {
+ "username": 'jj-check-002',
+ // "password": '3NBzZK7qxhMhrmvi63FnuQ==',
+ "password": '1769fb2837e10e9d22c1c25add76355a',
+ } */
+ /* const params = {
+ "username": 'jj-check-003',
+ // "password": '3NBzZK7qxhMhrmvi63FnuQ==',
+ "password": '1769fb2837e10e9d22c1c25add76355a',
+ } */
+ // alert(params.username);
ajaxRequest(login_url, "POST", params, true, function () {
}, function (result) {
console.log(result);
diff --git a/js/aq_demand_plan/apply_plan_list.js b/js/aq_demand_plan/apply_plan_list.js
index e7af8da..ec70789 100644
--- a/js/aq_demand_plan/apply_plan_list.js
+++ b/js/aq_demand_plan/apply_plan_list.js
@@ -171,7 +171,7 @@ function initTable() {
let status = getCheckStatus(d.statusType, d.status);
let html = "";
html += "详情";
- if (status.indexOf('驳回') > -1) {
+ if (status.indexOf('驳回') > -1 || status.indexOf('已撤回') > -1) {
html += "
|
修改";
}
return html;
@@ -204,6 +204,9 @@ function exportExcel() {
//审核状态
function getCheckStatus(statusType, status) {
var company = "";
+ if(statusType === '0' && status === '0'){
+ return "●已撤回";
+ }
if (statusType === '1') {
return "●审核通过";
} else if (statusType === '2') {
diff --git a/js/aq_demand_plan/child/apply_plan_detail.js b/js/aq_demand_plan/child/apply_plan_detail.js
index 5315147..a9a4080 100644
--- a/js/aq_demand_plan/child/apply_plan_detail.js
+++ b/js/aq_demand_plan/child/apply_plan_detail.js
@@ -254,7 +254,7 @@ function setOperRecordInfo(list, obj) {
if (item.hours === 0 && item.minutes === 0) {
minutes = 1;
}
- if (item.auditType === '0' || item.auditType === '1') {
+ if (item.auditType === '0' || item.auditType === '1'|| item.auditType === '-1') {
dept = '项目部';
} else if (item.auditType === '2') {
dept = '分公司';
@@ -267,6 +267,8 @@ function setOperRecordInfo(list, obj) {
// 操作流程
if (item.auditType === '0') {
operData = '发起申请';
+ } else if (item.auditType === '-1') {
+ operData = '撤回申请';
} else if (item.auditType === '1') {
operData = '重新提交申请';
} else if (item.auditStatus === '2' && !item.completed) {
@@ -310,11 +312,23 @@ function setOperRecordInfo(list, obj) {
function setCheckStatus(obj) {
$('#code').empty().html(obj.code);
$('#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.creator){
+ $('#print').before("");
+ }
+ }
+ }
}
// 审核状态
function getCheckStatus(statusType, status) {
var company = "";
+ if(statusType === '0' && status === '0'){
+ return "●已撤回";
+ }
if (statusType === '1') {
return "●审核通过";
} else if (statusType === '2') {
@@ -350,6 +364,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() {
objParam.checkType = '2'; // 需求计划申请审核