yangle
2024-05-23 809996deb487815f964c91b3cb144d339d48c3b5
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Gy_MaterialMouldBillMain.html
@@ -109,7 +109,7 @@
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">物料代码</label>
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">物料代码<label style="color:red"> * </label></label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" name="HMaterID" id="HMaterID" lay-verify="HMaterID" value="0">
@@ -323,7 +323,7 @@
                , form = layui.form
                , element = layui.element;
            var HModName = "Gy_MaterialMouldBillMain";
            //#endregion
@@ -336,10 +336,10 @@
            var OperationType = params[params[0]]; //从参数中获取 æ•°æ®ç±»åž‹  1添加 ä¿å­˜  2复制  3 ç¼–辑 4添加子工艺路线
            var linterid = params[params[1]]; //从参数中获取 å•据内码
            //判断是否新增
            if (OperationType == null || OperationType == 1) {
                OperationType = 1;
                $("#HOrgID").attr("disabled", true);
                //禁用按钮
@@ -366,7 +366,7 @@
                $("#HMakerDate").val(Format(new Date(), "yyyy-MM-dd"));
            }
            //else if (OperationType == 2) {
            //    RoadBillMain(linterid);
            //    $.ajax({
            //        url: GetWEBURL() + "/Web/GetMAXNum",
@@ -391,9 +391,9 @@
                //禁用组织选项
                $("#HOrgID").attr("disabled", true);
                RoadBillMain(linterid);
                RoadBillMain(linterid);
            }
            //显示列数据
@@ -434,9 +434,9 @@
            // ä¿å­˜æäº¤
            form.on('submit(btnSave)', function (data) {//提交
                    set_AddNew(data);
                set_AddNew(data);
            });
            // é€€å‡º
@@ -476,12 +476,12 @@
                //新增行表格数据
                var NewRow = {
                    "HMouldID": "",
                    "HMouldNumber":"",
                    "HMouldNumber": "",
                    "HMouldName": "",
                    "HMouldType": "",
                    "HQty": "0",
                    "HMouldQty": "0",
                    "HRate": "0",
                    "HQty": "1",
                    "HMouldQty": "",
                    "HRate": "",
                    "HSourceBillNo": "0",
                    "HSourceBillType": "0",
                    "HSourceEntryID": "0",
@@ -493,7 +493,7 @@
                        option.data = table.cache["mainTable"];
                        table.render(option);
                        break;
                    case 'btn-CopyLine':
                        var copydata = JSON.stringify(data);
@@ -509,7 +509,7 @@
                            table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
                            option.data = table.cache["mainTable"];//将数据绑定到data上
                            table.render(option);//将数据渲染到表格上
                        }
                        break;
@@ -542,7 +542,7 @@
            //#region å™¨å…·æ¸…单初始化
            function get_InitGrid() {
                 option = {
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , totalRow: true
@@ -567,7 +567,7 @@
                }
                option.data = [];
                table.render(option);
            }
            //#endregion
@@ -626,7 +626,7 @@
                    }
                });
            }
             //#endregion
            //#endregion
            //#region è´Ÿè´£äººé€‰æ‹©é¡µé¢
            function get_checkSearchHEmp() {
@@ -741,7 +741,7 @@
                        $("#HEquipNumber").val(checkStatus.data[0].设备代码);//设备代码
                        $("#HEquipName").val(checkStatus.data[0].设备名称);//设备名称
                        $("#HEquipModel").val(checkStatus.data[0].设备规格);//设备型号
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
@@ -774,15 +774,17 @@
                                        return layer.msg('请选择数据');
                                    }
                                    obj.update({
                                        "HMouldID":checkStatus.data[0].hmainid,
                                        "HMouldID": checkStatus.data[0].hmainid,
                                        "HMouldNumber": checkStatus.data[0].模具编号,
                                        "HMouldName":checkStatus.data[0].模具名称,
                                        "HMouldName": checkStatus.data[0].模具名称,
                                        "HMouldType": checkStatus.data[0].模具型号,
                                        "HMouldQty": checkStatus.data[0].穴数,
                                        "HSourceInterID": checkStatus.data[0].hmainid,
                                        "HSourceEntryID": checkStatus.data[0].hsubid,
                                        "HSourceBillType": checkStatus.data[0].HBillType,
                                        "HSourceBillNo": checkStatus.data[0].单据号
                                        "HSourceBillNo": checkStatus.data[0].单据号,
                                        "HQty": 1,
                                        "HRate": 1
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
@@ -935,7 +937,7 @@
            }
            //#endregion
            //#region ç¼–辑 é¡µé¢èµ‹å€¼
            function RoadBillMain(linterid)//加载表头
@@ -1001,6 +1003,11 @@
            //#region ä¿å­˜HMaker
            function set_AddNew(data) {
                if (!AllowLoadData())//数据验证
                {
                    return false;
                }
                //记录操作类型
                var refSav = "";
                if (OperationType == 1 || OperationType == 2 || OperationType == 4) {
@@ -1027,14 +1034,14 @@
                }
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(num);
                var sMainSub = sMainStr + ';' + sSubStr + ';' + refSav + ";" + sessionStorage["HUserName"] ;
                var sMainSub = sMainStr + ';' + sSubStr + ';' + refSav + ";" + sessionStorage["HUserName"];
                var index = layer.load();
                $.ajax({
                    type: "POST",
                    url: GetWEBURL() + "/Sc_MouldinventoryBill/SaveGy_MaterialMouldBillMain",
                    async: true,
                    data: { "sMainSub": sMainSub },
                    dataType: "json",
@@ -1083,7 +1090,17 @@
            }
            //#endregion
            function AllowLoadData() {  //非空验证
                var Result = true;
                if ($("#HMaterID").val() == 0 || $("#HMaterID").val() == null || $("#HMaterID").val() == "undefined") {
                    layer.msg("物料信息不能为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return Result = false;
                }
                return Result;
            }
            //隐藏列设置
            function get_HideColumn() {
                var colName = "";
@@ -1119,7 +1136,7 @@
                })
            }
            //显示列数据
            function DisPlay_HideColumn() {
@@ -1131,7 +1148,7 @@
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = [ ];//不需要显示的字段 å¯æ‰©å±•
                            var titleData = [];//不需要显示的字段 å¯æ‰©å±•
                            dataCol = data1.data[0].HGridString.split(',');
@@ -1203,7 +1220,7 @@
                })
            }
            //#endregion
        });