cost.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <!--[if lt IE 9]>
  10. <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
  11. <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
  12. <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
  13. <![endif]-->
  14. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
  15. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
  16. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
  17. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
  18. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
  19. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
  20. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" >
  21. <script type="text/javascript" src="${ctx}/assets/lib/My97DatePicker/WdatePicker.js"></script>
  22. <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
  23. <script type="text/javascript" src="${ctx}/assets/lib/jquery.form/jquery.form.min.js"></script>
  24. <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
  25. <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
  26. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
  27. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
  28. <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
  29. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
  30. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
  31. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  32. <script type="text/javascript" src="${ctx}/assets/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
  33. <!--[if IE 6]>
  34. <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
  35. <script>DD_belatedPNG.fix('*');</script>
  36. <![endif]-->
  37. <script type="text/javascript">
  38. $(function() {
  39. $(window).resize(function(){
  40. $("#jqGrid").setGridWidth($(window).width()-41);
  41. });
  42. $("#jqGrid").jqGrid({
  43. url : '${ctx}/myconsole/complaint/list/getCostPage',
  44. editurl:"${ctx}/myconsole/complaint/register",
  45. mtype : "POST",
  46. datatype : "json",
  47. multiselect: false,
  48. caption1:'费用台账',
  49. prmNames : { //定义表单的主键 // Default valuesprmNames: {page:“page”,rows:“rows”, sort: “sidx”,order: “sord”, search:“_search”, nd:“nd”, npage:null} 当参数为null时不会被发到服务器端
  50. id: "keyid",
  51. oper:"oper",
  52. addoper:"add",
  53. editoper:"edit",
  54. deloper:"del"
  55. },
  56. colModel : [ {
  57. label : '数据编号',
  58. name : 'appealid',
  59. key : true,
  60. editable: false,
  61. hidden:true
  62. },{
  63. label : '流水号',
  64. name : 'serialnumber',
  65. width : 50,
  66. align:'center',
  67. }, {
  68. label : '投诉人',
  69. name : 'tname',
  70. width : 30,
  71. align:'center',
  72. }, {
  73. label : '客诉时间',
  74. name : 'appealdate',
  75. width : 50,
  76. align:'center',
  77. }, {
  78. label : '客诉来源',
  79. name : 'appealsource',
  80. width : 30,
  81. align:'center',
  82. }, {
  83. label : '处理意见',
  84. name : 'doopinion',
  85. width : 50,
  86. align:'center',
  87. },{
  88. label : '费用列支',
  89. hidden:false,
  90. name : 'moneytype',
  91. width : 30,
  92. align:'center',
  93. }, {
  94. label : '费用金额',
  95. name : 'moneynum',
  96. width : 30,
  97. align:'center',
  98. },{
  99. label : '操作',
  100. name:'operMod',
  101. index:'operMod',
  102. align:"center",
  103. width:"20",
  104. sortable:false,
  105. formatter: function (cellvalue, options, rowdata) {
  106. var html ="";
  107. html = "<button class='btn btn-success radius size-S' onclick=seeData('"+rowdata.appealid+"')>查看</button>";
  108. return html;
  109. }
  110. }],
  111. rownumbers : true,//添加左侧行号
  112. viewrecords : true,//是否在浏览导航栏显示记录总数
  113. rowNum : 10,//每页显示记录数
  114. rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  115. autowidth : true,
  116. sortname : 'a.RecordTime',
  117. sortorder : 'desc',
  118. height : 'auto',
  119. pager : "#jqGridPager",
  120. //屏蔽点击任意单元格选中checkbox的问题
  121. beforeSelectRow: function (rowid, e) {
  122. var $myGrid = $(this),
  123. i = $.jgrid.getCellIndex($(e.target).closest('td')[0]),
  124. cm = $myGrid.jqGrid('getGridParam', 'colModel');
  125. return (cm[i].name === 'cb');
  126. }
  127. });
  128. $("#jqGrid").setLabel("rn","序号");
  129. doSearch();
  130. $('#jqGrid').navGrid('#jqGridPager',
  131. {
  132. add : false,
  133. edit : false,
  134. del : false,
  135. search : false,
  136. refresh : false,
  137. view : false,
  138. position : "left",
  139. cloneToTop : true
  140. }
  141. ).navButtonAdd("#jqGridPager",{
  142. caption:'导出',
  143. onClickButton:function(){
  144. var strBeginDate = $('#BeginDate').val();
  145. var strEndDate = $('#EndDate').val();
  146. var strAppealSource = $('#AppealSource').val();
  147. var strFilialeID = $('#FilialeID').val();
  148. var strBusinessHallID = $('#BusinessHallID').val();
  149. var strSalesChannelID = $('#SalesChannelID').val();
  150. var strSalesTypeID = $('#SalesTypeID').val();
  151. $.post("${ctx}/myconsole/complaint/list/excelCostData",{"BeginDate":strBeginDate,"EndDate":strEndDate,"AppealSource":strAppealSource,"FilialeID":strFilialeID,"BusinessHallID":strBusinessHallID,"SalesChannelID":strSalesChannelID,"SalesTypeID":strSalesTypeID},function(data){
  152. var res=eval('(' + data + ')');
  153. if(res.flag){
  154. downFile(res.filepath,res.filename);
  155. }else{
  156. alert("没有数据导出!");
  157. }
  158. })
  159. }
  160. }
  161. );
  162. });
  163. function doSearch(){
  164. $('#search').click(function(){
  165. var strBeginDate = $('#BeginDate').val();
  166. var strEndDate = $('#EndDate').val();
  167. if(strBeginDate==''||strEndDate=='')
  168. {
  169. alert("投诉日期区间不能为空!");
  170. }
  171. else
  172. {
  173. var strAppealSource = $('#AppealSource').val();
  174. var strFilialeID = $('#FilialeID').val();
  175. var strBusinessHallID = $('#BusinessHallID').val();
  176. var strSalesChannelID = $('#SalesChannelID').val();
  177. var strSalesTypeID = $('#SalesTypeID').val();
  178. $("#jqGrid").jqGrid('setGridParam',{
  179. postData:{"BeginDate":strBeginDate,"EndDate":strEndDate,"AppealSource":strAppealSource,"FilialeID":strFilialeID,"BusinessHallID":strBusinessHallID,"SalesChannelID":strSalesChannelID,"SalesTypeID":strSalesTypeID}
  180. }).trigger('reloadGrid');
  181. }
  182. });
  183. }
  184. //查看信息 2017-07-24
  185. function seeData(appealid){
  186. fullOpen("${ctx}/myconsole/complaint/register/seeData?appealid="+appealid);
  187. }
  188. //下载附件
  189. function downFile(filePath,fileName)
  190. {
  191. window.open('${serverURL!}/downloadFile.do?FileDownloadPath='+filePath+'&FileDownloadName='+fileName,'Derek','resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no');
  192. }
  193. function setSalesChannelName()
  194. {
  195. var idData=$('#SalesChannelID').val();
  196. if(idData!='')
  197. {
  198. $('#form1').attr('action','${ctx}/myconsole/complaint/register/getSalesTypeIDData?ParentID='+idData);
  199. $('#form1').ajaxSubmit(setSalesTypeIDData);
  200. }
  201. }
  202. function setCentreCompanyID() {
  203. var filialeID = $("#FilialeID").val();
  204. $("#respondentFilialeID").val(filialeID);
  205. if (filialeID != '') {
  206. var filialeName = $("#FilialeID").find("option:selected").text();
  207. $("#FilialeName").val(filialeName);
  208. $('#form1').attr('action', '${ctx}/myconsole/complaint/register/getFilialeBusinessHallNameData?ParentID=' + filialeID);
  209. $('#form1').ajaxSubmit(setCentreCompanyIDData);
  210. } else {
  211. $("#CentreCompanyID").empty();
  212. $("#FilialeName").val("");
  213. }
  214. }
  215. //回写原因二类字典数据
  216. function setCentreCompanyIDData(data) {
  217. $("#BusinessHallID").empty();
  218. // $("#BusinessHallID").append("<option value=''>请选择</option>");
  219. $("#BusinessHallID").append(data);
  220. }
  221. function setBusinessHallName() {
  222. var BusinessHallID = $("#BusinessHallID").val();
  223. if (BusinessHallID != '') {
  224. var BusinessHallName = $("#BusinessHallID").find("option:selected").text();
  225. $("#BusinessHallName").val(BusinessHallName);
  226. } else {
  227. $("#BusinessHallName").val("");
  228. }
  229. }
  230. //回写销售方式数据
  231. function setSalesTypeIDData(data)
  232. {
  233. $("#SalesTypeID").empty();
  234. $("#SalesTypeID").append("<option value=''>请选择</option>");
  235. $("#SalesTypeID").append(data);
  236. //动态绑定数据一定要加这句话否则没有效果
  237. //$(".selectpicker" ).selectpicker('refresh');
  238. }
  239. </script>
  240. <title>我的桌面</title>
  241. </head>
  242. <body>
  243. <div>
  244. <div style="text-align:center;height:30px;padding-top:10px;">
  245. <form id="form1" method="post" class="form-horizontal" role="form">
  246. <input type="hidden" id="RespondentTypeName" name="RespondentTypeName" value="主"/>
  247. <input type="hidden" id="Modal_Main" name="Modal_Main" value="appeal"/>
  248. <input type="hidden" id="FilialeName" name="FilialeName" value=""/>
  249. <input type="hidden" id="BusinessHallName" name="BusinessHallName" value=""/>
  250. <input type="hidden" id="SalesChannelName" name="SalesChannelName" value=""/>
  251. <input type="hidden" id="SalesTypeName" name="SalesTypeName" value=""/>
  252. <input type="hidden" id="RespondentModel" name="RespondentModel" value="respondent"/>
  253. <input type="hidden" id="respondentFilialeID" name="respondent.FilialeID" value=""/>
  254. <table>
  255. <tr>
  256. <td valign="top" style="padding-top: 5px;text-align: left;">
  257. <label class="radio-inline" style="font-weight:700">
  258. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;客诉日期 从:
  259. </label>
  260. <input type="text" class="form-control" value="" placeholder="" id="BeginDate" name="BeginDate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',el:'BeginDate',maxDate:'#F{$dp.$D(\'EndDate\')}'})" title="选择开始日期" vmode="" vdisp="开始日期" vtype="string" readonly>
  261. <label class="radio-inline" style="font-weight:700">
  262. &nbsp;至:
  263. </label>
  264. <input type="text" class="form-control" value="" placeholder="" id="EndDate" name="EndDate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',el:'EndDate',minDate:'#F{$dp.$D(\'BeginDate\')}',maxDate:new Date()})" title="选择结束日期" vmode="" vdisp="结束日期" vtype="string" readonly>
  265. <label class="radio-inline" style="font-weight:700">
  266. 客诉来源:
  267. </label>
  268. <select id="AppealSource" name="AppealSource" class="form-control" vmode="" vdisp="客诉来源" vtype="string">
  269. <option value="">请选择</option>
  270. ${appealSource!''}
  271. </select>
  272. <label class="radio-inline" style="font-weight:700">
  273. 机构:
  274. </label>
  275. <select id="FilialeID" name="FilialeID" onChange=setCentreCompanyID() class="form-control" vmode='' vdisp='机构' vtype='string'>
  276. ${filialeID!''}
  277. </select>
  278. <label class="radio-inline" style="font-weight:700">
  279. 部门:
  280. </label>
  281. <select id="BusinessHallID" name="BusinessHallID" class="form-control" vmode="" vdisp="被诉网点" vtype="string">
  282. ${businessHallID!''}
  283. </select>
  284. <label class="radio-inline" style="font-weight:700">
  285. 业务渠道:
  286. </label>
  287. <select id="SalesChannelID" name="SalesChannelID" onChange=setSalesChannelName() class="selectpicker form-control" data-live-search="true" vmode="" vdisp="业务渠道" vtype="string">
  288. <option value="">请选择</option>
  289. ${dic_saleschannelForID!''}
  290. </select>
  291. <label class="radio-inline" style="font-weight:700">
  292. 二级渠道:
  293. </label>
  294. <select id="SalesTypeID" name="SalesTypeID" class="selectpicker form-control" data-live-search="true" vmode="" vdisp="二级渠道" vtype="string">
  295. <option value="">请选择</option>
  296. </select>
  297. </td>
  298. <td valign="top" style="padding-top: 1px;">
  299. <label>
  300. <input type="button" id="search" value="搜 索" style="width: 50px;" class="form-control gui-input form-control input-sm btn btn-primary btn-block">
  301. <b class="tooltip tip-left-top"></b>
  302. <label for="cardno" class="field-icon"><i class="fa fa-credit-card"></i>
  303. </label>
  304. </label>
  305. </td>
  306. </tr>
  307. </table>
  308. </form>
  309. </div>
  310. <div class="page-container">
  311. <table id="jqGrid"></table>
  312. <div id="jqGridPager"></div>
  313. </div>
  314. </div>
  315. </body>
  316. </html>