online-invioce.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>线上开票确认</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
  8. <!-- 所有的 css js 资源 -->
  9. <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  10. <link rel="stylesheet" href="../../static/sa.css">
  11. <script src="../../static/kj/vue.min.js"></script>
  12. <script src="../../static/kj/element-ui/index.js"></script>
  13. <script src="../../static/kj/httpVueLoader.js"></script>
  14. <script src="../../static/kj/jquery.min.js"></script>
  15. <script src="../../static/kj/layer/layer.js"></script>
  16. <script src="../../static/sa.js"></script>
  17. <style type="text/css">
  18. .c-panel .c-label {
  19. width: 8em;
  20. }
  21. </style>
  22. </head>
  23. <body>
  24. <div class="vue-box sbot" style="display: none;" :style="'display: block;'">
  25. <!-- ------- 内容部分 ------- -->
  26. <div class="s-body">
  27. <div class="c-panel">
  28. <el-form>
  29. <el-row>
  30. <el-collapse value='1'>
  31. <el-collapse-item name="1">
  32. <div slot="title">
  33. 基础信息
  34. </div>
  35. <div>
  36. <el-row>
  37. <el-col span="12">
  38. <sa-info name="开票总额" br>{{m.totalMoney}}元</sa-info>
  39. <sa-info name="主体名称" br>{{m.entityName}}</sa-info>
  40. <sa-info name="税号" br>{{m.taxIdNo}}</sa-info>
  41. </el-col>
  42. <el-col span="12">
  43. <sa-info name="开户银行" br>{{m.bank}}</sa-info>
  44. <sa-info name="银行账号" br>{{m.bankNo}}</sa-info>
  45. <sa-info name="地址" br>{{m.address}}</sa-info>
  46. <sa-info name="电话" br>{{m.phone}}</sa-info>
  47. <sa-info name="邮箱" br>{{m.email}}</sa-info>
  48. </el-col>
  49. </el-row>
  50. </div>
  51. </el-collapse-item>
  52. </el-collapse>
  53. </el-row>
  54. <el-row>
  55. <el-collapse value='1'>
  56. <el-collapse-item name="1">
  57. <div slot="title">
  58. 实际开票
  59. </div>
  60. <el-table :data="invioceDetails" style="width: 100%">
  61. <el-table-column type="index" width="50" label="序号"></el-table-column>
  62. <el-table-column label="单据编号" prop="id"></el-table-column>
  63. <el-table-column label="金额(元)" prop="money"></el-table-column>
  64. <el-table-column label="发票号" prop="invoiceNo"></el-table-column>
  65. <el-table-column label="发票代码" prop="invoiceCode"></el-table-column>
  66. <el-table-column label="操作" width="240px">
  67. <template slot-scope="s">
  68. <el-button class="c-btn" type="success" @click="showFee(s.row.id)">费用详情</el-button>
  69. </template>
  70. </el-table-column>
  71. </el-table>
  72. </el-collapse-item>
  73. </el-collapse>
  74. </el-row>
  75. </el-form>
  76. </div>
  77. </div>
  78. <!-- ------- 底部按钮 ------- -->
  79. <div class="s-foot">
  80. <el-button v-if="m.isApply!=1&&m.isApply!=2&&comfirmButton==0&&m.status==0&&currentCustomerId==1" type="success" @click="comfirmFn">确定开票</el-button>
  81. <el-button @click="sa.closeCurrIframe()">取消</el-button>
  82. </div>
  83. <el-dialog title="费用明细" :visible.sync="showFeeDate.visible" width="90%">
  84. <el-table :data="feeDetails" style="width: 100%">
  85. <el-table-column label="业务类型" prop="itemTypeName" ></el-table-column>
  86. <el-table-column label="数量" prop="num" ></el-table-column>
  87. <el-table-column label="单价(元)" prop="unitPrice" ></el-table-column>
  88. <el-table-column label="总价(元)" prop="itemPrice" ></el-table-column>
  89. <el-table-column label="税率(%)" >
  90. <template slot-scope="s">
  91. <span>{{s.row.taxRate * 100}}</span>
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="税款(元)" >
  95. <template slot-scope="s">
  96. <span>{{Number(s.row.taxPrice).toFixed(2)}}</span>
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="不含税金额(元)" >
  100. <template slot-scope="s">
  101. <span>{{Number(s.row.noTaxPrice).toFixed(2)}}</span>
  102. </template>
  103. </el-table-column>
  104. </el-table>
  105. <span slot="footer" class="dialog-footer">
  106. <el-button @click="showFeeDate.visible = false">关闭</el-button>
  107. </span>
  108. </el-dialog>
  109. <el-dialog title="请填写开票人" :visible.sync="drawerDate.visible" width="38%">
  110. <div class="c-item">
  111. <label class="c-label">开票人:</label>
  112. <el-input type="text" v-model="drawerDate.form.drawer"></el-input>
  113. </div>
  114. <span slot="footer" class="dialog-footer">
  115. <el-button @click="drawerDate.visible = false">取 消</el-button>
  116. <el-button type="primary" @click="comfirm">确 定</el-button>
  117. </span>
  118. </el-dialog>
  119. </div>
  120. <script>
  121. var app = new Vue({
  122. components: {
  123. "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
  124. },
  125. el: '.vue-box',
  126. data: {
  127. infoId: sa.p('id', 0), // 获取数据ID
  128. m: null,
  129. invioceDetails: [],
  130. feeDetails:[],
  131. showFeeDate: {
  132. visible: false,
  133. },
  134. comfirmButton: 0,
  135. drawerDate: {
  136. visible: false,
  137. form: {
  138. infoId: sa.p('id', 0),
  139. drawer:"",
  140. }
  141. },
  142. currentCustomerId: '1',
  143. },
  144. methods: {
  145. getCustomer() {
  146. sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
  147. this.currentCustomerId = resp.data;
  148. }.bind(this));
  149. },
  150. showFee(id){
  151. sa.ajax('/TbInvoiceDetails/groupFeeDetails?id=' + id, function (res) {
  152. this.feeDetails = res.data;
  153. this.showFeeDate.visible = true;
  154. }.bind(this))
  155. },
  156. comfirmFn() {
  157. this.drawerDate.visible = true;
  158. },
  159. comfirm() {
  160. sa.checkNull(this.drawerDate.form.drawer, '输入 [开票人]');
  161. sa.ajax('/InvoiceApply/applyInvoice', this.drawerDate.form, function () {
  162. this.drawerDate.visible = false;
  163. this.comfirmButton = 1;
  164. sa.alert('开票成功', this.close);
  165. }.bind(this))
  166. },
  167. close(){
  168. parent.app.f5();
  169. sa.closeCurrIframe();
  170. },
  171. getInfo() {
  172. sa.ajax('/TbInvoiceInfo/getById?id=' + this.infoId, function(res) {
  173. this.m = res.data;
  174. if(res.data == null) {
  175. sa.alert('未能查找到 id=' + this.infoId + " 开票信息数据");
  176. }
  177. }.bind(this))
  178. },
  179. getDetails() {
  180. sa.ajax('/TbInvoiceDetails/onlineInvoice?infoId=' + this.infoId, function (res) {
  181. this.invioceDetails = res.data;
  182. }.bind(this))
  183. }
  184. },
  185. mounted: function () {
  186. this.getCustomer();
  187. this.getInfo();
  188. this.getDetails();
  189. }
  190. })
  191. </script>
  192. </body>
  193. </html>