yangle
2022-05-18 db57306b71f88696b54fdb5f693fa1692044fd72
生产计划平台 查询
2个文件已修改
164 ■■■■■ 已修改文件
WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatFormImport.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Éú²ú¹ÜÀí/Éú²ú¼Æ»®Æ½Ì¨/JIT_DayPlanPlatForm.html
@@ -92,8 +92,9 @@
                                            <label class="layui-form-label" style="width: 85px;">齐套类型</label>
                                            <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                                <select name="HOrderType" id="HOrderType" lay-verify="HOrderType">
                                                    <option value="生产订单">生产订单</option>
                                                    <option value="委外订单">委外订单</option>
                                                    <option value="全部">全部</option>
                                                    <option value="生产用料清单">生产用料清单</option>
                                                    <option value="标准Bom">标准Bom</option>
                                                </select>
                                            </div>
                                        </div>
@@ -162,6 +163,7 @@
            , element = layui.element;
        var sWhere = "";
        var option = [];
        //#endregion
@@ -184,8 +186,16 @@
        form.on('submit(btnHWorkShopID)', function (data) {
            btnHWorkShopID();
        });
        //快速过滤
        form.on('submit(btnSearch)', function (data) {
            get_FastQuery();
        });
        //重置
        form.on('submit(btnReSearch)', function (data) {
            set_ClearQuery();
        });
        //#endregion
@@ -196,18 +206,18 @@
            //初始化时间
            $("#HPlanBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
            $("#HPlanEndDate").val(Format(new Date(), "yyyy-MM-dd"));
            //初始化表格
            set_InitGrid();
            get_Display(sWhere);
            //组织
            Organ();
            //初始化表格
            set_InitGrid();
            get_FastQuery();
        }
         //#endregion
        //获取组织
        function Organ() {
            //获取登录页组织列
            var Organization = '<option  style="color:blue;" value="">组织</option>';
            var Organization = '<option  style="color:blue;" value="0">组织</option>';
            $.ajax({
                type: "get",
                url: GetWEBURL() + "/Web/GetOrganizations",
@@ -227,6 +237,57 @@
        //表格数据
        function set_InitGrid() {
            var columns = [];
            var myDate = new Date();
            var yyyy = myDate.getFullYear();
            var MM = myDate.getMonth() + 1;
            var dd = myDate.getDate();
            var SumMonth = 31; //动态两月之差 new Date(yyyy, MM, 0).getDate()
            columns.push({ type: 'checkbox', fixed: 'left' });
            columns.push({ field: 'hmainid', title: 'hmainid', hide: true });
            columns.push({ field: '销售订单号', title: '销售订单号', hide: true });
            columns.push({ field: '销售订单号', title: '销售订单号', width:150 });
            columns.push({ field: '生产订单号', title: '生产订单号', width:150 });
            columns.push({ field: '生产订单明细行号', title: '生产订单明细行号', width: 150 });
            columns.push({ field: '电压/功率/底板', title: '电压/功率/底板', width: 150 });
            columns.push({ field: '优先级', title: '优先级', width:150 });
            columns.push({ field: '生产组织', title: '生产组织', width:150 });
            columns.push({ field: '物料编码', title: '物料编码', width:150 });
            columns.push({ field: '物料名称', title: '物料名称', width:150 });
            columns.push({ field: '规格型号', title: '规格型号', width:150 });
            columns.push({ field: 'HUnitID', title: 'HUnitID', hide: true});
            columns.push({ field: '计量单位', title: '计量单位', width:150 });
            columns.push({ field: '销售订单数量', title: '销售订单数量', width:150 });//0
            columns.push({ field: '订单需求数量', title: '生产订单数量', width: 150 });//0
            columns.push({ field: '订单可排数量', title: '订单可排数量', width:150 });
            columns.push({ field: '未入库数量', title: '未入库数量', width: 150 });//0
            columns.push({ field: '拆单数量', title: '拆单数量', width: 150 });//0
            columns.push({ field: '日计划数量总量', title: '日计划数量总量', width: 150 });//0
            columns.push({ field: '今日之前日计划数量', title: '今日之前日计划数量', width: 150 });//0
            columns.push({ field: '计划开始日期', title: '预计开工日期', width:150 });
            columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
            columns.push({ field: '生产车间', title: '生产车间', width:150 });
            columns.push({ field: 'HSourceID', title: 'HSourceID', hide:true });
            columns.push({ field: '生产资源', title: '生产资源', width:150 });
            for (var i = 0; i <= (SumMonth - dd); i++) {
                columns.push({ field: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), edit: 'text',width:120 })//0
            }
            for (var i = 1; i < dd; i++) {
                columns.push({ field: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), title: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), edit: 'text',width: 120 })//0
            }
            columns.push({ field: 'T31', title: 'T31', width: 150 });//0
            columns.push({ field: '订单类型', title: '订单类型', width: 150 });
            columns.push({ field: '生产订单单据类型', title: '源单订单单据类型', width: 150 });
            columns.push({ field: '业务状态', title: '业务状态', width: 150 });
            columns.push({ field: '产线入库数量', title: '产线入库数量', width: 150 });
            columns.push({ field: '未排数量', title: '可排数量', width: 150 });
            columns.push({ field: '订单等级', title: '订单等级', width: 150 });
            columns.push({ field: '交货日期', title: '交货日期', width: 150 });
            columns.push({ field: '源单主内码', title: '源单主内码', width: 150 });
            columns.push({ field: '源单子内码', title: '源单子内码', width: 150 });
            columns.push({ field: '日计划工单主码', title: '日计划工单主码', width: 150 });
            option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
@@ -235,48 +296,7 @@
                , cellMinWidth: 90
                , limit: 50
                , limits: [50, 500, 5000, 20000]
                , cols: [[
                    { type: 'checkbox', fixed: 'left' }
                    , { field: '销售订单号', title: '销售订单号', width: 150 }
                    , { field: '生产订单号', title: '生产订单号', width: 170 }
                    , { field: '产品代码', title: '产品代码', width: 170 }
                    , { field: '产品名称', title: '产品名称', width: 260, }
                    , { field: '产品规格型号', title: '产品规格型号', width: 160 }
                    , { field: '生产车间', title: '生产车间', width: 160 }
                    , { field: '计划开工日期', title: '计划开工日期', width: 160, templet: "<div>{{d.计划开工日期 ==null ?'':layui.util.toDateString(d.计划开工日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '物料代码', title: '物料代码', width: 160 }
                    , { field: '物料名称', title: '物料名称', width: 160 }
                    , { field: '规格型号', title: '规格型号', width: 160 }
                    , { field: '子项单位', title: '子项单位', width: 160 }
                    , { field: '单位用量', title: '单位用量', width: 160 }
                    , { field: '计划发料数量', title: '计划发料数量', width: 160 }
                    , { field: '叫料数量', title: '叫料数量', width: 160, edit: 'text' }
                    , { field: '退料数量', title: '退料数量', width: 160, edit: 'text' }
                    , { field: '退料原因', title: '退料原因', width: 160, edit: 'text' }
                    , { field: '已叫料数量', title: '已叫料数量', width: 160 }
                    , { field: '已配送数量', title: '已配送数量', width: 160 }
                    , { field: '调出仓库', title: '调出仓库', width: 160, edit: 'text', event: 'Warehouse' }
                    , { field: '调出仓库id', title: '调出仓库id', width: 160, hide: true }
                    , { field: '库存数量', title: '库存数量', width: 160 }
                    , { field: '调出仓库库存数量', title: '调出仓库库存数量', width: 160 }
                    , { field: '调出仓库可用库存数量', title: '调出仓库可用库存数量', width: 160 }
                    , { field: '可用库存', title: '可用库存', width: 160 }
                    , { field: '库存组织', title: '库存组织', width: 160 }
                    , { field: 'HICMOBillNo', title: 'HICMOBillNo', width: 160 }
                    , { field: '源单主内码', title: '源单主内码', width: 160 }
                    , { field: '源单子内码', title: '源单子内码', width: 160 }
                    , { field: 'HDeptID', title: 'HDeptID', hide: true }
                    , { field: 'HDeptNumber', title: 'HDeptNumber', hide: true }
                    , { field: 'HMaterialID', title: 'HMaterialID', hide: true }
                    , { field: 'HWHID', title: 'HWHID', hide: true }
                    , { field: 'HOutOrgID', title: 'HOutOrgID', hide: true }
                    , { field: 'HSouceInterID', title: 'HSouceInterID', hide: true }
                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', hide: true }
                    , { field: 'HSourceBillNo', title: 'HSourceBillNo', hide: true }
                    , { field: 'HICMOInterID', title: 'HICMOInterID', hide: true }
                    , { field: 'HICMOEntryID', title: 'HICMOEntryID', hide: true }
                    , { field: 'HSTOCKID', title: 'HSTOCKID', hide: true }
                ]]
                , cols: [columns]
            };
        }
@@ -284,7 +304,7 @@
        function get_Display(sWhere) {
            var ajaxLoad = layer.load();
            $.ajax({
                url: GetWEBURL() + '/Sc_WorkBillSortBill/Sc_WorkBillSortBillList',
                url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillList',
                type: "GET",
                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                success: function (data1) {
@@ -358,6 +378,44 @@
        }
        //快速过滤
        function get_FastQuery() {
            var HPlanBeginDate = $("#HPlanBeginDate").val();//开工起始日期
            var HProdORGID = $("#HProdORGID").val();//生产订单组织
            var HSeOrderBillNo = $("#HSeOrderBillNo").val();//销售订单号
            var HPlanEndDate = $("#HPlanEndDate").val();//开工截止日期
            var HMaterID = $("#HMaterID").val();//物料编码id
            var HICMOBillNo = $("#HICMOBillNo").val();//生产订单号
            var HWorkShopID = $("#HWorkShopID").val();//生产车间
            sWhere = {
                HPlanBeginDate: HPlanBeginDate
                , HProdORGID: HProdORGID
                , HSeOrderBillNo: HSeOrderBillNo
                , HPlanEndDate: HPlanEndDate
                , HMaterID: HMaterID
                , HICMOBillNo: HICMOBillNo
                , HWorkShopID: HWorkShopID
            }
            get_Display(JSON.stringify(sWhere));
            sWhere = ""//调用接口后清空sWhere缓存
        }
        //重置
        function set_ClearQuery() {
            $("#HPlanBeginDate").val(Format(new Date(), "yyyy-MM-dd"));//开工起始日期
            $("#HProdORGID").val("0");//生产订单组织
            $("#HSeOrderBillNo").val("");//销售订单号
            $("#HPlanEndDate").val(Format(new Date(), "yyyy-MM-dd"));//开工截止日期
            $("#HMaterID").val("0");//物料编码id
            $("#HMaterNumber").val("");//物料编码
            $("#HMaterName").val("");//物料名称
            $("#HMaterModel").val("0");//规格型号
            $("#HICMOBillNo").val("");//生产订单号
            $("#HWorkShopID").val("0");//生产车间id
            $("#HWorkShopIDName").val("");//生产车间
            sWhere = "";
        }
        //#endregion
        //以上是layui模块
    });
WebTM/views/Éú²ú¹ÜÀí/Éú²ú¼Æ»®Æ½Ì¨/JIT_DayPlanPlatFormImport.html
@@ -206,8 +206,8 @@
            var columns = [];
            columns.push({ type: 'checkbox', fixed: 'left' });
            columns.push({ field: 'hmainid', title: ' hmainid', width: 200, hide: true });
            columns.push({ field: '单据号', title: ' å•据号', width: 200 });
            columns.push({ field: 'hmainid', title: 'hmainid', width: 200, hide: true });
            columns.push({ field: '单据号', title: '单据号', width: 200 });
            columns.push({ field: '生产订单号*', title: '生产订单号' });
            columns.push({ field: '生产订单明细行号*', title: '生产订单明细行号', width: 200 });
            columns.push({ field: '组织编码*', title: '组织编码' });