llj
4 天以前 7a7f218dbcdca1b51f30b10967d611a7830d38f7
页面获取参数
5个文件已修改
263 ■■■■■ 已修改文件
WebTM/views/基础资料/公用基础资料/Cg_ContractTransportBillList.html 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/Gy_MaterialPackingRelationList.html 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/基础资料/Gy_CarTypeList.html 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/采购基础资料/Gy_Supplier.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldScrapOutBill.html 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Cg_ContractTransportBillList.html
@@ -216,7 +216,10 @@
            //不需要显示的字段 å¯æ‰©å±•
            var titleData = ["HInterID", "HEntryID", "HBillStatus", "HMaterID", "HPreventErrMouldID","HOrgID"];
            //#endregion
            var params = getUrlVars();
            var HEndAddr = params[params[0]];
            var HOrgName = params[params[1]];
            var HBeginAddr = params[params[2]];
            //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
            //过滤条件的classç±»
@@ -267,11 +270,11 @@
                        break;
                    //审核按钮      ï¼ˆ1:审核、2:反审核)
                    case 'btn-Audit':
                        set_CheckBills(1);
                        set_CheckBills(0);
                        break;
                    //反审核按钮
                    case 'btn-DeAudit':
                        set_CheckBills(2);
                        set_CheckBills(1);
                        break;
                    //关闭按钮        ï¼ˆ1:关闭、2:反关闭)
                    case 'btn-Close':
@@ -630,7 +633,12 @@
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HBeginAddr!= undefined ) {
                    sWhere += " and å®¡æ ¸äºº!='' and ç›®çš„地  =" + HBeginAddr ;
                }
                if (HEndAddr != undefined ) {
                    sWhere += " and å®¡æ ¸äºº!=''  and  å§‹å‘地 =" + HEndAddr ;
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
@@ -806,7 +814,7 @@
                        $.ajax({
                            url: GetWEBURL() + '/Cg_ContractTransportBillEdit/AuditCg_ContractTransportBillEdit',
                            type: "GET",
                            data: { "HInterID": InterID, "Type": nums, "user": sessionStorage["HUserName"] },
                            data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] },
                            success: function (result) {
                                if (result.count == 1) {
                                    layer.msg(result.Message, { icon: 1 });
@@ -1128,7 +1136,18 @@
                }
            }
            //#region èŽ·å–å‚æ•°
            function getUrlVars() {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for (var i = 0; i < hashes.length; i++) {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            }
        //#endregion
            //读取方案
            function set_ReadScheme() {
                var HIsClose_Manual = false;
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Gy_MaterialPackingRelationList.html
@@ -219,6 +219,9 @@
            window.HDefaultFilter = "";                                                       //是否已经选择了过滤方案(全局变量)
            window.HInterID_Choose = 0;                                                       //选择的过滤方案内码(全局变量)
            //#endregion
            var params = get_UrlVars();
            var hmaterid = params[params[0]];
            var orgid = params[params[1]];
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //#region åˆå§‹åŒ–界面
@@ -570,6 +573,12 @@
                }
                if (HOrgID) {
                    sWhere += " and HOrgID = '" + HOrgID + "'";
                }
                if (orgid != undefined) {
                    sWhere += " and HOrgID = '" + orgid + "'";
                }
                if (hmaterid != undefined) {
                    sWhere += " and HMaterID = '" + hmaterid + "'";
                }
                get_Display(sWhere);
@@ -1113,7 +1122,16 @@
                }
            }
            function get_UrlVars() {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for (var i = 0; i < hashes.length; i++) {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            }
            //读取方案
            function set_ReadScheme() {
                var HIsClose_Manual = false;
WebTM/views/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_CarTypeList.html
@@ -43,7 +43,7 @@
                                        <input type="text" class="layui-input" name="HName" id="HName">
                                    </div>
                                </div>
<<<<<<< HEAD
                                <div class="layui-inline">
                                    <label class="layui-form-label">组织名称</label>
                                    <div class="layui-input-block" style="width: 185px;">
@@ -53,10 +53,10 @@
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
=======
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit=""
                                    lay-filter="btnSearch" id="btnSearch">
>>>>>>> cf4a059eee9a05b9b181e9970167f9726379c004
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit=""
@@ -144,7 +144,9 @@
            //不需要显示的字段 å¯æ‰©å±•
            var titleData = ["HItemID"];
            //#endregion
            var params = getUrlVars();
            var Type = params[params[0]];
            var HOrgName = params[params[1]];
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //初始化界面
@@ -443,8 +445,14 @@
                if (HName) {
                    sWhere += " and è½¦åž‹åç§° like '%" + HName + "%'";
                }
                if (HOrgName != undefined) {
                    sWhere += " and HUSEORGID = " + HOrgName +" and å®¡æ ¸äºº!='' ";
                }
                if (HUSEORGID && HUSEORGID != "0") {
                    sWhere += " and HUSEORGID = " + HUSEORGID;
                }
                if (Type != undefined) {
                    sWhere += " and HMaxVolume >= " + Type;
                }
                sWhere += addSWhereByOpenType();
@@ -627,7 +635,18 @@
                }
            }
            //#endregion
            //#region èŽ·å–å‚æ•°
            function getUrlVars() {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for (var i = 0; i < hashes.length; i++) {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            }
        //#endregion
            //#region éšè—åˆ—设置
            function get_HideColumn() {
                var colName = "";
WebTM/views/»ù´¡×ÊÁÏ/²É¹º»ù´¡×ÊÁÏ/Gy_Supplier.html
@@ -269,6 +269,7 @@
            var size = 50;
            var params = getUrlVars();
            var Type = params[params[0]];
            var HOrgName = params[params[1]];
            var HSupTypeID = 0;
            var HSupClsName = '';
            //#endregion
@@ -776,6 +777,9 @@
                if (HName) {
                    sWhere += " and ä¾›åº”商名称 like '%" + HName + "%'";
                }
                if (HOrgName != undefined) {
                    sWhere += " and å®¡æ ¸äºº!='' and ç»„织名称 like '%" + HOrgName + "%'";
                }
                get_DisplayPage(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldScrapOutBill.html
@@ -64,24 +64,44 @@
                                                <label class="layui-form-label">单据号</label>
                                                <div class="layui-input-inline">
                                                    <input class="layui-input" name="HBillNo" lay-verify="HBillNo"
                                                        id="HBillNo" readonly="readonly" autocomplete="off">
                                                           id="HBillNo" readonly="readonly" autocomplete="off">
                                                    <input id="HInterID" name="HInterID" type="hidden" />
                                                    <input id="HMaker" name="HMaker" type="hidden" /><!--制单人-->
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">源单类型</label>
                                                <div class="layui-input-inline">
                                                    <select name="BillType" id="BillType" lay-filter="BillType" style="width: 180px; ">
                                                            <option value="3823">器具报废申请单</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">源单单号</label>
                                                <div class="layui-input-inline">
                                                    <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" class="layui-input" value="0" style="float:left;width:150px;">
                                                    <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="HMainSource" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">日期</label>
                                                <div class="layui-input-inline">
                                                    <input class="layui-input" name="HDate" id="HDate"
                                                        autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd"
                                                        placeholder="yyyy-MM-dd">
                                                           autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd"
                                                           placeholder="yyyy-MM-dd">
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">内部单据号</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HInnerBillNo" id="HInnerBillNo"
                                                        class="layui-input">
                                                           class="layui-input">
                                                </div>
                                            </div>
                                        </div>
@@ -194,8 +214,11 @@
                                            <div class="layui-inline custom-hidden">
                                                <label class="layui-form-label">源单类型</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HSourceBillType" id="HSourceBillType"
                                                        class="layui-input" value="" style="float:left;width:100%;">
                                                    <!--<input type="text" name="HSourceBillType" id="HSourceBillType"
                                                        class="layui-input" value="" style="float:left;width:100%;">-->
                                                    <select>
                                                        <option value="3823">器具报废申请单</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="layui-inline custom-hidden">
@@ -940,7 +963,147 @@
            }
            //#endregion
            //#region é€‰æ‹©æºå•按钮
            form.on('submit(HMainSource)', function () {
                get_checkMainSource();
            });
            function get_checkMainSource() {
                $("#BillType").val("3823")
                var url = "";
                var HSourceTitle = "";
                if ($("#BillType").val() == "3823") {
                    url = "../../模治具管理/模治具仓库管理/Sc_MouldScrapRequestBillList.html?openType=2";
                    HSourceTitle = "器具报废申请单";
                } else {
                    return layer.msg('未查询到所选源单类型相关单据信息!');
                }
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim"   //加上边框
                    , title: HSourceTitle + '列表'//标题
                    , closeBtn: 1               //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2                  //弹出动画
                    , area: ["90%", "90%"]      //窗体大小
                    , maxmin: true              //设置最大最小按钮是否显示
                    , content: [url, 'yes']
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //按钮一  çš„回调
                        var iframeWindow = window["layui-layer-iframe" + index];                //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");    //获取选中的数据
                        if (checkStatus.data.length === 0) {
                            return layer.msg("请选择数据");
                        }
                        //var HSupTypeID_Temp = checkStatus.data[0]["HSupTypeID"];
                        //for (var i = 0; i < checkStatus.data.length; i++) {
                        //    if (checkStatus.data[i]["HSupTypeID"] != HSupTypeID_Temp) {
                        //        var err = "所选单据对应往来类型必须一致!";
                        //        layer.alert(err, { icon: 5 });
                        //        return;
                        //    }
                        //}
                        //获取源单数据
                        var dataArray = [];
                        for (var i = 0; i < checkStatus.data.length; i++) {
                            var temp = GetSourceBillList(checkStatus.data[i]["hmainid"], checkStatus.data[i]["hsubid"], checkStatus.data[i]["HBillType"]);
                            if (temp != "none") {
                                dataArray.push(temp);
                            } else {
                                var err = "未查询到源单信息,请刷新源单列表后重新选择对应源单!";
                                layer.alert(err, { icon: 5 });
                                return;
                            }
                        }
                        setInitBySourceBill(dataArray);
                        layer.close(index); //关闭弹窗  å®ƒèŽ·å–çš„å§‹ç»ˆæ˜¯æœ€æ–°å¼¹å‡ºçš„æŸä¸ªå±‚ï¼Œå€¼æ˜¯ç”±layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                })
            }
            //#endregion
            //#region  èŽ·å–æºå•æ•°æ®
            function GetSourceBillList(HSourceInterID, HSourceEntryID, HSourceBillType) {
                var res = "none";
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Sc_MouldScrapOutHouseBill/GetSourceBill_MouldScrapOutHouse_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": HSourceInterID, "HEntryID": HSourceEntryID, "HBillType": HSourceBillType },
                    success: function (result) {
                        if (result.count == 1) {
                            res = result.data[0];
                        } else {
                            res = "none";
                        }
                    },
                    error: function () {
                        res = "none";
                        layer.alert("发生错误!", { icon: 5 });
                    }
                });
                return res;
            }
            //#endregion
            //#region  å†™å…¥æºå•数据
            function setInitBySourceBill(dataArray) {
                var data = dataArray[0];
                form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                     "HDeptID": data.HDeptID
                    , "HDeptName": data.部门
                });
                //子表  èµ‹å€¼
                var rowdata = [];
                for (let i = 0; i < dataArray.length; i++) {
                    rowdata.push(
                        {
                            "HMaterID": dataArray[i].HMaterID == null ? 0 : dataArray[i].HMaterID
                            , "HMaterCode": dataArray[i].模具代码 == null ? "" : dataArray[i].模具代码
                            , "HMaterName": dataArray[i].模具 == null ? "" : dataArray[i].模具
                            , "HUnitID": dataArray[i].HUnitID == null ? 0 : dataArray[i].HUnitID
                            , "HUnitCode": dataArray[i].计量单位代码 == null ? "" : dataArray[i].计量单位代码
                            , "HUnitName": dataArray[i].计量单位 == null ? "" : dataArray[i].计量单位
                            , "HBatchNo": ""
                            , "HQty": dataArray[i].HQty == null ? 0 : dataArray[i].HQty
                            , "HWHID": dataArray[i].HWHID == null ? 0 : dataArray[i].HWHID
                            , "HWHCode": dataArray[i].子报废仓库代码 == null ? "" : dataArray[i].子报废仓库代码
                            , "HWHName": dataArray[i].子报废仓库 == null ? "" : dataArray[i].子报废仓库
                            , "HSPID": "0"
                            , "HSPCode": ""
                            , "HSPName": ""
                            , "HSourceInterID": dataArray[i].hmainid == null ? 0 : dataArray[i].hmainid
                            , "HSourceEntryID": dataArray[i].hsubid == null ? 0 : dataArray[i].hsubid
                            , "HSourceBillType": dataArray[i].HBillType == null ? "" : dataArray[i].HBillType
                            , "HSourceBillNo": dataArray[i].单据号 == null ? "" : dataArray[i].单据号
                            , "HRemark": ""
                            , "HPropertyID": "0"
                            , "HSecUnitID": "0"
                            , "HSecUnitRate": "0"
                            , "HDesignLife": "0"
                            , "HLeaveLife": "0"
                            , "HUseLife": "0"
                        }
                    )
                }
                option.data = rowdata;
                table.render(option);
            }
            //#endregion
            //#region  æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //初始化表单插件
@@ -992,6 +1155,10 @@
                    , { field: 'HSPName', title: '仓位名称', style: uneditableColStyle, width: 100 }
                    , { field: 'HRemark', title: '备注', edit: 'text', width: 100 }
                    , { field: 'HStockOrgID', title: 'HStockOrgID', width: 100, hide: true }
                    , { field: 'HSourceBillNo', title: 'HSourceBillNo', width: 100, hide: true }
                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 100, hide: true }
                    , { field: 'HSourceBillType', title: 'HSourceBillType', width: 100, hide: true }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ];
                option = {