lion 12 months ago
parent 5a0f293b95
commit 2c700c0d07

@ -44,3 +44,10 @@ export function getSexByIdcard (idCard) {
}
return sexStr;
}
export function isNull (p) {
return p == '' || p == undefined || p == null || p == 'undefined' || p == 'null';
}

@ -0,0 +1,40 @@
<template>
<view class="float-phone-icon" @click="makeCall">
<u-icon size="60" color="#c10d12" class="row__icon" name="kefu-ermai"></u-icon>
</view>
</template>
<script>
export default {
methods: {
makeCall() {
uni.makePhoneCall({
phoneNumber: '0519-81191800', //
success: function () {
console.log('拨打电话成功!')
},
fail: function () {
console.log('拨打电话失败!')
}
})
}
}
}
</script>
<style scoped>
.float-phone-icon {
position: fixed;
right: 40rpx;
bottom: 240rpx;
width: 100rpx;
height: 100rpx;
z-index: 99999;
border-radius: 100rpx;
line-height: 100rpx;
background-color: #fff;
box-shadow: 1rpx 1rpx 10rpx rgba(0,0,0,0.3);
display: flex;
justify-content: center;
}
</style>

@ -127,7 +127,7 @@
...that.form
}).then(res=>{
uni.showToast({
title:"创建成功",
title:"更新成功",
icon:'none',
success() {
that.isShow = false

@ -32,6 +32,10 @@ Vue.prototype.$qqmapsdk = new QQMapWX({
key: 'D5EBZ-C3BWP-HZIDG-VO6BE-P2MN5-ESFZO'
});
import floatPhone from "@/component/floatPhone/index.vue"
Vue.component('floatPhone',floatPhone)
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare)

@ -101,6 +101,7 @@
<u-input
:type="!!orderId ? 'input' : 'select'"
placeholder="请选择就诊医院"
:disabled="!!orderId"
:value="hospital.name"
:select-open="isShowHospital"
@click="orderId ? false : (isShowHospital = true)"
@ -110,15 +111,17 @@
<u-input
:type="!!orderId ? 'input' : 'select'"
placeholder="请选择时间"
:disabled="!!orderId"
v-model="form.time"
:select-open="isShowTime"
@click="orderId ? false : (isShowTime = true)"
/>
</u-form-item>
<u-form-item :label="(form.type == 1 ? '就诊' : '服务') +'人'" prop="user_archive_id" required>
<u-form-item :label="(form.type == 1 ? '被服务' : '被服务') +'人'" prop="user_archive_id" required>
<u-input
:type="!!orderId ? 'input' : 'select'"
placeholder="请选择人员"
:disabled="!!orderId"
:value="archive.name"
:select-open="isShowArchive"
@click="orderId ? false : (isShowArchive = true)"
@ -189,7 +192,7 @@
<view class="title">
<view class="title__left">
<text>上传资料</text>
<text>就诊卡病例等</text>
<text>挂号单</text>
</view>
<!-- <view class="title__right">
点击查看示例
@ -289,7 +292,7 @@
</view>
<view class="desc-card">
<view class="desc-card__title"> 就诊人信息 </view>
<view class="desc-card__title"> 被服务人信息 </view>
<view class="desc-card__content">
<view class="desc-card__content--title"> 姓名 </view>
@ -359,7 +362,7 @@
:custom-style="payBtnStyle"
:throttle-time="2000"
@click="pay"
>立即{{ form.pay_status === 0 ? '下单' : '支付' }}</u-button
>立即{{ form.pay_status === 0 && !orderId ? '下单' : '支付' }}</u-button
>
<view v-if="orderId && form.pay_status === 1 && form.status !== 4" class="more" @click="isShowMoreAction = true"></view>
</view>
@ -420,7 +423,12 @@
</view>
</view>
<view class="service-list-item__address">
{{ item.address }}
<text>{{ item.address }}</text>
<view class="icon">
<u-icon name="edit-pen" :size="40" color="#999999" @tap="editUser(item),$event.stopPropagation()"></u-icon>
<!-- <u-icon name="trash" style="margin-left: 40rpx;" :size="40" color="red"
@tap="delUser(item),$event.stopPropagation()"></u-icon> -->
</view>
</view>
</view>
</view>
@ -430,7 +438,7 @@
ripple
:custom-style="payBtnStyle"
@click="addArchive"
>新增就诊</u-button
>新增被服务</u-button
>
</view>
</u-popup>
@ -608,6 +616,7 @@
<script>
import serviceArchive from "@/component/serviceArchive/service-archive.vue";
import { ROOTPATH as baseUrl } from "@/common/config.js";
import {isNull} from "@/common/util.js"
export default {
components: {
serviceArchive,
@ -669,14 +678,14 @@ export default {
{
type: "number",
required: true,
message: "请选择就诊人",
message: "请选择",
trigger: ["blur", "change"],
},
],
time: [
{
required: true,
message: "请选择就诊时间",
message: "请选择时间",
trigger: ["blur", "change"],
},
],
@ -772,6 +781,9 @@ export default {
this.fileList = res.files.map(i => ({
url: i.url
}))
uni.setNavigationBarTitle({
title: res.accompany_product?res.accompany_product.name:'订单详情'
})
});
},
async getHospital(site_id) {
@ -810,11 +822,35 @@ export default {
addArchive() {
this.$refs.serviceArchive.isShow = true;
},
editUser(item){
this.$refs.serviceArchive.form = item
this.$refs.serviceArchive.isShow = true;
},
delUser(item){
uni.showModal({
title:'确认删除该人员?',
success:async (res)=>{
if(res.confirm){
try {
if (!item?.id) return
const res = await this.$u.api.userArchiveDestroy({
id: item?.id
})
this.getUserArchive()
} catch (err) {
console.error(err)
}
}
}
})
},
addSuccess(e) {
if (e) {
this.getUserArchive();
}
},
pay() {
if (!this.orderId) {
@ -827,6 +863,26 @@ export default {
return val.progress === 100;
})
?.map((i) => i.response?.id) || [];
//
if(this.form.type===1){
if(this.form.file_ids.length<1 && isNull(this.form.content)){
uni.showToast({
title:'请填写服务需求或上传资料',
icon:'none'
})
return
}
}
if(this.form.type===2){
if(isNull(this.form.content)){
uni.showToast({
title:'请填写服务需求',
icon:'none'
})
return
}
}
// return
const res = await this.$u.api.accompanyProductOrder(this.form);
if (res) {
this.orderId = res.id;
@ -1516,8 +1572,12 @@ export default {
}
&__address {
margin-top:10rpx;
width: 100%;
padding-left: 14rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
&__icon {

File diff suppressed because it is too large Load Diff

@ -3,68 +3,72 @@
<scroll-view scroll-y style="height: 100%; width: 100%" @scrolltolower="reachBottom">
<view>
<view class="order" v-for="i in list" :key="i.id">
<view class="title">
<view class="title__name">
<u-tag size="mini" type="primary" mode="dark" shape="circleLeft"
:text="i.type === 1 ? '陪诊' : '陪护'"></u-tag>
<text style="padding-left: 10rpx;">专享半天陪诊</text>
<view class="title">
<view class="title__name">
<u-tag size="mini" type="primary" mode="dark" shape="circleLeft"
:text="i.type === 1 ? '陪诊' : '陪护'"></u-tag>
<text style="padding-left: 10rpx;">{{i.accompany_product?i.accompany_product.name:''}}</text>
</view>
<view class="title__status">{{ statusFormat(i.pay_status) }}</view>
</view>
<view class="price">
<view class="price-icon">
<image style="width:90rpx" mode="widthFix" :src="i.accompany_product?(i.accompany_product.cover?i.accompany_product.cover.url:vuex_default_icon):vuex_default_icon"></image>
<!-- <u-icon :name="" size="30"></u-icon> -->
</view>
<view class="price-text">
<view class="price-text__num">
{{ i.accompany_product ? i.accompany_product.price : 0 }}</view>
<view class="price-text__no">订单号 {{ i.no }}</view>
</view>
</view>
<view class="info" @click.stop.native="$u.route({
url: '/package_sub/pages/AddOrder/AddOrder',
params: {
order_id: i.id,
type: i.type,
site_id: i.hospital?i.hospital.site_id:''
}
})">
<view class="info__item">
<text>{{i.type == 1 ? '被服务人' : '被服务人'}}</text>
<text>{{ i.user_archive ? i.user_archive.name : i.user_archive_id }}</text>
</view>
<view class="info__item flex100">
<text>{{(i.type == 1 ? '就诊' : '服务') + '时间'}}</text>
<text>{{ i.time ? $moment(i.time).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
</view>
<view class="info__item" v-if="i.type==2">
<text>详细地址</text>
<text>{{ i.city || " " }}</text>
</view>
<view class="info__item flex100" v-if="i.type==1">
<text>就诊医院</text>
<text>{{ i.hospital ? i.hospital.name : '' }}</text>
</view>
</view>
<view class="bottom">
<view class="row1">
<view class="time">
<text>下单时间 </text>
<text>{{ i.created_at ? $moment(i.created_at).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
</view>
<u-button ripple shape="circle" :custom-style="payBtnStyle"
:throttle-time="2000" @click="$u.route({
url: '/package_sub/pages/AddOrder/AddOrder',
params: {
order_id: i.id,
type: i.type,
site_id: i.hospital ? i.hospital.site_id : ''
}
})">{{ i.pay_status === 0 ? '立即支付' : '查看订单' }}</u-button>
</view>
</view>
<view class="title__status">{{ statusFormat(i.pay_status) }}</view>
</view>
<view class="price">
<view class="price-icon">
<u-icon :name="i.cover ? i.cover.url : vuex_default_icon" size="30"></u-icon>
</view>
<view class="price-text">
<view class="price-text__num">{{ i.accompany_product ? i.accompany_product.price : 0 }}
</view>
<view class="price-text__no">订单号 {{ i.no }}</view>
</view>
</view>
<view class="info" @click.stop.native="$u.route({
url: '/package_sub/pages/AddOrder/AddOrder',
params: {
order_id: i.id,
type: i.type,
site_id: i.hospital.site_id
}
})">
<view class="info__item">
<text>就诊城市</text>
<text>{{ i.city || ((i.hospital && i.hospital.site) ? i.hospital.site.name : "") || " " }}</text>
</view>
<view class="info__item">
<text>就诊医院</text>
<text>{{ i.hospital ? i.hospital.name : '' }}</text>
</view>
<view class="info__item">
<text>就诊人</text>
<text>{{ i.user_archive ? i.user_archive.name : i.user_archive_id }}</text>
</view>
<view class="info__item">
<text>就诊时间</text>
<text>{{ i.time ? $moment(i.time).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
</view>
</view>
<view class="bottom">
<view class="time">
<text>下单时间 </text>
<text>{{ i.created_at ? $moment(i.created_at).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
</view>
<u-button ripple shape="circle" :custom-style="payBtnStyle" :throttle-time="2000" @click="$u.route({
url: '/package_sub/pages/AddOrder/AddOrder',
params: {
order_id: i.id,
type: i.type,
site_id: i.hospital.site_id
}
})">{{ i.pay_status === 0 ? '立即支付' : '查看订单' }}</u-button>
</view>
</view>
<u-loadmore :status="loadStatus" bgColor="#f2f2f2"></u-loadmore>
@ -122,12 +126,12 @@
this.loadStatus = 'loading'
const res = await this.$u.api.accompanyOrders(this.select);
console.log(res);
this.total = res.total;
this.total = res.order.total;
if (isRefresh) {
this.list.length = 0;
}
this.list.push(...res.data)
if (this.list.length >= res.total) {
this.list.push(...res.order.data)
if (this.list.length >= res.order.total) {
this.loadStatus = 'nomore'
} else {
this.loadStatus = 'loadmore'

@ -9,7 +9,14 @@
<view class="form-card form-card-1">
<u-form :model="form" :rules="rules" ref="uForm" :label-width="178" :error-type="['toast']">
<u-form-item label="姓名" prop="name" required>
<u-input v-model="form.name" placeholder="请填写姓名" />
<!-- <u-input v-model="form.name" placeholder="请填写姓名" /> -->
<u-input
:type="'select'"
placeholder="请选择人员"
:value="form.name"
:select-open="isShowArchive"
@click="isShowArchive = true"
/>
</u-form-item>
<u-form-item label="性别" prop="sex" required>
<view slot="right">
@ -63,12 +70,65 @@
:list="list_relationship"></u-select>
<!-- 咨询类别 -->
<u-select v-model="isShowType" value-name="value" @confirm="confirmType" label-name="label"
:list="list_type"></u-select>
:list="list_type"></u-select>
<!-- 选择就诊人可以新增 -->
<u-popup
v-model="isShowArchive"
mode="bottom"
safe-area-inset-bottom
closeable
:border-radius="10"
:height="800"
>
<view class="service-list" style="padding-bottom: 120rpx">
<view
class="service-list-item"
v-for="(item, i) in list_archive"
:key="i"
@click="confirmArchive(item)"
>
<view class="service-list-item__namewrap">
<view class="service-list-item__name">
{{ item.name }}
</view>
<view class="service-list-item__price">
{{ item.mobile }}
</view>
</view>
<view class="service-list-item__address">
<text>{{ item.address }}</text>
<view class="icon">
<u-icon name="edit-pen" :size="40" color="#999999" @tap="editUser(item),$event.stopPropagation()"></u-icon>
</view>
</view>
</view>
</view>
<view class="service-list-btn">
<u-button
shape="circle"
ripple
:custom-style="orderBtnStyle"
@click="addArchive"
>新增被服务人</u-button
>
</view>
</u-popup>
<!-- 新增就诊人 -->
<service-archive
ref="serviceArchive"
@addSuccess="addSuccess"
></service-archive>
</view>
</template>
<script>
export default {
<script>
import serviceArchive from "@/component/serviceArchive/service-archive.vue";
export default {
components: {
serviceArchive,
},
data() {
return {
orderBtnStyle: {
@ -83,7 +143,9 @@
serve_hospital_id: '',
serve_hospital_department_id: '',
info: {},
department_name: '',
department_name: '',
isShowArchive: false,
list_archive: [],
form: {
name: '',
sex: '男',
@ -179,8 +241,10 @@
},
onLoad(options) {
this.serve_hospital_id = options.id ? options.id : ''
this.serve_hospital_department_id = options.department_id ? options.department_id : ''
this.getDetail()
this.serve_hospital_department_id = options.department_id ? options.department_id : ''
this.getUserArchive();
this.getDetail()
},
methods: {
async getDetail() {
@ -193,7 +257,52 @@
this.department_name = item.name
}
})
},
},
async getUserArchive() {
const res = await this.$u.api.userArchive({
page: 1,
page_size: 999,
});
this.list_archive = res.data;
},
//
confirmArchive(e) {
this.form.name = e.name
this.form.mobile = e.mobile
this.isShowArchive = false;
},
addArchive() {
this.$refs.serviceArchive.isShow = true;
},
editUser(item){
this.$refs.serviceArchive.form = item
this.$refs.serviceArchive.isShow = true;
},
delUser(item){
uni.showModal({
title:'确认删除该人员?',
success:async (res)=>{
if(res.confirm){
try {
if (!item?.id) return
const res = await this.$u.api.userArchiveDestroy({
id: item?.id
})
this.getUserArchive()
} catch (err) {
console.error(err)
}
}
}
})
},
addSuccess(e) {
if (e) {
this.getUserArchive();
}
},
confirmSex(e) {
this.form.sex = e
},
@ -322,7 +431,65 @@
::v-deep .form-card-2 .u-input__input {
text-align: left;
}
}
.service-list {
padding-top: 80rpx;
&-item {
border: 2rpx solid #e6e6eb;
border-radius: 10rpx;
background-color: #ffffff;
margin: 0 25rpx;
padding: 28rpx 39rpx;
display: flex;
align-items: center;
flex-wrap: wrap;
&__namewrap {
display: flex;
align-items: center;
width: 100%;
}
&__address {
margin-top:10rpx;
width: 100%;
padding-left: 14rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
&__icon {
display: flex;
justify-content: center;
align-items: center;
// background: #f9f5e9;
// padding: 20rpx;
}
&__name {
padding-left: 14rpx;
font-size: 28rpx;
color: #333333;
font-weight: 500;
}
&__price {
color: #c20d12;
font-weight: 500;
margin-left: auto;
}
}
&-btn {
position: fixed;
bottom: 40rpx;
left: calc(50% - 144rpx);
}
&-item + &-item {
margin-top: 20rpx;
}
}
</style>

@ -120,6 +120,11 @@
},
mounted() {
},
computed: {
token() {
return this.vuex_token || uni.getStorageSync('lifeData')?.vuex_token
}
},
methods: {
async getDetail(id) {
@ -131,7 +136,26 @@
})
},
toOrder(info) {
toOrder(info) {
if (!this.token) {
uni.showModal({
title: "提示",
content: "请先登录再下单",
confirmText: "登录",
success: (status) => {
if (status.confirm) {
this.$u.route({
url: '/pages/login/login',
type: 'redirect'
})
} else {
}
},
fail: () => {},
});
return
}
this.$u.route({
url: '/package_sub/pages/AddOrder/AddOrder?id='+info.id+'&site_id='+info.site_id+'&type='+info.type
})

@ -36,7 +36,7 @@
</view>
<view class="right">
<u-button shape="circle" ripple :custom-style="orderBtnStyle"
@click.stop="toOrder(item)">预约</u-button>
@click.stop="toDetail(item)">预约</u-button>
</view>
</view>
<u-loadmore :margin-top="20" :status="loadStatus" bgColor="#f2f2f2"></u-loadmore>

@ -17,7 +17,7 @@
</view>
<view class="addSite" @tap="addArchive">
<view class="add">
<u-icon name="plus" color="#ffffff" class="icon" :size="30"></u-icon>
<u-icon name="plus" color="#ffffff" class="icon" :size="30"></u-icon>
</view>
</view>
<u-modal v-model="show" content="确认操作?" show-cancel-button @confirm="destroy"></u-modal>

@ -44,6 +44,12 @@
"navigationBarTitleText": "预约陪诊"
}
},
{
"path": "pages/AddOrder/editOrder",
"style": {
"navigationBarTitleText": "预约陪诊"
}
},
{
"path": "pages/ServiceList/ServiceList",
"style": {
@ -67,7 +73,7 @@
{
"path": "pages/UserArchive/UserArchive",
"style": {
"navigationBarTitleText": "我的服务人员",
"navigationBarTitleText": "被服务人",
"enablePullDownRefresh": true
}
},
@ -138,11 +144,11 @@
"navigationStyle": "custom"
}
},
//
//
{
"path": "pages/ServeHospital/ServeHospital",
"style": {
"navigationBarTitleText": "就医服务",
"navigationBarTitleText": "就医咨询",
"enablePullDownRefresh": true
}
},
@ -161,14 +167,14 @@
{
"path": "pages/ServeOrder/ServeOrder",
"style": {
"navigationBarTitleText": "就医服务",
"navigationBarTitleText": "就医咨询",
"enablePullDownRefresh": true
}
},
{
"path": "pages/ServeOrderDetail/ServeOrderDetail",
"style": {
"navigationBarTitleText": "就医服务",
"navigationBarTitleText": "就医咨询",
"enablePullDownRefresh": true
}
},
@ -182,7 +188,7 @@
{
"path": "pages/type/service",
"style": {
"navigationBarTitleText": "就医服务",
"navigationBarTitleText": "就医咨询",
"enablePullDownRefresh": true
}
},
@ -206,7 +212,7 @@
"preloadRule": {},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarTitleText": "四世同堂整合照护平台",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},

@ -15,7 +15,7 @@
</view>
</view>
<view class="search">
<!-- <view class="search">
<view class="search__icon">
<u-icon name="search" size="50" color="#999"></u-icon>
</view>
@ -23,16 +23,15 @@
<u-input :clearable="false" :value="select.keyword" placeholder="请输入要搜索的内容" height="56"
:custom-style="inputStyle" @input="searchInput"></u-input>
</view>
</view>
</view> -->
<view v-if="isShowSticky" class="search-sticky" :style="{
<!-- <view v-if="isShowSticky" class="search-sticky" :style="{
'padding-top': statusBarHeight + 'px',
'padding-right': menuButtonRight + 'px',
}">
<view class="search-sticky__position" @click="isShowSite = true">
<u-icon name="map-fill"></u-icon>
<view>{{ vuex_site.name }}</view>
<!-- <view>{{ vuex_location.city.replace(/(市|区|县)/, "") }}</view>-->
<u-icon name="arrow-down" size="22"></u-icon>
</view>
@ -42,9 +41,9 @@
@input="searchInput"></u-input>
</view>
</view>
</view>
</view> -->
<view class="swiper">
<view class="swiper" style="padding-top:30rpx">
<u-swiper :height="366" :list="banners" name="url"></u-swiper>
</view>
<view class="links-title">
@ -151,7 +150,8 @@
<u-top-tips :navbar-height="navbarHeight" ref="uTips"></u-top-tips>
<tabbar />
<PrivacyPopup />
<PrivacyPopup />
<floatPhone></floatPhone>
</view>
</template>
@ -271,8 +271,8 @@
confirmSite(e) {
this.$u.vuex('vuex_site', e[0])
this.getHospital()
this.getBanner()
this.getPhotos()
// this.getBanner()
// this.getPhotos()
},
goLinks(item) {
if (item.to) {
@ -305,7 +305,7 @@
try {
const res = await this.$u.api.banner({
position: 1,
site_id: this.vuex_site.id ? this.vuex_site.id : '',
// site_id: this.vuex_site.id ? this.vuex_site.id : '',
});
this.banners = res.map((i) => ({
...i,
@ -317,7 +317,7 @@
try {
const res = await this.$u.api.banner({
position: 2,
site_id: this.vuex_site.id ? this.vuex_site.id : '',
// site_id: this.vuex_site.id ? this.vuex_site.id : '',
});
this.photos = res
} catch (err) {}

@ -37,11 +37,18 @@
<image class="tab__icon" mode="aspectFit" src="~@/static/me/peizheng.png"></image>
<view>陪诊订单</view>
</view>
<view class="tab" @click="$u.route({
url: '/package_sub/pages/Shop/Order'
})">
<image class="tab__icon" mode="aspectFit" src="~@/static/me/shangcheng.png"></image>
<view>商城订单</view>
<view class="tab" @click="$u.route({
url: '/package_sub/pages/OrderList/OrderList',
params: {
pay_status: 4
}
})">
<image class="tab__icon" mode="aspectFit" src="~@/static/me/shouhou.png"></image>
<view>陪诊售后</view>
</view>
<view class="tab" @click="$u.throttle($u.route({ url: '/package_sub/pages/UserArchive/UserArchive' }))">
<image class="tab__icon" mode="aspectFit" src="~@/static/me/lianxiren.png"></image>
<view>被服务人</view>
</view>
<!-- <view class="tab"
@click="$u.route({
@ -60,7 +67,15 @@
}
})">
<image class="tab__icon" mode="aspectFit" src="~@/static/me/jujia.png"></image>
<view>就医服务订单</view>
<view>就医咨询</view>
</view>
<view class="tab" @click="$u.route({
url: '/package_sub/pages/Shop/Order'
})">
<image class="tab__icon" mode="aspectFit" src="~@/static/me/shangcheng.png"></image>
<view>商城订单</view>
</view>
<view class="tab" @click="$u.route({
url: '/package_sub/pages/UserAddress/UserAddress'
@ -68,19 +83,6 @@
<image class="tab__icon" mode="aspectFit" src="~@/static/me/dizhi.png"></image>
<view>收货地址</view>
</view>
<view class="tab" @click="$u.throttle($u.route({ url: '/package_sub/pages/UserArchive/UserArchive' }))">
<image class="tab__icon" mode="aspectFit" src="~@/static/me/lianxiren.png"></image>
<view>常用联系人</view>
</view>
<view class="tab" @click="$u.route({
url: '/package_sub/pages/OrderList/OrderList',
params: {
pay_status: 4
}
})">
<image class="tab__icon" mode="aspectFit" src="~@/static/me/shouhou.png"></image>
<view>售后订单</view>
</view>
</view>
<view class="panel panel2">
<button class="row" open-type="share">
@ -91,7 +93,7 @@
<u-icon class="row__icon" name="man-add"></u-icon>
<view>加入我们</view>
</view> -->
<view class="row" @click="isShowModal = true">
<view class="row" @click="makeCall">
<u-icon class="row__icon" name="kefu-ermai"></u-icon>
<view>联系我们</view>
</view>
@ -171,6 +173,17 @@
uni.switchTab({
url: '/pages/order/order'
})
},
makeCall() {
uni.makePhoneCall({
phoneNumber: '0519-81191800', //
success: function () {
console.log('拨打电话成功!')
},
fail: function () {
console.log('拨打电话失败!')
}
})
},
nicknameChange(e) {
this.form.nickname = e.target.value

@ -5,9 +5,10 @@
<u-tabs-swiper :height="76" :font-size="24" active-color="#c20d12" bg-color="transparent"
inactive-color="#999" ref="tabs" :list="tabs" :current="swiperCurrent" @change="change"
:is-scroll="false" :offset="[5, 5]" swiperWidth="750"></u-tabs-swiper>
</view>
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition"
@animationfinish="animationfinish">
</view>
<!-- @transition="transition"
@animationfinish="animationfinish" -->
<swiper class="swiper-box" :current="swiperCurrent" @animationfinish="animationfinish" >
<swiper-item class="swiper-item" v-for="(swiper, swiperIndex) in tabs" :key="swiperIndex">
<scroll-view scroll-y style="height: 100%; width: 100%" @scrolltolower="reachBottom">
<view>
@ -16,14 +17,15 @@
<view class="title__name">
<u-tag size="mini" type="primary" mode="dark" shape="circleLeft"
:text="i.type === 1 ? '陪诊' : '陪护'"></u-tag>
<text style="padding-left: 10rpx;">专享半天陪诊</text>
<text style="padding-left: 10rpx;">{{i.accompany_product?i.accompany_product.name:''}}</text>
</view>
<view class="title__status">{{ statusFormat(i.pay_status) }}</view>
</view>
<view class="price">
<view class="price-icon">
<u-icon :name="i.cover ? i.cover.url : vuex_default_icon" size="30"></u-icon>
<view class="price-icon">
<image style="width:90rpx" mode="widthFix" :src="i.accompany_product?(i.accompany_product.cover?i.accompany_product.cover.url:vuex_default_icon):vuex_default_icon"></image>
<!-- <u-icon :name="" size="30"></u-icon> -->
</view>
<view class="price-text">
@ -34,40 +36,48 @@
</view>
<view class="info" @click.stop.native="$u.route({
url: '/package_sub/pages/AddOrder/AddOrder',
params: {
order_id: i.id,
type: i.type,
site_id: i.hospital.site_id
}
})">
url: '/package_sub/pages/AddOrder/AddOrder',
params: {
order_id: i.id,
type: i.type,
site_id: i.hospital?i.hospital.site_id:''
}
})">
<view class="info__item">
<text>就诊人</text>
<text>{{i.type == 1 ? '被服务人' : '被服务人'}}</text>
<text>{{ i.user_archive ? i.user_archive.name : i.user_archive_id }}</text>
</view>
<view class="info__item">
<text>就诊城市</text>
<text>{{ i.city || ((i.hospital && i.hospital.site) ? i.hospital.site.name : "") || " " }}</text>
</view>
<view class="info__item flex100">
<text>{{(i.type == 1 ? '就诊' : '服务') + '时间'}}</text>
<text>{{ i.time ? $moment(i.time).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
</view>
<view class="info__item" v-if="i.type==2">
<text>详细地址</text>
<text>{{ i.city || " " }}</text>
</view>
<view class="info__item flex100" v-if="i.type==1">
<text>就诊医院</text>
<text>{{ i.hospital ? i.hospital.name : '' }}</text>
</view>
<view class="info__item flex100">
<text>就诊时间</text>
<text>{{ i.time ? $moment(i.time).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
</view>
<view class="info__item flex100">
<text>下单时间 </text>
<text>{{ i.created_at ? $moment(i.created_at).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
</view>
</view>
<view class="bottom">
<view class="row1">
<view class="time">
<text>下单时间 </text>
<text>{{ i.created_at ? $moment(i.created_at).format('YYYY年MM月DD日 HH:mm') : '' }}</text>
</view>
<u-button ripple shape="circle" :custom-style="payBtnStyle"
<view class="row1" style="justify-content: flex-end;">
<u-button v-if="i.pay_status === 0" ripple shape="circle" :custom-style="editBtnStyle"
:throttle-time="2000" @click="$u.route({
url: '/package_sub/pages/AddOrder/editOrder',
params: {
order_id: i.id,
type: i.type,
site_id: i.hospital ? i.hospital.site_id : ''
}
})">修改信息</u-button>
<u-button style="margin-left:20rpx" ripple shape="circle" :custom-style="payBtnStyle"
:throttle-time="2000" @click="$u.route({
url: '/package_sub/pages/AddOrder/AddOrder',
params: {
@ -95,6 +105,7 @@
</view>
<Tabbar />
<floatPhone></floatPhone>
</view>
</template>
@ -105,7 +116,16 @@
Tabbar,
},
data() {
return {
return {
editBtnStyle:{
"background-image": "linear-gradient(-90deg, #ddd 0%, #ccc 94%, #ccc 100%)",
"font-weight": "500",
"font-size": "28rpx",
color: "#fff",
width: "185rpx",
height: "60rpx",
"line-height": "60rpx",
},
payBtnStyle: {
"background-image": "linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%)",
"font-weight": "500",
@ -187,7 +207,8 @@
this.getOrder()
},
// tab
change(index) {
change(index) {
console.log("index",index)
this.swiperCurrent = index;
},
transition({
@ -217,12 +238,16 @@
this.loadStatus[this.swiperCurrent] = 'loading'
const res = await this.$u.api.accompanyOrders(this.select);
console.log(res);
this.tabs[this.swiperCurrent].count = res.total;
this.tabs[0].count = res.pay_status_count_0+res.pay_status_count_1+res.pay_status_count_2+res.pay_status_count_3;
this.tabs[1].count = res.pay_status_count_0;
this.tabs[2].count = res.pay_status_count_1;
this.tabs[3].count = res.pay_status_count_2;
this.tabs[4].count = res.pay_status_count_3;
if (isRefresh) {
this.list[this.swiperCurrent].length = 0;
}
this.list[this.swiperCurrent].push(...res.data)
if (this.list[this.swiperCurrent].length >= res.total) {
this.list[this.swiperCurrent].push(...res.order.data)
if (this.list[this.swiperCurrent].length >= res.order.total) {
this.loadStatus[this.swiperCurrent] = 'nomore'
} else {
this.select.page++;
@ -339,7 +364,7 @@
width: 90rpx;
height: 84rpx;
border-radius: 10rpx;
background-color: #f3e7d8;
// background-color: #f3e7d8;
}
&-text {

Loading…
Cancel
Save