invoiceApprovalAchieve.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <!-- include 'header' -->
  2. <script src="<?= invoice ?>"></script>
  3. <link href="<?= WEB_SITE_GLOBAL ?>css/datepicker.min.css" rel="stylesheet" type="text/css">
  4. <script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.min.js"></script>
  5. <script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.zh.js"></script>
  6. <link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>js/DataTables/jquery.dataTables.css">
  7. <script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/DataTables/jquery.dataTables.min.js"></script>
  8. <script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/dataTables.fixedColumns.min.js"></script>
  9. <script>
  10. $(function() {
  11. $('.fnSettlementType').live('click', function() {
  12. var iidKey=$(this).attr("data-iidKey");
  13. $.ajax({
  14. url: '/ajaxGetInvoice',
  15. type : "post",
  16. cache : false,
  17. dataType : "json",
  18. data : {
  19. iidKey : iidKey
  20. },
  21. global : true,
  22. success : function(data) {
  23. if (data.status == 1) {
  24. if(data.invoiceDetail.settlementType==0){
  25. $("#SOFTWARE").attr("checked","checked");
  26. //$("#rdo1").removeAttr("checked");
  27. }else if(data.invoiceDetail.settlementType==1){
  28. $("#TRAINING").attr("checked","checked");
  29. }
  30. $("#trainId").html(data.settlementHtml);
  31. $("#iidKey").val(iidKey);
  32. } else{
  33. alert('数据获取失败');
  34. }
  35. },
  36. error : function(err) {
  37. alert('操作失败');
  38. }
  39. });
  40. });
  41. })
  42. </script>
  43. <body>
  44. <div class="mainLayout">
  45. <div class="mainMenu">
  46. <div class="menuItem">
  47. <a href="#" class="mLogo">CLD</a>
  48. <ul>
  49. <!-- include 'menuReceipt' -->
  50. </ul>
  51. </div>
  52. </div>
  53. <div class="warpContent">
  54. <div class="subMenu fL">
  55. <div class="menuItem">
  56. <!-- include 'invoiceMenu' -->
  57. </div>
  58. </div>
  59. <div class="adminContent autoHeight">
  60. <legend>
  61. 审批发票
  62. </legend>
  63. <div class="demandCate">
  64. <form action="/invoiceApprovalAchieve/{{status}}" id="iaa" method="get" >
  65. <ul class="cateList">
  66. <li>
  67. <a <!-- if {{status}}=='ALL' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/ALL">所有</a>
  68. <a <!-- if {{status}}=='PEND' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/PEND" title="待审批发票">待审批发票</a>
  69. <a <!-- if {{status}}=='APPROVED' --> class="now" <!-- endif --> href="/invoiceApprovalAchieve/APPROVED" title="已审批发票">已审批发票</a>
  70. </li>
  71. <li>
  72. <select name="invoiceType" node-invoiceType >
  73. <option <!-- if {{invoiceType}}=='ALL' --> selected <!-- endif --> value="ALL">类型</option>
  74. <option <!-- if {{invoiceType}}=='ORDINARY' --> selected <!-- endif --> value="ORDINARY">普通发票</option>
  75. <option <!-- if {{invoiceType}}=='SPECIAL' --> selected <!-- endif --> value="SPECIAL">专用发票</option>
  76. </select>
  77. </li>
  78. <li>
  79. <select name="invoiceTrain" node-invoiceTrain id="sel">
  80. <option <!-- if {{invoiceTrain}}=='ALL' --> selected <!-- endif --> value="ALL">所有</option>
  81. <option <!-- if {{invoiceTrain}}=='ORDINARY' --> selected <!-- endif --> value="ORDINARY">个人发票</option>
  82. <option <!-- if {{invoiceTrain}}=='TRAIN' --> selected <!-- endif --> value="TRAIN">培训班发票</option>
  83. </select>
  84. </li>
  85. <!-- if {{invoiceTrain}}=='TRAIN' -->
  86. <li>
  87. <select name="invoiceTrainName" node-invoiceTrainName style="width:150px;">
  88. <option <!-- if {{invoiceTrainName}}=='ALL' --> selected <!-- endif --> value="ALL"">所有</option>
  89. <!-- loop trainList -->
  90. <option <!-- if {{invoiceTrainName}}=={{trainList' value.itidKey}} --> selected <!-- endif --> value="{{trainList' value.itidKey}}">{{trainList' value.trainName}}</option>
  91. <!-- endloop -->
  92. </select>
  93. </li>
  94. <!-- endif -->
  95. <li>
  96. <div class="search">
  97. <div class="input-append">
  98. <input class="datepicker-here span3" name="date" value="{{dateString}}" placeholder="按时间筛选" type="text" data-range="true" data-multiple-dates-separator=" : " data-language="zh">
  99. <button class="btn btn-small" type="submit">查询</button>
  100. </div>
  101. </div>
  102. </li>
  103. </ul>
  104. </form>
  105. </div>
  106. <div class="saeaList">
  107. <table id="example" class="stripe row-border order-column" cellspacing="0" width="2400" >
  108. <thead>
  109. <tr class="thead">
  110. <th>操作</th>
  111. <th>开票流水号</th>
  112. <th>开票单位(抬头)</th>
  113. <th>纳税人识别码</th>
  114. <th>注册地址~电话</th>
  115. <th>开户银行~账号</th>
  116. <th>发票备注</th>
  117. <th>开票内容</th>
  118. <th>数量</th>
  119. <th>单价</th>
  120. <th>开票金额</th>
  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. </tbody>
  132. </table>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <div loading-msg='true' style="position:absolute; left:50%; top:50%; "></div>
  138. <div class="modal fade" id="approvalInvice">
  139. <div id="nc"></div>
  140. </div>
  141. <!--弹出内容-->
  142. <!--弹出修改结算方式-->
  143. <div class="modal hide fade" id="editPay">
  144. <form action="/invoiceSettlementChange" method="post" >
  145. <input type="hidden" name="iidKey" id="iidKey" value="">
  146. <div class="modal-dialog">
  147. <div class="modal-content">
  148. <div class="modal-header">
  149. <h3>修改结算方式</h3>
  150. </div>
  151. <div class="modal-body saeaList">
  152. <table class="table table-bordered table-condensed">
  153. <tr>
  154. <th class="taC" rowspan="2"><span class="colRed">*</span>结算方式</th><td colspan="3">
  155. <label class="radio"><input type="radio" name="settlementType" id="SOFTWARE" value="SOFTWARE">软件销售</label>
  156. </td>
  157. </tr>
  158. <tr>
  159. <td>
  160. <label class="radio"><input type="radio" name="settlementType" id="TRAINING" value="TRAINING" >培训班</label>
  161. <select name='trainId' id='trainId' >
  162. </select>
  163. </td>
  164. </tr>
  165. </table>
  166. </div>
  167. <div class="modal-footer">
  168. <input type="submit" class="button" value="确认修改">
  169. <a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">取消</a>
  170. </div>
  171. </div>
  172. </div>
  173. </form>
  174. </div>
  175. <script type="text/javascript">autoFlashHeight();</script>
  176. <script type="text/javascript">
  177. $(document).ready( function () {
  178. var table =$('#example').DataTable({
  179. language: {
  180. "sProcessing": "处理中...",
  181. "sLengthMenu": "显示 _MENU_ 项结果",
  182. "sSearch": "搜索:",
  183. "sInfoEmpty": "显示第 0 至 0 项结果,共 0 项",
  184. "sEmptyTable": "表中数据为空",
  185. "oPaginate": {
  186. "sFirst": "首页",
  187. "sPrevious": "上页",
  188. "sNext": "下页",
  189. "sLast": "末页"
  190. },
  191. "sInfo": "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
  192. },
  193. "paging": false,
  194. "ordering": false,
  195. "info": false,
  196. //'filter':false,
  197. scrollY: "700px",
  198. scrollX: true,
  199. scrollCollapse: true,
  200. paging: true,
  201. serverSide: true,
  202. ajax: {
  203. url: '/ajaxGetinvoiceApprovalAchieve',
  204. type: 'POST',
  205. "data": function ( d ) {
  206. return $.extend( {}, d, {
  207. "status": '{{status}}',
  208. 'invoiceType':'{{invoiceType}}',
  209. 'invoiceTrain':'{{invoiceTrain}}',
  210. 'invoiceTrainName':'{{invoiceTrainName}}',
  211. 'date':'{{dateString}}',
  212. } );
  213. }
  214. }
  215. });
  216. <!-- if {{invoiceTrain}}=='TRAIN' -->
  217. setSearchLo('approval','850px');
  218. <!-- else -->
  219. setSearchLo('approval');
  220. <!-- endif -->
  221. } );
  222. function nodeInvoiceApproval(iidKey){
  223. var postData = iidKey;
  224. var type =$(this).attr("data-type");
  225. $("#nc").html('');
  226. $("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
  227. var url = "/ajaxGetInvoiceApprovalDetail";
  228. $.ajax({
  229. url : url,
  230. type : "post",
  231. cache : false,
  232. dataType : "json",
  233. data : {
  234. serial : postData
  235. },
  236. global : true,
  237. success : function(data) {
  238. if (data.status == 1) {
  239. $("#nc").html(data.html);
  240. } else
  241. $("div[loading-msg='true']").html("illegal request");
  242. },
  243. error : function(err) {
  244. $("div[loading-msg='true']").html("");
  245. }
  246. });
  247. }
  248. function nodeInvoice(iidKey){
  249. var postData = iidKey;
  250. var type =$(this).attr("data-type");
  251. $("#nc").html('');
  252. var po='INVOICE';
  253. $("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
  254. var url = "/ajaxGetInvoiceInfoByType";
  255. $.ajax({
  256. url : url,
  257. type : "post",
  258. cache : false,
  259. dataType : "json",
  260. data : {
  261. serial : postData,
  262. type:po
  263. },
  264. global : true,
  265. success : function(data) {
  266. if (data.status == 1) {
  267. $("div[loading-msg='true']").html("");
  268. if(type=='receivables')
  269. $("#nr").html(data.html);
  270. else
  271. $("#nc").html(data.html);
  272. } else
  273. $("div[loading-msg='true']").html("illegal request");
  274. },
  275. error : function(err) {
  276. $("div[loading-msg='true']").html("");
  277. }
  278. });
  279. }
  280. </script>
  281. </body>