yusijie
2024-03-15 53b2c932f1fe0624221e3fdff9c8cbba11b2e9af
WebTM/views/WMSɨÂëÄ£¿é/ÏúÊÛ³ö¿â/Kf_SellOutBillList_QiaoYi_PDA.html
@@ -54,11 +54,22 @@
                                            <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-col-xs2">
                                            <label class="layui-form-label" style="width:60px;padding-left:0px;">客户</label>
                                        </div>
                                        <div class="layui-col-xs10">
                                            <input type="text" name="HCusName" id="HCusName" lay-verify="HCusName" 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;">
                                        <div class="layui-col-xs6">
                                        <div class="layui-col-xs3">
                                            <button type="button" lay-submit="" style="width: 60px; float: right" lay-filter="cmdReSearch" class="layui-btn" id="cmdReSearch">重置</button>
                                        </div>
                                        <div class="layui-col-xs3">
                                            <button type="button" lay-submit="" style="width: 60px; float: right" lay-filter="cmdQuery" class="layui-btn" id="cmdQuery">查询</button>
                                        </div>
                                        <div class="layui-col-xs4">
                                        <div class="layui-col-xs3">
                                            <button type="button" lay-submit="" style="width: 60px; float: right" lay-filter="cmdRescind" class="layui-btn" id="cmdRescind">撤销</button>
                                        </div>
                                    </div>
@@ -119,6 +130,7 @@
        var HStockOrgID = sessionStorage["OrganizationID"]  //组织ID
        var HBillNo = $('#HBillNo').val()
        var HSourceBillNo = $('#HSourceBillNo').val()
        var sWhere = "";
        var listOption = [];    //缓存列表
        var Uploadedoption = [];   //已上传列表
        var columns = "";
@@ -195,7 +207,8 @@
                elem: '#dj-table'
                //, toolbar: '#toolbarDemo'
                //, totalRow: true
                , height: 'full-50'
                , height: 'full-150'
                , page: true //开启分页
                , cellMinWidth: 90
                , limit: 50
            };
@@ -205,7 +218,8 @@
                elem: '#Uploaded-table'
                //, toolbar: '#toolbarDemo'
                //, totalRow: true
                , height: 'full-50'
                , height: 'full-280'
                , page: true //开启分页
                , cellMinWidth: 90
                , limit: 50
            };
@@ -316,9 +330,9 @@
                async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                data: { "HBillType": HBillType, "HMaker": HMaker, "HStockOrgID": HStockOrgID },
                success: function (result) {
                    var data = [];
                    var col = [];
                    if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                        var data = [];
                        var col = [];
                        //给空的数组赋值
                        for (var key in result.list) {
                            //动态获取列表所有列名
@@ -359,6 +373,17 @@
                        table.render(listOption);
                    }
                    else {
                        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;
                        //listOption.totalRow = true;
                        table.render(listOption);
                        //layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
                }
@@ -380,11 +405,30 @@
        //#endregion
        //#region é‡ç½®æŒ‰é’®
        form.on('submit(cmdReSearch)', function (data) {
            //清空过滤条件
            set_ClearQuery();
        });
        //重置过滤条件
        function set_ClearQuery() {
            $("#HBillNo").val("");//单据号
            $("#HSourceBillNo").val("");
            $("#HCusName").val("");
            sWhere = "";
        }
        //#endregion
        //#region æŸ¥è¯¢åŠŸèƒ½æŽ§ä»¶
        form.on('submit(cmdQuery)', function () {
            HBillNo = $("#HBillNo").val();
            HSourceBillNo = $("#HSourceBillNo").val();
            var HCusName = $("#HCusName").val();
            sWhere = " and HCusName like ''%" + HCusName + "%''";
            //显示已上传列表信息
            DisUploadedList();
        });
@@ -393,13 +437,13 @@
        function DisUploadedList() {
            $.ajax({
                type: "GET",
                url: GetWEBURL() + '/WEBSController/GetKf_ICStockBillQueryList_User_Json',
                url: GetWEBURL() + '/WEBSController/GetKf_ICStockBillList_Json',
                async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                data: { "HBillType": HBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo, "HMaker": HMaker, "HStockOrgID": HStockOrgID },
                data: { "HBillType": HBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo, "HMaker": HMaker, "HStockOrgID": HStockOrgID, "sWhere": sWhere },
                success: function (result) {
                    var data = [];
                    var col = [];
                    if (result.count == 1) { 
                        var data = [];
                        var col = [];
                        //给空的数组赋值
                        for (var key in result.list) {
                            //动态获取列表所有列名
@@ -440,6 +484,20 @@
                        table.render(Uploadedoption);
                    }
                    else {
                        Uploadedoption.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 }
                            , { field: '数量', title: '数量', width: 100 }
                            , { field: '源单单号', title: '源单单号', width: 100 }
                            , { field: '组织', title: '组织', width: 100 }
                        ]];
                        Uploadedoption.data = data;
                        //Uploadedoption.totalRow = true;
                        table.render(Uploadedoption);
                        //layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
                }