wtt
2024-09-29 10b7151b27fe1238b52a5c75a856718fc151c01b
WebTM/views/¼Æ»®¹ÜÀí/¹¤ÒÕ·Ïß/Gy_RoutingBill.html
@@ -167,26 +167,38 @@
                                                </button>
                                            </div>
                                        </div>
                                        <!--<div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">工作中心</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HMainCenterIDName" name="HMainCenterIDName" id="HMainCenterIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" name="HMainCenterID" lay-verify="HMainCenterID" id="HMainCenterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnWorkCenter" id="btnWorkCenter" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">开始日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 80px;">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">生产班组</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HGroupIDName" lay-verify="HGroupIDName" id="HGroupIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" name="HGroupID" lay-verify="HGroupID" id="HGroupID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnGroup" id="" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            <label class="layui-form-label" style="width: 85px;">失效日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 80px;">
                                            </div>
                                        </div>-->
                                        </div>
                                        <!--<div class="layui-inline">
        <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">工作中心</label>
        <div class="layui-input-block" style="margin-left: 77px;">
            <input type="text" class="layui-input" lay-verify="HMainCenterIDName" name="HMainCenterIDName" id="HMainCenterIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
            <input type="hidden" class="layui-input" name="HMainCenterID" lay-verify="HMainCenterID" id="HMainCenterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnWorkCenter" id="btnWorkCenter" style="padding: 0 10px;float: right;margin-right: 3px;">
                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">生产班组</label>
        <div class="layui-input-block" style="margin-left: 77px;">
            <input type="text" class="layui-input" name="HGroupIDName" lay-verify="HGroupIDName" id="HGroupIDName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
            <input type="hidden" class="layui-input" name="HGroupID" lay-verify="HGroupID" id="HGroupID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnGroup" id="" style="padding: 0 10px;float: right;margin-right: 3px;">
                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
        </div>
    </div>-->
                                    </div>
                                    <div class="layui-row">
                                        <!--<div class="layui-inline">
@@ -532,7 +544,7 @@
            var rowdata = [{
                "HProcNo": "10", "HProcID_S": 0, "HProcType": "主工序", "HCenterID_S": 0, "HCenterID_SName": ""
                , "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": ""
                , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "工序": ""
                , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "工序": "","工段":""
                , "HProcID": 0, "工作中心代码": "", "HCenterID": 0, "工作中心": "", "HSupID": 0
                , "供应商代码": "", "供应商": "", "HSupFlag": false, "HSortProcFlag": false, "HTimeUnit": "", "HUnitTime": 0
                , "HWorkQty": 1, "HSNCtrl": false, "HPassRate": 100, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0
@@ -561,16 +573,18 @@
                , height: 400
                , cols: [[ //表头
                    { type: 'checkbox', totalRowText: '合计行' }
                    , { type: 'numbers', title: '序号', totalRow: true }
                    , { type: 'numbers', field: '序号', title: '序号', totalRow: true }
                    , { field: 'HProcNo', title: '流水号', edit: 'text' }
                    // , { field: 'HProcID', title: '工序ID', hide: true }//, hide: true
                     , { field: 'HProcID', title: '工序ID', hide: true }//, hide: true
                    , { field: '工序', title: '工序', edit: 'text', event: "CheckHProcID" }//f7
                    , { field: 'HProcID_S', title: '工段ID', hide: true }//, hide: true
                    , { field: '工段', title: '工段', edit: 'text', event: "CheckHProcMulID" }//f7
                    , { field: '工作中心代码', title: '工作中心代码', edit: 'text', event: "CheckHCenterID" }//不填
                    // , { field: 'HCenterID', title: '工作中心id', hide: true }//, hide: true
                     , { field: 'HCenterID', title: '工作中心ID', hide: true }//, hide: true
                    , { field: '工作中心', title: '工作中心' }//f7
                    , { field: 'HTechnologyParameter', title: '工艺参数', edit: 'text' }
                    , { field: 'HRemark', title: '备注', edit: 'text' }
                    // , { field: 'HSupID', title: '供应商ID', hide: true }
                     , { field: 'HSupID', title: '供应商ID', hide: true }
                    , { field: '供应商代码', title: '供应商代码', edit: 'text', width: 110, event: "CheckHSupID" }
                    , { field: '供应商', title: '供应商' }//f7
                    , { field: 'HSupFlag', title: '外协标记', templet: "#HSupFlag" }//checkbox
@@ -731,6 +745,8 @@
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
                        $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
                        $("#HEndDate").val(Format(new Date(2100,12,31), "yyyy-MM-dd"));
                    }
                });
            }
@@ -984,7 +1000,7 @@
                var NewRow = {
                    "HProcNo": (table.cache["mainTable"].length + 1) * 10, "HProcID_S": 0, "HProcType": "主工序", "HCenterID_S": 0, "HCenterID_SName": ""
                    , "HWorkQty_S": 0, "HSubStdEmpQty_S": 0, "HMouldNo": "", "HChangeMould": 0, "HPackStd": ""
                    , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "工序": ""
                    , "HPack": "", "HPutArea": "", "HMyWorkDays": 0, "HMyFixWorkDays": 0, "工序": "","工段":""
                    , "HProcID": 0, "工作中心代码": "", "HCenterID": 0, "工作中心": "", "HSupID": 0
                    , "供应商代码": "", "供应商": "", "HSupFlag": false, "HSortProcFlag": false, "HTimeUnit": "", "HUnitTime": 0
                    , "HWorkQty": 1, "HSNCtrl": false, "HPassRate": 100, "HOverRate": 0, "HReadyTime": 0, "HQueueTime": 0
@@ -1643,6 +1659,8 @@
                                            option.data[i]["工作中心"] = WorkCente[j]["工作中心名称"];
                                            option.data[i]["HCenterID"] = WorkCente[j]["HCenterID"];
                                            option.data[i]["工作中心代码"] = WorkCente[j]["工作中心代码"];
                                            option.data[i]["HProcID_S"] = checkStatus.data[j]["HProcMulID"];
                                            option.data[i]["工段"] = checkStatus.data[j]["工段名称"];
                                            j++;
                                        }
@@ -1677,6 +1695,8 @@
                                            option.data[i]["工作中心"] = WorkCente[j]["工作中心名称"];
                                            option.data[i]["HCenterID"] = WorkCente[j]["HCenterID"];
                                            option.data[i]["工作中心代码"] = WorkCente[j]["工作中心代码"];
                                            option.data[i]["HProcID_S"] = checkStatus.data[j]["HProcMulID"];
                                            option.data[i]["工段"] = checkStatus.data[j]["工段名称"];
                                            j++;
                                        }
                                    }
@@ -1706,6 +1726,48 @@
                                            , "工作中心": OptionData[0].工作中心
                                            , "HCenterID": OptionData[0].HWorkCenterID
                                            , "工作中心代码": OptionData[0].工作中心代码
                                            , "HProcID_S": OptionData[0].HProcMulID
                                            , "工段": OptionData[0].工段名称
                                        })
                                        OptionData = [];
                                    }
                                }
                            })
                        }
                        //工段
                        if (obj.event == "CheckHProcMulID") {
                            //打开人员表  å°çª—体
                            layer.open({
                                type: 2
                                , skin: "layui-layer-rim" //加上边框
                                , title: "工段列表"  //标题
                                , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ["../../基础资料/生产基础资料/Gy_ProcMul.html", "yes"]
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
                                    var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
                                    if (checkStatus.data.length != 1) {
                                        return layer.msg("请选择一条数据");
                                    }
                                    //更新表格缓存的数据
                                    obj.update({
                                        "工段": checkStatus.data[0].工段名称
                                        , "HProcID_S": checkStatus.data[0].HItemID
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (OptionData.length > 0) {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "工段": OptionData[0].工段名称
                                            , "HProcID_S": OptionData[0].HItemID
                                        })
                                        OptionData = [];
                                    }
@@ -1999,12 +2061,14 @@
                            "HBillNo": OperationType == 2 ? "" : d.data[0].单据号
                            , "HInterID": OperationType == 2 ? 0 : d.data[0].hmainid
                            , "HDate": Format(new Date(d.data[0].日期), "yyyy-MM-dd")
                            , "HBeginDate": Format(new Date(d.data[0].生效时间), "yyyy-MM-dd")
                            , "HEndDate": Format(new Date(d.data[0].失效时间), "yyyy-MM-dd")
                            , "HName": d.data[0].工艺名称
                            , "HMaterNumber": OperationType == 2 ? "" : d.data[0].物料代码
                            , "HMaterName": OperationType == 2 ? "" : d.data[0].物料名称
                            , "HMaterID": OperationType == 2 ? "" : d.data[0].HMaterID
                            , "HUnitName": d.data[0].计量单位
                            , "HUnitID": d.data[0].hunitid
                            , "HUnitID": d.data[0].HUnitID
                            , "HMainTimeUnit": d.data[0].运行时间单位
                            , "HMainProcIDName": d.data[0].工序名称
                            , "HMainProcID": d.data[0].HMainProcID
@@ -2047,8 +2111,8 @@
                                {
                                    "HProcNo": d.data[i].工序号, "HProcID_S": d.data[i].工段, "HProcType": d.data[i].工序类型, "HCenterID_S": d.data[i].HCenterID_S, "HCenterID_SName": d.data[i].产线中心
                                    , "HWorkQty_S": d.data[i].产线产能, "HSubStdEmpQty_S": d.data[i].产线人数, "HMouldNo": d.data[i].模具编号, "HChangeMould": d.data[i].换模时间, "HPackStd": d.data[i].周转箱标准
                                    , "HPack": d.data[i].周转箱, "HPutArea": d.data[i].暂放区, "HMyWorkDays": d.data[i].生产周期, "HMyFixWorkDays": d.data[i].固定生产天数, "工序": d.data[i].工序
                                    , "HProcID": d.data[i].hprocid, "工作中心代码": d.data[i].工作中心代码, "HCenterID": d.data[i].HCenterID, "工作中心": d.data[i].工作中心名称, "HSupID": d.data[i].HSupID
                                    , "HPack": d.data[i].周转箱, "HPutArea": d.data[i].暂放区, "HMyWorkDays": d.data[i].生产周期, "HMyFixWorkDays": d.data[i].固定生产天数, "工序": d.data[i].工序, "工段": d.data[i].工段名称
                                    , "HProcID": d.data[i].HProcID, "工作中心代码": d.data[i].工作中心代码, "HCenterID": d.data[i].HCenterID, "工作中心": d.data[i].工作中心名称, "HSupID": d.data[i].HSupID
                                    , "供应商代码": d.data[i].供应商代码, "供应商": d.data[i].供应商, "HSupFlag": d.data[i].委外标记 == 0 ? false : true, "HSortProcFlag": d.data[i].排产工序标记 == 0 ? false : true, "HTimeUnit": d.data[i].时间单位, "HUnitTime": d.data[i].运行时间
                                    , "HWorkQty": d.data[i].加工数量, "HSNCtrl": d.data[i].SN过站控制 == 0 ? false : true, "HPassRate": d.data[i].良率, "HOverRate": d.data[i].超额比例, "HReadyTime": d.data[i].准备时间, "HQueueTime": d.data[i].排队时间
                                    , "HMoveTime": d.data[i].转移时间, "HNextProcFlag": d.data[i].HNextProcFlag == 0 ? false : true, "HFlowProc": d.data[i].流转工序 == 0 ? false : true, "HSubStdEmpQty": d.data[i].标准人数, "HSubCanUseSourceQty": d.data[i].可操作设备数
@@ -2285,7 +2349,7 @@
                var colName = "";
                var contentUrl = "";
                for (var i = 1; i < option.cols[0].length - 1; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                    colName += option.cols[0][i]["field"] + ",";
                }
                var urlStr = window.document.location.pathname;//获取文件路径
                var urlLen = urlStr.split('/');
@@ -2395,6 +2459,10 @@
                                } else {
                                    option.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //统计列
                                if (dataCols[6] == 1) {
                                    option.cols[0][i + 1]["totalRow"] = true;
                                }
                                //设置列宽
                                //if (data1.data[0].HColumnWidth != 0) {
                                //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
@@ -2416,6 +2484,10 @@
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                                //设置表格title属性显示别名
                                if (dataCols[4] != null && dataCols[4] != "") {
                                    option.cols[0][i + 1]["title"] = dataCols[4];
                                }
                            }
@@ -2495,6 +2567,10 @@
        function GetHSupNameValue(obj) {
            OptionData = obj;
        }
        //供应商
        function GetGyProcMulValue(obj) {
            OptionData = obj;
        }
    </script>
</body>
</html>