|
|
|
|
@ -140,6 +140,17 @@
|
|
|
|
|
:error-type="['toast']"
|
|
|
|
|
>
|
|
|
|
|
<view class="form-card form-card-1">
|
|
|
|
|
<!-- 站点 根据前面选择的站点来 -->
|
|
|
|
|
<u-form-item label="站点区域" prop="hospital" required>
|
|
|
|
|
<u-input
|
|
|
|
|
:type="!!orderId || canSelectSite ? 'input' : 'select'"
|
|
|
|
|
placeholder="请选择站点区域"
|
|
|
|
|
:disabled="!!orderId || canSelectSite"
|
|
|
|
|
:value="site_name"
|
|
|
|
|
:select-open="isShowSite"
|
|
|
|
|
@click="orderId || canSelectSite ? false : (isShowSite = true)"
|
|
|
|
|
/>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="就诊医院" prop="hospital" required v-if="form.type == 1">
|
|
|
|
|
<u-input
|
|
|
|
|
:type="!!orderId ? 'input' : 'select'"
|
|
|
|
|
@ -503,6 +514,15 @@
|
|
|
|
|
label-name="name"
|
|
|
|
|
:list="list_hospital"
|
|
|
|
|
></u-select>
|
|
|
|
|
<!-- 如果前面没有选站点 就需要选择产品下的站点 -->
|
|
|
|
|
|
|
|
|
|
<u-select
|
|
|
|
|
v-model="isShowSite"
|
|
|
|
|
value-name="id"
|
|
|
|
|
@confirm="confirmSite"
|
|
|
|
|
label-name="name"
|
|
|
|
|
:list="list_psite"
|
|
|
|
|
></u-select>
|
|
|
|
|
<!-- 服务时间 -->
|
|
|
|
|
<u-picker
|
|
|
|
|
v-model="isShowTime"
|
|
|
|
|
@ -705,7 +725,12 @@ export default {
|
|
|
|
|
list_archive: [],
|
|
|
|
|
orderId: "",
|
|
|
|
|
nurse: {},
|
|
|
|
|
isShowSite:false,
|
|
|
|
|
list_psite: [],
|
|
|
|
|
site_name:'',
|
|
|
|
|
canSelectSite:false, // 是否需要选择 站点
|
|
|
|
|
form: {
|
|
|
|
|
site_id:'',
|
|
|
|
|
type: 1,
|
|
|
|
|
is_show: false,
|
|
|
|
|
accompany_product_id: "",
|
|
|
|
|
@ -739,6 +764,11 @@ export default {
|
|
|
|
|
trigger: ["blur", "change"],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
site_id:[{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "请选择所在站点",
|
|
|
|
|
trigger: ["blur", "change"],
|
|
|
|
|
}],
|
|
|
|
|
hospital: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
@ -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`;
|
|
|
|
|
},
|
|
|
|
|
|