audit.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div class="cmain">
  3. <div class="bos">
  4. <el-form ref="platform" :model="platform" label-width="120px">
  5. <el-form-item label="申请企业">
  6. <span class="pon" @click="info()">{{ param.companyName }}</span>
  7. </el-form-item>
  8. <el-form-item label="服务公司名称">
  9. <el-input v-model="platform.serviceCompany" disabled />
  10. </el-form-item>
  11. <el-form-item label="开户行">
  12. <el-input v-model="platform.bankName" disabled />
  13. </el-form-item>
  14. <el-form-item label="充值账户">
  15. <el-input v-model="platform.bankAccount" disabled />
  16. </el-form-item>
  17. </el-form>
  18. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  19. <el-form-item label="充值金额" prop="money">
  20. <el-input type="number" v-model="form.money" disabled />
  21. </el-form-item>
  22. <el-form-item label="充值凭证" prop="certificate">
  23. <ImageUpload v-model="form.certificate" :isShowTip="false" :limit="1"></ImageUpload>
  24. </el-form-item>
  25. <div class="opp">
  26. <span>操作人:{{ form.updateBy }},</span>
  27. <span>操作时间:{{ form.updateTime }}</span>
  28. </div>
  29. </el-form>
  30. <el-alert title="充值成功" type="success" show-icon class="cg" v-if="form.state === 1"></el-alert>
  31. <el-alert title="充值失败" :description="form.msg" type="error" show-icon class="cg" v-if="form.state === 2" :closable="false"></el-alert>
  32. </div>
  33. <div class="mfooter" v-if="!param.detail">
  34. <el-button type="primary" @click="submitForm(1)">确 认</el-button>
  35. <el-button type="danger" @click="submitForm(2)">不通过</el-button>
  36. <el-button @click="$layer.close(layerid)">取 消</el-button>
  37. </div>
  38. </div>
  39. </template>
  40. <script>
  41. import company from '@/views/work/company/edit.vue';
  42. export default {
  43. data() {
  44. return {
  45. platform: {},
  46. form: {},
  47. rules: {}
  48. };
  49. },
  50. props: {
  51. param: {
  52. type: Object,
  53. default: () => {
  54. return {};
  55. }
  56. },
  57. layerid: {
  58. type: String
  59. }
  60. },
  61. mounted() {
  62. this.ajax({ url: '/work/platform/detail' }).then((response) => {
  63. this.platform = response.data;
  64. });
  65. if (this.param.id) {
  66. this.ajax({ url: '/work/recharge/detail/' + this.param.id }).then((response) => {
  67. this.form = response.data;
  68. });
  69. }
  70. },
  71. methods: {
  72. info() {
  73. this.iframe({ obj: company, param: { id: this.form.companyId, detail: true }, title: '企业信息', width: '60%', height: '75%' });
  74. },
  75. submitForm(state) {
  76. this.$refs['form'].validate((valid) => {
  77. if (valid) {
  78. this.$prompt(state == 1 ? '确认充值' + this.form.money + '元到 ' + this.param.companyName + ' 账户? 该操作不可撤销!' : '确认无效充值', {
  79. type: 'warning',
  80. showInput: state == 1 ? false : true,
  81. inputType: 'textarea',
  82. inputPlaceholder: '充值失败',
  83. inputValidator: (value) => {
  84. if (!value && state == 2) {
  85. return '请输入充值失败原因';
  86. }
  87. }
  88. }).then(({ value }) => {
  89. this.post({ url: '/work/recharge/edit', data: { id: this.form.id, state: state, msg: value } }).then((response) => {
  90. this.$modal.msgSuccess('操作成功');
  91. this.$layer.close(this.layerid);
  92. this.$parent.getList();
  93. });
  94. });
  95. }
  96. });
  97. }
  98. }
  99. };
  100. </script>