1
wtt
2026-03-10 a7a5145cffd47fdb4291228e4a7d5b3464d399c9
1
11个文件已修改
844 ■■■■■ 已修改文件
WebTM/WebTM.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_batchKeyElement.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_checkPackage_Sec.html 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/单品过站_小卫/Cj_SachetBarCodePrint.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBillList.html 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/其他出库/Add_Edit_Kf_OtherOutBill.html 205 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/生产领料/Kf_ProductReceiveMaterialBillEdit.html 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/领料出库/Kf_MateOutBackBillEdit.html 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/领料出库/Kf_MateOutBillLEdit.html 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/领料出库/Kf_MateOutBillList.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj.user
@@ -8,7 +8,7 @@
    <NameOfLastUsedPublishProfile>D:\智云LMes\MESWMS-LayUI\WebTM\Properties\PublishProfiles\SWETM.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\工作代码\智云迈思\MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\LAYUI.pubxml</NameOfLastUsedPublishProfile>
    <ProjectView>ProjectFiles</ProjectView>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>true</UseIISExpress>
    <Use64BitIISExpress />
    <IISExpressSSLPort />
WebTM/views/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillList.html
@@ -1712,6 +1712,7 @@
            function set_PushICMOChangeBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                console.log(checkStatus)
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    var HEntryID = data[0].hsubid.toString();
@@ -3157,7 +3158,7 @@
                var HSourceBillData = "none";
                var sWhere = " and hmainid = " + ParamsInterID;
                $.ajax({
                    url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json',
                    url: GetWEBURL() + 'LEMS/MES_IF_ICMOBillList_Json',
                    async: false,
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
WebTM/views/³µ¼ä¹ÜÀí/µ¥Æ·¹ýÕ¾_СÎÀ/Cj_ProcessItemStationPlatform_batchKeyElement.html
@@ -398,7 +398,7 @@
                    $("#HBarCode_SN").focus();
                    return
                }
                if ($("#HBarCode_SN").val().substring(0, 5) == "51510") {
                if ($("#HBarCode_SN").val().substring(0, 5) == "51510" || $("#HBarCode_SN").val().substring(0, 5) == "77217") {
                    var sql = "exec h_p_Cj_BlueToothBarCodeSave '" + $("#HBarCode_Key").val() + "'," + option.data[0].HMaterID + "," + "100004" + ",'" + sessionStorage["HUserName"] + "'";
                    $.ajax({
                        type: "GET",
WebTM/views/³µ¼ä¹ÜÀí/µ¥Æ·¹ýÕ¾_СÎÀ/Cj_ProcessItemStationPlatform_checkPackage_Sec.html
@@ -966,40 +966,24 @@
            var rowIndex = $(obj.tr).attr("data-index");
            if (obj.event === 'del') {
                layer.confirm('真的删除行吗?', function (index) {
                    console.log("索引为:" + rowIndex);
                    var wait = layer.load();
                    //删除临时表数据
                    $.ajax({
                        url: GetWEBURL() + 'Deltet_Sc_AssemblyBill_BindBarCodeTemp',
                        type: "GET",
                        data: { "HBillNo": $("#HBillNo").val(), "HBarCode": option.data[rowIndex].HBarCode, "user": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { icon: 1, time: 500 }, function () {
                                    //关闭当前frame
                                    layer.close(wait);
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                                layer.close(wait);
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                            layer.close(wait);
                        }
                    });
                    //刷新表格数据
                    option.data[rowIndex].HBarCode = "";
                    option.data[rowIndex].HBindingQty = 0;
                    //option.data[rowIndex].HMaterID = 0;
                    option.data[rowIndex].HMaterNumber = "";
                    option.data[rowIndex].HMaterName = "";
                    option.data[rowIndex].HMaterModel = "";
                    option.data[rowIndex].HBarCode = "";
                    var oldData = table.cache["mainTable"];
                    oldData.splice(obj.tr.data('index'), 1);
                    option.data = oldData;
                    table.render(option);
                    rowarr = [];
                    for (var i = 0; i < option.data.length; i++) {
                        rowarr.push({
                            "HBarCode_P": option.data[i].HBarCode_P, "HPartsBarCode": "", "HPartsQty": option.data[i].HPartsQty, "HBindingQty": 0
                            , "HMaterID": option.data[i].HMaterID, "HMaterNumber": option.data[i].HMaterNumber, "HMaterName": option.data[i].HMaterName, "HMaterModel": option.data[i].HMaterModel, "HBatchNo": ""
                            , "HSourceID": $("#HSourceID").val(), "HEquipID": 0, "HGroupID": $("#HGroupID").val(), "HWorkerID": $("#HEmpID").val()
                            , "HScanDate": new Date(), "HSourceInterID": $("#HICMOInterID").val()
                            , "HSourceEntryID": $("#HICMOEntryID").val(), "HSourceBillNo": $("#HICMOBillNo").val()
                        });
                    }
                    layer.close(index);
                });
            }
WebTM/views/³µ¼ä¹ÜÀí/µ¥Æ·¹ýÕ¾_СÎÀ/Cj_SachetBarCodePrint.html
@@ -568,6 +568,10 @@
                var sWhere = "select top 1 a.HItemID,HBarCode æ¡ç ç¼–号,isnull(ms.HCusRelationNumber,'') SKU from Gy_BarCodeBill a with(nolock) left join Gy_Material m with(nolock) on a.HMaterID = m.HItemID left join Gy_MateNumRelation_Sec ms with(nolock) on m.HMASTERID = ms.HMaterID where a.HBarCode = '" + HBarCode + "'";
                if ($("#HPrintTemplate").val().indexOf("闻献") !== -1) {
                    sWhere = "exec h_p_IF_BarCodeBillList_XWPrint '" + HBarCode + "'"
                }
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //方法所在页面和方法名
WebTM/views/³µ¼ä¹ÜÀí/¹¤ÐòÁ÷ת¿¨/Sc_ProcessExchangeBillList.html
@@ -291,11 +291,14 @@
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_PatrolCheck" id="set_PatrolCheck"><i class="layui-icon layui-icon-form"></i>巡检</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_WorkCheck" id="set_WorkCheck"><i class="layui-icon layui-icon-form"></i>自检</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn_print_small" lay-event="btn_print_small"><i class="layui-icon layui-icon-print"></i>工艺小标签打印</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_pushKf_OtherOut" id="set_pushKf_OtherOut"><i class="layui-icon layui-icon-form"></i>下推(其他出库单)</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_pushKf_MateOutBack" id="set_pushKf_MateOutBack"><i class="layui-icon layui-icon-form"></i>下推(生产退料单)</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_pushKf_MateOut" id="set_pushKf_MateOut"><i class="layui-icon layui-icon-form"></i>下推(生产领料单)</button>
                            </div>
                        </script>
                        <script type="text/html" id="toolbarDemo2">
                            <div class="layui-btn-container">
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_view"><i class="layui-icon layui-icon-tips"></i>预览</button>
@@ -529,8 +532,15 @@
                        break;
                    //case 'fy':  initFunction(1, HModName, sessionStorage["HTranSlate"]);
                    //    break;
                    //下推(其他出库单)
                    case 'set_pushKf_OtherOut': set_pushKf_OtherOut();
                        break;
                    //下推(生产退料单)
                    case 'set_pushKf_MateOutBack': set_pushKf_MateOutBack();
                        break;
                    //下推(生产领料单)
                    case 'set_pushKf_MateOut': set_pushKf_MateOut();
                        break;
                };
            });
@@ -3641,6 +3651,176 @@
            }
            //#endregion
            //#region ä¸‹æŽ¨(其他出库单)
            function set_pushKf_OtherOut() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    var HEntryID = data[0].HEntryID.toString();
                    //#region åˆ¤æ–­æºå•状态
                    var HSourceBillData = "";
                    var HSourceBillData = getSourceBillStatus_ProcessExchangeBill(hID);            //获取源单数据
                    if (HSourceBillData != "none") {
                        if (HSourceBillData.length == 0) {
                            layer.alert("保存失败!未查询到生产订单单据!", { icon: 5 });
                            return;
                        } else if (HSourceBillData[0]["审核人"] == "") {
                            var err = "保存失败!原因:订单单据状态为“" + HSourceBillData[0]["单据状态"] + "”,不允许下推其他出库单!";
                            layer.alert(err, { icon: 5 });
                            return;
                        }
                    } else {
                        return;
                    }
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '下推-其他出库单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../领料发货/其他出库/Add_Edit_Kf_OtherOutBill.html?OperationType=4&linterid=' + hID + '&HSouceBillType=3772&closeType=1&HEntryID=' + HEntryID
                        , resize: false,
                        end: function () {
                            //刷新页面,
                            $("#btnSearch").trigger('click');
                        }
                        , cancel: function () {
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
            //#region ä¸‹æŽ¨(生产退料单)
            function set_pushKf_MateOutBack() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    var HEntryID = data[0].HEntryID.toString();
                    //#region åˆ¤æ–­æºå•状态
                    var HSourceBillData = "";
                    var HSourceBillData = getSourceBillStatus_ProcessExchangeBill(hID);            //获取源单数据
                    if (HSourceBillData != "none") {
                        if (HSourceBillData.length == 0) {
                            layer.alert("保存失败!未查询到生产订单单据!", { icon: 5 });
                            return;
                        } else if (HSourceBillData[0]["审核人"] == "") {
                            var err = "保存失败!原因:订单单据状态为“" + HSourceBillData[0]["单据状态"] + "”,不允许下推其他出库单!";
                            layer.alert(err, { icon: 5 });
                            return;
                        }
                    } else {
                        return;
                    }
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '下推-生产退料单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../领料发货/领料出库/Kf_MateOutBackBillEdit.html?OperationType=4&linterid=' + hID + '&HSouceBillType=3772&closeType=1&HEntryID=' + HEntryID
                        , resize: false,
                        end: function () {
                            //刷新页面,
                            $("#btnSearch").trigger('click');
                        }
                        , cancel: function () {
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
            //#region ä¸‹æŽ¨(生产领料单)
            function set_pushKf_MateOut() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    var HEntryID = data[0].HEntryID.toString();
                    //#region åˆ¤æ–­æºå•状态
                    var HSourceBillData = "";
                    var HSourceBillData = getSourceBillStatus_ProcessExchangeBill(hID);            //获取源单数据
                    if (HSourceBillData != "none") {
                        if (HSourceBillData.length == 0) {
                            layer.alert("保存失败!未查询到生产订单单据!", { icon: 5 });
                            return;
                        } else if (HSourceBillData[0]["审核人"] == "") {
                            var err = "保存失败!原因:订单单据状态为“" + HSourceBillData[0]["单据状态"] + "”,不允许下推其他出库单!";
                            layer.alert(err, { icon: 5 });
                            return;
                        }
                    } else {
                        return;
                    }
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '下推-生产领料单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../领料发货/生产领料/Kf_ProductReceiveMaterialBillEdit.html?OperationType=4&linterid=' + hID + '&HSouceBillType=3772&closeType=1&HEntryID=' + HEntryID
                        , resize: false,
                        end: function () {
                            //刷新页面,
                            $("#btnSearch").trigger('click');
                        }
                        , cancel: function () {
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
            //#region èŽ·å–æºå•-订单单据状态
            function getSourceBillStatus_ProcessExchangeBill(ParamsInterID) {
                var HSourceBillData = "none";
                var sWhere = " and hmainid = " +ParamsInterID;
                $.ajax({
                    url: GetWEBURL() + 'LEMS/MES_Sc_ProcessExchangeBillList_Json',
                    async: false,
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.count == 1) {
                            HSourceBillData = data1.data;
                        } else {
                            layer.alert(data1.code + "单据状态判断失败!", { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                return HSourceBillData;
            }
            //#endregion
            //#region æ ¹æ®ç”¨æˆ·èŽ·å–ç”¨æˆ·å…³è”å®¢æˆ·çš„è¿‡æ»¤æ¡ä»¶
            function getSWhereByHUser() {
                var res = "";
WebTM/views/ÁìÁÏ·¢»õ/ÆäËû³ö¿â/Add_Edit_Kf_OtherOutBill.html
@@ -79,6 +79,15 @@
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">子单据类型</label>
                                            <div class="layui-input-inline">
                                                <select name="HBillSubType" lay-filter="HBillSubType" id="HBillSubType">
                                                    <option value="白坯领料" selected="selected">白坯领料</option>
                                                    <option value="白坯领料调整">白坯领料调整</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">业务员</label>
                                            <div class="layui-input-inline">
                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value=0 style="float:left;width:150px;">
@@ -361,6 +370,7 @@
            var params = get_UrlVars();
            var OperationType = params[params[0]]; //从参数中获取 æ•°æ®ç±»åž‹  1添加 ä¿å­˜  2复制  3 ç¼–辑
            var linterid = params[params[1]]; //从参数中获取 å•据内码
            var HEntryID = params[params[4]]; //获取单据子id
            if (typeof (params[params[0]]) == "undefined") {
                OperationType = 1;//操作类型
            } else {
@@ -407,10 +417,10 @@
            //#region æ˜Žç»†è¡Œåˆå§‹åŒ–
            var rowdata = [{
                "HMaterID": 0, "物料代码": "", "物料名称": "", "规格型号": "", "HPropertyID": "0", "辅助属性": "", "HSecUnitRate": "0", "HUnitID": 0, "计量单位": "", "HRemark": "",
                "HQtyMust": "0", "HQty": "0","HPieceQty": "0", "HPrice": "0", "HMoney": "0", "HWHID": 0, "收料仓库": "",
                "HQtyMust": "0", "HQty": "0","HPieceQty": "0", "HPrice": "0", "HMoney": "0", "HWHID": 0, "发料仓库": "",
                "HSPID": 0, "HSPGroupID": 0, "仓位名称": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
                "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
                "源单号": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
            }];
            // åˆå§‹åŒ–界
            set_InitGrid();
@@ -425,7 +435,12 @@
            else if (OperationType == 3) {//编辑
                $("#HItemID").val(linterid);//修改时主表ID
                //编辑状态时,根据内码,获取信息并写入界面
                console.log('执行编辑');
                RoadBillMain(linterid);
            }
            else if (OperationType == 4) {      //下推
                console.log('执行下推');
                setInit_PushBill(linterid);
            }
            else {
                layer.alert("未知操作类型!", { icon: 5 });
@@ -449,10 +464,11 @@
                    }
                });
            }
            else {//如果修改则走下面 new
                $("#HInterID").val(linterid);
                RoadBillMain(linterid);
            }
            //else {//如果修改则走下面 new
            //    $("#HInterID").val(linterid);
            //    console.log(1)
            //    RoadBillMain(linterid);
            //}
            //#endregion
            //#endregion
@@ -487,10 +503,10 @@
                //    return;
                //}
                //if ($("#HWHName").val() == 0) {
                //    layer.msg("请选择仓库!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                //    return;
                //}
                if ($("#HWHName").val() == 0) {
                    layer.msg("请选择仓库!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                //if ($("#HKeeperID").val() == 0) {
                //    layer.msg("请选择保管员!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                //    return;
@@ -500,10 +516,10 @@
                //    return;
                //}
                if ($("#HSupID").val() == 0) {
                    layer.msg("请选择往来单位!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return;
                }
                //if ($("#HSupID").val() == 0) {
                //    layer.msg("请选择往来单位!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                //    return;
                //}
                for (var i = 0; i < option.data.length; i++) {
                    if (option.data[i]["HMaterID"] == "0") {
@@ -991,7 +1007,7 @@
                    "HQtyMust": "0", "HQty": "0","HPieceQty": "0", "HPrice": "0", "HMoney": "0", "HWHID": 0, "收料仓库": "",
                    "HSPID": 0, "HSPGroupID": 0, "仓位名称": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                    "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
                    "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
                    "源单号": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
                };
                switch (obj.event) {
                    //新增
@@ -1510,7 +1526,7 @@
                                    obj.update({
                                        "HWHID": checkStatus.data[0].HItemID,
                                        "收料仓库": checkStatus.data[0].仓库名称
                                        "发料仓库": checkStatus.data[0].仓库名称
                                    })
                                    layer.close(index);//关闭弹窗
                                }
@@ -1557,6 +1573,7 @@
                                }
                            })
                        }
                        //采购订单号
                        if (obj.event == "HPOOrderBillNo") {
@@ -1755,6 +1772,22 @@
            }
            //#endregion
            //#region ç”Ÿæˆå•据号
            function createBillNo() {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '1206' },
                    success: function (d) {
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
                        $("#HInterID").val(d.data[0].HInterID);
                    }
                });
            }
            //#endregion
            //#region æ—¥æœŸæ ¼å¼åŒ–
            function formatDate(date) {
                var d = new Date(date),
@@ -1781,9 +1814,9 @@
                    , cols: [[ //子表
                        { type: 'checkbox', totalRowText: '合计行' }
                        , { type: 'numbers', title: '序号', width: 100 }
                        , { type: 'HSourceBillNo', title: '源单号', width: 100, hide: true }//源单号
                        , { field: 'HSourceBillNo', title: '源单号', width: 100, hide: true }//源单号
                        , { field: 'HSourceBillType', title: '源单类型', width: 100, hide: true }//源单类型
                        , { type: 'HSourceInterID', title: '源单主内码', width: 100, hide: true }//源单主内码
                        , { field: 'HSourceInterID', title: '源单主内码', width: 100, hide: true }//源单主内码
                        , { field: 'HSourceEntryID', title: '源单子内码', width: 100, hide: true }//源单子内码
                        , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
                        , { field: '物料代码', title: '物料代码', width: 150, edit: 'text', event: "HMaterID" }//f7
@@ -1804,10 +1837,10 @@
                        , { field: 'HMoney', title: '金额', width: 100, edit: 'text', totalRow: true }
                     
                        , { field: 'HWHID ', title: 'HWHID ', width: 100, hide: true }
                        , { field: '收料仓库', title: '发料仓库', width: 100, edit: 'text', event: "HWHID" }//f7
                        , { field: '发料仓库', title: '发料仓库', width: 100, edit: 'text', event: "HWHID" }//f7
                        , { field: 'HSPID', title: 'HSPID', width: 100, hide: true }
                        , { field: 'HSPGroupID', title: 'HSPGroupID', width: 100, hide: true }
                        , { field: '仓位名称', title: '仓位名称', width: 100, edit: 'text', event: "HSPID" }//f7
                        , { field: '仓位名称', title: '仓位名称', width: 100, edit: 'text', event: "HSPID"}//f7
                        , { field: 'HBatchNo', title: '批次', width: 150, edit: 'text', hide: true }
                        , { field: 'HPOOrderInterID', title: '采购订单主内码', width: 100, hide: true }//采购订单主内码
                        , { field: 'HPOOrderEntryID', title: '采购订单子内码', width: 100, hide: true }//采购订单子内码
@@ -1851,6 +1884,7 @@
                                , "HSupName": data[0]["往来单位"]
                                , "HWHID": data[0]["HWHID"]
                                , "HWHName": data[0]["仓库"]
                                , "HBillSubType": data[0]["HBillSubType"]
                                , "HSecManagerID": data[0]["HSecManagerID"]
                                , "HSecManagerName": data[0]["验收员"]
                                , "HKeeperID": data[0]["HKeeperID"]
@@ -1862,7 +1896,6 @@
                                , "HEmpID": data[0]["HEmpID"]
                                , "HEmpName": data[0]["业务员"]
                                , "HExplanation": data[0]["HExplanation"]
                                , "HRemark": data[0]["表头备注"]
                                , "HMaker": data[0]["制单人"]
                                , "HMakeDate": data[0]["制单日期"] == null ? "" : Format(new Date(data[0]["制单日期"]), "yyyy-MM-dd")
@@ -1881,7 +1914,6 @@
                            option.data = data1;
                            table.render(option);
                            form.render('select');
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
@@ -1918,7 +1950,127 @@
                return duplicates;
            }
            //#endregion
            //#region ä¸‹æŽ¨é¡µé¢åˆå§‹åŒ–
            function setInit_PushBill(linterid) {
                //生成并设置主表的内码和单据号
                console.log("setInit_PushBill å¼€å§‹æ‰§è¡Œï¼");
                createBillNo();
                //相关文本框信息初始化
                $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HMaker").val(sessionStorage["HUserName"]);
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
                //初始化并列设置:子表1
                //set_InitGrid();
                //DisPlay_HideColumn();
                //查询生产订单是否存在
                var ajaxLoad = layer.load();
                var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + "  and hmainid='" + linterid + "' and HEntryID=" + HEntryID;
                $.ajax({
                    url: GetWEBURL() + "/LEMS/MES_Sc_ProcessExchangeBillList_Json",
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (d) {
                        var result = d;
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data[0];
                            console.log('权限判断成功')
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HEmpID": data.HEmpID
                                , "HEmpName": data.业务员
                                , "HDeptID": data.HDeptID
                                , "HDeptName": data.生产车间
                                , "HCusID": data.HEntryCusID
                                , "HCusName": data.客户
                                , "HBillSubType" :data.HBillSubType
                                //, "HDeptID": data.HDeptID
                                //, "HDeptName": data.生产车间
                                //, "HCusID": data.HCusID
                                //, "HCusName": data.客户
                                //, "HMainSourceInterID": linterid
                                //, "HMainSourceEntryID": HEntryID
                                //, "HMainSourceBillNo": data.单据号
/*                                , "HMainSourceBillType": params[params[2]]*/
                                //, "HMaterID": data.HMaterID
                                //, "物料代码": data.产品代码
                                //, "物料名称": data.产品名称
                                //, "源单号": data.单据号
                                //, "源单主内码": data.hmainid
                                //, "源单子内码": data.HEntryID
                            });
                            //组织的值HOrgID变化,重新渲染
                            HOrgIDBar = data.HOrgID;
                            //子表  èµ‹å€¼
                            var rowdata = [];
                            for (var i = 0; i < result.data.length; i++) {
                                rowdata.push(
                                    {
                                        //"HMaterID": result.data[i]["HMaterID"],
                                        //"物料代码": result.data[i]["产品代码"],
                                        //"物料名称": result.data[i]["产品名称"],
                                        //"规格型号": result.data[i]["规格型号"],
                                        //"HUnitID": result.data[i]["HUnitID"],
                                        //"计量单位": result.data[i]["计量单位"],
                                        //"HQty_Old": result.data[i]["生产任务单数量"],
                                        //"HQty_New": result.data[i]["生产任务单数量"],
                                        ////"HDate_Old": formatDate(result.data[i]["原交货日期"]),
                                        ////"HDate_New": formatDate(result.data[i]["新交货日期"]),
                                        //"HRemark": "",
                                        //"HSourceInterID": result.data[i]["hmainid"],
                                        //"HSourceEntryID": result.data[i]["HEntryID"],
                                        //"HSourceBillNo": result.data[i]["单据号"],
                                        //"HSourceBillType": result.data[i]["单据类型"]
                                        "HMaterID": data.HMaterID
                                        , "物料代码": data.产品代码
                                        , "物料名称": data.产品名称
                                        , "HSourceBillNo": data.单据号
                                        , "HSourceInterID": data.hmainid
                                        , "HSourceEntryID": data.HEntryID
                                        , "HSourceBillType": params[params[2]]
                                        , "HWHID": ""
                                        , "发料仓库": ""
                                        , "HSPID": ""
                                        , "仓位名称": ""
                                        , "HPropertyID": ""
                                        , "辅助属性": ""
                                        , "HSecUnitRate": ""
                                        , "HUnitID": ""
                                        , "计量单位": ""
                                        , "HQtyMust": ""
                                        , "HQty": ""
                                        , "HPieceQty": ""
                                        , "HPrice": ""
                                        , "HMoney": ""
                                    }
                                );
                            }
                            option.data = rowdata;
                            table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("发生错误!", { icon: 5 });
                    }
                })
            }
            //#endregion
            //#region èŽ·å–æºå•ç±»åž‹
            function HSourceBillType() {
                var HName = '其他入库单';
@@ -1969,6 +2121,11 @@
            $("#HWHName").val(obj[0].仓库名称);
            $("#HWHID").val(obj[0].HItemID);
        }
        function GetHSPValue(obj)  //返回仓位
        {
            $("#HSPName").val(obj[0].仓位名称);
            $("#HSPID").val(obj[0].HItemID);
        }
        function GetHDeptNameValue(obj)  //返回部门
        {
@@ -1984,7 +2141,7 @@
        //双击返回物料
        function GetGyMaterial(data) {
            OptionData = data
            OptionData  = data
        }
        //双击返回计量单位
        function GetGyUnit(data) {
WebTM/views/ÁìÁÏ·¢»õ/Éú²úÁìÁÏ/Kf_ProductReceiveMaterialBillEdit.html
@@ -324,6 +324,8 @@
                var OperationType = params[params[0]];//操作类型
                var linterid = params[params[1]];//源单id
                var HSouceBillType = params[params[2]];//源单类型
                var closeType = params[params[3]];  //关闭类型
                var HEntryID = params[params[4]]
            }
            //#endregion
@@ -352,7 +354,7 @@
                RoadBillMain(linterid);
            }
            else if (OperationType == 4) {                     //下推
                setInit_PushBill();
                setInit_PushBill(linterid);
            }
            else {
                layer.alert("未知操作类型!", { icon: 5 });
@@ -1824,6 +1826,124 @@
            }
            //#endregion
            //#region ä¸‹æŽ¨é¡µé¢åˆå§‹åŒ–
            function setInit_PushBill(linterid) {
                //生成并设置主表的内码和单据号
                console.log("setInit_PushBill å¼€å§‹æ‰§è¡Œï¼");
                get_MAXNum();
                //相关文本框信息初始化
                $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                $("#HMaker").val(sessionStorage["HUserName"]);
                $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                //初始化并列设置:子表1
                //set_InitGrid();
                //DisPlay_HideColumn();
                //查询生产订单是否存在
                var ajaxLoad = layer.load();
                console.log(linterid,HEntryID)
                var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + "  and hmainid='" + linterid + "' and HEntryID=" + HEntryID;
                $.ajax({
                    url: GetWEBURL() + "/LEMS/MES_Sc_ProcessExchangeBillList_Json",
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (d) {
                        var result = d;
                        console.log(result);
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data[0];
                            console.log('权限判断成功')
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HEmpID": data.HEmpID
                                , "HEmpName": data.业务员
                                , "HDeptID": data.HDeptID
                                , "HDeptName": data.生产车间
                                , "HCusID": data.HEntryCusID
                                , "HCusName": data.客户
                                , "HBillSubType": "白坯领料"
                                //, "HDeptID": data.HDeptID
                                //, "HDeptName": data.生产车间
                                //, "HCusID": data.HCusID
                                //, "HCusName": data.客户
                                //, "HMainSourceInterID": linterid
                                //, "HMainSourceEntryID": HEntryID
                                //, "HMainSourceBillNo": data.单据号
                                /*                                , "HMainSourceBillType": params[params[2]]*/
                                //, "HMaterID": data.HMaterID
                                //, "物料代码": data.产品代码
                                //, "物料名称": data.产品名称
                                //, "源单号": data.单据号
                                //, "源单主内码": data.hmainid
                                //, "源单子内码": data.HEntryID
                            });
                            //组织的值HOrgID变化,重新渲染
                            HOrgIDBar = data.HOrgID;
                            //子表  èµ‹å€¼
                            var rowdata = [];
                            for (var i = 0; i < result.data.length; i++) {
                                rowdata.push(
                                    {
                                        //"HMaterID": result.data[i]["HMaterID"],
                                        //"物料代码": result.data[i]["产品代码"],
                                        //"物料名称": result.data[i]["产品名称"],
                                        //"规格型号": result.data[i]["规格型号"],
                                        //"HUnitID": result.data[i]["HUnitID"],
                                        //"计量单位": result.data[i]["计量单位"],
                                        //"HQty_Old": result.data[i]["生产任务单数量"],
                                        //"HQty_New": result.data[i]["生产任务单数量"],
                                        ////"HDate_Old": formatDate(result.data[i]["原交货日期"]),
                                        ////"HDate_New": formatDate(result.data[i]["新交货日期"]),
                                        "HRemark": "",
                                        //"HSourceInterID": result.data[i]["hmainid"],
                                        //"HSourceEntryID": result.data[i]["HEntryID"],
                                        //"HSourceBillNo": result.data[i]["单据号"],
                                        //"HSourceBillType": result.data[i]["单据类型"]
                                        "HMaterID": data.HMaterID
                                        , "物料代码": data.产品代码
                                        , "物料名称": data.产品名称
                                        , "HSourceBillNo": data.单据号
                                        , "HSourceInterID": data.hmainid
                                        , "HSourceEntryID": data.HEntryID
                                        , "HSourceBillType": params[params[2]]
                                        , "计量单位": ""
                                        , "HUnitCode": ""
                                        , "HUnitName": ""
                                        , "HQtyMust": "0"
                                        , "HQty": "0"
                                        , "HWHCode": ""
                                        , "发货仓库": ""
                                        , "HWHID": ""
                                        , "HMaterSpec": data.产品规格
                                    }
                                );
                            }
                            option.data = rowdata;
                            table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("发生错误!", { icon: 5 });
                    }
                })
            }
            //#endregion
            //#region æ ¹æ®ç‰©æ–™ID获取精度
            function getDecByMaterID(HMaterID) {
                var resultData = {};
WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBackBillEdit.html
@@ -62,6 +62,7 @@
                                                    <select name="HBillSubType" lay-filter="HBillSubType" id="HBillSubType">
                                                        <option value="标准领料" selected="selected">标准领料</option>
                                                        <option value="白坯领料">白坯领料</option>
                                                        <option value="白坯退料">白坯退料</option>
                                                    </select>
                                                </div>
                                            </div>
@@ -135,7 +136,7 @@
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">选单号</label>
                                                <label class="layui-form-label">选单号<label style="color:red"> * </label></label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HSourceBillNo" id="HSourceBillNo" readonly class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HSourceInterID" id="HSourceInterID" class="layui-input" value="" style="float:left;width:150px;">
@@ -204,6 +205,7 @@
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
            var closeType = params[params[3]];  //关闭类型
            var HEntryID = params[params[4]]
        }
        layui.config({
@@ -246,6 +248,9 @@
            }
            else if (OperationType == 3) {//编辑
                set_EditFromGrid(linterid);
            }
            else if (OperationType == 4) {//下推
                setInit_PushBill(linterid);
            }
            else {
                layer.alert("未知操作类型!", { icon: 5 });
@@ -734,10 +739,10 @@
            //保存
            form.on('submit(Saver)', function (data) {
                var refSav = "";
                if (linterid == "" || linterid == null) {
                if (OperationType == 1 || OperationType == 2 || OperationType == 4) {
                    refSav = "Add";
                }
                if (linterid != "" && linterid != null) {
                if (OperationType == 3) {
                    refSav = "Update";
                }
                data.field.HMaker = sessionStorage["HUserName"];//制单人
@@ -907,6 +912,22 @@
                });
            }
            //#region ç”Ÿæˆå•据号
            function createBillNo() {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '1244' },
                    success: function (d) {
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                        $("#HInterID").val(0);
                    }
                });
            }
            //#endregion
            //初始化明细表格
            function set_InitGrid() {
                columns = [
@@ -972,6 +993,125 @@
                });
            }
            //#region ä¸‹æŽ¨é¡µé¢åˆå§‹åŒ–
            function setInit_PushBill(linterid) {
                //生成并设置主表的内码和单据号
                console.log("setInit_PushBill å¼€å§‹æ‰§è¡Œï¼");
                createBillNo();
                //相关文本框信息初始化
                $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                $("#HMaker").val(sessionStorage["HUserName"]);
                $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                //初始化并列设置:子表1
                //set_InitGrid();
                //DisPlay_HideColumn();
                //查询生产订单是否存在
                var ajaxLoad = layer.load();
                var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + "  and hmainid='" + linterid + "' and HEntryID=" + HEntryID;
                $.ajax({
                    url: GetWEBURL() + "/LEMS/MES_Sc_ProcessExchangeBillList_Json",
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (d) {
                        var result = d;
                        console.log(result);
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data[0];
                            console.log('权限判断成功')
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HEmpID": data.HEmpID
                                , "HEmpName": data.业务员
                                , "HDeptID": data.HDeptID
                                , "HDeptName": data.生产车间
                                , "HCusID": data.HEntryCusID
                                , "HCusName": data.客户
                                , "HBillSubType": "白坯退料"
                                //, "HDeptID": data.HDeptID
                                //, "HDeptName": data.生产车间
                                //, "HCusID": data.HCusID
                                //, "HCusName": data.客户
                                //, "HMainSourceInterID": linterid
                                //, "HMainSourceEntryID": HEntryID
                                //, "HMainSourceBillNo": data.单据号
                                /*                                , "HMainSourceBillType": params[params[2]]*/
                                //, "HMaterID": data.HMaterID
                                //, "物料代码": data.产品代码
                                //, "物料名称": data.产品名称
                                //, "源单号": data.单据号
                                //, "源单主内码": data.hmainid
                                //, "源单子内码": data.HEntryID
                            });
                            //组织的值HOrgID变化,重新渲染
                            HOrgIDBar = data.HOrgID;
                            //子表  èµ‹å€¼
                            var rowdata = [];
                            for (var i = 0; i < result.data.length; i++) {
                                rowdata.push(
                                    {
                                        //"HMaterID": result.data[i]["HMaterID"],
                                        //"物料代码": result.data[i]["产品代码"],
                                        //"物料名称": result.data[i]["产品名称"],
                                        //"规格型号": result.data[i]["规格型号"],
                                        //"HUnitID": result.data[i]["HUnitID"],
                                        //"计量单位": result.data[i]["计量单位"],
                                        //"HQty_Old": result.data[i]["生产任务单数量"],
                                        //"HQty_New": result.data[i]["生产任务单数量"],
                                        ////"HDate_Old": formatDate(result.data[i]["原交货日期"]),
                                        ////"HDate_New": formatDate(result.data[i]["新交货日期"]),
                                        "HRemark": "",
                                        //"HSourceInterID": result.data[i]["hmainid"],
                                        //"HSourceEntryID": result.data[i]["HEntryID"],
                                        //"HSourceBillNo": result.data[i]["单据号"],
                                        //"HSourceBillType": result.data[i]["单据类型"]
                                        "HMaterID": data.HMaterID
                                        , "HMaterCode": data.产品代码
                                        , "HMaterName": data.产品名称
                                        , "HSourceBillNo": data.单据号
                                        , "HSourceInterID": data.hmainid
                                        , "HSourceEntryID": data.HEntryID
                                        , "HSourceBillType": params[params[2]]
                                        , "HUnitID": ""
                                        , "HUnitCode": ""
                                        , "HUnitName": ""
                                        , "HQtyMust": ""
                                        , "HQty": ""
                                        , "HPrice": ""
                                        , "HMoney": ""
                                        , "HWHCode": ""
                                        , "HWHName": ""
                                        , "HWHID": ""
                                        , "HMaterSpec": data.产品规格
                                    }
                                );
                            }
                            option.data = rowdata;
                            table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("发生错误!", { icon: 5 });
                    }
                })
            }
            //#endregion
            //编辑
            function set_EditFromGrid(linterid) {
                set_EditForm(linterid);  //编辑获取表头
WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBillLEdit.html
@@ -418,6 +418,7 @@
                var linterid = params[params[1]];//源单id
                var HSouceBillType = params[params[2]];//源单类型
                var closeType = params[params[3]];  //关闭类型
                            var HEntryID = params[params[4]]
            }
            //#endregion
@@ -454,6 +455,9 @@
            }
            else if (OperationType == 3) {//编辑
                set_EditFromGrid(linterid);
            }
            else if (OperationType == 4) {
                setInit_PushBill(linterid)
            }
            else {
                layer.alert("未知操作类型!", { icon: 5 });
@@ -2155,6 +2159,127 @@
            }
            //#endregion
            //#region ä¸‹æŽ¨é¡µé¢åˆå§‹åŒ–
            function setInit_PushBill(linterid) {
                //生成并设置主表的内码和单据号
                console.log("setInit_PushBill å¼€å§‹æ‰§è¡Œï¼");
                get_MAXNum();
                //相关文本框信息初始化
                $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                $("#HMaker").val(sessionStorage["HUserName"]);
                $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                //初始化并列设置:子表1
                //set_InitGrid();
                //DisPlay_HideColumn();
                //查询生产订单是否存在
                var ajaxLoad = layer.load();
                var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + "  and hmainid='" + linterid + "' and HEntryID=" + HEntryID;
                $.ajax({
                    url: GetWEBURL() + "/LEMS/MES_Sc_ProcessExchangeBillList_Json",
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (d) {
                        var result = d;
                        console.log(result);
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data[0];
                            console.log('权限判断成功')
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HEmpID": data.HEmpID
                                , "HEmpName": data.业务员
                                , "HDeptID": data.HDeptID
                                , "HDeptName": data.生产车间
                                , "HCusID": data.HEntryCusID
                                , "HCusName": data.客户
                                , "HBillSubType": "白坯退料"
                                //, "HDeptID": data.HDeptID
                                //, "HDeptName": data.生产车间
                                //, "HCusID": data.HCusID
                                //, "HCusName": data.客户
                                //, "HMainSourceInterID": linterid
                                //, "HMainSourceEntryID": HEntryID
                                //, "HMainSourceBillNo": data.单据号
                                /*                                , "HMainSourceBillType": params[params[2]]*/
                                //, "HMaterID": data.HMaterID
                                //, "物料代码": data.产品代码
                                //, "物料名称": data.产品名称
                                //, "源单号": data.单据号
                                //, "源单主内码": data.hmainid
                                //, "源单子内码": data.HEntryID
                            });
                            //组织的值HOrgID变化,重新渲染
                            HOrgIDBar = data.HOrgID;
                            //子表  èµ‹å€¼
                            var rowdata = [];
                            for (var i = 0; i < result.data.length; i++) {
                                rowdata.push(
                                    {
                                        //"HMaterID": result.data[i]["HMaterID"],
                                        //"物料代码": result.data[i]["产品代码"],
                                        //"物料名称": result.data[i]["产品名称"],
                                        //"规格型号": result.data[i]["规格型号"],
                                        //"HUnitID": result.data[i]["HUnitID"],
                                        //"计量单位": result.data[i]["计量单位"],
                                        //"HQty_Old": result.data[i]["生产任务单数量"],
                                        //"HQty_New": result.data[i]["生产任务单数量"],
                                        ////"HDate_Old": formatDate(result.data[i]["原交货日期"]),
                                        ////"HDate_New": formatDate(result.data[i]["新交货日期"]),
                                        "HRemark": "",
                                        //"HSourceInterID": result.data[i]["hmainid"],
                                        //"HSourceEntryID": result.data[i]["HEntryID"],
                                        //"HSourceBillNo": result.data[i]["单据号"],
                                        //"HSourceBillType": result.data[i]["单据类型"]
                                        "HMaterID": data.HMaterID
                                        , "HMaterCode": data.产品代码
                                        , "HMaterName": data.产品名称
                                        , "HSourceBillNo": data.单据号
                                        , "HSourceInterID": data.hmainid
                                        , "HSourceEntryID": data.HEntryID
                                        , "HSourceBillType": params[params[2]]
                                        , "HUnitID": ""
                                        , "HUnitCode": ""
                                        , "HUnitName": ""
                                        , "HQtyMust": ""
                                        , "HQty": ""
                                        , "HPrice": ""
                                        , "HMoney": ""
                                        , "HWHCode": ""
                                        , "HWHName": ""
                                        , "HWHID": ""
                                        , "HMaterSpec": data.产品规格
                                    }
                                );
                            }
                            option.data = rowdata;
                            table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("发生错误!", { icon: 5 });
                    }
                })
            }
            //#endregion
            //#region æ ¹æ®å·¥è‰ºå•号获取表头信息
            function getMainInfoByHProcExchBillNo() {
                var HProcExchBillNo = $("#HProcExchBillNo").val();
WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBillList.html
@@ -936,7 +936,6 @@
            //#region æ–°å¢ž
            function set_AddNew() {
                debugger
                var content = '../领料出库/Kf_MateOutBillLEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1'
                if (subType) {
                    if (subType == '羊毛染色') {