Commit 37bec20b by ‘巴博尔’

Merge branch 'feature/v1/zmj' of git.nyinhong.com:PeiZhen-Java/peizhen-vue into feature/v1/plb

parents 0a58d3f5 def128b3
...@@ -16,7 +16,14 @@ export function getBusiness(id) { ...@@ -16,7 +16,14 @@ export function getBusiness(id) {
method: 'get' method: 'get'
}) })
} }
// 查询业务详细
export function servicesGET(query) {
return request({
url: '/system/services/list',
method: 'get',
params: query
})
}
// 新增业务 // 新增业务
export function addBusiness(data) { export function addBusiness(data) {
return request({ return request({
......
...@@ -19,7 +19,7 @@ const service = axios.create({ ...@@ -19,7 +19,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分 // axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API, baseURL: process.env.VUE_APP_BASE_API,
// 超时 // 超时
timeout: 10000 timeout: 50000
}) })
// request拦截器 // request拦截器
......
...@@ -74,35 +74,10 @@ ...@@ -74,35 +74,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="业务名称" align="center" prop="name" :show-overflow-tooltip="true" /> <el-table-column label="业务名称" align="center" prop="name" :show-overflow-tooltip="true" />
<el-table-column type="expand" label="服务" align="center" prop="name"> <el-table-column label="服务" align="center" prop="name">
<template slot-scope="props"> <template slot-scope="props">
<el-table key="inside" :data="props.row.servicesVoList"> <el-button type="primary" round @click="clickServices(props.row)">服务</el-button>
<el-table-column prop="name" label="服务名称" :show-overflow-tooltip="true"></el-table-column> <!-- <el-button size="mini" type="text" icon="el-icon-edit">新增1111</el-button> -->
<el-table-column prop="cover" label="封面" width="170">
<template slot-scope="{ row }">
<imageUpload v-model="row.cover" :limit="row.cover.split(',').length" :disabled="true" :isShowTip="false">
</imageUpload>
</template>
</el-table-column>
<el-table-column prop="highPrice" label="高价" :show-overflow-tooltip="true" />
<el-table-column prop="price" label="价格" :show-overflow-tooltip="true" />
<el-table-column prop="cityName" label="城市" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="fenmo" label="平台分成" :show-overflow-tooltip="true" />
<el-table-column prop="duration" label="时长(小时)" :show-overflow-tooltip="true" />
<el-table-column prop="overtime" label="超时计费/30分钟" :show-overflow-tooltip="true" />
<el-table-column label="服务时段" :show-overflow-tooltip="true">
<template slot-scope="{ row }">
<span v-if="row.startTime && row.endTime">{{ row.startTime }} - {{ row.endTime }}</span>
<span v-else>未设置</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleUpdateServe(scope.row)">修改服务</el-button>
</template>
</el-table-column>
</el-table>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" :show-overflow-tooltip="true" /> <el-table-column label="更新时间" align="center" prop="updateTime" width="180" :show-overflow-tooltip="true" />
...@@ -118,6 +93,63 @@ ...@@ -118,6 +93,63 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" /> @pagination="getList" />
<el-dialog :title="title" :visible.sync="servicesOpen" width="80%" append-to-body max-height="100px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<!-- <el-form-item label="提供医院" prop="hospitals">
<el-input
v-model="queryParams.hospitals"
placeholder="请输入提供医院"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item label="服务名称" prop="name">
<el-input v-model="name" placeholder="请输入服务名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="城市" prop="cityId">
<el-select filterable clearable v-model="cityId" placeholder="请选择">
<el-option v-for="item in cityVoList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuerys">搜索</el-button>
</el-form-item>
</el-form>
<el-table key="inside" :data="servicesList">
<el-table-column prop="name" label="服务名称" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="cover" label="封面" width="170">
<template slot-scope="{ row }">
<imageUpload v-model="row.cover" :limit="row.cover.split(',').length" :disabled="true" :isShowTip="false">
</imageUpload>
</template>
</el-table-column>
<el-table-column prop="highPrice" label="高价" :show-overflow-tooltip="true" />
<el-table-column prop="price" label="价格" :show-overflow-tooltip="true" />
<el-table-column prop="cityName" label="城市" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="fenmo" label="平台分成" :show-overflow-tooltip="true" />
<el-table-column prop="duration" label="时长(小时)" :show-overflow-tooltip="true" />
<el-table-column prop="overtime" label="超时计费/30分钟" :show-overflow-tooltip="true" />
<el-table-column label="服务时段" :show-overflow-tooltip="true">
<template slot-scope="{ row }">
<span v-if="row.startTime && row.endTime">{{ row.startTime }} - {{ row.endTime }}</span>
<span v-else>未设置</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateServe(scope.row)">修改服务</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="totals > 0" :total="totals" :page.sync="pageNum" :limit.sync="pageSize"
@pagination="clickServices" />
<div slot="footer" class="dialog-footer" style="text-align: center!important;">
<!-- <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> -->
<el-button @click="clcikCancel">关 闭</el-button>
</div>
</el-dialog>
<!-- 添加或修改业务对话框 --> <!-- 添加或修改业务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
...@@ -209,6 +241,7 @@ import { ...@@ -209,6 +241,7 @@ import {
getServe, getServe,
addServe, addServe,
updateServe, updateServe,
servicesGET
} from "@/api/operation/business"; } from "@/api/operation/business";
import { listHospital, cityVoListGET } from "@/api/hispotalManage/hospital"; import { listHospital, cityVoListGET } from "@/api/hispotalManage/hospital";
...@@ -216,6 +249,7 @@ export default { ...@@ -216,6 +249,7 @@ export default {
name: "Business", name: "Business",
data() { data() {
return { return {
servicesList: [],
// 按钮loading // 按钮loading
buttonLoading: false, buttonLoading: false,
// 遮罩层 // 遮罩层
...@@ -230,8 +264,11 @@ export default { ...@@ -230,8 +264,11 @@ export default {
showSearch: true, showSearch: true,
service: true, service: true,
cityVoList: [], cityVoList: [],
name: '',
cityId: '',
// 总条数 // 总条数
total: 0, total: 0,
totals: 0,
bid: '', bid: '',
// 业务表格数据 // 业务表格数据
businessList: [], businessList: [],
...@@ -239,6 +276,7 @@ export default { ...@@ -239,6 +276,7 @@ export default {
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
servicesOpen: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -246,6 +284,8 @@ export default { ...@@ -246,6 +284,8 @@ export default {
hospitals: undefined, hospitals: undefined,
name: undefined, name: undefined,
}, },
pageNum: 1,
pageSize: 10,
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
...@@ -380,6 +420,37 @@ export default { ...@@ -380,6 +420,37 @@ export default {
this.bid = row.id this.bid = row.id
this.resetServe(); this.resetServe();
}, },
handleQuerys() {
this.pageNum = 1
this.pageSize = 10
let par = {}
this.clickServices(par)
},
clickServices(val) {
// console.log(val, '==============')
if (val.id != undefined) {
this.servicesID = val.id
}
let params = {
pageNum: this.pageNum,
pageSize: this.pageSize,
bid: this.servicesID,
name:this.name,
cityId:this.cityId
}
servicesGET(params).then((res) => {
this.totals = res.total
this.servicesList = res.rows
this.servicesOpen = true
})
// return
},
clcikCancel() {
this.pageNum = 1
this.pageSize = 10
this.servicesOpen = false
},
// 修改服务 // 修改服务
handleUpdateServe(row) { handleUpdateServe(row) {
this.service = true this.service = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment