|
@ -9,26 +9,24 @@ |
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true"> |
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true"> |
|
|
<div class="flex-between" slot="formDom"> |
|
|
<div class="flex-between" slot="formDom"> |
|
|
<div class="short-width"> |
|
|
<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"> |
|
|
placeholder="选择省份" @change="provinceChange"> |
|
|
</GuipSelect> |
|
|
</GuipSelect> |
|
|
</div> |
|
|
</div> |
|
|
<div class="short-width"> |
|
|
<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="选择城市"> |
|
|
placeholder="选择城市"> |
|
|
</GuipSelect> |
|
|
</GuipSelect> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true" style="margin-bottom: 0px;"> |
|
|
<GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true" style="margin-bottom: 0px;"> |
|
|
<!-- <GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.company_name" |
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_realname" :disabled="true" v-if="depart_id && doctor_id" |
|
|
prop="company_name" placeholder="请输入"> |
|
|
prop="h_realname"> |
|
|
<img src="@/assets/input_search_ic.svg" slot="suffix" @click="handleClear" /> |
|
|
</GuipInput> |
|
|
</GuipInput> --> |
|
|
|
|
|
<!-- <GuipSelectFilter :options="hosipitalList"></GuipSelectFilter> --> |
|
|
|
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
|
|
|
|
|
|
<div class="mb24" style="margin-top:-24px;"> |
|
|
<div class="mb24" style="margin-top:-24px;" v-if="!depart_id && !doctor_id"> |
|
|
<el-autocomplete |
|
|
<el-autocomplete |
|
|
v-model="hospitalSearchState" |
|
|
v-model="hospitalSearchState" |
|
|
:fetch-suggestions="queryHospital" |
|
|
:fetch-suggestions="queryHospital" |
|
@ -46,32 +44,30 @@ |
|
|
|
|
|
|
|
|
<GuipFormItem column="column" class="mb24" label="医院简称"> |
|
|
<GuipFormItem column="column" class="mb24" label="医院简称"> |
|
|
<span slot="formRight" class="desc">方便患者记忆,非必填</span> |
|
|
<span slot="formRight" class="desc">方便患者记忆,非必填</span> |
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_name" |
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.h_shortname" prop="h_shortname" placeholder="请输入" /> |
|
|
prop="h_name" placeholder="请输入" /> |
|
|
|
|
|
</GuipFormItem> |
|
|
</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" |
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.depart_name" |
|
|
prop="depart_name" placeholder="请输入" /> |
|
|
prop="depart_name" placeholder="请输入" /> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
</div> |
|
|
</div> |
|
|
<div class="flex-line"></div> |
|
|
<div class="flex-line"></div> |
|
|
<div class="flex-right"> |
|
|
<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 slot="formLeft" class="form-top-icon">医保定点</div> |
|
|
<div class="flex" slot="formDom" style="padding: 9px 0px;"> |
|
|
<div class="flex" slot="formDom" style="padding: 9px 0px;"> |
|
|
<GuipSwitch :modelValue="form.is_fixed" @change="onSwitchChange" activeText="非医保定点" |
|
|
<GuipSwitch :model-value="departIsFixed" @change="onSwitchChange" activeText="非医保定点" inactiveText="非医保定点" :active-value="true" :inactive-value="false"> |
|
|
inactiveText="非医保定点" active-value="1" inactive-value="0"> |
|
|
|
|
|
</GuipSwitch> |
|
|
</GuipSwitch> |
|
|
</div> |
|
|
</div> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
<GuipFormItem column="column" class="mb24" label="使用功能"> |
|
|
<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"> |
|
|
<div class="flex"> |
|
|
<el-checkbox :label="2" >医生名片(基础功能不可取消)</el-checkbox> |
|
|
|
|
|
<el-checkbox :label="0">患者预约</el-checkbox> |
|
|
<el-checkbox :label="0">患者预约</el-checkbox> |
|
|
|
|
|
<el-checkbox :label="1">仅项目计数</el-checkbox> |
|
|
</div> |
|
|
</div> |
|
|
<el-checkbox :label="1">项目计数</el-checkbox> |
|
|
<el-checkbox :label="2" >仅医生名片</el-checkbox> |
|
|
</el-checkbox-group> --> |
|
|
</el-checkbox-group> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
|
<GuipFormItem column="column" class="" label="就诊提醒"> |
|
|
<GuipFormItem column="column" class="" label="就诊提醒"> |
|
|
<div slot="formRight" class="desc">就诊前的注意事项,非必填</div> |
|
|
<div slot="formRight" class="desc">就诊前的注意事项,非必填</div> |
|
@ -109,7 +105,7 @@ |
|
|
<GuipFormItem column="column" label="每周出诊安排" :required="true"> |
|
|
<GuipFormItem column="column" label="每周出诊安排" :required="true"> |
|
|
<div class="flex weekPlan" slot="formDom"> |
|
|
<div class="flex weekPlan" slot="formDom"> |
|
|
<GuipSelect v-for="day in weekDays" :key="day.id" v-model="form.worktimes[day.id].plan" |
|
|
<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="休息"> |
|
|
:options="options_weekPlan" :label="day.name" placeholder="休息"> |
|
|
</GuipSelect> |
|
|
</GuipSelect> |
|
|
</div> |
|
|
</div> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
@ -139,7 +135,7 @@ |
|
|
<GuipFormItem column="column" class="mb24" label="开放预约" :required="true"> |
|
|
<GuipFormItem column="column" class="mb24" label="开放预约" :required="true"> |
|
|
<span class="desc" slot="formRight">患者可提前多久约号</span> |
|
|
<span class="desc" slot="formRight">患者可提前多久约号</span> |
|
|
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="form.visit_day" |
|
|
<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> |
|
|
<span slot="prependshow">提前</span> |
|
|
</GuipInput> |
|
|
</GuipInput> |
|
|
</GuipFormItem> |
|
|
</GuipFormItem> |
|
@ -194,8 +190,7 @@ |
|
|
</GuipInput> |
|
|
</GuipInput> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<GuipTable :tableData="projectList" :key="tableKey" style="width: 100%" ref="multipleTable" |
|
|
<GuipTable :tableData="projectList" :key="tableKey" style="width: 100%" ref="multipleTable" @selection-change="handleSelectionChange" :loading="loading"> |
|
|
@selection-change="handleSelectionChange" :loading="loading" max-height="600px"> |
|
|
|
|
|
<el-table-column type="selection" label="选择" width="80"></el-table-column> |
|
|
<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="name" label="项目名称" min-width="185"></el-table-column> |
|
|
<el-table-column prop="price" label="项目价格" min-width="155"> |
|
|
<el-table-column prop="price" label="项目价格" min-width="155"> |
|
@ -225,10 +220,10 @@ |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> --> |
|
|
</el-table-column> --> |
|
|
</GuipTable> |
|
|
</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" |
|
|
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper" |
|
|
:total="projectList.length"> |
|
|
:total="projectList.length"> |
|
|
</el-pagination> |
|
|
</el-pagination> --> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</div> |
|
|
</div> |
|
|
<div class="siteMessage flex-common mt12" id="siteMessage5"> |
|
|
<div class="siteMessage flex-common mt12" id="siteMessage5"> |
|
@ -254,8 +249,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<GuipTable :tableData="courseList" style="width: 100%" ref="multipleTable1" max-height="600px" |
|
|
<GuipTable :tableData="courseList" style="width: 100%" ref="multipleTable1" @selection-change="handleSelectionChange1" :loading="loading1" :key="tableKey1" > |
|
|
@selection-change="handleSelectionChange1" :loading="loading1" :key="tableKey1" > |
|
|
|
|
|
<el-table-column type="selection" label="选择" width="80"></el-table-column> |
|
|
<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="name" label="套餐名称" min-width="225"></el-table-column> |
|
|
<el-table-column prop="price" label="套餐价格" min-width="125"></el-table-column> |
|
|
<el-table-column prop="price" label="套餐价格" min-width="125"></el-table-column> |
|
@ -279,10 +273,10 @@ |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</GuipTable> |
|
|
</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" |
|
|
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper" |
|
|
:total="courseList.length"> |
|
|
:total="courseList.length"> |
|
|
</el-pagination> |
|
|
</el-pagination> --> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</div> |
|
|
</div> |
|
|
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762" |
|
|
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762" |
|
@ -340,6 +334,8 @@ export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
doctorId: '', |
|
|
doctorId: '', |
|
|
|
|
|
depart_id:false, |
|
|
|
|
|
doctor_id:false, |
|
|
dialogType: '1', |
|
|
dialogType: '1', |
|
|
tableKey:Date.now(), |
|
|
tableKey:Date.now(), |
|
|
tableKey1:Date.now(), |
|
|
tableKey1:Date.now(), |
|
@ -352,9 +348,9 @@ export default { |
|
|
nameRules: [{ required: true, message: '分组名称不得为空', trigger: 'blur' }], |
|
|
nameRules: [{ required: true, message: '分组名称不得为空', trigger: 'blur' }], |
|
|
dialogTitle: '批量录入项目', |
|
|
dialogTitle: '批量录入项目', |
|
|
currentPage: 1, |
|
|
currentPage: 1, |
|
|
pageSize: 10, |
|
|
pageSize: 1000, |
|
|
currentPage1: 1, |
|
|
currentPage1: 1, |
|
|
pageSize1: 10, |
|
|
pageSize1: 1000, |
|
|
loading: false, |
|
|
loading: false, |
|
|
loading1: false, |
|
|
loading1: false, |
|
|
selectedRows: [],//已选中数据 |
|
|
selectedRows: [],//已选中数据 |
|
@ -368,6 +364,7 @@ export default { |
|
|
hospitalSearchState: '', |
|
|
hospitalSearchState: '', |
|
|
hospitalSearchFlag: false, |
|
|
hospitalSearchFlag: false, |
|
|
hospitalSearchTimeout: false, |
|
|
hospitalSearchTimeout: false, |
|
|
|
|
|
departIsFixed:-1, |
|
|
|
|
|
|
|
|
projectList: [ |
|
|
projectList: [ |
|
|
{ |
|
|
{ |
|
@ -405,6 +402,7 @@ export default { |
|
|
courseList: [], |
|
|
courseList: [], |
|
|
selectAll: false, |
|
|
selectAll: false, |
|
|
selectAll1: false, |
|
|
selectAll1: false, |
|
|
|
|
|
departType:[], |
|
|
numSettingForm: { |
|
|
numSettingForm: { |
|
|
times: '', |
|
|
times: '', |
|
|
hours: '', |
|
|
hours: '', |
|
@ -482,12 +480,13 @@ export default { |
|
|
depart_name: '', |
|
|
depart_name: '', |
|
|
address:"", |
|
|
address:"", |
|
|
afternoon_worktime:"", |
|
|
afternoon_worktime:"", |
|
|
depart_id:"1", |
|
|
depart_id:"0", |
|
|
h_name:"", |
|
|
h_name:"", |
|
|
h_pos:"", |
|
|
h_pos:"", |
|
|
hid:"0", |
|
|
hid:"0", |
|
|
is_fixed:'0', |
|
|
is_fixed:'0', |
|
|
morning_worktime:"", |
|
|
morning_worktime:"", |
|
|
|
|
|
h_shortname:'', |
|
|
notice:"", |
|
|
notice:"", |
|
|
time_unit:"0", |
|
|
time_unit:"0", |
|
|
time_unit_num:"0", |
|
|
time_unit_num:"0", |
|
@ -495,12 +494,6 @@ export default { |
|
|
visit_day:"0" |
|
|
visit_day:"0" |
|
|
}, |
|
|
}, |
|
|
siteFormrules: { |
|
|
siteFormrules: { |
|
|
depart_name: [ |
|
|
|
|
|
{ required: true, message: '请输入科室信息', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
h_name: [ |
|
|
|
|
|
{ required: true, message: '请输入出诊医院信息', trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
}, |
|
|
siteForm1: { |
|
|
siteForm1: { |
|
|
domain_set: '', |
|
|
domain_set: '', |
|
@ -627,11 +620,11 @@ export default { |
|
|
doctor_id: this.doctor_id |
|
|
doctor_id: this.doctor_id |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
|
this.form = { ...this.form, ...response.data, |
|
|
this.form = { ...this.form, ...response.data, |
|
|
type:response.type ? [Number(response.type)] : [2], |
|
|
|
|
|
'morning_worktime':response.data.morning_worktime.split('-'), |
|
|
'morning_worktime':response.data.morning_worktime.split('-'), |
|
|
'afternoon_worktime':response.data.afternoon_worktime.split('-') |
|
|
'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) |
|
|
this.getAreaData(this.form.province) |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
@ -657,15 +650,23 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 项目列表 |
|
|
// 项目列表 |
|
|
fetchProjectData() { |
|
|
fetchProjectData() { |
|
|
this.$http('POST', '/api/admin/get_project_list', { |
|
|
var param = { |
|
|
depart_id: this.depart_id, |
|
|
depart_id: this.depart_id, |
|
|
doctor_id: this.doctor_id |
|
|
doctor_id: this.doctor_id, |
|
|
}).then(response => { |
|
|
name:this.projectSearchName, |
|
|
|
|
|
classify_id:this.projectSearchId |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$http('POST', '/api/admin/get_project_list', param).then(response => { |
|
|
if(response.code == 0){ |
|
|
if(response.code == 0){ |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
this.$nextTick(()=>{ |
|
|
this.$nextTick(()=>{ |
|
|
this.projectTagData = response.data.classify;//项目分类 |
|
|
this.projectTagData = response.data.classify;//项目分类 |
|
|
this.projectList = Object.values(response.data.list);//项目列表 |
|
|
if(response.data.list) { |
|
|
|
|
|
this.projectList = Object.values(response.data.list);//项目列表 |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.projectList = [] |
|
|
|
|
|
} |
|
|
this.tableKey = Date.now(); // 强制重新渲染表格 |
|
|
this.tableKey = Date.now(); // 强制重新渲染表格 |
|
|
// this.$set('projectList',Object.values(response.data.list)) |
|
|
// this.$set('projectList',Object.values(response.data.list)) |
|
|
// this.$set('projectTagData',response.data.classify) |
|
|
// this.$set('projectTagData',response.data.classify) |
|
@ -686,13 +687,8 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
validateSelection(val) { |
|
|
validateSelection(val) { |
|
|
// 防止取消选中医生名片 |
|
|
this.departType = [] |
|
|
if (!val.includes(2)) { |
|
|
if(val.length > 0) this.departType[0] = val[val.length-1] |
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.form.type = [...val, 2]; |
|
|
|
|
|
this.$message.warning('基础功能不可取消'); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
selectTag(item) { |
|
|
selectTag(item) { |
|
|
if(item == 'all'){ |
|
|
if(item == 'all'){ |
|
@ -701,33 +697,18 @@ export default { |
|
|
this.projectSearchId = item.id; |
|
|
this.projectSearchId = item.id; |
|
|
} |
|
|
} |
|
|
// 筛选逻辑 |
|
|
// 筛选逻辑 |
|
|
// this.getFilterProject() |
|
|
this.fetchProjectData() |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
getFilterProject(){ |
|
|
getFilterProject(){ |
|
|
// 接口需要更改 |
|
|
this.fetchProjectData() |
|
|
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') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
// 修改项目价格 |
|
|
// 修改项目价格 |
|
|
changePrice(row) { |
|
|
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) { |
|
|
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) { |
|
|
editorProjectInfo(props) { |
|
|
this.$http('POST', '/api/admin/edit_project', { |
|
|
this.$http('POST', '/api/admin/edit_project', { |
|
@ -824,12 +805,18 @@ export default { |
|
|
console.log(data, 'data098908090'); |
|
|
console.log(data, 'data098908090'); |
|
|
}, |
|
|
}, |
|
|
onSwitchChange1(row) { |
|
|
onSwitchChange1(row) { |
|
|
row.status = !row.status; |
|
|
row.status = row.status == 0 ? 1 : 0; |
|
|
this.$set(this.projectList, row) |
|
|
this.$set(this.projectList, row) |
|
|
|
|
|
this.editorProjectInfo({ status: row.status, project_id: row.id }) |
|
|
}, |
|
|
}, |
|
|
onSwitchChange2(row) { |
|
|
onSwitchChange2(row) { |
|
|
row.status = !row.status; |
|
|
console.log(row.status) |
|
|
|
|
|
|
|
|
|
|
|
var tmpstatus = row.status == 1 ? 0 : 1 |
|
|
this.$set(this.courseList, row) |
|
|
this.$set(this.courseList, row) |
|
|
|
|
|
this.selectedRows1 = [row] |
|
|
|
|
|
|
|
|
|
|
|
this.batchOperate(tmpstatus, 'group') |
|
|
}, |
|
|
}, |
|
|
handleClick1(row) { |
|
|
handleClick1(row) { |
|
|
console.log(row); |
|
|
console.log(row); |
|
@ -1005,21 +992,26 @@ export default { |
|
|
this.selectedItem = { ...item }; |
|
|
this.selectedItem = { ...item }; |
|
|
console.log(this.selectedItem, 'this.selectedItem===='); |
|
|
console.log(this.selectedItem, 'this.selectedItem===='); |
|
|
}, |
|
|
}, |
|
|
// 销售渠道 |
|
|
|
|
|
domain_radioChange(type) { |
|
|
|
|
|
console.log(type, '--'); |
|
|
|
|
|
}, |
|
|
|
|
|
onSwitchChange(data) { |
|
|
onSwitchChange(data) { |
|
|
|
|
|
this.form.is_fixed = data ? 1 : 0 |
|
|
|
|
|
this.departIsFixed = data |
|
|
console.log(data, '---'); |
|
|
console.log(data, '---'); |
|
|
}, |
|
|
}, |
|
|
updateHosInfo(props){ |
|
|
updateHosInfo(props, url){ |
|
|
console.log(props) |
|
|
if(this.doctor_id && this.depart_id) { |
|
|
this.$http('POST', '/api/admin/set_hospital_depart', { |
|
|
props.doctor_id = this.doctor_id; |
|
|
|
|
|
props.depart_id = this.depart_id; |
|
|
|
|
|
props.hid = this.form.hid; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$http('POST', url, { |
|
|
...props |
|
|
...props |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
|
if(response.code == 0){ |
|
|
if(response.code == 0){ |
|
|
this.$Message.success('更新成功') |
|
|
this.$Message.success('更新成功') |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
this.$Message.error(response.msg) |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
|
}) |
|
|
}) |
|
@ -1027,33 +1019,51 @@ export default { |
|
|
submitForm(form) { |
|
|
submitForm(form) { |
|
|
this.$refs[form].validate((valid) => { |
|
|
this.$refs[form].validate((valid) => { |
|
|
console.log(this[form], '======formxinxi8', '=============='+form); |
|
|
console.log(this[form], '======formxinxi8', '=============='+form); |
|
|
|
|
|
var rqurl = ''; |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
alert('提交成功!'); |
|
|
|
|
|
let props = {} |
|
|
let props = {} |
|
|
switch(form){ |
|
|
switch(form){ |
|
|
case 'siteForm1': |
|
|
case 'siteForm1': |
|
|
|
|
|
var worktimesArray = Object.entries(this.form.worktimes).map(([key, value]) => ({ |
|
|
|
|
|
type: parseInt(key), |
|
|
|
|
|
plan: value.plan |
|
|
|
|
|
})); |
|
|
|
|
|
|
|
|
props={ |
|
|
props={ |
|
|
morning_worktime:form.morning_worktime.join('-'), |
|
|
morning_worktime:this.form.morning_worktime.join('-'), |
|
|
afternoon_worktime:form.afternoon_worktime.join('-') |
|
|
afternoon_worktime:this.form.afternoon_worktime.join('-'), |
|
|
|
|
|
week_visit_plan:JSON.stringify(worktimesArray), |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
rqurl = "/api/admin/set_depart_worktime"; |
|
|
break; |
|
|
break; |
|
|
case 'siteForm': |
|
|
case 'siteForm': |
|
|
|
|
|
if(this.departType.length <= 0) { |
|
|
|
|
|
this.$Message.info('请选择站点类型') |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
props={ |
|
|
props={ |
|
|
is_fixed:this.form.is_fixed, |
|
|
is_fixed:this.form.is_fixed, |
|
|
type:form.type, |
|
|
type:this.departType[0], |
|
|
notice:form.notice |
|
|
notice:this.form.notice, |
|
|
|
|
|
h_shortname:this.form.h_shortname, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
rqurl = "/api/admin/set_hospital_depart"; |
|
|
break; |
|
|
break; |
|
|
case 'numSettingForm': |
|
|
case 'numSettingForm': |
|
|
props={ |
|
|
props={ |
|
|
time_unit:form.time_unit, |
|
|
time_unit:this.form.time_unit, |
|
|
time_unit_num:form.time_unit_num, |
|
|
time_unit_num:this.form.time_unit_num, |
|
|
visit_day:form.visit_day, |
|
|
visit_day:this.form.visit_day, |
|
|
treat_expire:form.treat_expire, |
|
|
treat_expire:this.form.treat_expire, |
|
|
} |
|
|
} |
|
|
|
|
|
rqurl = "/api/admin/set_visit_num"; |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
this.updateHosInfo(props) |
|
|
this.updateHosInfo(props, rqurl) |
|
|
} else { |
|
|
} else { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|