duhe
2025-03-19 05f0aba1b1733574d366a24d8d55e00773cbda76
WebTM/views/¹«¹²Ò³Ãæ/Kf_SourceBillEditDlg_PDA.html
@@ -46,6 +46,14 @@
                                <input type="text" name="HMater" id="HMater" lay-verify="HMater" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-xs3">
                                <label class="layui-form-label" style="width:60px;padding-left:0px;">关联项</label>
                            </div>
                            <div class="layui-col-xs9">
                                <input type="text" name="HCustom" id="HCustom" lay-verify="HCustom" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                            </div>
                        </div>
                        <div class="layui-row" style="margin-top: 10px; margin-bottom: 10px; float: right;">
                            <button type="button" lay-submit="" lay-filter="cmdQuery" class="layui-btn" id="cmdQuery">查询</button>
                            <button type="button" lay-submit="" lay-filter="cmdOK" class="layui-btn" id="cmdOK">返回</button>
@@ -93,6 +101,7 @@
            var HMaker = sessionStorage["HUserName"]
            var HSourceBillNo = "";
            var HMater = "";
            var HCustom = "";
            var listOption = [];
            var columns = "";
            var HModName = "Kf_SourceBillEditDlg_PDA";
@@ -186,6 +195,7 @@
            form.on('submit(cmdQuery)', function () {
                HSourceBillNo = $("#HSourceBillNo").val();
                HMater = $("#HMater").val();
                HCustom = $("#HCustom").val();
                //显示物料列表信息
                DisBillEntryList();
            });
@@ -219,15 +229,16 @@
            //#region æ˜¾ç¤ºç‰©æ–™åˆ—表信息
            function DisBillEntryList() {
                layer.load(3)
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + '/WEBSController/GetSourceBillList_Json',
                    async: true,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HBillType": HBillType, "HSourceBillType": HSourceBillType, "HStockOrgID": HStockOrgID, "HSourceBillNo": HSourceBillNo, "HMater": HMater },
                    data: { "HBillType": HBillType, "HSourceBillType": HSourceBillType, "HStockOrgID": HStockOrgID, "HSourceBillNo": HSourceBillNo, "HMater": HMater, "HCustom": HCustom },
                    success: function (result) {
                        var data = [];
                        var col = [];
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in result.list) {
                                //动态获取列表所有列名
@@ -263,9 +274,15 @@
                            table.render(listOption);
                        }
                        else {
                            listOption.cols = [columns];
                            listOption.data = result.data;
                            table.cache['dj-table'] = null;         //清空表格缓存数据
                            listOption.cols = [[
                                { field: '日期', title: '日期', width: 100 }
                                , { field: '单据号', title: '单据号', width: 100 }
                                , { field: '物料代码', title: '物料代码', width: 100 }
                                , { field: '物料名称', title: '物料名称', width: 100 }
                                , { field: '规格型号', title: '规格型号', width: 100 }
                                , { field: '数量', title: '数量', width: 100 }
                            ]];
                            listOption.data = data;
                            table.render(listOption);
                            //layer.msg(result.Message);
                            //layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
@@ -273,6 +290,7 @@
                    },
                    complete: function (XHR, TS) { XHR = null }//回收资源
                });
                layer.closeAll("loading");
            }
            //#endregion