diff --git a/js/demandPlan/child/delivery_detail_list.js b/js/demandPlan/child/delivery_detail_list.js index 857d468..d6f6286 100644 --- a/js/demandPlan/child/delivery_detail_list.js +++ b/js/demandPlan/child/delivery_detail_list.js @@ -31,7 +31,7 @@ function getShipmentBatch(list) { if (list && list.length > 0) { dataList.push({ name: '全部', id: '' }) $.each(list, function (index, item) { - dataList.push({ name: '第' +numToChinese(index + 1)+ '批', id: item.id, tiem: item.createDay }) + dataList.push({ name: '第' + numToChinese(index + 1) + '批', id: item.id, tiem: item.createDay }) }); dataList.push({ name: '待发货', id: '0' }) } else { @@ -44,7 +44,7 @@ function getShipmentBatch(list) { } else if (item.name === '全部') { html += '
  • ' + this.name + '
  • '; } else { - html += '
  • ' + item.name + ''+item.tiem+'
  • '; + html += '
  • ' + item.name + '' + item.tiem + '
  • '; } }) $('.layui-tab-title').empty().append(html); @@ -133,7 +133,7 @@ function numToChinese(num) { return '二十四'; } else if (num === 25) { return '二十五'; - }else if (num === 26) { + } else if (num === 26) { return '二十六'; } else if (num === 27) { return '二十七'; @@ -156,4 +156,9 @@ function numToChinese(num) { } else if (num === 36) { return '三十六'; } +} + +// 查看需求计划 +function openDetail() { + openIframeByParamObj2("view_plan", "需求计划", "./child/demand_plan_detail_list.html", "92%", "95%", objParam); } \ No newline at end of file diff --git a/js/demandPlan/child/demand_plan_detail_list.js b/js/demandPlan/child/demand_plan_detail_list.js index a9249e4..35fa8a5 100644 --- a/js/demandPlan/child/demand_plan_detail_list.js +++ b/js/demandPlan/child/demand_plan_detail_list.js @@ -38,7 +38,8 @@ function queryTable(type) { }, where: { encryptedData: JSON.stringify({ - 'keyWord': $('#keyWord').val() + 'keyWord': $('#keyWord').val(), + 'proId': objParam.proId }), }, }, @@ -53,10 +54,11 @@ function initTable() { authorization: sessionStorage.getItem("gz-token"), }, height: "full-180", - url: dataUrl + "backstage/planOut/getDataPlanByPage", + url: dataUrl + "backstage/planOut/getProPlanListByProId", where: { encryptedData: JSON.stringify({ - 'keyWord': $('#keyWord').val() + 'keyWord': $('#keyWord').val(), + 'proId': objParam.proId }), }, request: { @@ -163,5 +165,5 @@ function setNumColor(value, type) { // 需求计划编号 function plan_detail(obj){ - openIframeByParamObj2("plan_detail", "机具需求计划", "./apply_plan_detail.html", "92%", "95%", obj); + openIframeByParamObj2("plan_detail", "机具需求计划", "./child/apply_plan_detail.html", "92%", "95%", obj); } \ No newline at end of file diff --git a/js/demandPlan/child/view_data_list.js b/js/demandPlan/child/view_data_list.js index 6509043..9507c56 100644 --- a/js/demandPlan/child/view_data_list.js +++ b/js/demandPlan/child/view_data_list.js @@ -2,7 +2,7 @@ let form, table, element,tableIns; let typeParam; let pageNum = 1; function setParams(type) { - typeParam = type; + typeParam = type - 1; layui.use(["form", "table", 'element'], function () { form = layui.form; table = layui.table; @@ -13,7 +13,7 @@ function setParams(type) { typeParam = value; reloadTable(1); }); - $('.layui-tab-title li').eq(typeParam - 1).addClass('layui-this'); + $('.layui-tab-title li').eq(typeParam).addClass('layui-this'); initTable(); }); } @@ -45,7 +45,7 @@ function reloadTable(pageNum) { encryptedData: JSON.stringify({ 'name': $('#name').val(), 'module': $('#module').val(), - 'type': typeParam + 'typeSource': typeParam }), }, }, @@ -61,12 +61,12 @@ function initTable() { authorization: sessionStorage.getItem("gz-token"), }, height: "full-220", - url: dataUrl + "backstage/planOut/getProPlanPage", + url: dataUrl + "backstage/planOut/getDataInfoByPage", where: { encryptedData: JSON.stringify({ 'name': $('#name').val(), 'module': $('#module').val(), - 'type': typeParam + 'typeSource': typeParam }), }, request: { @@ -130,23 +130,23 @@ function initTable() { }, }, { - field: "status", + field: "fhNum", title: "已发货量", width: '8%', unresize: true, align: "center", templet: function (d) { - return setNumColor(d.needNum,2); + return setNumColor(d.fhNum,2); }, }, { - field: "status", + field: "wfhNum", title: "待发货量", width: '10%', unresize: true, align: "center", templet: function (d) { - return setNumColor(d.needNum,3); + return setNumColor(d.wfhNum,3); }, }, { @@ -156,7 +156,7 @@ function initTable() { unresize: true, align: "center", templet: function (d) { - return setFontBold(d.needNum); + return setFontBold(d.proNum); }, }, { @@ -234,5 +234,6 @@ function print() { // 查看来源 function viewSource(obj) { + obj.typeParam = typeParam; openIframeByParamObj2("view_data_source_list", "数据来源", "./child/view_data_source_list.html", "92%", "95%", obj); } \ No newline at end of file diff --git a/js/demandPlan/child/view_data_source_list.js b/js/demandPlan/child/view_data_source_list.js index 9e8fa45..9394a43 100644 --- a/js/demandPlan/child/view_data_source_list.js +++ b/js/demandPlan/child/view_data_source_list.js @@ -31,17 +31,53 @@ function getDataInfoDetails() { }, null); function setData(obj) { - // $('#type').html(obj.type); - // $('#name').html(obj.name); - // $('#unit').html(obj.unit); - // $('#module').html(obj.module); - // $('#wfhNum').html(obj.wfhNum); - // $('#kuNum').html(obj.kuNum); - // $('#clNum').html(obj.clNum); - // $('#proNum').html(obj.proNum); + $('#type').html(obj.type); + $('#name').html(obj.name); + $('#unit').html(obj.unit); + $('#module').html(obj.module); + $('#needNum').html(obj.needNum); + $('#fhNum').html(obj.fhNum); + $('#wfhNum').html(obj.wfhNum); + $('#clNum').html(obj.clNum); + $('#proNum').html(obj.proNum); + $('#planNum').html(obj.planNum); } } +// 查询/重置 +function queryTable(type) { + if (type === 1) { + reloadTable(1); + } else if (type === 2) { + $('#name').val(''); + $('#module').val(''); + layui.form.render(); + reloadTable(1); + } +} + +// 刷新页面数据 +function reloadData() { + reloadData(pageNum); +} + +// 重载表格 +function reloadTable(pageNum) { + table.reload("currentTableId", { + page: { + curr: pageNum ? pageNum : 1, + }, + where: { + encryptedData: JSON.stringify({ + 'name': $('#name').val(), + 'module': $('#module').val(), + 'moduleId': objParam.moduleId + }), + }, + }, + ); +} + function initTable() { tableIns = table.render({ elem: "#currentTableId", @@ -49,10 +85,12 @@ function initTable() { headers: { authorization: sessionStorage.getItem("gz-token"), }, - height: "full-180", + height: "full-320", url: dataUrl + "backstage/planOut/getDataPlanByPage", where: { encryptedData: JSON.stringify({ + 'name': $('#name').val(), + 'module': $('#module').val(), 'moduleId': objParam.moduleId }), }, @@ -78,26 +116,53 @@ function initTable() { return d.LAY_NUM; }, }, - - { - field: "proName", - width: '35%', - title: "工程名称", - unresize: true, - align: "center", - }, { field: "code", - width: '25%', + width: '15%', title: "需求计划编号", unresize: true, align: "center", templet: function (d) { let html = ""; - html += ""+d.code+""; + html += "" + d.code + ""; return html; }, }, + { + field: "proName", + width: '15%', + title: "工程名称", + unresize: true, + align: "center", + }, + { + field: "projectPart", + width: '15%', + title: "项目部分", + unresize: true, + align: "center", + }, + { + field: "projectContent", + width: '15%', + title: "工程内容 ", + unresize: true, + align: "center", + }, + { + field: "proName", + width: '10%', + title: "需用日期", + unresize: true, + align: "center", + }, + { + field: "remark", + width: '10%', + title: "计划说明 ", + unresize: true, + align: "center", + }, { field: "needNum", width: '10%', @@ -107,26 +172,6 @@ function initTable() { templet: function (d) { return setNumColor(d.needNum, 1); }, - }, - { - field: "needNum", - width: '10%', - title: "已发货量", - unresize: true, - align: "center", - templet: function (d) { - return setNumColor(d.needNum, 2); - }, - }, - { - field: "needNum", - width: '10%', - title: "待发货量", - unresize: true, - align: "center", - templet: function (d) { - return setNumColor(d.needNum, 3); - }, } ] ], @@ -155,6 +200,6 @@ function setNumColor(value, type) { } // 需求计划编号 -function demand_plan(obj){ - openIframeByParamObj2("demand_plan", "机具需求计划", "./apply_plan_detail.html", "92%", "95%", obj); +function demand_plan(obj) { + openIframeByParamObj2("demand_plan", "机具需求计划", "./child/apply_plan_detail.html", "92%", "95%", obj); } \ No newline at end of file diff --git a/page/demandPlan/child/delivery_detail_list.html b/page/demandPlan/child/delivery_detail_list.html index ed8acb9..8fd6bf7 100644 --- a/page/demandPlan/child/delivery_detail_list.html +++ b/page/demandPlan/child/delivery_detail_list.html @@ -22,7 +22,7 @@

    -
    +

    计划数量

    0

    @@ -41,5 +41,5 @@ - + \ No newline at end of file diff --git a/page/demandPlan/child/demand_plan_detail_list.html b/page/demandPlan/child/demand_plan_detail_list.html index aba2256..99f2b53 100644 --- a/page/demandPlan/child/demand_plan_detail_list.html +++ b/page/demandPlan/child/demand_plan_detail_list.html @@ -82,5 +82,5 @@ - + \ No newline at end of file diff --git a/page/demandPlan/child/view_data_list.html b/page/demandPlan/child/view_data_list.html index 6b6c1ba..6b2a690 100644 --- a/page/demandPlan/child/view_data_list.html +++ b/page/demandPlan/child/view_data_list.html @@ -16,9 +16,9 @@
    diff --git a/page/demandPlan/child/view_data_source_list.html b/page/demandPlan/child/view_data_source_list.html index 92d2cff..cf6c77b 100644 --- a/page/demandPlan/child/view_data_source_list.html +++ b/page/demandPlan/child/view_data_source_list.html @@ -39,15 +39,15 @@ 需求量 - + 已发货量 - + 未发货量 - + 差量 - + 需求计划数量 - +
    @@ -84,13 +84,13 @@
    -
    -
    - - - +