editPaymentApply.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>修改反馈记录申请</title>
  6. <link href="/css/base.css" rel="stylesheet">
  7. <link href="/css/ims/ims.css" rel="stylesheet">
  8. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css"/>
  9. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
  10. <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
  11. <link type="text/css" rel="stylesheet" href="/js/select/select2.min.css" />
  12. <style>
  13. p {
  14. margin: 0;
  15. padding: 0;
  16. }
  17. .ims-box {
  18. margin: 20px;
  19. }
  20. .screen {
  21. padding-left: 20px;
  22. height: 44px;
  23. line-height: 44px;
  24. background-color: #eff4fa;
  25. }
  26. .screen li {
  27. float: left;
  28. margin-right: 65px;
  29. }
  30. .bg-d9bf6e {
  31. margin-left: 5px;
  32. padding: 0 20px;
  33. color: #fff;
  34. background-color: #d9bf6e;
  35. }
  36. .list {
  37. padding: 0 40px;
  38. /*margin-top: 40px;*/
  39. overflow: hidden;
  40. }
  41. .list h2 {
  42. line-height: 30px;
  43. font-size: 14px;
  44. }
  45. .list .student-list_box {
  46. width: 300px;
  47. }
  48. .list .student-list_box > ul {
  49. height: 260px;
  50. overflow: auto;
  51. padding: 20px;
  52. background-color: #eef3ff;
  53. }
  54. .list .student-list_box li {
  55. line-height: 30px;
  56. cursor: pointer;
  57. }
  58. .list .student-selected_box {
  59. margin-left: 60px;
  60. }
  61. .list .student-list {
  62. display: none;
  63. margin-left: 20px;
  64. }
  65. .list .student-list li.active .btn-select_all {
  66. display: inline-block;
  67. }
  68. .list .student-list span {
  69. cursor: pointer;
  70. }
  71. .list .btn-select_all {
  72. margin-left: 84px;
  73. color: #008000;
  74. }
  75. .student-name_box li {
  76. position: relative;
  77. margin-left: 28px;
  78. line-height: 30px;
  79. }
  80. .student-name_box input {
  81. position: absolute;
  82. left: 155px;
  83. top: 8px;
  84. }
  85. .btn-select_all,
  86. .student-name_box {
  87. display: none;
  88. }
  89. .student-selected {
  90. width: 320px;
  91. height: 220px;
  92. overflow: auto;
  93. }
  94. .student-selected li {
  95. float: left;
  96. margin-right: 24px;
  97. margin-bottom: 12px;
  98. height: 26px;
  99. line-height: 26px;
  100. text-indent: 20px;
  101. background-color: #f2f2f2;
  102. }
  103. .student-selected .btn-delete {
  104. float: right;
  105. margin-right: 20px;
  106. color: red;
  107. cursor: pointer;
  108. }
  109. .btn-confirm_purchase {
  110. display: block;
  111. margin: 0 auto;
  112. margin-top: 100px;
  113. margin-bottom: 50px;
  114. width: 430px;
  115. line-height: 54px;
  116. color: #fff;
  117. font-family: PingFangSC-Regular, "PingFang SC";
  118. font-weight: 400;
  119. font-style: normal;
  120. font-size: 20px;
  121. text-align: center;
  122. background-color: rgba(0, 153, 102, 1);
  123. cursor: pointer;
  124. }
  125. #imgPreview {
  126. display: inline-block;
  127. margin-top: 12px;
  128. }
  129. #imgPreview > img {
  130. max-width: 100px;
  131. max-height: 100px;
  132. margin-right: 5px;
  133. }
  134. .layui-layer-btn .layui-layer-btn0 {
  135. border-color: #15ae68 !important;
  136. background-color: #15ae68 !important;
  137. color: #fff;
  138. }
  139. .stop-layer-box, .resubmit-layer-box, .delete-layer-box {
  140. line-height: 140px;
  141. text-align: center;
  142. }
  143. .table-center th,.table-center td{text-align:center;}
  144. .table-center .diy_select{float:none;display:inline-block;}
  145. .out-count-div{display:inline-block;}
  146. .out-count-div a{display:inline-block;width:20px;height:20px;text-align:center;line-height:20px; background:#999;color:#fff;cursor:pointer}
  147. .out-count-div a:hover{background:#666;}
  148. .out-count-div span{margin-left:10px;}
  149. .activePage{display: inline-block;width: 30px;height: 30px;background: #0e8e54;text-align: center;line-height: 30px;color:#fff;margin-right: 10px;}
  150. .page{display: inline-block;width: 30px;height: 30px;border:1px solid #0e8e54;text-align: center;line-height: 30px;color:#000;margin-right: 10px;}
  151. </style>
  152. </head>
  153. <body>
  154. <h3 class="sale-title">修改反馈记录申请</h3>
  155. <form action="" method="post" id="formSubmit">
  156. <div class="sale-table">
  157. <div style="margin-bottom:15px;color: red">
  158. <p>24小时内的反馈记录免审通过,否则走审批流程</p>
  159. <p>作废回款反馈信息,请把各个数量及金额改为0,并提交申请。</p>
  160. </div>
  161. <table width="100%">
  162. <tr>
  163. <th>销售订单号</th>
  164. <td colspan="3">
  165. <select name="orderId" id="orderId" class="projSelect" style="width: 300px;">
  166. <option value="0">销售订单号</option>
  167. <?php
  168. if(isset($orderList) && $orderList){
  169. foreach ($orderList as $val){
  170. if($data['orderId']==$val['orderId']){
  171. echo '<option value="'.$val['orderId'].'" selected>'.$val['orderNo'].'</option>';
  172. }else{
  173. echo '<option value="'.$val['orderId'].'" >'.$val['orderNo'].'</option>';
  174. }
  175. }
  176. }
  177. ?>
  178. </select>
  179. </td>
  180. </tr>
  181. <tr>
  182. <th><em class="red">*</em>学年</th>
  183. <td>
  184. <select name="schoolYearId" id="schoolYearId" style="width: 100px;">
  185. <option value="0">选择学年</option>
  186. <?php if(isset($schoolYear) && $schoolYear):?>
  187. <?php foreach ($schoolYear as $key => $value): ?>
  188. <option data-id="<?php echo (strtotime($value['firstSemesterBegin']) < time()) && (time() < strtotime($value['secondSemesterEnd'])) ? 1 : 0; ?>" value="<?php echo $value['schoolYearId']; ?>" <?php if($data['schoolYearId']==$value['schoolYearId']) echo 'selected';?>><?php echo $value['schoolYearName']; ?></option>
  189. <?php endforeach; ?>
  190. <?php endif;?>
  191. </select>
  192. </td>
  193. <th><em class="red">*</em>学期</th>
  194. <td>
  195. <select name="semester" id="semester" style="width: 100px;">
  196. <option value="0">选择学期</option>
  197. <option value="1" <?php if(isset($data['semester']) && ($data['semester']+1)==1) echo 'selected';?>>上学期</option>
  198. <option value="2" <?php if(isset($data['semester']) && ($data['semester']+1)==2) echo 'selected';?>>下学期</option>
  199. <option value="3" <?php if(isset($data['semester']) && ($data['semester']+1)==3) echo 'selected';?>>跨学期</option>
  200. </select>
  201. </td>
  202. </tr>
  203. <tr>
  204. <th><em class="red">*</em>年级</th>
  205. <td>
  206. <select name="grade" id="grade" style="width: 100px;">
  207. <option value="0">选择年级</option>
  208. <option value="1" <?php if(isset($data['grade']) && $data['grade']==1) echo 'selected';?>>高一</option>
  209. <option value="2" <?php if(isset($data['grade']) && $data['grade']==2) echo 'selected';?>>高二</option>
  210. <option value="3" <?php if(isset($data['grade']) && $data['grade']==3) echo 'selected';?>>高三</option>
  211. </select>
  212. </td>
  213. <th><em class="red">*</em>商品</th>
  214. <td>
  215. <select name="goodsId" id="goodsId" style="width: 100px;">
  216. <option value="0">选择商品</option>
  217. <?php if ($goodList): ?>
  218. <?php foreach ($goodList as $good): ?>
  219. <option value="<?php echo $good['goodsId'] ?>" <?php if($data['goodsId']==$good['goodsId']) echo 'selected';?>><?php echo $good['goodsName'] ?></option>
  220. <?php endforeach; ?>
  221. <?php endif; ?>
  222. </select>
  223. </td>
  224. </tr>
  225. <tr>
  226. <th><em class="red">*</em>使用人数</th>
  227. <td colspan="3"> <input type="text" placeholder="使用人数" class="int_number_check" name="use_person" value="<?php echo $data['useNum'];?>">人</td>
  228. </tr>
  229. <tr>
  230. <th><em class="red">*</em>打印人数</th>
  231. <td colspan="3"> <input type="text" placeholder="打印人数" class="int_number_check" name="down_person" value="<?php echo $data['downloadNum'];?>">人</td>
  232. </tr>
  233. <tr>
  234. <th><em class="red">*</em>收费单价</th>
  235. <td colspan="3"> <input type="text" placeholder="收费单价" class="float_number_check" name="price" value="<?php echo sprintf("%.2f",$data['price']);?>">元</td>
  236. </tr>
  237. <tr>
  238. <th><em class="red">*</em>上学期收费人数</th>
  239. <td > <input type="text" placeholder="收费人数" class="negative_number_check" name="feeNumUp" value="<?php echo $data['feeNumUp'];?>">人 <span class="red">如果是退款,请填写负数</span></td>
  240. <th><em class="red">*</em>下学期收费人数</th>
  241. <td > <input type="text" placeholder="收费人数" class="negative_number_check" name="feeNumDown" value="<?php echo $data['feeNumDown'];?>">人 <span class="red">如果是退款,请填写负数</span></td>
  242. </tr>
  243. <tr>
  244. <th><em class="red">*</em>上学期收费金额</th>
  245. <td > <input type="text" placeholder="收费金额" class="float_number_check" name="priceSumUp" value="<?php echo sprintf("%.2f",$data['priceSumUp']);?>">元 <span class="red">如果是退款,请填写负数</span></td>
  246. <th><em class="red">*</em>下学期收费金额</th>
  247. <td > <input type="text" placeholder="收费金额" class="float_number_check" name="priceSumDown" value="<?php echo sprintf("%.2f",$data['priceSumDown']);?>">元 <span class="red">如果是退款,请填写负数</span></td>
  248. </tr>
  249. <tr>
  250. <th><em class="red">*</em>收费时间</th>
  251. <td colspan="3"> <input readonly type="text" class="some_class" placeholder="收费时间" name="charge_time" value="<?php echo $data['feeTime'];?>""></td>
  252. </tr>
  253. <tr>
  254. <th>汇款时间</th>
  255. <td colspan="3"> <input readonly type="text" class="some_class" placeholder="汇款时间" name="pay_time" value="<?php echo $data['remitDate'];?>""></td>
  256. </tr>
  257. <tr>
  258. <th>备注</th>
  259. <td colspan="3">
  260. <textarea rows="5" cols="50" class="use-explain" name="mark"><?php echo $data['remark'];?></textarea>
  261. </td>
  262. </tr>
  263. </table>
  264. <div class="sale-submit">
  265. <input type="hidden" name="bcId" value="<?php echo $data['bcId']?>">
  266. <input type="hidden" name="id" value="<?php echo $data['recordId']?>">
  267. <button type="button" class="label-primary-cancle">取消</button>
  268. <button type="button" class="label-primary-s bth-s" >提交申请</button>
  269. </div>
  270. </div>
  271. </form>
  272. <script src="/js/productset/jquery.min.js"></script>
  273. <script src="/js/ims/jquery.datetimepicker.js"></script>
  274. <script src="/js/ims/layer/layer.js"></script>
  275. <script src="/js/ims/xsgl.js"></script>
  276. <script src="/js/select/select2.min.js"></script>
  277. <script>
  278. $(document).ready(function(){
  279. $('.projSelect').select2();
  280. var orderArr=[];
  281. <?php
  282. if(isset($orderList) && $orderList) {
  283. foreach ($orderList as $val) {
  284. echo 'var temp={};';
  285. echo 'temp.grade='.$val['grade'].';';
  286. echo 'temp.goodsId="'.$val['goodsId'].'";';
  287. echo 'temp.schoolYearId="'.$val['schoolYearId'].'";';
  288. echo 'temp.semesterName="'.$val['semesterName'].'";';
  289. echo 'temp.orderId="'.$val['orderId'].'";';
  290. echo "orderArr.push(temp);";
  291. }
  292. }
  293. ?>
  294. $('.label-primary-cancle').click(function(){
  295. window.location.href="<?php echo $this->createUrl('imsSale/paymentApply')?>";
  296. });
  297. $('.some_class').datetimepicker({
  298. format: "Y-m-d", //格式化日期
  299. timepicker: false //关闭时间选项
  300. });
  301. // $('.float_number_check').change(function(){
  302. // $(this).val($(this).val().replace(/[^\d.+]/g,""));
  303. // });
  304. $('.negative_number_check').change(function(){
  305. $(this).val($(this).val().replace(/[^\d-+]/g,""));
  306. });
  307. $('.int_number_check').change(function(){
  308. $(this).val($(this).val().replace(/[^\d+]/g,""));
  309. });
  310. $('.bth-s').click(function(){
  311. if($('#schoolYearId').val()==0){
  312. layer.msg('请选择学年');
  313. return false;
  314. }
  315. if($('#semester').val()==0){
  316. layer.msg('请选择学期');
  317. return false;
  318. }
  319. if($('#grade').val()==0){
  320. layer.msg('请选择年级');
  321. return false;
  322. }
  323. if($('#goodsId').val()==0){
  324. layer.msg('请选择商品');
  325. return false;
  326. }
  327. if($('input[name=use_person]').val()=="" ){
  328. layer.msg('请输入使用人数');
  329. return false;
  330. }
  331. if(!$.isNumeric($('input[name=use_person]').val())){
  332. layer.msg('使用人数不正确');
  333. return false;
  334. }
  335. if($('input[name=down_person]').val()=="" ){
  336. layer.msg('请输入打印人数');
  337. return false;
  338. }
  339. if(!$.isNumeric($('input[name=down_person]').val())){
  340. layer.msg('打印人数不正确');
  341. return false;
  342. }
  343. if($('input[name=price]').val()=="" ){
  344. layer.msg('请输入收费单价');
  345. return false;
  346. }
  347. if(isNaN($('input[name=price]').val()) || parseFloat($('input[name=price]').val())<0){
  348. layer.msg('收费单价格式不正确');
  349. return false;
  350. }
  351. if($('#semester').val()==1){
  352. feeNum=$('input[name=feeNumUp]').val();
  353. priceSum=$('input[name=priceSumUp]').val();
  354. if(feeNum=="" ){
  355. layer.msg('请输入收费人数');
  356. return false;
  357. }
  358. if(!$.isNumeric(feeNum)){
  359. layer.msg('收费人数不正确');
  360. return false;
  361. }
  362. if(priceSum=="" ){
  363. layer.msg('请输入收费金额');
  364. return false;
  365. }
  366. if(isNaN(priceSum)){
  367. layer.msg('收费金额格式不正确');
  368. return false;
  369. }
  370. }else if($('#semester').val()==2){
  371. feeNum=$('input[name=feeNumDown]').val();
  372. priceSum=$('input[name=priceSumDown]').val();
  373. if(feeNum=="" ){
  374. layer.msg('请输入收费人数');
  375. return false;
  376. }
  377. if(!$.isNumeric(feeNum)){
  378. layer.msg('收费人数不正确');
  379. return false;
  380. }
  381. if(priceSum=="" ){
  382. layer.msg('请输入收费金额');
  383. return false;
  384. }
  385. if(isNaN(priceSum)){
  386. layer.msg('收费金额格式不正确');
  387. return false;
  388. }
  389. }else{
  390. feeNumUp=$('input[name=feeNumUp').val();
  391. priceUp=$('input[name=priceSumUp]').val();
  392. feeNumDown=$('input[name=feeNumDown]').val();
  393. priceDown=$('input[name=priceSumDown]').val();
  394. if((feeNumUp=="" || !$.isNumeric(feeNumUp)) && (feeNumDown=="" || !$.isNumeric(feeNumDown))){
  395. console.log(feeNumUp);
  396. console.log(feeNumDown);
  397. layer.msg('收费人数不正确');
  398. return false;
  399. }
  400. if((priceUp=="" || isNaN(priceUp)) && (priceDown=="" || isNaN(priceDown)) ){
  401. layer.msg('收费金额格式不正确');
  402. return false;
  403. }
  404. }
  405. if($('input[name=charge_time]').val()==''){
  406. layer.msg('请输入收费时间');
  407. return false;
  408. }
  409. $(this).attr('disabled',true);
  410. if($('#schoolYearId').find("option:selected").attr('data-id') == 0){
  411. layer.confirm('当前时间不属于所选学年,确定保存嘛?', {
  412. btn: ['确定','取消'] //按钮
  413. },function(){
  414. $('#formSubmit').submit();
  415. });
  416. }else{
  417. $('#formSubmit').submit();
  418. }
  419. });
  420. $('#orderId').change(function(){
  421. orderId=$(this).val();
  422. $.each(orderArr,function (i,val) {
  423. if(val.orderId==orderId){
  424. $('#grade').val(val.grade);
  425. $('#schoolYearId').val(val.schoolYearId);
  426. $('#goodsId').val(val.goodsId);
  427. if(val.semesterName=='上学期'){
  428. $('#semester').val(1);
  429. }else if(val.semesterName=='下学期'){
  430. $('#semester').val(2);
  431. }else if(val.semesterName=='跨学期'){
  432. $('#semester').val(3);
  433. }
  434. }
  435. })
  436. });
  437. })
  438. </script>
  439. </body>
  440. </html>