|  |  |  | 
|---|
|  |  |  | <el-table-column prop="status" label="状态" min-width="100px" align="center"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <!--  0启用 1禁用 --> | 
|---|
|  |  |  | <el-switch v-model="form.status" active-value="0" inactive-value="1" active-color="#13ce66"></el-switch> | 
|---|
|  |  |  | <el-switch v-model="row.status" :active-value="0" :inactive-value="1" active-color="#13ce66" @change="changeStatus(row)"></el-switch> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="createDate" label="创建时间" min-width="100px" align="center"></el-table-column> | 
|---|
|  |  |  | <!-- <el-table-column prop="creator" label="创建人" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="editDate" label="编辑时间" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="editor" label="编辑人" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="isdeleted" label="是否已删除 0未删除 1已删除" min-width="100px"></el-table-column> --> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- <el-table-column prop="info" label="备注" min-width="100px"></el-table-column> --> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | v-if="containPermissions(['business:pricingparam:update', 'business:pricingparam:delete'])" | 
|---|
|  |  |  | label="操作" | 
|---|
|  |  |  | 
|---|
|  |  |  | fixed="right" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-button type="text" @click="$refs.operaPricingParamWindow.open('编辑定价方案配置', row)" icon="el-icon-edit" v-permissions="['business:pricingparam:update']">编辑</el-button> | 
|---|
|  |  |  | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:pricingparam:delete']">删除</el-button> | 
|---|
|  |  |  | <el-button type="text" @click="$refs.priceConfiguration.open(`${row.name}定价方案`, row)">配置费率</el-button> | 
|---|
|  |  |  | <el-button type="text" @click="$refs.operaPricingParamWindow.open('编辑定价方案配置', row)" v-permissions="['business:pricingparam:update']">编辑</el-button> | 
|---|
|  |  |  | <el-button type="text" @click="deleteById(row)" v-permissions="['business:pricingparam:delete']">删除</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <!-- 新建/修改 --> | 
|---|
|  |  |  | <OperaPricingParamWindow ref="operaPricingParamWindow" @success="handlePageChange"/> | 
|---|
|  |  |  | <PriceConfiguration ref="priceConfiguration" @success="handlePageChange"/> | 
|---|
|  |  |  | </TableLayout> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import TableLayout from '@/layouts/TableLayout' | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import OperaPricingParamWindow from '@/components/business/OperaPricingParamWindow' | 
|---|
|  |  |  | import PriceConfiguration from '@/components/business/priceConfiguration' | 
|---|
|  |  |  | import { updateStatusById } from '@/api/business/pricingParam' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'PricingParam', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaPricingParamWindow }, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaPricingParamWindow, PriceConfiguration }, | 
|---|
|  |  |  | data () { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | 
|---|
|  |  |  | 'field.main': 'id' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | changeStatus(row) { | 
|---|
|  |  |  | updateStatusById(row) | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.$tip.apiSuccess('成功') | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(e => { | 
|---|
|  |  |  | this.$tip.apiFailed(e) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .finally(() => { | 
|---|
|  |  |  | this.handlePageChange() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|