serviceCharge.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <title>服务费查询</title>
  7. <meta name="description" content="">
  8. <meta name="keywords" content="">
  9. <link href="/css/ims/base.css" rel="stylesheet">
  10. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css"/>
  11. <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
  12. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
  13. <style>
  14. .green {
  15. color: green;
  16. }
  17. .red {
  18. color: red;
  19. }
  20. .ims-box {
  21. margin: 20px;
  22. }
  23. .screen > div {
  24. float: left;
  25. margin-right: 8px;
  26. }
  27. .screen .date > input {
  28. height: 30px;
  29. border-radius: 4px;
  30. border: 1px solid #ccc;
  31. box-shadow: none;
  32. text-indent: 10px;
  33. }
  34. .screen .purposeOrderNo > input {
  35. height: 30px;
  36. border-radius: 4px;
  37. border: 1px solid #ccc;
  38. box-shadow: none;
  39. text-indent: 10px;
  40. }
  41. .screen button {
  42. padding: 4px 12px;
  43. }
  44. .table-box {
  45. margin-top: 30px;
  46. }
  47. .btn-formal-order {
  48. cursor: pointer;
  49. }
  50. .application-number-box {
  51. margin-top: 50px;
  52. text-align: center;
  53. }
  54. .application-number-box span {
  55. margin-right: 20px;
  56. }
  57. .layui-layer-btn .layui-layer-btn0 {
  58. border-color: #2977ff !important;
  59. background-color: #2977ff !important;
  60. color: #fff;
  61. }
  62. .btn-date_show{
  63. display: inline-block;width: 170px;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
  64. }
  65. .changePwd{}
  66. .changePwd span{display: inline-block;width:110px;text-align: right;padding-right:5px;}
  67. .urge-layer-box {
  68. margin-top: 30px;
  69. margin-left: 30px;
  70. }
  71. .urge-layer-box textarea {
  72. margin-left: 15px;
  73. vertical-align: top;
  74. }
  75. </style>
  76. </head>
  77. <body>
  78. <div class="ims-box">
  79. <form action="<?php echo Yii::app()->createUrl('imsSale/serviceCharge'); ?>" method="get">
  80. <div class="screen">
  81. <div class="diy_select year">
  82. <input type="hidden" id="schoolYearId" name="schoolYearId" class="diy_select_input" value="0">
  83. <div class="diy_select_txt">请选择学年</div>
  84. <div class="diy_select_btn"></div>
  85. <ul class="diy_select_list" style="display: none;">
  86. <li val="">请选择学年</li>
  87. <?php if ($schoolYear): ?>
  88. <?php foreach ($schoolYear as $val): ?>
  89. <li val="<?php echo $val['schoolYearId'] ?>"><?php echo $val['schoolYearName'] ?></li>
  90. <?php endforeach; ?>
  91. <?php else: ?>
  92. <li val="">暂无学年</li>
  93. <?php endif; ?>
  94. </ul>
  95. </div>
  96. <div class="diy_select goods">
  97. <input type="hidden" id="semesterId" name="semesterId" class="diy_select_input" value="0">
  98. <div class="diy_select_txt">请选择学期</div>
  99. <div class="diy_select_btn"></div>
  100. <ul class="diy_select_list" style="display: none;width:570px;">
  101. <li val="0">请选择学期</li>
  102. <li val="1">上学期</li>
  103. <li val="2">下学期</li>
  104. <li val="3">跨学期</li>
  105. </ul>
  106. </div>
  107. <div class="date">
  108. <input type="text" name="begin" class="some_class" value="" id="some_class_1"/> --
  109. <input type="text" name="end" class="some_class" value="" id="some_class_2"/>
  110. </div>
  111. <button type="submit" class="label-primary-s bth-s">查询</button>
  112. <button type="button" class="label-primary-s modify-pwd">修改查询密码</button>
  113. </div>
  114. </form>
  115. <div class="table-box">
  116. <table id="intention-table"
  117. class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
  118. style="font-size:12px">
  119. <thead>
  120. <tr>
  121. <th>批次名称</th>
  122. <th>学年</th>
  123. <th>学期</th>
  124. <th>结算月份</th>
  125. <th>回款截取时间</th>
  126. <th>创建时间</th>
  127. <th>操作</th>
  128. </tr>
  129. </thead>
  130. <tbody>
  131. <?php if ($list): ?>
  132. <?php foreach ($list as $item): ?>
  133. <tr>
  134. <td><?php echo $item['batchName'];?></td>
  135. <td><?php echo $item['schoolYearName'];?></td>
  136. <td><?php echo $item['semesterName'];?></td>
  137. <td><?php echo $item['month'];?></td>
  138. <td><?php echo $item['backMoneyInterceptTime'];?></td>
  139. <td><?php echo $item['createTime'];?></td>
  140. <td>
  141. <a href="<?php echo $this->createUrl('imsSale/viewServiceCharge',array('batchId'=>$item['batchId']))?>" batchId="<?php echo $item['batchId']; ?>" class="viewServiceCharge">查看</a>
  142. <?php if($item['isVerify']==0):?>
  143. <a href="#" batchId="<?php echo $item['batchId']; ?>" class="confirmServiceCharge">确认</a>
  144. <a href="#" batchId="<?php echo $item['batchId']; ?>" class="commitServiceCharge">提异议</a>
  145. <?php endif;?>
  146. </td>
  147. </tr>
  148. <?php endforeach; ?>
  149. <?php endif; ?>
  150. </tbody>
  151. </table>
  152. <?php if ($page): ?>
  153. <div class="col-sm-12">
  154. <ul class="pagination">
  155. <?php
  156. $params = array();
  157. if (isset($_GET['schoolYearId']) && $_GET['schoolYearId']) {
  158. $params['schoolYearId'] = $_GET['schoolYearId'];
  159. }
  160. if (isset($_GET['semester']) && $_GET['semester']) {
  161. $params['semester'] = $_GET['semester'];
  162. }
  163. if (isset($_GET['page'])) {
  164. $params['page'] = $_GET['page'];
  165. }else{
  166. $params['page'] = 1;
  167. }
  168. echo formatPage($page, 'imsSale/serviceCharge', $params);
  169. ?>
  170. </ul>
  171. </div>
  172. <?php endif; ?>
  173. </div>
  174. </div>
  175. <script src="/js/productset/jquery.min.js"></script>
  176. <script src="/js/ims/jquery.datetimepicker.js"></script>
  177. <script src="/js/ims/xsgl.js"></script>
  178. <script src="/js/layer/layer.js"></script>
  179. <script>
  180. $(document).ready(function () {
  181. //筛选条件赋值
  182. <?php if(isset($_GET['begin'])):?>
  183. $("#some_class_1").attr("value","<?php echo $_GET['begin']?>");
  184. $("#some_class_2").attr("value", "<?php echo $_GET['end']?>");
  185. <?php endif;?>
  186. <?php if(isset($_GET['semesterId']) && $_GET['semesterId']):?>
  187. var goodsId = "<?php echo $_GET['semesterId'];?>";
  188. $('#semesterId').val(goodsId);
  189. var txt = $('.goods li[val='+goodsId+']').html();
  190. $('.goods .diy_select_txt').html(txt);
  191. <?php endif;?>
  192. <?php if(isset($_GET['schoolYearId']) && $_GET['schoolYearId']):?>
  193. var schoolYearId = "<?php echo $_GET['schoolYearId'];?>";
  194. $('#schoolYearId').val(schoolYearId);
  195. var txt = $('.year li[val='+schoolYearId+']').html();
  196. $('.year .diy_select_txt').html(txt);
  197. <?php endif;?>
  198. $('.some_class').datetimepicker({
  199. format: "Y-m-d", //格式化日期
  200. timepicker: false //关闭时间选项
  201. });
  202. $(".btn-date_show").on("click", function () {
  203. layer.alert($(this).text(), {
  204. title: '使用月份',
  205. area: ['420px', '240px']
  206. });
  207. });
  208. $(".btn-formal-order").on("click", function () {
  209. var quantity= parseInt($(this).attr('a1'));
  210. var adjustNum = parseInt($(this).attr('a2'));
  211. var applyOfficialNum = parseInt($(this).attr('a3'));
  212. var officialNum2 = parseInt($(this).attr('a4'));
  213. var orderId = $(this).attr('orderId');
  214. var flag = true;
  215. layer.open({
  216. type: 1,
  217. title: '转财务订单',
  218. btn: ['确定', '取消'],
  219. area: ['420px', '240px'], //宽高
  220. btnAlign: 'c',
  221. content: '<div class="application-number-box"><p style="color: red;display: none;" class="alert-msg"></p><span>申请人数</span> <input type="number" id="applicationNumber" ></div>',
  222. yes: function (index, layero) {
  223. //提交
  224. var officialNum =$('#applicationNumber').val();
  225. if (officialNum>0) {
  226. if((officialNum>(quantity+adjustNum-applyOfficialNum-officialNum2))){
  227. $('.alert-msg').html("填写数额超出额度").fadeIn();
  228. }else{
  229. if (flag){
  230. flag = false;
  231. $.ajax({
  232. type: 'post',
  233. url: "<?php echo Yii::app()->createUrl('imsSale/toOfficial') ;?>",
  234. data: {'orderId':orderId, 'officialNum':officialNum},
  235. dataType: 'json',
  236. success: function (data) {
  237. if (data.status){
  238. location.reload();
  239. } else{
  240. flag = true;
  241. layer.msg(data.msg);
  242. }
  243. },
  244. error: function () {
  245. flag = true;
  246. layer.msg("异常错误");
  247. }
  248. });
  249. }
  250. }
  251. }else{
  252. layer.msg("请填写数量");
  253. }
  254. },
  255. btn2: function (index, layero) {
  256. //return false 开启该代码可禁止点击该按钮关闭
  257. }
  258. });
  259. return false;
  260. });
  261. flag=true;
  262. $('.confirmServiceCharge').click(function () {
  263. var batchId=$(this).attr('batchId');
  264. layer.confirm('点击确认按钮表示您同意本次服务费各项金额,公司将按确认的服务费进行后续操作。\n' +
  265. '\n' +
  266. '如有疑问,请勿确认,点击提异议,说明问题!',{icon:3,title:"确认本次服务费"},function () {
  267. var al=layer.msg('正在提交,请稍候......',{time:0});
  268. $.ajax({
  269. url:'<?php echo $this->createUrl('imsSale/confirmServiceCharge')?>',
  270. type:'POST',
  271. dataType:'json',
  272. data:{'batchId':batchId},
  273. success:function(res){
  274. layer.close(al);
  275. submit=false;
  276. if(res.status==1){
  277. //验证通过
  278. window.location.reload();
  279. }else{
  280. if(res.data!=undefined){
  281. layer.msg(res.data)
  282. }else{
  283. layer.msg('提交失败');
  284. }
  285. }
  286. }
  287. })
  288. },function(){
  289. })
  290. return false;
  291. });
  292. $(".commitServiceCharge").click(function () {
  293. var batchId=$(this).attr('batchId');
  294. layer.open({
  295. type: 1,
  296. title: '提出异议',
  297. btn: ['确定', '取消'],
  298. area: ['600px', '400px'], //宽高
  299. btnAlign: 'c',
  300. content: '<p style="color: red;display: none;" class="alert-msg"></p><div class="urge-layer-box"><span style="color:red">*提出问题:</span><textarea rows="10" cols="60" id="urgeText" /></div>',
  301. yes: function (index, layero) {
  302. //提交
  303. var text = $('#urgeText').val();
  304. var data = {
  305. 'problem': text,
  306. 'batchId': batchId,
  307. 'verify':3
  308. };
  309. if ($.trim(text)) {
  310. if (flag) {
  311. flag = false;
  312. $.ajax({
  313. type: 'post',
  314. url: "<?php echo Yii::app()->createUrl('imsSale/confirmServiceCharge');?>",
  315. data: data,
  316. dataType: 'json',
  317. success: function (data) {
  318. if (data.status) {
  319. layer.closeAll();
  320. location.reload();
  321. } else {
  322. flag = true;
  323. layer.msg(data.data);
  324. }
  325. },
  326. error: function () {
  327. flag = true;
  328. layer.msg('异常错误');
  329. }
  330. });
  331. }
  332. } else {
  333. flag = true;
  334. layer.msg('请填写内容');
  335. }
  336. },
  337. btn2: function (index, layero) {
  338. //取消按钮
  339. console.log(111)
  340. //return false 开启该代码可禁止点击该按钮关闭
  341. }
  342. });
  343. });
  344. });
  345. $('body').on('focus', '#applicationNumber', function () {
  346. $('.alert-msg').css("display",'none');
  347. });
  348. //查看
  349. $('.viewServiceCharge').click(function(){
  350. submit=false;
  351. var batchId=$(this).attr('batchId');
  352. var http=$(this).attr('href');
  353. var index = layer.open({ //打开layer弹出框
  354. type: 1, //类型
  355. skin: "layui-layer-rim", //皮肤类型,在skin文件夹中
  356. area: ["300px", "170px"], //范围大小
  357. title: "需要输入密码才能打开此应用", //定义标题
  358. content: '<div style="margin:10px auto;text-align:center"><input type="password" value="" id="viewPassword"><p><span class="tips red" ></span></p></div>',
  359. btn: ['确定', '关闭'],    //按钮
  360. yes: function (index, layero) { //确定按钮的处理函数
  361. if(submit){
  362. return false;
  363. }
  364. passwrod = $("#viewPassword").val(); //根据id取数据
  365. if(passwrod==''){
  366. $('.tips').html('请输入密码');
  367. return false;
  368. }
  369. check=/[\u4E00-\u9FA5]+/.test(passwrod);
  370. if(check){
  371. $('.tips').html('密码格式不正确');
  372. return false;
  373. }
  374. if(passwrod.length<6 || passwrod.length>25){
  375. $('.tips').html('请输入6~25位密码');
  376. return false;
  377. }
  378. var al=layer.msg('正在校验,请稍候......',{time:0});
  379. submit=true;
  380. $.ajax({
  381. url:'<?php echo $this->createUrl('imsSale/validationPwd')?>',
  382. type:'POST',
  383. dataType:'json',
  384. data:{'password':passwrod},
  385. success:function(res){
  386. layer.close(al);
  387. submit=false;
  388. if(res.status==1){
  389. //验证通过
  390. window.location.href=http;
  391. return true;
  392. }else{
  393. if(res.msg!=undefined){
  394. $('.tips').html(res.msg);
  395. }else{
  396. $('.tips').html('校验失败');
  397. }
  398. }
  399. }
  400. })
  401. },
  402. btn2: function (index, layero) { //取消按钮后的处理函数
  403. layer.close(index);
  404. },
  405. });
  406. return false;
  407. });
  408. $('.modify-pwd').click(function(){
  409. var submit=false;
  410. var html='';
  411. html+='<div class="changePwd">';
  412. html+='<p>密码要求为6-25的非中文字符类型</p>';
  413. html+='<p><span>原密码:</span><input type="password" name="password" value="" id="oldPassword"></p>';
  414. html+='<p><span>新密码:</span><input type="password" name="new-password" value="" id="newPassword"></p>';
  415. html+='<p><span>再次输入:</span><input type="password" name="check-password" value="" id="checkPassword"></p>';
  416. html+='<p><span></span><i class="tips red" ></i></p>';
  417. html+='</div>';
  418. var index = layer.open({ //打开layer弹出框
  419. type: 1, //类型
  420. skin: "layui-layer-rim", //皮肤类型,在skin文件夹中
  421. area: ["400px", "270px"], //范围大小
  422. title: "修改密码", //定义标题
  423. content: html,
  424. btn: ['确定修改', '关闭'],    //按钮
  425. yes: function (index, layero) { //确定按钮的处理函数
  426. if(submit){
  427. return false;
  428. }
  429. oldPassword = $("#oldPassword").val(); //根据id取数据
  430. newPassword = $("#newPassword").val(); //根据id取数据
  431. checkPassword = $("#checkPassword").val(); //根据id取数据
  432. if(oldPassword==''){
  433. $('.tips').html('请输入密码');
  434. return false;
  435. }
  436. check=/[\u4E00-\u9FA5]+/.test(oldPassword);
  437. if(check){
  438. $('.tips').html('密码格式不正确');
  439. return false;
  440. }
  441. check=/[\u4E00-\u9FA5]+/.test(newPassword);
  442. if(check){
  443. $('.tips').html('密码格式不正确');
  444. return false;
  445. }
  446. check=/[\u4E00-\u9FA5]+/.test(checkPassword);
  447. if(check){
  448. $('.tips').html('密码格式不正确');
  449. return false;
  450. }
  451. if(newPassword.length<6 || newPassword.length>25){
  452. $('.tips').html('请输入6~25位密码');
  453. return false;
  454. }
  455. submit=true;
  456. var al=layer.msg('正在提交,请稍候......',{time:0});
  457. $.ajax({
  458. url:'<?php echo $this->createUrl('imsSale/updateServicePwd')?>',
  459. type:'POST',
  460. dataType:'json',
  461. data:{'password':oldPassword,'newPassword':newPassword,'checkPassword':checkPassword},
  462. success:function(res){
  463. layer.close(al);
  464. submit=false;
  465. if(res.status==1){
  466. layer.close(index);
  467. layer.msg('修改成功');
  468. }else{
  469. if(res.msg!=undefined){
  470. $('.tips').html(res.msg);
  471. }else{
  472. $('.tips').html('修改失败');
  473. }
  474. }
  475. }
  476. })
  477. },
  478. btn2: function (index, layero) { //取消按钮后的处理函数
  479. layer.close(index);
  480. },
  481. });
  482. });
  483. </script>
  484. </body>
  485. </html>