WebTM/views/ÑéÊÕÈë¿â/ίÍâÈë¿â/Kf_EntrustInBillList.html
@@ -15,6 +15,7 @@
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/HideButton.js"></script>
    <script src="../../../layuiadmin/soulTable.slim.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
@@ -113,6 +114,10 @@
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="get_Refresh" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Audit" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-DeAudit" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>反审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close" id="Close"><i class="layui-icon layui-icon-radio"></i>关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose" id="DeClose"><i class="layui-icon layui-icon-radio"></i>反关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Drop" id="Drop"><i class="layui-icon layui-icon-radio"></i>作废</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeDrop" id="DeDrop"><i class="layui-icon layui-icon-radio"></i>反作废</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-view" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>预览</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-print" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>打印</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
@@ -132,7 +137,7 @@
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
            //#region å…¬å…±å˜é‡
            var $ = layui.$
@@ -144,6 +149,7 @@
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
                , soulTable = layui.soulTable
            //查询条件
            var sWhere = "";
            var option = [];
@@ -169,6 +175,30 @@
                        break;
                    //删除
                    case 'set_DeleteBill': set_DeleteBill();
                        break;
                    //审核按钮
                    case 'btn-Audit':
                        set_CheckBill(1);
                        break;
                    //反审核按钮
                    case 'btn-DeAudit':
                        set_CheckBill(2);
                        break;
                    //关闭按钮        ï¼ˆ1:关闭、2:反关闭)
                    case 'btn-Close':
                        set_CloseBill(1);
                        break;
                    //反关闭按钮
                    case 'btn-DeClose':
                        set_CloseBill(2);
                        break;
                    //作废按钮        ï¼ˆ1:作废、2:反作废)
                    case 'btn-Drop':
                        set_DropBill(1);
                        break;
                    //反作废按钮
                    case 'btn-DeDrop':
                        set_DropBill(2);
                        break;
                    //关闭
                    case 'set_CloseBill': set_CloseBill();
@@ -271,6 +301,116 @@
                    }
                })
            }
            //#region åå®¡æ ¸/审核数据
            function set_CheckBill(num) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Kf_EntrustInBill/AuditKf_EntrustInBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] },
                        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);
                                    //修改为功后刷新界面
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //#region åå…³é—­/关闭数据
            function set_CloseBill(num) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Kf_EntrustInBill/CloseKf_EntrustInBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] },
                        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);
                                    //修改为功后刷新界面
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //#region åä½œåºŸ/作废数据
            function set_DropBill(num) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Kf_EntrustInBill/DropKf_EntrustInBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] },
                        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);
                                    //修改为功后刷新界面
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //条码明细
            function get_BarCodeDetail() {
@@ -401,78 +541,82 @@
                    , toolbar: '#toolbarDemo'
                    , height: 'full-50'
                    , page: true
                    , totalRow: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , done: function (res, curr, count) {
                        soulTable.render(this);
                    }
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        ,{ field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 160 }
                        , { field: '单据号', title: '单据号', width: 160 }
                        , { field: 'hsupid', title: 'hsupid', width: 160, hide: true }
                        , { field: '加工单位代码', title: '加工单位代码', width: 200 }
                        , { field: '加工单位名称', title: '加工单位名称', width: 200 }
                        , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
                        , { field: '业务员代码', title: '业务员代码', width: 200 }
                        , { field: '业务员', title: '业务员', width: 200 }
                        , { field: 'hmanagerid', title: 'hmanagerid', width: 200, hide: true }
                        , { field: '主管代码', title: '主管代码', width: 160 }
                        , { field: '主管', title: '主管', width: 160 }
                        , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 160, hide: true }
                        , { field: '验收员代码', title: '验收员代码', width: 200 }
                        , { field: '验收员', title: '验收员', width: 200 }
                        , { field: 'hkeeperid', title: 'hkeeperid', width: 200, hide: true }
                        , { field: '保管员代码', title: '保管员代码', width: 200 }
                        , { field: '保管员', title: '保管员', width: 200 }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                        , { field: '部门代码', title: '部门代码', width: 200 }
                        , { field: '部门', title: '部门', width: 115 }
                        , { field: '摘要', title: '摘要', width: 115 }
                        , { field: '表头备注', title: '表头备注', width: 200 }
                        , { field: '内部单据号', title: '内部单据号', width: 200 }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 115 }
                        , { field: '制单人', title: '制单人', width: 200 }
                        , { field: '制单日期', title: '制单日期', width: 200 }
                        , { field: '审核人', title: '审核人', width: 200 }
                        , { field: '审核日期', title: '审核日期', width: 200 }
                        , { field: '修改人', title: '修改人', width: 200 }
                        , { field: '修改日期', title: '修改日期', width: 200 }
                        , { field: '关闭人', title: '关闭人', width: 115 }
                        , { field: '关闭日期', title: '关闭日期', width: 200 }
                        , { field: '作废人', title: '作废人', width: 200 }
                        , { field: '作废日期', title: '作废日期', width: 200 }
                        , { field: 'hsubid', title: 'hsubid', width: 115, hide: true }
                        , { field: 'hmaterid', title: 'hmaterid', width: 200, hide: true }
                        , { field: '物料代码', title: '物料代码', width: 200 }
                        , { field: '物料名称', title: '物料名称', width: 200 }
                        , { field: '规格型号', title: '规格型号', width: 200 }
                        , { field: '附加属性', title: '附加属性', width: 200 }
                        , { field: '颜色', title: '颜色', width: 200 }
                        , { field: 'hunitid', title: 'hunitid', width: 200, hide: true }
                        , { field: '计量单位代码', title: '计量单位代码', width: 200 }
                        , { field: '计量单位', title: '计量单位', width: 200 }
                        , { field: '应发数量', title: '应发数量', width: 200 }
                        , { field: '实发数量', title: '实发数量', width: 200 }
                        , { field: '单价', title: '单价', width: 200 }
                        , { field: '金额', title: '金额', width: 200 }
                        , { field: 'hwhid', title: 'hwhid', width: 200, hide: true }
                        , { field: '发货仓库代码', title: '发货仓库代码', width: 200 }
                        , { field: '发货仓库', title: '发货仓库', width: 200 }
                        , { field: '行关闭人', title: '行关闭人', width: 200 }
                        , { field: '关闭类型', title: '关闭类型', width: 200 }
                        , { field: '表体备注', title: '表体备注', width: 200 }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200 }
                        , { field: '源单单号', title: '源单单号', width: 200 }
                        , { field: '源单类型', title: '源单类型', width: 200 }
                        , { field: '采购订单主ID', title: '采购订单主ID', width: 200, hide: true }
                        , { field: '采购订单子ID', title: '采购订单子ID', width: 200, hide: true }
                        , { field: '采购订单号', title: '采购订单号', width: 200 }
                        , { field: '销售订单主ID', title: '销售订单主ID', width: 200, hide: true }
                        , { field: '销售订单子ID', title: '销售订单子ID', width: 200, hide: true }
                        , { field: '销售订单号', title: '销售订单号', width: 200 }
                        , { field: '关联数量', title: '关联数量', width: 200 }
                        , { field: 'HBillType', title: 'HBillType', width: 200, hide: true }
                        , { field: 'hmainid', title: '单据ID', hide: true, sort: true }
                        , { field: '日期', title: '日期', width: 160, sort: true }
                        , { field: '单据号', title: '单据号', width: 160, sort: true }
                        , { field: 'hsupid', title: 'hsupid', width: 160, hide: true, sort: true }
                        , { field: '加工单位代码', title: '加工单位代码', width: 200, sort: true }
                        , { field: '加工单位名称', title: '加工单位名称', width: 200, sort: true }
                        , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true, sort: true }
                        , { field: '业务员代码', title: '业务员代码', width: 200, sort: true }
                        , { field: '业务员', title: '业务员', width: 200, sort: true }
                        , { field: 'hmanagerid', title: 'hmanagerid', width: 200, hide: true, sort: true }
                        , { field: '主管代码', title: '主管代码', width: 160, sort: true }
                        , { field: '主管', title: '主管', width: 160, sort: true }
                        , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 160, hide: true, sort: true }
                        , { field: '验收员代码', title: '验收员代码', width: 200, sort: true }
                        , { field: '验收员', title: '验收员', width: 200, sort: true }
                        , { field: 'hkeeperid', title: 'hkeeperid', width: 200, hide: true, sort: true }
                        , { field: '保管员代码', title: '保管员代码', width: 200, sort: true }
                        , { field: '保管员', title: '保管员', width: 200, sort: true }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true }
                        , { field: '部门代码', title: '部门代码', width: 200, sort: true }
                        , { field: '部门', title: '部门', width: 115, sort: true }
                        , { field: '摘要', title: '摘要', width: 115, sort: true }
                        , { field: '表头备注', title: '表头备注', width: 200, sort: true }
                        , { field: '内部单据号', title: '内部单据号', width: 200, sort: true }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 115, sort: true }
                        , { field: '制单人', title: '制单人', width: 200, sort: true }
                        , { field: '制单日期', title: '制单日期', width: 200, sort: true }
                        , { field: '审核人', title: '审核人', width: 200, sort: true }
                        , { field: '审核日期', title: '审核日期', width: 200, sort: true }
                        , { field: '修改人', title: '修改人', width: 200, sort: true }
                        , { field: '修改日期', title: '修改日期', width: 200, sort: true }
                        , { field: '关闭人', title: '关闭人', width: 115, sort: true }
                        , { field: '关闭日期', title: '关闭日期', width: 200, sort: true }
                        , { field: '作废人', title: '作废人', width: 200, sort: true }
                        , { field: '作废日期', title: '作废日期', width: 200, sort: true }
                        , { field: 'hsubid', title: 'hsubid', width: 115, hide: true, sort: true }
                        , { field: 'hmaterid', title: 'hmaterid', width: 200, hide: true, sort: true }
                        , { field: '物料代码', title: '物料代码', width: 200, sort: true }
                        , { field: '物料名称', title: '物料名称', width: 200, sort: true }
                        , { field: '规格型号', title: '规格型号', width: 200, sort: true }
                        , { field: '附加属性', title: '附加属性', width: 200, sort: true }
                        , { field: '颜色', title: '颜色', width: 200, sort: true }
                        , { field: 'hunitid', title: 'hunitid', width: 200, hide: true, sort: true }
                        , { field: '计量单位代码', title: '计量单位代码', width: 200, sort: true }
                        , { field: '计量单位', title: '计量单位', width: 200, sort: true }
                        , { field: '应发数量', title: '应发数量', width: 200, sort: true }
                        , { field: '实发数量', title: '实发数量', width: 200, sort: true }
                        , { field: '单价', title: '单价', width: 200, sort: true }
                        , { field: '金额', title: '金额', width: 200, sort: true }
                        , { field: 'hwhid', title: 'hwhid', width: 200, hide: true, sort: true }
                        , { field: '发货仓库代码', title: '发货仓库代码', width: 200, sort: true }
                        , { field: '发货仓库', title: '发货仓库', width: 200, sort: true }
                        , { field: '行关闭人', title: '行关闭人', width: 200, sort: true }
                        , { field: '关闭类型', title: '关闭类型', width: 200, sort: true }
                        , { field: '表体备注', title: '表体备注', width: 200, sort: true }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true, sort: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, sort: true }
                        , { field: '源单单号', title: '源单单号', width: 200, sort: true }
                        , { field: '源单类型', title: '源单类型', width: 200, sort: true }
                        , { field: '采购订单主ID', title: '采购订单主ID', width: 200, hide: true, sort: true }
                        , { field: '采购订单子ID', title: '采购订单子ID', width: 200, hide: true, sort: true }
                        , { field: '采购订单号', title: '采购订单号', width: 200, sort: true }
                        , { field: '销售订单主ID', title: '销售订单主ID', width: 200, hide: true, sort: true }
                        , { field: '销售订单子ID', title: '销售订单子ID', width: 200, hide: true, sort: true }
                        , { field: '销售订单号', title: '销售订单号', width: 200, sort: true }
                        , { field: '关联数量', title: '关联数量', width: 200, sort: true }
                        , { field: 'HBillType', title: 'HBillType', width: 200, hide: true, sort: true }
                    ]]
                };
            }