修改
This commit is contained in:
parent
1614b27292
commit
944486e7f4
@ -68,3 +68,13 @@ export function getSubordinateInfo(id) {
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
//默认地址
|
||||
|
||||
export function updateDefaultAddress(data) {
|
||||
return request({
|
||||
url: `/nurseApplet/nursingStationGoods/updateDefaultAddress`,
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -9,7 +9,7 @@
|
||||
暂无
|
||||
</view>
|
||||
<view class="price">
|
||||
¥{{goodsPrice}} 起
|
||||
¥{{goodsPrice}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="choice common" @tap="buyshow=true">
|
||||
@ -82,15 +82,18 @@
|
||||
<view class="bodys" @tap='upaddress()'>
|
||||
<view class="addressinfo">
|
||||
<image src="../../static/locatinsmall.png" mode=""></image>
|
||||
<view class="namephone">
|
||||
<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 class="address">
|
||||
{{updata.receiveAddress}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="centercontent topcontent" v-show="goodshow">
|
||||
@ -165,10 +168,17 @@
|
||||
import {
|
||||
goodsDetails
|
||||
} from '@/api/CommodityDetails/CommodityDetails.js'
|
||||
import {
|
||||
AppIdentification
|
||||
} from '@/api/AppIdentification/index.js'
|
||||
import {
|
||||
goodPatientInfo
|
||||
} from '@/api/modifyAddress/modifyAddress.js';
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import {
|
||||
addStationGoodsOrder,
|
||||
appletGoodsOrderPay
|
||||
} from '@/api/confirmOrder/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -228,31 +238,31 @@
|
||||
})
|
||||
},
|
||||
//立即购买跳转确认订单页面
|
||||
tapbuy() {
|
||||
|
||||
},
|
||||
tapbuy() {},
|
||||
//选择商品
|
||||
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
|
||||
@ -268,7 +278,6 @@
|
||||
res.data.goodsRemark = res.data.goodsRemark.replace(/\<img/gi,
|
||||
"<br/> <img class='richPic'")
|
||||
}
|
||||
this.goodsPrice = res.data.minGoodsPrice //页面价格
|
||||
res.data.goodsPictureUrl = this.baseurl + res.data.goodsPictureUrl
|
||||
this.image = res.data.goodsPictureUrl
|
||||
var obj = {
|
||||
@ -304,7 +313,7 @@
|
||||
this.updata.goodsStock = this.goodDetailsLists[0].goodsStock
|
||||
this.updata.goodsAttributeId = this.goodDetailsLists[0].goodsAttributeId
|
||||
this.updata.goodsAttributeDetailsId = this.goodDetailsLists[0].attributeDetailsId
|
||||
} else {
|
||||
} else {
|
||||
var list = {}
|
||||
this.goodsDetailslist.goodAttributeDetailsLists.forEach(e => {
|
||||
if (e.goodsAttributeId == this.goodsAttributeId) {
|
||||
@ -332,36 +341,49 @@
|
||||
},
|
||||
//跳转到全部收货地址
|
||||
upaddress() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.updata)}`
|
||||
})
|
||||
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
|
||||
this.userid = res.data[0].id
|
||||
// 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) { //获取传值
|
||||
var that = this
|
||||
this.goodsPrice = options.goodsPrice //页面价格
|
||||
this.goodsAttributeId = options.goodsAttributeId
|
||||
this.updata.buySource = options.buySource
|
||||
this.goodsInfoId = options.goodsInfoId
|
||||
try {
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
that.updata.patientId = value
|
||||
that.goodsList()
|
||||
} else {}
|
||||
} catch (e) {}
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
that.updata.patientId = value
|
||||
that.goodsList()
|
||||
} else {}
|
||||
},
|
||||
onShow() {
|
||||
var that = this
|
||||
@ -370,14 +392,23 @@
|
||||
this.goodsDetailsinfo(this.goodsInfoId)
|
||||
goodPatientInfo(this.updata.patientId).then(res => {
|
||||
var user = res.data.filter(e => e.id == this.userid)
|
||||
if (user.length == 0) {
|
||||
res.data.forEach(e => {
|
||||
e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
|
||||
.receiveAddress
|
||||
})
|
||||
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].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
|
||||
@ -387,7 +418,8 @@
|
||||
useritem = JSON.parse(data.useritem)
|
||||
that.updata.receiver = useritem.receiveName
|
||||
that.updata.phone = useritem.receivePhone
|
||||
that.updata.receiveAddress = useritem.address
|
||||
// that.updata.receiveAddress = useritem.address
|
||||
that.updata.receiveAddress = useritem.areaName + useritem.receiveAddress
|
||||
that.userid = useritem.id
|
||||
}
|
||||
})
|
||||
|
||||
@ -79,9 +79,11 @@
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.address{
|
||||
padding-top: 10rpx;
|
||||
width:92%;
|
||||
font-size: 32rpx;
|
||||
font-size: 30rpx;
|
||||
word-break:break-all;
|
||||
line-height: 45rpx;
|
||||
}
|
||||
.namephone{
|
||||
width: 70%;
|
||||
@ -178,7 +180,7 @@
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 15rpx;
|
||||
.chat {
|
||||
height: 130rpx;
|
||||
height: 130rpx;
|
||||
position: relative;
|
||||
span {
|
||||
font-size: 30rpx;
|
||||
@ -223,12 +225,12 @@
|
||||
}
|
||||
|
||||
.productmodel {
|
||||
border: 1rpx solid #FFFFFF;
|
||||
border: 4rpx solid #FFFFFF;
|
||||
}
|
||||
|
||||
.Productmodel {
|
||||
background: #ECF1FA;
|
||||
border: 1rpx solid #4C7BC9;
|
||||
border: 4rpx solid #4C7BC9;
|
||||
color: #4C7BC9;
|
||||
}
|
||||
.productmodel,.Productmodel{
|
||||
|
||||
@ -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>
|
||||
@ -44,7 +43,7 @@
|
||||
</view>
|
||||
<view class="logistics" v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'" @tap='gologistics(item)'>查看物流
|
||||
</view>
|
||||
<view class="logistics harvest" v-if="item.orderStatus=='WAIT_PAY'&&item.timestamp>0"
|
||||
<view class="logistics harvest" v-if="item.orderStatus=='WAIT_PAY'"
|
||||
@tap='buy(item)'>
|
||||
去支付</view>
|
||||
<view class="logistics harvest" @tap='Receipt(item)' v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
|
||||
@ -168,12 +167,12 @@
|
||||
res => {
|
||||
this.orderlist = res.rows
|
||||
this.total = res.total
|
||||
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
|
||||
// })
|
||||
})
|
||||
},
|
||||
//确认收货
|
||||
@ -228,10 +227,10 @@
|
||||
.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
|
||||
|
||||
@ -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:coral;"
|
||||
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>
|
||||
@ -148,7 +147,6 @@
|
||||
taprate(item) {
|
||||
var obj = {
|
||||
"patientId": this.patientId,
|
||||
"openid": this.openid,
|
||||
"orderNo": this.orderNo,
|
||||
"evaluateChannel": "PHONE_APP",
|
||||
"evaluateSatisfaction": item,
|
||||
@ -177,12 +175,12 @@
|
||||
appServiceOrder(this.patientId, this.pageSize, this.pageNum).then(res => {
|
||||
this.list = res.rows;
|
||||
this.total = res.total
|
||||
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
|
||||
// })
|
||||
})
|
||||
},
|
||||
gofinished(item) {
|
||||
@ -196,10 +194,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)
|
||||
})
|
||||
})
|
||||
|
||||
@ -70,39 +70,21 @@
|
||||
//预约
|
||||
goappointments() {
|
||||
let that = this
|
||||
try {
|
||||
const value = uni.getStorageSync('openid');
|
||||
if (value) {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
AppIdentification(value2).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.loginFlag) {
|
||||
that.usershow = false
|
||||
uni.navigateTo({
|
||||
url: `/pages/appointmenttime/appointmenttime?stationId=${this.list.stationId}&stationItemId=${this.list.stationItemId}&stationItemPriceId=${this.list.stationItemPriceId}`,
|
||||
})
|
||||
} else {
|
||||
that.usershow = true
|
||||
}
|
||||
} 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'
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
})
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
AppIdentification(value).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.loginFlag) {
|
||||
that.usershow = false
|
||||
uni.navigateTo({
|
||||
url: `/pages/appointmenttime/appointmenttime?stationId=${this.list.stationId}&stationItemId=${this.list.stationItemId}&stationItemPriceId=${this.list.stationItemPriceId}`,
|
||||
})
|
||||
} else {
|
||||
that.usershow = true
|
||||
}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '未登录,请先登录',
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (that.timer) {
|
||||
@ -114,24 +96,20 @@
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '未登录,请先登录',
|
||||
type: 'error'
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
} catch (e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '未登录,请先登录',
|
||||
type: 'error'
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
},
|
||||
//跳转完善页面
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="time" style="" v-if="list.orderStatus=='WAIT_PAY'&×tamp>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'&×tamp<=0">
|
||||
订单已关闭
|
||||
</view>
|
||||
<view class="OrderStatus" v-if="list.orderStatus=='REFUNDED'||list.orderStatus=='CANCEL'">
|
||||
订单已关闭
|
||||
</view>
|
||||
@ -72,7 +69,7 @@
|
||||
v-if="list.orderStatus=='PAY'||list.orderStatus=='WAIT_DISPATCH'||list.orderStatus=='NOT_FINISH'">取消订单
|
||||
</view>
|
||||
<view class="cancelorder" @tap='buy' style="background-color: darkorange;"
|
||||
v-if="list.orderStatus=='WAIT_PAY'&×tamp>0">
|
||||
v-if="list.orderStatus=='WAIT_PAY'">
|
||||
去支付
|
||||
</view>
|
||||
<view class="cancelorder" style="background: #4C7BC9;" v-if="list.orderStatus=='EVALUATED'" @tap='lookrate'>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
<view class="Consumablespackage">耗材包详情:
|
||||
<text class="money">¥{{consumableTotalPrice}}</text>
|
||||
<view class="detail">
|
||||
<u-checkbox-group @change="checkboxGroupChange" >
|
||||
<u-checkbox-group @change="checkboxGroupChange">
|
||||
<u-checkbox @change="checkboxChange(item)" v-model="item.radio"
|
||||
v-for="(item, index) in orderlist.itemConsumableList" :key="index"
|
||||
:name="item.consumableDetail">
|
||||
@ -261,13 +261,9 @@
|
||||
//被护理人信息
|
||||
getAppPatientList(value).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) {
|
||||
@ -320,7 +316,7 @@
|
||||
// title: '预约成功',
|
||||
// type: 'success',
|
||||
// url: '/pages/paysuccess/paysuccess',
|
||||
// toast: 1500
|
||||
// duration: 1500
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
|
||||
@ -174,7 +174,9 @@
|
||||
display: inline-block;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
span {
|
||||
|
||||
@ -137,41 +137,49 @@
|
||||
//提交信息
|
||||
informationinfo() {
|
||||
let that = this
|
||||
if (this.addresslength.length > 2) {
|
||||
try {
|
||||
const value = uni.getStorageSync('phone');
|
||||
if (value) {
|
||||
that.query.phone = value
|
||||
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
|
||||
if (this.addresslength) {
|
||||
if (this.addresslength.length > 2) {
|
||||
try {
|
||||
const value = uni.getStorageSync('phone');
|
||||
if (value) {
|
||||
that.query.phone = value
|
||||
information(that.query).then(res => {
|
||||
if (res.code == 200) {
|
||||
that.$refs.uToast.show({
|
||||
title: '完善信息成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
}, 1500)
|
||||
} else if (res.code == 500) {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
} catch (e) {}
|
||||
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'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '地址不完整,请选择到区级',
|
||||
title: '所属区域应选择所在的区或街道,请重新选择!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
//获取所在位置
|
||||
getAddress() {
|
||||
@ -202,18 +210,21 @@
|
||||
getpickerParentValue(e) {
|
||||
this.addresslength = e
|
||||
if (e.length == 4) {
|
||||
this.address = e[0].localName + '-' + e[1].localName + '-' + e[2].localName + '-' + e[3]
|
||||
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.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.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
|
||||
} else {
|
||||
this.address = ''
|
||||
this.query.areaCode = ''
|
||||
}
|
||||
},
|
||||
// 显示三级地址联动
|
||||
@ -221,11 +232,6 @@
|
||||
this.areashow = true
|
||||
this.$refs.cityPicker.show();
|
||||
},
|
||||
//区街道选择
|
||||
areaconfirm(e) {
|
||||
this.query.areaCode = e[e.length - 1].value
|
||||
this.address = e[0].label + '-' + e[1].label
|
||||
},
|
||||
//点击所需服务
|
||||
addnurseType(item) {
|
||||
if (this.query.nurseTypeIdList.findIndex(e => e == item.id) == -1) {
|
||||
@ -259,15 +265,7 @@
|
||||
if (value) {
|
||||
that.query.patientId = value
|
||||
}
|
||||
} catch (e) {
|
||||
// error
|
||||
}
|
||||
// uni.getStorage({
|
||||
// key: 'patientId',
|
||||
// success: function(res) {
|
||||
// that.query.patientId = res.data
|
||||
// }
|
||||
// });
|
||||
} catch (e) {}
|
||||
this.areaInfo()
|
||||
this.getNurseTypeInfo();
|
||||
},
|
||||
|
||||
@ -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,23 @@
|
||||
showPicker: false, //显示选取器
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onShow() {},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onUnload() {},
|
||||
methods: {
|
||||
goemit() {
|
||||
var list = null
|
||||
console.log(this.tabbars)
|
||||
if (this.tabbars[this.tabbars.length - 1].localName == '请选择') {
|
||||
list = this.tabbars.filter(e => e.localName != '请选择')
|
||||
}else{
|
||||
list = this.tabbars
|
||||
}
|
||||
this.$emit("funcValue", list);
|
||||
this.hide();
|
||||
},
|
||||
/**
|
||||
* 显示选择器
|
||||
*/
|
||||
@ -259,10 +275,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 +287,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 +341,7 @@
|
||||
}
|
||||
|
||||
.nav-bar-title {
|
||||
font-size: 12px;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.current {
|
||||
@ -321,7 +356,7 @@
|
||||
}
|
||||
|
||||
.panel-scroll-box {
|
||||
height: 516rpx;
|
||||
height: 750rpx;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
@ -341,7 +376,7 @@
|
||||
/* #endif */
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
font-size: 13px;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.hide {
|
||||
|
||||
@ -88,7 +88,6 @@
|
||||
return {
|
||||
baseurl: '',
|
||||
patientId: '', //id
|
||||
openid: '', //id
|
||||
list: {},
|
||||
orderNo: '',
|
||||
timestamp: 0,
|
||||
@ -103,59 +102,11 @@
|
||||
that.patientId = value
|
||||
}
|
||||
} catch (e) {}
|
||||
try {
|
||||
const value = uni.getStorageSync('openid');
|
||||
if (value) {
|
||||
that.openid = value
|
||||
}
|
||||
} catch (e) {}
|
||||
this.getlist(JSON.parse(options.list).orderNo)
|
||||
},
|
||||
methods: {
|
||||
//支付
|
||||
buy() {
|
||||
var that = this
|
||||
let obj = {
|
||||
patientId: this.patientId,
|
||||
openid: this.openid,
|
||||
orderNo: this.list.orderNo,
|
||||
orderChannel: "WECHAT_APPLET",
|
||||
paymentPrice: this.list.totalPrice,
|
||||
payType: "WECHAT_PAY",
|
||||
buySource: "NURSE_STATION",
|
||||
}
|
||||
appletAppointmentOrderPay(obj).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.$refs.uToast.show({
|
||||
title: '支付成功',
|
||||
type: 'success',
|
||||
toast: 1500,
|
||||
url: `/pages/paysuccess/paysuccess?delta=${3}`
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
that.$refs.uToast.show({
|
||||
title: '取消支付',
|
||||
type: 'error',
|
||||
toast: 1500,
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: response.msg,
|
||||
type: 'error',
|
||||
toast: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//打电话
|
||||
gophone() {
|
||||
|
||||
@ -159,6 +159,9 @@
|
||||
display: inline-block;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
span {
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<view class="item" @tap='getAddress'>
|
||||
<span>所在位置:</span>
|
||||
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||
{{chooseLocation}}
|
||||
{{appPersonallist.locationName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="disease" style="border: none;" @tap="godisease">
|
||||
@ -52,8 +52,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" />
|
||||
@ -147,21 +145,13 @@
|
||||
that.appPersonallist.homeLatitude = Number(that.appPersonallist.homeLatitude)
|
||||
that.appPersonallist.homeLongitude = Number(that.appPersonallist.homeLongitude)
|
||||
that.img = baseurl + that.appPersonallist.headPictureUrl
|
||||
if (that.appPersonallist.streetName) {
|
||||
that.address = that.appPersonallist.provinceName + '-' + that.appPersonallist
|
||||
.cityName + '-' + that.appPersonallist.regionName + '-' + that.appPersonallist
|
||||
.streetName
|
||||
} else {
|
||||
that.address = that.appPersonallist.provinceName + '-' + that.appPersonallist
|
||||
.cityName + '-' + that.appPersonallist.regionName
|
||||
if (that.appPersonallist.areaName) {
|
||||
that.address = that.appPersonallist.areaName
|
||||
}
|
||||
that.patientDiseaseInfoList = that.appPersonallist.patientDiseaseInfoList
|
||||
that.patientDiseaseInfoList.forEach(e => {
|
||||
e.id = e.diseaseId
|
||||
})
|
||||
if (that.appPersonallist.locationName) {
|
||||
that.chooseLocation = that.appPersonallist.locationName
|
||||
}
|
||||
} else if (Response.code == 9999) {} else {}
|
||||
})
|
||||
} else {}
|
||||
@ -172,18 +162,21 @@
|
||||
getpickerParentValue(e) {
|
||||
this.addresslength = e
|
||||
if (e.length == 4) {
|
||||
this.address = e[0].localName + '-' + e[1].localName + '-' + e[2].localName + '-' + e[3]
|
||||
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.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.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
|
||||
}else {
|
||||
this.address = ''
|
||||
this.appPersonallist.areaCode = ''
|
||||
}
|
||||
},
|
||||
// 显示三级地址联动
|
||||
@ -271,7 +264,7 @@
|
||||
that.data();
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '地址不完整,请选择到区级',
|
||||
title: '所属区域应选择所在的区或街道,请重新选择!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
@ -309,17 +302,11 @@
|
||||
uni.chooseLocation({
|
||||
success: function(res) {
|
||||
that.appPersonallist.locationName = res.address
|
||||
that.chooseLocation = res.name
|
||||
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
|
||||
},
|
||||
//区街道
|
||||
areaInfo() {
|
||||
getSubordinateRegions().then(res => {
|
||||
|
||||
@ -29,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 {
|
||||
@ -53,7 +54,7 @@
|
||||
}
|
||||
|
||||
.ups {
|
||||
margin-right: 30rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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,7 +38,7 @@
|
||||
</span>
|
||||
</view>
|
||||
<!-- 弹框 -->
|
||||
<u-popup v-model="show" mode="center" width="80%" height="50%" border-radius="30" @close='cencel()'>
|
||||
<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()">
|
||||
@ -39,21 +51,27 @@
|
||||
</u-field>
|
||||
<view class="area" @click="showPicker">
|
||||
<!-- <view class="area" @tap='areashow=true'> -->
|
||||
<u-field v-model="address" label="地区" placeholder="请选择" class="items" disabled>
|
||||
<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-toast ref="uToast" />
|
||||
<view class="" v-if="cityPickershow">
|
||||
<m-city style='z-index: 10076;' :provinceData="list" headTitle="地区选择" ref="cityPicker"
|
||||
@ -71,7 +89,8 @@
|
||||
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";
|
||||
@ -86,7 +105,6 @@
|
||||
delshow: false, //删除弹框
|
||||
content: '确认要删除信息吗?',
|
||||
show: false, //弹框
|
||||
address: null,
|
||||
// areashow: false, //经纬度开关
|
||||
// arealist: [], //区街道list
|
||||
areaCode: '',
|
||||
@ -97,7 +115,8 @@
|
||||
receiveAddress: '',
|
||||
areaCode: null,
|
||||
patientId: '',
|
||||
address: null, //页面所属区域
|
||||
address: '', //页面所属区域
|
||||
defaultAddressFlag: false,
|
||||
},
|
||||
goodPatient: [], // 查询地址信息
|
||||
patientId: null,
|
||||
@ -121,29 +140,56 @@
|
||||
this.updata = JSON.parse(options.updata)
|
||||
},
|
||||
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) {
|
||||
console.log(e)
|
||||
this.addresslength = e
|
||||
if (e.length == 4) {
|
||||
this.infolist.address = e[0].localName + '-' + e[1].localName + '-' + e[2].localName + '-' + e[3]
|
||||
.localName
|
||||
this.address = e[0].localName + '-' + e[1].localName + '-' + e[2].localName + '-' + e[3]
|
||||
this.infolist.address = ''
|
||||
this.infolist.areaCode = ''
|
||||
if (e && e.length >= 1) {
|
||||
e.forEach(el => {
|
||||
this.infolist.address = this.infolist.address + el.localName
|
||||
})
|
||||
this.infolist.areaCode = e[e.length - 1].id
|
||||
}
|
||||
/* 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.address = e[0].localName + '-' + e[1].localName + '-' + e[2].localName
|
||||
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.address = e[0].localName + '-' + e[1].localName
|
||||
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.address = e[0].localName
|
||||
this.infolist.areaCode = e[0].id
|
||||
}
|
||||
} else {
|
||||
this.infolist.address = ''
|
||||
this.infolist.areaCode = ''
|
||||
} */
|
||||
},
|
||||
// 显示三级地址联动
|
||||
showPicker() {
|
||||
@ -163,117 +209,139 @@
|
||||
// 查询地址信息
|
||||
goodsList() {
|
||||
let that = this
|
||||
try {
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
that.patientId = value
|
||||
goodPatientInfo(that.patientId).then(res => {
|
||||
res.data.forEach(e => {
|
||||
e.address = e.provinceName + e.cityName + e.regionName + e
|
||||
.streetName + e.receiveAddress
|
||||
})
|
||||
that.goodPatient = res.data
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
that.patientId = value
|
||||
goodPatientInfo(that.patientId).then(res => {
|
||||
res.data.forEach(e => {
|
||||
e.address = e.areaName + e.receiveAddress
|
||||
if (e.defaultAddressFlag == 1) {
|
||||
e.defaultAddressFlag = true
|
||||
} else {
|
||||
e.defaultAddressFlag = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录状态异常',
|
||||
type: 'error'
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
})
|
||||
|
||||
}, 1500)
|
||||
that.goodPatient = res.data
|
||||
})
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录状态异常',
|
||||
type: 'error'
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
} catch (e) {}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
},
|
||||
// 保存按钮
|
||||
data() {
|
||||
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.cencel();
|
||||
setTimeout(e => {
|
||||
that.goodsList()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
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'
|
||||
})
|
||||
this.Toast()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.Toast()
|
||||
}
|
||||
} else {
|
||||
if (that.addresslength) {
|
||||
if (that.addresslength.length > 2) {
|
||||
this.xgdata();
|
||||
} else {
|
||||
this.Toast()
|
||||
}
|
||||
} else {
|
||||
this.xgdata();
|
||||
}
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
if (this.addresslength) {
|
||||
if (this.addresslength.length > 2) {
|
||||
this.data();
|
||||
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 {
|
||||
this.$refs.uToast.show({
|
||||
title: '地址不完整,请选择到区级',
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.data()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 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 => {
|
||||
if (res.data.streetName) {
|
||||
this.infolist.address = res.data.provinceName + '-' + res.data.cityName +
|
||||
'-' +
|
||||
res
|
||||
.data.regionName + '-' + res.data.streetName
|
||||
this.address = res.data.provinceName + '-' + res.data.cityName +
|
||||
'-' +
|
||||
res
|
||||
.data.regionName + '-' + res.data.streetName
|
||||
getSubordinate(res.data.areaCode).then(resp => {
|
||||
if (resp.data.streetName) {
|
||||
res.data.address = resp.data.provinceName + resp.data.cityName + resp.data
|
||||
.regionName + resp.data.streetName
|
||||
} else {
|
||||
this.infolist.address = res.data.provinceName + '-' + res.data.cityName +
|
||||
'-' +
|
||||
res
|
||||
.data.regionName
|
||||
this.address = res.data.provinceName + '-' + res.data.cityName +
|
||||
'-' +
|
||||
res
|
||||
.data.regionName
|
||||
res.data.address = resp.data.provinceName + resp.data.cityName + resp.data
|
||||
.regionName
|
||||
}
|
||||
this.infolist = res.data
|
||||
this.show = true
|
||||
})
|
||||
})
|
||||
console.log(this.infolist)
|
||||
},
|
||||
// 新增
|
||||
add() {
|
||||
this.shipAddress = '添加地址'
|
||||
this.cityPickershow = true
|
||||
this.infolist = {
|
||||
receiveName: '',
|
||||
@ -281,6 +349,7 @@
|
||||
receiveAddress: '',
|
||||
areaCode: '',
|
||||
patientId: this.patientId,
|
||||
address: '',
|
||||
}
|
||||
this.isedit = true
|
||||
this.show = true
|
||||
@ -343,11 +412,6 @@
|
||||
// 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()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="time" style="" v-if="order.orderStatus=='WAIT_PAY'&×tamp>0">
|
||||
<view class="time" style="" v-if="order.orderStatus=='WAIT_PAY'">
|
||||
剩余付款时间:
|
||||
<u-count-down style='' :timestamp="timestamp">
|
||||
</u-count-down>
|
||||
@ -60,7 +60,7 @@
|
||||
<!-- <span>发货时间:<text>2022-10-28 11:31:26</text></span> -->
|
||||
<!-- <span>成交时间:<text>2022-10-28 11:31:26</text></span> -->
|
||||
</view>
|
||||
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'&×tamp>0">
|
||||
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'">
|
||||
<view class="pay">
|
||||
去支付
|
||||
</view>
|
||||
|
||||
@ -86,7 +86,6 @@
|
||||
baseurl: '',
|
||||
order: null,
|
||||
patientId: '',
|
||||
openid: null,
|
||||
orderStatus: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
@ -98,7 +97,6 @@
|
||||
pay() {
|
||||
var that = this
|
||||
let paydata = this.order
|
||||
paydata.openid = this.openid
|
||||
paydata.payType = "WECHAT_PAY"
|
||||
paydata.paymentPrice = this.order.totalPrice
|
||||
paydata.orderChannel = 'WECHAT_APPLET'
|
||||
@ -115,7 +113,7 @@
|
||||
// that.$refs.uToast.show({
|
||||
// title: '支付成功',
|
||||
// type: 'success',
|
||||
// toast: 1500,
|
||||
// duration: 1500,
|
||||
// url: `/pages/paysuccess/paysuccess?delta=${3}`
|
||||
// })
|
||||
// },
|
||||
@ -123,7 +121,7 @@
|
||||
// that.$refs.uToast.show({
|
||||
// title: '取消支付',
|
||||
// type: 'error',
|
||||
// toast: 1500,
|
||||
// duration: 1500,
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
@ -131,7 +129,7 @@
|
||||
// that.$refs.uToast.show({
|
||||
// title: response.msg,
|
||||
// type: 'error',
|
||||
// toast: 2000
|
||||
// duration: 2000
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
@ -167,12 +165,6 @@
|
||||
that.goodsOrderinfo(options.goodsOrderId)
|
||||
}
|
||||
} catch (e) {}
|
||||
try {
|
||||
const value = uni.getStorageSync('openid');
|
||||
if (value) {
|
||||
that.openid = value
|
||||
} else {}
|
||||
} catch (e) {}
|
||||
},
|
||||
onUnload() {},
|
||||
}
|
||||
|
||||
@ -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,30 +19,30 @@
|
||||
</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="addressitem" v-if="appPersonallist.streetName">
|
||||
<view class="addressitem" v-if="appPersonallist.areaName">
|
||||
<view class="" style="padding-left: 5%;">
|
||||
区域:
|
||||
</view>
|
||||
<view class="address" style="">
|
||||
{{appPersonallist.provinceName}}-{{appPersonallist.cityName}}-{{appPersonallist.regionName}}-{{appPersonallist.streetName}}
|
||||
{{appPersonallist.areaName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="addressitem" v-else>
|
||||
@ -50,7 +50,6 @@
|
||||
区域:
|
||||
</view>
|
||||
<view class="address" style="">
|
||||
{{appPersonallist.provinceName}}-{{appPersonallist.cityName}}-{{appPersonallist.regionName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="addressitem" style="height:100%" v-if="appPersonallist.address">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user