Commit c18c17eb authored by huangyecong's avatar huangyecong

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

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