diff --git a/package_sub/pages/AddOrder/AddOrder.vue b/package_sub/pages/AddOrder/AddOrder.vue index 152d407..92b6c7a 100644 --- a/package_sub/pages/AddOrder/AddOrder.vue +++ b/package_sub/pages/AddOrder/AddOrder.vue @@ -140,6 +140,17 @@ :error-type="['toast']" > + + + + + + + { @@ -798,16 +828,22 @@ export default { this.form.can_multi_num = option.can_multi_num ? Number(option.can_multi_num) : 0 this.form.accompany_product_id = option.id ? Number(option.id) : ""; this.form.type = Number(option.type); + this.form.site_id = option.site_id?Number(option.site_id):'' + this.site_name = option.site_id?option.site_name:'' + this.canSelectSite = option.site_id?true:false + // this.site_name = this.vuex_site?this.vuex_site.name:'全部' + console.log("this.vuex_site",this.form.site_id,this.site_name) uni.setNavigationBarTitle({ title: option.type == 1 ? '预约陪诊' : '预约居家照护' }) - this.getList(option.type); + if (!this.orderId && option.order_id) { + this.orderId = option.order_id; + this.getDetail(); + } + this.getList(option.type,option.site_id); this.getHospital(option.site_id); this.getUserArchive(); - if (!this.orderId && option.order_id) { - this.orderId = option.order_id; - this.getDetail(); - } + }, methods: { @@ -834,13 +870,18 @@ export default { } }, // 获取产品列表 - async getList(type) { + async getList(type,site_id) { const res = await this.$u.api.accompanyProduct({ type: type, page: 1, page_size: 999, + site_id:site_id?site_id:'' }); this.list_service = res.data; + if(!this.orderId){ + this.list_psite = res.data.filter(item=>item.id==this.form.accompany_product_id)[0].site + } + }, async getDetail(id) { console.log(id, this.orderId); @@ -867,6 +908,7 @@ export default { url: i.url })) this.paidPrice = res.price + this.site_name = res.site?res.site.name:'' uni.setNavigationBarTitle({ title: res.accompany_product?res.accompany_product.name:'订单详情' }) @@ -890,6 +932,12 @@ export default { changeService(item) { this.info = item; this.form.accompany_product_id = item.id; + if(this.canSelectSite){ + this.list_psite = item.site + this.form.site_id = '' + this.site_name = '' + } + console.log("this.list_psite",this.list_psite) this.getHospital(item.site_id); this.isShowService = false; this.form.hospital = ""; @@ -897,6 +945,10 @@ export default { confirmHospital(e) { this.form.hospital = e[0].value; }, + confirmSite(e) { + this.form.site_id = e[0].value; + this.site_name = e[0].label; + }, confirmTime(e) { this.form.time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:00`; }, diff --git a/package_sub/pages/AddOrder/editOrder.vue b/package_sub/pages/AddOrder/editOrder.vue index f121fc5..9efac21 100644 --- a/package_sub/pages/AddOrder/editOrder.vue +++ b/package_sub/pages/AddOrder/editOrder.vue @@ -40,7 +40,15 @@ - + + + + @@ -322,7 +330,8 @@ // service isShowService: false, - // form + // form + site_name:'', fileList: [], isShowHospital: false, isShowTime: false, @@ -448,7 +457,8 @@ this.fileList = res.files.map(i => ({ url: i.url })) - this.paidPrice = res.price + this.paidPrice = res.price + this.site_name = res.site.name?res.site.name:'' uni.setNavigationBarTitle({ title: res.accompany_product ? res.accompany_product.name : '订单详情' }) diff --git a/package_sub/pages/ServiceDetail/ServiceDetail.vue b/package_sub/pages/ServiceDetail/ServiceDetail.vue index c775dfb..baed858 100644 --- a/package_sub/pages/ServiceDetail/ServiceDetail.vue +++ b/package_sub/pages/ServiceDetail/ServiceDetail.vue @@ -98,7 +98,9 @@ export default { data() { return { - id: '', + id: '', + choose_site:'', + site_name:'', currentTab: 0, info: {}, orderBtnStyle: { @@ -115,7 +117,9 @@ uni.setNavigationBarTitle({ title: option.title ?? "服务项目" }); - this.id = option.id ? option.id : '' + this.id = option.id ? option.id : '' + this.choose_site = option.choose_site?option.choose_site:'' + this.site_name = option.site_name?option.site_name:'' this.getDetail(this.id) }, mounted() { @@ -157,7 +161,7 @@ return } this.$u.route({ - url: '/package_sub/pages/AddOrder/AddOrder?id='+info.id+'&site_id='+info.site_id+'&type='+info.type+'&can_multi_num='+info.can_multi_num + url: '/package_sub/pages/AddOrder/AddOrder?id='+info.id+'&site_name='+this.site_name+'&site_id='+this.choose_site+'&type='+info.type+'&can_multi_num='+info.can_multi_num }) }, } diff --git a/package_sub/pages/ServiceList/ServiceList.vue b/package_sub/pages/ServiceList/ServiceList.vue index 0016e15..63fb5d2 100644 --- a/package_sub/pages/ServiceList/ServiceList.vue +++ b/package_sub/pages/ServiceList/ServiceList.vue @@ -164,7 +164,7 @@ }, toDetail(item) { this.$u.route({ - url: '/package_sub/pages/ServiceDetail/ServiceDetail?id=' + item.id + url: '/package_sub/pages/ServiceDetail/ServiceDetail?id=' + item.id+'&site_name='+this.site_name+'&choose_site='+this.select.site_id }) } },