Commit 9b3d1961 authored by 高滢's avatar 高滢

Merge remote-tracking branch 'origin/master'

parents 1d78401d c67d5f16
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="文章封面" prop="articleCover"> <el-form-item label="文章封面" prop="articleCover">
<image-upload v-model="form.articleCover" limit="1" :is-show-tip="false" /> <image-upload v-model="form.articleCover" :limit="1" :is-show-tip="false" />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="articleStatus"> <el-form-item label="状态" prop="articleStatus">
<div style="display: flex;"> <div style="display: flex;">
......
...@@ -379,7 +379,7 @@ export default { ...@@ -379,7 +379,7 @@ export default {
{ type: 'number', validator: this.validUseNum, trigger: 'change' } { type: 'number', validator: this.validUseNum, trigger: 'change' }
], ],
address: [ address: [
{ required: true, message: '请输入服务地址', trigger: 'blur' } { required: true, message: '请输入详细地址地址(街道、楼牌号等)', trigger: 'blur' }
], ],
'useTime.ams': [ 'useTime.ams': [
{ required: true, validator: this.validateMorningStart, trigger: 'change' } { required: true, validator: this.validateMorningStart, trigger: 'change' }
......
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
<el-form-item :label="userType === '00' ?'平台自有设备':'医院自有设备'" prop="isPrivate"> <el-form-item :label="userType === '00' ?'平台自有设备':'医院自有设备'" prop="isPrivate">
<el-select v-model="form.isPrivate" disabled style="width: 250px"> <el-select v-model="form.isPrivate" disabled style="width: 250px">
<el-option <el-option
v-for="index in optionss" v-for="(item, index) in optionss"
:key="index" :key="index"
:label="index.label" :label="item.label"
:value="index.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
<el-cascader <el-cascader
ref="serviceArea" ref="serviceArea"
v-model="form.selectedOptions" v-model="form.selectedOptions"
disabled
size="large" size="large"
:options="cityOptions" :options="cityOptions"
placeholder="暂无数据" placeholder="暂无数据"
...@@ -180,7 +181,7 @@ ...@@ -180,7 +181,7 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<e-col :span="8"> <el-col :span="8">
<el-form-item label="下午开始时间"> <el-form-item label="下午开始时间">
<el-time-select <el-time-select
v-model="form.useTime.pme" v-model="form.useTime.pme"
...@@ -198,7 +199,7 @@ ...@@ -198,7 +199,7 @@
}" }"
/> />
</el-form-item> </el-form-item>
</e-col> </el-col>
</el-row> </el-row>
<!-- 6--> <!-- 6-->
<el-row> <el-row>
...@@ -335,9 +336,9 @@ ...@@ -335,9 +336,9 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="hpshow" label="医院自有设备" prop="deviceName"> <el-form-item v-if="hpshow" label="医院自有设备">
<el-select v-model="form.isPrivate"disabled style="width: 250px" placeholder="请选择医院自有设备"> <el-select v-model="form.isPrivate" disabled style="width: 250px" placeholder="请选择医院自有设备">
<el-option <el-option
v-for="(item ,index) in optionss" v-for="(item ,index) in optionss"
:key="index" :key="index"
...@@ -381,7 +382,7 @@ ...@@ -381,7 +382,7 @@
<el-form-item label="服务地点" prop="selectedOptions"> <el-form-item label="服务地点" prop="selectedOptions">
<el-cascader <el-cascader
ref="serviceArea" ref="serviceArea"
v-model="selectedOptions" v-model="form.selectedOptions"
size="large" size="large"
:options="cityOptions" :options="cityOptions"
placeholder="请选择服务地点" placeholder="请选择服务地点"
...@@ -650,7 +651,7 @@ export default { ...@@ -650,7 +651,7 @@ export default {
cityOptions: regionData, cityOptions: regionData,
// 存储省市区选中的地址码 // 存储省市区选中的地址码
selectedOptions: [], // selectedOptions: [],
// 地址码对用的文字 // 地址码对用的文字
addtions: { addtions: {
names: '' names: ''
...@@ -702,9 +703,13 @@ export default { ...@@ -702,9 +703,13 @@ export default {
deviceType: [ deviceType: [
{ required: true, message: '请选择设备类型', trigger: 'change' } { required: true, message: '请选择设备类型', trigger: 'change' }
], ],
addressCode: [ selectedOptions: [
{ required: true, message: '请选择服务地点', trigger: 'change,blur' } // { required: true, message: '请选择服务地点', trigger: 'blur' }
{ required: true, validator: this.validaddress, trigger: 'blur' }
], ],
// addressCode: [
// { required: true, message: '请选择服务地点', trigger: 'change,blur' }
// ],
address: [ address: [
{ required: true, message: '请输入服务地址', trigger: 'blur' } { required: true, message: '请输入服务地址', trigger: 'blur' }
], ],
...@@ -861,7 +866,7 @@ export default { ...@@ -861,7 +866,7 @@ export default {
}, },
// 权重不能为0 // 权重不能为0
validWeigh(rule, value, callback) { validWeigh(rule, value, callback) {
console.log('value', value) // console.log('value', value)
if (value > 0) { if (value > 0) {
callback() callback()
} else { } else {
...@@ -870,22 +875,30 @@ export default { ...@@ -870,22 +875,30 @@ export default {
}, },
// 单位时段服务数不能为0 // 单位时段服务数不能为0
validUseNum(rule, value, callback) { validUseNum(rule, value, callback) {
console.log('value', value) // console.log('value', value)
if (value > 0) { if (value > 0) {
callback() callback()
} else { } else {
callback(new Error('单位时段服务数不能为0')) callback(new Error('单位时段服务数不能为0'))
} }
}, },
validaddress(rule, value, callback) {
console.log('validaddress', this.form.selectedOptions)
if (this.form.selectedOptions.length>0) {
callback()
} else {
callback(new Error('请选择服务地点'))
}
},
// 四个时间的表单校验 // 四个时间的表单校验
validateMorningStart(rule, value, callback) { validateMorningStart(rule, value, callback) {
// // TODO: please clear this log // // TODO: please clear this log
const morningEnd = this.form.useTime.ame const morningEnd = this.form.useTime.ame
console.log('value', value) // console.log('value', value)
console.log('morningEnd', morningEnd) // console.log('morningEnd', morningEnd)
console.log('this.form.useTime.ame', this.form.useTime.ame) // console.log('this.form.useTime.ame', this.form.useTime.ame)
console.log('this.form.useTime.pms', this.form.useTime.pms) // console.log('this.form.useTime.pms', this.form.useTime.pms)
console.log('his.form.useTime.pme', this.form.useTime.pme) // console.log('his.form.useTime.pme', this.form.useTime.pme)
// if (isEmpty(value) && isEmpty(this.form.useTime.ams) || isEmpty(this.form.useTime.ame)) // if (isEmpty(value) && isEmpty(this.form.useTime.ams) || isEmpty(this.form.useTime.ame))
if (isEmpty(value) && isEmpty(this.form.useTime.ame) && isEmpty(this.form.useTime.pms) && isEmpty(this.form.useTime.pme)) { if (isEmpty(value) && isEmpty(this.form.useTime.ame) && isEmpty(this.form.useTime.pms) && isEmpty(this.form.useTime.pme)) {
console.log('上午开始时间第一层报错') console.log('上午开始时间第一层报错')
...@@ -943,16 +956,16 @@ export default { ...@@ -943,16 +956,16 @@ export default {
}, },
// 选择地址 // 选择地址
handleChangeAddress(value) { handleChangeAddress(value) {
this.selectedOptions = value this.form.selectedOptions = value
console.log('地区码', this.selectedOptions) console.log('地区码', this.form.selectedOptions)
var name = '' var name = ''
this.selectedOptions.map(item => name += CodeToText[item] + '') // 将省市区三个拼接一起 this.form.selectedOptions.map(item => name += CodeToText[item] + '') // 将省市区三个拼接一起
this.addtions.names = name this.addtions.names = name
console.log(this.addtions.names) console.log(this.addtions.names)
// 运用了CodeToText把编码转成了中文 // 运用了CodeToText把编码转成了中文
this.addForm.province = CodeToText[this.selectedOptions[0]] this.addForm.province = CodeToText[ this.form.selectedOptions[0]]
this.addForm.county = CodeToText[this.selectedOptions[1]] this.addForm.county = CodeToText[ this.form.selectedOptions[1]]
this.addForm.area = CodeToText[this.selectedOptions[2]] this.addForm.area = CodeToText[ this.form.selectedOptions[2]]
if (this.addForm.county === '市辖区' || this.addForm.county === '县') { if (this.addForm.county === '市辖区' || this.addForm.county === '县') {
this.city = this.addForm.province this.city = this.addForm.province
} else { } else {
...@@ -964,9 +977,9 @@ export default { ...@@ -964,9 +977,9 @@ export default {
// 提交 // 提交
submitForm() { submitForm() {
const form = deepClone(this.form) const form = deepClone(this.form)
console.log('selectedOptions', this.selectedOptions) console.log('selectedOptions', form.selectedOptions)
if (this.selectedOptions != null) { if (form.selectedOptions != null) {
form.addressCode = this.selectedOptions.join(',') form.addressCode = form.selectedOptions.join(',')
} }
if (this.addtions.names != null) { if (this.addtions.names != null) {
form.addressText = this.addtions.names form.addressText = this.addtions.names
...@@ -1022,15 +1035,13 @@ export default { ...@@ -1022,15 +1035,13 @@ export default {
handleUpdate() { handleUpdate() {
getDevice(this.id).then(response => { getDevice(this.id).then(response => {
this.form = response.data this.form = response.data
if (this.selectedOptions != null && this.selectedOptions !== '') { // if (this.form.selectedOptions != null && this.form.selectedOptions !== '') {
this.selectedOptions = response.data.addressCode.split(',') this.form.selectedOptions = response.data.addressCode.split(',')
console.log(':fsdfsddddddddd???????', response.data.addressCode) //
console.log('详细个bbbbb', this.selectedOptions) // }
console.log('详细个ccccccccccc', this.form.selectedOptions) // if (this.form.serviceArea != null && this.form.serviceArea !== '') {
} this.form.serviceArea = response.data.serviceArea.split(',')
if (this.form.serviceArea != null && this.form.serviceArea !== '') { // }
this.form.serviceArea = response.data.serviceArea.split(',')
}
if (this.form.checkType != null && this.form.checkType !== '') { if (this.form.checkType != null && this.form.checkType !== '') {
this.form.checkType = response.data.checkType.split(',') this.form.checkType = response.data.checkType.split(',')
} }
...@@ -1039,7 +1050,9 @@ export default { ...@@ -1039,7 +1050,9 @@ export default {
this.form.useTime = JSON.parse(response.data.useTime) this.form.useTime = JSON.parse(response.data.useTime)
} }
// this.checkType = response.data.checkType.split(',') // this.checkType = response.data.checkType.split(',')
console.log(':fsdfsddddddddd???????', response.data.addressCode)
console.log('详细个bbbbb', this.selectedOptions)
console.log('详细个ccccccccccc', this.form.selectedOptions)
console.log('详情数据---', this.form) console.log('详情数据---', this.form)
// this.serviceAreaS = this.form.serviceArea.split(';') // this.serviceAreaS = this.form.serviceArea.split(';')
// this.serviceArea = [] // this.serviceArea = []
......
...@@ -19,7 +19,10 @@ ...@@ -19,7 +19,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="queryParams.checkItemsId" :disabled="queryParams.checkType === null || queryParams.checkType === ''" clearable placeholder="检查项目"> <el-select v-model="queryParams.checkItemsId"
:disabled="queryParams.checkType === null || queryParams.checkType === ''" clearable
placeholder="检查项目"
>
<el-option <el-option
v-for="item in checkItemOptions" v-for="item in checkItemOptions"
:key="item.id" :key="item.id"
...@@ -64,32 +67,44 @@ ...@@ -64,32 +67,44 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="selectAll()" @click="selectAll()"
>选择全部</el-button> >选择全部
</el-button>
<el-button <el-button
class="fourWordsBtn" class="fourWordsBtn"
icon="el-icon-edit" icon="el-icon-edit"
size="mini" size="mini"
@click="reverseSelect()" @click="reverseSelect()"
>反向选择</el-button> >反向选择
</el-button>
<el-button <el-button
class="fourWordsBtn" class="fourWordsBtn"
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
@click="handleExport()" @click="handleExport()"
>批量导出</el-button> >批量导出
</el-button>
<el-button <el-button
class="fourWordsBtn" class="fourWordsBtn"
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="checkItem()" @click="checkItem()"
>检查项目</el-button> >检查项目
<el-button style="position: relative; float: right;" class="resetBtn" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> </el-button>
<el-button style="position: relative; float: right;" class="queryBtn" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <el-button style="position: relative; float: right;" class="resetBtn" icon="el-icon-refresh" size="mini"
@click="resetQuery"
>重置
</el-button>
<el-button style="position: relative; float: right;" class="queryBtn" icon="el-icon-search" size="mini"
@click="handleQuery"
>查询
</el-button>
</el-row> </el-row>
<el-table ref="table" v-loading="loading" :data="manageList" :row-key="getRowKeys" @selection-change="handleSelectionChange"> <el-table ref="table" v-loading="loading" :data="manageList" :row-key="getRowKeys"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
<el-table-column label="序号" type="index" align="center" /> <el-table-column label="序号" type="index" align="center"/>
<el-table-column label="检查类型" align="center" prop="checkType" width="100"> <el-table-column label="检查类型" align="center" prop="checkType" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
...@@ -98,8 +113,8 @@ ...@@ -98,8 +113,8 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查项目" align="center" :show-overflow-tooltip="true" prop="checkItemsName" /> <el-table-column label="检查项目" align="center" :show-overflow-tooltip="true" prop="checkItemsName"/>
<el-table-column label="宠物昵称" align="center" :show-overflow-tooltip="true" prop="petNickname" /> <el-table-column label="宠物昵称" align="center" :show-overflow-tooltip="true" prop="petNickname"/>
<el-table-column label="宠物保险" align="center" :show-overflow-tooltip="true" prop="insure"> <el-table-column label="宠物保险" align="center" :show-overflow-tooltip="true" prop="insure">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
...@@ -108,10 +123,10 @@ ...@@ -108,10 +123,10 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="宠主姓名" align="center" :show-overflow-tooltip="true" prop="nickname" /> <el-table-column label="宠主姓名" align="center" :show-overflow-tooltip="true" prop="nickname"/>
<el-table-column label="联系方式" align="center" :show-overflow-tooltip="true" prop="phonenumber" width="90" /> <el-table-column label="联系方式" align="center" :show-overflow-tooltip="true" prop="phonenumber" width="90"/>
<el-table-column label="预约兽医" align="center" :show-overflow-tooltip="true" prop="doctorName" /> <el-table-column label="预约兽医" align="center" :show-overflow-tooltip="true" prop="doctorName"/>
<el-table-column label="所属科室" align="center" :show-overflow-tooltip="true" prop="doctorDeptName" /> <el-table-column label="所属科室" align="center" :show-overflow-tooltip="true" prop="doctorDeptName"/>
<el-table-column label="缴费状态" align="center" :show-overflow-tooltip="true" prop="payType"> <el-table-column label="缴费状态" align="center" :show-overflow-tooltip="true" prop="payType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
...@@ -139,7 +154,9 @@ ...@@ -139,7 +154,9 @@
</el-table-column> </el-table-column>
<el-table-column label="检查时段" align="center" :show-overflow-tooltip="true" prop="checkStartTime" width="80"> <el-table-column label="检查时段" align="center" :show-overflow-tooltip="true" prop="checkStartTime" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.checkStartTime, '{h}:{i}') + '-' + parseTime(scope.row.checkEndTime, '{h}:{i}') }}</span> <span>{{
parseTime(scope.row.checkStartTime, '{h}:{i}') + '-' + parseTime(scope.row.checkEndTime, '{h}:{i}')
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
...@@ -149,14 +166,16 @@ ...@@ -149,14 +166,16 @@
size="mini" size="mini"
icon="el-icon-document" icon="el-icon-document"
@click="handleDetails(scope.row)" @click="handleDetails(scope.row)"
>详情</el-button> >详情
</el-button>
<el-button <el-button
class="bookNow" class="bookNow"
size="mini" size="mini"
icon="el-icon-check" icon="el-icon-check"
:disabled="scope.row.deviceId !== null"
@click="handleSubscribe(scope.row)" @click="handleSubscribe(scope.row)"
>立即预约</el-button> :disabled="scope.row.deviceId !== null"
>立即预约
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -170,12 +189,16 @@ ...@@ -170,12 +189,16 @@
/> />
<!-- 添加或修改业务管理-检查管理对话框 --> <!-- 添加或修改业务管理-检查管理对话框 -->
<el-dialog title="立即预约" :visible.sync="open" width="800px" append-to-body :close-on-press-escape="false" :close-on-click-modal="false"> <el-dialog title="立即预约" :visible.sync="open" width="800px" append-to-body :close-on-press-escape="false"
:close-on-click-modal="false"
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="设备"> <el-form-item label="设备">
<el-select v-model="form.equipmentIdList" multiple collapse-tags clearable placeholder="请选择设备" @change="changeDeviceName"> <el-select v-model="form.equipmentIdList" multiple collapse-tags clearable placeholder="请选择设备"
@change="changeDeviceName"
>
<el-option <el-option
v-for="item in selectableDevice" v-for="item in selectableDevice"
:key="item.id" :key="item.id"
...@@ -190,10 +213,10 @@ ...@@ -190,10 +213,10 @@
<el-date-picker <el-date-picker
v-model="form.checkDate" v-model="form.checkDate"
type="date" type="date"
@change="changeDate"
placeholder="请选择检查日期" placeholder="请选择检查日期"
format="yyyy-MM-dd" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
@change="changeDate"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -208,18 +231,19 @@ ...@@ -208,18 +231,19 @@
:data="deviceList" :data="deviceList"
style="width: 100%" style="width: 100%"
> >
<el-table-column prop="deviceName" align="left" label="设备名称" /> <el-table-column prop="deviceName" align="left" label="设备名称"/>
<el-table-column prop="checkDate" align="left" label="检查日期" /> <el-table-column prop="checkDate" align="left" label="检查日期"/>
<el-table-column prop="checkTime" align="left" label="检查时段" /> <el-table-column prop="checkTime" align="left" label="检查时段"/>
<el-table-column prop="num" align="left" label="剩余可预约" /> <el-table-column prop="num" align="left" label="剩余可预约"/>
<el-table-column prop="date" align="left" label="设备服务费" /> <el-table-column prop="date" align="left" label="设备服务费"/>
<el-table-column align="left" label="操作"> <el-table-column align="left" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
class="fourWordsBtn" class="fourWordsBtn"
size="mini" size="mini"
@click="handleSubscribeDevice(scope.row)" @click="handleSubscribeDevice(scope.row)"
>立即预约</el-button> >立即预约
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -230,10 +254,10 @@ ...@@ -230,10 +254,10 @@
:limit.sync="deviceQueryParams.pageSize" :limit.sync="deviceQueryParams.pageSize"
@pagination="getDevice" @pagination="getDevice"
/> />
<!-- <div slot="footer" class="dialog-footer">--> <!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="submitForm"> </el-button>--> <!-- <el-button type="primary" @click="submitForm"> </el-button>-->
<!-- <el-button @click="cancel"> </el-button>--> <!-- <el-button @click="cancel"> </el-button>-->
<!-- </div>--> <!-- </div>-->
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -325,8 +349,7 @@ export default { ...@@ -325,8 +349,7 @@ export default {
checkDate: null // 检查日期 checkDate: null // 检查日期
}, },
// 表单校验 // 表单校验
rules: { rules: {},
},
// 设备集合 // 设备集合
deviceList: [], deviceList: [],
// 检查类型列表 // 检查类型列表
...@@ -373,10 +396,10 @@ export default { ...@@ -373,10 +396,10 @@ export default {
return row.id return row.id
}, },
/** /**
* 全部选择 * 全部选择
* @param selection 已选择内容 * @param selection 已选择内容
* @param all 是否永远进行全选操作 * @param all 是否永远进行全选操作
*/ */
async selectAll(selection = [], all = true) { async selectAll(selection = [], all = true) {
if (this.manageList.length !== selection.length && !all) { if (this.manageList.length !== selection.length && !all) {
this.effectTableSelect([]) this.effectTableSelect([])
...@@ -614,7 +637,8 @@ export default { ...@@ -614,7 +637,8 @@ export default {
}).then(() => { }).then(() => {
this.getList() this.getList()
this.$modal.msgSuccess('删除成功') this.$modal.msgSuccess('删除成功')
}).catch(() => {}) }).catch(() => {
})
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
...@@ -624,13 +648,29 @@ export default { ...@@ -624,13 +648,29 @@ export default {
if (this.ids.length !== 0) { if (this.ids.length !== 0) {
const exportTable = {} const exportTable = {}
exportTable.treatIds = this.ids exportTable.treatIds = this.ids
this.download('business/check/export', exportTable, `manage_${new Date().getTime()}.xlsx`).then(res => { this.download('business/check/export', exportTable, `检查管理-${this.exportFormatTime(new Date())}.xlsx`).then(res => {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
}) })
} else { } else {
this.$modal.msgError('请选择至少一条数据导出') this.$modal.msgError('请选择至少一条数据导出')
return return
} }
},
// 导出格式化
exportFormatTime(date) {
// 获取年月日
var year = date.getFullYear()
var month = date.getMonth() + 1 // 月份从0开始,需要加1
var day = date.getDate()
// 将年月日格式化为字符串
if (month < 10) {
month = '0' + month
}
if (day < 10) {
day = '0' + day
}
const formattedDate = year.toString() + month.toString() + day.toString()
return formattedDate
} }
} }
} }
...@@ -643,8 +683,9 @@ export default { ...@@ -643,8 +683,9 @@ export default {
border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(95, 181, 75); border: 1px solid rgb(95, 181, 75);
color: #5FB54B; color: #5FB54B;
background: rgba(91,182,71,0.08); background: rgba(91, 182, 71, 0.08);
font-family: Microsoft YaHei-Regular, Microsoft YaHei; font-family: Microsoft YaHei-Regular, Microsoft YaHei;
&:hover { &:hover {
background: rgba(95, 181, 75, 0.08); background: rgba(95, 181, 75, 0.08);
opacity: 1; opacity: 1;
...@@ -652,14 +693,16 @@ export default { ...@@ -652,14 +693,16 @@ export default {
color: #5FB54B !important; color: #5FB54B !important;
} }
} }
/** 立即预约 */ /** 立即预约 */
.bookNow { .bookNow {
width: 80px; width: 80px;
border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px;
border: 1px solid rgb(255, 157, 78); border: 1px solid rgb(255, 157, 78);
color: #FF9D4E; color: #FF9D4E;
background: rgba(255,157,78,0.08); background: rgba(255, 157, 78, 0.08);
font-family: Microsoft YaHei-Regular, Microsoft YaHei; font-family: Microsoft YaHei-Regular, Microsoft YaHei;
&:hover { &:hover {
background: rgba(95, 181, 75, 0.08); background: rgba(95, 181, 75, 0.08);
opacity: 1; opacity: 1;
...@@ -667,6 +710,7 @@ export default { ...@@ -667,6 +710,7 @@ export default {
color: #FF9D4E !important; color: #FF9D4E !important;
} }
} }
.app-container { .app-container {
background-color: #FFFFFF; background-color: #FFFFFF;
} }
......
...@@ -53,12 +53,18 @@ ...@@ -53,12 +53,18 @@
<el-table-column align="center" label="会员等级" min-width="80" prop="membershipLevel" 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="balance" show-overflow-tooltip />
<el-table-column align="center" label="宠物昵称" min-width="80" prop="petNickname" show-overflow-tooltip /> <el-table-column align="center" label="宠物昵称" min-width="80" prop="petNickname" show-overflow-tooltip />
<!-- <el-table-column-->
<!-- align="center"-->
<!-- label="宠物品种"-->
<!-- min-width="80"-->
<!-- prop="petBreed"-->
<!-- show-overflow-tooltip-->
<!-- />-->
<el-table-column <el-table-column
:formatter="(row, col, cell) => 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" align="center"
label="宠物品种" label="宠物品种"
min-width="80"
prop="petBreed" prop="petBreed"
show-overflow-tooltip
/> />
<el-table-column align="center" label="宠物性别" min-width="60" prop="petSex" show-overflow-tooltip> <el-table-column align="center" label="宠物性别" min-width="60" prop="petSex" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -86,6 +92,8 @@ ...@@ -86,6 +92,8 @@
import { getPetInfo } from '@/api/business/registration' import { getPetInfo } from '@/api/business/registration'
import { deepClone } from '@/utils' import { deepClone } from '@/utils'
export default { export default {
// 数据字典
dicts: ['pet_breed', 'cat_breed', 'dog_breed', 'other_breed'],
name: 'ChoosePet', name: 'ChoosePet',
props: { props: {
isShow: { isShow: {
...@@ -137,6 +145,20 @@ export default { ...@@ -137,6 +145,20 @@ export default {
// this.getList() // this.getList()
}, },
methods: { methods: {
/**
* 字典获取完成的回调
*/
onDictReady() {
this.setPetBreed()
},
/**
* 设置宠物品种信息
*/
setPetBreed() {
this.options[0].children = this.dict.type.cat_breed
this.options[1].children = this.dict.type.dog_breed
this.options[2].children = this.dict.type.other_breed
},
/** 列表区--多选框选中数据 */ /** 列表区--多选框选中数据 */
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log('selection', selection) console.log('selection', selection)
......
...@@ -348,6 +348,16 @@ export default { ...@@ -348,6 +348,16 @@ export default {
} }
}, },
watch: {
registerForm(val) {
if (val.checkManageBos.length > 0) {
this.prescribingForm.inspect = [...val.checkManageBos]
}
if (val.treatManageBo.length > 0) {
this.prescribingForm.treatment = [...val.treatManageBo]
}
}
},
data() { data() {
const validNum = (rule, value, callback) => { const validNum = (rule, value, callback) => {
console.log('这是自定义校验', value) console.log('这是自定义校验', value)
...@@ -452,7 +462,8 @@ export default { ...@@ -452,7 +462,8 @@ export default {
return { return {
label: item.name, label: item.name,
value: item.id, value: item.id,
type: item.type type: item.type,
price: item.price
} }
}) })
console.log('treatItemOptions!!!!!!!!!!!!!', this.treatItemOptions) console.log('treatItemOptions!!!!!!!!!!!!!', this.treatItemOptions)
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" min-width="160"> <el-table-column align="center" class-name="small-padding fixed-width" label="操作" min-width="160">
<template #default="{row}"> <template #default="{row}">
<el-button <el-button
:disabled="!inTimeRange(row.hours.split('~')[0], row.hours.split('~')[1])" :disabled="registrationType !== '0' ? !inTimeRange(row.hours.split('~')[0], row.hours.split('~')[1]) : afterTime(row.hours.split('~')[0], row.hours.split('~')[1])"
icon="el-icon-document" icon="el-icon-document"
plain plain
size="mini" size="mini"
...@@ -180,6 +180,7 @@ export default { ...@@ -180,6 +180,7 @@ export default {
* @param end 结束时间 时:分 * @param end 结束时间 时:分
*/ */
inTimeRange(start, end) { inTimeRange(start, end) {
console.log(start, end)
const current = moment() const current = moment()
const startTime = moment({ hour: start.split(':')[0], minute: start.split(':')[1] }) const startTime = moment({ hour: start.split(':')[0], minute: start.split(':')[1] })
const endTime = moment({ hour: end.split(':')[0], minute: end.split(':')[1] }) const endTime = moment({ hour: end.split(':')[0], minute: end.split(':')[1] })
...@@ -191,6 +192,17 @@ export default { ...@@ -191,6 +192,17 @@ export default {
console.log(`endTime.format('YYYY/MM/DD HH:mm:ss')`, endTime.format('YYYY/MM/DD HH:mm:ss')) console.log(`endTime.format('YYYY/MM/DD HH:mm:ss')`, endTime.format('YYYY/MM/DD HH:mm:ss'))
return current.isBetween(startTime, endTime, 'minute') return current.isBetween(startTime, endTime, 'minute')
}, },
/**
* 判断当前时间是否在传入的时间范围后
* @param start 开始时间 时:分
* @param end 结束时间 时:分
*/
afterTime(start, end) {
console.log(start, end)
const current = moment()
const endTime = moment({ hour: end.split(':')[0], minute: end.split(':')[1] })
return current.isAfter(endTime)
},
parseTime, parseTime,
/** /**
* 获取医生当日排班列表 * 获取医生当日排班列表
...@@ -240,7 +252,7 @@ export default { ...@@ -240,7 +252,7 @@ export default {
petOwnersName: this.doctorForm.nickName, petOwnersName: this.doctorForm.nickName,
petOwnersPhone: this.doctorForm.phoneNumber, petOwnersPhone: this.doctorForm.phoneNumber,
petNickname: this.doctorForm.petNickname, petNickname: this.doctorForm.petNickname,
petBreed: this.doctorForm.petBreed, petBreed: this.doctorForm.petBreed.join(),
petSex: this.doctorForm.petSex, petSex: this.doctorForm.petSex,
petBirthday: this.doctorForm.petBirthday.replaceAll('-', '/'), petBirthday: this.doctorForm.petBirthday.replaceAll('-', '/'),
petWeight: this.doctorForm.petWeight, petWeight: this.doctorForm.petWeight,
......
...@@ -36,20 +36,17 @@ ...@@ -36,20 +36,17 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="宠物品种:" prop="petBreed"> <el-form-item label="宠物品种:" prop="petBreed">
<el-select <el-form-item prop="petBreed">
v-model="form.petBreed" <el-cascader
:disabled="!isEdit" v-model.trim="form.petBreed"
clearable placeholder="请选择宠物品种"
placeholder="请选择宠物品种" :options="options"
style="width: 100%" :disabled="!isEdit"
> :props="props"
<el-option clearable
v-for="(item, index) in dict.type.pet_breed" collapse-tags
:key="index"
:label="item.label"
:value="item.value"
/> />
</el-select> </el-form-item>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -89,6 +86,7 @@ ...@@ -89,6 +86,7 @@
<div> <div>
<el-input <el-input
v-model="form.petWeight" v-model="form.petWeight"
maxlength="10"
:disabled="!isEdit" :disabled="!isEdit"
/> />
</div> </div>
...@@ -98,7 +96,7 @@ ...@@ -98,7 +96,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="宠物毛色:" prop="petColor"> <el-form-item label="宠物毛色:" prop="petColor">
<el-input v-model="form.petColor" :disabled="!isEdit" maxlength="20" placeholder="请输入宠物毛色" /> <el-input v-model="form.petColor" :disabled="!isEdit" maxlength="10" placeholder="请输入宠物毛色" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -250,7 +248,7 @@ import { checkPetOwner } from '@/api/business/registration' ...@@ -250,7 +248,7 @@ import { checkPetOwner } from '@/api/business/registration'
export default { export default {
name: 'RegistrationAdd', name: 'RegistrationAdd',
// 数据字典 // 数据字典
dicts: ['pet_breed', 'pet_sex', 'sterilization_status', 'pet_insure', 'vaccine_situation'], dicts: ['pet_breed', 'pet_sex', 'sterilization_status', 'pet_insure', 'vaccine_situation', 'cat_breed', 'dog_breed', 'other_breed'],
components: { components: {
choosePet, choosePet,
doctorDetail, doctorDetail,
...@@ -295,7 +293,7 @@ export default { ...@@ -295,7 +293,7 @@ export default {
// 宠物状态位 // 宠物状态位
petStatus: '', petStatus: '',
petNickname: '', petNickname: '',
petBreed: '', petBreed: [],
petSex: '', petSex: '',
petBirthday: '', petBirthday: '',
petWeight: '', petWeight: '',
...@@ -357,7 +355,22 @@ export default { ...@@ -357,7 +355,22 @@ export default {
{ min: 2, max: 20, message: '诊位名称必须介于 2 和 20 之间', trigger: 'change' }, { min: 2, max: 20, message: '诊位名称必须介于 2 和 20 之间', trigger: 'change' },
{ pattern: /([\u4e00-\u9fa5]|[a-z]+|[0-9]+)/g, message: '诊位名称为中英文数字', trigger: 'change' }], { pattern: /([\u4e00-\u9fa5]|[a-z]+|[0-9]+)/g, message: '诊位名称为中英文数字', trigger: 'change' }],
status: [{ required: true, message: '状态不能为空', trigger: 'change' }] status: [{ required: true, message: '状态不能为空', trigger: 'change' }]
} },
// 宠物品种下拉框--一级选项(二级进行字典维护)
props: { expandTrigger: 'hover' },
options: [{
value: '0',
label: '猫',
children: []
}, {
value: '1',
label: '狗',
children: []
}, {
value: '2',
label: '其它',
children: []
}]
} }
}, },
watch: { watch: {
...@@ -367,7 +380,7 @@ export default { ...@@ -367,7 +380,7 @@ export default {
const temp = { const temp = {
petsId: '-', petsId: '-',
petNickname: '', petNickname: '',
petBreed: '', petBreed: [],
petSex: '', petSex: '',
petBirthday: '', petBirthday: '',
petWeight: '', petWeight: '',
...@@ -506,6 +519,7 @@ export default { ...@@ -506,6 +519,7 @@ export default {
}, },
// 获取所有医生列表 // 获取所有医生列表
getpesonlist() { getpesonlist() {
// queryPeopleList1().then(res => { // queryPeopleList1().then(res => {
// console.log('医生列表', res) // console.log('医生列表', res)
// this.pesonlist = res.data // this.pesonlist = res.data
...@@ -521,6 +535,20 @@ export default { ...@@ -521,6 +535,20 @@ export default {
this.form.personName = this.pesonlist.find(item => item.userId === value).nickName this.form.personName = this.pesonlist.find(item => item.userId === value).nickName
this.form.phone = this.pesonlist.find(item => item.userId === value).phonenumber this.form.phone = this.pesonlist.find(item => item.userId === value).phonenumber
} }
},
/**
* 字典获取完成的回调
*/
onDictReady() {
this.setPetBreed()
},
/**
* 设置宠物品种信息
*/
setPetBreed() {
this.options[0].children = this.dict.type.cat_breed
this.options[1].children = this.dict.type.dog_breed
this.options[2].children = this.dict.type.other_breed
} }
} }
} }
......
...@@ -61,8 +61,15 @@ color: #333333;" ...@@ -61,8 +61,15 @@ color: #333333;"
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<!--宠物品种--> <!--宠物品种-->
<el-form-item label="宠物品种"> <el-form-item label="宠物品种" prop="petBreed">
<el-input v-model="detailInfo.petBreed" disabled /> <el-cascader
v-model.trim="detailInfo.petBreed"
placeholder="请选择宠物品种"
:options="options"
disabled
:props="props"
collapse-tags
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -580,6 +587,8 @@ export default { ...@@ -580,6 +587,8 @@ export default {
value: '5' value: '5'
} }
], ],
// 宠物品种下拉框--一级选项(二级进行字典维护)
props: { expandTrigger: 'hover' },
// 品种数据字典 // 品种数据字典
options: [{ options: [{
value: '0', value: '0',
......
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