WebTM/views/²É¹º¹ÜÀí/Ó¦¸¶µ¥/Cg_PayableBillQuery.html
@@ -2,7 +2,7 @@
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>采购订单查询</title>
    <title>应付单查询</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@@ -87,13 +87,6 @@
                                                <input type="text" class="layui-input ForFilteringSchemes" name="HSupName" id="HSupName" style="width:190px;">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">单据号</label>
                                            <div class="layui-input-block">
                                                <input type="text" class="layui-input ForFilteringSchemes" name="HBillno2" id="HBillno2" style="width:190px;">
                                            </div>
                                        </div>
                                        <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px">重新同步</button>
                                    </div>
                                    <div class="layui-inline">
                                        <div class="layui-row" style="margin-top:5px">
@@ -190,7 +183,6 @@
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="print"><i class="layui-icon layui-icon-print"></i>打印</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>反审核</button>
@@ -210,11 +202,11 @@
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>读取方案</button>
                            </div>
                        </script>
                        <table class="" id="mainTableSub" lay-filter="mainTableSub"></table>
                        <table class="" id="mainTableSub" lay-filter="mainTableSub" style="margin-top:35px"></table>
                        <script type="text/html" id="toolbarDemoSub">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CloseRow" id="set_CloseRow"><i class="layui-icon layui-icon-form"></i>行关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CancelCloseRow" id="set_CancelCloseRow"><i class="layui-icon layui-icon-form"></i>行反关闭</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CloseRow" id="set_CloseRow"><i class="layui-icon layui-icon-form"></i>行关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CancelCloseRow" id="set_CancelCloseRow"><i class="layui-icon layui-icon-form"></i>行反关闭</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumnSub" id="HideColumnSub"><i class="layui-icon layui-icon-form"></i>列设置</button>
                            </div>
                        </script>
@@ -244,11 +236,11 @@
            var sWhere = "";
            var option = [];
            var optionSub = [];
            var HModName = "Cg_POOrderBillQuery";
            var HModNameSub = "Cg_POOrderBillQuerySub";
            var HBillType = "1102";
            var HModName = "Cg_PayableBillQuery";
            var HModNameSub = "Cg_PayableBillQuerySub";
            var HBillType = "1114";
            //#region ã€åŠ¨æ€èŽ·å–æ¨¡å—åç§°ã€‘
            var HModuleType = "1102";
            var HModuleType = "1114";
            //通过单据类型,从数据库动态获取单据模块命名,引用js文件 PageTitle.js
            var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
            //#endregion
@@ -262,7 +254,7 @@
            //过滤条件的classç±»
            var HClassTag = "ForFilteringSchemes";
            //模块名称(中文版) æ¯ä¸ªæ¨¡å—页面都需要修改
            window.HModuleName = "采购订单查询";
            window.HModuleName = "应付单查询";
            //是否已经选择了过滤方案(全局变量)
            window.HDefaultFilter = "";
            //选择的过滤方案内码(全局变量)
@@ -320,21 +312,21 @@
                    //驳回
                    case 'set_RejectCheck_Flow': set_RejectCheck_Flow();
                        break;
                    //关闭按钮        ï¼ˆ1:关闭、2:反关闭)
                    //关闭按钮        ï¼ˆ0:关闭、1:反关闭)
                    case 'btn-Close':
                        set_CloseBill(1);
                        set_CloseBill(0);
                        break;
                    //反关闭按钮
                    case 'btn-DeClose':
                        set_CloseBill(2);
                        set_CloseBill(1);
                        break;
                    //作废按钮        ï¼ˆ1:作废、2:反作废)
                    //作废按钮        ï¼ˆ0:作废、1:反作废)
                    case 'btn-Drop':
                        set_DropBill(1);
                        set_DropBill(0);
                        break;
                    //反作废按钮
                    case 'btn-DeDrop':
                        set_DropBill(2);
                        set_DropBill(1);
                        break;
                    //退出
                    case 'get_Exit': Pub_Close(2);
@@ -345,7 +337,7 @@
                    //按钮设置
                    case 'set_HideButton':
                        var btns = document.getElementsByTagName("button");     //获取本页所有按钮对象
                        var HBillType = "1102";
                        var HBillType = "1114";
                        get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
                        break;
                    //保存方案
@@ -372,12 +364,6 @@
            });
            //表格点击事件
            //重新同步按钮
            form.on('submit(btnResCnz)', function (data) {
                set_ResCnz();
            });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
@@ -396,7 +382,7 @@
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: './Cg_POOrderBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                        , content: './Cg_PayableBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                        , resize: false,
                        end: function () {
                            get_FastQuery(table, option);
@@ -469,102 +455,7 @@
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , cols: [[
                        { type: 'checkbox', fixed: 'left', totalRowText: '合计' }
                        ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                        , { field: '日期', title: '日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '单据号', title: '单据号', width: 150, }
                        , { field: '状态', title: '状态', width: 100, sort: true }
                        , { field: 'HBillType', title: 'HBillType', hide: true, sort: true }
                        , { field: '行状态', title: '行状态', width: 125, sort: true }
                        , { field: '供应商', title: '供应商', width: 150 }
                        , { field: '业务员', title: '业务员', width: 100 }
                        //, { field: 'HBillType', title: 'HBillType', hide: true }
                        //, { field: 'HSupID', title: 'HSupID', hide: true }
                        //, { field: '业务状态', title: '业务状态', width: 100, hide: true }
                        , { field: '分配状态', title: '分配状态', width: 100 }
                        , { field: '发布状态', title: '发布状态', width: 100 }
                        , { field: '供应商协同状态', title: '供应商协同状态', width: 135 }/*物料代码,物料名称,规格型号,批号,数量,单位,源单单号*/
                        , { field: '反馈状态', title: '供应商反馈状态', width: 135 }
                        , { field: '物料编码', title: '物料编码', width: 120 }
                        , { field: '物料代码', title: '物料代码', width: 130 }
                        , { field: '旧物料编码', title: '旧物料编码', width: 130 }
                        , { field: '物料名称', title: '物料名称', width: 130 }
                        , { field: '数量', title: '订单数量', width: 100, totalRow: true }
                        , { field: '打印条码数量', title: '打印条码数量', width: 120, totalRow: true  }
                        /* å®‰ç‘žæ–°å¢žå­—段 begin */
                        , { field: '可打印条码数量', title: '可打印条码数量', width: 120, totalRow: true}
                        /* å®‰ç‘žæ–°å¢žå­—段 end */
                        , { field: '关联数量', title: '已发货数量', width: 120, totalRow: true}
                        , { field: '未关联数量', title: '可发货数量', width: 120, totalRow: true}
                        /* å®‰ç‘žæ–°å¢žå­—段 begin */
                        , { field: '退料数量', title: '退料数量', width: 120, totalRow: true}
                        , { field: '实收数量', title: '实收数量', width: 120, totalRow: true}
                        , { field: '入库数量', title: '入库数量', width: 120, totalRow: true}
                        , { field: '剩余入库数量', title: '剩余入库数量', width: 120, totalRow: true}
                        , { field: '剩余收料数量', title: '剩余收料数量', width: 120, totalRow: true}
                        /* å®‰ç‘žæ–°å¢žå­—段 end */
                        , { field: '完成状态', title: '完成状态', width: 100 }
                        , { field: 'HUnitID', title: 'HUnitID', hide: true }
                        , { field: '规格型号', title: '规格型号', width: 100 }
                        //, { field: 'HUnitID', title: 'HUnitID', hide: true }  é‡å¤
                        , { field: '计量单位代码', title: '计量单位代码', width: 120 , hide: true }
                        , { field: '计量单位', title: '计量单位', width: 100 }
                        , { field: '批号', title: '批号', width: 100 }
                        , { field: '数量', title: '数量', width: 100, totalRow: true }
                        , { field: '源单单号', title: '源单单号', width: 100 }
                        //, { field: '供应商代码', title: '供应商代码', width: 120, hide: true}
                        //, { field: '业务员代码', title: '业务员代码', width: 100, hide: true}
                        //, { field: 'HPriority', title: 'HPriority', width: 100, hide: true }
                        , { field: '优先级', title: '优先级', width: 100 }
                        , { field: '交货地点', title: '交货地点', width: 100}
                        , { field: 'HPSStyleID', title: 'HPSStyleID', hide: true }
                        , { field: '采购方式代码', title: '采购方式代码', width: 120, hide: true }
                        , { field: '采购方式', title: '采购方式', width: 100}
                        , { field: 'HSSID', title: 'HSSID', hide: true }
                        , { field: '结算方式代码', title: '结算方式代码', width: 120}
                        , { field: '结算方式', title: '结算方式', width: 100}
                        , { field: '结算日期', title: '结算日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.结算日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: 'HCurID', title: 'HCurID', hide: true }
                        , { field: '币别代码', title: '币别代码', width: 100, hide: true }
                        , { field: '币别', title: '币别', width: 100}
                        , { field: '汇率', title: '汇率', width: 100}
                        , { field: 'HDeptID', title: 'HDeptID', hide: true }
                        , { field: '部门代码', title: '部门代码', width: 100, hide: true }
                        , { field: '部门', title: '部门', width: 100}
                        , { field: 'HManagerID', title: 'HManagerID', hide: true }
                        , { field: '主管代码', title: '主管代码', width: 100, hide: true }
                        , { field: '主管', title: '主管', width: 100}
                        , { field: 'HEmpID', title: 'HEmpID', hide: true }
                        , { field: '摘要', title: '摘要', width: 100 }
                        , { field: 'HWHID', title: '主表仓库ID', width: 120, hide: true}
                        , { field: '仓库', title: '主表仓库', width: 100, hide: true}
                        , { field: '表头备注', title: '表头备注', width: 100}
                        , { field: 'hsubid', title: 'hsubid', hide: true }
                        , { field: 'HMaterID', title: 'HMaterID', hide: true }
                        , { field: '单价', title: '单价', width: 100}
                        , { field: '金额', title: '金额', width: 100, totalRow: true }
                        , { field: '税率', title: '税率', width: 100}
                        , { field: '税额', title: '税额', width: 100}
                        , { field: '折扣率', title: '折扣率', width: 100}
                        , { field: '价税合计', title: '价税合计', width: 100}
                        , { field: '交货日期', title: '交货日期', width: 120, templet: "<div>{{d.交货日期 ==null ?'':layui.util.toDateString(d.交货日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '计划跟踪号', title: '计划跟踪号', width: 100}
                        , { field: '表体备注', title: '表体备注', width: 100}
                        , { field: '制单人', title: '制单人', width: 100}
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '审核人', title: '审核人', width: 100}
                        , { field: '审核日期', title: '审核日期', width: 120, templet: "<div>{{d.审核日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '修改人', title: '修改人', width: 100}
                        , { field: '修改日期', title: '修改日期', width: 120, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '关闭人', title: '关闭人', width: 100}
                        , { field: '关闭日期', title: '关闭日期', width: 120, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '行关闭人', title: '行关闭人', width: 125, sort: true }
                       , { field: '行关闭日期', title: '行关闭日期', width: 200, templet: "<div>{{d.行关闭人 == ''?'':layui.util.toDateString(d.行关闭日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '作废人', title: '作废人', width: 100}
                        , { field: '作废日期', title: '作废日期', width: 120, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                ]]
                    , cols: [[]]
                    , done: function (res, curr, count) {
                        soulTable.render(this);
@@ -574,8 +465,8 @@
                optionSub = {
                    elem: '#mainTableSub'
                    , toolbar: '#toolbarDemoSub'
                    , height: 'full-500'
                    , page: true
                    //, height: 'full-500'
                    , page: false
                    , totalRow: true
                    , cellMinWidth: 90
                    , limit: 50
@@ -591,8 +482,9 @@
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Cg_POOrderBill/QueryList',
                    url: GetWEBURL() + '/Cg_PayableBill/QueryList',
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere  , "user": sessionStorage["HUserName"]},
                    success: function (data1) {
                        if (data1.count == 1) {
@@ -611,7 +503,7 @@
                                }
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'radio', fixed: 'left', totalRowText: '合计'});
                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '合计'});
                            for (var i = 0; i < data.length; i++) {
                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                if ($.inArray(data[i].name, titleData) > -1) {
@@ -673,7 +565,7 @@
                var HMainID = datas.hmainid;
                var wait = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Cg_POOrderBill/QuerySubList',
                    url: GetWEBURL() + '/Cg_PayableBill/QuerySubList',
                    type: "GET",
                    data: { "hmainid": HMainID, "user": sessionStorage["HUserName"] },
                    async: false,
@@ -753,7 +645,7 @@
                    shift: 2,
                    area: ['100%', '100%'],
                    maxmin: true,
                    content: './Cg_POOrderBillEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1',
                    content: './Cg_PayableBill.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1',
                    end: function () {
                        //刷新页面,
                        get_FastQuery(table, option);
@@ -778,7 +670,7 @@
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: './Cg_POOrderBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                        , content: './Cg_PayableBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                        , resize: false,
                        end: function () {
                            get_FastQuery(table, option);
@@ -800,10 +692,10 @@
                    //逻辑删除方法
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        /*if (data[0].状态 == "创建") {*/
                        if (data[0].状态 == "创建") {
                            $.ajax({
                                type: "GET",
                                url: GetWEBURL() + "/Cg_POOrderBill/DeltetCg_POOrderBill", //方法所在页面和方法名
                                url: GetWEBURL() + "/Cg_PayableBill/delete", //方法所在页面和方法名
                                data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
                                success: function (result) {
                                    if (result.count == 1) {
@@ -813,7 +705,7 @@
                                            //关闭当前frame
                                            layer.close(index);
                                            //修改为功后刷新界面
                                            window.location.reload();
                                            $("#btnSearch").trigger('click');
                                        });
                                    } else {
@@ -825,40 +717,15 @@
                                    layer.alert("接口请求失败!", { icon: 5 });
                                }
                            });
                        //} else {
                        //    layer.msg('该条数据不是创建状态,无法删除!');
                        } else {
                            layer.msg('该条数据不是创建状态,无法删除!');
                        //}
                        }
                    })
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            }
            //打印
            function get_PrintReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 0) {
                    return layer.msg('请选择数据打印!');
                }
                else {
                    var hmainid = data[0].hmainid.toString();
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + hmainid.toString() + '&MyMsg=' + hmainid.toString() + '&Type=HPOOrderBillByID', 'yes']
                        , resize: false
                    })
                }
            }
@@ -871,7 +738,7 @@
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Cg_POOrderBill/AuditCg_POOrderBill", //方法所在页面和方法名
                        url: GetWEBURL() + "/Cg_PayableBill/AuditCg_PayableBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
@@ -907,7 +774,7 @@
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Cg_POOrderBill/StartCheckFlow_POOrderBill", //方法所在页面和方法名
                        url: GetWEBURL() + "/Cg_PayableBill/StartCheckFlow_POOrderBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
@@ -984,7 +851,7 @@
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Cg_POOrderBill/AuditCg_POOrderBill_Flow", //方法所在页面和方法名
                        url: GetWEBURL() + "/Cg_PayableBill/AuditCg_PayableBill_Flow", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
                        success: function (result) {
                            if (result.count == 1) {
@@ -1020,7 +887,7 @@
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Cg_POOrderBill/RejectCheckFlow_POOrderBill", //方法所在页面和方法名
                        url: GetWEBURL() + "/Cg_PayableBill/RejectCheckFlow_POOrderBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserID": sessionStorage["Czybm"] },
                        success: function (result) {
                            if (result.count == 1) {
@@ -1055,8 +922,8 @@
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Cg_POOrderBill/CloseCg_POOrderBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] },
                        url: GetWEBURL() + "/Cg_PayableBill/CloseCg_PayableBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -1082,7 +949,7 @@
            }
            //#endregion
            //#region è¡Œåå…³é—­/行关闭数据
            //#region è¡Œåå…³é—­/行关闭数据(暂时无用)
            function set_CloseRow(num) {
                var checkStatus = table.checkStatus('mainTableSub')
                    , data = checkStatus.data;
@@ -1093,7 +960,7 @@
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Cg_POOrderBill/CloseRowCg_POOrderBill", //方法所在页面和方法名
                        url: GetWEBURL() + "/Cg_PayableBill/CloseRowCg_PayableBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "HEntryID": hsubid, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
@@ -1129,8 +996,8 @@
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Cg_POOrderBill/DropCg_POOrderBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] },
                        url: GetWEBURL() + "/Cg_PayableBill/DeleteCg_PayableBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -1279,7 +1146,7 @@
                $("#HBillNo").val("");
                $("#HEmpName").val("");
                $("#HSupName").val("");
                $("#HOrgID").val(sessionStorage["OrganizationID"]);
                /*$("#HOrgID").val(sessionStorage["OrganizationID"]);*/
                $("#ColContent").val("");
                $("#ColName").val("0");
                $("#Comparator").val("0");
@@ -1296,33 +1163,6 @@
                form.render('select');
                sWhere = "";
                get_Display(sWhere);
            }
            //重新同步按钮
            function set_ResCnz() {
                var HBillno2 = $('#HBillno2').val();
                $.ajax({
                    url: GetWEBURL() + '/Cg_POOrderBill/Cg_POOrderBillViewApi',
                    type: "GET",
                    data: { "BillNo": HBillno2,"BillType":1102 },
                    success: function (result) {
                        if (result.count == 1) {
                            layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                // å¾—到frame索引
                                var index = layer.getFrameIndex(window.name);
                                //关闭当前frame
                                layer.close(index);
                                //修改为功后刷新界面
                                window.location.reload();
                            });
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //#endregion
@@ -1575,13 +1415,26 @@
            //#region è¡Œç‚¹å‡»äº‹ä»¶
            table.on('row(mainTable)', function (obj) {
                //选中行改变颜色
                var flag = !obj.tr.find(':checkbox:first').prop('checked');
                obj.tr.find(':checkbox').prop('checked', flag);
                if (flag) {
                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //设置复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//改变当前tr背景颜色和字体颜色
                } else {
                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//取消复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:" });//取消当前tr颜色
                }
                //mainTable ä¸ºè¡¨æ ¼ID   æ³¨æ„æ­¤å¤„如果ID不正确将导致你在监听复选框时获取不到你选择的数据,前面的只是添加或删除选中未选中样式以及设置背景色,字体颜色
                layui.each(table.cache.mainTable, function (i, l) {
                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
                        l.LAY_CHECKED = flag;
                    }
                });
                //显示子表
                get_DisplaySub(obj.data);
                //判断是否已经被选中
                if (obj.tr.find('.layui-form-radioed').length == 0) {
                    //触发单选框选中事件
                    obj.tr.find('i[class="layui-anim layui-icon"]').trigger("click");
                }
            })
@@ -1595,6 +1448,22 @@
            })
            //#endregion
            //#region æŽ’序后选择
            table.on('sort(mainTable)', function (obj) { //注:sort æ˜¯å·¥å…·æ¡äº‹ä»¶åï¼Œtest æ˜¯ table åŽŸå§‹å®¹å™¨çš„å±žæ€§ lay-filter="对应的值"
                table.reload('mainTable', {
                    initSort: obj //记录初始排序,如果不设的话,将无法标记表头的排序状态。 layui 2.1.1 æ–°å¢žå‚æ•°
                    , where: { //请求参数(注意:这里面的参数可任意定义,并非下面固定的格式)
                        field: obj.field //排序字段   åœ¨æŽ¥å£ä½œä¸ºå‚数字段  field order
                        , order: obj.type //排序方式   åœ¨æŽ¥å£ä½œä¸ºå‚数字段  field order
                    }
                });
                option.data = layui.table.cache["mainTable"];
                table.render(option);
                //刷新按钮显示
                var btns = document.getElementsByTagName("button");     //获取本页所有按钮对象
                Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
            });
            //#endregion
            //#region åˆå§‹æ—¥æœŸé—´éš” ä¸‹æ‹‰åˆ—表
            function setSelect_HInitTimeCycle() {
@@ -1690,7 +1559,7 @@
                            //隐藏显示过滤方案的标签信息
                            document.getElementById("HFilterScheme_Now").style.display = "none";
                            ////执行查询方法
                            //get_FastQuery()
                            get_FastQuery()
                            //form.render("select");
                        }
                    }, error: function () {
@@ -1884,7 +1753,7 @@
                var addSWhere = "";
                if (openType == 2) {
                    addSWhere = " and çŠ¶æ€ = '已审核' and è¡ŒçŠ¶æ€ = '' and HOrgID = " + HOrgID;
                    addSWhere = " and å®¡æ ¸äºº! = '' and å…³é—­äºº = ''";
                }
                return addSWhere;
            }