' +
'
' + (length + 1) + '
' +
'

' +
diff --git a/js/car_demand_plan/child/dispatch_input_form.js b/js/car_demand_plan/child/dispatch_input_form.js
index c7362d6..d50a372 100644
--- a/js/car_demand_plan/child/dispatch_input_form.js
+++ b/js/car_demand_plan/child/dispatch_input_form.js
@@ -53,6 +53,9 @@ function setParams(obj) {
if (length === 0) {
submitApply(data);
} else {
+ if (length === 1) {
+ length = 2;
+ }
for (let i = 0; i <= length - 1; i++) {
let layFilterName = $('.formSubmit2').eq(i).attr('lay-filter');
if (i === 0) {
@@ -249,10 +252,10 @@ function sel(selectStatus, that, id) {
// 设置文件类型
function handleFileType(index, file, result) {
let html = '', img = '';
- if(file.ext){
+ if (file.ext) {
file.ext = file.ext.toLowerCase();
}
- if(file.name){
+ if (file.name) {
file.name = file.name.toLowerCase();
}
if (file.ext === 'doc' || file.ext === 'docx') {
diff --git a/js/car_demand_plan/child/emerg_internal_car_detail.js b/js/car_demand_plan/child/emerg_internal_car_detail.js
index 046df70..583ba5a 100644
--- a/js/car_demand_plan/child/emerg_internal_car_detail.js
+++ b/js/car_demand_plan/child/emerg_internal_car_detail.js
@@ -1,6 +1,14 @@
let idParam, objParam;
let details;
let form, layer, table;
+let isPage = getUrlParam('isPage');
+if (isPage) { // 首页跳转
+ $('#plan-detail-box>div').eq(0).remove();
+ $('#plan-detail-box').css({'justify-content':'end','height':'50px'});
+ $('body').css('margin', '0');
+ let obj = decodeURIComponent(getUrlParam('obj'))
+ setParams(obj);
+}
function setParams(obj) {
objParam = JSON.parse(obj);
idParam = objParam.id;
diff --git a/js/welcome/data_datail_dispatch_list.js b/js/welcome/data_datail_dispatch_list.js
index 6a4bd01..bb056ec 100644
--- a/js/welcome/data_datail_dispatch_list.js
+++ b/js/welcome/data_datail_dispatch_list.js
@@ -251,7 +251,10 @@ function exportExcel() {
exportExcelUtil(url, '派车详情', JSON.stringify(params));
}
-// 工程详情
-function dispatchCarProDetail(obj) {
- openIframeByParamObj("dispatchCarProDetail", "工程详情", "./child/dispatch_car_pro_detail.html", "92%", "95%", obj, 1);
+// 派车详情
+function openPlanDetail(obj) {
+ obj.id = obj.planId;
+ obj.pageType = 1;
+ obj.typeName = obj.typeName === 1 ? '车辆' : '吊车';
+ openIframeByParamObj2("homePlanDetail", "详情", '../welcome/plan_dispatch_detail.html', "92%", "95%", obj);
}
\ No newline at end of file
diff --git a/js/welcome/data_datail_plan_list.js b/js/welcome/data_datail_plan_list.js
index 50f4c6d..db5be32 100644
--- a/js/welcome/data_datail_plan_list.js
+++ b/js/welcome/data_datail_plan_list.js
@@ -118,7 +118,7 @@ function initTable() {
width: '10%',
title: "需求计划编号",
unresize: true,
- sort:true,
+ sort: true,
align: "center",
templet: function (d) {
let html = "";
@@ -132,7 +132,7 @@ function initTable() {
title: "工程名称",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
},
{
field: "dispatchStatus",
@@ -140,7 +140,7 @@ function initTable() {
title: "派车状态",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
templet: function (d) {
return setStatusColor(d.dispatchStatus);
},
@@ -151,7 +151,7 @@ function initTable() {
title: "车辆数量",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
},
{
field: "craneNum",
@@ -159,7 +159,7 @@ function initTable() {
title: "吊车数量",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
},
{
field: "money",
@@ -167,7 +167,7 @@ function initTable() {
width: '10%',
unresize: true,
align: "center",
- sort:true,
+ sort: true,
templet: function (d) {
return '
¥ ' + d.money + ''
},
@@ -178,7 +178,7 @@ function initTable() {
title: "供应商",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
},
{
field: "payStatus",
@@ -186,7 +186,7 @@ function initTable() {
title: "付款状态",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
},
{
field: "companyName",
@@ -194,7 +194,7 @@ function initTable() {
width: '10%',
unresize: true,
align: "center",
- sort:true,
+ sort: true,
},
],
],
@@ -238,10 +238,7 @@ function exportExcel() {
// 需求计划详情
function openPlanDetail(obj) {
obj.id = obj.planId;
- obj.code = obj.code;
- 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("homePlanDetail", "需求计划", content, "92%", "95%", obj);
+ obj.pageType = 1;
+ obj.typeName = obj.typeName === 1 ? '车辆' : '吊车';
+ openIframeByParamObj2("homePlanDetail", "详情", '../welcome/plan_dispatch_detail.html', "92%", "95%", obj);
}
\ No newline at end of file
diff --git a/js/welcome/plan_dispatch_detail.js b/js/welcome/plan_dispatch_detail.js
new file mode 100644
index 0000000..5f22581
--- /dev/null
+++ b/js/welcome/plan_dispatch_detail.js
@@ -0,0 +1,156 @@
+let objParam, dataObj;
+let form, table, upload, tableIns, layer;
+let pageNum = 1;
+let checkNowValue = '';
+let checkType = '';
+function setParams(params) {
+ objParam = JSON.parse(params);
+ console.error(objParam);
+ $('#titleName').html(objParam.proName);
+ $('#code').html(objParam.code);
+ layui.use(["form", "table", 'upload', 'layer'], function () {
+ form = layui.form;
+ table = layui.table;
+ upload = layui.upload;
+ layer = layui.layer;
+ layui.use(["layer", 'element'], function () {
+ layer = layui.layer;
+ element = layui.element;
+ // tab 切换事件
+ element.on('tab(demo-filter-tab)', function (data) {
+ let value = $(this).attr('value');
+ if (value === '1') {
+ let src = '../car_demand_plan/child/apply_plan_detail.html';
+ if (objParam.code.indexOf('spec-') > -1) {
+ src = '../car_demand_plan/child/emerg_internal_car_detail.html';
+ }
+ $('#indexIframe').attr('src', src + '?isPage=1' + '&obj=' + encodeURIComponent(JSON.stringify(objParam)));
+ } else if (value === '2') {
+ let src = '../car_demand_plan/child/dispatch_input_detail.html';
+ $('#indexIframe').attr('src', src + '?isPage=1' + '&obj=' + encodeURIComponent(JSON.stringify(objParam)));
+ }
+ });
+ });
+ if (objParam.pageType === 1) { // 需求计划详情跳转
+ $('#layui-tab-title li').eq(0).addClass('layui-this');
+ let src = '../car_demand_plan/child/apply_plan_detail.html';
+ if (objParam.code.indexOf('spec-') > -1) {
+ src = '../car_demand_plan/child/emerg_internal_car_detail.html';
+ }
+ $('#indexIframe').attr('src', src + '?isPage=1' + '&obj=' + encodeURIComponent(JSON.stringify(objParam)));
+ } else if (objParam.pageType === 2) { // 派车详情跳转
+ $('#layui-tab-title li').eq(1).addClass('layui-this');
+ let src = '../car_demand_plan/child/dispatch_input_detail.html';
+ $('#indexIframe').attr('src', src + '?isPage=1' + '&obj=' + encodeURIComponent(JSON.stringify(objParam)));
+ }
+ });
+}
+
+// 查询派车批次
+function getAllOutList() {
+ let params = {
+ encryptedData: JSON.stringify({
+ 'planId': objParam.id,
+ })
+ };
+ let url = dataUrl + 'backstage/supDispatchCar/getAllOutList';
+ ajaxRequest(url, "POST", params, true, function () {
+ }, function (result) {
+ console.error(result);
+ if (result.code === 200) {
+ if (result.data.length === 0) {
+ parent.layer.msg('暂无派车批次数据', { icon: 7 });
+ closePage();
+ } else {
+ setBatchData(result.data);
+ }
+ } else {
+ }
+ }, function (xhr, status, error) {
+ errorFn(xhr, status, error)
+ }, null);
+ // 派车批次
+ function setBatchData(dataList) {
+ let html = '', id = '', status = '', type = '';
+ $.each(dataList, function (index, item) {
+ if (index === dataList.length - 1) {
+ id = item.id;
+ status = item.status;
+ type = item.type;
+ }
+ let batchName = '第' + numToChinese(index + 1) + '批次';
+ html += '
' + batchName + '';
+ })
+ $('#layui-tab-title').empty().append(html);
+ $('#layui-tab-title li').eq(dataList.length - 1).addClass('layui-this');
+ var scrollableElement = document.getElementById('layui-tab-brief');
+ // 添加事件监听器来处理滚轮事件
+ scrollableElement.addEventListener('wheel', function (event) {
+ // 阻止默认的滚动行为
+ event.preventDefault();
+ // 检查滚动的方向
+ var delta = event.deltaY > 0 ? -20 : 20; // 根据需要调整滚动的步长
+ // 设置新的滚动位置
+ scrollableElement.scrollLeft += delta;
+ });
+ checkNowValue = id;
+ checkType = type;
+ getUpdateList(id);
+ }
+}
+
+// 查询每个批次的修改记录
+function getUpdateList(outId) {
+ let params = {
+ encryptedData: JSON.stringify({
+ planId: objParam.id,
+ outId: outId
+ })
+ };
+ let url = dataUrl + 'backstage/dispatchCar/getUpdateList';
+ ajaxRequest(url, "POST", params, true, function () {
+ }, function (result) {
+ console.error(result);
+ if (result.code === 200) {
+ getShipmentBatch(result.data);
+ }
+ }, function (xhr, status, error) {
+ errorFn(xhr, status, error)
+ }, null);
+}
+
+// 修改记录次数
+function getShipmentBatch(list) {
+ let dataList = [], html = '';
+ if (list && list.length > 0) {
+ $.each(list, function (index, item) {
+ if (index === 0) {
+ dataList.push({ name: '初始派车数据', id: item.id, color: '', isInit: true })
+ } else {
+ dataList.push({ name: '第' + numToChinese(index) + '次修改', id: item.id, color: '#f56c6c', isInit: false })
+ }
+ });
+ }
+ $.each(dataList, function (index, item) {
+ html += '
' + this.name + '';
+ })
+ $('#layui-tab-title2').empty().append(html);
+ $('#layui-tab-title2 li').eq(0).addClass('layui-this');
+ var scrollableElement = document.getElementById('layui-tab-brief');
+ // 添加事件监听器来处理滚轮事件
+ scrollableElement.addEventListener('wheel', function (event) {
+ // 阻止默认的滚动行为
+ event.preventDefault();
+ // 检查滚动的方向
+ var delta = event.deltaY > 0 ? -20 : 20; // 根据需要调整滚动的步长
+ // 设置新的滚动位置
+ scrollableElement.scrollLeft += delta;
+ });
+ $('#indexIframe').attr('src', './dispatch_car_edit_record_detail.html?id=' + dataList[0].id + '&type=' + checkType + '&code=' + objParam.code + '&isInit=' + dataList[0].isInit);
+}
+
+// 关闭页面
+function closePage(type) {
+ let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
+ parent.layer.close(index); // 再执行关闭
+}
\ No newline at end of file
diff --git a/page/car_demand_plan/child/apply_plan_detail.html b/page/car_demand_plan/child/apply_plan_detail.html
index ec5c396..9db875f 100644
--- a/page/car_demand_plan/child/apply_plan_detail.html
+++ b/page/car_demand_plan/child/apply_plan_detail.html
@@ -51,7 +51,7 @@
| 计划说明 |
-
+
diff --git a/page/car_demand_plan/child/dispatch_input_form.html b/page/car_demand_plan/child/dispatch_input_form.html
index 2dd2ef4..755eaff 100644
--- a/page/car_demand_plan/child/dispatch_input_form.html
+++ b/page/car_demand_plan/child/dispatch_input_form.html
@@ -54,7 +54,7 @@
▋
基本信息填写