jiaosong
2023-10-18 051abca66db233f5dbde3f69aa706422e1ac9fd9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<template>
  <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking">
    <el-table :data="list" stripe border>
      <el-table-column prop="bikeTypeId" label="车型" min-width="120px" align="center"></el-table-column>
      <el-table-column prop="bikeTypeName" label="车型类型" min-width="100px" align="center"></el-table-column>
      <el-table-column label="工作日计价规则" min-width="100px" align="center">
        <template slot-scope="{row}">
          <div style="text-align: left;">
            <div>方式:{{ row.baseTime == -1 ? '一口价' : '阶梯价格' }}</div>
            <div>{{ row.title || '-' }}</div>
            <!-- <div v-if="row.baseTime == -1">规则:{{ row.basePrice }}元畅玩一整天</div>
            <div v-else>规则:{{ `起步${row.baseTime}分钟${row.basePrice }元,超过后${row.unitPrice}元/${row.unitTime}分钟` }}</div> -->
          </div>
        </template>
      </el-table-column>
      <el-table-column label="节假日计价规则" min-width="100px" align="center">
        <template slot-scope="{row}">
          <div style="text-align: left;">
            <div>方式:{{ row.holidayBaseTime == -1 ? '一口价' : '阶梯价格' }}</div>
            <div>规则:{{ row.info || '-' }}</div>
            <!-- <div v-if="row.holidayBaseTime == -1">规则:{{ row.holidayBasePrice }}元畅玩一整天</div>
            <div v-else>规则:{{ `起步${row.holidayBaseTime}分钟${row.holidayBasePrice}元,超过后${row.holidayUnitPrice}元/${row.holidayUnitTime}分钟` }}</div> -->
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="payWay" label="操作" width="80px" align="center">
        <template slot-scope="{row}">
          <el-button type="text" @click="$refs.operaPriceConfigWindow.open('修改费率', row)">编辑</el-button>
        </template>
      </el-table-column>
      
    </el-table>
    <div slot="footer">
      <el-button @click="visible=false">返回</el-button>
    </div>
    <OperaPriceConfigWindow ref="operaPriceConfigWindow" @success="search" />
  </GlobalWindow>
</template>
 
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import OperaPriceConfigWindow from '@/components/business/OperaPriceConfigWindow'
import { findListByPricePramId } from '@/api/business/pricingParam'
export default {
  name: 'OperaSitesWindow',
  extends: BaseOpera,
  components: { GlobalWindow, OperaPriceConfigWindow },
  data() {
    return {
      // 表单数据
      form: {
        pricePramId: ''
      },
      list: [],
      memberRidesList: [],
    }
  },
  created() {
  },
  methods: {
    open(title, target) {
      this.title = title
      this.visible = true
      // 新建
      this.form.pricePramId = target.id
      this.search()
      // this.$nextTick(() => {
      //   this.list = target.payOrderDTOList
      //   this.memberRidesList = target.memberRidesList
      //   this.$refs.goodsOrderList.reload(target.model)
      // })
    },
    search() {
      findListByPricePramId(this.form)
        .then(res => {
          this.list = res
        })
    }
  },
 
}
</script>
 
<style scoped>
.title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  margin-top: 20px;
}
 
</style>