Commit c18c17eb authored by huangyecong's avatar huangyecong

添加体检机构下体检中心接口

parent 67085158
......@@ -52,7 +52,7 @@
:key="index"
:class="index === selectIndex ? 'active' : ''"
@click="clickTab(index, item.id)"
>{{ item.supplierName }}-{{ item.id }}</span
>{{ item.supplierName }}</span
>
</div>
</div>
......@@ -61,7 +61,7 @@
<div class="title">
<div class="type"><span class="point"></span> 请选择体检中心</div>
</div>
<ul class="hospital_box">
<ul class="hospital_box" v-if="isShowHospitalList">
<li v-for="(item, index) in hospitalList" :key="index">
<div>
<p class="top">{{ item.checkUnitName }}</p>
......@@ -75,6 +75,7 @@
</button>
</li>
</ul>
<div v-else class="hospital_none">暂无可选分院</div>
</div>
<div class="mask" v-if="datePickShow">
<reserve-date
......@@ -114,8 +115,10 @@ export default {
areaList: [], //区
provinceCode: '', //选择省
cityCode: '', //选择市
mechanismList: [],
hospitalList: [],
areaCode: '', //选择区
mechanismList: [], //体检机构列表
hospitalList: [], //体检机构对应下的体检中心列表
isShowHospitalList: true, //是否显示体检中心列表
supplierIds: '', //体检中心ids,默认显示全部
servicepackageId: '', //产品id
}
......@@ -125,7 +128,6 @@ export default {
this.servicepackageId = servicepackageId ? servicepackageId : ''
this.getProvinceList() //省
this.getSupplierList() //获取体检机构
this.getShopByDistrictCode() //根据体检结构-显示可选择的体检中心,默认显示全部
},
methods: {
......@@ -190,30 +192,35 @@ export default {
},
// 选择区
handleSelectDistrict(value){
handleSelectDistrict(value) {
this.areaCode = value
console.log(`选择区DistrictCode= ${value}`)
},
// 获取体检机构
getSupplierList() {
// this.id
api.getSupplierList({ servicepackageId: '1043' }).then((res) => {
async getSupplierList() {
// 测试id1043
api.getSupplierList({ servicepackageId: this.servicepackageId}).then((res) => {
if (res.returnCode == '0000') {
const data = res.content
// 提取所有的体检机构ids,并用逗号隔开,比如:1004,1007
this.supplierIds = data
.map(function (e, i) {
return e.id
})
.join(',')
this.mechanismList = [
{
status: '0',
supplierName: '全部',
id:this.supplierIds
},
...res.content,
]
// 提取所有的体检机构ids,并用逗号隔开,比如:1004,1007
this.supplierIds = data
.map(function (e, i) {
return e.id
})
.join(',')
console.log('this.supplierIds===', this.supplierIds)
this.getShopByDistrictCode()//根据体检结构-显示可选择的体检中心,默认显示全部
} else {
this.$message.error(res.returnMsg)
}
......@@ -232,20 +239,25 @@ export default {
// 根据体检机构-获取体检中心列表
getShopByDistrictCode() {
const params = {
customerSex: 'M', //性别
customerMaritalStatus: '02', //婚姻状况
chooseList: [{ id: 1069 }], //必选服务
// customerSex: 'M', //性别
// customerMaritalStatus: '02', //婚姻状况
chooseList: JSON.parse(window.localStorage.getItem('chooseList')),
payList: [],
provinceCode: null, //省编号
provinceCode: '', //省编号
cityCode: '', //市编号
areaCode: '', //区号
supplierIds: this.supplierIds, //体检机构d
location: ',', //经纬度
servicepackageId: 1043, //客户id
servicepackageId: this.servicepackageId, //客户id
}
api.getShopByDistrictCode(params).then((res) => {
if (res.returnCode === '0000') {
this.isShowHospitalList = true
this.hospitalList = res.content
console.log('根据体检机构-获取体检中心列表=',this.hospitalList)
}else{
this.isShowHospitalList = false
// this.$message.error(res.returnMsg)
}
})
},
......@@ -365,5 +377,9 @@ export default {
}
}
}
.hospital_none{
text-align: center;
padding: 20px;
}
}
</style>
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