Commit bcc347c3 authored by 小费同学阿's avatar 小费同学阿 💬

Merge remote-tracking branch 'origin/master'

parents 1c55f378 60b69957
import request from '@/utils/request'
// 查询宠物宠主信息
export function getPetInfo(query) {
return request({
url: '/business/register/getPetInfo',
method: 'get',
params: query
})
}
// 获取当日值班医生列表
export function getDoctorInfo(query) {
return request({
url: '/business/register/getDoctorInfo',
method: 'get',
params: query
})
}
// 根据手机号判断宠主是否存在,不存在新增宠主
export function checkPetOwner(query) {
return request({
url: '/business/register/checkPetOwner',
method: 'get',
params: query
})
}
......@@ -119,12 +119,19 @@ export const constantRoutes = [
meta: { title: '设备管理', icon: 'date' }
},
{
path: 'equipment-detail',
path: 'equipment-detail/:id',
props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-detail'),
name: 'EquipmentDetail',
meta: { title: '设备详情' }
},
{
path: 'equipment-add',
props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-add'),
name: 'EquipmentAdd',
meta: { title: '设备新增' }
},
{
path: 'use-management',
props: true,
......
......@@ -59,10 +59,10 @@
@change="handleSort"
>
<el-option
v-for="item in sortedList"
:key="item.id"
:label="item.sortedColumn"
:value="item"
v-for="index in sortedList"
:key="index.id"
:label="index.sortedColumn"
:value="index"
/>
</el-select>
</el-form-item>
......@@ -70,7 +70,7 @@
<el-row>
<el-col :span="12" style="padding-bottom: 20px;">
<el-button
v-hasPermi="['business:device:add']"
v-hasPermi="['system:device:add']"
class="fourWordsBtn"
icon="el-icon-plus"
@click="handleAdd"
......@@ -85,18 +85,18 @@
<el-button
icon="el-icon-top-right"
class="fourWordsBtn"
@click="reverseSelect(userList)"
@click="reverseSelect(deviceList)"
>反向选择
</el-button>
<el-button
v-hasPermi="['business:device:import']"
v-hasPermi="['system:device:import']"
class="fourWordsBtn"
icon="el-icon-bottom-left"
@click="handleImport"
>批量导入
</el-button>
<el-button
v-hasPermi="['business:device:export']"
v-hasPermi="['system:device:export']"
class="fourWordsBtn"
icon="el-icon-top-right"
@click="handleExport"
......@@ -128,13 +128,22 @@
</template>
</el-table-column>
<el-table-column label="服务地点" align="center" prop="reservationMethod" show-overflow-tooltip />
<el-table-column v-if="userType=== '3'" label="服务价格" align="center" prop="servicePrice" />
<el-table-column v-if="userType=== '3'" label="服务价格" align="center" prop="orderPrice">
<template slot-scope="scope">
<span>{{ scope.row.orderPrice || "-" }}</span>
</template>
</el-table-column>
<el-table-column label="设备服务费" align="center" prop="servicePrice">
<template slot-scope="scope">
<span>{{ scope.row.servicePrice || "-" }}</span>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="creatTime" show-overflow-tooltip />
<el-table-column label="创建时间" align="center" prop="createTime" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ replace(scope.row.createTime) || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
......@@ -146,22 +155,23 @@
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-hasPermi="['system:person:edit']"
v-hasPermi="['system:device:edit']"
size="mini"
type="success"
icon="el-icon-document"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(123, 213, 102);"
plain
@click="detailsDevice(scope.row.deviceId)"
@click="detailsDevice(scope.row.id)"
>详情
</el-button>
<el-button
v-hasPermi="['system:device:edit']"
plain
size="mini"
type="success"
icon="el-icon-edit"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(52, 144, 206);color: #3490CE;background: rgba(52,144,206,0.1);"
@click="editDevice(scope.row.deviceId)"
@click="editDevice(scope.row.id)"
>编辑
</el-button>
</template>
......@@ -322,12 +332,14 @@
<script>
import { regionData, CodeToText } from 'element-china-area-data'
import { listDevice, getDevice, delDevice, addDevice } from '@/api/business/device'
import { listDevice, getDevice, delDevice } from '@/api/business/device'
import { getInfo } from '@/api/login'
import { parseTime } from '@/utils/ruoyi'
export default {
name: 'EquipmentManagement',
dicts: ['device_status', 'device_type', 'exam_type'],
data() {
return {
// 支持检查类型
......@@ -398,6 +410,8 @@ export default {
citys: regionData,
// 遮罩层
loading: false,
// 用户类型
userType: '',
// 选中数组
ids: [],
// 非单个禁用
......@@ -443,9 +457,17 @@ export default {
serviceArea: [],
// 表单参数
form: {
useTime: [],
appointmentMethod: '',
serviceArea: ''
deviceName: '',
useTime: '',
// appointmentMethod: '',
serviceArea: '',
head: '',
phone: '',
deviceType: '',
reservationMethod: '',
status: '',
remark: ''
},
// 表单校验
rules: {
......@@ -519,6 +541,10 @@ export default {
}
})
},
// 日期格式化
replace(time) {
return parseTime(time, '{y}/{m}/{d}')
},
showStatus(date) {
if (date === null) {
return null
......@@ -530,26 +556,7 @@ export default {
return '• 已报废'
}
},
/** 跳转到编辑页*/
editDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
id: id,
identify: '1'
}
})
},
/** 跳转到详情页*/
detailsDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
id: id,
identify: '2'
}
})
},
// 选择排序规则
handleSort(val) {
this.sortedColumn = val.sortedColumn
......@@ -568,14 +575,20 @@ export default {
}
this.form.serviceArea = codeArray.join(';')
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '用户导入'
this.upload.open = true
},
/** 查询设备列表 */
getList() {
this.loading = true
listDevice(this.queryParams).then(response => {
this.deviceList = response.rows
this.deviceList.forEach(item => {
this.$set(item, 'checkTypeArr', item.checkType.split(','))
})
console.log('this.deviceList', this.deviceList)
// this.deviceList.forEach(item => {
// this.$set(item, 'checkTypeArr', item.checkType.split(','))
// })
console.log('deviceList', this.deviceList)
this.total = response.total
this.loading = false
......@@ -645,11 +658,31 @@ export default {
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 跳转到编辑页*/
editDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
identify: '1',
id: id
}
})
},
/** 跳转到详情页*/
detailsDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
identify: '2',
id: id
}
})
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加设备'
this.$router.push({
name: 'EquipmentAdd'
})
},
/** 修改按钮操作 */
handleUpdate(row) {
......@@ -667,23 +700,51 @@ export default {
}
})
},
/** 提交按钮 */
submitForm() {
if (this.form.checkType != null && this.form.checkType !== '') {
this.form.checkType = this.form.checkType.toString()
}
this.form.useTime = JSON.stringify(this.useTime)
this.$refs['form'].validate(valid => {
if (valid) {
console.log(this.form)
addDevice(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
// 全部选择
selectAll() {
this.$refs.table.toggleAllSelection()
},
// 反向选择
reverseSelect(rows) {
rows.forEach(row => {
this.$refs.table.toggleRowSelection(row)
})
},
// /**
// * 全部选择
// * @param selection 已选择内容
// * @param all 是否永远进行全选操作
// */
// async selectAll(selection = [], all = true) {
// if (this.veterinarianList.length !== selection.length && !all) {
// this.effectTableSelect([])
// } else {
// await this.changeTableSelect()
// }
// },
// // 反向选择
// reverseSelect(rows) {
// rows.forEach(row => {
// this.$refs.table.toggleRowSelection(row)
// })
// },
// /** 提交按钮 */
// submitForm() {
// if (this.form.checkType != null && this.form.checkType !== '') {
// this.form.checkType = this.form.checkType.toString()
// }
// this.form.useTime = JSON.stringify(this.useTime)
// this.$refs['form'].validate(valid => {
// if (valid) {
// console.log(this.form)
// addDevice(this.form).then(response => {
// this.$modal.msgSuccess('新增成功')
// this.open = false
// this.getList()
// })
// }
// })
// },
/** 删除按钮操作 */
handleDelete(row) {
console.log(row)
......@@ -699,7 +760,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('business/device/export', {
this.download('system/device/export', {
...this.queryParams
}, `device_${new Date().getTime()}.xlsx`)
}
......
......@@ -20,7 +20,7 @@
<div class="title">项目{{ convertToChineseNumeral( index + 1) }}</div>
<div>
<el-button
v-show="(!item.id) || (item.status === '1')"
v-show="(!item.id) || (item.id && item.status === '0' && item.isDelete === '0')"
icon="el-icon-delete"
size="mini"
class="delBtn"
......@@ -36,7 +36,7 @@
label="项目名称:"
:prop="'settingList.'+index+'.name'"
:rules="[
{ required: true, message: '请选择班次名称', trigger: 'blur' }
{ required: true, message: '请输入项目名称', trigger: 'blur' }
]"
>
<el-input
......@@ -75,7 +75,7 @@
label="项目单价:"
:prop="'settingList.'+index+'.price'"
:rules="[
{ required: true, message: '请选择项目单价', trigger: 'change' }
{ required: true, message: '请输入项目单价', trigger: 'change' }
]"
>
<el-input-number
......@@ -179,7 +179,7 @@
</el-form>
<div>
<el-button class="fourWordsBtn" type="primary" size="mini" @click="handleAddItem">新增项目</el-button>
<el-button class="queryBtn" type="primary" size="mini" @click="handleSubmit">提交</el-button>
<el-button v-loading.fullscreen.lock="fullscreenLoading" class="queryBtn" type="primary" size="mini" @click="handleSubmit">提交</el-button>
<el-button class="resetBtn" size="mini" @click="handleGoBack">返回</el-button>
</div>
</div>
......@@ -187,7 +187,7 @@
<script>
import { listItem, updateItem } from '@/api/business/item'
import { delItem, listItem, updateItem } from '@/api/business/item'
export default {
name: 'CheckItem',
......@@ -204,7 +204,8 @@ export default {
supportInsure: '',
sort: '',
status: '1',
content: ''
content: '',
itemType: '0' // 用于判断是检查的项目
}
]
},
......@@ -219,7 +220,8 @@ export default {
insuranceOptions: [
{ value: '1', label: '是' },
{ value: '0', label: '否' }
]
],
fullscreenLoading: false
}
},
created() {
......@@ -241,7 +243,8 @@ export default {
supportInsure: '',
sort: '',
status: '1',
content: ''
content: '',
itemType: '0'
}]
}
}
......@@ -294,7 +297,7 @@ export default {
confirmButtonClass: 'queryBtn'
}).then(function() {
console.log('item.id', item.id)
return updateItem({ id: item.id, delFlag: '2' })
return delItem(item.id)
}).then(() => {
this.getList()
this.$refs['form'].resetFields()
......@@ -323,7 +326,8 @@ export default {
supportInsure: '',
sort: '',
status: '1',
content: ''
content: '',
itemType: '0'
})
},
// 提交
......@@ -331,6 +335,19 @@ export default {
this.$refs['form'].validate(valid => {
if (valid) {
console.log('成功通过....')
const addList = JSON.parse(JSON.stringify(this.form.settingList))
console.log('新增或者修改的集合', addList)
// 开始加loading遮罩, 防止操作
// this.fullscreenLoading = true
updateItem(addList).then(response => {
console.log('新增/修改--', response)
if (response.code === 200) {
this.getList()
// 解开遮罩层
this.$message.success('操作成功')
// this.fullscreenLoading = false
}
})
}
})
},
......@@ -348,6 +365,7 @@ export default {
.app-container {
background-color: #FFFFFF;
padding: 40px 48px 50px 49px;
min-height: 850px;
.formTop{
display: flex;
justify-content: space-between;
......
<template>
<el-dialog class="pet-choose-modle" title="选择宠物" :visible.sync="isShow" width="50%" append-to-body>
<el-dialog class="pet-choose-modle" title="选择宠物" :visible.sync="isShow" :before-close="closeModle" width="50%" append-to-body>
<el-form ref="queryForm" :inline="true" :model="queryParams" label-width="100px" size="small">
<div class="basicInformation">
<div class="title">方式一:输入宠物ID查询</div>
</div>
<el-form-item prop="petNickname" label="宠物ID:">
<el-form-item prop="petCode" label="宠物ID:">
<el-input
v-model="queryParams.petNickname"
v-model="queryParams.petCode"
clearable
placeholder="请输入宠物ID"
@keyup.enter.native="handleQuery"
@blur="handleQuery"
/>
</el-form-item>
<div class="basicInformation">
<div class="title">方式二:通过宠主查询</div>
</div>
<el-form-item prop="petBreed" label="宠主姓名:">
<el-form-item prop="ownerName" label="宠主姓名:">
<el-input
v-model="queryParams.petBreed"
v-model="queryParams.ownerName"
clearable
placeholder="请输入宠物ID"
placeholder="请输入宠主姓名"
@keyup.enter.native="handleQuery"
@blur="handleQuery"
/>
</el-form-item>
<el-form-item prop="insureList" label="手机号:">
<el-form-item prop="phone" label="手机号:">
<el-input
v-model="queryParams.insure"
v-model="queryParams.phone"
clearable
placeholder="手机号"
@keyup.enter.native="handleQuery"
@blur="handleQuery"
/>
</el-form-item>
</el-form>
......@@ -45,13 +48,12 @@
>
<el-table-column align="center" min-width="30" reserve-selection type="selection" />
<el-table-column align="center" label="序号" min-width="80" show-overflow-tooltip type="index" />
<el-table-column align="center" label="宠主姓名" min-width="80" prop="petOwners.nickname" show-overflow-tooltip />
<el-table-column align="center" label="手机号" min-width="80" prop="petOwners.nickname" show-overflow-tooltip />
<el-table-column align="center" label="会员等级" min-width="80" prop="petOwners.nickname" show-overflow-tooltip />
<el-table-column align="center" label="会员卡余额" min-width="80" prop="petOwners.nickname" show-overflow-tooltip />
<el-table-column align="center" label="宠主姓名" min-width="80" prop="ownerName" show-overflow-tooltip />
<el-table-column align="center" label="手机号" min-width="80" prop="phone" show-overflow-tooltip />
<el-table-column align="center" label="会员等级" min-width="80" prop="membershipLevel" show-overflow-tooltip />
<el-table-column align="center" label="会员卡余额" min-width="80" prop="balance" show-overflow-tooltip />
<el-table-column align="center" label="宠物昵称" min-width="80" prop="petNickname" show-overflow-tooltip />
<el-table-column
:formatter="(row, col, cell) => options[cell.substring(0, 1)].children.find(({value}) => value == Number(cell.substring(1))) && options[cell.substring(0, 1)].children.find(({value}) => value == Number(cell.substring(1))).label"
align="center"
label="宠物品种"
min-width="80"
......@@ -81,7 +83,7 @@
</template>
<script>
import { listPets } from '@/api/business/pets'
import { getPetInfo } from '@/api/business/registration'
import { deepClone } from '@/utils'
export default {
name: 'ChoosePet',
......@@ -93,8 +95,8 @@ export default {
},
data() {
return {
// 选中数
ids: [],
// 选中数
chooseData: {},
// 总条数
total: 0,
// 宠物表格数据
......@@ -104,25 +106,14 @@ export default {
// 查询参数
queryParams: {
// 导出列表
idList: null,
pageNum: 1,
pageSize: 10,
petNickname: null,
petAge: null,
petSex: null,
petBreed: [],
sterilizationStatus: null,
vaccineSituation: null,
petPicture: null,
petColor: null,
petWeight: null,
existState: null,
createTime: null,
petOwnersId: null,
petCode: '',
ownerName: '',
phone: '',
params: {
sort: null
},
createBy: null
}
},
options: [{
value: '0',
......@@ -145,7 +136,8 @@ export default {
methods: {
/** 列表区--多选框选中数据 */
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
console.log('selection', selection)
this.chooseData = selection[0]
},
cellClass(row) {
if (row.columnIndex === 0) {
......@@ -153,7 +145,8 @@ export default {
}
},
choosePet() {
console.log('1223')
this.$emit('petChoose', this.chooseData)
this.$emit('petModleClose', false)
},
closeModle() {
this.$emit('petModleClose', false)
......@@ -186,19 +179,9 @@ export default {
getList() {
this.loading = true
this.queryParams.params = { ...this.queryParams.params }
if (this.daterangeCreateTime != null && this.daterangeCreateTime !== '') {
this.queryParams.params['beginCreateTime'] = this.daterangeCreateTime[0]
this.queryParams.params['endCreateTime'] = this.daterangeCreateTime[1]
}
if (this.daterangeUpdateTime != null && this.daterangeUpdateTime !== '') {
this.queryParams.params['beginUpdateTime'] = this.daterangeUpdateTime[0]
this.queryParams.params['endUpdateTime'] = this.daterangeUpdateTime[1]
}
const queryParams = deepClone(this.queryParams)
queryParams.petSex = this.queryParams.petSex && this.queryParams.petSex.join(',')
queryParams.petBreed = this.queryParams.petBreed && this.queryParams.petBreed.map(item => item.join('')).join(',')
listPets(queryParams).then(response => {
console.log('这里面是很多列表页宠物的信息:', this.petsList)
getPetInfo(queryParams).then(response => {
console.log('查询宠物宠主信息:', this.petsList)
this.petsList = response.rows
this.total = response.total
this.loading = false
......
......@@ -6,7 +6,7 @@
<div class="tip-green" />
<div
class="tip-content"
>进度信息
>挂号信息
</div>
</div>
<!--进度内容-->
......@@ -116,13 +116,13 @@
</el-button>
</div>
<div class="register" @click="registration(1)">
<div class="register" @click="registration(1,'usual')">
<div class="register-img">
<el-image :src="require('@/assets/register/xinzengguahao_guahaohui@2x.png')" />
</div>
<el-button type="text">挂号</el-button>
</div>
<div class="add" @click="registration(1)">
<div class="add" @click="registration(1, 'add')">
<div class="add-img">
<el-image :src="require('@/assets/register/xinzengguahao_jiahao@2x.png')" />
</div>
......@@ -136,14 +136,31 @@
</template>
<script>
import { getDoctorInfo } from '@/api/business/registration'
export default {
name: 'DoctorCard',
data() {
return {
}
},
mounted() {
this.getDoctorList()
},
methods: {
/** 获取当日值班医生列表*/
getDoctorList() {
getDoctorInfo().then(response => {
console.log('获取当日值班医生列表:', response)
})
},
/** 显示医生详情弹窗*/
doctorDetail(id) {
this.$emit('doctorDetail', id)
},
registration(id) {
this.$emit('registration', id)
/** 显示挂号/加号弹窗*/
registration(id, type) {
this.$emit('registration', { id, type })
}
}
}
......
<template>
<el-dialog class="doctor-detail-modle" title="详情" :visible.sync="isShow" width="50%" append-to-body>
<el-dialog class="doctor-detail-modle" title="详情" :visible.sync="isShow" :before-close="closeModle" width="50%" append-to-body>
<el-form ref="doctorForm" :model="doctorForm" label-width="100px" size="small">
<el-row>
<el-col :span="8">
......
<template>
<el-dialog class="register-modle" :title="title" :visible.sync="isShow" width="50%" append-to-body>
<el-dialog class="register-modle" :title="registrationType === 'usual' ? '挂号' : '加号'" :visible.sync="isShow" width="50%" :before-close="closeModle" append-to-body>
<el-form ref="queryForm" :inline="true" :model="queryParams" label-width="100px" size="small">
<el-form-item prop="petNickname" label="主治兽医:">
<el-input
......@@ -64,7 +64,7 @@
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="choosePet">确 定</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
<el-button @click="closeModle">取 消</el-button>
</div>
</el-dialog>
......@@ -77,13 +77,17 @@ import { listPets } from '@/api/business/pets'
export default {
name: 'RegisterModle',
props: {
title: {
type: String,
default: '挂号'
},
isShow: {
type: Boolean,
default: false
},
registrationType: {
type: String,
defalut: 'usual'
},
doctorId: {
type: String,
defalut: ''
}
},
data() {
......@@ -110,6 +114,11 @@ export default {
}
},
methods: {
submit() {},
/** 关闭弹窗*/
closeModle() {
this.$emit('registerModleClose', false)
},
/** 列表区--多选框选中数据 */
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
......
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