问题修改
This commit is contained in:
parent
083da613b0
commit
989e012d68
|
|
@ -276,9 +276,9 @@ function setNumColor(value) {
|
|||
function setStatusColor(value) {
|
||||
let color = "#409Eff";
|
||||
let name = ''
|
||||
if (value === '未派车') {
|
||||
if (value === '待派车') {
|
||||
color = "#f56c6c";
|
||||
name = '未派车';
|
||||
name = '待派车';
|
||||
} else if (value === '部分派车') {
|
||||
color = "#ff9900";
|
||||
name = '部分派车'
|
||||
|
|
|
|||
|
|
@ -96,14 +96,14 @@ function initTable() {
|
|||
title: "计划类型",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "code",
|
||||
width: '9%',
|
||||
title: "需求计划编号",
|
||||
unresize: true,
|
||||
sort:true,
|
||||
sort: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return "<a style='color:#409eff;' onclick='viewPlanDetail(" + JSON.stringify(d) + ")'>" + d.code + "</a>";
|
||||
|
|
@ -115,7 +115,7 @@ function initTable() {
|
|||
title: "工程名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "needTime",
|
||||
|
|
@ -123,14 +123,14 @@ function initTable() {
|
|||
title: "需用日期",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "remark",
|
||||
width: '10%',
|
||||
title: "备注",
|
||||
unresize: true,
|
||||
sort:true,
|
||||
sort: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
if (d.remark) {
|
||||
|
|
@ -149,7 +149,7 @@ function initTable() {
|
|||
width: '8%',
|
||||
title: "派车状态",
|
||||
unresize: true,
|
||||
sort:true,
|
||||
sort: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
if (d.statusName === '待派车' || d.statusName === '待审核') {
|
||||
|
|
@ -165,7 +165,7 @@ function initTable() {
|
|||
field: "dispatchNum",
|
||||
width: '8%',
|
||||
title: "已派车数量",
|
||||
sort:true,
|
||||
sort: true,
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
|
|
@ -176,7 +176,7 @@ function initTable() {
|
|||
field: "noDispatchNum",
|
||||
width: '8%',
|
||||
title: "待派车数量",
|
||||
sort:true,
|
||||
sort: true,
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
|
|
@ -187,7 +187,7 @@ function initTable() {
|
|||
field: "dispatchDay",
|
||||
width: '9%',
|
||||
title: "最新派车日期",
|
||||
sort:true,
|
||||
sort: true,
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
|
|
@ -202,7 +202,7 @@ function initTable() {
|
|||
field: "status",
|
||||
width: '7%',
|
||||
title: "审核状态",
|
||||
sort:true,
|
||||
sort: true,
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
|
|
@ -261,7 +261,9 @@ function getCheckStatus(auditStatus) {
|
|||
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>已通过";
|
||||
} else if (auditStatus === '已驳回') {
|
||||
return "<span style='color:#F56C6C;margin:0 5px 0 5px;font-size:16px;'>●</span>审核驳回";
|
||||
} else {
|
||||
} else if (auditStatus === '待派车') {
|
||||
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px;'>●</span>待派车";
|
||||
} else if (auditStatus === '待审核') {
|
||||
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px;'>●</span>待审核";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -231,9 +231,9 @@ function initTable() {
|
|||
function setStatusColor(value) {
|
||||
let color = "#409Eff";
|
||||
let name = ''
|
||||
if (value === '未派车') {
|
||||
if (value === '待派车') {
|
||||
color = "#f56c6c";
|
||||
name = '未派车';
|
||||
name = '待派车';
|
||||
} else if (value === '部分派车') {
|
||||
color = "#ff9900";
|
||||
name = '部分派车'
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ function setStatusColor(value) {
|
|||
let name = ''
|
||||
if (value === '1') {
|
||||
color = "#f56c6c";
|
||||
name = '未派车';
|
||||
name = '待派车';
|
||||
} else if (value === '2') {
|
||||
color = "#19be6b";
|
||||
name = '已派车'
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "proName",
|
||||
width: '11%',
|
||||
width: '10%',
|
||||
title: "工程名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -110,7 +110,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "planNum",
|
||||
width: '6%',
|
||||
width: '7%',
|
||||
title: "计划数",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -207,7 +207,7 @@ function setStatusColor(value) {
|
|||
let name = ''
|
||||
if (value === '2') {
|
||||
color = "#f56c6c";
|
||||
name = '未派车';
|
||||
name = '待派车';
|
||||
} else if (value === '1') {
|
||||
color = "#ff9900";
|
||||
name = '部分派车'
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ function loadCompanyData() {
|
|||
|
||||
// 派车状态
|
||||
function loadDispatchStatusData(type) {
|
||||
let list = [{ id: 'dispatch-0', labelName: '全部' }, { id: 'dispatch-1', labelName: '部分派车' }, { id: 'dispatch-2', labelName: '未派车' }, { id: 'dispatch-3', labelName: '全部派车' }];
|
||||
let list = [{ id: 'dispatch-0', labelName: '全部' }, { id: 'dispatch-1', labelName: '部分派车' }, { id: 'dispatch-2', labelName: '待派车' }, { id: 'dispatch-3', labelName: '全部派车' }];
|
||||
if(type){
|
||||
list = [{ id: 'dispatch-0', labelName: '全部' }, { id: 'dispatch-1', labelName: '未派车' }, { id: 'dispatch-2', labelName: '已派车' }];
|
||||
list = [{ id: 'dispatch-0', labelName: '全部' }, { id: 'dispatch-1', labelName: '待派车' }, { id: 'dispatch-2', labelName: '已派车' }];
|
||||
}
|
||||
setTagData(list, 'demo2');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ function queryTable(type) {
|
|||
reloadTable(1);
|
||||
} else if (type === 2) {
|
||||
$('#code').val('');
|
||||
$('#status').val('');
|
||||
$('#dispatchStatus').val('');
|
||||
layui.form.render();
|
||||
reloadTable(1);
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ function reloadTable(pageNum) {
|
|||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'code': $('#code').val(),
|
||||
'status': $('#status').val(),
|
||||
'dispatchStatus': $('#dispatchStatus').val(),
|
||||
'proId': objParam.proId
|
||||
}),
|
||||
},
|
||||
|
|
@ -100,11 +100,11 @@ function initTable() {
|
|||
authorization: sessionStorage.getItem("gz-token"),
|
||||
},
|
||||
height: "full-250",
|
||||
url: dataUrl + "backstage/dispatchCar/getNeedPlanList",
|
||||
url: dataUrl + "backstage/homeIndex/getProPlanDetails",
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'code': $('#code').val(),
|
||||
'status': $('#status').val(),
|
||||
'dispatchStatus': $('#dispatchStatus').val(),
|
||||
'proId': objParam.proId
|
||||
}),
|
||||
},
|
||||
|
|
@ -136,10 +136,13 @@ function initTable() {
|
|||
{
|
||||
field: "typeName",
|
||||
width: '10%',
|
||||
title: "计划类型",
|
||||
title: "类型",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
templet: function (d) {
|
||||
return d.typeName === 1 ? '车辆' : '吊车'
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "code",
|
||||
|
|
@ -147,7 +150,7 @@ function initTable() {
|
|||
title: "需求计划编号",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
templet: function (d) {
|
||||
return "<a style='color:#409eff;' onclick='viewPlanDetail(" + JSON.stringify(d) + ")'>" + d.code + "</a>";
|
||||
},
|
||||
|
|
@ -158,15 +161,15 @@ function initTable() {
|
|||
title: "申请人",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "appLyTime",
|
||||
field: "applyTime",
|
||||
title: "申请时间",
|
||||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "remark",
|
||||
|
|
@ -174,7 +177,7 @@ function initTable() {
|
|||
width: '12%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
templet: function (d) {
|
||||
if (d.remark) {
|
||||
if (d.remark.length > 60) {
|
||||
|
|
@ -193,15 +196,9 @@ function initTable() {
|
|||
width: '10%',
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
sort: true,
|
||||
templet: function (d) {
|
||||
if (d.statusName === '待派车' || d.statusName === '待审核') {
|
||||
return '<span style="color:#ff9900;font-weight:bold;"> ● </span>' + d.statusName + '';
|
||||
} else if (d.statusName === '已派车') {
|
||||
return '<span style="color:#19be6b;font-weight:bold;"> ● </span>' + d.statusName + '';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
return setStatusColor(d.dispatchStatus);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -210,18 +207,18 @@ function initTable() {
|
|||
title: "派车数量",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
templet: function (d) {
|
||||
return "<span style='color:#19be6b'>" + d.dispatchNum + "</span>";
|
||||
},
|
||||
sort: true,
|
||||
},
|
||||
{
|
||||
field: "supName",
|
||||
field: "money",
|
||||
title: "采购金额",
|
||||
width: '10%',
|
||||
align: "center",
|
||||
unresize: true,
|
||||
sort:true,
|
||||
sort: true,
|
||||
templet: function (d) {
|
||||
return '<span>¥ ' + d.money + '</span>'
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
|
|
@ -246,30 +243,45 @@ function initTable() {
|
|||
});
|
||||
}
|
||||
|
||||
// 派车状态颜色
|
||||
function setStatusColor(value) {
|
||||
let color = "#409Eff";
|
||||
let name = ''
|
||||
if (value === '1') {
|
||||
color = "#f56c6c";
|
||||
name = '待派车';
|
||||
} else if (value === '2') {
|
||||
color = "#19be6b";
|
||||
name = '已派车'
|
||||
}
|
||||
return '<span style="color:' + color + '"> ● ' + name + "</span>";
|
||||
}
|
||||
|
||||
// 需求计划详情
|
||||
function viewPlanDetail(obj) {
|
||||
obj.id = obj.planId;
|
||||
let content = '../car_demand_plan/child/apply_plan_detail.html';
|
||||
if (obj.code.indexOf('spec-') > -1) {
|
||||
content = '../car_demand_plan/child/emerg_internal_car_detail.html';
|
||||
}
|
||||
openIframeByParamObj2("viewPlanDetail2", "需求计划详情", content, "92%", "95%", obj);
|
||||
}
|
||||
|
||||
// 导出
|
||||
function exportExcel() {
|
||||
let params = {
|
||||
'planCode': $('#planCode').val(),
|
||||
'status': $('#status').val(),
|
||||
'code': $('#code').val(),
|
||||
'dispatchStatus': $('#dispatchStatus').val(),
|
||||
'proId': objParam.proId
|
||||
}
|
||||
let url = dataUrl + "backstage/purchase/exportDetails";
|
||||
let url = dataUrl + "backstage/homeIndex/exportProPlanDetails";
|
||||
exportExcelUtil(url, '需求计划详情', JSON.stringify(params));
|
||||
}
|
||||
|
||||
// 详情
|
||||
function dispatchCarDetail(obj, type) {
|
||||
let flag = isExistData(type, obj);
|
||||
if (!flag && type === 1) {
|
||||
return layer.msg('暂无派车批次数据', { icon: 7 });
|
||||
} else if (!flag && type === 2) {
|
||||
return layer.msg('暂无待审核批次数据', { icon: 7 });
|
||||
}
|
||||
let title = '详情';
|
||||
if (type === 2) {
|
||||
title = '审核';
|
||||
}
|
||||
obj.type = type;
|
||||
openIframeByParamObj2("dispatchCarDetail", title, "../car_demand_plan/child/dispatch_car_detail.html", "92%", "95%", obj, 2);
|
||||
obj.id = obj.planId;
|
||||
obj.pageType = 1;
|
||||
obj.typeName = obj.typeName === 1 ? '车辆' : '吊车';
|
||||
openIframeByParamObj2("homePlanDetail", "详情", '../welcome/plan_dispatch_detail.html', "92%", "95%", obj);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
<div class="layui-input-inline">
|
||||
<select id="planStatus">
|
||||
<option value="">请选择状态</option>
|
||||
<option value="0">未派车</option>
|
||||
<option value="0">待派车</option>
|
||||
<option value="1">部分派车</option>
|
||||
<option value="2">全部派车</option>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@
|
|||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<select id="status">
|
||||
<select id="dispatchStatus">
|
||||
<option value="">请选择状态</option>
|
||||
<option value="0">待派车</option>
|
||||
<option value="1">已派车</option>
|
||||
<option value="1">待派车</option>
|
||||
<option value="2">已派车</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue