| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>索要记录</title>
- <script src="../Script/Common/huayi.load.js"></script>
- <link rel="stylesheet" href="../css/bootstrap-select.css">
- <script src="../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <style>
- #sqzx th {
- padding: 5px 8px 5px 0;
- text-align: right;
- width: 50px;
- }
- .select {
- width: 150px;
- background-color: #FFF;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 1px;
- color: inherit;
- padding: 6px 12px;
- }
- #sex {
- background-color: #FFF;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 1px;
- color: inherit;
- padding: 6px 12px;
- }
- input {
- background-color: #FFF;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 1px;
- color: inherit;
- padding: 6px 12px;
- }
- #sqzx td {
- padding: 6px 0 5px 10px;
- width: 150px;
- }
- .lxr ul li {
- float: left;
- list-style: none;
- width: 30%;
- margin-bottom: 5px;
- padding-top: 10px;
- }
- .clearFix:after {
- content: "";
- display: block;
- clear: both;
- }
- .form-group {
- padding-left: 40px;
- margin-bottom: 0;
- }
- textarea {
- height: 70px;
- border: 1px solid #ccc;
- border-radius: 1px;
- width: 50%;
- resize: none;
- }
- .textarea_box {
- margin-top: 10px;
- }
- .box_content {
- border-bottom: 1px solid #ccc;
- }
- .tj_content {
- border: 1px solid #e6e6e6;
- border-radius: 5px;
- }
- .t-shade {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- background: rgba(0, 0, 0, 0.48);
- z-index: 10004;
- display: none;
- }
- .lyxz .shade_k {
- z-index: 10005;
- width: 40%;
- left: 30%;
- position: absolute;
- background-color: rgb(255, 255, 255);
- box-shadow: rgba(0, 0, 0, 0.298039) 1px 1px 50px;
- margin: 20% auto;
- border-radius: 5px;
- }
- .shade_title {
- padding: 0 80px 0 20px;
- height: 42px;
- line-height: 42px;
- border-bottom: 1px solid #eee;
- font-size: 16px;
- color: #FFFFFF;
- overflow: hidden;
- background-color: #00a1cb;
- border-radius: 2px 2px 0 0;
- position: relative;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- }
- .cx {
- display: block;
- }
- .setwin {
- position: absolute;
- right: 15px;
- top: 5px;
- font-size: 0;
- line-height: initial;
- }
- .setwin a {
- position: relative;
- width: 16px;
- height: 16px;
- font-size: 20px;
- color: #fff;
- }
- .xg i {
- font-size: 16px;
- }
- .hidens {
- display: none;
- }
- .inpBox {
- border: 1px solid #cccccc;
- height: 31px;
- width: 220px;
- display: inline-block;
- position: relative;
- vertical-align: middle;
- position: absolute;
- left: 0px;
- top: 8px;
- z-index: 111;
- }
- .selDpart1{
- position: absolute;
- left: 0px;
- top: 30px;
- z-index: 11111;
- width: 220px;
- line-height: 30px;
- background: #FFFFFF;
- display: none;
- }
- #sponsor{
- width: 218px;
- border: 1px solid #00a1cb;
- margin: 0;
- padding: 0;
- list-style: none;
- max-height: 212px;
- overflow-x: hidden;
- overflow-y: scroll;
- }
- #sponsor li{
- margin: 0;
- padding-left: 10px;
- width: 220px;
- height: 30px;
- line-height: 30px;
- list-style: none;
- }
- #sponsor li:hover{
- background: #00a1cb;
- }
- .addTree {
- background: #fff;
- position: absolute;
- width: 100%;
- border: 1px solid darkgrey;
- right: 0;
- top: 29px;
- display: none;
- z-index: 222;
- }
- .xl {
- display: inline-block;
- background: url(../../img/dropDown.png) no-repeat;
- height: 100%;
- background-position: center center;
- width: 20px;
- position: absolute;
- right: 0;
- top: 0px;
- /* background-color: #f7bc8b; */
- cursor: pointer;
- }
- .ztree li span {
- border: none;
- padding: 0;
- }
- .inps {
- width: 217px;
- height: 29px;
- outline: none;
- border: 0;
- border-image-width: 0;
- padding: 0;
- padding-left: 3px;
- }
- .xl {
- display: inline-block;
- background: url(../img/dropDown.png) no-repeat;
- height: 100%;
- background-position: center center;
- width: 20px;
- position: absolute;
- right: 0;
- top: 0px;
- /* background-color: #f7bc8b; */
- cursor: pointer;
- }
- .Cleans {
- display: inline-block;
- width: 20px;
- position: absolute;
- right: 21px;
- top: 8px;
- display: none;
- }
- .Min-width {
- width: 150px;
- }
- .btn-default{
- background: #FFFFFF;
- color: #000000;
- }
- .tool_downs{
- display: flex;
- justify-content: center;
- }
- .tool_downs a{
- list-style: none;
- float: left;
- padding-left: 10px;
- }
- .operation_list{
- width: 270px;
- }
- ul{
- padding: 0;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn>
- <i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</a>>
- <a href="javaScript:;">知识库</a>>
- <a href="" class="nowPosition">新版知识库索要记录</a>
- </sapn>
- </div>
- <div class="dhRight">
- <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div style="padding: 10px;" class="tj_content clearFix">
- <div style="padding: 10px;" class="tj_content clearFix">
- <div>
- <div class="box_content">
- <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <th>关键字:</th>
- <td>
- <input type="text" placeholder="输入关键字" id="key" class="Min-width" />
- </td>
- <th>时间:</th>
- <td >
- <input type="text" id="starttime" class="" placeholder="请选择时间" style="height: 32px;" />
- </td>
- <th>紧急程度:</th>
- <td>
- <select class="select_" id="dealtype">
- <option value="">请选择</option>
- <option value="0">普通</option>
- <option value="1">紧急</option>
- </select>
- </td>
- <th>承办单位:</th>
- <td style="position: relative;">
- <div class="inpBox">
- <input type="text" class="inps" onkeyup="darptSearch()"/>
- <i class="Cleans fa fa-close"></i>
- <i class="xl xl_one"></i>
- <div class="addTree xlAdd">
- <ul id="addTreeDemo" class="ztree"></ul>
- </div>
- </div>
- <div class="selDpart1">
- <ul id="sponsor">
- </ul>
- </div>
- </td>
- <td style="padding-left: 30px;">
- <botton class="btns Seach">搜索</botton>
- <!--<botton class="btns Export">导出</botton>-->
- <!--<botton class="btns add_record">添加</botton>-->
- <!--<botton class="btns Remove">删除</botton>-->
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div>
- <div style="width: 100%;padding: 10px;">
- <table id="orderlist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
- <thead>
- <tr>
- <!--<th data-checkbox="true"></th>-->
- <th data-field="F_Descript" data-formatter="GetCont" data-align="center">文本描述</th>
- <th data-field="F_Level" data-align="center" data-formatter="States">级别</th>
- <th data-field="F_DeptName" data-align="center">承办单位</th>
- <th data-field="F_CreateTime" data-align="center">添加时间</th>
- <th data-field="F_CreateUserName" data-align="center">添加人</th>
- <th data-field="F_SubmitUserName" data-align="center">提交人</th>
- <th data-field="F_SubmitTime" data-align="center">提交时间</th>
- <th data-field="F_LimitTime" data-align="center">时限</th>
- <th data-field="F_WorkOrderId" data-formatter="Dispose" data-align="center" class="operation_list">操作</th>
- </tr>
- </thead>
- <tbody class="list"></tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <input type="hidden" id="PID" />
- <input type="hidden" id="Dpment" />
- </div>
- <script src="../js/bootstrap-select.js"></script>
- <script src="../js/laydate/laydate.js"></script>
- <script src="../My97DatePicker/WdatePicker.js"></script>
- <script src="../js/zTree/jquery.ztree.core.js"></script>
- <script src="../js/search/screen.js"></script>
- <script>
- $(document).ready(function () {
- load();
- var str = helper.request.queryString("str");
- var wid = helper.request.queryString("wid");
- if (wid) {
- $('#tel').val(wid);
- load();
- }
- laydate.render({
- elem: '#starttime' //指定元素
- ,range:'~'
- });
- load();
- });
- $("#orderlist").on("click-row.bs.table", function (e, row, ele) {
- $('.success').removeClass('success'); //去除之前选中的行的,选中样式
- $(ele).addClass('success'); //添加当前选中的 success样式用于区别
- });
- //获取查询信息
- function load() {
- //先销毁表格
- $('#orderlist').bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $("#orderlist").bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "Repository/GetListDemands", //获取数据的Servlet地址
- contentType: "application/x-www-form-urlencoded",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 10, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- //alert(params.pageNumber)
- var param = {
- page: params.pageNumber,
- pagesize: params.pageSize,
- stime: $('#starttime').val() && $('#starttime').val().split(' ~ ')[0], //=开始时间
- etime: $('#starttime').val() && $('#starttime').val().split(' ~ ')[1], //=结束时间
- deptid: $("#PID").val(),//承办单位id
- level: $("#dealtype").val(),//级别
- key:$('#key').val(),
- token: $.cookie("token")
- };
- return param;
- },
- onLoadSuccess: function (data) { //加载成功时执行
- // layer.msg("加载成功");
- //console.log(data);
-
- },
- onLoadError: function () { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
-
- //状态
- function States(val, row) {
- var html = '';
- switch (val + '') {
- case '0':
- html = '普通';
- break;
- case '1':
- html = '紧急';
- break;
- }
- return html;
- }
- function GetCont(val) {
- if (val) {
- var str = '<div '
- if (val.length > 30) {
- str = str + ' title="' + val + '" ';
- val = val.substr(0, 30) + "...";
- }
- return str + '>' + val + '</div>';
- } else {
- return '';
- }
- }
- //格式化操作
- function Dispose(val, row) {
- if(row.F_RepositoryId&&row.F_RepositoryId!=0){
- return '<div class="tool_downs">' +
- '<a href="javascript:;" class="aBtn" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="see_knowledge(' + row.F_RepositoryId +')" title="查看知识库">查看知识库</a>' +
- // '<li><a href="javascript:;" class="aBtn" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="add_knowledge(' + row.F_DemandsId +','+row.F_Deptid+')" title="添加知识库">添加知识库</a></li>' +
- '<a href="javascript:;" class="aBtn" style="margin-left:0px;" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="btn_details(\'' + row.F_DemandsId + '\')" title="详情">详情</a>' +
- '</div>';
- }else{
- return '<div class="tool_downs">' +
- // '<li><a href="javascript:;" class="aBtn" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="see_knowledge(' + row.F_RepositoryId +')" title="查看知识库">查看知识库</a></li>' +
- '<a href="javascript:;" class="aBtn" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="add_knowledge(' + row.F_DemandsId +','+row.F_Deptid+')" title="添加知识库">添加知识库</a>' +
- '<a href="javascript:;" class="aBtn" style="margin-left:0px;" authorize="yes" id="HY_details_' + row.F_DemandsId + '" onclick="btn_details(\'' + row.F_DemandsId + '\')" title="详情">详情</a>' +
- '</div>';
- }
-
- }
- //查看知识库
- function see_knowledge(ids){
- //iframe窗
- layer.open({
- type: 2,
- title: '查看知识库详情',
- area: ['70%', '60%'],
- maxmin:true,
- content: 'newRepositoryDetail.html?ids='+ ids
- });
- }
- //添加到知识库
- function add_knowledge(str,deptid) {
- layer.open({
- type: 2,
- content: "newRepositoryAdd.html?wid=" + str +"&depId="+deptid, //iframe的url,no代表不显示滚动条
- title: '新增知识库',
- area: ['60%', '80%'], //宽高
- });
- }
- //查看详情
- function btn_details(str) {
- layer.open({
- type: 2,
- content: "../CommonHtml/recordDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
- title: '记录详情',
- area: ['60%', '80%'], //宽高
- });
- }
- //编辑
- function btn_edit(str) {
- layer.open({
- type: 2,
- content: ["../CommonHtml/recordEdit.html?wid=" + str,'no'], //iframe的url,no代表不显示滚动条
- title: '编辑记录',
- area: ['60%', '90%'], //宽高
- });
- }
- //删除
- function btn_delete(str) {
- layer.confirm('确定删除记录?', {
- btn: ['是', '否'] //按钮
- }, function () {
- $.post(huayi.config.callcenter_url + "Repository/DelDemands", {
- ids: str,
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- layer.msg("删除成功");
- $("#orderlist").bootstrapTable('refresh');
- }
- })
- });
- }
- //添加记录
- $('.add_record').on('click',function(){
- layer.open({
- type: 2,
- content: "../CommonHtml/addRecord.html" , //iframe的url,no代表不显示滚动条
- title: '添加记录',
- area: ['60%', '80%'], //宽高
- });
- })
- //上传文件
- function upload() {
- if (document.getElementById("upFile").files.length > 0) {
- var formData = new FormData();
- formData.append("upFile", document.getElementById("upFile").files[0]);
- formData.append("token", $.cookie("token"));
- $.ajax({
- url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
- type: "POST",
- data: formData,
- /**
- *必须false才会自动加上正确的Content-Type
- */
- contentType: false,
- /**
- * 必须false才会避开jQuery对 formdata 的默认处理
- * XMLHttpRequest会对 formdata 进行正确的处理
- */
- processData: false,
- success: function (result) {
- document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
- $("#upFile").change(function () {
- upload();
- });
- var r = $.parseJSON(result);
- if (r.state.toLowerCase() == "success") {
- $(".fjnr").text(r.data);
- $("#scfj").show();
- }
- }
- });
- } else {
- layer.confirm('请上传文件!', {
- btn: ['确定']
- });
- }
- }
- //批量删除Remove
- $(".Remove").click(function() {
- var ids = $.map($('#orderlist').bootstrapTable('getSelections'),
- function(row) {
- return row.F_DemandsId;
- });
- /*判断长度*/
- if(ids.length <= 0) {
- layer.confirm('没有可删除的选项!', {
- btn: ['确定'] //按钮
- });
- return;
- }
- layer.confirm('确定要删除吗?',{
- btn:['确定','取消']
- },function(){
- $.post(huayi.config.callcenter_url + "Repository/DelDemands", {
- ids: ids,
- token: $.cookie("token")
- }, function(result) {
- result = JSON.parse(result);
- if(result.state.toLowerCase() == "success") {
- layer.msg("删除成功");
- $("#orderlist").bootstrapTable('refresh');
- }
- })
- })
-
- });
- //来源
- function LY(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
- "token": $.cookie("token"),
- id: 1
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
- })
- }
- })
- }
- //类别
- function LB(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
- "token": $.cookie("token"),
- id: 2
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
- })
- }
- })
- }
- // 主题
- function ZT(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
- "token": $.cookie("token"),
- id: 3
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
- })
- }
- })
- }
-
- function tree() {
- $.get(huayi.config.callcenter_url + 'Department/GetDeptList', {
- "token": $.cookie("token"),
- // "pid": pid
- }, function (result) {
- result = $.parseJSON(result);
- $.fn.zTree.init($("#addTreeDemo"), setting1, result.data); //实例化树形图
- });
- }
- var setting1 = {
- data: {
- key: {
- name: "F_DeptName"
- },
- simpleData: {
- enable: true,
- idKey: "F_DeptId",
- pIdKey: "F_PartentId",
- rootPId: 0
- }
- },
- callback: {
- onClick: zTreeOnClick
- }
- };
- function zTreeOnClick(event, treeId, treeNode) {
- if (treeNode.level >= 1) {
- $('.inps').val(treeNode.F_DeptName);
- $("#PID").val(treeNode.F_DeptId);
- $("#Dpment").val(treeNode.F_DeptId);
- $(".Cleans").show();
- }
- };
- function Close() {
- $(".lyxz").removeClass("cx");
- if ($('audio').length > 0) {
- $('audio')[0].pause();
- }
- }
- </script>
- </body>
- </html>
|