This commit is contained in:
曹辉 2023-01-12 16:16:36 +08:00
parent 5debd24306
commit c76dc48cd9
29 changed files with 1413 additions and 622 deletions

View File

@ -1,14 +1,14 @@
import request from "../request.js"
// 根据被护理人id查询基本信息
export function goodPatientInfo(patientId){
export function goodPatientInfo(patientId) {
return request({
url: `/nurseApplet/nursingStationGoods/goodPatientInfo?patientId=${patientId}`,
method: 'GET'
})
}
// 新增基本信息
export function addnursingStation(data){
export function addnursingStation(data) {
return request({
url: '/nurseApplet/nursingStationGoods/add',
method: 'POST',
@ -18,7 +18,7 @@ export function addnursingStation(data){
// 修改基本信息
export function updatenursingStation(data){
export function updatenursingStation(data) {
return request({
url: '/nurseApplet/nursingStationGoods/edit',
method: 'POST',
@ -26,7 +26,7 @@ export function updatenursingStation(data){
})
}
// 修改反显
export function nursingStationGoodsinfo(id){
export function nursingStationGoodsinfo(id) {
return request({
url: '/nurseApplet/nursingStationGoods/' + id,
method: 'GET'
@ -35,24 +35,46 @@ export function nursingStationGoodsinfo(id){
// 删除
export function delnursingStation(id) {
return request({
url: '/nurseApplet/nursingStationGoods/' + id,
method: 'delete'
})
return request({
url: '/nurseApplet/nursingStationGoods/' + id,
method: 'delete'
})
}
// 查询
export function getSubordinate(areaCode){
export function getSubordinate(areaCode) {
return request({
url: `/nurseApplet/nursingStationGoods/getSubordinateRegions?areaCode=${areaCode}`,
method: 'GET'
})
}
//区街道list
// //区街道list
// export function getSubordinateRegions(areaCode) {
// return request({
// url: `/nurseApplet/nursingStationGoods/getSubordinateRegions?areaCode=${areaCode}`,
// method: 'GET'
// })
// }
//省list
export function getSubordinateRegions(areaCode) {
return request({
url: `/nurseApplet/login/getRegionAndStreetInfo?areaCode=${areaCode}`,
url: `/nurseApplet/login/getProvinceInfo?areaCode=${areaCode}`,
method: 'GET'
})
}
//市区街道list
export function getSubordinateInfo(id) {
return request({
url: `/nurseApplet/login/getSubordinateInfo?areaCode=${id}`,
method: 'GET'
})
}
//默认地址
export function updateDefaultAddress(data) {
return request({
url: `/nurseApplet/nursingStationGoods/updateDefaultAddress`,
method: 'POST',
data
})
}

9
api/order/index.js Normal file
View File

@ -0,0 +1,9 @@
import request from "../request.js"
export function orderCount(patientId) {
return request({
url: `/nurseApp/login/orderCount?patientId=${patientId}`,
method: 'GET'
})
}

View File

@ -9,14 +9,20 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},{
}, {
"path": "pages/modifyAddress/modifyAddress",
"style": {
"navigationBarTitleText": "修改地址",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
"navigationBarBackgroundColor": "#ffffff", //
"enablePullDownRefresh": true //true
}
}, {
"path": "pages/information/information",
"style": {
"navigationBarTitleText": "完善个人信息",
"navigationBarBackgroundColor": "#ffffff", //
"enablePullDownRefresh": false
}
},
{
"path": "pages/lookrate/lookrate",
@ -64,13 +70,6 @@
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
}
}, {
"path": "pages/information/information",
"style": {
"navigationBarTitleText": "完善个人信息",
"navigationBarBackgroundColor": "#ffffff", //
"enablePullDownRefresh": false
}
}, {
"path": "pages/appointmenttime/appointmenttime",
"style": {
@ -333,7 +332,7 @@
"navigationBarBackgroundColor": "#ffffff"
}
}
],
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",

View File

@ -9,7 +9,7 @@
暂无
</view>
<view class="price">
{{goodsPrice}}
{{goodsPrice}}
</view>
</view>
<view class="choice common" @tap="buyshow=true">
@ -59,7 +59,7 @@
<view class="PurchasePage" @click.stop=''>
<image class="close" src="../../static/gb.png" mode="" @tap='buyshow=false'></image>
</image>
<view class="topcontent">
<view class="topcontent" style="width: 96%;">
<view class="image">
<image :src="updata.img" mode=""></image>
</view>
@ -76,31 +76,70 @@
库存数量:{{updata.goodsStock}}
</view>
</view>
<view class="centercontent topcontent" v-show="goodshow">
<view class="header">
商品规格
</view>
<view v-for="(item,index) in goodDetailsLists"
:class="item.isActive ? 'Productmodel':'productmodel'" @tap='isActivegoods(item)'>
{{item.attributeDetailsName}}
</view>
</view>
<!-- <view class="centercontent topcontent" v-for="(item,index) in goodDetailsLists">
<view class="header">
{{item.attributeName}}
</view>
<view v-for="bitem in item.goodAttributeDetailsLists" :key="bitem.attributeDetailsId"
:class="bitem.isActive ? 'Productmodel':'productmodel'" @tap='isActivegoods(item,bitem)'>
{{bitem.attributeDetailsName}}
</view>
</view> -->
<view class="bottomcontent topcontent">
<view class="header">
数量
</view>
<view class="number">
<u-number-box :min="1" :max="updata.goodsStock" v-model="updata.goodsCount"></u-number-box>
</view>
<view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll">
<view class="bodys" @tap='upaddress()'>
<view class="addressinfo">
<image src="../../static/locatinsmall.png" mode=""></image>
<view class="namephone" v-if='userid'>
{{updata.receiver}},{{updata.phone}}
</view>
<view class="address" v-if='userid'>
{{updata.receiveAddress}}
</view>
<view class="namephone" v-else>
前往完善个人信息
</view>
<view class="picture2">
<u-icon name="arrow-right" color="black" size="28"></u-icon>
</view>
</view>
</view>
<view class="centercontent topcontent" v-show="goodshow">
<view class="header">
商品规格
</view>
<view class="" style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<view v-for="(item,index) in goodDetailsLists"
:class="item.isActive ? 'Productmodel':'productmodel'" @tap='isActivegoods(item)'>
<image :src="item.attributePitureUrl" mode=""></image>
<view class="">
{{item.attributeDetailsName}}
</view>
</view>
</view>
</view>
<!-- <view class="centercontent topcontent" v-for="(item,index) in goodDetailsLists">
<view class="header">
{{item.attributeName}}
</view>
<view v-for="bitem in item.goodAttributeDetailsLists" :key="bitem.attributeDetailsId"
:class="bitem.isActive ? 'Productmodel':'productmodel'" @tap='isActivegoods(item,bitem)'>
{{bitem.attributeDetailsName}}
</view>
</view> -->
<view class="bottomcontent topcontent">
<view class="header">
数量
</view>
<view class="number">
<u-number-box :min="1" :max="updata.goodsStock" v-model="updata.goodsCount">
</u-number-box>
</view>
</view>
<view class="" style="height: 230rpx;">
<view class="bottomcontent topcontent" style="padding-bottom: 0;">
<view class="header">
支付方式
</view>
<view class="chat">
<image src="/static/chat.png" mode=""></image>
<span>微信支付</span>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="buy" @tap="tapbuy">
立即购买
@ -136,6 +175,10 @@
goodPatientInfo
} from '@/api/modifyAddress/modifyAddress.js';
import baseurl from '@/api/baseurl.js'
import {
addStationGoodsOrder,
appletGoodsOrderPay
} from '@/api/confirmOrder/index.js'
export default {
data() {
return {
@ -150,6 +193,7 @@
goodshow: true, //
buyshow: false, //
info: [], //list
goodsAttributeId: null, //id
updata: { //
goodsPrice: 0.00,
goodsName: "",
@ -172,10 +216,20 @@
attributeDetailsId: '', //id
goodsAttributeId: '',
goodsAttributeDetailsId: '',
}
},
scrollTop: 0,
old: {
scrollTop: 0
},
userid: null,
};
},
methods: {
upper: function(e) {},
lower: function(e) {},
scroll: function(e) {
this.old.scrollTop = e.detail.scrollTop
},
//
goinformation() {
this.usershow = false
@ -185,84 +239,128 @@
},
//
tapbuy() {
let that = this
var that = this
try {
const value = uni.getStorageSync('openid');
if (value) {
const value2 = uni.getStorageSync('patientId');
if (value2) {
if (!that.updata.patientId) {
that.goodsList()
}
that.updata.patientId = value2
AppIdentification(value2).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {
if (that.goodshow == true) {
if (that.updata.goodsAttributeName == '') {
that.$refs.uToast.show({
title: '未选择商品',
type: 'error'
})
} else if (that.updata.goodsStock == 0) {
that.$refs.uToast.show({
title: '库存数量不足,无法购买',
type: 'error'
})
} else {
that.buyshow = false
that.updata.totalPrice = (that.updata.goodsPrice * that.updata
.goodsCount).toFixed(
2)
uni.navigateTo({
url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
})
}
} else {
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
that.updata.patientId = value2
AppIdentification(value2).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {
if (this.goodshow == true) {
if (this.updata.goodsAttributeName == '') {
that.$refs.uToast.show({
title: '未选择商品',
type: 'error'
})
// that.buyshow = false
// uni.navigateTo({
// url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
// })
} else if (this.updata.goodsStock == 0) {
that.$refs.uToast.show({
title: '库存数量不足,无法购买',
type: 'error'
})
} else {
this.buyshow = false
this.updata.totalPrice = (this.updata.goodsPrice * this.updata
.goodsCount).toFixed(
2)
addStationGoodsOrder(this.updata).then(res => {
if (res.code == 500) {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
} else {
let id = res.data.id
let paydata = res.data
paydata.openid = value
paydata.payType = "WECHAT_PAY"
paydata.paymentPrice = res.data.totalPrice
appletGoodsOrderPay(paydata).then(response => {
if (response.code == 200) {
uni.requestPayment({
timeStamp: response
.data.timeStamp,
nonceStr: response.data
.nonceStr,
package: response.data
.prepayId,
signType: response.data
.signType,
paySign: response.data
.paySign,
success: function(
res) {
that.goodsDetailsinfo(
that
.goodsInfoId
)
that.$refs
.uToast
.show({
title: '支付成功',
type: 'success',
duration: 1000,
url: '/pages/paysuccess/paysuccess'
})
},
fail: function(err) {
that.goodsDetailsinfo(
that
.goodsInfoId
)
that.$refs
.uToast
.show({
title: '取消支付',
type: 'error',
duration: 1000,
url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
})
// uni.navigateTo({
// url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
// })
}
});
} else {
that.$refs.uToast.show({
title: response.msg,
type: 'error',
duration: 1000
})
}
})
}
})
}
} else {
that.buyshow = false
that.usershow = true
}
} else if (res.code == 9999) {
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
that.$refs.uToast.show({
title: '未选择商品',
type: 'error'
})
}, 1500)
// that.buyshow = false
// uni.navigateTo({
// url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
// })
}
} else {
this.usershow = true
}
})
} else {
that.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
} else if (res.code == 9999) {} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
}, 1500)
}
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 1500)
}
})
} else {
that.$refs.uToast.show({
title: '未登录,请先登录',
@ -281,26 +379,28 @@
},
//
isActivegoods(item) {
this.updata.goodsPrice = 0
this.updata.goodsAttributeName = ''
if (item.isActive == true) {
this.goodDetailsLists.forEach(e => {
e.isActive = false
})
this.updata.goodsAttributeName = ''
this.updata.goodsPrice = 0
this.updata.attributeDetailsId = ''
this.updata.goodsStock = 0
this.updata.img = this.image
// this.updata.goodsPrice = 0
// this.updata.goodsAttributeName = ''
// this.goodDetailsLists.forEach(e => {
// e.isActive = false
// })
// this.updata.goodsAttributeName = ''
// this.updata.goodsPrice = 0
// this.updata.attributeDetailsId = ''
// this.updata.goodsStock = 0
// this.updata.img = this.image
} else {
this.goodDetailsLists.forEach(e => {
e.isActive = false
})
item.isActive = true
this.goodsAttributeId = item.goodsAttributeId
this.updata.img = item.attributePitureUrl
this.updata.goodsAttributeName = item.attributeDetailsName
this.updata.goodsPrice = item.goodsPrice
this.updata.goodsPrice = this.updata.goodsPrice.toFixed(2)
this.goodsPrice = this.updata.goodsPrice
this.updata.attributeDetailsId = item.attributeDetailsId
this.updata.goodsStock = item.goodsStock
this.updata.goodsAttributeId = item.goodsAttributeId
@ -311,32 +411,23 @@
goodsDetailsinfo(goodsInfoId) {
let that = this
goodsDetails(goodsInfoId).then(res => {
if (res.code == 200) {
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.updata.patientId = value
that.goodsList()
} else {}
} catch (e) {}
}
uni.removeStorageSync('Refresh');
if (res.data[0].goodsRemark) {
res.data[0].goodsRemark = res.data[0].goodsRemark.replace(/\<img/gi,
if (res.data.goodsRemark) {
res.data.goodsRemark = res.data.goodsRemark.replace(/\<img/gi,
"<br/> <img class='richPic'")
}
res.data[0].goodsPictureUrl = this.baseurl + res.data[0].goodsPictureUrl
this.image = res.data[0].goodsPictureUrl
res.data.goodsPictureUrl = this.baseurl + res.data.goodsPictureUrl
this.image = res.data.goodsPictureUrl
var obj = {
image: res.data[0].goodsPictureUrl,
image: res.data.goodsPictureUrl,
}
this.info.push(obj)
if (res.data[0].goodDetailsLists == null) {
if (res.data.goodAttributeDetailsLists == null) {
this.goodshow = false
} else if (res.data[0].goodDetailsLists.length == 0) {
} else if (res.data.goodAttributeDetailsLists.length == 0) {
this.goodshow = false
} else {
res.data[0].goodDetailsLists.forEach(e => {
res.data.goodAttributeDetailsLists.forEach(e => {
e.attributePitureUrl = this.baseurl + e.attributePitureUrl
e.isActive = false
var objs = {
@ -344,47 +435,132 @@
}
this.info.push(objs)
})
this.goodDetailsLists = res.data[0].goodDetailsLists
this.goodDetailsLists = res.data.goodAttributeDetailsLists
this.goodshow = true
}
this.goodsDetailslist = res.data[0]
this.goodsDetailslist = res.data
this.updata.goodsName = this.goodsDetailslist.goodsName
this.updata.nurseStationId = this.goodsDetailslist.nurseStationId
this.updata.img = res.data[0].goodsPictureUrl
this.updata.goodsAttributeName = ''
this.updata.goodsPrice = 0
this.updata.attributeDetailsId = ''
this.updata.goodsStock = 0
this.updata.img = this.image
if (this.goodDetailsLists.length == 1) {
this.goodDetailsLists[0].isActive = true
this.updata.img = this.goodDetailsLists[0].attributePitureUrl
this.updata.goodsAttributeName = this.goodDetailsLists[0].attributeDetailsName
this.updata.goodsPrice = this.goodDetailsLists[0].goodsPrice
this.updata.goodsPrice = this.updata.goodsPrice.toFixed(2)
this.updata.attributeDetailsId = this.goodDetailsLists[0].attributeDetailsId
this.updata.goodsStock = this.goodDetailsLists[0].goodsStock
this.updata.goodsAttributeId = this.goodDetailsLists[0].goodsAttributeId
this.updata.goodsAttributeDetailsId = this.goodDetailsLists[0].attributeDetailsId
} else {
var list = {}
this.goodsDetailslist.goodAttributeDetailsLists.forEach(e => {
if (e.goodsAttributeId == this.goodsAttributeId) {
list = e
e.isActive = true
this.updata.goodsAttributeId = e.goodsAttributeId
this.updata.goodsAttributeDetailsId = e.attributeDetailsId
}
})
this.updata.img = list.attributePitureUrl
this.updata.goodsAttributeName = list.attributeDetailsName
this.updata.goodsPrice = list.goodsPrice
this.updata.attributeDetailsId = list.attributeDetailsId
this.updata.goodsStock = list.goodsStock
this.updata.img = list.attributePitureUrl
}
// this.updata.nurseStationId = this.goodsDetailslist.nurseStationId
// this.updata.img = res.data.goodsPictureUrl
// this.updata.goodsAttributeName = ''
// this.updata.goodsPrice = 0
// this.updata.attributeDetailsId = ''
// this.updata.goodsStock = 0
// this.updata.img = list.image
})
},
//
upaddress() {
if (this.updata.receiver) {
uni.navigateTo({
url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.updata)}`
})
} else {
uni.navigateTo({
url: '/pages/information/information'
})
}
},
//
goodsList() {
goodPatientInfo(this.updata.patientId).then(res => {
res.data.forEach(e => {
e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
.receiveAddress
})
this.updata.receiver = res.data[0].receiveName
this.updata.receiveAddress = res.data[0].address
this.updata.phone = res.data[0].receivePhone
// res.data.forEach(e => {
// e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
// .receiveAddress
// })
var list = res.data.filter(e => e.defaultAddressFlag == 1)
if (list.length >= 1) {
this.updata.receiver = list[0].receiveName
this.updata.receiveAddress = list[0].areaName + list[0].receiveAddress
this.updata.phone = list[0].receivePhone
this.userid = list[0].id
} else {
this.updata.receiver = res.data[0].receiveName
this.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
this.updata.phone = res.data[0].receivePhone
this.userid = res.data[0].id
}
})
},
},
onLoad(options) { //
console.log(options)
var that = this
this.goodsPrice = options.goodsPrice //
this.goodsAttributeId = options.goodsAttributeId
this.updata.buySource = options.buySource
if (options.goodsPrice == 'null' || !options.goodsPrice) {
this.goodsPrice = 0 //
} else {
this.goodsPrice = options.goodsPrice //
}
this.goodsInfoId = options.goodsInfoId
const value = uni.getStorageSync('patientId');
if (value) {
that.updata.patientId = value
that.goodsList()
} else {}
},
onShow() {
var that = this
this.baseurl = baseurl
this.usershow = false
this.goodsDetailsinfo(this.goodsInfoId)
goodPatientInfo(this.updata.patientId).then(res => {
var user = res.data.filter(e => e.id == this.userid)
if (user.length >= 1) {
// user[0].address = user[0].provinceName + user[0].cityName + user[0].regionName + user[0]
// .streetName + user[0].receiveAddress
this.updata.receiver = user[0].receiveName
this.updata.receiveAddress = user[0].areaName + user[0].receiveAddress
this.updata.phone = user[0].receivePhone
this.userid = user[0].id
} else {
// res.data.forEach(e => {
// e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
// .receiveAddress
// })
this.updata.receiver = res.data[0].receiveName
// this.updata.receiveAddress = res.data[0].address
this.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
this.updata.phone = res.data[0].receivePhone
this.userid = res.data[0].id
}
})
let useritem = null
uni.$on('updata', function(data) {
that.updata = JSON.parse(data.updata)
if (data.useritem) {
useritem = JSON.parse(data.useritem)
that.updata.receiver = useritem.receiveName
that.updata.phone = useritem.receivePhone
// that.updata.receiveAddress = useritem.address
that.updata.receiveAddress = useritem.areaName + useritem.receiveAddress
that.userid = useritem.id
}
})
},
//1.
onShareAppMessage(res) {

View File

@ -1,6 +1,9 @@
.app {
padding: 0;
.scroll-Y {
height: 790rpx;
background-color: #F4F5F7;
}
.mask {
.information {
width: 70%;
@ -50,25 +53,71 @@
.PurchasePage {
position: fixed;
bottom: 0;
height: 1150rpx;
width: 100%;
background: #FFFFFF;
border-radius: 30rpx 30rpx 0px 0px;
font-size: 36rpx;
padding-bottom: 20rpx;
.bodys {
background-color: #FFFFFF;
width: 96%;
margin: 10rpx auto 0;
border-radius: 20rpx;
padding: 15rpx 0 20rpx;
position: relative;
.addressinfo {
font-size: 32rpx;
line-height: 65rpx;
margin-left: 90rpx;
image{
width: 40rpx;
height: 50rpx;
position: absolute;
top:50%;
left:20rpx;
transform: translateY(-50%);
}
.address{
padding-top: 10rpx;
width:92%;
font-size: 30rpx;
word-break:break-all;
line-height: 45rpx;
}
.namephone{
width: 70%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.picture2 {
position: absolute;
top:50%;
right:20rpx;
transform: translateY(-50%);
image {
width: 18rpx;
height: 18rpx;
color: #FFFFFF;
margin-left: 20rpx;
}
}
}
}
.close {
width: 31rpx;
height: 31rpx;
position: absolute;
top: 2%;
right: 2%;
z-index: 999;
}
.topcontent {
width: 90%;
width: 96%;
margin: 0 auto;
padding-bottom: 24rpx;
border-bottom: 1rpx solid #D8D4D4;
padding-bottom: 15rpx;
position: relative;
.goodsStock{
font-size: 24rpx;
@ -86,7 +135,7 @@
.title {
font-size: 36rpx;
position: absolute;
top: 0%;
top: 3%;
left: 38%;
font-weight: 600;
width: 58%;
@ -100,11 +149,9 @@
}
.image {
width: 215rpx;
height: 215rpx;
background: rgba(150, 147, 148, 0.21);
margin: 35rpx 0 0 0;
width: 200rpx;
height: 200rpx;
margin: 15rpx 0 0 0;
image {
width: 201rpx;
height: 201rpx;
@ -122,16 +169,41 @@
text-align: center;
line-height: 71rpx;
border-radius: 26rpx;
margin: 40rpx 0 0 20%;
position: absolute;
bottom:30rpx;
left:20%;
}
.bottomcontent {
margin-top: 34rpx;
padding-bottom: 35rpx;
margin-top: 10rpx;
padding: 35rpx 0;
background-color: #FFFFFF;
border-radius: 15rpx;
.chat {
height: 130rpx;
position: relative;
span {
font-size: 30rpx;
position: absolute;
left:130rpx;
top:50%;
transform: translateY(-50%);
}
image {
position: absolute;
left:30rpx;
top:50%;
transform: translateY(-50%);
width: 65rpx;
height: 55rpx;
}
}
.header {
font-size: 32rpx;
display: inline-block;
vertical-align: middle;
margin-left: 17rpx;
}
.number {
@ -142,35 +214,54 @@
}
.centercontent {
margin-top: 34rpx;
font-size: 36rpx;
font-size: 32rpx;
background-color: #FFFFFF;
margin-top: 10rpx;
padding-top: 20rpx;
border-radius: 20rpx;
.header {
margin-bottom: 20rpx;
margin-left: 17rpx;
}
.productmodel {
font-size: 24rpx;
display: inline-block;
height: 60rpx;
border: 1rpx solid #D8D4D4;
line-height: 60rpx;
border-radius: 25rpx;
text-align: center;
padding: 0 15rpx;
margin: 15rpx 15rpx 0 0;
border: 4rpx solid #FFFFFF;
}
.Productmodel {
font-size: 24rpx;
display: inline-block;
height: 60rpx;
background: #ECF1FA;
border: 1rpx solid #4C7BC9;
line-height: 60rpx;
border-radius: 25rpx;
border: 4rpx solid #4C7BC9;
color: #4C7BC9;
}
.productmodel,.Productmodel{
background-color: #F6F6F6;
height: 300rpx;
text-align: center;
padding: 0 15rpx;
margin: 15rpx 15rpx 0 0;
width:30%;
font-size: 24rpx;
border-radius: 10rpx;
margin: 5rpx 1.5% 10rpx;
padding: 0 0 10rpx;
view{
background-color: #F6F6F6;
margin: 10rpx auto;
width: 98%;
// height: 90rpx;
border-radius: 10rpx;
font-size: 24rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
image{
border-radius: 10rpx;
width: 100%;
height: 200rpx;
}
}
}
}

View File

@ -8,8 +8,7 @@
<view class="Apayment" v-for='(item,index) in orderlist' :key="index">
<view class="names">店铺名称
<image class="picture" src="/static/pic.png" mode=""></image>
<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_PAY'">待付款</span>
<span v-if="item.orderStatus=='WAIT_REFUND'">退款中</span>
<span v-if="item.orderStatus=='CANCEL'">已取消</span>
<span v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">待收货</span>
@ -45,8 +44,7 @@
</view>
<view class="logistics" v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'" @tap='gologistics(item)'>查看物流
</view>
<view class="logistics harvest" @tap='buy(item)'
v-if="item.orderStatus=='WAIT_PAY'&&item.timestamp>0">
<view class="logistics harvest" @tap='buy(item)' v-if="item.orderStatus=='WAIT_PAY'">
去支付</view>
<view class="logistics harvest" @tap='Receipt(item)' v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
确认收货</view>
@ -175,7 +173,7 @@
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
toast: 1500,
duration: 1500,
url: `/pages/paysuccess/paysuccess`,
})
},
@ -183,7 +181,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
toast: 1500,
duration: 1500,
})
}
});
@ -191,7 +189,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
toast: 2000
duration: 2000
})
}
})
@ -221,12 +219,12 @@
res => {
if (res.code == 200) {
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.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
// })
uni.removeStorageSync('Refresh');
this.total = res.total
}
@ -304,10 +302,10 @@
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this
.goodsName).then(res => {
res.rows.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
// 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.orderlist.push(e)
})
this.total = res.total

View File

@ -4,8 +4,7 @@
<view class="item" v-for="(item,index) in list" :key="index">
<view class="name">
{{item.createTime}}
<span>{{item.orderStatus=='WAIT_PAY'&&item.timestamp>0?'待付款':''}}
{{item.orderStatus=='WAIT_PAY'&&item.timestamp<=0?'订单已关闭':''}}
<span>{{item.orderStatus=='WAIT_PAY'?'待付款':''}}
{{item.orderStatus=='PAY'?'已付款':''}}
{{item.orderStatus=='WAIT_DISPATCH'?'待服务':''}}
{{item.orderStatus=='NOT_FINISH'?'待完成':''}}
@ -29,7 +28,7 @@
</view>
</view>
<view class="submit" @tap='buy(item)' style="background-color: darkorange;"
v-if="item.orderStatus=='WAIT_PAY'&&item.timestamp>0">
v-if="item.orderStatus=='WAIT_PAY'">
去支付
</view>
<view class="submit" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;">退款中</view>
@ -214,7 +213,7 @@
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
toast: 1500,
duration: 1500,
url: `/pages/paysuccess/paysuccess`,
})
},
@ -222,7 +221,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
toast: 1500,
duration: 1500,
})
}
});
@ -230,7 +229,7 @@
this.$refs.uToast.show({
title: response.msg,
type: 'error',
toast: 2000
duration: 2000
})
}
})
@ -240,12 +239,12 @@
if (res.code == 200) {
uni.removeStorageSync('Refresh');
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.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
}
})
@ -261,10 +260,10 @@
this.pageNum++
appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => {
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
// 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)
})
})

View File

@ -68,26 +68,28 @@
var that = this
try {
const value = uni.getStorageSync('openid');
if (value) {
const value2 = uni.getStorageSync('patientId');
if (value2) {
uni.navigateTo({
url: '/pages/order/order'
})
} else {
uni.navigateTo({
url: '/pages/login/login'
})
}
} else {
uni.navigateTo({
url: '/pages/login/login'
const value3 = uni.getStorageSync('token');
var that = this
if (value && value3) {
existPatientInfo(value).then(res => {
if (res.code == 200 && res.msg == 'LOGIN') {
const value2 = uni.getStorageSync('patientId');
if (value2) {
uni.navigateTo({
url: '/pages/order/order'
})
} else {
that.remove()
}
} else {
that.remove()
}
})
} else {
that.remove()
}
} catch (e) {
uni.navigateTo({
url: '/pages/login/login'
})
} catch {
that.remove()
}
},
//

View File

@ -10,6 +10,9 @@
<view class="title">
{{item.goodsName}}
</view>
<view class="text">
{{item.attributeDetailsName}}
</view>
<view class="price">
{{item.goodsPrice}}
</view>
@ -95,7 +98,7 @@
//
goCommodityDetails(item) {
uni.navigateTo({
url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'SHOPPING_MALL'}`
url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'SHOPPING_MALL'}&goodsAttributeId=${item.goodsAttributeId}`
})
},
},
@ -218,23 +221,37 @@
margin-bottom: 40rpx;
.price {
font-size: 42rpx;
font-size: 36rpx;
color: #D43953;
line-height: 79rpx;
padding-left: 20rpx;
padding-left: 15rpx;
}
.text {
font-size: 24rpx;
padding: 0 15rpx;
// text-overflow: ellipsis;
// overflow: hidden;
// white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.title {
font-size: 39rpx;
font-size: 36rpx;
color: #000000;
line-height: 69rpx;
padding-left: 20rpx;
padding-left: 15rpx;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
image {
border-radius: 25rpx 25rpx 0 0 ;
width: 100%;
height: 340rpx;
}

View File

@ -4,6 +4,59 @@
font-size: 36rpx;
padding-top: 10rpx;
font-size: 34rpx;
.masks{
image{
position: absolute;
bottom:380rpx;
left:50%;
transform: translateX(-50%);
z-index: 999;
width: 250rpx;
border-radius: 25rpx;
height: 250rpx;
}
.ratetitle{
font-size: 34rpx;
position: absolute;
bottom:320rpx;
left:50%;
transform: translateX(-50%);
z-index: 999;
}
.mask{
position: absolute;
bottom:0;
width: 750rpx;
height: 703rpx;
background: #FFFFFF;
border-radius: 30rpx 30rpx 0px 0px;
display: flex;
justify-content: space-around;
.rateitem{
margin-top:200rpx;
width: 217rpx;
height: 222rpx;
line-height: 222rpx;
text-align: center;
color: #ffffff;
background: #BFBFBF;
font-size: 40rpx;
border-radius: 25rpx;
}
.lookrateitem{
font-size: 32rpx;
margin-top:440rpx;
width: 200rpx;
height: 200rpx;
line-height: 200rpx;
text-align: center;
color: #ffffff;
background: #BFBFBF;
border-radius: 25rpx;
}
}
}
.time{
height: 80rpx;
width: 95%;

View File

@ -1,13 +1,10 @@
<template>
<view class="app" v-if="list">
<view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0">
<view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'">
剩余付款时间
<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>
@ -75,10 +72,11 @@
v-if="list.orderStatus=='COMPLETE'">立即评价
</view>
<view class="cancelorder" @tap='buy' style="background-color: darkorange;"
v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0">
v-if="list.orderStatus=='WAIT_PAY'">
去支付
</view>
<view class="cancelorder" style="background: #4C7BC9;" v-if="list.orderStatus=='EVALUATED'">查看评价</view>
<view class="cancelorder" style="background: #4C7BC9;" v-if="list.orderStatus=='EVALUATED'"
@tap='lookrate(list)'>查看评价</view>
</view>
<u-mask :show="rateshow" @tap="rateshow = false">
<view class="mask">
@ -93,6 +91,24 @@
</view>
</view>
</u-mask>
<u-mask :show="lookrateshow" @tap="lookrateshow = false" class='masks'>
<image :src="baseurl+rateimgtitle.img" mode=""></image>
<view class="ratetitle">
{{rateimgtitle.title}}
</view>
<view class="mask">
<view class="lookrateitem" :style="ratelist.evaluateSatisfaction=='SATISFIED'?'background: #4C7BC9':''">
满意
</view>
<view class="lookrateitem" :style="ratelist.evaluateSatisfaction=='COMMONLY'?'background: #4C7BC9':''">
一般
</view>
<view class="lookrateitem"
:style="ratelist.evaluateSatisfaction=='DISSATISFIED'?'background: #4C7BC9':''">
不满意
</view>
</view>
</u-mask>
<u-toast ref="uToast" />
</view>
</template>
@ -105,6 +121,9 @@
getAppointmentDetailsInfo,
addAppointmentEvaluate
} from '@/api/ServiceDetails/ServiceDetails.js'
import {
lookrate
} from '@/api/lookrate/index.js'
export default {
data() {
return {
@ -116,6 +135,12 @@
orderNo: '',
timer: null,
timestamp: 0,
lookrateshow: false, //
ratelist: null,
rateimgtitle: {
img: null,
title: null,
},
}
},
onShow() {
@ -136,6 +161,16 @@
this.getlist()
},
methods: {
//
lookrate(item) {
console.log(item)
this.rateimgtitle.img = item.itemPictureUrl
this.rateimgtitle.title = item.nurseItemName
lookrate(item.orderNo).then(res => {
this.ratelist = res.data
this.lookrateshow = true
})
},
//
buy() {
let obj = {
@ -162,7 +197,7 @@
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
toast: 1500,
duration: 1500,
url: `/pages/paysuccess/paysuccess?delta=${3}`
})
},
@ -170,7 +205,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
toast: 1500,
duration: 1500,
})
}
});
@ -178,12 +213,11 @@
this.$refs.uToast.show({
title: response.msg,
type: 'error',
toast: 2000
duration: 2000
})
}
})
},
//
taprate(item) {
var obj = {
@ -221,7 +255,6 @@
},
//
gophone() {
console.log(this.list)
var that = this
uni.getSystemInfo({
success: function(res) {
@ -249,7 +282,8 @@
getlist() {
getAppointmentDetailsInfo(this.orderNo).then(res => {
this.list = res.data
var time = new Date(this.list.createTime).getTime() / 1000 + (60 * 60 * 24)
var ordertimes = this.list.createTime.replaceAll(/\-/gi, "/")
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
this.timestamp = time - times
})

View File

@ -201,13 +201,9 @@
//
getAppPatientList(that.patientId).then(response => {
that.personInfo = response.data
that.personInfo.address = response.data.provinceName + response.data
.cityName + response.data.regionName + response.data.streetName +
response.data.address
that.personInfo.address = response.data.areaName + response.data.address
that.orderlist.patientId = response.data.patientId
that.orderlist.serviceAddress = response.data.provinceName + response.data
.cityName + response.data.regionName + response.data.streetName +
response.data.address
that.orderlist.serviceAddress = response.data.areaName + response.data.address
})
}
} catch (e) {}
@ -275,7 +271,7 @@
that.$refs.uToast.show({
title: '预约成功',
type: 'success',
toast: 1500,
duration: 1500,
url: `/pages/paysuccess/paysuccess`
})
},
@ -283,7 +279,7 @@
that.$refs.uToast.show({
title: '取消预约',
type: 'error',
toast: 1500,
duration: 1500,
url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}`
})
}
@ -292,7 +288,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
toast: 2000
duration: 2000
})
}
})

View File

@ -142,7 +142,7 @@
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
toast: 1500,
duration: 1500,
url: '/pages/paysuccess/paysuccess'
})
},
@ -150,7 +150,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
toast: 1500,
duration: 1500,
url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
})
// uni.navigateTo({
@ -162,7 +162,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
toast: 2000
duration: 2000
})
}
})

View File

@ -1,6 +1,9 @@
.app {
padding:0;
height:100vh;
/deep/ .u-drawer{
z-index: 0 !important;
}
.Agreement{
width: 100%;
background-color: #F4F5F7;

View File

@ -15,7 +15,7 @@
<span>身份证号:</span>
<u-input :clearable='false' v-model="query.cardNo" type="text" placeholder='请输入' maxlength='18' />
</view>
<view class="item" @tap='areashow=true'>
<view class="item" @tap='showPicker'>
<span>所属区域:</span>
<view class="address">{{address}}</view>
</view>
@ -25,14 +25,19 @@
</view>
<view class="item" @tap='getAddress()'>
<span>所在位置:</span>
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{chooseLocation}}
<view class="address" style="">
{{query.locationName}}
</view>
<!-- <u-input type="text" placeholder='' /> -->
</view>
</view>
<u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
:list="arealist" @confirm="areaconfirm"></u-select>
<!-- <u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
:list="arealist" @confirm="areaconfirm"></u-select> -->
<view class="">
<m-city style='z-index: 10076;' :provinceData="list" headTitle="地区选择" ref="cityPicker"
@funcValue="getpickerParentValue" pickerSize="4">
</m-city>
</view>
<view class="info">
<view class="service">
<view class="title">
@ -92,17 +97,27 @@
information
} from '@/api/information/index.js'
import contenttext from './text.vue'
import {
getSubordinateRegions,
} from '@/api/modifyAddress/modifyAddress.js';
import gkcity from "../m-city/m-city.vue";
export default {
components: {
contenttext
contenttext,
"m-city": gkcity
},
data() {
return {
radio: 1,
chooseLocation: '', //
// chooseLocation: '', //
arealist: [], //list
list: [{
id: "",
localName: "请选择",
children: [],
}, ],
areashow: false, //
maskshow:false,//
maskshow: false, //
getNurseTypelist: [], //
medicalcarelist: [], //
address: '', //
@ -117,69 +132,93 @@
nurseTypeIdList: [],
diseaseInfoList: [],
patientId: '',
locationName: null,
locationName: '',
},
timer: null,
addresslength: null,
};
},
methods: {
//
informationinfo() {
var that = this
try {
const value = uni.getStorageSync('phone');
if (value) {
that.query.phone = value
if (that.radio == 1) {
that.$refs.uToast.show({
title: '请审核并同意用户协议',
type: 'error'
})
} else {
information(that.query).then(res => {
if (res.code == 200) {
if (this.addresslength) {
if (this.addresslength.length > 2) {
try {
const value = uni.getStorageSync('phone');
if (value) {
that.query.phone = value
if (that.radio == 1) {
that.$refs.uToast.show({
title: '完善信息成功',
type: 'success',
duration: '1500'
title: '请审核并同意用户协议',
type: 'error'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateBack({
delta: 1
})
}, 1500)
} else if (res.code == 500) {
that.$refs.uToast.show({
title: res.msg,
type: 'error',
} else {
information(that.query).then(res => {
if (res.code == 200) {
that.$refs.uToast.show({
title: '完善信息成功',
type: 'success',
duration: '1500'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateBack({
delta: 1
})
}, 1500)
} else if (res.code == 500) {
that.$refs.uToast.show({
title: res.msg,
type: 'error',
})
}
})
}
})
}
}
} catch (e) {}
} else {
that.$refs.uToast.show({
title: '所属区域应选择所在的区或街道,请重新选择!',
type: 'error'
})
}
} catch (e) {}
} else {
that.$refs.uToast.show({
title: '所属区域应选择所在的区或街道,请重新选择!',
type: 'error'
})
}
},
//
getAddress() {
uni.getLocation({
type: 'wgs84',
success: function(res) {
const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使key
const referer = '泉医到家'; //app
const location = JSON.stringify({
latitude: 39.89631551,
longitude: 116.323459711
});
wx.navigateTo({
url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
});
var that = this;
uni.chooseLocation({
success: function(location) {
that.query.locationName = location.address
that.query.homeLongitude = location.longitude;
that.query.homeLatitude = location.latitude;
}
});
},
// getAddress() {
// uni.getLocation({
// type: 'wgs84',
// success: function(res) {
// const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使key
// const referer = ''; //app
// const location = JSON.stringify({
// latitude: 39.89631551,
// longitude: 116.323459711
// });
// wx.navigateTo({
// url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
// });
// }
// });
// },
//
getNurseTypeInfo() {
getNurseType().then(res => {
@ -189,25 +228,32 @@
},
//
areaInfo() {
getRegionAndStreetInfo().then(res => {
//
res.data.forEach(e => {
if (e.children.length == 0) {
e.children.push({
areaCode: "",
areaName: "暂无街道",
children: null,
id: '',
})
}
})
this.arealist = res.data;
getSubordinateRegions().then(res => {
this.list = res.data;
})
},
//
areaconfirm(e) {
this.query.areaCode = e[e.length - 1].value
this.address = e[0].label + '-' + e[1].label
//
getpickerParentValue(e) {
this.addresslength = e
if (e.length == 4) {
this.address = e[0].localName + e[1].localName + e[2].localName + e[3]
.localName
this.query.areaCode = e[3].id
} else if (e.length == 3) {
this.address = e[0].localName + e[1].localName + e[2].localName
this.query.areaCode = e[2].id
} else if (e.length == 2) {
this.address = e[0].localName + e[1].localName
this.query.areaCode = e[1].id
} else if (e.length == 1) {
this.address = e[0].localName
this.query.areaCode = e[0].id
}
},
//
showPicker() {
this.areashow = true
this.$refs.cityPicker.show();
},
//
addnurseType(item) {
@ -250,14 +296,14 @@
// onShow
onShow() {
var that = this
const chooseLocation = requirePlugin('chooseLocation');
const location = chooseLocation.getLocation(); // null
if (location) {
that.query.locationName = location.address
that.chooseLocation = location.address
that.query.homeLongitude = location.longitude;
that.query.homeLatitude = location.latitude;
}
// const chooseLocation = requirePlugin('chooseLocation');
// const location = chooseLocation.getLocation(); // null
// if (location) {
// that.query.locationName = location.address
// that.chooseLocation = location.address
// that.query.homeLongitude = location.longitude;
// that.query.homeLatitude = location.latitude;
// }
uni.$on('disease', function(data) {
that.query.diseaseInfoList = JSON.parse(data.disease)
if (that.query.diseaseInfoList.length > 0) {
@ -275,7 +321,7 @@
},
onUnload() {
// nullgeLocation
chooseLocation.setLocation(null);
// chooseLocation.setLocation(null);
},
}
</script>

View File

@ -1,11 +1,18 @@
<template>
<view>
<view class="mask" :class="{ maskShow: showPicker }" @click="hide" @click.stop.prevent @touchmove.stop.prevent
<view class="mask" :class="{ maskShow: showPicker }" @click="goemit" @click.stop.prevent @touchmove.stop.prevent
catchtouchmove="true"></view>
<view class="cpicker-content" :class="{ cpickerShow: showPicker }">
<view class="city-head" @click.stop.prevent @touchmove.stop.prevent catchtouchmove="true">
<view class="city-head-title">{{ headTitle }}</view>
<icon type="clear" v-if="clearRightIcon" class="clearRightIcon" size="20" color="#cccccc" @click="hide">
<!-- <view class="titlecancel" @click="hide">
取消
</view>
<view class="titletap" @click="goemit">
确定
</view> -->
<icon type="clear" v-if="clearRightIcon" class="clearRightIcon" size="20" color="#cccccc"
@click="goemit">
</icon>
</view>
<scroll-view id="nav-bar" class="nav-bar" scroll-x="true" scroll-with-animation="true"
@ -74,14 +81,20 @@
showPicker: false, //
};
},
onShow() {
},
onShow() {},
onLoad() {
},
onUnload() {},
methods: {
goemit() {
var list = null
if (this.tabbars[this.tabbars.length - 1].localName == '请选择') {
list = this.tabbars.filter(e => e.localName != '请选择')
}
this.$emit("funcValue", list);
this.hide();
},
/**
* 显示选择器
*/
@ -149,7 +162,7 @@
this.tabbars.splice(index + 1, this.tabbars.length - index - 1);
}
if (this.tabbars.length < this.pickersize) {
let data = await getSubordinateInfo(item.id);
let data = await getSubordinateInfo(item.areaCode);
//
if (data.data.length == 0) {
this.$emit("funcValue", this.tabbars);
@ -259,10 +272,11 @@
border-bottom-width: 1px;
border-bottom-color: #f4f4f4;
border-bottom-style: solid;
position: relative;
}
.city-head-title {
font-size: 15px;
font-size: 30rpx;
line-height: 88rpx;
align-items: center;
/* #ifndef APP-NVUE */
@ -270,6 +284,24 @@
/* #endif */
}
.titletap {
display: inline-block;
fonts-size: 24rpx;
position: absolute;
right: 5%;
top: 22rpx;
color: #999999;
}
.titlecancel {
display: inline-block;
fonts-size: 24rpx;
position: absolute;
left: 5%;
top: 22rpx;
color: #999999;
}
.clearRightIcon {
position: absolute;
right: 15px;
@ -306,7 +338,7 @@
}
.nav-bar-title {
font-size: 12px;
font-size: 30rpx;
}
.current {
@ -321,7 +353,7 @@
}
.panel-scroll-box {
height: 516rpx;
height: 750rpx;
margin-top: 8px;
}
@ -341,7 +373,7 @@
/* #endif */
height: 35px;
line-height: 35px;
font-size: 13px;
font-size: 30rpx;
}
.hide {

View File

@ -1,11 +1,11 @@
<template>
<view class="app" v-if="list">
<view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0">
<view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'">
剩余付款时间
<u-count-down style='' :timestamp="timestamp">
</u-count-down>
</view>
<view class="OrderStatus" v-if="list.orderStatus=='WAIT_PAY'&&timestamp<=0">
<view class="OrderStatus" v-if="list.orderStatus=='REFUNDED'||list.orderStatus=='CANCEL'">
订单已关闭
</view>
<view class="content">
@ -67,7 +67,7 @@
</view>
<!-- <view class="cancelorder " style="background: #4C7BC9;">评价</view> -->
<view class="cancelorder" @tap='buy' style="background-color: darkorange;"
v-if="list.orderStatus=='WAIT_PAY'&&timestamp>0">
v-if="list.orderStatus=='WAIT_PAY'">
去支付
</view>
</view>
@ -139,7 +139,7 @@
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
toast: 1500,
duration: 1500,
url: `/pages/paysuccess/paysuccess?delta=${3}`
})
},
@ -147,7 +147,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
toast: 1500,
duration: 1500,
})
}
});
@ -155,7 +155,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
toast: 2000
duration: 2000
})
}
})
@ -189,7 +189,8 @@
getlist() {
getAppointmentDetailsInfo(this.orderNo).then(res => {
this.list = res.data
var time = new Date(this.list.createTime).getTime() / 1000 + (60 * 60 * 24)
var ordertimes = this.list.createTime.replaceAll(/\-/gi, "/")
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
this.timestamp = time - times
})

View File

@ -3,6 +3,9 @@
width: 100%;
color: #000000;
padding-bottom: 50rpx;
/deep/ .u-drawer{
z-index: 0 !important;
}
.Agreement{
width: 100%;
background-color: #F4F5F7;
@ -159,6 +162,9 @@
display: inline-block;
height: 120rpx;
line-height: 120rpx;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
span {

View File

@ -21,7 +21,7 @@
<u-input :clearable='false' v-model="appPersonallist.cardNo" placeholder="请输入" type="text"
maxlength='18' />
</view>
<view class="item" @tap='areashow=true'>
<view class="item" @tap='showPicker'>
<span>所属区域:</span>
<view class="address">{{address}}</view>
</view>
@ -57,8 +57,6 @@
style="color: #000000;border-bottom: 1rpx solid #000000;">用户协议</text>
</view>
</view>
<u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
:list="arealist" @confirm="areaconfirm"></u-select>
<view class="finish" @tap="informationinfo()">完成
</view>
<u-toast ref="uToast" />
@ -79,6 +77,11 @@
</view>
</view>
</u-mask>
<view class="">
<m-city style='z-index: 10076;' :provinceData="list" headTitle="地区选择" ref="cityPicker"
@funcValue="getpickerParentValue" pickerSize="4">
</m-city>
</view>
</view>
</template>
@ -94,17 +97,25 @@
import {
appPersonal,
} from '@/api/user/user.js';
import {
getSubordinateRegions,
} from '@/api/modifyAddress/modifyAddress.js';
import gkcity from "../m-city/m-city.vue";
export default {
components: {
contenttext
contenttext,
"m-city": gkcity
},
data() {
return {
list: [{
id: "",
localName: "请选择",
children: [],
}, ],
radio: 1,
baseurl: '',
address: '',
arealist: [],
areashow: false,
maskshow: false, //
img: null,
image: null,
@ -123,6 +134,7 @@
locationName: '',
},
patientDiseaseInfoList: [], //
addresslength: null,
}
},
onLoad(options) {
@ -137,8 +149,8 @@
that.appPersonallist.homeLatitude = Number(that.appPersonallist.homeLatitude)
that.appPersonallist.homeLongitude = Number(that.appPersonallist.homeLongitude)
that.img = baseurl + that.appPersonallist.headPictureUrl
if (that.appPersonallist.regionName && that.appPersonallist.streetName) {
that.address = that.appPersonallist.regionName + '-' + that.appPersonallist.streetName
if (that.appPersonallist.areaName) {
that.address = that.appPersonallist.areaName
}
that.patientDiseaseInfoList = that.appPersonallist.patientDiseaseInfoList
that.patientDiseaseInfoList.forEach(e => {
@ -149,9 +161,30 @@
} else {}
},
methods: {
//
getpickerParentValue(e) {
this.addresslength = e
if (e.length == 4) {
this.address = e[0].localName + e[1].localName + e[2].localName + e[3]
.localName
this.appPersonallist.areaCode = e[3].id
} else if (e.length == 3) {
this.address = e[0].localName + e[1].localName + e[2].localName
this.appPersonallist.areaCode = e[2].id
} else if (e.length == 2) {
this.address = e[0].localName + e[1].localName
this.appPersonallist.areaCode = e[1].id
} else if (e.length == 1) {
this.address = e[0].localName
this.appPersonallist.areaCode = e[0].id
}
},
//
showPicker() {
this.$refs.cityPicker.show();
},
//+
informationinfo() {
//
data() {
var that = this
if (that.radio == 1) {
that.$refs.uToast.show({
@ -224,6 +257,23 @@
}
}
},
informationinfo() {
//
var that = this
if (this.addresslength) {
if (this.addresslength.length > 2) {
that.data();
} else {
that.$refs.uToast.show({
title: '所属区域应选择所在的区或街道,请重新选择!',
type: 'error'
})
}
} else {
that.data();
}
},
//
uploadImag() {
var that = this;
@ -240,41 +290,36 @@
},
//
getAddress() {
uni.getLocation({
type: 'wgs84',
var that = this;
uni.chooseLocation({
success: function(res) {
const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使key
const referer = '泉医到家'; //app
const location = JSON.stringify({
latitude: 39.89631551,
longitude: 116.323459711
});
wx.navigateTo({
url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
});
that.appPersonallist.locationName = res.address
that.appPersonallist.homeLongitude = res.longitude;
that.appPersonallist.homeLatitude = res.latitude;
}
});
},
//
areaconfirm(e) {
this.appPersonallist.areaCode = e[e.length - 1].value
this.address = e[0].label + '-' + e[1].label
},
// //
// getAddress() {
// uni.getLocation({
// type: 'wgs84',
// success: function(res) {
// const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使key
// const referer = ''; //app
// const location = JSON.stringify({
// latitude: 39.89631551,
// longitude: 116.323459711
// });
// wx.navigateTo({
// url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
// });
// }
// });
// },
//
areaInfo() {
getRegionAndStreetInfo().then(res => {
//
res.data.forEach(e => {
if (e.children.length == 0) {
e.children.push({
areaCode: "",
areaName: "暂无街道",
children: null,
id: '',
})
}
})
this.arealist = res.data;
getSubordinateRegions().then(res => {
this.list = res.data;
})
},
//
@ -297,18 +342,18 @@
},
onUnload() {
// nullgeLocation
chooseLocation.setLocation(null);
// chooseLocation.setLocation(null);
},
//
onShow() {
let that = this
const chooseLocation = requirePlugin('chooseLocation');
const location = chooseLocation.getLocation(); // null
if (location) {
that.appPersonallist.locationName = location.address
that.appPersonallist.homeLongitude = location.longitude;
that.appPersonallist.homeLatitude = location.latitude;
}
// const chooseLocation = requirePlugin('chooseLocation');
// const location = chooseLocation.getLocation(); // null
// if (location) {
// that.appPersonallist.locationName = location.address
// that.appPersonallist.homeLongitude = location.longitude;
// that.appPersonallist.homeLatitude = location.latitude;
// }
uni.$on('disease', function(data) {
that.patientDiseaseInfoList = JSON.parse(data.disease)
})

View File

@ -6,6 +6,9 @@
height: 100%;
padding: 4%;
padding-bottom: 100rpx;
/deep/ .u-drawer{
z-index: 0 !important;
}
.address {
width: 99%;
background: #FFFFFF;
@ -26,15 +29,16 @@
.detail {
border-bottom: 5rpx solid #F4F5F7;
height:100%;
padding-bottom: 30rpx;
font-size: 32rpx;
line-height: 50rpx;
padding-bottom: 20rpx;
word-break:break-all;
}
.update {
display: flex;
margin: 18rpx 18rpx 18rpx 50%;
width: 100%;
justify-content: flex-end;
}
.up {
@ -50,7 +54,7 @@
}
.ups {
margin-right: 30rpx;
margin-right: 20rpx;
}
}

View File

@ -7,14 +7,26 @@
{{item.receivePhone}}
</view>
<view class="item detail" @tap='goorder(item)'>
{{item.address}}
{{item.areaName}}{{item.receiveAddress}}
</view>
<view class="update">
<view class="up ups" @tap='updataxg(item)'>
修改
<view class="item detail" style="border: none;font-size: 32rpx;margin-top: 40rpx;">
<view class="" style='width: 50%;display: inline-block;'>
<view class="" style="display: inline-block;">
默认地址
</view>
<view class="" style="transform: translateY(16%);display: inline-block;margin-left: 20rpx;">
<u-switch v-model="item.defaultAddressFlag" size='36' @change='change(item)'></u-switch>
</view>
</view>
<view class="up" @tap='del(item)'>
删除
<view class="" style="display: inline-block;width: 50%;">
<view class="update">
<view class="up ups" @tap='updataxg(item)'>
修改
</view>
<view class="up" @tap='del(item)'>
删除
</view>
</view>
</view>
</view>
</view>
@ -26,8 +38,8 @@
</span>
</view>
<!-- 弹框 -->
<u-popup v-model="show" mode="center" width="80%" height="50%" border-radius="30">
<view class="payment">
<u-popup v-model="show" mode="center" width="85%" height="600rpx" border-radius="30" @close='cencel()'>
<view class="payment" @click.stop=''>
<span>{{shipAddress}}</span>
<view class="cencel" @tap="cencel()">
<image src="../../static/gb.png" mode=""></image>
@ -37,23 +49,37 @@
</u-field>
<u-field v-model="infolist.receivePhone" label="手机号" placeholder="电话" class="items" maxlength='11'>
</u-field>
<view class="area" @tap='areashow=true'>
<u-field v-model="infolist.address" label="地区" placeholder="请选择" class="items" disabled>
<view class="area" @click="showPicker">
<!-- <view class="area" @tap='areashow=true'> -->
<u-field v-model="infolist.address" label="区域" placeholder="请选择" class="items" disabled>
</u-field>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<u-field v-model="infolist.receiveAddress" label-width="170" label="详细地址" placeholder="如街道、门牌号、小区等"
class="items" maxlength='50'>
</u-field>
<!-- <view class="" style="font-size: 28rpx;height: 80rpx">
<view class="" style="display: inline-block;">
默认地址
</view>
<view class="" style="transform: translateY(8%);display: inline-block;margin-left: 20rpx;">
<u-switch v-model="infolist.defaultAddressFlag" size='32'></u-switch>
</view>
</view> -->
</view>
<view class="save" @tap='submit()'>
保存
</view>
</view>
</u-popup>
<u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
:list="arealist" @confirm="areaconfirm"></u-select>
<!-- <u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
:list="arealist" @confirm="areaconfirm"></u-select> -->
<u-toast ref="uToast" />
<view class="" v-if="cityPickershow">
<m-city style='z-index: 10076;' :provinceData="list" headTitle="地区选择" ref="cityPicker"
@funcValue="getpickerParentValue" pickerSize="4">
</m-city>
</view>
</view>
</template>
@ -65,10 +91,15 @@
nursingStationGoodsinfo,
updatenursingStation,
getSubordinateRegions,
getSubordinate
getSubordinate,
updateDefaultAddress
} from '@/api/modifyAddress/modifyAddress.js';
import baseurl from '@/api/baseurl.js'
import gkcity from "../m-city/m-city.vue";
export default {
components: {
"m-city": gkcity
},
data() {
return {
timer: null,
@ -76,33 +107,88 @@
delshow: false, //
content: '确认要删除信息吗?',
show: false, //
areashow: false, //
arealist: [], //list
// areashow: false, //
// arealist: [], //list
areaCode: '',
shipAddress: '添加地址',
infolist: {
receiveName: '',
receivePhone: '',
receiveAddress: '',
areaCode: '',
areaCode: null,
patientId: '',
address: '', //
address: null, //
defaultAddressFlag: false,
},
goodPatient: [], //
patientId: null,
url: '',
updata: [],
list: [{
id: "",
localName: "请选择",
children: [],
}, ],
cityPickershow: false,
addresslength: null,
}
},
onShow() {
this.goodsList()
this.areaInfo()
},
onLoad(options) {
let that = this
this.updata = JSON.parse(options.updata)
this.areaInfo()
},
methods: {
change(status) {
if (!status.defaultAddressFlag) {
status.defaultAddressFlag = true
} else {
this.goodPatient.forEach(e => {
e.defaultAddressFlag = 0
})
status.defaultAddressFlag = 1
updateDefaultAddress(this.goodPatient).then(res => {
if (res.code == 200) {
this.goodsList();
uni.$emit('updata', {
updata: JSON.stringify(this.updata),
useritem: JSON.stringify(status)
})
uni.navigateBack({
delta: 1
});
}
})
}
},
//
getpickerParentValue(e) {
this.addresslength = e
if (e) {
if (e.length == 4) {
this.infolist.address = e[0].localName + '-' + e[1].localName + '-' + e[2].localName + '-' + e[3]
.localName
this.infolist.areaCode = e[3].id
} else if (e.length == 3) {
this.infolist.address = e[0].localName + '-' + e[1].localName + '-' + e[2].localName
this.infolist.areaCode = e[2].id
} else if (e.length == 2) {
this.infolist.address = e[0].localName + '-' + e[1].localName
this.infolist.areaCode = e[1].id
} else if (e.length == 1) {
this.infolist.address = e[0].localName
this.infolist.areaCode = e[0].id
}
}
},
//
showPicker() {
this.cityPickershow = true
this.$refs.cityPicker.show();
},
//
goorder(item) {
uni.$emit('updata', {
@ -122,8 +208,12 @@
that.patientId = value
goodPatientInfo(that.patientId).then(res => {
res.data.forEach(e => {
e.address = e.provinceName + e.cityName + e.regionName + e
.streetName + e.receiveAddress
e.address = e.areaName + e.receiveAddress
if (e.defaultAddressFlag == 1) {
e.defaultAddressFlag = true
} else {
e.defaultAddressFlag = false
}
})
that.goodPatient = res.data
})
@ -139,6 +229,7 @@
uni.navigateBack({
delta: 2
})
}, 1500)
}
} catch (e) {}
@ -147,52 +238,110 @@
submit() {
let that = this
if (that.isedit == true) {
addnursingStation(that.infolist).then(res => {
if (res.code == 200) {
that.$refs.uToast.show({
title: '新增成功',
type: 'success'
if (that.addresslength) {
if (that.addresslength.length > 2) {
addnursingStation(that.infolist).then(res => {
if (res.code == 200) {
that.$refs.uToast.show({
title: '新增成功',
type: 'success'
})
that.cencel();
setTimeout(e => {
that.goodsList()
}, 1000)
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
}
})
that.show = false;
setTimeout(e => {
that.goodsList()
}, 1000)
}
})
} else {
updatenursingStation(that.infolist).then(res => {
if (res.code == 200) {
that.$refs.uToast.show({
title: '修改成功',
type: 'success'
})
that.show = false;
setTimeout(e => {
that.goodsList()
}, 1000)
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
this.Toast()
}
})
} else {
this.Toast()
}
} else {
if (that.addresslength) {
if (that.addresslength.length > 2) {
this.xgdata();
} else {
this.Toast()
}
} else {
this.xgdata();
}
}
},
Toast() {
this.$refs.uToast.show({
title: '区域应选择所在的区或街道,请重新选择!',
type: 'error'
})
},
xgdata() {
var that = this
updatenursingStation(that.infolist).then(res => {
if (res.code == 200) {
that.$refs.uToast.show({
title: '修改成功',
type: 'success'
})
that.cencel();
setTimeout(e => {
that.goodsList()
}, 1000)
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
}
})
},
// submit() {
// if (this.addresslength) {
// if (this.addresslength.length > 2) {
// this.data();
// } else {
// this.$refs.uToast.show({
// title: ',!',
// type: 'error'
// })
// }
// } else {
// this.data()
// }
// },
//
updataxg(item) {
this.cityPickershow = true
this.shipAddress = '修改地址'
this.isedit = false
nursingStationGoodsinfo(item.id).then(res => {
this.infolist = res.data
getSubordinate(res.data.areaCode).then(res => {
this.infolist.address = res.data.regionName + '-' + res.data.streetName
if (res.data.streetName) {
this.infolist.address = res.data.provinceName + '-' + res.data.cityName +
'-' +
res
.data.regionName + '-' + res.data.streetName
} else {
this.infolist.address = res.data.provinceName + '-' + res.data.cityName +
'-' +
res
.data.regionName
}
this.show = true
})
})
},
//
add() {
this.shipAddress = '添加地址'
this.cityPickershow = true
this.infolist = {
receiveName: '',
receivePhone: '',
@ -211,16 +360,23 @@
content: '确认要删除信息吗',
success: function(res) {
if (res.confirm) {
delnursingStation(item.id).then(res => {
uni.showToast({
title: '删除成功',
duration: 1000,
});
setTimeout(e => {
that.goodsList()
}, 1000)
that.delshow = false;
})
if (that.goodPatient.length == 1) {
that.$refs.uToast.show({
title: '最少保留一条地址信息',
type: 'error'
})
} else {
delnursingStation(item.id).then(res => {
that.$refs.uToast.show({
title: '删除成功',
type: 'success'
})
setTimeout(e => {
that.goodsList()
}, 1000)
that.delshow = false;
})
}
} else if (res.cancel) {}
}
});
@ -228,31 +384,44 @@
//
cencel() {
this.show = false
this.infolist = {}
this.cityPickershow = false
},
//
areaInfo() {
getSubordinateRegions(this.areaCode).then(res => {
getSubordinateRegions().then(res => {
//
res.data.forEach(e => {
if (e.children.length == 0) {
e.children.push({
areaCode: "",
areaName: "暂无街道",
children: null,
id: '',
})
}
})
this.arealist = res.data;
this.list = res.data;
})
},
//
// areaInfo() {
// getSubordinateRegions(this.areaCode).then(res => {
// //
// res.data.forEach(e => {
// if (e.children.length == 0) {
// e.children.push({
// areaCode: "",
// areaName: "",
// children: null,
// id: '',
// })
// }
// })
// this.arealist = res.data;
// })
// },
//
areaconfirm(e) {
this.infolist.areaCode = e[e.length - 1].value
this.infolist.address = e[0].label + '-' + e[1].label
},
}
},
onPullDownRefresh() { //
this.goodsList()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>

View File

@ -118,6 +118,7 @@
top:14%;
left:32%;
font-size: 28rpx;
overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
}
.huanyao {
color: #000000;

View File

@ -69,8 +69,9 @@
<view class="item" v-show='choicetab' v-for="(item,index) in productlist" :key="index">
<image :src="item.goodsPictureUrl"></image>
<view class="product">{{item.goodsName}}</view>
<view class="product" style="top:38%;font-size: 24rpx;color: #999999;">{{item.attributeDetailsName}}</view>
<view class="buy appointment" @tap="goCommodityDetails(item)">购买</view>
<view class="price">{{item.goodsPrice==null?'0':item.goodsPrice}}</view>
<view class="price" style="left:32%">{{item.goodsPrice==null?'0':item.goodsPrice}}</view>
</view>
</view>
<view class="noorder" v-if="productlist.length==0&&choicetab">
@ -239,7 +240,7 @@
//
goCommodityDetails(item) {
uni.navigateTo({
url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'NURSE_STATION'}`
url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'NURSE_STATION'}&goodsAttributeId=${item.goodsAttributeId}`
})
},
//
@ -300,9 +301,7 @@
})
})
}
}
},
onPullDownRefresh() { //
this.pageNum = 1;

View File

@ -8,18 +8,42 @@
<view class="OrderStatus" @tap="gopaid('WAIT_PAY')">
<image src="/static/Tobepaid.png" mode=""></image>
<span>待付款</span>
<view class="orderCount" v-if="list.waitPayCount>0&&list.waitPayCount<100">
{{list.waitPayCount}}
</view>
<view class="orderCount" v-if="list.waitPayCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="goreceive('WAIT_RECEIVED_GOODS')">
<image src="/static/received.png" mode=""></image>
<span>待收货</span>
<view class="orderCount" v-if="list.waitReceivedGoodsCount>0&&list.waitReceivedGoodsCount<100">
{{list.waitReceivedGoodsCount}}
</view>
<view class="orderCount" v-if="list.waitReceivedGoodsCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')">
<image src="/static/evaluated.png" mode=""></image>
<span>待评价</span>
<view class="orderCount" v-if="list.receivedGoodsCount>0&&list.receivedGoodsCount<100">
{{list.receivedGoodsCount}}
</view>
<view class="orderCount" v-if="list.receivedGoodsCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="goEVALUATED('EVALUATED')">
<image src="/static/finished.png" mode=""></image>
<span>已完成</span>
<!-- <view class="orderCount" v-if="list.evaluatedCount>0&&list.evaluatedCount<100">
{{list.evaluatedCount}}
</view>
<view class="orderCount" v-if="list.evaluatedCount>=100">
99+
</view> -->
</view>
</view>
</view>
@ -29,14 +53,34 @@
<image src="../../static/jiantou.png" mode=""></image>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
orderCount
} from '@/api/order/index.js'
export default {
data() {
return {
list: null,
}
},
onShow() {
let that = this
const value = uni.getStorageSync('patientId');
if (value) {
orderCount(value).then(res => {
this.list = res.data
})
} else {
that.$refs.uToast.show({
title: '请登录',
type: 'error',
duration: '1000',
url: '/pages/login/login'
})
}
},
methods: {
@ -129,14 +173,31 @@
justify-content: space-around;
image {
width: 83rpx;
height: 72rpx;
width: 100rpx;
height: 80rpx;
margin-left: 50%;
transform: translateX(-50%);
}
.OrderStatus {
margin-top: 8%;
padding-top: 50rpx;
position: relative;
.orderCount {
background-color: red;
color: #FFFFFF;
border-radius: 50%;
text-align: center;
// padding: 0 5rpx ;
line-height: 40rpx;
width: 40rpx;
height: 40rpx;
font-size: 20rpx;
// display: inline-block;
position: absolute;
top: 30rpx;
right: -20rpx;
}
}
}

View File

@ -1,14 +1,11 @@
<template>
<view class="app" v-if="order">
<view class="time" style="" v-if="order.orderStatus=='WAIT_PAY'&&timestamp>0">
<view class="time" style="" v-if="order.orderStatus=='WAIT_PAY'">
剩余付款时间
<u-count-down style='' :timestamp="timestamp">
</u-count-down>
</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 class="OrderStatus" v-if="order.orderStatus=='REFUNDED'||order.orderStatus=='CANCEL'">
订单已关闭
</view>
<!-- <custom-nav nav='To' Url="/pages/CommodityOrder/CommodityOrder" title='商品订单'></custom-nav> -->
@ -48,7 +45,6 @@
<view class="refund" v-if="order.orderStatus=='CANCEL'">
已取消
</view>
</view>
</view>
<view class="payinfo">
@ -57,7 +53,7 @@
</view>
</view>
</view>
<view class="info" v-if="order.orderStatus != ' WAIT_PAY'&& order.orderStatus!='CANCEL'">
<view class="info">
<span>收货人<text>{{order.receiver}}</text></span>
<span>联系电话<text>{{order.phone}}</text></span>
<span>收货地址<text>{{order.receiveAddress}}</text></span>
@ -67,7 +63,7 @@
<span v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></span>
<!-- <span>成交时间<text>2022-10-28 113126</text></span> -->
</view>
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'&&timestamp>0" @tap='pay'>
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'" @tap='pay'>
<view class="pay">
去支付
</view>
@ -209,7 +205,7 @@
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
toast: 1500,
duration: 1500,
url: '/pages/paysuccess/paysuccess'
})
},
@ -217,7 +213,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
toast: 1500
duration: 1500
})
}
});
@ -225,7 +221,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
toast: 1500
duration: 1500
})
}
})
@ -239,7 +235,8 @@
goodsOrderinfo() {
goodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum).then(res => {
this.order = res.rows[0]
var time = new Date(this.order.orderTime).getTime() / 1000 + (60 * 60 * 24)
var ordertimes = this.order.orderTime.replaceAll(/\-/gi, "/")
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
this.timestamp = time - times
})

View File

@ -5,7 +5,7 @@
<u-count-down style='' :timestamp="timestamp">
</u-count-down>
</view>
<view class="OrderStatus" v-if="order.orderStatus=='WAIT_PAY'&&timestamp<=0">
<view class="OrderStatus" v-if="order.orderStatus=='REFUNDED'||order.orderStatus=='CANCEL'">
订单已关闭
</view>
<!-- <custom-nav nav='To' Url="/pages/CommodityOrder/CommodityOrder" title='商品订单'></custom-nav> -->
@ -45,7 +45,6 @@
<view class="refund" v-if="order.orderStatus=='CANCEL'">
已取消
</view>
</view>
</view>
<view class="payinfo">
@ -64,7 +63,7 @@
<span v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></span>
<!-- <span>成交时间<text>2022-10-28 113126</text></span> -->
</view>
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'&&timestamp>0" @tap='pay'>
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'" @tap='pay'>
<view class="pay">
去支付
</view>
@ -92,7 +91,7 @@
pageSize: 10,
pageNum: 1,
timestamp: 0,
goodsOrderId:null,
goodsOrderId: null,
}
},
methods: {
@ -117,7 +116,7 @@
that.$refs.uToast.show({
title: '支付成功',
type: 'success',
toast: 1500,
duration: 1500,
url: `/pages/paysuccess/paysuccess?delta=${3}`
})
},
@ -125,7 +124,7 @@
that.$refs.uToast.show({
title: '取消支付',
type: 'error',
toast: 1500,
duration: 1500,
})
}
});
@ -133,7 +132,7 @@
that.$refs.uToast.show({
title: response.msg,
type: 'error',
toast: 2000
duration: 2000
})
}
})
@ -147,7 +146,8 @@
goodsOrderinfo(goodsOrderId) {
goodsOrder(this.patientId, this.orderStatus, goodsOrderId, this.pageSize, this.pageNum).then(res => {
this.order = res.rows[0]
var time = new Date(this.order.orderTime).getTime() / 1000 + (60 * 60 * 24)
var ordertimes = this.order.orderTime.replaceAll(/\-/gi, "/")
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 24)
var times = new Date().getTime() / 1000
this.timestamp = time - times
})

View File

@ -12,7 +12,9 @@
<view class="addressContent" v-for="(item,index) in nursestationlist" :key="index">
<view class="lists" @tap='godetails(item)'>
<view class="nurse">{{item.nurseStationName}}</view>
<view class="distance">距离您{{item.distance}}KM</view>
<view class="distance"
v-show="homeLatitudeLongitude.homeLatitude&&homeLatitudeLongitude.homeLongitude">
距离您{{item.distance}}KM</view>
<image class="background" :src="item.stationPictureUrl" mode=""></image>
<view class="understand">
点击了解
@ -55,6 +57,7 @@
latitude: 39.90374,
longitude: 116.397827,
markers: [],
homeLatitudeLongitude: null,
}
},
methods: {
@ -63,22 +66,22 @@
uni.openSetting({
success(res) {
if (res.authSetting['scope.userLocation']) {
uni.getLocation({
type: 'wgs84',
success: function(res) {
that.latitude = res.latitude
that.longitude = res.longitude
that.markers.push({
id: 3,
latitude: res.Latitude,
longitude: res.Longitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.mask = false
}
});
// uni.getLocation({
// type: 'wgs84',
// success: function(res) {
// that.latitude = res.latitude
// that.longitude = res.longitude
// that.markers.push({
// id: 3,
// latitude: res.Latitude,
// longitude: res.Longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.mask = false
// }
// });
}
}
});
@ -151,6 +154,7 @@
if (value) {
getPatientInfo(value).then(res => {
if (res.code == 200) {
this.homeLatitudeLongitude = res.data
if (res.data.homeLatitude && res.data.homeLongitude) {
that.latitude = res.data.homeLatitude
that.longitude = res.data.homeLongitude
@ -164,70 +168,80 @@
})
that.requestinfo();
} else {
uni.getLocation({
type: 'wgs84',
success: function(resp) {
that.latitude = resp.latitude
that.longitude = resp.longitude
that.markers.push({
id: 3,
latitude: resp.latitude,
longitude: resp.longitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.requestinfo();
},
fail(err) {
that.mask = true;
}
});
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// uni.getLocation({
// type: 'wgs84',
// success: function(resp) {
// that.latitude = resp.latitude
// that.longitude = resp.longitude
// that.markers.push({
// id: 3,
// latitude: resp.latitude,
// longitude: resp.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
// that.mask = true;
// }
// });
}
} else if (res.code == 9999) {
} else {
uni.getLocation({
type: 'wgs84',
success: function(resh) {
that.latitude = resh.latitude
that.longitude = resh.longitude
that.markers.push({
id: 3,
latitude: resh.latitude,
longitude: resh.longitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.requestinfo();
},
fail(err) {
that.mask = true;
}
});
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// that.markers.push({
// uni.getLocation({
// type: 'wgs84',
// success: function(resh) {
// that.latitude = resh.latitude
// that.longitude = resh.longitude
// that.markers.push({
// id: 3,
// latitude: resh.latitude,
// longitude: resh.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
// that.mask = true;
// }
// });
}
})
} else {
uni.getLocation({
type: 'wgs84',
success: function(res) {
that.latitude = res.latitude
that.longitude = res.longitude
that.markers.push({
id: 3,
latitude: res.latitude,
longitude: res.longitude,
width: 20,
height: 25,
iconPath: "../../static/locatinsmall.png"
})
that.requestinfo();
},
fail(err) {
that.mask = true;
}
});
that.latitude = that.latitude
that.longitude = that.longitude
that.requestinfo();
// uni.getLocation({
// type: 'wgs84',
// success: function(res) {
// that.latitude = res.latitude
// that.longitude = res.longitude
// that.markers.push({
// id: 3,
// latitude: res.latitude,
// longitude: res.longitude,
// width: 20,
// height: 25,
// iconPath: "../../static/locatinsmall.png"
// })
// that.requestinfo();
// },
// fail(err) {
// that.mask = true;
// }
// });
}
} catch (e) {}
},

View File

@ -64,6 +64,16 @@
background: #FFFFFF;
border-radius: 0 0 20rpx 20rpx;
}
.addressitem {
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
// height: 110rpx;
line-height: 80rpx;
border-bottom: 1rpx solid #D8D4D4;
background: #FFFFFF;
.address{
line-height: 50rpx;font-size: 28rpx;width: 90%;margin: 0 auto;
}
}
.item {
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
// height: 110rpx;

View File

@ -7,7 +7,7 @@
<view class="img" v-else>
<image src="../../static/users.png" mode=""></image>
</view>
<view class="phone" v-if="appPersonallist.patientName!=null">
<view class="phone" v-if="appPersonallist.patientName">
{{appPersonallist.patientName}}
</view>
<view class="nickname">
@ -19,45 +19,52 @@
</view>
</view>
<view class="information">
<view class="item" v-if="appPersonallist.patientName!=null">
<view class="item" v-if="appPersonallist.patientName">
姓名{{appPersonallist.patientName}}
</view>
<view class="item" v-else>
姓名
</view>
<view class="item" v-if="appPersonallist.phone!=null">
<view class="item" v-if="appPersonallist.phone">
电话{{appPersonallist.phone}}
</view>
<view class="item" v-else>
电话
</view>
<view class="item" v-if="appPersonallist.cardNo!=null">
<view class="item" v-if="appPersonallist.cardNo">
身份证{{appPersonallist.cardNo}}
</view>
<view class="item" v-else>
身份证
</view>
<view class="item" v-if="appPersonallist.streetName">
区域{{appPersonallist.regionName}}-{{appPersonallist.streetName}}
</view>
<view class="item" v-else>
区域
</view>
<view class="item" style="height:100%" v-if="appPersonallist.address">
地址:
{{appPersonallist.address}}
</view>
<view class="item" style="height:100%" v-else>
地址:
</view>
<!-- <view class="item" style="height:100%">
<view class="" style="display: inline-block;">
位置:
<view class="addressitem" v-if="appPersonallist.areaName">
<view class="" style="padding-left: 5%;">
区域
</view>
<view class="address" v-if="appPersonallist.homeLatitude&&appPersonallist.homeLongitude">
东经:{{appPersonallist.homeLongitude}}--北纬:{{ appPersonallist.homeLatitude}}
<view class="address" style="">
{{appPersonallist.areaName}}
</view>
</view> -->
</view>
<view class="addressitem" v-else>
<view class="" style="padding-left: 5%;">
区域
</view>
<view class="address" style="">
</view>
</view>
<view class="addressitem" style="height:100%" v-if="appPersonallist.address">
<view class="" style="padding-left: 5%;">
地址
</view>
<view class="address" style="">
{{appPersonallist.address}}
</view>
</view>
<view class="addressitem" style="height:100%" v-else>
<view class="" style="padding-left: 5%;">
地址
</view>
</view>
<view class="disease" style="border:none;">
<view class="" style="line-height: 110rpx;">
疾病类型: