|
|
|
@ -9,51 +9,62 @@ |
|
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true"> |
|
|
|
<div class="flex-between" slot="formDom"> |
|
|
|
<div class="short-width"> |
|
|
|
<GuipSelect width="100%" v-model="form.province" multiple :options="options_payword" |
|
|
|
placeholder="选择省份"> |
|
|
|
<GuipSelect width="100%" v-model="form.province" :options="options_province" :disabled="(depart_id && doctor_id)?true:false" |
|
|
|
placeholder="选择省份" @change="provinceChange"> |
|
|
|
</GuipSelect> |
|
|
|
</div> |
|
|
|
<div class="short-width"> |
|
|
|
<GuipSelect width="100%" v-model="form.city" multiple :options="options_payword" |
|
|
|
<GuipSelect width="100%" v-model="form.city" :options="options_city" :disabled="(depart_id && doctor_id)?true:false" |
|
|
|
placeholder="选择城市"> |
|
|
|
</GuipSelect> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</GuipFormItem> |
|
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true"> |
|
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.company_name" |
|
|
|
prop="company_name" placeholder="请输入"> |
|
|
|
<img src="@/assets/input_search_ic.svg" slot="suffix" @click="handleClear" /> |
|
|
|
</GuipInput> |
|
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true" style="margin-bottom: 0px;"> |
|
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_realname" :disabled="true" v-if="depart_id && doctor_id" prop="h_realname"></GuipInput> |
|
|
|
</GuipFormItem> |
|
|
|
|
|
|
|
<div class="mb24" style="margin-top:-24px;" v-if="!depart_id && doctor_id"> |
|
|
|
<el-autocomplete |
|
|
|
v-model="hospitalSearchState" |
|
|
|
style="width: 100%" |
|
|
|
:fetch-suggestions="queryHospital" |
|
|
|
placeholder="请输入医院名称或地址" |
|
|
|
ref="hospitalAutocomplete" |
|
|
|
:popper-class="((hospitalSearchFlag || hospitalRestaurants.length > 0) ? '' : ' el-autocomplete-noloading')" |
|
|
|
@select="hospitalHandleSelect"> |
|
|
|
<template #append> |
|
|
|
<el-button icon="el-icon-search" @click="handleSearch" style="padding: 12px;"></el-button> |
|
|
|
</template> |
|
|
|
</el-autocomplete> |
|
|
|
</div> |
|
|
|
|
|
|
|
<GuipFormItem column="column" class="mb24" label="医院简称"> |
|
|
|
<span slot="formRight" class="desc">方便患者记忆,非必填</span> |
|
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_name" |
|
|
|
prop="h_name" placeholder="请输入" /> |
|
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_shortname" prop="h_shortname" placeholder="请输入" /> |
|
|
|
</GuipFormItem> |
|
|
|
<GuipFormItem column="column" class="mb24" label="所在科室" :required="true"> |
|
|
|
<GuipFormItem column="column" class="mb24" label="所在科室"> |
|
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.depart_name" |
|
|
|
prop="depart_name" placeholder="请输入" /> |
|
|
|
prop="depart_name" :placeholder="(depart_id && doctor_id)?'无':'请输入'" :disabled="(depart_id && doctor_id)?true:false"/> |
|
|
|
</GuipFormItem> |
|
|
|
</div> |
|
|
|
<div class="flex-line"></div> |
|
|
|
<div class="flex-right"> |
|
|
|
<GuipFormItem column="column" class="mb24"> |
|
|
|
<GuipFormItem column="column" class="mb24" v-if="departIsFixed != -1"> |
|
|
|
<div slot="formLeft" class="form-top-icon">医保定点</div> |
|
|
|
<div class="flex" slot="formDom" style="padding: 9px 0px;"> |
|
|
|
<GuipSwitch :modelValue="form.is_fixed" @change="onSwitchChange" activeText="非医保定点" |
|
|
|
inactiveText="非医保定点" active-value="1" inactive-value="0"> |
|
|
|
<GuipSwitch :model-value="departIsFixed" @change="onSwitchChange" activeText="医保定点" inactiveText="非医保定点" :active-value="true" :inactive-value="false"> |
|
|
|
</GuipSwitch> |
|
|
|
</div> |
|
|
|
</GuipFormItem> |
|
|
|
<GuipFormItem column="column" class="mb24" label="使用功能"> |
|
|
|
<!-- <el-checkbox-group slot="formDom" v-model="form.type" @change="validateSelection" class="checkboxGroup"> |
|
|
|
<el-checkbox-group slot="formDom" v-model="departType" @change="validateSelection" class="checkboxGroup"> |
|
|
|
<div class="flex"> |
|
|
|
<el-checkbox :label="2" >医生名片(基础功能不可取消)</el-checkbox> |
|
|
|
<el-checkbox :label="0">患者预约</el-checkbox> |
|
|
|
<el-checkbox :label="1">仅项目计数</el-checkbox> |
|
|
|
</div> |
|
|
|
<el-checkbox :label="1">项目计数</el-checkbox> |
|
|
|
</el-checkbox-group> --> |
|
|
|
<el-checkbox :label="2" >仅医生名片</el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</GuipFormItem> |
|
|
|
<GuipFormItem column="column" class="" label="就诊提醒"> |
|
|
|
<div slot="formRight" class="desc">就诊前的注意事项,非必填</div> |
|
|
|
@ -87,13 +98,13 @@ |
|
|
|
</GuipFormItem> |
|
|
|
</div> |
|
|
|
<div class="flex-line"></div> |
|
|
|
<div class="flex-right"> |
|
|
|
<div class="flex-right" v-if="form.worktimes"> |
|
|
|
<GuipFormItem column="column" label="每周出诊安排" :required="true"> |
|
|
|
|
|
|
|
<div class="flex weekPlan" slot="formDom"> |
|
|
|
<GuipSelect v-for="day in weekDays" :key="day.id" v-model="form.worktimes[day.id].plan" |
|
|
|
:options="options_weekPlan" @change="weekChange()" :label="day.name" placeholder="休息"> |
|
|
|
</GuipSelect> |
|
|
|
<GuipSelect v-for="day in weekDays" :key="day.id" v-model="form.worktimes[day.id].plan" :options="options_weekPlan" :label="day.name" placeholder="休息"></GuipSelect> |
|
|
|
</div> |
|
|
|
|
|
|
|
</GuipFormItem> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -121,7 +132,7 @@ |
|
|
|
<GuipFormItem column="column" class="mb24" label="开放预约" :required="true"> |
|
|
|
<span class="desc" slot="formRight">患者可提前多久约号</span> |
|
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.visit_day" |
|
|
|
prop="visit_day" placeholder="请输入" unit="小时"> |
|
|
|
prop="visit_day" placeholder="请输入" unit="天"> |
|
|
|
<span slot="prependshow">提前</span> |
|
|
|
</GuipInput> |
|
|
|
</GuipFormItem> |
|
|
|
@ -151,7 +162,7 @@ |
|
|
|
<el-checkbox @change="handleSelectAllChange" v-model="selectAll" |
|
|
|
:indeterminate="isIndeterminate">全选</el-checkbox> |
|
|
|
</div> |
|
|
|
<span class="totalCount">共{{ projectList.length }}条,已选{{ selectedCount }}条</span> |
|
|
|
<span class="totalCount">共{{ projectList.length }}条,已选8{{ selectedCount }}条</span> |
|
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px', margin: '0 26px' }" |
|
|
|
@click="batchOperate(0,'project')">批量禁用</GuipButton> |
|
|
|
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }" |
|
|
|
@ -176,8 +187,7 @@ |
|
|
|
</GuipInput> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<GuipTable :tableData="projectList" :key="tableKey" style="width: 100%" ref="multipleTable" |
|
|
|
@selection-change="handleSelectionChange" :loading="loading" max-height="600px"> |
|
|
|
<GuipTable :tableData="projectList" :key="tableKey" style="width: 100%" ref="multipleTable" @selection-change="handleSelectionChange" :loading="loading"> |
|
|
|
<el-table-column type="selection" label="选择" width="80"></el-table-column> |
|
|
|
<el-table-column prop="name" label="项目名称" min-width="185"></el-table-column> |
|
|
|
<el-table-column prop="price" label="项目价格" min-width="155"> |
|
|
|
@ -185,6 +195,11 @@ |
|
|
|
<GuipInput width="90%" v-model="scope.row.price" @change="changePrice(scope.row)" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="price" label="治疗时长(分钟)" min-width="155"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<GuipInput width="90%" v-model="scope.row.treat_time" @change="changeTreatTime(scope.row)" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="classify_id" label="分组" min-width="155"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<GuipSelect width="90%" v-model="scope.row.classify_id" |
|
|
|
@ -199,18 +214,18 @@ |
|
|
|
</GuipSwitch> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" fixed="right" min-width="100px"> |
|
|
|
<!-- <el-table-column label="操作" fixed="right" min-width="100px"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="flex"> |
|
|
|
<el-button type="text" @click="handleClick(scope.row)">编辑</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> --> |
|
|
|
</GuipTable> |
|
|
|
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange' |
|
|
|
<!-- <el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange' |
|
|
|
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper" |
|
|
|
:total="projectList.length"> |
|
|
|
</el-pagination> |
|
|
|
</el-pagination> --> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<div class="siteMessage flex-common mt12" id="siteMessage5"> |
|
|
|
@ -236,8 +251,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<GuipTable :tableData="courseList" style="width: 100%" ref="multipleTable1" max-height="600px" |
|
|
|
@selection-change="handleSelectionChange1" :loading="loading1" :key="tableKey1" > |
|
|
|
<GuipTable :tableData="courseList" style="width: 100%" ref="multipleTable1" @selection-change="handleSelectionChange1" :loading="loading1" :key="tableKey1" > |
|
|
|
<el-table-column type="selection" label="选择" width="80"></el-table-column> |
|
|
|
<el-table-column prop="name" label="套餐名称" min-width="225"></el-table-column> |
|
|
|
<el-table-column prop="price" label="套餐价格" min-width="125"></el-table-column> |
|
|
|
@ -261,16 +275,16 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</GuipTable> |
|
|
|
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange' |
|
|
|
<!-- <el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange' |
|
|
|
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper" |
|
|
|
:total="courseList.length"> |
|
|
|
</el-pagination> |
|
|
|
</el-pagination> --> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762" |
|
|
|
:show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" |
|
|
|
@close="handleClose" @dialogVisibleChange="dialogVisibleChange"> |
|
|
|
<BatchProject v-if="dialogType == '1'" :projectTagData="projectTagData" @getproTag="getProTagData" /> |
|
|
|
<BatchProject ref="channelProject" v-if="dialogType == '1'" :projectTagData="projectTagData" /> |
|
|
|
</GuipDialog> |
|
|
|
<GuipDialog :dialogVisible="dialogVisible1" :title="'新增项目分组'" :show-close-button="true" width="599px" |
|
|
|
type="center" :show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" |
|
|
|
@ -296,6 +310,8 @@ import GuipSelect from '@/components/GuipSelect.vue'; |
|
|
|
import GuipSwitch from '@/components/GuipSwitch.vue'; |
|
|
|
import GuipTable from '@/components/GuipTable.vue'; |
|
|
|
import GuipDialog from '@/components/GuipDialog.vue'; |
|
|
|
//import GuipSelectFilter from '@/components/GuipSelectFilter.vue'; |
|
|
|
|
|
|
|
import { mapState } from 'vuex'; |
|
|
|
import { Object } from 'core-js'; |
|
|
|
|
|
|
|
@ -315,13 +331,17 @@ export default { |
|
|
|
GuipSelect, |
|
|
|
GuipTextarea, |
|
|
|
GroupFormBtns, |
|
|
|
// GuipSelectFilter, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
doctorId: '', |
|
|
|
depart_id:false, |
|
|
|
doctor_id:false, |
|
|
|
dialogType: '1', |
|
|
|
tableKey:Date.now(), |
|
|
|
tableKey1:Date.now(), |
|
|
|
hospitalName:'', |
|
|
|
dialogVisible: false, |
|
|
|
dialogVisible1: false, |
|
|
|
form1: { |
|
|
|
@ -330,9 +350,9 @@ export default { |
|
|
|
nameRules: [{ required: true, message: '分组名称不得为空', trigger: 'blur' }], |
|
|
|
dialogTitle: '批量录入项目', |
|
|
|
currentPage: 1, |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 1000, |
|
|
|
currentPage1: 1, |
|
|
|
pageSize1: 10, |
|
|
|
pageSize1: 1000, |
|
|
|
loading: false, |
|
|
|
loading1: false, |
|
|
|
selectedRows: [],//已选中数据 |
|
|
|
@ -341,42 +361,17 @@ export default { |
|
|
|
isIndeterminate1: false, |
|
|
|
projectSearchId: 'all', |
|
|
|
projectSearchName: '', |
|
|
|
projectList: [ |
|
|
|
{ |
|
|
|
name: '针灸', |
|
|
|
price: '88', |
|
|
|
group: '针灸1', |
|
|
|
time: '2077 - 12 - 20', |
|
|
|
status: true, |
|
|
|
id: '1' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '拔罐', |
|
|
|
price: '188', |
|
|
|
group: '针灸2', |
|
|
|
time: '2077 - 12 - 20', |
|
|
|
status: true, |
|
|
|
id: '2' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '火刺', |
|
|
|
price: '55', |
|
|
|
group: '针灸1', |
|
|
|
time: '2077 - 12 - 20', |
|
|
|
status: true, |
|
|
|
id: '3' |
|
|
|
}, |
|
|
|
], |
|
|
|
projectTagData: [ |
|
|
|
{ |
|
|
|
name: '全部分类', |
|
|
|
id: '0' |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
hospitalRestaurants: [], |
|
|
|
hospitalSearchState: '', |
|
|
|
hospitalSearchFlag: false, |
|
|
|
hospitalSearchTimeout: false, |
|
|
|
departIsFixed:-1, |
|
|
|
projectList: [], |
|
|
|
projectTagData: [], |
|
|
|
courseList: [], |
|
|
|
selectAll: false, |
|
|
|
selectAll1: false, |
|
|
|
departType:[], |
|
|
|
numSettingForm: { |
|
|
|
times: '', |
|
|
|
hours: '', |
|
|
|
@ -397,22 +392,8 @@ export default { |
|
|
|
{ required: true, message: '请输入', trigger: 'blur' } |
|
|
|
], |
|
|
|
}, |
|
|
|
options_payword: [{ |
|
|
|
value: '选项1', |
|
|
|
label: '黄金糕' |
|
|
|
}, { |
|
|
|
value: '选项2', |
|
|
|
label: '双皮奶' |
|
|
|
}, { |
|
|
|
value: '选项3', |
|
|
|
label: '蚵仔煎' |
|
|
|
}, { |
|
|
|
value: '选项4', |
|
|
|
label: '龙须面' |
|
|
|
}, { |
|
|
|
value: '选项5', |
|
|
|
label: '北京烤鸭' |
|
|
|
}], |
|
|
|
options_province: [], |
|
|
|
options_city:[], |
|
|
|
weekPlan: { |
|
|
|
'周一': '', |
|
|
|
'周二': '', |
|
|
|
@ -466,27 +447,24 @@ export default { |
|
|
|
province: '', |
|
|
|
city: '', |
|
|
|
depart_name: '', |
|
|
|
address:"万柏林区 晋祠路一段56号凯旋门小区2幢4005", |
|
|
|
afternoon_worktime:"14:00-22:00", |
|
|
|
depart_id:"1", |
|
|
|
h_name:"武丽娜中医针灸", |
|
|
|
h_pos:"37.850249,112.53111", |
|
|
|
hid:"1", |
|
|
|
is_fixed:'1', |
|
|
|
morning_worktime:"8:00-11:00", |
|
|
|
notice:"周六上午门诊最后一轮扎针到10点50分,11点后到患者的,只开药,不扎针。\r\n初诊患者请先将挂号条交给医助、在门外静坐等待叫号\r\n为了节约大家排号时间,请全部挂号,按挂号顺序治疗\r\n针灸治疗单缴费完毕后请交还医助\r\n药费缴费完毕后交方给药房等待拿药(可办理快递)\r\n请准备一次性医用床单(可现场购买)和户外保温毯(推荐),户外保温毯购买链接:<a href=\"https://m.tb.cn/h.UJglv3C?tk=5KMnd9XFr3D\" target=\"_blank\">https://m.tb.cn/h.UJglv3C?tk=5KMnd9XFr3D</a>", |
|
|
|
time_unit:"15", |
|
|
|
time_unit_num:"10", |
|
|
|
treat_expire:"365", |
|
|
|
visit_day:"7" |
|
|
|
address:"", |
|
|
|
afternoon_worktime:"", |
|
|
|
depart_id:"0", |
|
|
|
h_name:"", |
|
|
|
h_pos:"", |
|
|
|
hid:"0", |
|
|
|
is_fixed:'0', |
|
|
|
morning_worktime:"", |
|
|
|
h_shortname:'', |
|
|
|
notice:"", |
|
|
|
time_unit:"0", |
|
|
|
time_unit_num:"0", |
|
|
|
treat_expire:"0", |
|
|
|
visit_day:"0", |
|
|
|
search_province:"", |
|
|
|
search_city:"", |
|
|
|
}, |
|
|
|
siteFormrules: { |
|
|
|
depart_name: [ |
|
|
|
{ required: true, message: '请输入科室信息', trigger: 'blur' } |
|
|
|
], |
|
|
|
h_name: [ |
|
|
|
{ required: true, message: '请输入出诊医院信息', trigger: 'blur' } |
|
|
|
], |
|
|
|
}, |
|
|
|
siteForm1: { |
|
|
|
domain_set: '', |
|
|
|
@ -496,28 +474,54 @@ export default { |
|
|
|
isApprove: '', |
|
|
|
phone: '' |
|
|
|
}, |
|
|
|
|
|
|
|
siteFormrules1: { |
|
|
|
domain_source: [ |
|
|
|
{ required: true, message: '请输入站点简称', trigger: 'blur' } |
|
|
|
] |
|
|
|
}, |
|
|
|
// hosipitalList:[] |
|
|
|
hosipitalList: [ |
|
|
|
{ label: '选项1', value: '1' }, |
|
|
|
{ label: '选项2', value: '2' }, |
|
|
|
{ label: '选项3', value: '3' }, |
|
|
|
// 更多选项... |
|
|
|
], |
|
|
|
} |
|
|
|
}, |
|
|
|
created(){ |
|
|
|
store.commit('SET_CUSTOMIZE', true); |
|
|
|
store.commit('SET_SLIDER_MENU','hosMenuData'); |
|
|
|
store.commit('SET_CUSTOMIZE', true); |
|
|
|
store.commit('SET_SLIDER_MENU','hosMenuData'); |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
async mounted() { |
|
|
|
const { depart_id, doctor_id } = this.$route.query; // 获取 doctorId 参数 |
|
|
|
if(doctor_id) this.doctor_id = doctor_id; |
|
|
|
if (doctor_id && depart_id) { |
|
|
|
// 请求医生信息 |
|
|
|
this.depart_id = depart_id; |
|
|
|
this.doctor_id = doctor_id; |
|
|
|
this.fetchDoctorData() |
|
|
|
await this.fetchDoctorData() |
|
|
|
console.log(this.doctor_id) |
|
|
|
await this.getAreaData() |
|
|
|
this.fetchPackData() |
|
|
|
this.fetchProjectData() |
|
|
|
this.geHosAdress() |
|
|
|
}else{ |
|
|
|
await this.getAreaData() |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
'$route.query': { |
|
|
|
immediate: true, |
|
|
|
deep: true, |
|
|
|
handler(newVal) { |
|
|
|
this.doctor_id = newVal.doctor_id; |
|
|
|
this.depart_id = newVal.depart_id; |
|
|
|
this.getAreaData(); |
|
|
|
this.fetchDoctorData(); |
|
|
|
this.fetchPackData(); |
|
|
|
this.fetchProjectData(); |
|
|
|
this.geHosAdress(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -527,21 +531,95 @@ export default { |
|
|
|
...mapState(['hosMenuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleSearch() { |
|
|
|
if(this.hospitalSearchFlag) return |
|
|
|
this.hospitalSearchFlag = true |
|
|
|
if(!this.hospitalSearchState.trim()) { |
|
|
|
this.$message.error('医院名称或地址不能为空'); |
|
|
|
this.hospitalSearchFlag = false |
|
|
|
return |
|
|
|
} |
|
|
|
this.getInternetHospital(this.hospitalSearchState) |
|
|
|
}, |
|
|
|
hospitalHandleSelect(item) { |
|
|
|
this.form.h_realname = item.value |
|
|
|
this.form.search_province = item.province |
|
|
|
this.form.search_city = item.city |
|
|
|
this.form.address = item.address |
|
|
|
this.form.h_pos = item.location.lat + ',' + item.location.lng |
|
|
|
console.log(item) |
|
|
|
}, |
|
|
|
getInternetHospital(queryString) { |
|
|
|
if(!this.hospitalSearchFlag) return; |
|
|
|
this.hospitalSearchTimeout = setTimeout(function(){ |
|
|
|
this.hospitalSearchFlag = false |
|
|
|
}.bind(this), 5000); |
|
|
|
|
|
|
|
this.$http('POST', '/api/admin/search_hoispital', { |
|
|
|
keyword: queryString, |
|
|
|
province: this.form.province, |
|
|
|
city: this.form.city, |
|
|
|
}).then(response => { |
|
|
|
this.hospitalSearchFlag = false |
|
|
|
clearTimeout(this.hospitalSearchTimeout) |
|
|
|
if(response.code !== 0) { |
|
|
|
this.hospitalRestaurants = [] |
|
|
|
this.$refs.hospitalAutocomplete.getData(this.hospitalSearchState) |
|
|
|
this.$message.error(response.msg); |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.hospitalRestaurants = Object.values(response.data) |
|
|
|
this.$refs.hospitalAutocomplete.activated = true |
|
|
|
this.$refs.hospitalAutocomplete.getData(this.hospitalSearchState) |
|
|
|
|
|
|
|
if(this.hospitalRestaurants.length <= 0) this.$message.error('未查询相关信息'); |
|
|
|
}).catch(error => { |
|
|
|
this.hospitalSearchFlag = false |
|
|
|
clearTimeout(this.hospitalSearchTimeout) |
|
|
|
this.hospitalRestaurants = [] |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
queryHospital(queryString, cb) { |
|
|
|
console.log(queryString) |
|
|
|
cb(this.hospitalRestaurants); |
|
|
|
}, |
|
|
|
random() { |
|
|
|
var randomNumber = Math.random(); |
|
|
|
return randomNumber |
|
|
|
}, |
|
|
|
fetchDoctorData() { |
|
|
|
provinceChange(e) { |
|
|
|
this.options_city = [] |
|
|
|
this.form.city = '' |
|
|
|
this.getAreaData(e) |
|
|
|
}, |
|
|
|
async getAreaData(province = '') { |
|
|
|
if (province != '') this.options_city = [] |
|
|
|
this.$http('POST', '/api/admin/get_areas_data', { |
|
|
|
province: province, |
|
|
|
}).then(response => { |
|
|
|
if (province == '') { |
|
|
|
this.options_province = response.data |
|
|
|
}else{ |
|
|
|
this.options_city = response.data |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
async fetchDoctorData() { |
|
|
|
this.$http('POST', '/api/admin/get_depart_info', { |
|
|
|
depart_id: this.depart_id, |
|
|
|
doctor_id: this.doctor_id |
|
|
|
}).then(response => { |
|
|
|
this.form = { ...this.form, ...response.data, |
|
|
|
type:response.type ? [Number(response.type)] : [2], |
|
|
|
'morning_worktime':response.data.morning_worktime.split('-'), |
|
|
|
'afternoon_worktime':response.data.afternoon_worktime.split('-') |
|
|
|
'morning_worktime':response.data.morning_worktime ? response.data.morning_worktime.split('-'):'', |
|
|
|
'afternoon_worktime':response.data.afternoon_worktime ? response.data.afternoon_worktime.split('-'):'' |
|
|
|
} |
|
|
|
|
|
|
|
this.departType = (response.data.type || response.data.type === 0 || response.data.type === "0") ? [Number(response.data.type)] : [] |
|
|
|
this.departIsFixed = response.data.is_fixed == "1" ? true : false |
|
|
|
this.getAreaData(this.form.province) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
@ -555,7 +633,7 @@ export default { |
|
|
|
if(response.code == 0){ |
|
|
|
this.loading1 = false |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.courseList = response.data.list; |
|
|
|
this.courseList = response.data.list ? response.data.list : []; |
|
|
|
this.tableKey1 = Date.now(); // 强制重新渲染表格 |
|
|
|
}) |
|
|
|
} |
|
|
|
@ -566,16 +644,26 @@ export default { |
|
|
|
}, |
|
|
|
// 项目列表 |
|
|
|
fetchProjectData() { |
|
|
|
this.$http('POST', '/api/admin/get_project_list', { |
|
|
|
var param = { |
|
|
|
depart_id: this.depart_id, |
|
|
|
doctor_id: this.doctor_id |
|
|
|
}).then(response => { |
|
|
|
doctor_id: this.doctor_id, |
|
|
|
name:this.projectSearchName, |
|
|
|
classify_id:this.projectSearchId |
|
|
|
} |
|
|
|
|
|
|
|
this.$http('POST', '/api/admin/get_project_list', param).then(response => { |
|
|
|
if(response.code == 0){ |
|
|
|
this.loading = false |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.projectTagData = response.data.classify;//项目分类 |
|
|
|
this.projectList = Object.values(response.data.list);//项目列表 |
|
|
|
this.tableKey = Date.now(); // 强制重新渲染表格 |
|
|
|
if(response.data.classify) { |
|
|
|
this.projectTagData = response.data.classify;//项目分类 |
|
|
|
if(response.data.list && response.data.list.length > 0) { |
|
|
|
this.projectList = Object.values(response.data.list);//项目列表 |
|
|
|
}else{ |
|
|
|
this.projectList = [] |
|
|
|
} |
|
|
|
this.tableKey = Date.now(); // 强制重新渲染表格 |
|
|
|
} |
|
|
|
// this.$set('projectList',Object.values(response.data.list)) |
|
|
|
// this.$set('projectTagData',response.data.classify) |
|
|
|
}) |
|
|
|
@ -595,13 +683,8 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
validateSelection(val) { |
|
|
|
// 防止取消选中医生名片 |
|
|
|
if (!val.includes(2)) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.form.type = [...val, 2]; |
|
|
|
this.$message.warning('基础功能不可取消'); |
|
|
|
}); |
|
|
|
} |
|
|
|
this.departType = [] |
|
|
|
if(val.length > 0) this.departType[0] = val[val.length-1] |
|
|
|
}, |
|
|
|
selectTag(item) { |
|
|
|
if(item == 'all'){ |
|
|
|
@ -610,43 +693,22 @@ export default { |
|
|
|
this.projectSearchId = item.id; |
|
|
|
} |
|
|
|
// 筛选逻辑 |
|
|
|
// this.getFilterProject() |
|
|
|
|
|
|
|
this.fetchProjectData() |
|
|
|
}, |
|
|
|
getFilterProject(){ |
|
|
|
// 接口需要更改 |
|
|
|
this.$http('POST', '/supernew/ajax_get_type_batch_list', { |
|
|
|
// 项目筛选 |
|
|
|
projectid:this.projectSearchId == 'all' ? '' : this.projectSearchId, |
|
|
|
// 项目名称搜索 |
|
|
|
projectSearchName:this.projectSearchName |
|
|
|
}).then(response => { |
|
|
|
this.projectTagData = response.data; |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
getProTagData() { |
|
|
|
this.$http('POST', '/supernew/ajax_get_type_batch_list', { |
|
|
|
|
|
|
|
}).then(response => { |
|
|
|
this.projectTagData = response.data |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
this.fetchProjectData() |
|
|
|
}, |
|
|
|
// 修改项目价格 |
|
|
|
changePrice(row) { |
|
|
|
if (row.sort) { |
|
|
|
this.editorProjectInfo({ price: row.price, project_id: row.id }) |
|
|
|
} |
|
|
|
this.editorProjectInfo({ price: row.price, project_id: row.id }) |
|
|
|
}, |
|
|
|
// 修改项目价格 |
|
|
|
changeTreatTime(row) { |
|
|
|
this.editorProjectInfo({ treat_time: row.treat_time, project_id: row.id }) |
|
|
|
}, |
|
|
|
// 修改分类 |
|
|
|
changeClassify(row) { |
|
|
|
if (row.sort) { |
|
|
|
this.editorProjectInfo({ classify_id: row.classify_id, project_id: row.id }) |
|
|
|
} |
|
|
|
this.editorProjectInfo({ classify_id: row.classify_id, project_id: row.id }) |
|
|
|
}, |
|
|
|
editorProjectInfo(props) { |
|
|
|
this.$http('POST', '/api/admin/edit_project', { |
|
|
|
@ -656,14 +718,14 @@ export default { |
|
|
|
}).then(response => { |
|
|
|
if (response.code == 0) { |
|
|
|
this.$Message.success('修改成功') |
|
|
|
this.getInitData() |
|
|
|
this.fetchProjectData() |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
addNewSetMenu() { |
|
|
|
this.$router.push(`/addNewTreatment?doctor_id=${this.doctor_id}&depart_id${this.depart_id}`) |
|
|
|
this.$router.push(`/addNewTreatment?doctor_id=${this.doctor_id}&depart_id=${this.depart_id}`) |
|
|
|
}, |
|
|
|
addNewGroup(){ |
|
|
|
this.dialogVisible1 = true |
|
|
|
@ -683,28 +745,64 @@ export default { |
|
|
|
this.currentPage = val |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 确认按钮事件 |
|
|
|
handleConfirm() { |
|
|
|
if (this.dialogVisible1) { |
|
|
|
this.$refs['projectNameForm'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
alert('submit!'); |
|
|
|
this.dialogVisible1 = false; |
|
|
|
|
|
|
|
this.$http('POST', '/api/admin/add_project_group', { |
|
|
|
name:this.form1.projectName.trim(), |
|
|
|
depart_id: this.depart_id, |
|
|
|
doctor_id: this.doctor_id, |
|
|
|
}).then(response => { |
|
|
|
if (response.code == 0) { |
|
|
|
this.$Message.success('修改成功') |
|
|
|
this.dialogVisible1 = false; |
|
|
|
this.form1.projectName = '' |
|
|
|
this.fetchProjectData() |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.$Message.error(error || '错误!') |
|
|
|
}) |
|
|
|
} else { |
|
|
|
console.log('error submit!!'); |
|
|
|
this.$Message.info('项目分组名称不可为空') |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
} else if (this.dialogVisible) { |
|
|
|
this.$Message.success('点击了确认按钮'); |
|
|
|
this.dialogVisible = false; |
|
|
|
} else if (this.dialogVisible) {//新增项目 |
|
|
|
let data = JSON.parse(JSON.stringify(this.$refs.channelProject.form)); |
|
|
|
let str = data.project_contents; |
|
|
|
data.project_contents = str.trim(); |
|
|
|
if((data.groupType == '1' && !data.classify_id) || (data.groupType == '2' && !data.classify_name)){ |
|
|
|
this.$Message.info('分组不能为空') |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if(!data.project_contents) { |
|
|
|
this.$Message.info('录入项目内容不能为空!') |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.$http('POST', '/api/admin/mitil_add_project', { |
|
|
|
depart_id: this.depart_id, |
|
|
|
doctor_id: this.doctor_id, |
|
|
|
...data |
|
|
|
}).then(response => { |
|
|
|
if (response.code == 0) { |
|
|
|
this.$Message.success('新增项目成功') |
|
|
|
this.$refs.channelProject.formReset() |
|
|
|
this.dialogVisible = false; |
|
|
|
this.fetchProjectData(); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.$Message.error(error || '错误!') |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 取消按钮事件 |
|
|
|
handleCancel() { |
|
|
|
this.$Message.warning('点击了取消按钮'); |
|
|
|
if(this.dialogVisible)this.$refs.channelProject.formReset() |
|
|
|
this.dialogVisible = false; |
|
|
|
this.dialogVisible1 = false; |
|
|
|
}, |
|
|
|
@ -712,12 +810,18 @@ export default { |
|
|
|
console.log(data, 'data098908090'); |
|
|
|
}, |
|
|
|
onSwitchChange1(row) { |
|
|
|
row.status = !row.status; |
|
|
|
row.status = row.status == 0 ? 1 : 0; |
|
|
|
this.$set(this.projectList, row) |
|
|
|
this.editorProjectInfo({ status: row.status, project_id: row.id }) |
|
|
|
}, |
|
|
|
onSwitchChange2(row) { |
|
|
|
row.status = !row.status; |
|
|
|
console.log(row.status) |
|
|
|
|
|
|
|
var tmpstatus = row.status == 1 ? 0 : 1 |
|
|
|
this.$set(this.courseList, row) |
|
|
|
this.selectedRows1 = [row] |
|
|
|
|
|
|
|
this.batchOperate(tmpstatus, 'group') |
|
|
|
}, |
|
|
|
handleClick1(row) { |
|
|
|
console.log(row); |
|
|
|
@ -829,7 +933,7 @@ export default { |
|
|
|
// console.log(url,props); |
|
|
|
this.changePackData(url,props,name) |
|
|
|
}, |
|
|
|
// |
|
|
|
// |
|
|
|
changePackData(url,params,name) { |
|
|
|
this.$http('POST',url , { |
|
|
|
...params |
|
|
|
@ -893,55 +997,104 @@ export default { |
|
|
|
this.selectedItem = { ...item }; |
|
|
|
console.log(this.selectedItem, 'this.selectedItem===='); |
|
|
|
}, |
|
|
|
// 销售渠道 |
|
|
|
domain_radioChange(type) { |
|
|
|
console.log(type, '--'); |
|
|
|
}, |
|
|
|
onSwitchChange(data) { |
|
|
|
this.form.is_fixed = data ? 1 : 0 |
|
|
|
this.departIsFixed = data |
|
|
|
console.log(data, '---'); |
|
|
|
}, |
|
|
|
updateHosInfo(props){ |
|
|
|
this.$http('POST', '/api/admin/set_hospital_depart', { |
|
|
|
updateHosInfo(props, url){ |
|
|
|
if(this.doctor_id) props.doctor_id = this.doctor_id; |
|
|
|
|
|
|
|
if(this.doctor_id && this.depart_id) { |
|
|
|
props.doctor_id = this.doctor_id; |
|
|
|
props.depart_id = this.depart_id; |
|
|
|
props.hid = this.form.hid; |
|
|
|
} |
|
|
|
|
|
|
|
this.$http('POST', url, { |
|
|
|
...props |
|
|
|
}).then(response => { |
|
|
|
if(response.code == 0){ |
|
|
|
this.$Message.success('更新成功') |
|
|
|
if(this.doctor_id && !this.depart_id) { |
|
|
|
var that = this |
|
|
|
setTimeout(()=>{ |
|
|
|
that.$router.push({ |
|
|
|
name: '医院信息', |
|
|
|
query: { doctor_id: this.doctor_id, depart_id: response.data.depart_id } |
|
|
|
}) |
|
|
|
},1000) |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$Message.error(response.msg) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
submitForm(form) { |
|
|
|
console.log(this.$refs[form], '-----'); |
|
|
|
this.$refs[form].validate((valid) => { |
|
|
|
console.log(this[form], '======formxinxi'); |
|
|
|
console.log(this[form], '======formxinxi8', '=============='+form); |
|
|
|
var rqurl = ''; |
|
|
|
if (valid) { |
|
|
|
alert('提交成功!'); |
|
|
|
let props = {} |
|
|
|
switch(form){ |
|
|
|
case 'siteForm1': |
|
|
|
var worktimesArray = Object.entries(this.form.worktimes).map(([key, value]) => ({ |
|
|
|
type: parseInt(key), |
|
|
|
plan: value.plan |
|
|
|
})); |
|
|
|
|
|
|
|
props={ |
|
|
|
morning_worktime:form.morning_worktime.join('-'), |
|
|
|
afternoon_worktime:form.afternoon_worktime.join('-') |
|
|
|
morning_worktime:this.form.morning_worktime.join('-'), |
|
|
|
afternoon_worktime:this.form.afternoon_worktime.join('-'), |
|
|
|
week_visit_plan:JSON.stringify(worktimesArray), |
|
|
|
} |
|
|
|
|
|
|
|
rqurl = "/api/admin/set_depart_worktime"; |
|
|
|
break; |
|
|
|
case 'siteForm': |
|
|
|
if(this.doctor_id && !this.depart_id) { |
|
|
|
if(!this.form.search_province.trim() || !this.form.search_city.trim() || !this.form.address.trim() || !this.form.h_pos.trim()) { |
|
|
|
this.$Message.info('请选择搜索结果下拉中的出诊医院') |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(this.departType.length <= 0) { |
|
|
|
this.$Message.info('请选择使用功能') |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
props={ |
|
|
|
is_fixed:this.form.is_fixed, |
|
|
|
type:form.type, |
|
|
|
notice:form.notice |
|
|
|
type:this.departType[0], |
|
|
|
notice:this.form.notice, |
|
|
|
h_shortname:this.form.h_shortname |
|
|
|
} |
|
|
|
|
|
|
|
if(this.doctor_id && !this.depart_id) { |
|
|
|
if(this.departType.length <= 0) { |
|
|
|
this.$Message.info('请选择使用功能') |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
props = this.form |
|
|
|
props.type = this.departType[0] |
|
|
|
} |
|
|
|
rqurl = "/api/admin/set_hospital_depart"; |
|
|
|
break; |
|
|
|
case 'numSettingForm': |
|
|
|
props={ |
|
|
|
time_unit:form.time_unit, |
|
|
|
time_unit_num:form.time_unit_num, |
|
|
|
visit_day:form.visit_day, |
|
|
|
treat_expire:form.treat_expire, |
|
|
|
time_unit:this.form.time_unit, |
|
|
|
time_unit_num:this.form.time_unit_num, |
|
|
|
visit_day:this.form.visit_day, |
|
|
|
treat_expire:this.form.treat_expire, |
|
|
|
} |
|
|
|
rqurl = "/api/admin/set_visit_num"; |
|
|
|
break; |
|
|
|
} |
|
|
|
this.updateHosInfo(props) |
|
|
|
this.updateHosInfo(props, rqurl) |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
@ -958,11 +1111,14 @@ export default { |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="scss"> |
|
|
|
.el-autocomplete-noloading{ |
|
|
|
display: none !important; |
|
|
|
} |
|
|
|
|
|
|
|
.weekPlan { |
|
|
|
display: grid; |
|
|
|
grid-gap: 12px 44px; |
|
|
|
grid-template-columns: repeat(2, 1fr); |
|
|
|
|
|
|
|
} |
|
|
|
#siteMessage4 ::v-deep .el-form-item { |
|
|
|
margin-bottom: 0 !important; |
|
|
|
@ -999,7 +1155,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
.tabProject { |
|
|
|
width: calc(100% - 380px); |
|
|
|
width: calc(100% - 380px); |
|
|
|
overflow-x: auto; |
|
|
|
|
|
|
|
.overTab{ |
|
|
|
|