diff --git a/js/car_demand_plan/dispatch_car_list.js b/js/car_demand_plan/dispatch_car_list.js index 0d4f608..00b14ae 100644 --- a/js/car_demand_plan/dispatch_car_list.js +++ b/js/car_demand_plan/dispatch_car_list.js @@ -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 = '部分派车' diff --git a/js/car_demand_plan/dispatch_input_list.js b/js/car_demand_plan/dispatch_input_list.js index 517ff3d..d546b18 100644 --- a/js/car_demand_plan/dispatch_input_list.js +++ b/js/car_demand_plan/dispatch_input_list.js @@ -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 "" + d.code + ""; @@ -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 "●已通过"; } else if (auditStatus === '已驳回') { return "●审核驳回"; - } else { + } else if (auditStatus === '待派车') { + return "●待派车"; + } else if (auditStatus === '待审核') { return "●待审核"; } } diff --git a/js/welcome/data_datail_dispatch_list.js b/js/welcome/data_datail_dispatch_list.js index bb056ec..2848abd 100644 --- a/js/welcome/data_datail_dispatch_list.js +++ b/js/welcome/data_datail_dispatch_list.js @@ -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 = '部分派车' diff --git a/js/welcome/data_datail_plan_list.js b/js/welcome/data_datail_plan_list.js index db5be32..fd83c26 100644 --- a/js/welcome/data_datail_plan_list.js +++ b/js/welcome/data_datail_plan_list.js @@ -220,7 +220,7 @@ function setStatusColor(value) { let name = '' if (value === '1') { color = "#f56c6c"; - name = '未派车'; + name = '待派车'; } else if (value === '2') { color = "#19be6b"; name = '已派车' diff --git a/js/welcome/data_datail_pro_list.js b/js/welcome/data_datail_pro_list.js index 6ce9180..77646df 100644 --- a/js/welcome/data_datail_pro_list.js +++ b/js/welcome/data_datail_pro_list.js @@ -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 = '部分派车' diff --git a/js/welcome/data_detail_common.js b/js/welcome/data_detail_common.js index 8e56bcf..1b1ef82 100644 --- a/js/welcome/data_detail_common.js +++ b/js/welcome/data_detail_common.js @@ -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'); } diff --git a/js/welcome/pro_list_detail.js b/js/welcome/pro_list_detail.js index 405a3bd..63a6b80 100644 --- a/js/welcome/pro_list_detail.js +++ b/js/welcome/pro_list_detail.js @@ -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 "" + d.code + ""; }, @@ -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 ' ● ' + d.statusName + ''; - } else if (d.statusName === '已派车') { - return ' ● ' + 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 "" + d.dispatchNum + ""; - }, + sort: true, }, { - field: "supName", + field: "money", title: "采购金额", width: '10%', align: "center", unresize: true, - sort:true, + sort: true, + templet: function (d) { + return '¥ ' + d.money + '' + }, }, { 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 ' ● ' + name + ""; +} + +// 需求计划详情 +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); } diff --git a/page/car_demand_plan/dispatch_car_list.html b/page/car_demand_plan/dispatch_car_list.html index 80d2070..f4ddf71 100644 --- a/page/car_demand_plan/dispatch_car_list.html +++ b/page/car_demand_plan/dispatch_car_list.html @@ -98,7 +98,7 @@