This commit is contained in:
曹辉 2023-01-10 10:35:17 +08:00
parent 9b14a11158
commit ae186518d5
19 changed files with 1369 additions and 479 deletions

View File

@ -1,13 +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',
@ -17,7 +18,7 @@ export function addnursingStation(data){
// 修改基本信息
export function updatenursingStation(data){
export function updatenursingStation(data) {
return request({
url: '/nurseApplet/nursingStationGoods/edit',
method: 'POST',
@ -25,7 +26,7 @@ export function updatenursingStation(data){
})
}
// 修改反显
export function nursingStationGoodsinfo(id){
export function nursingStationGoodsinfo(id) {
return request({
url: '/nurseApplet/nursingStationGoods/' + id,
method: 'GET'
@ -34,24 +35,36 @@ 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'
})
}

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,6 +9,13 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}, {
"path": "pages/information/information",
"style": {
"navigationBarTitleText": "完善个人信息",
"navigationBarBackgroundColor": "#ffffff", //
"enablePullDownRefresh": false
}
},
{
"path": "pages/forgotPassword/forgotPassword",
@ -70,13 +77,6 @@
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
}
}, {
"path": "pages/information/information",
"style": {
"navigationBarTitleText": "完善个人信息",
"navigationBarBackgroundColor": "#ffffff", //
"enablePullDownRefresh": false
}
}, {
"path": "pages/appointmenttime/appointmenttime",
"style": {
@ -154,7 +154,7 @@
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
// "navigationStyle": "custom"
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},

View File

@ -1,10 +1,13 @@
<template>
<view class="app">
<u-swiper :list="info" height="750"></u-swiper>
<u-swiper :list="info" height="750" style='background-size: 100%;'></u-swiper>
<view class="Commodity common">
<view class="name">
<view class="name" v-if="goodsDetailslist.goodsName">
{{goodsDetailslist.goodsName}}
</view>
<view class="name" v-else>
暂无
</view>
<view class="price">
{{goodsPrice}}
</view>
@ -45,7 +48,7 @@
</view>
<view class="textInfo" v-html="goodsDetailslist.goodsRemark">
</view>
<!-- <image style="padding: 0; margin: 0;" v-for="item in info" :src="item.image" mode=""></image> -->
<!-- <image v-for="(item,index) in info" :src="item.image" mode=""></image> -->
</view>
<view class="Purchasecolumn">
<view class="buy" @tap="buyshow=true">
@ -56,12 +59,15 @@
<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="goodsDetailslist.goodsPictureUrl" mode=""></image>
<image :src="updata.img" mode=""></image>
</view>
<view class="title">
<span>{{goodsDetailslist.goodsName}}</span>
<view class="title" v-if="goodsDetailslist.goodsName">
{{goodsDetailslist.goodsName}}
</view>
<view class="title" v-else>
暂无
</view>
<view class="price">
{{updata.goodsPrice}}
@ -70,31 +76,67 @@
库存数量:{{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">
{{updata.receiver}},{{updata.phone}}
</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">
<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">
立即购买
@ -130,19 +172,25 @@
goodPatientInfo
} from '@/api/modifyAddress/modifyAddress.js';
import baseurl from '@/api/baseurl.js'
import {
addStationGoodsOrder,
appletGoodsOrderPay
} from '@/api/confirmOrder/index.js'
export default {
data() {
return {
timer: null,
goodsInfoId: null, //id
usershow: false, //
image: null, //
baseurl: '', //url
image: null, //
usershow: false, //
goodsPrice: '', //
goodsDetailslist: [], //list
goodDetailsLists: [], //
goodshow: true, //
buyshow: false, //
info: [], //list
goodsAttributeId: null, //id
updata: { //
goodsPrice: 0.00,
goodsName: "",
@ -151,24 +199,34 @@
nurseStationId: '',
img: '',
totalPrice: null,
patientId: '',
patientId: null,
goodsStock: 0, //
goodsAttributeContent: '', //
giveIntegral: 0, //
transportPrice: 0.00, //
discountPrice: 0.00, //
buySource: '', // 'NURSE_STATIONSHOPPING_MALL'
orderChannel: 'MOBILE_APP', // AppMOBILE_APPWECHAT_APPLETALI_PAY_APPLET'
orderChannel: 'WECHAT_APPLET', // AppMOBILE_APPWECHAT_APPLETALI_PAY_APPLET'
receiver: "", //
receiveAddress: "", //
phone: '', //
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
@ -178,67 +236,8 @@
},
//
tapbuy() {
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
if (!that.updata.patientId) {
that.goodsList()
}
that.updata.patientId = value
AppIdentification(value).then(res => {
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 {
that.buyshow = false
uni.navigateTo({
url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(that.updata)}`
})
}
} else {
that.buyshow = false
that.usershow = true
}
})
} else {
uni.navigateTo({
url: '/pages/login/login'
})
}
} catch (e) {
// error
}
console.log(this.updata)
},
// tapbuy() {
// this.goodsDetailslist.goodDetailsLists.forEach(e => {
// e.goodAttributeDetailsLists.forEach(el => {
// if (el.isActive == true) {
// this.updata.goodsAttributeName += el.attributeDetailsName + ' '
// this.updata.totalPrice = (this.updata.goodsPrice * this.updata.goodsCount)
// .toFixed(2)
// }
// })
// })
// },
//
isActivegoods(item) {
this.updata.goodsPrice = 0
@ -267,35 +266,11 @@
this.updata.goodsAttributeDetailsId = item.attributeDetailsId
}
},
// isActivegoods(item, bitem) {
// if (item.attributeName.includes('')) {} else {
// if (bitem.isActive == true) {
// item.goodAttributeDetailsLists.forEach(e => {
// e.isActive = false
// })
// } else {
// item.goodAttributeDetailsLists.forEach(e => {
// e.isActive = false
// })
// bitem.isActive = true
// }
// }
// this.updata.goodsPrice = 0
// this.updata.goodsAttributeName = ''
// this.goodsDetailslist.goodDetailsLists.forEach(e => {
// e.goodAttributeDetailsLists.forEach(el => {
// if (el.isActive == true) {
// this.updata.goodsPrice += el.goodsPrice
// this.updata.goodsAttributeName += el.attributeDetailsName + ' '
// }
// })
// })
// this.updata.goodsPrice = this.updata.goodsPrice.toFixed(2)
// },
//
goodsDetailsinfo(goodsInfoId) {
let that = this
goodsDetails(goodsInfoId).then(res => {
uni.removeStorageSync('Refresh');
if (res.data[0].goodsRemark) {
res.data[0].goodsRemark = res.data[0].goodsRemark.replace(/\<img/gi,
"<br/> <img class='richPic'")
@ -325,23 +300,46 @@
this.goodsDetailslist = res.data[0]
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
// res.data[0].goodDetailsLists.forEach(e => {
// e.goodAttributeDetailsLists.forEach(el => {
// el.isActive = false
// el.goodsPrice = Number(el.goodsPrice)
// })
// })
// this.goodsDetailslist = res.data[0]
// this.updata.goodsName = this.goodsDetailslist.goodsName
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.goodDetailsLists.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 = this.goodsDetailslist.goodsPictureUrl
// this.goodDetailsLists = res.data[0].goodDetailsLists
// this.updata.img = res.data[0].goodsPictureUrl
// this.updata.goodsAttributeName = ''
// this.updata.goodsPrice = 0
// this.updata.attributeDetailsId = ''
// this.updata.goodsStock = 0
// this.updata.img = list.image
})
},
//
upaddress() {
uni.navigateTo({
url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.updata)}`
})
},
//
@ -354,28 +352,56 @@
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
})
},
},
onLoad(options) { //
var that = this
this.goodsAttributeId = options.goodsAttributeId
this.updata.buySource = options.buySource
this.goodsPrice = options.goodsPrice //
if (options.goodsPrice == 'null' || !options.goodsPrice) {
this.goodsPrice = 0 //
} else {
this.goodsPrice = options.goodsPrice //
}
this.goodsInfoId = options.goodsInfoId
},
onShow() {
this.baseurl = baseurl
this.usershow = false
this.goodsDetailsinfo(this.goodsInfoId)
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.updata.patientId = value
that.goodsList()
} else {}
} catch (e) {
// error
}
} catch (e) {}
},
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 == 0) {
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
}
})
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.userid = useritem.id
}
})
},
}
</script>

View File

@ -1,84 +1,128 @@
.app {
padding: 0;
.mask {
.information {
width: 70%;
height: 400rpx;
margin: 50% auto;
background: #FFFFFF;
border-radius: 30rpx;
text-align: center;
color: #FFFFFF;
position: relative;
.determine,
.cancel {
width: 200rpx;
height: 70rpx;
border-radius: 26rpx;
font-size: 34rpx;
line-height: 70rpx;
position: absolute;
top: 74%;
}
.determine {
background: #4C7BC9;
right: 36rpx;
}
.cancel {
background: #C5BFBF;
left: 36rpx;
}
.title {
font-size: 42rpx;
margin-top: 40rpx;
color: #000000;
}
image {
width: 100rpx;
height: 100rpx;
margin: 10% 0 0 0;
}
.app {
padding: 0;
.scroll-Y {
height: 790rpx;
background-color: #F4F5F7;
}
.mask {
.information {
width: 70%;
height: 400rpx;
margin: 50% auto;
background: #FFFFFF;
border-radius: 30rpx;
text-align: center;
color: #FFFFFF;
position: relative;
.determine,
.cancel {
width: 200rpx;
height: 70rpx;
border-radius: 26rpx;
font-size: 34rpx;
line-height: 70rpx;
position: absolute;
top: 74%;
}
.determine {
background: #4C7BC9;
right: 36rpx;
}
.cancel {
background: #C5BFBF;
left: 36rpx;
}
.title {
font-size: 42rpx;
margin-top: 40rpx;
color: #000000;
}
image {
width: 100rpx;
height: 100rpx;
margin: 10% 0 0 0;
}
}
}
.mask {
.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{
width:92%;
font-size: 32rpx;
word-break:break-all;
}
.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 {
.goodsStock{
font-size: 24rpx;
position: absolute;
top: 73%;
left: 75%;
}
.price {
color: #D43953;
position: absolute;
@ -89,19 +133,23 @@
.title {
font-size: 36rpx;
position: absolute;
top: 0%;
top: 3%;
left: 38%;
font-weight: 600;
width: 58%;
height: 85rpx;
// height: 85rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
word-break: break-all;
}
.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;
@ -119,16 +167,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 {
@ -139,37 +212,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: 1rpx solid #FFFFFF;
}
.Productmodel {
font-size: 24rpx;
display: inline-block;
height: 60rpx;
background: #ECF1FA;
border: 1rpx solid #4C7BC9;
line-height: 60rpx;
border-radius: 25rpx;
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;
}
}
}
}
@ -243,21 +333,18 @@
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
position: relative;
padding-bottom: 110rpx;
.textInfo {
word-break: break-all;
.textInfo {
word-break:break-all;
font-size: 29rpx;
text-indent: 2rem;
line-height: 42rpx;
// color: #666666;
padding: 0 20rpx;
/deep/ .richPic {
width: 100% !important;
height: 100% !important;
}
}
.selected {
padding: 20rpx 0 0 5%;
color: #969394;
@ -297,6 +384,7 @@
.name,
.number {
word-break: break-all;
width: 100%;
display: inline-block;
line-height: 50rpx;

View File

@ -1,6 +1,7 @@
.app {
width: 100%;
padding: 3%;
padding: 3%;
.noorder{
margin-top: 20%;
image{
@ -149,6 +150,7 @@
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
span:nth-child(2) {
@ -166,12 +168,19 @@
top: 45%;
width: 68%;
.box {
.box:nth-child(1) {
width: 70%;
display: inline-block;
font-size: 30rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.box:nth-child(2) {
width: 30%;
position: absolute;
text-align: center;
right: 0%;
}
}
@ -230,6 +239,7 @@
height: 65rpx;
// top: 8%;
left: 10%;
width: 90%;
font-size: 26rpx;
color: #000000;
}

View File

@ -4,12 +4,15 @@
<i class="icon"></i>
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入商品名称">
</view>
<view class="productlist">
<view class="productlist" v-if='goodsList.length>0'>
<view class="item" @tap='goCommodityDetails(item)' v-for="(item,index) in goodsList" :key="index">
<image :src="baseurl+item.goodsPictureUrl" mode=""></image>
<view class="title">
{{item.goodsName}}
</view>
<view class="text">
{{item.attributeDetailsName}}
</view>
<view class="price">
{{item.goodsPrice}}
</view>
@ -17,6 +20,12 @@
<view style="width:45%" v-if="goodsList.length%2!=0">
</view>
</view>
<view class="noorder" v-if='goodsList.length==0'>
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无商品
</view>
</view>
</view>
</template>
@ -66,7 +75,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}`
})
},
},
@ -98,6 +107,21 @@
.app {
padding: 0;
.noorder {
view {
text-align: center;
font-size: 40rpx;
color: #BFBFBF;
}
image {
display: block;
margin: 20% auto 50rpx;
width: 160rpx;
height: 200rpx;
}
}
.inputs {
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border: 1px solid #f0f0f0;
@ -134,7 +158,7 @@
.productlist {
width: 100%;
margin: 0 auto;
padding: 40rpx 0 0 0;
padding: 20rpx 0 0 0;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
@ -147,18 +171,32 @@
box-shadow: 0px 4rpx 8rpx 4rpx rgba(199, 200, 202, 0.8);
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;
@ -167,6 +205,7 @@
image {
width: 100%;
height: 340rpx;
border-radius: 25rpx 25rpx 0 0;
}
}
}

View File

@ -45,7 +45,7 @@
<view class="Consumablespackage">耗材包详情
<text class="money">{{consumableTotalPrice}}</text>
<view class="detail">
<u-checkbox-group @change="checkboxGroupChange" wrap='true'>
<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">

View File

@ -174,6 +174,7 @@
display: inline-block;
height: 120rpx;
line-height: 120rpx;
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
}
span {

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>
@ -31,8 +31,11 @@
</view>
</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="">
<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">
@ -91,10 +94,15 @@
getNurseType,
information
} from '@/api/information/index.js'
import {
getSubordinateRegions,
} from '@/api/modifyAddress/modifyAddress.js';
import contenttext from './text.vue'
import gkcity from "../m-city/m-city.vue";
export default {
components: {
contenttext
contenttext,
"m-city": gkcity
},
data() {
return {
@ -116,41 +124,54 @@
nurseTypeIdList: [],
diseaseInfoList: [],
patientId: '',
}
},
addresslength: null,
list: [{
id: "",
localName: "请选择",
children: [],
}, ],
};
},
methods: {
//
informationinfo() {
let that = this
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.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'
})
}
},
//
getAddress() {
@ -173,21 +194,33 @@
},
//
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;
})
},
//
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();
},
//
areaconfirm(e) {
this.query.areaCode = e[e.length - 1].value

369
pages/m-city/m-city.vue Normal file
View File

@ -0,0 +1,369 @@
<template>
<view>
<view class="mask" :class="{ maskShow: showPicker }" @click="hide" @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">
</icon>
</view>
<scroll-view id="nav-bar" class="nav-bar" scroll-x="true" scroll-with-animation="true"
:scroll-left="scrollLeft">
<view v-for="(item, index) in tabbars" class="nav-item" :key="index" :id="'tab' + index"
@click="changeTab(index)" :class="{ current: index === tabCurrentIndex }"><text
class="nav-bar-title">{{ item.localName }}</text></view>
</scroll-view>
<view class="city_content">
<scroll-view class="panel-scroll-box" :scroll-y="enableScroll" :cscrollTop="scrollTop"
:current="tabCurrentIndex" :scroll-top="scrollTop">
<block v-for="(item, index) in tabbars[tabCurrentIndex].children" :key="index">
<view class="flex-row-c-c" @click="changCity(tabCurrentIndex, item)">
<text class="city-text"
:class="{ color: tabbars[tabCurrentIndex].id == item.id }">{{ item.areaName }}</text>
<icon type="success_no_circle" v-if="tabbars[tabCurrentIndex].id == item.id"
:id="'show' + tabCurrentIndex" class="ischeck" size="14" :color="$lightColor"></icon>
</view>
</block>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
let windowWidth = 0
import {
getSubordinateRegions,
getSubordinateInfo
} from '@/api/modifyAddress/modifyAddress.js';
export default {
name: "UniCityNvue",
props: {
headTitle: {
//
type: String,
default: "地区选择",
},
pickerSize: {
// 使tab
type: [String, String],
default: "1",
},
provinceData: {
// id使id[]
type: Array,
default: function() {
return [];
},
},
},
data() {
return {
clearRightIcon: true, //icon
scrollLeft: 500, //
scrollTop: 0, //0
enableScroll: true, //
tabCurrentIndex: 0, //
tabbars: [{
id: "",
localName: "请选择",
children: [],
}, ], //id
pickersize: this.pickerSize, //tab 4
showPicker: false, //
};
},
onShow() {
},
onLoad() {
},
onUnload() {},
methods: {
/**
* 显示选择器
*/
show() {
this.showPicker = true;
this.tabbars[0].children = this.provinceData;
// if (this.tabbars[0].children.length == 0) {
// getSubordinateRegions('').then((res) => {
// if (res.code == 200) {
// }
// });
// }
windowWidth = uni.getSystemInfoSync().windowWidth;
},
/**
* 关闭选择器
*/
hide() {
this.showPicker = false;
},
/**
* tab切换
*/
changeTab(e) {
let index = e;
this.setScroll(index);
//300ms,swipertabbar
this.tabCurrentIndex = index;
setTimeout(() => {
this.getScroll("show" + index);
}, 10);
},
/**
* 获得元素的大小
*/
getElSize(id) {
return new Promise((res, rej) => {
let el = uni
.createSelectorQuery()
.in(this)
.select("#" + id);
el.fields({
size: true,
scrollOffset: true,
rect: true,
},
(data) => {
res(data);
}
).exec();
});
},
/**
* 点击城市后回调
*/
async changCity(index, item) {
if (this.tabbars[index].id != item.id) {
this.tabbars[index].localName = item.areaName;
this.tabbars[index].id = item.areaCode;
if (index < this.tabbars.length - 1) {
this.tabbars.splice(index + 1, this.tabbars.length - index - 1);
}
if (this.tabbars.length < this.pickersize) {
let data = await getSubordinateInfo(item.areaCode);
//
if (data.data.length == 0) {
this.$emit("funcValue", this.tabbars);
this.hide();
} else {
//
var current = {
localName: "请选择",
id: "",
children: data.data,
};
this.tabbars.push(current);
this.tabCurrentIndex++;
//
this.$set(this, 'scrollTop', 0)
}
} else {
this.$emit("funcValue", this.tabbars);
this.hide();
}
}
},
/**
* 获取当前tab中滚动的距离
*/
async setScroll(index) {
let width = 0;
let nowWidth = 0;
for (let i = 0; i <= index; i++) {
let result = await this.getElSize("tab" + i);
width += result.width;
if (i === index) {
nowWidth = result.width;
}
}
if (width + nowWidth > windowWidth) {
this.scrollLeft = width + nowWidth;
} else {
this.scrollLeft = 0;
}
},
/**
* 计算当前的滚动距离
*/
getScroll(id) {
uni
.createSelectorQuery()
.in(this)
.select(".panel-scroll-box")
.boundingClientRect((data) => {
uni
.createSelectorQuery()
.in(this)
.select("#" + id)
.boundingClientRect((res) => {
if (res != undefined && res != null && res != "") {
this.scrollTop = res.top - data.top;
}
})
.exec();
})
.exec();
},
},
};
</script>
<style lang="scss" scoped>
.mask {
visibility: hidden;
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 1000;
background: rgba(0, 0, 0, 0.6);
opacity: 0;
transition: all 0.3s ease;
}
.maskShow {
visibility: visible;
opacity: 1;
}
.cpicker-content {
position: fixed;
right: 0;
bottom: 0;
left: 0;
background-color: #ffffff;
transition: all 0.3s ease;
transform: translateY(100%);
z-index: 3000;
}
.cpickerShow {
transform: translateY(0);
}
.city-head {
width: 750rpx;
height: 88rpx;
flex-direction: column;
border-bottom-width: 1px;
border-bottom-color: #f4f4f4;
border-bottom-style: solid;
}
.city-head-title {
font-size: 15px;
line-height: 88rpx;
align-items: center;
/* #ifndef APP-NVUE */
text-align: center;
/* #endif */
}
.clearRightIcon {
position: absolute;
right: 15px;
top: 12px;
font-size: 10px;
color: #bebebe;
}
.nav-bar {
position: relative;
z-index: 10;
height: 90rpx;
white-space: nowrap;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
background-color: #fff;
}
.nav-item {
/* #ifndef APP-NVUE */
display: inline-flex !important;
/* #endif */
/* #ifdef APP-NVUE */
flex-direction: row !important;
/* #endif */
width: 170rpx;
padding: 7px 0px;
line-height: 26px;
align-items: center;
justify-content: center;
color: #303133;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
}
.nav-bar-title {
font-size: 12px;
}
.current {
// color: $aider-light-color;
// border-color: $aider-light-color;
border-bottom-width: 4rpx;
border-bottom-style: solid;
}
.current:after {
width: 50%;
}
.panel-scroll-box {
height: 516rpx;
margin-top: 8px;
}
.flex-row-c-c {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
/* #ifdef APP-NVUE */
flex-direction: row;
/* #endif */
padding-left: 25px;
}
.city-text {
/* #ifdef APP-NVUE */
flex-direction: row;
/* #endif */
height: 35px;
line-height: 35px;
font-size: 13px;
}
.hide {
opacity: 0;
}
.ischeck {
/* #ifndef APP-NVUE */
display: inline-flex !important;
/* #endif */
/* #ifdef APP-NVUE */
flex-direction: column;
/* #endif */
margin-right: 5px;
vertical-align: middle;
}
.color {
// color: $light-color;
}
icon {
margin-left: 40rpx;
}
</style>

View File

@ -20,7 +20,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>
@ -31,7 +31,8 @@
<view class="item" @tap='getAddress'>
<span>所在位置:</span>
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{chooseLocation}}</view>
{{chooseLocation}}
</view>
</view>
<view class="disease" style="border: none;" @tap="godisease">
<view style="display: block;line-height: 120rpx;">疾病类型:</view>
@ -51,8 +52,8 @@
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>
<!-- <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" />
@ -73,6 +74,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>
@ -85,9 +91,17 @@
} from '@/api/information/index.js'
import contenttext from '../information/text.vue'
import baseurl from '@/api/baseurl.js'
import gkcity from "../m-city/m-city.vue";
import {
getSubordinateRegions,
} from '@/api/modifyAddress/modifyAddress.js';
import {
appPersonal,
} from '@/api/user/user.js';
export default {
components: {
contenttext
contenttext,
"m-city": gkcity
},
data() {
return {
@ -95,9 +109,12 @@
timer: null,
baseurl: '',
address: '',
arealist: [],
areashow: false,
maskshow:false,//
list: [{
id: "",
localName: "请选择",
children: [],
}, ],
maskshow: false, //
chooseLocation: '',
img: null,
image: null,
@ -115,25 +132,64 @@
locationName: '',
},
patientDiseaseInfoList: [], //
addresslength: null,
}
},
onLoad(options) {
var that = this
this.areaInfo();
this.baseurl = baseurl
this.appPersonallist = JSON.parse(options.appPersonallist)
this.img = baseurl + this.appPersonallist.headPictureUrl
if (this.appPersonallist.regionName && this.appPersonallist.streetName) {
this.address = this.appPersonallist.regionName + '-' + this.appPersonallist.streetName
}
this.patientDiseaseInfoList = this.appPersonallist.patientDiseaseInfoList
this.patientDiseaseInfoList.forEach(e => {
e.id = e.diseaseId
})
if (this.appPersonallist.locationName) {
this.chooseLocation = this.appPersonallist.locationName
}
const value = uni.getStorageSync('patientId');
if (value) {
appPersonal(value).then(Response => {
if (Response.code == 200) {
that.appPersonallist = Response.data
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
}
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 {}
},
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() {
//
@ -253,19 +309,8 @@
},
//
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;
})
},
//

View File

@ -3,9 +3,12 @@
background-color: #F4F5F7;
width: 100%;
position: relative;
height: 100%;
padding: 4%;
padding-bottom: 100rpx;
font-size: 32rpx;
/deep/ .u-drawer{
z-index: 0 !important;
}
.address {
width: 99%;
background: #FFFFFF;
@ -13,19 +16,20 @@
border-radius: 20rpx;
margin: 0 auto 20rpx;
padding-bottom: 10rpx;
.item {
width: 90%;
height: 101rpx;
font-size: 36rpx;
color: #000000;
line-height: 100rpx;
margin: 0 auto;
view{
}
}
.detail {
border-bottom: 5rpx solid #F4F5F7;
height:100%;
font-size: 32rpx;
line-height: 50rpx;
padding-bottom: 20rpx;
word-break:break-all;
@ -44,6 +48,7 @@
background: #FFFFFF;
border: 1rpx solid #969394;
border-radius: 26rpx;
font-size: 31rpx;
color: #969394;
}
@ -58,6 +63,7 @@
line-height: 80rpx;
background: #4C7BC9;
border-radius: 26rpx;
font-size: 34rpx;
color: #FFFFFF;
text-align: center;
position: fixed;
@ -75,10 +81,11 @@
}
}
// 弹框
// 弹框支付
.payment {
width: 90%;
height: 110rpx;
font-size: 36rpx;
color: #000000;
line-height: 110rpx;
text-align: center;
@ -100,6 +107,7 @@
background: #4C7BC9;
border-radius: 26rpx;
text-align: center;
font-size: 34rpx;
color: #FFFFFF;
margin: 0 auto;
margin-top: 10%;
@ -116,6 +124,7 @@
}
.items {
font-size: 32rpx;
color: #030001;
line-height: 40rpx;
}

View File

@ -26,8 +26,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="80%" height="50%" 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,12 +37,12 @@
</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="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>
@ -52,9 +52,14 @@
</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>
@ -69,42 +74,84 @@
getSubordinate
} 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,
timer: null,
isedit: true, //
delshow: false, //
content: '确认要删除信息吗?',
show: false, //
areashow: false, //
arealist: [], //list
address: null,
// areashow: false, //
// arealist: [], //list
areaCode: '',
shipAddress: '添加地址',
infolist: {
receiveName: '',
receivePhone: '',
receiveAddress: '',
areaCode: '',
areaCode: null,
patientId: '',
address: '', //
address: null, //
},
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.goodsList()
this.areaInfo()
},
methods: {
//
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]
.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.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.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
}
},
//
showPicker() {
this.cityPickershow = true
this.$refs.cityPicker.show();
},
//
goorder(item) {
// if (this.url == "appointmenttime") {
uni.$emit('updata', {
updata: JSON.stringify(this.updata),
useritem: JSON.stringify(item)
@ -112,14 +159,6 @@
uni.navigateBack({
delta: 1
});
// uni.navigateTo({
// url: `/pages/appointmenttime/appointmenttime?updata=${JSON.stringify(this.updata)}&useritem=${JSON.stringify(item)}`
// })
// } else {
// uni.navigateTo({
// url: `/pages/confirmOrder/confirmOrder?updata=${JSON.stringify(this.updata)}&useritem=${JSON.stringify(item)}`
// })
// }
},
//
goodsList() {
@ -128,7 +167,6 @@
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
that.infolist.patientId = value
goodPatientInfo(that.patientId).then(res => {
res.data.forEach(e => {
e.address = e.provinceName + e.cityName + e.regionName + e
@ -148,67 +186,89 @@
uni.navigateBack({
delta: 2
})
}, 1500)
}
} catch (e) {}
// uni.getStorage({
// key: 'patientId',
// success: function(res) {
// that.patientId = res.data
// that.infolist.patientId = res.data
// 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
// })
// }
// });
},
//
submit() {
let that = this
if (that.isedit == true) {
addnursingStation(that.infolist).then(res => {
if (res.code == 200) {
uni.showToast({
title: '新增成功',
duration: 1000
});
that.show = false;
setTimeout(e => {
that.goodsList()
}, 1000)
}
})
if (this.addresslength.length > 2) {
if (that.isedit == true) {
addnursingStation(that.infolist).then(res => {
if (res.code == 200) {
that.$refs.uToast.show({
title: '新增成功',
type: 'success'
})
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'
})
}
})
}
} else {
updatenursingStation(that.infolist).then(res => {
uni.showToast({
title: '修改成功',
duration: 1000
});
that.show = false;
setTimeout(e => {
that.goodsList()
}, 1000)
that.$refs.uToast.show({
title: '地址不完整,请选择到区级',
type: 'error'
})
}
},
//
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
this.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.address = res.data.provinceName + '-' + res.data.cityName +
'-' +
res
.data.regionName
}
this.show = true
})
})
},
//
add() {
this.cityPickershow = true
this.infolist = {
receiveName: '',
receivePhone: '',
@ -227,16 +287,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) {}
}
});
@ -244,34 +311,44 @@
//
cencel() {
this.show = false
this.infolist = {}
// this.address=""
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.address = e[0].label + '-' + e[1].label
this.infolist.address = e[0].label + '-' + e[1].label
},
}
},
onPullDownRefresh() { //
this.goodsList()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>

View File

@ -4,22 +4,46 @@
<view class="CommodityOrder" @tap="goorder">商品订单
<image class="picture" src="../../static/jiantou.png" mode=""></image>
</view>
<view class="center">
<view class="center" v-if="list">
<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>
<view class="OrderStatus" @tap="gorate('WAIT_RECEIVED_GOODS')">
<image src="/static/evaluated.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,22 +53,37 @@
<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: {
gorate(item) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
},
//
gonursestation() {
uni.navigateTo({
@ -64,6 +103,12 @@
})
},
//
goEVALUATED(item) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
},
//
gocompleted(item) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
@ -75,7 +120,7 @@
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
},
}
},
}
</script>
@ -128,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,19 +1,87 @@
.app {
padding: 0;
.submits {
width: 501rpx;
height: 71rpx;
background: #4C7BC9;
border-radius: 26rpx;
text-align: center;
line-height: 71rpx;
color: #ffffff;
font-size: 34rpx;
margin-top: 5%;
margin-left: 15%;
}
// 弹框确认收货
.chat {
.word {
font-size: 26rpx;
color: #010000;
line-height: 36rpx;
width: 70%;
margin: 50rpx auto;
text-align: center;
}
.image {
position: relative;
.blackground {
width: 183rpx;
height: 69rpx;
background: #030303;
opacity: 0.5;
color: #ffffff;
font-size: 36rpx;
text-align: center;
line-height: 69rpx;
position: absolute;
bottom: 0%;
left: 50%;
transform: translateX(-50%);
}
image {
width: 182rpx;
display: block;
margin: 0 auto;
height: 182rpx;
}
}
}
.payment {
width: 100%;
font-size: 42rpx;
color: #000000;
line-height: 120rpx;
text-align: center;
span {}
image {
width: 31rpx;
height: 31rpx;
position: absolute;
right: 5%;
top: 5%;
}
}
.time{
height: 80rpx;
width: 95%;
text-align: center;
line-height: 80rpx;
background-color: #fff;
margin: 0 auto 10rpx;
margin: 30rpx auto 0;
border-radius: 20rpx;
}
.OrderStatus{
text-align: center;
width: 300rpx;
height: 70rpx;
margin: 0 auto;
margin: 30rpx auto 0;
line-height: 70rpx;
background-color:#4C7BC9 ;
border-radius: 50rpx;
@ -27,7 +95,21 @@
bottom: 0;
height: 100rpx;
width: 100%;
.logistics{
width: 216rpx;
height: 68rpx;
text-align: center;
color: #ffffff;
border-radius: 26rpx;
font-size: 36rpx;
line-height: 68rpx;
position: absolute;
right: 260rpx;
top: 50%;
background: #E1AE3C;
transform: translateY(-50%);
z-index: 999;
}
.pay {
width: 216rpx;
height: 68rpx;
@ -164,8 +246,7 @@
font-size: 30rpx;
color: #020000;
span {
display: block;
view {
line-height: 65rpx;
margin-left: 20rpx;

View File

@ -5,9 +5,6 @@
<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="order.orderStatus=='REFUNDED'||order.orderStatus=='CANCEL'">
订单已关闭
</view>
@ -52,14 +49,14 @@
</view>
</view>
</view>
<view class="info" v-if="order.orderStatus != ' WAIT_PAY'&& order.orderStatus!='CANCEL'">
<span>收货人<text>{{order.receiver}}</text></span>
<span>联系电话<text>{{order.phone}}</text></span>
<span>收货地址<text>{{order.receiveAddress}}</text></span>
<span>订单编号<text>{{order.goOrderNo}}</text></span>
<view class="info">
<view>收货人<text>{{order.receiver}}</text></view>
<view>联系电话<text>{{order.phone}}</text></view>
<view>收货地址<text>{{order.receiveAddress}}</text></view>
<view>订单编号<text>{{order.goOrderNo}}</text></view>
<!-- <span>获得积分<text>30点积分</text></span> -->
<span>下单时间<text>{{order.orderTime}}</text></span>
<span v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></span>
<view>下单时间<text>{{order.orderTime}}</text></view>
<view v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></view>
<!-- <span>发货时间<text>2022-10-28 113126</text></span> -->
<!-- <span>成交时间<text>2022-10-28 113126</text></span> -->
</view>

View File

@ -57,6 +57,16 @@
padding:0 0 0 0;
overflow: hidden;
font-size: 32rpx;
.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;
}
}
.disease{
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
line-height: 60rpx;

View File

@ -37,18 +37,39 @@
<view class="item" v-else>
身份证
</view>
<view class="item" v-if="appPersonallist.streetName">
区域{{appPersonallist.regionName}}-{{appPersonallist.streetName}}
<view class="addressitem" v-if="appPersonallist.streetName">
<view class="" style="padding-left: 5%;">
区域
</view>
<view class="address" style="">
{{appPersonallist.provinceName}}-{{appPersonallist.cityName}}-{{appPersonallist.regionName}}-{{appPersonallist.streetName}}
</view>
</view>
<view class="item" v-else>
区域
<view class="addressitem" v-if="appPersonallist.regionName">
<view class="" style="padding-left: 5%;">
区域
</view>
<view class="address" style="">
{{appPersonallist.provinceName}}-{{appPersonallist.cityName}}-{{appPersonallist.regionName}}
</view>
</view>
<view class="item" style="height:100%" v-if="appPersonallist.address">
地址:
{{appPersonallist.address}}
<view class="addressitem" v-else>
<view class="" style="padding-left: 5%;">
区域
</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="item" style="height:100%" v-else>
地址:
<view class="" style="padding-left: 5%;">
地址
</view>
</view>
<!-- <view class="item" style="height:100%">
<view class="" style="display: inline-block;">
@ -195,7 +216,7 @@
uni.reLaunch({
url: "/pages/login/login"
})
}, 1000)
}, 1500)
},
updatainfo() {
uni.navigateTo({