QueryComplaint.cshtml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. 
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta charset="utf-8">
  9. <title>中联区卫投诉登记</title>
  10. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  11. <link href="~/Content/Scripts/plugins/mui/css/mui.css" rel="stylesheet" />
  12. <script src="~/Content/Scripts/jquery.min.js"></script>
  13. <script src="~/Content/Scripts/plugins/mui/js/mui.js"></script>
  14. <link href="~/Content/Scripts/plugins/mui/css/mui.picker.all.css" rel="stylesheet" />
  15. <script src="~/Content/Scripts/plugins/mui/js/mui.picker.all.js"></script>
  16. <script src="~/Content/Scripts/plugins/mui/js/iconfont.deal.js"></script>
  17. </head>
  18. <body>
  19. <style>
  20. .mui-card-footer {
  21. max-height: 15px;
  22. }
  23. .mui-card-content {
  24. display: flex;
  25. flex-direction: row;
  26. align-items: center;
  27. justify-content: center;
  28. }
  29. .we {
  30. display: flex;
  31. flex-direction: row;
  32. align-items: center;
  33. justify-content: space-between;
  34. width: 100%;
  35. }
  36. .ncs {
  37. display: flex;
  38. flex-direction: column;
  39. align-items: center;
  40. justify-content: center;
  41. }
  42. .boxx {
  43. flex: 1;
  44. height: 60px;
  45. align-self: flex-start;
  46. }
  47. .overf {
  48. word-break: break-all;
  49. display: -webkit-box;
  50. -webkit-box-orient: vertical;
  51. overflow: hidden;
  52. text-overflow: ellipsis;
  53. }
  54. .icon {
  55. width: 2.5em;
  56. height: 2.5em;
  57. vertical-align: -0.15em;
  58. fill: currentColor;
  59. overflow: hidden;
  60. }
  61. </style>
  62. <!-- 主界面菜单同时移动 -->
  63. <!-- 侧滑导航根容器 -->
  64. <div class="mui-off-canvas-wrap mui-draggable mui-scalable">
  65. <!-- 主页面容器 -->
  66. <aside class="mui-off-canvas-right mui-transitioning" id='sss'>
  67. <div id="offCanvasSideScroll" class="mui-scroll-wrapper">
  68. <div class="mui-scroll">
  69. <!-- 菜单具体展示内容 -->
  70. <h5 class="mui-content-padded">投诉种类</h5>
  71. <ul class="mui-table-view mui-table-view-chevron" id="tab">
  72. <li class='mui-table-view-cell' style='height:47px;padding-right: 0px'><div class='mui-input-row mui-radio' style="bottom:25%"><label>全部</label><input name='radio' id='' type='radio'></div></li>
  73. </ul>
  74. <h5 class="mui-content-padded">时间</h5>
  75. <button id="dateBegin" style="padding-bottom:1px;padding-top:1px" data-options="{}" class="btn mui-btn mui-btn-block">选择日期时间 ...</button>
  76. <p style="margin-left: 10px;">至</p>
  77. <button id="dateEnd" style="padding-bottom:1px;padding-top:1px;margin-bottom:50px" data-options="{}" class="btn mui-btn mui-btn-block">选择日期时间 ...</button>
  78. <a id="Type" style="display:none"></a>
  79. </div>
  80. </div>
  81. <nav class="mui-bar mui-bar-tab">
  82. <a class="mui-tab-item mui-active">
  83. <button id="result" type="button" style="width: 200px;" data-loading-text="提交中" class="mui-btn mui-btn-primary">确认</button>
  84. </a>
  85. </nav>
  86. </aside>
  87. <div class="mui-inner-wrap mui-transitioning">
  88. <header class="mui-bar mui-bar-nav">
  89. <a class="mui-pull-left"><img style="width: 45px;margin-top: 10px;" src="/Content/Images/zlpng.png" /></a>
  90. <h1 class="mui-title">投诉记录</h1>
  91. <button onclick="QueryC()" class="mui-btn mui-btn-blue mui-btn-link mui-pull-right">重置</button>
  92. </header>
  93. <nav class="mui-bar mui-bar-tab" style="touch-action:none; ">
  94. <a class="mui-tab-item " id="NewComp">
  95. <span class="mui-icon mui-icon-compose"></span>
  96. <span class="mui-tab-label">新投诉</span>
  97. </a>
  98. <a class="mui-tab-item mui-active">
  99. <span class="mui-icon mui-icon-chatboxes"></span>
  100. <span class="mui-tab-label">投诉记录</span>
  101. </a>
  102. <a class="mui-tab-item" id="ComplaintUser">
  103. <span class="mui-icon mui-icon-contact"></span>
  104. <span class="mui-tab-label">我的</span>
  105. </a>
  106. </nav>
  107. <!-- 主页面内容容器 -->
  108. <div class="mui-content mui-scroll-wrapper" id="scr1">
  109. <div class="mui-scroll">
  110. <!-- 主界面具体展示内容 -->
  111. <ul class="mui-table-view mui-grid-view mui-grid-9" style="margin-top: 2px;margin-bottom: 2px;height: 40px;">
  112. <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" style="bottom: 10px;padding-bottom: 0px;">
  113. <a href="#middlePopover">状态</a>
  114. </li>
  115. <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3" style="bottom: 10px;float: right;padding-bottom: 0px;">
  116. <a href="#sss">更多筛选</a>
  117. </li>
  118. </ul>
  119. <div class="mui-input-row mui-search" style="margin-top: 15px;">
  120. <input style="font-size:15px" id="search" type="search" class="mui-input-clear" placeholder="输入投诉标题">
  121. </div>
  122. <div id="MyComplaint">
  123. </div>
  124. </div>
  125. <div class="mui-off-canvas-backdrop"></div>
  126. </div>
  127. </div>
  128. </div>
  129. <div id="middlePopover" class="mui-popover" style="width: 160px;">
  130. <ul class="mui-table-view mui-table-view-radio">
  131. <li class="mui-table-view-cell">
  132. <a class="mui-navigate-right" onclick="AddStatus('')">全部</a>
  133. </li>
  134. <li class="mui-table-view-cell ">
  135. <a class="mui-navigate-right" onclick="AddStatus(0)">未处理</a>
  136. </li>
  137. <li class="mui-table-view-cell">
  138. <a class="mui-navigate-right" onclick="AddStatus(1)">处理中</a>
  139. </li>
  140. <li class="mui-table-view-cell">
  141. <a class="mui-navigate-right" onclick="AddStatus(2)">已处理</a>
  142. </li>
  143. </ul>
  144. <a id="status" style="display:none"></a>
  145. </div>
  146. <script type="text/javascript">
  147. var t;
  148. $(document).ready(function () {
  149. Load();
  150. QueryComplaint();
  151. });
  152. (function ($) {
  153. mui.init({
  154. pullRefresh: {
  155. container: "#scr1",//下拉刷新容器标识,querySelector能定位的css选择器均可,比如:id、.class等
  156. down: {
  157. style: 'circle',//必选,下拉刷新样式,目前支持原生5+ ‘circle’ 样式
  158. auto: false,//可选,默认false.首次加载自动上拉刷新一次
  159. callback: pullfresh//必选,刷新函数,根据具体业务来编写,比如通过ajax从服务器获取新数据;
  160. }
  161. }
  162. });
  163. mui('#scr1').scroll();
  164. mui('#offCanvasSideScroll').scroll();
  165. ///实例化日期组件
  166. var btns = $('.btn');
  167. btns.each(function (i, btn) {
  168. btn.addEventListener('tap', function () {
  169. var _self = this;
  170. if (_self.picker) {
  171. _self.picker.show(function (rs) {
  172. btn.innerHTML = rs.text;
  173. _self.picker.dispose();
  174. _self.picker = null;
  175. });
  176. } else {
  177. var optionsJson = this.getAttribute('data-options') || '{}';
  178. var options = JSON.parse(optionsJson);
  179. var id = this.getAttribute('id');
  180. _self.picker = new $.DtPicker(options);
  181. _self.picker.show(function (rs) {
  182. /*
  183. * rs.value 拼合后的 value
  184. * rs.text 拼合后的 text
  185. * rs.y 年,可以通过 rs.y.vaue 和 rs.y.text 获取值和文本
  186. * rs.m 月,用法同年
  187. * rs.d 日,用法同年
  188. * rs.h 时,用法同年
  189. * rs.i 分(minutes 的第二个字母),用法同年
  190. */
  191. btn.innerHTML = rs.text;
  192. _self.picker.dispose();
  193. _self.picker = null;
  194. });
  195. }
  196. }, false);
  197. })
  198. })(mui);
  199. function pullfresh() {
  200. setTimeout(function () {
  201. $("#MyComplaint").empty();
  202. QueryComplaint();
  203. mui('#scr1').pullRefresh().endPulldownToRefresh();
  204. }, 1500);
  205. }
  206. function Load() {
  207. //获取投诉种类
  208. mui.ajax('/Complaint/GetCodeCombobox/?ClassificationID=B0BF0EDD-37D7-47D4-9ED9-9D0F2DDCA6A0', {
  209. data: {
  210. },
  211. dataType: 'json',//服务器返回json格式数据
  212. type: 'post',//HTTP请求类型
  213. timeout: 10000,//超时时间设置为10秒;
  214. headers: { 'Content-Type': 'application/json' },
  215. success: function (data) {
  216. $.each(data, function (idx, json) {
  217. $("#tab").append("<li class='mui-table-view-cell' style='height:47px;padding-right: 0px;' ><div class='mui-input-row mui-radio' style='bottom:15%'><label>" + json.显示名 + "</label><input name='radio' id=" + json.ID + " type='radio'></div></li>");
  218. });
  219. },
  220. error: function (xhr, type, errorThrown) {
  221. console.log(type);
  222. }
  223. });
  224. ///进入详细页面
  225. mui("#MyComplaint").on('tap', 'div', function () {
  226. var id = this.id;
  227. window.location.href = "/Complaint/ComplaintDetail/" + id;
  228. });
  229. ///进入个人信息
  230. document.getElementById('ComplaintUser').addEventListener('tap', function () {
  231. //mui.openWindow({
  232. // url: '/Complaint/ComplaintUser'
  233. //});
  234. window.location.href = '/Complaint/ComplaintUser'
  235. });
  236. ///进入新投诉
  237. document.getElementById('NewComp').addEventListener('tap', function () {
  238. //mui.openWindow({
  239. // url: '/Complaint/NewComplaint'
  240. //});
  241. window.location.href = '/Complaint/NewComplaint'
  242. });
  243. ///筛选条件
  244. document.getElementById('result').addEventListener('tap', function () {
  245. var typeCode = $('input:radio:checked').attr("id");
  246. $("#Type").html(typeCode);
  247. $("#MyComplaint").empty();
  248. QueryComplaint();
  249. mui('.mui-off-canvas-wrap').offCanvas('show');
  250. });
  251. $("#search").bind('change', function () {
  252. $("#MyComplaint").empty();
  253. QueryComplaint();
  254. })
  255. }
  256. function QueryC() {
  257. //mui.openWindow({
  258. // url: '/Complaint/QueryComplaint',
  259. // show: {
  260. // autoShow: false
  261. // }, waiting: {
  262. // autoShow: true,//自动显示等待框,默认为true
  263. // title: '正在加载...',//等待对话框上显示的提示内容
  264. // }
  265. //});
  266. window.location.href = '/Complaint/QueryComplaint'
  267. }
  268. //重置
  269. function defaul() {
  270. }
  271. ///处理状态
  272. function AddStatus(status) {
  273. $("#status").html(status);
  274. $("#MyComplaint").empty();
  275. QueryComplaint();
  276. mui('#middlePopover').popover('hide');
  277. }
  278. ///按照条件查询投诉
  279. function QueryComplaint() {
  280. t = mui.showLoading("加载中....", 'div');
  281. var status = $("#status").html();//取得状态
  282. var Type = $("#Type").html();//取得投诉类型
  283. var dateBegin = $("#dateBegin").html();///开始时间
  284. var dateEnd = $("#dateEnd").html();///结束时间
  285. var search = $("#search").val();///搜索内容
  286. var url = "/Complaint/QueryPersonelComplaint";
  287. $.post(url, { "status": status, "Type": Type, "dateBegin": dateBegin, "dateEnd": dateEnd, "search": search }, function (data) {
  288. $.each(data, function (idx, json) {
  289. var type2;
  290. if (json.状态 == "0") {
  291. type2 = "daichuli";
  292. }
  293. if (json.状态 == "1") {
  294. type2 = "chulizhong";
  295. }
  296. if (json.状态 == "2") {
  297. type2 = "yiwancheng";
  298. }
  299. var src = "/Content/Images/zlpng.png";
  300. if (json.附件路径 != null && json.附件路径 != "") {
  301. src = json.附件路径;
  302. }
  303. $("#MyComplaint").append("<div id='" + json.ID + "' class='mui-card' style='margin: 0px;margin-top: 5px;'><div class='mui-card-content'><div style='width:30%;margin:2px 10px 2px 2px'><img src='" + src + "' style='width:100%;' ></div><div style='flex:1'><div class='ncs'><div class='we'><div class='overf' style='-webkit-line-clamp: 1;width:150px;margin-top:10px'>" + json.投诉事件 + "</div><div style='margin-right:5px'><svg class='icon' aria-hidden='true'><use xlink:href='#icon-" + type2 + "'></use></svg></div></div><div class='boxx'><p class='overf' style='-webkit-line-clamp: 2;'>" + json.投诉描述 + "</p></div><div class='we'><div><p>" + json.显示名 + "</p></div><div><p style='margin-right:5px'>" + json.投诉时间 + "</p></div></div></div></div></div></div>");
  304. });
  305. mui.hideLoading(t);
  306. }).error(function (xhr, errorText, errorType) {
  307. });;
  308. }
  309. </script>
  310. </body>
  311. </html>