信息确认 预约 支付 诊断结果

This commit is contained in:
shidongli 2022-10-21 17:48:22 +08:00
parent fdd656b241
commit f24d7a3a29
2 changed files with 103 additions and 81 deletions

View File

@ -38,4 +38,20 @@ export function delnursingStation(id) {
url: '/nurseApplet/nursingStationGoods/' + id,
method: 'delete'
})
}
}
// 查询
export function getSubordinate(areaCode){
return request({
url: `/nurseApplet/nursingStationGoods/getSubordinateRegions?areaCode=${areaCode}`,
method: 'GET'
})
}
//区街道list
export function getSubordinateRegions(areaCode) {
return request({
url: `/nurseApplet/login/getRegionAndStreetInfo?areaCode=${areaCode}`,
method: 'GET'
})
}

View File

@ -15,14 +15,9 @@
<view class="up" @tap='del(item)'>
删除
</view>
<!-- <u-modal width="50%" v-model="delshow" style='background-color: rgba(118, 118, 118, 0.6);'
@confirm='delconfirm' :content="content" show-cancel-button>
</u-modal> -->
</view>
</view>
</view>
<view class="ADDress" @tap='add()'>
<image src="../../static/add.png" mode=""></image>
<span class="ADDtext">
@ -32,25 +27,25 @@
<!-- 弹框 -->
<u-popup v-model="show" mode="center" width="80%" height="50%" border-radius="30">
<u-popup v-model="show" mode="center" width="80%" height="55%" border-radius="30">
<view class="payment">
添加收货地址
<span>{{shipAddress}}</span>
<view class="cencel" @tap="cencel()">
<image src="../../static/gb.png" mode=""></image>
</view>
<view class="addinfos">
<u-field v-model="list.receiveName" label="收货人" placeholder="姓名" class="items">
<u-field v-model="infolist.receiveName" label="收货人" placeholder="姓名" class="items" maxlength='30'>
</u-field>
<u-field v-model="list.receivePhone" label="手机号" placeholder="电话" class="items">
<u-field v-model="infolist.receivePhone" label="手机号" placeholder="电话" class="items" maxlength='11'>
</u-field>
<view class="area">
<u-field v-model="list.areaCode" label="地区" placeholder="请选择" class="items">
<view class="area" @tap='areashow=true'>
<u-field v-model="infolist.address" label="地区" placeholder="请选择" class="items" disabled>
</u-field>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<u-field v-model="list.receiveAddress" label-width="170" label="详细地址" placeholder="如街道、门牌号、小区等"
class="items">
<u-field v-model="infolist.receiveAddress" label-width="170" label="详细地址" placeholder="如街道、门牌号、小区等"
class="items" maxlength='50'>
</u-field>
</view>
<view class="save" @tap='submit()'>
@ -60,6 +55,8 @@
</view>
</u-popup>
<u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
:list="arealist" @confirm="areaconfirm"></u-select>
</view>
</template>
@ -70,6 +67,8 @@
delnursingStation,
nursingStationGoodsinfo,
updatenursingStation,
getSubordinateRegions,
getSubordinate
} from '@/api/modifyAddress/modifyAddress.js';
import baseurl from '@/api/baseurl.js'
export default {
@ -79,24 +78,26 @@
delshow: false, //
content: '确认要删除信息吗?',
show: false, //
list: {
areashow: false, //
arealist: [], //list
areaCode: '',
shipAddress: '添加收货地址',
infolist: {
receiveName: '',
receivePhone: '',
receiveAddress: '',
areaCode: '',
patientId: 2,
address: '', //
},
goodPatient: [], //
patientId: 2,
// delId: '',
}
},
onLoad(options) {
//
this.goodsList()
this.areaInfo()
},
methods: {
//
@ -108,120 +109,126 @@
},
//
submit() {
let that=this
let that = this
if (that.isedit == true) {
addnursingStation(that.list).then(res => {
addnursingStation(that.infolist).then(res => {
if (res.code == 200) {
that.$refs.uToast.show({
title: '新增成功',
duration: 20000000
});
that.show = false;
// console.log(res)
that.goodsList()
that.list = {}
uni.showToast({
title: '新增成功',
duration: 1500
});
that.show = false;
setTimeout(e => {
that.goodsList()
}, 1500)
}
})
} else {
updatenursingStation(that.list).then(res => {
updatenursingStation(that.infolist).then(res => {
uni.showToast({
title: '修改成功',
duration: 2000
duration: 1500
});
that.show = false;
// console.log(res)
that.goodsList()
// this.list = {}
setTimeout(e => {
that.goodsList()
}, 1500)
})
}
},
//
updata(item) {
this.shipAddress = '修改收货地址'
this.isedit = false
nursingStationGoodsinfo(item.id).then(res => {
console.log(item)
this.list = res.data
this.show = true
this.infolist = res.data
getSubordinate(res.data.areaCode).then(res => {
this.infolist.address = res.data.regionName + res.data.streetName
console.log(this.infolist)
this.show = true
})
})
},
//
add() {
this.infolist = {
receiveName: '',
receivePhone: '',
receiveAddress: '',
areaCode: '',
patientId: 2,
}
this.isedit = true
this.show = true
},
// delconfirm() {
// // console.log(1111)
// delnursingStation(this.delId).then(res => {
// if (res.code == 200) {
// this.$refs.uToast.show({
// title: '',
// type: 'success',
// duration: 2000
// })
// this.delshow = false;
// console.log(res)
// this.goodsList()
// }
// })
// },
//
del(item) {
let that=this
let that = this
uni.showModal({
title: '提示',
content: '确认要删除信息吗',
success: function(res) {
if (res.confirm) {
delnursingStation(item.id).then(res => {
uni.showToast({
title: '删除成功',
duration: 2000,
});
console.log(111),
that.delshow = false;
that.goodsList()
// console.log(this)
uni.showToast({
title: '删除成功',
duration: 1500,
});
setTimeout(e => {
that.goodsList()
}, 1500)
that.delshow = false;
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
// this.delId = item.id
// this.delshow = true
},
//
cencel() {
this.show = false
this.list = {}
}
this.infolist = {}
// this.address=""
},
//
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
},
}
}
</script>
<style lang="scss">
::v-deep .u-mask {
background-color: rgba(118, 118, 118, 0.6);
}
.app {
padding: 4%;
// height: 100%;
padding-bottom: 100rpx;
.address {
/* position: absolute; */
width: 99%;
height: 270rpx;
height: 280rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
@ -335,6 +342,5 @@
color: #030001;
line-height: 40rpx;
}
}
</style>