1
cwjbxqmz
2024-01-26 b742f00aac8e1e1bb628232383c35e67f4a41e4e
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_MouldOtherInBillList.html
@@ -1,4 +1,4 @@
f<!DOCTYPE html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -16,6 +16,7 @@
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/soulTable.slim.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
@@ -31,11 +32,11 @@
                    <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-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>-->
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
@@ -54,18 +55,54 @@
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">组织名称</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HStockOrgName" id="HStockOrgName" 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-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </div>
                                </div>-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label">部门信息</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HDept" id="HDept" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料代码</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">器具代码</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HModelNumber" id="HModelNumber" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">仓库</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HWhName" id="HWhName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">往来单位</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HSupName" id="HSupName" style="width:190px;">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
@@ -85,6 +122,7 @@
            </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>
@@ -94,7 +132,7 @@
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
@@ -104,6 +142,7 @@
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
                , soulTable = layui.soulTable
            //查询条件
            var sWhere = "";
            var option = [];
@@ -147,71 +186,75 @@
                    , cellMinWidth: 90
                    , limits: [50, 500, 5000, 20000]
                    , limit: 50
                    , done: function (res, curr, count) {
                        soulTable.render(this);
                    }
                    , 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: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true }
                        , { field: '往来类型名称', title: '往来类型', width: 200 }
                        , { field: 'HSupID', title: 'HSupID', width: 200, hide: true }
                        , { field: '往来单位', title: '往来单位', width: 200 }
                        , { 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: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                        , { field: '部门代码', title: '部门代码', width: 115 }
                        , { 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: '收料仓库ID', title: '收料仓库ID', 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: '制单人', 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 }
                        , { field: '源单类型', title: '源单类型', width: 125 }
                        , { field: 'hmainid', title: '单据ID', hide: true, sort: true }
                        , { field: '日期', title: '日期', width: 125, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>", sort: true }
                        , { field: '单据号', title: '单据号', width: 195, sort: true }
                        , { field: '单据类型', title: '单据类型', width: 110, sort: true }
                        , { field: 'HSupTypeID', title: 'HSupTypeID', width: 200, hide: true, sort: true }
                        , { field: '往来类型名称', title: '往来类型', width: 200, sort: true }
                        , { field: 'HSupID', title: 'HSupID', width: 200, hide: true, sort: true }
                        , { field: '往来单位', title: '往来单位', width: 200, sort: true }
                        , { field: 'HWHID', title: 'HWHID', width: 200, hide: true, sort: true }
                        , { field: '仓库代码', title: '仓库代码', width: 125, sort: true }
                        , { field: '仓库', title: '仓库', width: 125, sort: true }
                        , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true, sort: true }
                        , { field: '领料人代码', title: '领料人代码', width: 180, sort: true }
                        , { field: '领料人', title: '领料人', width: 125, sort: true }
                        , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true, sort: true }
                        , { field: '发料人代码', title: '发料人代码', width: 180, sort: true }
                        , { field: '发料人', title: '发料人', width: 125, sort: true }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true }
                        , { field: '部门代码', title: '部门代码', width: 115, sort: true }
                        , { field: '部门', title: '部门', width: 125, sort: true }
                        , { field: '摘要', title: '摘要', width: 125, sort: true }
                        , { field: '表头备注', title: '表头备注', width: 125, sort: true }
                        , { field: '内部单据号', title: '内部单据号', width: 115, sort: true }
                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true, sort: true }
                        , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true, sort: true }
                        , { field: '模具代码', title: '器具代码', width: 125, sort: true }
                        , { field: '模具名称', title: '器具名称', width: 125, sort: true }
                        , { field: '规格型号', title: '规格型号', width: 125, sort: true }
                        , { field: 'Hunitid', title: 'Hunitid', width: 200, hide: true, sort: true }
                        //, { field: '计量单位代码', title: '计量单位代码', width: 125 , sort: true}
                        //, { field: '计量单位', title: '计量单位', width: 125 , sort: true}
                        , { field: '库存组织', title: '库存组织', width: 125, sort: true }
                        , { field: '收料仓库ID', title: '收料仓库ID', width: 200, hide: true, sort: true }
                        , { field: '收料仓库代码', title: '收料仓库代码', width: 125, sort: true }
                        , { field: '收料仓库', title: '收料仓库', width: 125, sort: true }
                        , { field: 'HSPID', title: 'HSPID', width: 200, hide: true, sort: true }
                        , { field: '仓位代码', title: '仓位代码', width: 125, sort: true }
                        , { field: '仓位', title: '仓位', width: 125, sort: true }
                        , { field: '应发数量', title: '应发数量', width: 125, sort: true }
                        , { field: '实发数量', title: '实发数量', width: 125, sort: true }
                        , { field: '单价', title: '单价', width: 125, sort: true }
                        , { field: '金额', title: '金额', width: 125, sort: true }
                        , { field: '设计寿命', title: '设计寿命', width: 125, sort: true }
                        , { field: '累积使用寿命', title: '累积使用寿命', width: 125, sort: true }
                        , { field: '剩余寿命', title: '剩余寿命', width: 125, sort: true }
                        , { field: '关联数量', title: '关联数量', width: 125, sort: true }
                        , { field: '表体备注', title: '表体备注', width: 125, sort: true }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 125, sort: true }
                        , { field: '制单人', title: '制单人', width: 125, sort: true }
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '审核人', title: '审核人', width: 125, sort: true }
                        , { field: '审核日期', title: '审核日期', width: 200, templet: "<div>{{d.审核日期 ==null ? '':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '修改人', title: '修改人', width: 125, sort: true }
                        , { field: '修改日期', title: '修改日期', width: 200, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '关闭人', title: '关闭人', width: 125, sort: true }
                        , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '作废人', title: '作废人', width: 125, sort: true }
                        , { field: '作废日期', title: '作废日期', width: 200, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '行关闭人', title: '行关闭人', width: 125, sort: true }
                        , { field: '关闭类型', title: '关闭类型', width: 125, sort: true }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true, sort: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true, sort: true }
                        , { field: '源单单号', title: '源单单号', width: 125, sort: true }
                        , { field: '源单类型', title: '源单类型', width: 125, sort: true }
                    ]]
                };
            }
@@ -402,17 +445,42 @@
            //#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 + "'";
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                var HStockOrgName = $("#HStockOrgName").val(); //组织
                var HBillNo = $("#HBillNo").val(); //单据号
                var HDept = $("#HDept").val();       //部门信息
                var HMaterNumber = $("#HMaterNumber").val();   //物料代码
                var HModelNumber = $("#HModelNumber").val();    //器具代码
                var HWhName = $("#HWhName").val();  //仓库名称
                var HSupName = $("#HSupName").val();    //往来单位
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HDate1) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HDate1 + "'";
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                }
                if (HStockOrgName) {
                    sWhere += " and åº“存组织 like '%" + HStockOrgName + "%'";
                }
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HDept) {
                    sWhere += " and éƒ¨é—¨ like '%" + HDept + "%'";
                }
                if (HMaterNumber) {
                    sWhere += " and ç‰©æ–™ä»£ç  like '%" + HMaterNumber + "%'";
                }
                if (HModelNumber) {
                    sWhere += " and æ¨¡å…·ä»£ç  like '%" + HModelNumber + "%'";
                }
                if (HWhName) {
                    sWhere += " and ä»“库 like '%" + HWhName + "%'";
                }
                if (HSupName) {
                    sWhere += " and å¾€æ¥å•位 like '%" + HSupName + "%'";
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
@@ -420,9 +488,15 @@
            //#endregion
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶
            function set_ClearQuery() {
                $("#HDate").val("");//开始日期
                $("#HDate1").val("");//结束日期
                $("#HBillNo").val("");//单据号
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HBillNo").val("");
                $("#HDept").val("");
                $("#HMaterNumber").val("");
                $("#HModelNumber").val("");
                $("#HWhName").val("");
                $("#HSupName").val("");
                $("#HStockOrgName").val("");
                sWhere = "";
                get_Display(sWhere);
            }