roomPrice.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!-- -->
  2. <template>
  3. <div class="m-core" style="margin-bottom: 18px;overflow: hidden;">
  4. <el-alert
  5. title="云教室定价"
  6. type="info"
  7. :closable="false"
  8. style="margin-bottom: 20px"
  9. ></el-alert>
  10. <el-col :lg="12" :md="18" :sm="18" :xs="24">
  11. <el-table :data="dataList"
  12. style="width:100% !important;"
  13. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  14. <el-table-column label="流量包">
  15. <template slot-scope="scope">
  16. {{ scope.row.minuteUpLimit || 0 }}分钟
  17. </template>
  18. </el-table-column>
  19. <el-table-column prop="contractPrice" label="合同价">
  20. <template slot-scope="scope">
  21. <el-input v-model.trim="scope.row.contractPrice" placeholder="请输入合同价" type="number"></el-input>
  22. </template>
  23. </el-table-column>
  24. <el-table-column prop="price" label="原价(元)">
  25. </el-table-column>
  26. </el-table>
  27. </el-col>
  28. </div>
  29. </template>
  30. <script>
  31. import { queryPage as cloudQueryPage } from '@/views/platformManager/cloudTrafficPackage/api'
  32. export default {
  33. props: ['type'],
  34. data () {
  35. const query = this.$route.query
  36. return {
  37. payType: query.type,
  38. dataList: [],
  39. };
  40. },
  41. mounted () {
  42. this.__init()
  43. },
  44. computed: {
  45. isDisabled() {
  46. return this.type == 'setting' ? true : false
  47. }
  48. },
  49. methods: {
  50. async __init() {
  51. try {
  52. const res = await cloudQueryPage({ page: 1, rows: 999 })
  53. const result = res.data?.rows || []
  54. for(let item of result) {
  55. this.dataList.push({
  56. id: item.id,
  57. minuteUpLimit: item.minuteUpLimit,
  58. price: item.price,
  59. contractPrice: null, // 合同价
  60. })
  61. }
  62. } catch(e) {
  63. console.log(e)
  64. }
  65. },
  66. onSubmit() {
  67. return true
  68. // let status = false
  69. // this.$refs.form.validate(_ => {
  70. // status = _
  71. // })
  72. // return status
  73. },
  74. getValues() {
  75. return this.dataList
  76. },
  77. },
  78. };
  79. </script>
  80. <style lang='scss' scoped>
  81. </style>