diff --git a/js/car_demand_plan/apply_plan_audit_list.js b/js/car_demand_plan/apply_plan_audit_list.js
index 15d6e58..6a74142 100644
--- a/js/car_demand_plan/apply_plan_audit_list.js
+++ b/js/car_demand_plan/apply_plan_audit_list.js
@@ -39,17 +39,17 @@ function reloadData() {
// 重载表格
function reloadTable(pageNum) {
table.reload("currentTableId", {
- page: {
- curr: pageNum ? pageNum : 1,
+ page: {
+ curr: pageNum ? pageNum : 1,
+ },
+ where: {
+ encryptedData: JSON.stringify({
+ 'keyWord': $('#keyWord').val(),
+ 'auditStatus': $('#auditStatus').val(),
+ applyType:'0'
+ }),
+ },
},
- where: {
- encryptedData: JSON.stringify({
- 'keyWord': $('#keyWord').val(),
- 'auditStatus': $('#auditStatus').val(),
- applyType:'0'
- }),
- },
- },
);
}
diff --git a/js/car_demand_plan/apply_plan_list.js b/js/car_demand_plan/apply_plan_list.js
index edbf545..3cf9533 100644
--- a/js/car_demand_plan/apply_plan_list.js
+++ b/js/car_demand_plan/apply_plan_list.js
@@ -247,4 +247,8 @@ function editApplyPlan(obj) {
// 详情
function applyPlanDetail(obj) {
openIframeByParamObj("apply_plan_detail", "详情", "./child/apply_plan_detail.html", "92%", "95%", obj);
+}
+
+function showHelp(type){
+ openIframeByParamObj("show_help", "功能说明", "../show_help.html", "50%", "75%", type);
}
\ No newline at end of file
diff --git a/js/car_demand_plan/child/choose_car_or_user_list.js b/js/car_demand_plan/child/choose_car_or_user_list.js
index eaac0a4..c6fc618 100644
--- a/js/car_demand_plan/child/choose_car_or_user_list.js
+++ b/js/car_demand_plan/child/choose_car_or_user_list.js
@@ -1,8 +1,13 @@
let objParam;
let form, table, element, tableIns, layer, util;
let pageNum = 1;
+let proType;
+let applyType;
function setParams(obj) {
objParam = JSON.parse(obj);
+ proType=objParam.proType;
+ applyType = objParam.applyType;
+ console.log(applyType)
layui.use(["form", "table", 'element', 'layer', 'util'], function () {
form = layui.form;
table = layui.table;
@@ -15,7 +20,9 @@ function setParams(obj) {
} else {
initTable2();
$('#nameBox').removeAttr('style');
- $('#whiteBox').removeAttr('style');
+ if (proType!=='变电工程' && applyType!=='1'){
+ $('#whiteBox').removeAttr('style');
+ }
}
});
}
@@ -61,13 +68,13 @@ function reloadTable(pageNum) {
params.isWhiteList = $('#isWhiteList').val();
}
table.reload("currentTableId", {
- page: {
- curr: pageNum ? pageNum : 1,
+ page: {
+ curr: pageNum ? pageNum : 1,
+ },
+ where: {
+ encryptedData: JSON.stringify(params),
+ },
},
- where: {
- encryptedData: JSON.stringify(params),
- },
- },
);
}
@@ -160,6 +167,12 @@ function initTable() {
// 驾驶员表格数据
function initTable2() {
+ let isWhiteList;
+ if (proType==='变电工程' || applyType==='1'){
+ isWhiteList = 1;
+ } else {
+ isWhiteList = $('#isWhiteList').val();
+ }
let url = dataUrl + "backstage/carDriver/getDriverListBySup";
tableIns = table.render({
elem: "#currentTableId",
@@ -173,7 +186,7 @@ function initTable2() {
encryptedData: JSON.stringify({
name: $('#name').val(),
supId: objParam.supId,
- isWhiteList: $('#isWhiteList').val()
+ isWhiteList: isWhiteList
}),
},
request: {
diff --git a/js/car_demand_plan/child/dispatch_car_allocation_form.js b/js/car_demand_plan/child/dispatch_car_allocation_form.js
index a70dd53..b734c5c 100644
--- a/js/car_demand_plan/child/dispatch_car_allocation_form.js
+++ b/js/car_demand_plan/child/dispatch_car_allocation_form.js
@@ -96,7 +96,7 @@ function setPlanTables(list) {
'
' + item.model + ' | ' +
'' + item.unit + ' | ' +
'' + item.needNum + ' | ' +
- '' + item.needDay + ' | ' +
+ '' + (item.needDay !== null ? item.needDay : '') + ' | ' +
'' + handleRemark(item.remark) + ' | ' +
'';
})
diff --git a/js/car_demand_plan/child/dispatch_car_pro_detail.js b/js/car_demand_plan/child/dispatch_car_pro_detail.js
index 1d9370f..12a854a 100644
--- a/js/car_demand_plan/child/dispatch_car_pro_detail.js
+++ b/js/car_demand_plan/child/dispatch_car_pro_detail.js
@@ -76,17 +76,17 @@ function reloadData() {
// 重载表格
function reloadTable(pageNum) {
table.reload("currentTableId", {
- page: {
- curr: pageNum ? pageNum : 1,
+ page: {
+ curr: pageNum ? pageNum : 1,
+ },
+ where: {
+ encryptedData: JSON.stringify({
+ 'code': $('#code').val(),
+ 'status': $('#status').val(),
+ 'proId': objParam.proId
+ }),
+ },
},
- where: {
- encryptedData: JSON.stringify({
- 'code': $('#code').val(),
- 'status': $('#status').val(),
- 'proId': objParam.proId
- }),
- },
- },
);
}
@@ -258,6 +258,10 @@ function initTable() {
html += "详情";
if (!d.supId) {
html += "|
派车分配";
+ } else {
+ if (d.statusName === '待派车'){
+ html += "|
删除";
+ }
}
if (d.statusName !== '待派车') {
if (d.statusName!=='已派车'){
@@ -308,6 +312,33 @@ function dispatchCarDetail(obj, type) {
openIframeByParamObj2("dispatchCarDetail", title, "../car_demand_plan/child/dispatch_car_detail.html", "92%", "95%", obj, 2);
}
+// 删除
+function delData(data) {
+ layer.confirm("确定删除派车分配数据吗?", { 'title': '操作提示', move: false }, function () {
+ let loadingMsg = layer.msg('数据删除中,请稍候...', { icon: 16, scrollbar: false, time: 0 });
+ let url = dataUrl + "backstage/dispatchCar/deleteData"
+ let obj = {
+ 'id': data.id,
+ }
+ let params = {
+ encryptedData: JSON.stringify(obj)
+ }
+ ajaxRequest(url, "POST", params, true, function () {
+ }, function (result) {
+ layer.close(loadingMsg); // 关闭提示层
+ if (result.code === 200) {
+ layer.msg(result.msg, { icon: 1 })
+ queryTable(1);
+ } else {
+ layer.msg(result.msg, { icon: 2 })
+ }
+ }, function (xhr) {
+ layer.close(loadingMsg); // 关闭提示层
+ error(xhr)
+ });
+ })
+}
+
// 修改记录
function editRecord(obj) {
let flag = isExistData(3, obj);
diff --git a/js/car_demand_plan/child/dispatch_input_form.js b/js/car_demand_plan/child/dispatch_input_form.js
index 3539338..a1ecf75 100644
--- a/js/car_demand_plan/child/dispatch_input_form.js
+++ b/js/car_demand_plan/child/dispatch_input_form.js
@@ -157,7 +157,7 @@ function setPlanTables(list) {
"" + item.model + " | " +
"" + item.unit + " | " +
"" + item.needNum + " | " +
- "" + item.needDay + " | " +
+ "" + (item.needDay !== null ? item.needDay : '') + " | " +
"" + handleRemark(item.remark) + " | " +
"";
})
@@ -508,7 +508,9 @@ function chooseCarOrUser(type, formName) {
let params = {
type: type,
formName: formName,
- supId:objParam.supId
+ supId:objParam.supId,
+ proType:objParam.proType,
+ applyType:objParam.applyType
};
openIframeByParamObj("chooseCarOrUser", title, "./choose_car_or_user_list.html", '92%', '95%', params);
}
diff --git a/js/car_demand_plan/dispatch_input_list.js b/js/car_demand_plan/dispatch_input_list.js
index 92cfaf0..02a33fc 100644
--- a/js/car_demand_plan/dispatch_input_list.js
+++ b/js/car_demand_plan/dispatch_input_list.js
@@ -38,15 +38,15 @@ function reloadData() {
// 重载表格
function reloadTable(pageNum) {
table.reload("currentTableId", {
- page: {
- curr: pageNum ? pageNum : 1,
+ page: {
+ curr: pageNum ? pageNum : 1,
+ },
+ where: {
+ encryptedData: JSON.stringify({
+ 'keyWord': $('#keyWord').val(),
+ }),
+ },
},
- where: {
- encryptedData: JSON.stringify({
- 'keyWord': $('#keyWord').val(),
- }),
- },
- },
);
}
@@ -83,7 +83,7 @@ function initTable() {
cols: [
[
{
- width: '5.9%',
+ width: '4%',
title: "序号",
align: "center",
templet: function (d) {
@@ -92,7 +92,7 @@ function initTable() {
},
{
field: "typeName",
- width: '7%',
+ width: '6.9%',
title: "计划类型",
unresize: true,
align: "center",
@@ -146,7 +146,7 @@ function initTable() {
},
{
field: "statusName",
- width: '8%',
+ width: '7.5%',
title: "派车状态",
unresize: true,
sort: true,
@@ -211,7 +211,7 @@ function initTable() {
},
{
title: "操作",
- width: '9%',
+ width: '11.5%',
align: "center",
unresize: true,
templet: function (d) {
@@ -225,6 +225,9 @@ function initTable() {
} else if (parseInt(dispatchNum) === 0) {
html += "|
派车录入";
}
+ if (auditStatus=== '待审核'){
+ html += "|
删除";
+ }
return html;
},
},
@@ -274,6 +277,34 @@ function dispatchInput(obj) {
openIframeByParamObj("dispatchInput", "派车录入", "./child/dispatch_input_form.html", "92%", "95%", obj);
}
+// 删除
+function delData(data) {
+ layer.confirm("确定删除派车数据吗?", { 'title': '操作提示', move: false }, function () {
+ let loadingMsg = layer.msg('数据删除中,请稍候...', { icon: 16, scrollbar: false, time: 0 });
+ let url = dataUrl + "backstage/supDispatchCar/deleteData"
+ let obj = {
+ 'id': data.id,
+ 'supId': data.supId
+ }
+ let params = {
+ encryptedData: JSON.stringify(obj)
+ }
+ ajaxRequest(url, "POST", params, true, function () {
+ }, function (result) {
+ layer.close(loadingMsg); // 关闭提示层
+ if (result.code === 200) {
+ layer.msg(result.msg, { icon: 1 })
+ queryTable(1);
+ } else {
+ layer.msg(result.msg, { icon: 2 })
+ }
+ }, function (xhr) {
+ layer.close(loadingMsg); // 关闭提示层
+ error(xhr)
+ });
+ })
+}
+
// 详情
function applyPlanDetail(obj) {
let flag = isExistData(obj, 1);
diff --git a/page/car_demand_plan/apply_plan_list.html b/page/car_demand_plan/apply_plan_list.html
index f27c6db..3ccf085 100644
--- a/page/car_demand_plan/apply_plan_list.html
+++ b/page/car_demand_plan/apply_plan_list.html
@@ -19,14 +19,17 @@