receipt_train_component.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * @description: 费用-内部培训组件
  3. * @Author: CP
  4. * @Date: 2020-11-26 15:12:47
  5. * @FilePath: \cld\global\vue\fee\receipt_train_component.js
  6. */
  7. Vue.component("train", {
  8. props: ['train','trainExplain'],
  9. computed: {
  10. trainTotal: function () {
  11. return trainPrice(this.train);
  12. }
  13. },
  14. template:
  15. `
  16. <div>
  17. <div class="seTable">
  18. <table class="table table-bordered table-condensed table-hover mb-0">
  19. <tbody>
  20. <tr>
  21. <th colspan="2" class="taC" id="neibupeixun">内部培训费用</th>
  22. </tr>
  23. <tr v-for="item in train" >
  24. <th>{{ item.name }}</th>
  25. <td width="200" class="taR">¥<input type="number" v-model="item.price" pattern="[0-9]" step="0.01"
  26. min="0" class="span2"></td>
  27. </tr>
  28. <tr>
  29. <th class="taR">合计</th>
  30. <td class="colGreen taR">¥{{ trainTotal }}</td>
  31. </tr>
  32. <tr class="warning">
  33. <td class="taR"><b>内部培训费用合计</b></td>
  34. <td class="colGreed taR"><b style="font-size: 24px">¥{{ trainTotal }}</b>
  35. </td>
  36. </tr>
  37. <tr>
  38. <th colspan="2" class="taC">报销说明</th>
  39. </tr>
  40. <tr>
  41. <th colspan="2" v-for="item in trainExplain" >
  42. <textarea required rows="6" style="width: 99%" v-model="item.trainExplain" placeholder="内部培训费用说明"></textarea>
  43. </th>
  44. </tr>
  45. </tbody>
  46. </table>
  47. </div>
  48. <div class="seCensor receipt-censor">
  49. <div class="title">报销单填写说明</div>
  50. <div class="detail">
  51. <p>1 此项费用,仅用于纵横内部培训;</p>
  52. <p>2 用于客户的培训费用,请创建“培训班结算”。</p>
  53. </div>
  54. </div>
  55. </div>
  56. `
  57. })