1
沈泽
2021-10-09 a3915def45f3fa0117df4589d57f15914740f8d2
1
5个文件已修改
1个文件已添加
884 ■■■■■ 已修改文件
WebTM/WebTM.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/工资管理/工资结算单(个人)/Pay_SingleBalBill.html 169 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/工资管理/工资结算单(个人)/Pay_SingleBalBillList.html 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/工资管理/工资结算单(其他)/Pay_OtherBalBill.html 283 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/工资管理/工资结算单(其他)/Pay_OtherBalBillList.html 374 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj
@@ -578,6 +578,7 @@
    <Content Include="views\工资管理\工资结算单%28个人%29\Pay_SingleBalBillList.html" />
    <Content Include="views\工资管理\工资结算单%28个人%29\Pay_SingleBalBill.html" />
    <Content Include="views\工资管理\工资结算单%28其他%29\Pay_OtherBalBill.html" />
    <Content Include="views\工资管理\工资结算单%28其他%29\Pay_OtherBalBillList.html" />
    <Content Include="views\工资管理\考勤汇报单\Kf_BarCodeEditDlg.html" />
    <Content Include="views\模治具管理\模具处理出库单\Sc_MouldScrapOutBill_PDA.html" />
    <Content Include="views\模治具管理\模具寿命调整单\Sc_MouldLifeChangeBill_PDA.html" />
WebTM/layuiadmin/Scripts/webConfig.js
@@ -12,7 +12,7 @@
    //var WEBURL = "http://183.129.128.86:9090/API/";   //凯贝奈特客户服务器外网
    //var WEBURL = "http://192.168.1.253:8080/API/";   //凯贝奈特客户服务器内网
    //var WEBURL = "http://220.189.218.154:8092/API/";   //丸井四维尔服务器
    var WEBURL = "http://localhost/API/";
    //var WEBURL = "http://localhost/API/";
    return WEBURL
}
WebTM/views/¹¤×ʹÜÀí/¹¤×ʽáËãµ¥(¸öÈË)/Pay_SingleBalBill.html
@@ -8,15 +8,31 @@
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        .layui-form-label {
            width: 85px;
        .layui-form-item .layui-inline {
            margin-right: 0;
        }
        html {
            background-color: white;
            color: white;
        }
        .layui-table-cell {
            overflow: visible !important;
        }
        td .layui-form-select {
            margin-top: -10px;
            margin-left: -15px;
            margin-right: -15px;
        }
    </style>
</head>
@@ -43,7 +59,7 @@
                                <div class="layui-tab-item layui-show">
                                    <div class="layui-form-item" style="padding-top: 10px;">
                                        <div class="layui-row">
                                            <div class="layui-col-xs3 layui-inline">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label">单据号</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
@@ -51,13 +67,13 @@
                                                    <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID">
                                                </div>
                                            </div>
                                            <div class="layui-col-xs3 layui-inline">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label">日期</label>
                                                <div class="layui-input-inline">
                                                    <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
                                                </div>
                                            </div>
                                            <div class="layui-col-xs3 layui-inline">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label">内部单据号</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" class="layui-input" name="HInnerBillNo" id="HInnerBillNo" style="background-color:#efefef4d;" readonly>
@@ -65,7 +81,7 @@
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-xs3 layui-inline">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label">班组</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HGroupName" id="HGroupName" class="layui-input" value="" style="float:left;width:150px;">
@@ -75,7 +91,7 @@
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs3 layui-inline">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label">部门</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
@@ -85,7 +101,7 @@
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs3 layui-inline">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label">主管</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;">
@@ -112,12 +128,13 @@
                                                </div>
                                            </div>
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label" style="width: 12.5%;">选单号</label>
                                                <div class="layui-input-block">
                                                    <input class="layui-input" name="Box2" id="Box2" autocomplete="off" style=" width: 75%;">
                                                <label class="layui-form-label">选单号</label>
                                                <div class="layui-input-inline">
                                                    <input class="layui-input" name="Box2" id="Box2" autocomplete="off">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label">工资类型</label>
@@ -125,18 +142,18 @@
                                                    <input type="text" class="layui-input" name="HPayType" id="HPayType" style="padding-left: 32px;">
                                                </div>
                                            </div>
                                            <div class="layui-col-xs6 layui-inline">
                                                <label class="layui-form-label" style="width: 12.5%;">摘要</label>
                                                <div class="layui-input-block">
                                                    <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off" style=" width: 75%;">
                                            <div class="layui-col-xs4 layui-inline">
                                                <label class="layui-form-label">摘要</label>
                                                <div class="layui-input-inline">
                                                    <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-xs8 layui-inline">
                                                <label class="layui-form-label" style="width: 12.5%;">备注</label>
                                            <div class="layui-col-xs7 layui-inline">
                                                <label class="layui-form-label">备注</label>
                                                <div class="layui-input-block">
                                                    <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style=" width: 75%;">
                                                    <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
                                                </div>
                                            </div>
                                        </div>
@@ -223,7 +240,7 @@
                </div>
            </div>
        </div>
    </div>
    <script type="text/html" id="barDemo">
        <!--<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
@@ -233,32 +250,6 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>-->
    <script>
        //获取参数
        function getUrlVars() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
            }
            return vars;
        }
        var params = getUrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
            var closeType = 2;  //关闭类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
            var closeType = params[params[3]];  //关闭类型
        }
        var hID = params[params[0]];//编辑查看
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
@@ -273,11 +264,25 @@
                , laydate = layui.laydate
                , element = layui.element;
            //常规用法
            laydate.render({
                elem: '#HDate'
        var params = get_UrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
            var closeType = 2;  //关闭类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
            var closeType = params[params[3]];  //关闭类型
        }
        var hID = params[params[1]];//编辑查看
        //常规用法
        laydate.render({
            elem: '#HDate'
            });
        });
            //判断是否登录 æœªç™»å½•则跳到登录页
            //if (sessionStorage.login != "login") {
            //    layer.confirm("登录失效,请重新登录!", {
@@ -298,58 +303,41 @@
                    , { field: 'HMaterCode', title: '物料代码', edit: 'text', event: 'HMaterCheck', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', edit: 'text', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100 }
                    , { field: 'HProcID', title: 'HProcID', edit: 'text', width: 100, hide: true }
                    , { field: 'HProcNumber', title: '工序代码', edit: 'text', event: "HProcCheck", width: 100 }
                    , { field: 'HProcName', title: '工序名称', edit: 'text', width: 100 }
                    , { field: 'HSourceCode', title: '资源代码', edit: 'text', event: 'HSourceCheck', width: 100 }
                    , { field: 'HSourceName', title: '资源名称', edit: 'text', width: 100 }
                    , { field: 'HEmpCode', title: '职员代码', edit: 'text', event: 'HEmpCheck', width: 100 }
                    , { field: 'HEmpID', title: 'HEmpID', edit: 'text', width: 100, hide: true }
                    , { field: 'HEmpNumber', title: '职员代码', edit: 'text', event: 'HEmpCheck', width: 150 }
                    , { field: 'HEmpName', title: '职员名称', edit: 'text', width: 100 }
                    , { field: 'HTimes', title: '工时', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '数量', edit: 'text', width: 100 }
                    , { field: 'HPrice', title: '工价', edit: 'text', width: 100 }
                    , { field: 'HPriceRate', title: '定额浮动比率', edit: 'text', width: 100 }
                    , { field: 'HSubsidyQty', title: '补贴数量', edit: 'text', width: 100 }
                    , { field: 'HSubsidyMoney', title: '补贴金额', edit: 'text', width: 100 }
                    , { field: 'HSubsidyTotal', title: '补贴合计', edit: 'text', width: 100 }
                    , { field: 'HDeuctTotal', title: '扣款小计', edit: 'text', width: 100 }
                    , { field: 'HPackQty', title: '包装数量', edit: 'text', width: 100 }
                    , { field: 'HPackPrice', title: '包装单价', edit: 'text', width: 100 }
                    , { field: 'HPackMoney', title: '包装金额', edit: 'text', width: 100 }
                    , { field: 'HPackMaterID', title: '包装类型', edit: 'text', width: 100 }
                    , { field: 'HMoney', title: '金额', edit: 'text', width: 100 }
                    , { field: 'HICMOInterID', title: '生产任务单ID', edit: 'text', width: 100 }
                    , { field: 'HICMOBillNo', title: '生产任务单号', edit: 'text', width: 100 }
                    , { field: 'HProcReportInterID ', title: '工序汇报单ID', edit: 'text', width: 100 }
                    , { field: 'HProcReportEntryID', title: '工序汇报单子ID', edit: 'text', width: 100 }
                    , { field: 'HProcReportBillNo', title: '工序汇报单号', edit: 'text', width: 100 }
                    , { field: 'HProcPlanInterID ', title: '工序计划单ID', edit: 'text', width: 100 }
                    , { field: 'HProcPlanEntryID', title: '工序计划单子ID', edit: 'text', width: 100 }
                    , { field: 'HProcPlanBillNo    ', title: '工序计划单号', edit: 'text', width: 100 }
                    , { field: 'HRemark', title: '备注', edit: 'text', width: 100 }
                    , { field: 'HMainSourceInterID ', title: '源单主内码', edit: 'text', width: 100, hide: true }
                    , { field: 'HMainSourceEntryID', title: '源单子内码', edit: 'text', width: 100, hide: true }
                    , { field: 'HMainSourceBillNo', title: '源单单号', edit: 'text', width: 100, hide: true }
                    , { field: 'HSourceBillType', title: '源单类型', edit: 'text', width: 100, hide: true }
                    , { field: 'HRelationQty', title: '关联数量', edit: 'text', width: 100 }
                    , { field: 'HRelationMoney', title: '关联金额', edit: 'text', width: 100 }
                    , { field: 'HCloseMan', title: '行关闭人', edit: 'text', width: 100 }
                    , { field: 'HCloseDate', title: '关闭时间', edit: 'text', width: 100 }
                    , { field: 'HCloseType', title: '手工关闭', edit: 'text', width: 100 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
                , limit: 500 //每页默认显示的数量
            };
            //判断是否新增
            if (hID == null || hID == 0) {
            if (OperationType == 1) {
                //初始加载表格{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HProcNumber": "", "HProcName": "", "HSourceCode": "", "HSourceName": "", "HEmpCode": "", "HEmpName": "", "HTimes": 0, "HQty": 0, "HPrice": 0, "HPriceRate": 0, "HSubsidyQty": 0, "HSubsidyMoney": 0, "HSubsidyTotal": 0, "HDeuctTotal": 0, "HPackQty": 0, "HPackPrice": 0, "HPackMoney": 0, "HPackMaterID": 0, "HMoney": 0, "HICMOInterID": 0, "HICMOBillNo": 0, "HProcReportInterID": 0, "HProcReportEntryID": 0, "HProcReportBillNo": 0, "HProcPlanInterID": 0, "HProcPlanEntryID": 0, "HProcPlanBillNo": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0, "HSourceBillType": "", "HRelationQty": 0, "HRelationQty": 0, "HRelationMoney": 0, "HCloseMan": 0, "HCloseDate": 0, "HCloseType": 0, "HRemark": "" }];
                option.data = [{
                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HProcID": "", "HProcNumber": "", "HProcName": ""
                    , "HEmpID": "", "HEmpNumber": "", "HEmpName": "", "HTimes": 0, "HQty": 0, "HPrice": 0, "HMoney": 0
                    , "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0, "HSourceBillType": "", "HCloseDate": 0, "HRemark": ""
                }];
                table.render(option);
            }
            else {
                $("#HInterID").val(hID);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'Sc_MouldProdBackBill/Sc_MouldProdBackBillListProjectDetai',
                    url: GetWEBURL() + 'Pay_SingleBalBill/Pay_SingleBalBillListProjectDetai',
                    type: "GET",
                    data: { "sqlWhere": "and hmainid=" + hID },
                    success: function (result) {
@@ -655,7 +643,7 @@
                //alert(hID);
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Sc_MouldProdBackBill/Sc_MouldProdBackBillListCheckDetai",
                    url: GetWEBURL() + "Pay_SingleBalBill/Pay_SingleBalBillListCheckDetail",
                    type: "GET",
                    data: {
                        "HID": hID
@@ -740,7 +728,7 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HGroupName").val(checkStatus.data[0].HName);
                        $("#HGroupName").val(checkStatus.data[0].班组);
                        $("#HGroupID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
@@ -764,7 +752,7 @@
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '主管列表',
                    title: '职员列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
@@ -775,7 +763,7 @@
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
@@ -835,17 +823,14 @@
            //退出
            form.on('submit(Exit)', function (data) {
                if (closeType == 0) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                if (OperationType == 1) {
                    Pub_Close(closeType);//直接新增closeType值为2,列表调新增closeType值从列表传递
                }
                if (closeType == 1) {
                    //关闭弹窗
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                } else if (closeType == 2) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                else if (OperationType == 3) {
                    Pub_Close(closeType);
                }
                else {
                    Pub_Close(2);
                }
            });
WebTM/views/¹¤×ʹÜÀí/¹¤×ʽáËãµ¥(¸öÈË)/Pay_SingleBalBillList.html
@@ -10,12 +10,12 @@
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <!--<script src="../../../layuiadmin/layui/layui.js"></script>-->
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
@@ -147,46 +147,31 @@
                        , { field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 125, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '单据号', title: '单据号', width: 195 }
                        , { field: '单据类型', title: '单据类型', width: 110 }
                        , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
                        , { field: '仓库代码', title: '仓库代码', width: 125 }
                        , { field: '仓库', title: '仓库', width: 125 }
                        , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
                        , { field: '领料人代码', title: '领料人代码', width: 180 }
                        , { field: '领料人', title: '领料人', width: 125 }
                        , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true }
                        , { field: '发料人代码', title: '发料人代码', width: 180 }
                        , { field: '发料人', title: '发料人', width: 125 }
                        //, { field: '单据类型', title: '单据类型', width: 110 }
                        , { field: 'HGroupID', title: 'HGroupID', width: 200, hide: true }
                        , { field: '班组代码', title: '班组代码', width: 125 }
                        , { field: '班组', title: '班组', width: 125 }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                        , { field: '部门代码', title: '部门代码', width: 115 }
                        , { field: '部门代码', title: '部门代码', width: 180 }
                        , { field: '部门', title: '部门', width: 125 }
                        , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
                        , { field: '职员代码', title: '职员代码', width: 180 }
                        , { field: '职员', title: '职员', width: 125 }
                        , { field: '摘要', title: '摘要', width: 125 }
                        , { field: '表头备注', title: '表头备注', width: 125 }
                        , { field: '内部单据号', title: '内部单据号', width: 115 }
                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                        , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
                        , { field: '模具代码', title: '模具代码', width: 125 }
                        , { field: '模具名称', title: '模具名称', width: 125 }
                        , { field: '规格型号', title: '规格型号', width: 125 }
                        , { field: 'Hunitid', title: 'Hunitid', width: 200, hide: true }
                        //, { field: '计量单位代码', title: '计量单位代码', width: 125 }
                        //, { field: '计量单位', title: '计量单位', width: 125 }
                        , { field: 'HWHSonID', title: 'HWHSonID', width: 200, hide: true }
                        , { field: '发料仓库代码', title: '发料仓库代码', width: 125 }
                        , { field: '发料仓库', title: '发料仓库', width: 125 }
                        , { field: 'HSPID', title: 'HSPID', width: 200, hide: true }
                        , { field: '仓位代码', title: '仓位代码', width: 125 }
                        , { field: '仓位', title: '仓位', width: 125 }
                        , { field: '应发数量', title: '应发数量', width: 125 }
                        , { field: '实发数量', title: '实发数量', width: 125 }
                        , { field: '单价', title: '单价', width: 125 }
                        , { field: '金额', title: '金额', width: 125 }
                        , { field: '设计寿命', title: '设计寿命', width: 125 }
                        , { field: '累积使用寿命', title: '累积使用寿命', width: 125 }
                        , { field: '剩余寿命', title: '剩余寿命', width: 125 }
                        , { field: '物料代码', title: '物料代码', width: 125 }
                        , { field: '物料名称', title: '物料名称', width: 125 }
                        //, { field: '规格型号', title: '规格型号', width: 125 }
                        , { field: 'HProcID', title: 'HProcID', width: 200, hide: true }
                        , { field: '工序代码', title: '工序代码', width: 125 }
                        //, { field: '工序', title: '工序', width: 125 }
                        //, { field: '单价', title: '单价', width: 125 }
                        //, { field: '金额', title: '金额', width: 125 }
                        , { field: '关联数量', title: '关联数量', width: 125 }
                        , { field: '表体备注', title: '表体备注', width: 125 }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 125 }
                        , { field: '制单人', title: '制单人', width: 125 }
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '审核人', title: '审核人', width: 125 }
@@ -210,7 +195,7 @@
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Pay_SingleBalBill/list',
                    url: GetWEBURL() + '/Pay_SingleBalBill/GetSingleBalBill',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    success: function (data1) {
@@ -242,7 +227,7 @@
                            shift: 2,
                            area: ['100%', '100%'],
                            maxmin: true,
                            content: '../工资结算单(个人)/Pay_SingleBalBill.html',
                            content: '../工资结算单(个人)/Pay_SingleBalBill.html?OperationType=1&linterid=0&HSouceBillType=0&closeType=1',
                            end: function () {
                                //刷新页面,
                                location.reload();
@@ -266,7 +251,7 @@
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: '../工资结算单(个人)/Pay_SingleBalBill.html?hID=' + hID
                                , content: '../工资结算单(个人)/Pay_SingleBalBill.html?OperationType=3&linterid=' + hID + '&HSouceBillType=0&closeType=1'
                                , resize: false,
                                end: function () {
                                    //刷新页面,
WebTM/views/¹¤×ʹÜÀí/¹¤×ʽáËãµ¥(ÆäËû)/Pay_OtherBalBill.html
@@ -8,15 +8,31 @@
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        .layui-form-label {
            width: 85px;
        .layui-form-item .layui-inline {
            margin-right: 0;
        }
        html {
            background-color: white;
            color: white;
        }
        .layui-table-cell {
            overflow: visible !important;
        }
        td .layui-form-select {
            margin-top: -10px;
            margin-left: -15px;
            margin-right: -15px;
        }
    </style>
</head>
@@ -43,7 +59,7 @@
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item" style="padding-top: 10px;">
                                    <div class="layui-row">
                                        <div class="layui-col-xs3 layui-inline">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">单据号</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
@@ -51,13 +67,13 @@
                                                <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID">
                                            </div>
                                        </div>
                                        <div class="layui-col-xs3 layui-inline">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">日期</label>
                                            <div class="layui-input-inline">
                                                <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
                                            </div>
                                        </div>
                                        <div class="layui-col-xs3 layui-inline">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">内部单据号</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" name="HInnerBillNo" id="HInnerBillNo" style="background-color:#efefef4d;" readonly>
@@ -65,7 +81,7 @@
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-col-xs3 layui-inline">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">班组</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HGroupName" id="HGroupName" class="layui-input" value="" style="float:left;width:150px;">
@@ -75,7 +91,7 @@
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs3 layui-inline">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">部门</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
@@ -85,8 +101,8 @@
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs3 layui-inline">
                                            <label class="layui-form-label">主管</label>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">职员</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="" style="float:left;width:150px;">
@@ -112,12 +128,13 @@
                                            </div>
                                        </div>
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label" style="width: 12.5%;">选单号</label>
                                            <div class="layui-input-block">
                                                <input class="layui-input" name="Box2" id="Box2" autocomplete="off" style=" width: 75%;">
                                            <label class="layui-form-label">选单号</label>
                                            <div class="layui-input-inline">
                                                <input class="layui-input" name="Box2" id="Box2" autocomplete="off">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">工资类型</label>
@@ -125,18 +142,18 @@
                                                <input type="text" class="layui-input" name="HPayType" id="HPayType" style="padding-left: 32px;">
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6 layui-inline">
                                            <label class="layui-form-label" style="width: 12.5%;">摘要</label>
                                            <div class="layui-input-block">
                                                <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off" style=" width: 75%;">
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">摘要</label>
                                            <div class="layui-input-inline">
                                                <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-col-xs8 layui-inline">
                                            <label class="layui-form-label" style="width: 12.5%;">备注</label>
                                        <div class="layui-col-xs7 layui-inline">
                                            <label class="layui-form-label">备注</label>
                                            <div class="layui-input-block">
                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style=" width: 75%;">
                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
                                            </div>
                                        </div>
                                    </div>
@@ -223,7 +240,6 @@
            </div>
        </div>
    </div>
    </div>
    <script type="text/html" id="barDemo">
        <!--<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
@@ -233,33 +249,6 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>-->
    <script>
        //获取参数
        function getUrlVars() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
            }
            return vars;
        }
        var params = getUrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
            var closeType = 2;  //关闭类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
            var closeType = params[params[3]];  //关闭类型
        }
        var hID = params[params[0]];//编辑查看
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
@@ -273,6 +262,17 @@
                , laydate = layui.laydate
                , element = layui.element;
            var params = get_UrlVars();
            if (typeof (params[params[0]]) == "undefined") {
                var OperationType = 1;//操作类型
                var closeType = 2;  //关闭类型
            } else {
                var OperationType = params[params[0]];//操作类型
                var linterid = params[params[1]];//源单id
                var HSouceBillType = params[params[2]];//源单类型
                var closeType = params[params[3]];  //关闭类型
            }
            var hID = params[params[1]];//编辑查看
            //常规用法
            laydate.render({
                elem: '#HDate'
@@ -298,58 +298,41 @@
                    , { field: 'HMaterCode', title: '物料代码', edit: 'text', event: 'HMaterCheck', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', edit: 'text', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100 }
                    , { field: 'HProcID', title: 'HProcID', edit: 'text', width: 100, hide: true }
                    , { field: 'HProcNumber', title: '工序代码', edit: 'text', event: "HProcCheck", width: 100 }
                    , { field: 'HProcName', title: '工序名称', edit: 'text', width: 100 }
                    , { field: 'HSourceCode', title: '资源代码', edit: 'text', event: 'HSourceCheck', width: 100 }
                    , { field: 'HSourceName', title: '资源名称', edit: 'text', width: 100 }
                    , { field: 'HEmpCode', title: '职员代码', edit: 'text', event: 'HEmpCheck', width: 100 }
                    , { field: 'HEmpID', title: 'HEmpID', edit: 'text', width: 100, hide: true }
                    , { field: 'HEmpNumber', title: '职员代码', edit: 'text', event: 'HEmpCheck', width: 150 }
                    , { field: 'HEmpName', title: '职员名称', edit: 'text', width: 100 }
                    , { field: 'HTimes', title: '工时', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '数量', edit: 'text', width: 100 }
                    , { field: 'HPrice', title: '工价', edit: 'text', width: 100 }
                    , { field: 'HPriceRate', title: '定额浮动比率', edit: 'text', width: 100 }
                    , { field: 'HSubsidyQty', title: '补贴数量', edit: 'text', width: 100 }
                    , { field: 'HSubsidyMoney', title: '补贴金额', edit: 'text', width: 100 }
                    , { field: 'HSubsidyTotal', title: '补贴合计', edit: 'text', width: 100 }
                    , { field: 'HDeuctTotal', title: '扣款小计', edit: 'text', width: 100 }
                    , { field: 'HPackQty', title: '包装数量', edit: 'text', width: 100 }
                    , { field: 'HPackPrice', title: '包装单价', edit: 'text', width: 100 }
                    , { field: 'HPackMoney', title: '包装金额', edit: 'text', width: 100 }
                    , { field: 'HPackMaterID', title: '包装类型', edit: 'text', width: 100 }
                    , { field: 'HMoney', title: '金额', edit: 'text', width: 100 }
                    , { field: 'HICMOInterID', title: '生产任务单ID', edit: 'text', width: 100 }
                    , { field: 'HICMOBillNo', title: '生产任务单号', edit: 'text', width: 100 }
                    , { field: 'HProcReportInterID ', title: '工序汇报单ID', edit: 'text', width: 100 }
                    , { field: 'HProcReportEntryID', title: '工序汇报单子ID', edit: 'text', width: 100 }
                    , { field: 'HProcReportBillNo', title: '工序汇报单号', edit: 'text', width: 100 }
                    , { field: 'HProcPlanInterID ', title: '工序计划单ID', edit: 'text', width: 100 }
                    , { field: 'HProcPlanEntryID', title: '工序计划单子ID', edit: 'text', width: 100 }
                    , { field: 'HProcPlanBillNo    ', title: '工序计划单号', edit: 'text', width: 100 }
                    , { field: 'HRemark', title: '备注', edit: 'text', width: 100 }
                    , { field: 'HMainSourceInterID ', title: '源单主内码', edit: 'text', width: 100, hide: true }
                    , { field: 'HMainSourceEntryID', title: '源单子内码', edit: 'text', width: 100, hide: true }
                    , { field: 'HMainSourceBillNo', title: '源单单号', edit: 'text', width: 100, hide: true }
                    , { field: 'HSourceBillType', title: '源单类型', edit: 'text', width: 100, hide: true }
                    , { field: 'HRelationQty', title: '关联数量', edit: 'text', width: 100 }
                    , { field: 'HRelationMoney', title: '关联金额', edit: 'text', width: 100 }
                    , { field: 'HCloseMan', title: '行关闭人', edit: 'text', width: 100 }
                    , { field: 'HCloseDate', title: '关闭时间', edit: 'text', width: 100 }
                    , { field: 'HCloseType', title: '手工关闭', edit: 'text', width: 100 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
                , limit: 500 //每页默认显示的数量
            };
            //判断是否新增
            if (hID == null || hID == 0) {
            if (OperationType == 1) {
                //初始加载表格{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HProcNumber": "", "HProcName": "", "HSourceCode": "", "HSourceName": "", "HEmpCode": "", "HEmpName": "", "HTimes": 0, "HQty": 0, "HPrice": 0, "HPriceRate": 0, "HSubsidyQty": 0, "HSubsidyMoney": 0, "HSubsidyTotal": 0, "HDeuctTotal": 0, "HPackQty": 0, "HPackPrice": 0, "HPackMoney": 0, "HPackMaterID": 0, "HMoney": 0, "HICMOInterID": 0, "HICMOBillNo": 0, "HProcReportInterID": 0, "HProcReportEntryID": 0, "HProcReportBillNo": 0, "HProcPlanInterID": 0, "HProcPlanEntryID": 0, "HProcPlanBillNo": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0, "HSourceBillType": "", "HRelationQty": 0, "HRelationQty": 0, "HRelationMoney": 0, "HCloseMan": 0, "HCloseDate": 0, "HCloseType": 0, "HRemark": "" }];
                option.data = [{
                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HProcID": "","HProcNumber": "", "HProcName": ""
                    , "HEmpID": "", "HEmpNumber": "", "HEmpName": "", "HTimes": 0, "HQty": 0, "HPrice": 0, "HMoney": 0
                    , "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0, "HSourceBillType": "", "HCloseDate": 0, "HRemark": ""
                }];
                table.render(option);
            }
            else {
                $("#HInterID").val(hID);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'Sc_MouldProdBackBill/Sc_MouldProdBackBillListProjectDetai',
                    url: GetWEBURL() + '/Pay_OtherBalBill/Pay_OtherBalBillListProjectDetai',
                    type: "GET",
                    data: { "sqlWhere": "and hmainid=" + hID },
                    success: function (result) {
@@ -655,7 +638,7 @@
                //alert(hID);
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Sc_MouldProdBackBill/Sc_MouldProdBackBillListCheckDetai",
                    url: GetWEBURL() + "Pay_OtherBalBill/Pay_OtherBalBillListCheckDetail",
                    type: "GET",
                    data: {
                        "HID": hID
@@ -672,7 +655,7 @@
                                , "HGroupID": data.HGroupID                    //班组ID
                                , "HGroupName": data.班组                 //班组名称
                                , "HEmpID": data.HEmpID    //主管ID
                                , "HEmpName": data.主管         //主管名称
                                , "HEmpName": data.职员         //主管名称
                                , "HDeptID": data.HDeptID                 //部门ID
                                , "HDeptName": data.部门                //部门名称
                                , "HSourceBillType": ""                   //源单类型
@@ -740,7 +723,7 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HGroupName").val(checkStatus.data[0].HName);
                        $("#HGroupName").val(checkStatus.data[0].班组);
                        $("#HGroupID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
@@ -764,7 +747,7 @@
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '主管列表',
                    title: '职员列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
@@ -775,7 +758,7 @@
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
@@ -835,30 +818,16 @@
            //退出
            form.on('submit(Exit)', function (data) {
                if (closeType == 0) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                if (OperationType == 1) {
                    Pub_Close(closeType);//直接新增closeType值为2,列表调新增closeType值从列表传递
                }
                if (closeType == 1) {
                    //关闭弹窗
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                } else if (closeType == 2) {
                    //关闭页签
                    parent.layui.admin.events.closeThisTabs();
                else if (OperationType == 3) {
                    Pub_Close(closeType);
                }
                else {
                    Pub_Close(2);
                }
            });
            //form.on('submit(Cancel)', function () {
            //    //sessionStorage["SourceFlag"] = false;
            //    parent.location.href = "../../../views/index.html"
            //    //window.close();//关闭当前页
            //})
            function formatDate(date) {
                var d = new Date(date),
@@ -871,48 +840,86 @@
                return [year, month, day].join('-');
            }
            form.on('submit(Saver)', function (data) {//保存
                //debugger;
                data.field.HMaker = sessionStorage["HUserName"];//制单人
            //保存提交
            form.on('submit(btnSave)', function (data) {//提交
                //var tableData = data.field;
                data.field.HSTOCKORGID = sessionStorage["OrganizationID"];//组织
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sMainSub = sMainStr + ';' + sSubStr;
                $.ajax(
                    {
                        type: "POST",
                        url: GetWEBURL() + "/Sc_MouldProdBackBill/SaveGetMouldProdBackBillList", //方法所在页面和方法名
                        async: true,
                        data: { "msg": sMainSub },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
                                    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                    parent.layer.close(index); //再执行关闭 Â  Â  Â  Â  Â Â  Â Â Â  Â 
                                });
                            }
                            else {
                                f_alert(data.Message);
                                console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
                            }
                            layer.closeAll("loading");
                        },
                        error: function (err) {
                            f_alert("错误:" + err);
                            console.log("Reason" + sMainStr);
                var index = layer.load();
                $.ajax({
                    type: "POST",
                    url: GetWEBURL() + "/Pay_SingleBalBill/AddBill",
                    //url:"http://localhost:12761/Gy_RoutingBill/AddBill",
                    async: true,
                    data: { "sMainSub": sMainSub },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) {
                            //layer.confirm(data.Message, {
                            //    icon: 1, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['新增'],
                            //    btn2: function () {
                            //        //parent.layui.admin.events.closeThisTabs();关闭页签
                            //        //window.close();//关闭页面,浏览器有效,PDA无效
                            //        parent.location.href = "../../../views/index.html"
                            //    }//关闭
                            //}, function () { window.location.reload(); });//新增
                            layer.close(index);
                            layer.msg("提交成功");
                        }
                    });
                        else {
                            layer.close(index);
                            layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (err) {
                        layer.close(index);
                        layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
                });
            });
            function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });
            //form.on('submit(Saver)', function (data) {//保存
            //    //debugger;
            //    data.field.HMaker = sessionStorage["HUserName"];//制单人
            //    var sMainStr = JSON.stringify(data.field);
            //    var sSubStr = JSON.stringify(table.cache['mainTable']);
            //    var sMainSub = sMainStr + ';' + sSubStr;
            }
            //    $.ajax(
            //        {
            //            type: "POST",
            //            url: GetWEBURL() + "/Sc_MouldProdBackBill/SaveGetMouldProdBackBillList", //方法所在页面和方法名
            //            async: true,
            //            data: { "msg": sMainSub },
            //            dataType: "json",
            //            success: function (data) {
            //                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
            //                    layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
            //                        $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
            //                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            //                        parent.layer.close(index); //再执行关闭 Â  Â  Â  Â  Â Â  Â Â Â  Â 
            //                    });
            //                }
            //                else {
            //                    f_alert(data.Message);
            //                    console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
            //                }
            //                layer.closeAll("loading");
            //            },
            //            error: function (err) {
            //                f_alert("错误:" + err);
            //                console.log("Reason" + sMainStr);
            //            }
            //        });
            //});
            //function f_alert(sMsg) {
            //    layer.alert(sMsg, { icon: 5 });
            //}
            //监听提交
            form.verify({
WebTM/views/¹¤×ʹÜÀí/¹¤×ʽáËãµ¥(ÆäËû)/Pay_OtherBalBillList.html
New file
@@ -0,0 +1,374 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <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">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <!--<script src="../../../layuiadmin/layui/layui.js"></script>-->
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-col-md12">
            <div class="layui-card" style="padding: 1px">
                <div class="layui-card-body" style="padding: 1px;">
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <!--<div class="layui-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>-->
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <!--<div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </div>
                                </div>-->
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button>
                            </div>
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!--<script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>-->
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = "";
            var option = [];
            //初始化界面
            set_ClearBill();
            //#endregion
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                //清空过滤条件
                set_ClearQuery();
            });
            //#endregion
            //#region æŸ¥è¯¢æŒ‰é’®
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery(table, option);
            });
            //#endregion
            //#region åˆå§‹åŒ–界面
            function set_ClearBill() {
                //初始化表格
                set_InitGrid();
                //查询
                get_Display(sWhere);
            }
            //#endregion
            //#region åˆå§‹åŒ–表格方法
            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
            function set_InitGrid() {
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , height: 'full-50'
                    , page: true
                    , cellMinWidth: 90
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 125, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '单据号', title: '单据号', width: 195 }
                        //, { field: '单据类型', title: '单据类型', width: 110 }
                        , { field: 'HGroupID', title: 'HGroupID', width: 200, hide: true }
                        , { field: '班组代码', title: '班组代码', width: 125 }
                        , { field: '班组', title: '班组', width: 125 }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                        , { field: '部门代码', title: '部门代码', width: 180 }
                        , { field: '部门', title: '部门', width: 125 }
                        , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
                        , { field: '职员代码', title: '职员代码', width: 180 }
                        , { field: '职员', title: '职员', width: 125 }
                        , { field: '摘要', title: '摘要', width: 125 }
                        , { field: '表头备注', title: '表头备注', width: 125 }
                        , { field: '内部单据号', title: '内部单据号', width: 115 }
                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                        , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
                        , { field: '物料代码', title: '物料代码', width: 125 }
                        , { field: '物料名称', title: '物料名称', width: 125 }
                        //, { field: '规格型号', title: '规格型号', width: 125 }
                        , { field: 'HProcID', title: 'HProcID', width: 200, hide: true }
                        , { field: '工序代码', title: '工序代码', width: 125 }
                        //, { field: '工序', title: '工序', width: 125 }
                        //, { field: '单价', title: '单价', width: 125 }
                        //, { field: '金额', title: '金额', width: 125 }
                        , { field: '关联数量', title: '关联数量', width: 125 }
                        , { field: '表体备注', title: '表体备注', width: 125 }
                        , { field: '制单人', title: '制单人', width: 125 }
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '审核人', title: '审核人', width: 125 }
                        , { field: '审核日期', title: '审核日期', width: 200, templet: "<div>{{d.审核日期 ==null ? '':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '修改人', title: '修改人', width: 125 }
                        , { field: '修改日期', title: '修改日期', width: 200, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '关闭人', title: '关闭人', width: 125 }
                        , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '作废人', title: '作废人', width: 125 }
                        , { field: '作废日期', title: '作废日期', width: 200, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: '行关闭人', title: '行关闭人', width: 125 }
                        , { field: '关闭类型', title: '关闭类型', width: 125 }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                        , { field: '源单单号', title: '源单单号', width: 125, hide: true }
                        , { field: '源单类型', title: '源单类型', width: 125, hide: true}
                    ]]
                };
            }
            //进入页面显示的缓存列表
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Pay_OtherBalBill/GetOtherBalBill',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                switch (obj.event) {
                    case 'btn-Add':
                        //页面层-自定义
                        layer.open({
                            type: 2,
                            skin: 'layui-layer-rim', //加上边框
                            title: '新增工资结算(其他)',
                            closeBtn: 1,
                            shift: 2,
                            area: ['100%', '100%'],
                            maxmin: true,
                            content: '../工资结算单(其他)/Pay_OtherBalBill.html?OperationType=1&linterid=0&HSouceBillType=0&closeType=1',
                            end: function () {
                                //刷新页面,
                                location.reload();
                            },
                            success: function (layero, index) {
                            }
                        });
                        break;
                    case 'btn-Edit':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        if (checkStatus.data.length === 1) {
                            var hID = data[0].hmainid.toString();
                            //if (AllowLoadData(sSubStr) != false) {//非空验证
                            layer.open({
                                type: 2
                                , area: ['100%', '100%']
                                , title: '编辑工资结算(其他)'
                                , closeBtn: 1
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: '../工资结算单(其他)/Pay_OtherBalBill.html?OperationType=3&linterid='+hID+'&HSouceBillType=0&closeType=1'
                                , resize: false,
                                end: function () {
                                    //刷新页面,
                                    location.reload();
                                }
                                , cancel: function () {
                                    //$(".layui-btn").removeClass("layui-btn-disabled");
                                }
                            })
                        } else {
                            layer.msg('请选择一行数据编辑!');
                        }
                        break;
                    case 'btn-Delete':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        if (checkStatus.data.length === 1) {
                            var InterID = data[0].hmainid.toString();
                            //逻辑删除方法
                            layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                                $.ajax({
                                    type: "GET",
                                    url: GetWEBURL() + "Sc_MouldProdOutBill/DeltetMouldProdOutBill", //方法所在页面和方法名
                                    data: { "HInterID": InterID },
                                    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.alert("接口请求失败!", { icon: 5 });
                                    }
                                });
                            })
                        }
                        else {
                            layer.msg('请选择一行数据删除!');
                        }
                        break;
                    //刷新
                    case 'get_Refresh': get_Refresh();
                        break;
                    //退出按钮
                    case 'get_Exit': Pub_Close(2);
                        break;
                };
            });
            //#region å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery(table, option) {
                var HDate = $("#HBeginDate").val();//开始日期
                var HDate1 = $("#HEndDate").val();//结束日期
                var HBillNo = $("#HBillNo").val();//单据号
                if (HDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HDate + "'";
                }
                if (HDate1) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HDate1 + "'";
                }
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶
            function set_ClearQuery() {
                $("#HDate").val("");//开始日期
                $("#HDate1").val("");//结束日期
                $("#HBillNo").val("");//单据号
                sWhere = "";
            }
            //#endregion
            //#region åˆ·æ–°
            function get_Refresh() {
                set_ClearQuery();
                get_Display(sWhere);
            }
            //#endregion
            ////监听行双击事件
            //table.on('rowDouble(mainTable)', function (obj) {
            //    layer.alert("双击事件", { icon: 1 });
            //});
            //laydate.render({
            //    elem: '#HDate'
            //    , type: 'datetime'
            //    , trigger: 'click'
            //    , format:'yyyy-MM-dd HH:mm'
            //});
            //以上是layui模块
        });
    </script>
</body>
</html>