index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <div class="app-container">
  3. <div class="cmain">
  4. <div class="cards">
  5. <div class="ctop">
  6. <span class="icon">&#xe646;</span>
  7. <span class="ctitle">{{ form.companyName }}</span>
  8. <span class="ckk" @click="op('info')">查看</span>
  9. <img :src="rz" class="rz" />
  10. <span class="icon qr" title="点击查看企业二维码" @click="op('qr')">&#xe643;</span>
  11. </div>
  12. <div class="desc">账户余额(元)</div>
  13. <div class="money">{{ form.money }}</div>
  14. <el-row :gutter="10" class="btm">
  15. <el-button type="primary" icon="el-icon-minus" @click="op('out')" v-hasPermi="['work:out:add']">提现</el-button>
  16. <el-button type="primary" icon="el-icon-plus" @click="op('add')" v-hasPermi="['work:recharge:add']">充值</el-button>
  17. <el-button type="primary" icon="el-icon-document" @click="op('recharge_list')" v-hasPermi="['work:recharge:list']">充值明细</el-button>
  18. <el-button type="primary" icon="el-icon-s-promotion" @click="op('out_list')" v-hasPermi="['work:out:list']">提现明细</el-button>
  19. </el-row>
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import out_edit from './out/edit.vue';
  26. import out_list from './out/record.vue';
  27. import recharge_edit from './recharge/edit.vue';
  28. import recharge_list from './recharge/record.vue';
  29. import qr from '@/components/qr';
  30. import rz from '@/assets/images/rz.png';
  31. import company from '@/views/work/company/detail.vue';
  32. export default {
  33. name: 'Money',
  34. data() {
  35. return {
  36. rz: rz,
  37. form: {},
  38. rules: {
  39. serviceCompany: [{ required: true, message: '服务公司不能为空', trigger: 'blur' }],
  40. bankName: [{ required: true, message: '开户行不能为空', trigger: 'blur' }],
  41. bankAccount: [{ required: true, message: '银行卡号不能为空', trigger: 'blur' }]
  42. }
  43. };
  44. },
  45. mounted() {
  46. this.ajax({ url: '/work/company/index' }).then((response) => {
  47. this.form = response.data;
  48. });
  49. },
  50. methods: {
  51. op(tag, row) {
  52. if (tag == 'info') {
  53. this.iframe({ obj: company, param: { id: this.form.id, detail: true }, title: '企业信息', width: '60%', height: '75%' });
  54. }
  55. if (tag == 'qr') {
  56. this.iframe({ obj: qr, param: {}, title: '查看企业二维码', width: '27%', height: '45%' });
  57. }
  58. if (tag == 'out') {
  59. this.iframe({ obj: out_edit, param: {}, title: '提现申请', width: '40%', height: '55%' });
  60. }
  61. if (tag == 'add') {
  62. this.iframe({ obj: recharge_edit, param: {}, title: '充值申请', width: '40%', height: '65%' });
  63. }
  64. if (tag == 'recharge_list') {
  65. this.iframe({ obj: recharge_list, param: {}, title: '充值明细', width: '72%', height: '70%' });
  66. }
  67. if (tag == 'out_list') {
  68. this.iframe({ obj: out_list, param: {}, title: '提现明细', width: '72%', height: '70%' });
  69. }
  70. }
  71. }
  72. };
  73. </script>
  74. <style lang="scss" scoped>
  75. .cards {
  76. border-radius: 10px;
  77. border: 1px solid #1890ff;
  78. padding: 20px;
  79. .ctop {
  80. .icon {
  81. font-size: 20px;
  82. padding-right: 5px;
  83. }
  84. .ctitle {
  85. font-size: 16px;
  86. }
  87. .ckk {
  88. color: #1890ff;
  89. cursor: pointer;
  90. padding-left: 10px;
  91. font-size: 13px;
  92. }
  93. .rz {
  94. float: right;
  95. width: 80px;
  96. }
  97. .qr {
  98. float: right;
  99. margin-top: 3px;
  100. font-size: 23px;
  101. margin-right: 10px;
  102. cursor: pointer;
  103. }
  104. }
  105. .desc {
  106. color: #8c8c8c;
  107. padding-top: 20px;
  108. }
  109. .money {
  110. padding-top: 20px;
  111. font-size: 32px;
  112. color: #1890ff;
  113. }
  114. .btm {
  115. padding-top: 20px;
  116. }
  117. }
  118. </style>