This commit is contained in:
曹辉 2022-12-06 10:08:19 +08:00
parent 7396fbdac8
commit bf87728394
15 changed files with 130 additions and 62 deletions

View File

@ -1,4 +1,5 @@
import request from "../request.js" import request from "../request.js"
// 根据被护理人id查询基本信息 // 根据被护理人id查询基本信息
export function goodPatientInfo(patientId){ export function goodPatientInfo(patientId){
return request({ return request({

View File

@ -187,6 +187,14 @@
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
}, },
{
"path": "pages/menttimeorder/menttimeorder",
"style": {
"navigationBarTitleText": "预约详情",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/homepage/homepage", "path": "pages/homepage/homepage",
"style": { "style": {
@ -292,15 +300,6 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" "navigationBarBackgroundColor": "#ffffff"
} }
}
, {
"path": "pages/menttimeorder/menttimeorder",
"style": {
"navigationBarTitleText": "预约详情",
"enablePullDownRefresh": false
}
}, { }, {
"path": "pages/Geriatricdisease/Geriatricdisease", "path": "pages/Geriatricdisease/Geriatricdisease",
"style": { "style": {

View File

@ -8,7 +8,8 @@
<view class="Apayment" v-for='(item,index) in orderlist' :key="index"> <view class="Apayment" v-for='(item,index) in orderlist' :key="index">
<view class="names">店铺名称 <view class="names">店铺名称
<image class="picture" src="/static/pic.png" mode=""></image> <image class="picture" src="/static/pic.png" mode=""></image>
<span v-if="item.orderStatus=='WAIT_PAY'">待付款</span> <span v-if="item.orderStatus=='WAIT_PAY'&&item.timestamp>0">待付款</span>
<span v-if="item.orderStatus=='WAIT_PAY'&&item.timestamp<=0">订单已关闭</span>
<span v-if="item.orderStatus=='WAIT_REFUND'">退款中</span> <span v-if="item.orderStatus=='WAIT_REFUND'">退款中</span>
<span v-if="item.orderStatus=='CANCEL'">已取消</span> <span v-if="item.orderStatus=='CANCEL'">已取消</span>
<span v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">待收货</span> <span v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">待收货</span>
@ -41,7 +42,8 @@
<view class="anniu"> <view class="anniu">
<view class="logistics" v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'" @tap='gologistics(item)'>查看物流 <view class="logistics" v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'" @tap='gologistics(item)'>查看物流
</view> </view>
<view class="logistics harvest" @tap='buy(item)' v-if="item.orderStatus=='WAIT_PAY'"> <view class="logistics harvest" @tap='buy(item)'
v-if="item.orderStatus=='WAIT_PAY'&&item.timestamp>0">
去支付</view> 去支付</view>
<view class="logistics harvest" @tap='Receipt(item)' v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'"> <view class="logistics harvest" @tap='Receipt(item)' v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
确认收货</view> 确认收货</view>
@ -197,6 +199,12 @@
.goodsName).then( .goodsName).then(
res => { res => {
this.orderlist = res.rows this.orderlist = res.rows
this.orderlist.forEach(e => {
e.timestamp = null
var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
e.timestamp = time - times
})
this.total = res.total this.total = res.total
}) })
}, },
@ -217,7 +225,8 @@
title: this.title, title: this.title,
}); });
}, },
onShow() { onShow() {},
onLoad(options) { //
let that = this let that = this
try { try {
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('patientId');
@ -232,8 +241,6 @@
that.openid = value that.openid = value
} }
} catch (e) {} } catch (e) {}
},
onLoad(options) { //
this.baseurl = baseurl; this.baseurl = baseurl;
if (options.orderStatus) { if (options.orderStatus) {
this.orderStatus = options.orderStatus this.orderStatus = options.orderStatus
@ -252,22 +259,21 @@
if (this.orderlist.length >= this.total) {} else { if (this.orderlist.length >= this.total) {} else {
this.pageNum++; this.pageNum++;
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this
.goodsName).then( .goodsName).then(res => {
res => { res.rows.forEach(e => {
res.rows.forEach(e => { e.timestamp = null
this.orderlist.push(e) var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 24)
}) var times = new Date().getTime() / 1000
this.total = res.total e.timestamp = time - times
this.orderlist.push(e)
}) })
this.total = res.total
})
} }
}, },
onPullDownRefresh() { // onPullDownRefresh() { //
this.pageNum = 1; this.pageNum = 1;
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this.goodsName) this.goodsOrderinfo();
.then(res => {
this.orderlist = res.rows
this.total = res.total
})
setTimeout(function() { setTimeout(function() {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, 1000); }, 1000);

View File

@ -4,7 +4,8 @@
<view class="item" v-for="(item,index) in list" :key="index"> <view class="item" v-for="(item,index) in list" :key="index">
<view class="name"> <view class="name">
{{item.createTime}} {{item.createTime}}
<span>{{item.orderStatus=='WAIT_PAY'?'待付款':''}} <span>{{item.orderStatus=='WAIT_PAY'&&item.timestamp>0?'待付款':''}}
{{item.orderStatus=='WAIT_PAY'&&item.timestamp<=0?'订单已关闭':''}}
{{item.orderStatus=='PAY'?'已付款':''}} {{item.orderStatus=='PAY'?'已付款':''}}
{{item.orderStatus=='WAIT_DISPATCH'?'待服务':''}} {{item.orderStatus=='WAIT_DISPATCH'?'待服务':''}}
{{item.orderStatus=='NOT_FINISH'?'待完成':''}} {{item.orderStatus=='NOT_FINISH'?'待完成':''}}
@ -28,7 +29,7 @@
</view> </view>
</view> </view>
<view class="submit" @tap='buy(item)' style="background-color: darkorange;" <view class="submit" @tap='buy(item)' style="background-color: darkorange;"
v-if="item.orderStatus=='WAIT_PAY'"> v-if="item.orderStatus=='WAIT_PAY'&&item.timestamp>0">
去支付 去支付
</view> </view>
<view class="submit" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;">退款中</view> <view class="submit" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;">退款中</view>
@ -69,7 +70,8 @@
list: [], list: [],
} }
}, },
onShow() { onShow() {},
onLoad() {
this.baseurl = baseurl this.baseurl = baseurl
let that = this let that = this
try { try {
@ -87,7 +89,6 @@
} }
} catch (e) {} } catch (e) {}
}, },
onLoad() {},
methods: { methods: {
// //
// gorate(){ // gorate(){
@ -143,6 +144,12 @@
getinfo() { getinfo() {
appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => { appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => {
this.list = res.rows; this.list = res.rows;
this.list.forEach(e => {
e.timestamp = null
var time = new Date(e.createTime).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
e.timestamp = time - times
})
this.total = res.total this.total = res.total
}) })
}, },
@ -157,6 +164,10 @@
this.pageNum++ this.pageNum++
appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => { appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => {
res.rows.forEach(e => { res.rows.forEach(e => {
e.timestamp = null
var time = new Date(e.createTime).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
e.timestamp = time - times
this.list.push(e) this.list.push(e)
}) })
}) })

View File

@ -4,6 +4,15 @@
font-size: 36rpx; font-size: 36rpx;
padding-top: 10rpx; padding-top: 10rpx;
font-size: 34rpx; font-size: 34rpx;
.time{
height: 80rpx;
width: 95%;
text-align: center;
line-height: 80rpx;
background-color: #fff;
margin: 0 auto 10rpx;
border-radius: 20rpx;
}
.mask{ .mask{
position: absolute; position: absolute;
bottom:0; bottom:0;

View File

@ -1,5 +1,13 @@
<template> <template>
<view class="app"> <view class="app">
<view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0">
剩余付款时间
<u-count-down style='' :timestamp="timestamp">
</u-count-down>
</view>
<view class="OrderStatus" v-if="list.orderStatus=='WAIT_PAY'&&timestamp<=0">
订单已关闭
</view>
<view class="OrderStatus" v-if="list.orderStatus=='REFUNDED'||list.orderStatus=='CANCEL'"> <view class="OrderStatus" v-if="list.orderStatus=='REFUNDED'||list.orderStatus=='CANCEL'">
订单已关闭 订单已关闭
</view> </view>
@ -44,15 +52,17 @@
</view> </view>
</view> </view>
<view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情 <view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情
<span>{{list.consumableTotalPrice}}</span> <span v-if="list.consumableTotalPrice">{{list.consumableTotalPrice}}</span>
<span v-else>0</span>
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index"> <view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
·{{item.orderConsumableName}} ·{{item.orderConsumableName}}
<!-- <span style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/{{item.orderConsumablePrice}}</span> --> <span
style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/{{item.orderConsumablePrice}}</span>
</view> </view>
</view> </view>
<view class="remarks"> <view class="remarks">
<view>备注</view> <view>备注</view>
<input v-model='list.remark'> <input v-model='list.remark' :disabled="list.orderStatus=='PAY'?true :false">
</view> </view>
<view class="evaluate"> <view class="evaluate">
<view class="price"> <view class="price">
@ -65,7 +75,7 @@
v-if="list.orderStatus=='COMPLETE'">评价 v-if="list.orderStatus=='COMPLETE'">评价
</view> </view>
<view class="cancelorder" @tap='buy' style="background-color: darkorange;" <view class="cancelorder" @tap='buy' style="background-color: darkorange;"
v-if="list.orderStatus=='WAIT_PAY'"> v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0">
去支付 去支付
</view> </view>
</view> </view>
@ -104,6 +114,7 @@
list: {}, list: {},
orderNo: '', orderNo: '',
timer: null, timer: null,
timestamp: 0,
} }
}, },
onLoad(options) { onLoad(options) {
@ -226,6 +237,9 @@
getlist() { getlist() {
getAppointmentDetailsInfo(this.orderNo).then(res => { getAppointmentDetailsInfo(this.orderNo).then(res => {
this.list = res.data this.list = res.data
var time = new Date(this.list.createTime).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
this.timestamp = time - times
}) })
}, },
cancelorderment() { cancelorderment() {

View File

@ -1,6 +1,5 @@
<template> <template>
<view class="app"> <view class="app">
<!-- <view class="message">请填写下面的信息</view> -->
<view class="user"> <view class="user">
<view class="item"> <view class="item">
<span>姓名</span> <span>姓名</span>
@ -45,7 +44,7 @@
</text> </text>
</view> </view>
<view class="Consumablespackage">耗材包详情 <view class="Consumablespackage">耗材包详情
<text class="money">{{orderlist.consumableTotalPrice}}</text> <text class="money">{{consumableTotalPrice}}</text>
<view class="detail"> <view class="detail">
<u-checkbox-group @change="checkboxGroupChange" wrap='true'> <u-checkbox-group @change="checkboxGroupChange" wrap='true'>
<u-checkbox @change="checkboxChange(item)" v-model="item.radio" <u-checkbox @change="checkboxChange(item)" v-model="item.radio"
@ -142,6 +141,7 @@
personInfo: {}, // personInfo: {}, //
patientId: null, patientId: null,
useritem: null, //optionsuser useritem: null, //optionsuser
consumableTotalPrice: null, //
orderlist: { orderlist: {
orderCount: 1, orderCount: 1,
patientId: '', patientId: '',
@ -219,6 +219,7 @@
// //
getPatientInfo(stationId, stationItemId, stationItemPriceId) { getPatientInfo(stationId, stationItemId, stationItemPriceId) {
getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => { getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => {
res.data.nurseItemContent = ''
if (res.code == 200) { if (res.code == 200) {
if (res.data.itemConsumableList) { if (res.data.itemConsumableList) {
res.data.itemConsumableList.forEach(e => { res.data.itemConsumableList.forEach(e => {
@ -226,12 +227,14 @@
}) })
} }
this.orderlist = res.data this.orderlist = res.data
this.consumableTotalPrice = res.data.consumableTotalPrice
} }
}) })
}, },
// //
updata() { updata() {
var that = this var that = this
this.orderlist.consumableTotalPrice = null
this.orderlist.orderChannel = 'WECHAT_APPLET' this.orderlist.orderChannel = 'WECHAT_APPLET'
if (this.radio == 1) { if (this.radio == 1) {
this.$refs.uToast.show({ this.$refs.uToast.show({
@ -241,11 +244,13 @@
} else { } else {
this.orderlist.orderCount = 1; this.orderlist.orderCount = 1;
this.orderlist.orderConsumableList = [] this.orderlist.orderConsumableList = []
this.orderlist.itemConsumableList.forEach(e => { if (this.orderlist.itemConsumableList) {
if (e.radio) { this.orderlist.itemConsumableList.forEach(e => {
this.orderlist.orderConsumableList.push(e) if (e.radio) {
} this.orderlist.orderConsumableList.push(e)
}) }
})
}
submitAppointment(this.orderlist).then(res => { submitAppointment(this.orderlist).then(res => {
if (res.code == 500) { if (res.code == 500) {
that.$refs.uToast.show({ that.$refs.uToast.show({
@ -298,7 +303,6 @@
} }
}) })
} }
}, },
changeRadio() { changeRadio() {
if (this.radio == 1) { if (this.radio == 1) {
@ -394,7 +398,7 @@
}, },
goaddress() { goaddress() {
uni.navigateTo({ uni.navigateTo({
url: `/pages/modifyAddress/modifyAddress?url=${'appointmenttime'}&updata=${JSON.stringify(this.orderlist)}` url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.orderlist)}`
}) })
}, },
} }

View File

@ -1,6 +1,11 @@
<template> <template>
<view class="app"> <view class="app">
<view class="OrderStatus" v-if="list.orderStatus=='REFUNDED'||list.orderStatus=='CANCEL'"> <view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0">
剩余付款时间
<u-count-down style='' :timestamp="timestamp">
</u-count-down>
</view>
<view class="OrderStatus" v-if="list.orderStatus=='WAIT_PAY'&&timestamp<=0">
订单已关闭 订单已关闭
</view> </view>
<view class="content"> <view class="content">
@ -44,9 +49,12 @@
</view> </view>
</view> </view>
<view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情 <view class="Consumablespackage" v-if='list.itemConsumableList'>耗材包详情
<span>{{list.consumableTotalPrice}}</span> <span v-if="list.consumableTotalPrice">{{list.consumableTotalPrice}}</span>
<span v-else>0</span>
<view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index"> <view class="detail" v-for='(item,index) in list.itemConsumableList' :key="index">
·{{item.orderConsumableName}} ·{{item.orderConsumableName}}
<span
style='font-size: 30rpx;'>{{item.orderConsumableCount}}{{item.consumableUnit}}/{{item.orderConsumablePrice}}</span>
</view> </view>
</view> </view>
<view class="remarks"> <view class="remarks">
@ -57,12 +65,9 @@
<view class="price"> <view class="price">
{{list.totalPrice}} {{list.totalPrice}}
</view> </view>
<view class="cancelorder" @tap="cancelorderment()"
v-if="list.orderStatus=='PAY'||list.orderStatus=='WAIT_DISPATCH'||list.orderStatus=='NOT_FINISH'">取消订单
</view>
<!-- <view class="cancelorder " style="background: #4C7BC9;">评价</view> --> <!-- <view class="cancelorder " style="background: #4C7BC9;">评价</view> -->
<view class="cancelorder" @tap='buy' style="background-color: darkorange;" <view class="cancelorder" @tap='buy' style="background-color: darkorange;"
v-if="list.orderStatus=='WAIT_PAY'"> v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0">
去支付 去支付
</view> </view>
</view> </view>
@ -86,6 +91,7 @@
openid: '', //id openid: '', //id
list: {}, list: {},
orderNo: '', orderNo: '',
timestamp: 0,
} }
}, },
onLoad(options) { onLoad(options) {
@ -180,11 +186,9 @@
getlist(orderNo) { getlist(orderNo) {
getAppointmentDetailsInfo(orderNo).then(res => { getAppointmentDetailsInfo(orderNo).then(res => {
this.list = res.data this.list = res.data
}) var time = new Date(this.list.createTime).getTime() / 1000 + (60 * 60 * 24)
}, var times = new Date().getTime() / 1000
cancelorderment() { this.timestamp = time - times
uni.navigateTo({
url: `/pages/cancelorder/cancelorder?nurseItemPrice=${this.list.totalPrice}&appointmentOrderId=${this.list.appointmentOrderId}`
}) })
}, },
} }

View File

@ -96,7 +96,6 @@
}, },
onLoad(options) { onLoad(options) {
let that = this let that = this
this.url = options.url
this.updata = JSON.parse(options.updata) this.updata = JSON.parse(options.updata)
this.goodsList() this.goodsList()
this.areaInfo() this.areaInfo()

View File

@ -8,6 +8,18 @@
margin: 0 auto 10rpx; margin: 0 auto 10rpx;
border-radius: 20rpx; border-radius: 20rpx;
} }
.OrderStatus{
text-align: center;
width: 300rpx;
height: 70rpx;
margin: 0 auto;
line-height: 70rpx;
background-color:#4C7BC9 ;
border-radius: 50rpx;
// color: #4C7BC9;
color: #FFFFFF;
border: 1rpx solid #4C7BC9;
}
.buy { .buy {
background: #FFFFFF; background: #FFFFFF;
position: fixed; position: fixed;

View File

@ -1,10 +1,16 @@
<template> <template>
<view class="app" v-if="order"> <view class="app" v-if="order">
<view class="time" style="" v-if="order.orderStatus=='WAIT_PAY'"> <view class="time" style="" v-if="order.orderStatus=='WAIT_PAY'&&timestamp>0">
剩余付款时间 剩余付款时间
<u-count-down style='' :timestamp="timestamp"> <u-count-down style='' :timestamp="timestamp">
</u-count-down> </u-count-down>
</view> </view>
<view class="OrderStatus" v-if="order.orderStatus=='WAIT_PAY'&&timestamp<=0">
订单已关闭
</view>
<view class="OrderStatus" v-if="list.orderStatus=='REFUNDED'||list.orderStatus=='CANCEL'">
订单已关闭
</view>
<!-- <custom-nav nav='To' Url="/pages/CommodityOrder/CommodityOrder" title='商品订单'></custom-nav> --> <!-- <custom-nav nav='To' Url="/pages/CommodityOrder/CommodityOrder" title='商品订单'></custom-nav> -->
<view class="content"> <view class="content">
<view class="name"> <view class="name">
@ -61,7 +67,7 @@
<span v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></span> <span v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></span>
<!-- <span>成交时间<text>2022-10-28 113126</text></span> --> <!-- <span>成交时间<text>2022-10-28 113126</text></span> -->
</view> </view>
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'" @tap='pay'> <view class="buy" v-if="order.orderStatus == 'WAIT_PAY'&&timestamp>0" @tap='pay'>
<view class="pay"> <view class="pay">
去支付 去支付
</view> </view>
@ -84,7 +90,7 @@
baseurl: '', baseurl: '',
order: null, order: null,
patientId: '', patientId: '',
openid:null, openid: null,
orderStatus: '', orderStatus: '',
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,

View File

@ -5,6 +5,9 @@
<u-count-down style='' :timestamp="timestamp"> <u-count-down style='' :timestamp="timestamp">
</u-count-down> </u-count-down>
</view> </view>
<view class="OrderStatus" v-if="order.orderStatus=='WAIT_PAY'&&timestamp<=0">
订单已关闭
</view>
<!-- <custom-nav nav='To' Url="/pages/CommodityOrder/CommodityOrder" title='商品订单'></custom-nav> --> <!-- <custom-nav nav='To' Url="/pages/CommodityOrder/CommodityOrder" title='商品订单'></custom-nav> -->
<view class="content"> <view class="content">
<view class="name"> <view class="name">
@ -61,7 +64,7 @@
<span v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></span> <span v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></span>
<!-- <span>成交时间<text>2022-10-28 113126</text></span> --> <!-- <span>成交时间<text>2022-10-28 113126</text></span> -->
</view> </view>
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'" @tap='pay'> <view class="buy" v-if="order.orderStatus == 'WAIT_PAY'&&timestamp>0" @tap='pay'>
<view class="pay"> <view class="pay">
去支付 去支付
</view> </view>

View File

@ -1,6 +1,6 @@
//护理站列表 //护理站列表
.app{ .app{
padding: 0; padding: 0 0 5rpx 0;
.map{ .map{
padding-top: 100rpx; padding-top: 100rpx;
z-index: 1; z-index: 1;

View File

@ -142,7 +142,8 @@
// this.requestinfo() // this.requestinfo()
}, },
}, },
onShow() { onShow() {},
onLoad() {
var that = this var that = this
try { try {
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('patientId');
@ -227,7 +228,6 @@
} }
} catch (e) {} } catch (e) {}
}, },
onLoad() {},
} }
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -117,9 +117,9 @@
}, },
onShow() { onShow() {
this.baseurl = baseurl this.baseurl = baseurl
this.myInfo()
}, },
onLoad(options) { onLoad(options) {
this.myInfo()
}, },
methods: { methods: {
remove() { remove() {