list.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>用户列表</title>
  5. <meta charset="UTF-8">
  6. <link rel="stylesheet" href="https://yun.eqbidding.com/extjs/extjs6.0/classic/theme-crisp/resources/theme-crisp-all.css"></link>
  7. <script src="https://yun.eqbidding.com/extjs/extjs6.0/ext-all.js"></script>
  8. <script src="https://yun.eqbidding.com/extjs/extjs6.0/classic/locale/locale-zh_CN.js"></script>
  9. <script type="text/javascript" src="/web-cp-all/resource/js/app.js"></script>
  10. <script type="text/javascript" src="/web-cp-all/resource/js/jquery.js"></script>
  11. <script type="text/javascript">
  12. var dataStore;
  13. var searchFormPanel;
  14. var listGridPanel;
  15. Ext.onReady(function() {
  16. //初始化列表数据
  17. dataStore = Ext.create('Ext.data.Store', {
  18. autoLoad : true,
  19. pageSize : 20,
  20. sorters : {
  21. property : 'created',
  22. direction : 'DESC'
  23. },
  24. proxy : {
  25. type : "ajax",
  26. url : "/web-cp-all/cp/pm/un_line/list_data",
  27. reader : {
  28. type : 'json',
  29. root : 'page.list',
  30. totalProperty : 'page.totalRow'
  31. }
  32. },
  33. listeners : {
  34. 'beforeload' : function(store, op, options) {
  35. var params = searchFormPanel.getForm().getValues();
  36. Ext.apply(dataStore.proxy.extraParams, params);
  37. }
  38. }
  39. }); //#dataStore
  40. var comboxStore = Ext.create('Ext.data.Store', {
  41. fields: ['abbr', 'name'],
  42. data : [
  43. {"abbr":"1", "name":"已支付"},
  44. {"abbr":"0", "name":"未支付"},
  45. {"abbr":"2", "name":"已驳回"}
  46. ]
  47. }); //#comboxStore
  48. searchFormPanel = Ext.create('Ext.form.Panel', {
  49. frame : true,
  50. title : "搜索条件",
  51. style : {
  52. marginBottom : '3px'
  53. },
  54. bodyStyle : {
  55. padding : '3px'
  56. },
  57. buttonAlign : "center",
  58. collapsible : true,
  59. defaultType : "textfield",
  60. items : [
  61. {
  62. xtype : "container",
  63. layout : "hbox",
  64. items : [
  65. {
  66. xtype : "combo",
  67. fieldLabel : "支付状态",
  68. name : "srh.is_pay",
  69. editable : false,
  70. store : comboxStore,
  71. displayField : 'name',
  72. valueField : 'abbr',
  73. labelAlign : 'right'
  74. },
  75. {
  76. xtype : "textfield",
  77. fieldLabel : "用户名称",
  78. name : "srh.receive_name",
  79. labelAlign : 'right'
  80. },
  81. {
  82. xtype : "textfield",
  83. fieldLabel : "手机号",
  84. name : "srh.receive_mobile",
  85. labelAlign : 'right'
  86. },
  87. {
  88. xtype : "textfield",
  89. fieldLabel : "公司名称",
  90. name : "srh.company_name",
  91. labelAlign : 'right'
  92. },
  93. {
  94. xtype : "textfield",
  95. fieldLabel : "标的名称",
  96. name : "srh.item_name",
  97. labelAlign : 'right'
  98. }
  99. ]
  100. }
  101. ],
  102. buttons : [
  103. {
  104. text : "搜索",
  105. icon : jcapp.getIcon("magnifier.png"),
  106. handler : function() {
  107. dataStore.load({
  108. //params:params()
  109. });
  110. dataStore.sync();
  111. }
  112. },{
  113. text : "重置",
  114. icon : jcapp.getIcon("arrow_refresh.png"),
  115. handler : function() {
  116. this.up('form').getForm().reset();
  117. dataStore.load({});
  118. dataStore.sync();
  119. }
  120. }
  121. ]
  122. }); //#searchFormPanel
  123. listGridPanel = Ext.create('Ext.grid.Panel', {
  124. title : '线下报名列表',
  125. dockedItems : [
  126. {
  127. xtype : 'pagingtoolbar',
  128. store : dataStore,
  129. dock : 'bottom',
  130. displayInfo : true
  131. }
  132. ],
  133. store : dataStore,
  134. columns : [
  135. {
  136. text : 'kid',
  137. name : 'kid',
  138. align : 'center',
  139. hidden : true
  140. },{
  141. text : '用户名称',
  142. topTip : '用户名称',
  143. align : 'center',
  144. dataIndex : 'receive_name',
  145. flex : 1
  146. },{
  147. text : '公司名称',
  148. topTip : '公司名称',
  149. align : 'center',
  150. dataIndex : 'company_name',
  151. flex : 1
  152. },{
  153. text : '手机号',
  154. topTip : '手机号',
  155. align : 'center',
  156. dataIndex : 'receive_mobile',
  157. flex : 1
  158. },{
  159. text : '身份证号',
  160. tooltip : '身份证号',
  161. align : 'center',
  162. dataIndex : 'id_card',
  163. flex : 1
  164. },{
  165. text : '标的名称',
  166. tooltip : '标的名称',
  167. align : 'center',
  168. dataIndex : 'item_name',
  169. flex : 1
  170. },
  171. {
  172. text : '竞买号',
  173. tooltip : '竞买号',
  174. align : 'center',
  175. dataIndex : 'code',
  176. flex : 1,
  177. renderer : function(val){
  178. if(val == undefined || val == '' ){
  179. return '';
  180. }else{
  181. return val;
  182. }
  183. }
  184. },
  185. {
  186. text : '支付凭证',
  187. topTip : '支付凭证',
  188. align : 'center',
  189. dataIndex : 'file_id',
  190. flex : 1,
  191. renderer : function(val){
  192. if(val == undefined || val == ''){
  193. return '没有相关图片信息!';
  194. }else{
  195. return '<img style="width:100%;height:100%;" onclick="enlarge(\''+val+'\')" src="https://www.eqbidding.com/web-cp-all/img_pm/img/'+val+'" />';
  196. }
  197. }
  198. },{
  199. text : '支付状态',
  200. topTip : '支付状态',
  201. align : 'center',
  202. dataIndex : 'is_pay',
  203. flex : 1,
  204. renderer : function(val){
  205. if(val=='1'){
  206. return "已支付";
  207. }else if(val == '0'){
  208. return "未支付";
  209. }else if(val == '2'){
  210. return "已驳回";
  211. }
  212. }
  213. },{
  214. text : '报名时间',
  215. tooltip : '报名时间',
  216. align : 'center',
  217. dataIndex : 'created',
  218. flex : 1
  219. },{
  220. xtype : "actioncolumn",
  221. align : "center",
  222. text : '操作',
  223. flex : 1,
  224. items : [
  225. {
  226. xtype : 'button',
  227. tooltip : '确认支付',
  228. icon : jcapp.getIcon("user_tick.png"),
  229. handler : function(grid, rowIndex, colIndex) {
  230. var rec = grid.getStore().getAt(rowIndex);
  231. if(rec.get('is_pay') == '2'){
  232. Ext.Msg.alert("提示", "已驳回不能确认支付!");
  233. }else{
  234. myPass(rec.get('kid'));
  235. }
  236. }
  237. },{
  238. xtype : 'button',
  239. tooltip : '驳回',
  240. icon : jcapp.getIcon("user_cross.png"),
  241. handler : function(grid, rowIndex, colIndex) {
  242. var rec = grid.getStore().getAt(rowIndex);
  243. myReject(rec.get('kid'));
  244. /*if(rec.get('is_pay') == '1'){
  245. Ext.Msg.alert("提示", "已支付不能驳回!");
  246. }else{
  247. myReject(rec.get('kid'));
  248. }*/
  249. }
  250. }
  251. ]
  252. }
  253. ],
  254. viewConfig:{
  255. enableTextSelection:true
  256. }
  257. });
  258. searchFormPanel.render(Ext.getBody());
  259. listGridPanel.render(Ext.getBody());
  260. });
  261. function myPass(kid){
  262. Ext.Msg.confirm("提示:", "是否确认已支付?", function(e) {
  263. if (e == "yes") {
  264. Ext.Ajax.request({
  265. url : "/web-cp-all/cp/pm/un_line/pass?kid=" + kid ,
  266. success : function(response) {
  267. Ext.Msg.alert("操作","确认成功");
  268. dataStore.load();
  269. },
  270. failure : function(response) {
  271. Ext.Msg.alert("提示", "操作失败!");
  272. }
  273. });
  274. }
  275. });
  276. }
  277. function myReject(kid){
  278. Ext.Msg.confirm("提示:", "是否确认驳回?", function(e) {
  279. if (e == "yes") {
  280. Ext.Ajax.request({
  281. url : "/web-cp-all/cp/pm/un_line/reject?kid=" + kid ,
  282. success : function(response) {
  283. Ext.Msg.alert("操作","确认成功");
  284. dataStore.load();
  285. },
  286. failure : function(response) {
  287. Ext.Msg.alert("提示", "操作失败!");
  288. }
  289. });
  290. }
  291. });
  292. }
  293. function enlarge(file_id){
  294. var html = '<div style="width:100%;height:100%;"><img id="videoSource" style="width:100%;height:100%;" src="https://www.eqbidding.com/web-cp-all/img_pm/img/'+file_id+'" /><div>';
  295. songPlayer.show();
  296. Ext.getCmp("playerPanel").body.update(html);
  297. }
  298. var playerForm=new Ext.Panel({
  299. xtype : 'panel',
  300. id : 'playerPanel',
  301. width:600,
  302. height:600,
  303. html:""
  304. })
  305. var songPlayer = new Ext.Window({
  306. layout : 'fit',
  307. width:600,
  308. height:600,
  309. modal : true,
  310. frame: true,
  311. closable : false,
  312. items : [playerForm] ,
  313. buttons: [{
  314. id : 'ensure2',
  315. text: '确定',
  316. handler: function() {
  317. songPlayer.hide();
  318. Ext.getCmp("playerPanel").body.update("");
  319. }
  320. },{
  321. text: '关闭',
  322. handler: function() {
  323. Ext.getCmp('playerPanel').html ="";
  324. Ext.getCmp("playerPanel").body.update("");
  325. songPlayer.hide();
  326. }
  327. }]
  328. });
  329. </script>
  330. </head>
  331. <body>
  332. </body>
  333. </html>