信息确认 预约 支付 诊断结果
This commit is contained in:
parent
fdd656b241
commit
f24d7a3a29
@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user