|
|
@ -9,69 +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" :options="options_province" |
|
|
|
<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" :options="options_city" |
|
|
|
<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" style="margin-bottom: 0px;"> |
|
|
|
<!-- <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> --> |
|
|
|
<!-- <GuipSelectFilter :options="hosipitalList"></GuipSelectFilter> --> |
|
|
|
<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;"> |
|
|
|
<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> |
|
|
|
<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> |
|
|
@ -107,11 +100,11 @@ |
|
|
|
<div class="flex-line"></div> |
|
|
|
<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> |
|
|
@ -139,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> |
|
|
@ -194,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"> |
|
|
@ -225,10 +217,10 @@ |
|
|
|
</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="projectList.length"> |
|
|
|
</el-pagination> |
|
|
|
</el-pagination> --> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<div class="siteMessage flex-common mt12" id="siteMessage5"> |
|
|
@ -254,8 +246,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> |
|
|
@ -279,10 +270,10 @@ |
|
|
|
</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" |
|
|
@ -340,6 +331,8 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
doctorId: '', |
|
|
|
depart_id:false, |
|
|
|
doctor_id:false, |
|
|
|
dialogType: '1', |
|
|
|
tableKey:Date.now(), |
|
|
|
tableKey1:Date.now(), |
|
|
@ -352,9 +345,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: [],//已选中数据 |
|
|
@ -363,48 +356,17 @@ export default { |
|
|
|
isIndeterminate1: false, |
|
|
|
projectSearchId: 'all', |
|
|
|
projectSearchName: '', |
|
|
|
|
|
|
|
hospitalRestaurants: [], |
|
|
|
hospitalSearchState: '', |
|
|
|
hospitalSearchFlag: false, |
|
|
|
hospitalSearchTimeout: false, |
|
|
|
|
|
|
|
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' |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
departIsFixed:-1, |
|
|
|
projectList: [], |
|
|
|
projectTagData: [], |
|
|
|
courseList: [], |
|
|
|
selectAll: false, |
|
|
|
selectAll1: false, |
|
|
|
departType:[], |
|
|
|
numSettingForm: { |
|
|
|
times: '', |
|
|
|
hours: '', |
|
|
@ -482,25 +444,22 @@ export default { |
|
|
|
depart_name: '', |
|
|
|
address:"", |
|
|
|
afternoon_worktime:"", |
|
|
|
depart_id:"1", |
|
|
|
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" |
|
|
|
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: '', |
|
|
@ -510,15 +469,12 @@ export default { |
|
|
|
isApprove: '', |
|
|
|
phone: '' |
|
|
|
}, |
|
|
|
|
|
|
|
siteFormrules1: { |
|
|
|
domain_source: [ |
|
|
|
{ required: true, message: '请输入站点简称', trigger: 'blur' } |
|
|
|
] |
|
|
|
}, |
|
|
|
|
|
|
|
// hosipitalList:[] |
|
|
|
|
|
|
|
hosipitalList: [ |
|
|
|
{ label: '选项1', value: '1' }, |
|
|
|
{ label: '选项2', value: '2' }, |
|
|
@ -533,15 +489,34 @@ export default { |
|
|
|
}, |
|
|
|
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; |
|
|
|
await this.fetchDoctorData() |
|
|
|
console.log(this.doctor_id) |
|
|
|
await this.getAreaData() |
|
|
|
this.fetchDoctorData() |
|
|
|
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: { |
|
|
@ -554,21 +529,22 @@ export default { |
|
|
|
handleSearch() { |
|
|
|
if(this.hospitalSearchFlag) return |
|
|
|
this.hospitalSearchFlag = true |
|
|
|
this.$refs.hospitalAutocomplete.$refs.suggestions.loading = true |
|
|
|
this.queryHospital(this.hospitalSearchState, (results) => { |
|
|
|
console.log(results) |
|
|
|
|
|
|
|
this.$refs.hospitalAutocomplete.$refs.suggestions.loading = false |
|
|
|
this.$refs.hospitalAutocomplete.hideLoading = true |
|
|
|
this.$refs.hospitalAutocomplete.$refs.suggestions.suggestions = results |
|
|
|
console.log(this.hospitalSearchState) |
|
|
|
this.$refs.hospitalAutocomplete.getData(this.hospitalSearchState) |
|
|
|
}) |
|
|
|
if(!this.hospitalSearchState.trim()) { |
|
|
|
this.$message.error('医院名称或地址不能为空'); |
|
|
|
this.hospitalSearchFlag = false |
|
|
|
return |
|
|
|
} |
|
|
|
this.getInternetHospital(this.hospitalSearchState) |
|
|
|
}, |
|
|
|
hospitalHandleSelect(item) { |
|
|
|
console.log(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) |
|
|
|
}, |
|
|
|
queryHospital(queryString, cb) { |
|
|
|
getInternetHospital(queryString) { |
|
|
|
if(!this.hospitalSearchFlag) return; |
|
|
|
this.hospitalSearchTimeout = setTimeout(function(){ |
|
|
|
this.hospitalSearchFlag = false |
|
|
@ -582,22 +558,28 @@ export default { |
|
|
|
this.hospitalSearchFlag = false |
|
|
|
clearTimeout(this.hospitalSearchTimeout) |
|
|
|
if(response.code !== 0) { |
|
|
|
cb([]); |
|
|
|
this.hospitalRestaurants = [] |
|
|
|
this.$refs.hospitalAutocomplete.getData(this.hospitalSearchState) |
|
|
|
this.$message.error(response.msg); |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.hospitalRestaurants = Object.values(response.data) |
|
|
|
var restaurants = this.hospitalRestaurants; |
|
|
|
var results = queryString ? restaurants : []; |
|
|
|
cb(results); |
|
|
|
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) |
|
|
|
cb([]); |
|
|
|
this.hospitalRestaurants = [] |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
queryHospital(queryString, cb) { |
|
|
|
console.log(queryString) |
|
|
|
cb(this.hospitalRestaurants); |
|
|
|
}, |
|
|
|
random() { |
|
|
|
var randomNumber = Math.random(); |
|
|
|
return randomNumber |
|
|
@ -621,17 +603,17 @@ export default { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
fetchDoctorData() { |
|
|
|
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') |
|
|
@ -657,16 +639,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) |
|
|
|
}) |
|
|
@ -686,13 +678,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'){ |
|
|
@ -701,33 +688,18 @@ 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') |
|
|
|
}) |
|
|
|
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 }) |
|
|
|
}, |
|
|
|
// 修改分类 |
|
|
|
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', { |
|
|
@ -792,26 +764,31 @@ export default { |
|
|
|
} else if (this.dialogVisible) {//新增项目 |
|
|
|
let data = JSON.parse(JSON.stringify(this.$refs.channelProject.form)); |
|
|
|
let str = data.project_contents; |
|
|
|
data.project_contents = str.replace(/\n/g, ' ').trim(); |
|
|
|
if(!data.project_contents || (data.groupType == '1' && !data.classify_id) || (data.groupType == '2' && !data.classify_name)){ |
|
|
|
this.$Message.info('请填写完整信息!') |
|
|
|
data.project_contents = str.trim(); |
|
|
|
if((data.groupType == '1' && !data.classify_id) || (data.groupType == '2' && !data.classify_name)){ |
|
|
|
this.$Message.info('分组不能为空') |
|
|
|
return; |
|
|
|
} |
|
|
|
else{ |
|
|
|
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 || '错误!') |
|
|
|
}) |
|
|
|
|
|
|
|
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 || '错误!') |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 取消按钮事件 |
|
|
@ -824,12 +801,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); |
|
|
@ -1005,21 +988,37 @@ 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){ |
|
|
|
console.log(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') |
|
|
|
}) |
|
|
@ -1027,33 +1026,66 @@ export default { |
|
|
|
submitForm(form) { |
|
|
|
this.$refs[form].validate((valid) => { |
|
|
|
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; |
|
|
|
} |
|
|
@ -1070,11 +1102,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; |
|
|
|