Commit 89d8e598 authored by huangyecong's avatar huangyecong

添加体检中心接口

parent 9dcfb796
......@@ -95,7 +95,11 @@ export default {
},
methods: {
onChange(checkedValues) {
window.localStorage.setItem('chooseId',JSON.stringify(this.chooseId))
const chooseList = []
chooseList.push({
id:this.chooseId
})
window.localStorage.setItem('chooseList',JSON.stringify(chooseList))
console.log("选择体检套餐chooseId===",this.chooseId)
},
},
......
......@@ -51,8 +51,8 @@
v-for="(item, index) in mechanismList"
:key="index"
:class="index === selectIndex ? 'active' : ''"
@click="clickTab(index)"
>{{ item.supplierName }}</span
@click="clickTab(index,(item.id))"
>{{ item.supplierName }}-{{item.id}}</span
>
</div>
</div>
......@@ -64,7 +64,7 @@
<ul class="hospital_box">
<li v-for="(item, index) in hospitalList" :key="index">
<div>
<p class="top">{{ item.name }}</p>
<p class="top">{{ item.checkUnitName }}</p>
<p class="bottom">{{ item.address }}</p>
</div>
<button
......@@ -94,6 +94,7 @@
<script>
import api from '@/api/customer'
import reserveDate from '../../../components/reserve-date'
import { log } from 'util'
export default {
name: 'selectInstitution',
components: {
......@@ -113,43 +114,27 @@ export default {
provinceList: ['上海市'],
areaList: ['静安区'],
mechanismList: [],
hospitalList: [
{
name: '上海张江分院',
address: '上海市浦东新区海科路777号',
},
{
name: '上海张江分院',
address: '上海市浦东新区海科路777号',
},
{
name: '上海张江分院',
address: '上海市浦东新区海科路777号',
},
{
isDisabled: true,
name: '上海张江分院',
address: '上海市浦东新区海科路777号',
},
],
hospitalList: [],
supplierIds:"",//体检中心ids,默认显示全部
}
},
created() {
this.getProvinceList()
this.getProvinceList()//省
this.getSupplierList() //获取体检机构
this.getShopByDistrictCode()//根据体检结构-显示可选择的体检中心,默认显示全部
},
methods: {
// 省
async getProvinceList() {
const query = {
customerSex: '',
customerMaritalStatus: '',
chooseList: [],
customerSex: 'M',
customerMaritalStatus: '02',
chooseList: [{id: 1069}],
payList: [],
}
await api.getProvinceList().then((res) => {
await api.getProvinceList(query).then((res) => {
console.log('省=', res)
})
// await this.getCityListByProvinceCode()
......@@ -173,6 +158,7 @@ export default {
// this.id
api.getSupplierList({ servicepackageId: '1043' }).then((res) => {
if (res.returnCode == '0000') {
const data = res.content
this.mechanismList = [
{
status: '0',
......@@ -180,16 +166,46 @@ export default {
},
...res.content,
]
console.log('获取体检机构=',this.mechanismList)
// 提取所有的体检机构ids,并用逗号隔开,比如:1004,1007
this.supplierIds = data.map(function(e,i){
return e.id
}).join(',')
console.log('this.supplierIds===',this.supplierIds)
} else {
this.$message.error(res.returnMsg)
}
})
},
// 选择体检机构
clickTab(index) {
clickTab(index,id) {
this.selectIndex = index
console.log("选择体检机构id",index,id);
this.supplierIds = id
// 点击选择体检机构,显示该机构下的体检中心
this.getShopByDistrictCode()
},
// 根据体检机构-获取体检中心列表
getShopByDistrictCode() {
const params = {
customerSex: 'M',//性别
customerMaritalStatus: '02',//婚姻状况
chooseList: [{ id: 1069 }],//必选服务
payList: [],
provinceCode: null,//省编号
cityCode: '',//市编号
areaCode: '',//区号
supplierIds: this.supplierIds,//体检机构d
location: ',',//经纬度
servicepackageId: 1043,//客户id
}
api.getShopByDistrictCode(params).then((res) => {
if(res.returnCode==='0000'){
this.hospitalList = res.content
}
})
},
// 打开日期弹框
openDatePicker(item) {
......
......@@ -41,15 +41,13 @@
</div>
<div class="right">
<!-- v-if="false" -->
<Combos :id="id" />
<!-- <Detail v-if="!next" /> -->
<!-- <SelectInstitution :id="id" /> -->
<!-- <Combos :id="id"/> -->
<SelectInstitution :id="id" />
<!-- <Detail /> -->
</div>
</div>
<div class="btn">
<!-- v-if="!next" -->
<a-button type="primary" @click="nextStep">下一步</a-button>
<a-button type="primary" @click="nextStep" v-if="!next">下一步</a-button>
</div>
</div>
</template>
......@@ -88,7 +86,9 @@ export default {
this.getCustomerDetail() //客户信息
},
methods: {
nextStep() {},
nextStep() {
this.next = true
},
// 获取客户信息
getCustomerDetail() {
......@@ -96,7 +96,7 @@ export default {
if (res.returnCode == '0000') {
const {name,sex,idNo,phone,birthDate,maritalStatus} = res.content
this.customerInfo={name,sex,idNo,phone,birthDate,maritalStatus}
console.log('customerInfo=', this.customerInfo)
console.table('客户信息customerInfo=', this.customerInfo)
} else {
this.$message.error(res.returnMsg)
}
......
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