1
duhe
2024-01-21 98a7f2df5a39596b314566f3493fefcdc09e9578
WebTM/views/²É¹º¹ÜÀí/ÊÕÁÏ֪ͨµ¥/Add_Edit_Cg_POInStockBillList.html
@@ -151,7 +151,9 @@
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">源单类型</label>
                                            <div class="layui-input-inline">
                                                <input class="layui-input" name="HSourceBillType" id="HSourceBillType" value="0">
                                                <select name="HSourceBillType" id="HSourceBillType"  lay-verify="HSourceBillType">
                                                    <!--动态渲染源单类型-->
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
@@ -370,7 +372,8 @@
            // åˆå§‹åŒ–界
            set_InitGrid();
            //获取源单类型
            HSourceBillType();
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
@@ -1148,19 +1151,37 @@
                })
            }
            //动态弹出页面
            function getSupType() {
                var type = $("#HSourceBillType").val();
                switch (type) {
                    case '1102':
                        return { url:"../../采购管理/采购订单/Cg_POOrderBillList.html",name:"采购订单"};
                        break;
                }
            }
            //表头信息选择单据弹窗
            form.on('submit(XDHList)', function () {
                if ($("#HSourceBillType").val() == 0 || $("#HSourceBillType").val() == null) {
                    return layer.msg('请选择单据类型');
                }
                //页面层-自定义
                var url = getSupType().url;
                url = encodeURI(url);
                //alert(url);
                //页面层-自定义
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "采购入库单列表"  //标题
                    , title: '' + getSupType().name + '列表'  //标题
                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2 //弹出动画
                    , area: ["90%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ["../../采购管理/采购订单/Cg_POOrderBillList.html", "yes"]
                    , content: [url, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //按钮一  çš„回调
@@ -1181,19 +1202,21 @@
                        var NowNum = 0;
                        NowNum = option.data.length;
                        var j = 0;
                        for (var i = 0; i < ProcessNumber.length; i++) {
                            option.data.push({
                                "HMaterID": checkStatus.data[j].HMaterID, "物料代码": checkStatus.data[j].物料代码, "物料名称": checkStatus.data[j].物料名称, "规格型号": checkStatus.data[j].规格型号,
                                "HUnitID": checkStatus.data[j].HUnitID, "计量单位": checkStatus.data[j].计量单位,
                                "HQty": checkStatus.data[j].数量, "HPrice": checkStatus.data[j].单价,
                                "HMoney": checkStatus.data[j].金额, "HTaxPrice": checkStatus.data[j].含税单价,  "HTaxRate": checkStatus.data[j].税率, "HTaxMoney": checkStatus.data[j].税额,
                                "HSourceBillNo": checkStatus.data[j].单据号, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid,
                            })
                            j++;
                        if (getSupType().name=="采购订单") {
                            var j = 0;
                            for (var i = 0; i < ProcessNumber.length; i++) {
                                option.data.push({
                                    "HMaterID": checkStatus.data[j].HMaterID, "物料代码": checkStatus.data[j].物料代码, "物料名称": checkStatus.data[j].物料名称, "规格型号": checkStatus.data[j].规格型号,
                                    "HUnitID": checkStatus.data[j].HUnitID, "计量单位": checkStatus.data[j].计量单位,
                                    "HQty": checkStatus.data[j].数量, "HPrice": checkStatus.data[j].单价,
                                    "HMoney": checkStatus.data[j].金额, "HTaxPrice": checkStatus.data[j].含税单价, "HTaxRate": checkStatus.data[j].税率, "HTaxMoney": checkStatus.data[j].税额,
                                    "HSourceBillNo": checkStatus.data[j].单据号, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid,
                                })
                                j++;
                            }
                            table.render(option);
                            layer.close(index);//关闭弹窗
                        }
                        table.render(option);
                        layer.close(index);//关闭弹窗
                    }
                });
@@ -1274,6 +1297,33 @@
            }
            //#endregion
            //#region èŽ·å–æºå•ç±»åž‹
            function HSourceBillType() {
                var HName = '收料通知单';
                //获取登录页组织列
                $.ajax({
                    type: "get",
                    async: false,
                    data: { "HName": HName },
                    url: GetWEBURL() + "/Web/GetHSourceBillType",
                    success: function (result) {
                        var HSourceBillTypes = "";
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data;
                            for (var i = 0; i < data.length; i++) {
                                HSourceBillTypes += '<option  style="color:blue;" value="' + data[i].HSourceBillType + '">' + data[i].HSourceBillTypeName + '</option>';
                            }
                            $("#HSourceBillType").append(HSourceBillTypes);
                            form.render('select');
                        }
                    }
                })
            }
            //#endregion
            //#endregion