duhe
2023-11-24 c3631dd1c8e908b478625c209dc59618146cebcd
WebTM/views/ÏúÊÛ¹ÜÀí/ÏúÊÛ¶©µ¥/Add_Edit_Xs_SeOrderBillList.html
@@ -2046,6 +2046,24 @@
            //#region æ‰“印
            function get_PrintReport() {
                //#region åˆ¤æ–­æºå•状态
                var HSourceBillData = "";
                var HSourceBillData = getSourceBillStatus_SeOrderBill();            //获取源单数据
                if (HSourceBillData != "none") {
                    if (HSourceBillData.length == 0) {
                        layer.alert("打印失败!未查询到单据信息!", { icon: 5 });
                        return;
                    } else if (HSourceBillData[0]["状态"] != "已审核") {
                        layer.alert("打印失败!单据状态未为'已审核'状态!", { icon: 5 });
                        return;
                    }
                } else {
                    return;
                }
                //#endregion
                var InterID = $("#HInterID").val();
                $.ajax({
                    type: "GET",
@@ -2082,6 +2100,29 @@
                $("#HBillMoney").val(HBillMoney * 0.5);
            }
            //#endregion
            //#region èŽ·å–æºå•-销售订单单据状态
            function getSourceBillStatus_SeOrderBill() {
                var HSourceBillData = "none";
                var sWhere = " and hmainid = " + $("#HInterID").val();
                $.ajax({
                    url: GetWEBURL() + '/Xs_SeOrderBill/list',
                    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
            //#endregion