1
沈泽
2021-10-12 619330fd6833ebe18ff8ce5695ade08f37c74f4f
1
2个文件已修改
115 ■■■■ 已修改文件
WebTM/layuiadmin/Scripts/webConfig.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/工资管理/工资结算单(其他)/Pay_OtherBalBill.html 113 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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_OtherBalBill.html
@@ -63,7 +63,7 @@
                                            <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>
                                                <input type="hidden" name="HInterID" id="HInterID" value="0">
                                                <input id="HInterID" name="HInterID" type="hidden" />
                                                <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID">
                                            </div>
                                        </div>
@@ -139,9 +139,19 @@
                                        <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="HPayType" id="HPayType" style="padding-left: 32px;">
                                                <input type="text" name="HPayTypeName" id="HPayTypeName" class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="HPayID" id="HPayID" class="layui-input" value="" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="PayType" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <!--<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="HPayType" id="HPayType" style="padding-left: 32px;">
                                            </div>
                                        </div>-->
                                        <div class="layui-col-xs4 layui-inline">
                                            <label class="layui-form-label">摘要</label>
                                            <div class="layui-input-inline">
@@ -240,6 +250,7 @@
            </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>
@@ -249,6 +260,7 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>-->
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
@@ -278,6 +290,9 @@
                elem: '#HDate'
            });
            //判断是否登录 æœªç™»å½•则跳到登录页
            //if (sessionStorage.login != "login") {
            //    layer.confirm("登录失效,请重新登录!", {
@@ -296,8 +311,8 @@
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 100 }
                    , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
                    , { field: 'HMaterCode', title: '物料代码', edit: 'text', event: 'HMaterCheck', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', edit: 'text', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', edit: 'text', width: 190 }
                    //, { 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 }
@@ -320,9 +335,17 @@
            };
            //判断是否新增
            if (OperationType == 1) {
                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HMaker").val(sessionStorage["HUserName"]);
                $("#HCheckDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HChecker").val(sessionStorage["HUserName"]);
                $("#HCloseDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HCloseMan").val(sessionStorage["HUserName"]);
                $("#HUpDateDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HDeleteDate").val(Format(new Date(), "yyyy-MM-dd"));
                //初始加载表格{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                option.data = [{
                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HProcID": "","HProcNumber": "", "HProcName": ""
                    "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": ""
                }];
@@ -332,7 +355,7 @@
                $("#HInterID").val(hID);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + '/Pay_OtherBalBill/Pay_OtherBalBillListProjectDetai',
                    url: GetWEBURL() + 'Pay_OtherBalBill/Pay_OtherBalBillListProjectDetai',
                    type: "GET",
                    data: { "sqlWhere": "and hmainid=" + hID },
                    success: function (result) {
@@ -435,13 +458,13 @@
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HMaterID: checkStatus.data[0].HItemID,
                                        HMaterCode: checkStatus.data[0].物料代码,
                                        HMaterName: checkStatus.data[0].物料,
                                        HMaterCode: checkStatus.data[0].HNumber,
                                        HMaterName: checkStatus.data[0].HName,
                                        //HDesignLife: 0,  //设计寿命
                                        //HLeaveLife: 0,   //剩余寿命
                                        //HQty: 1,         //实收数量
                                        //HMoney: 0,       //金额
                                        HDesignLife: 0,  //设计寿命
                                        HLeaveLife: 0,   //剩余寿命
                                        HQty: 1,         //实收数量
                                        HMoney: 0,       //金额
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
@@ -637,7 +660,7 @@
                //alert(hID);
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Pay_OtherBalBill/Pay_OtherBalBillListCheckDetail",
                    url: GetWEBURL() + "/Pay_OtherBalBill/Pay_OtherBalBillListCheckDetail",
                    type: "GET",
                    data: {
                        "HID": hID
@@ -657,6 +680,8 @@
                                , "HEmpName": data.职员         //主管名称
                                , "HDeptID": data.HDeptID                 //部门ID
                                , "HDeptName": data.部门                //部门名称
                                , "HPayID": data.HPayID
                                , "HPayTypeName": data.工资类型
                                , "HSourceBillType": ""                   //源单类型
                                , "Box2": ""                               //选单号
                                , "HExplanation": data.摘要              //摘要
@@ -798,8 +823,45 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HDeptName").val(checkStatus.data[0].部门);
                        $("#HDeptName").val(checkStatus.data[0].HName);
                        $("#HDeptID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //表头信息工资类型弹窗
            form.on('submit(PayType)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '工资类型列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../../views/工资管理/Gy_WorkPayTypeBillList.html?Type=HPayTypeID', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HPayTypeName").val(checkStatus.data[0].工资类型);
                        $("#HPayID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -827,6 +889,17 @@
                }
            });
            //form.on('submit(Cancel)', function () {
            //    //sessionStorage["SourceFlag"] = false;
            //    parent.location.href = "../../../views/index.html"
            //    //window.close();//关闭当前页
            //})
            function formatDate(date) {
                var d = new Date(date),
                    month = '' + (d.getMonth() + 1),
@@ -848,21 +921,13 @@
                var index = layer.load();
                $.ajax({
                    type: "POST",
                    url: GetWEBURL() + "/Pay_SingleBalBill/AddBill",
                    //url:"http://localhost:12761/Gy_RoutingBill/AddBill",
                    url: GetWEBURL() + "/Pay_OtherBalBill/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("提交成功");
                        }