信息确认 预约 支付 诊断结果
This commit is contained in:
parent
fdd656b241
commit
f24d7a3a29
@ -38,4 +38,20 @@ export function delnursingStation(id) {
|
|||||||
url: '/nurseApplet/nursingStationGoods/' + id,
|
url: '/nurseApplet/nursingStationGoods/' + id,
|
||||||
method: 'delete'
|
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 class="up" @tap='del(item)'>
|
||||||
删除
|
删除
|
||||||
</view>
|
</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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="ADDress" @tap='add()'>
|
<view class="ADDress" @tap='add()'>
|
||||||
<image src="../../static/add.png" mode=""></image>
|
<image src="../../static/add.png" mode=""></image>
|
||||||
<span class="ADDtext">
|
<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">
|
<view class="payment">
|
||||||
添加收货地址
|
<span>{{shipAddress}}</span>
|
||||||
<view class="cencel" @tap="cencel()">
|
<view class="cencel" @tap="cencel()">
|
||||||
<image src="../../static/gb.png" mode=""></image>
|
<image src="../../static/gb.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="addinfos">
|
<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>
|
||||||
<u-field v-model="list.receivePhone" label="手机号" placeholder="电话" class="items">
|
<u-field v-model="infolist.receivePhone" label="手机号" placeholder="电话" class="items" maxlength='11'>
|
||||||
</u-field>
|
</u-field>
|
||||||
<view class="area">
|
<view class="area" @tap='areashow=true'>
|
||||||
<u-field v-model="list.areaCode" label="地区" placeholder="请选择" class="items">
|
<u-field v-model="infolist.address" label="地区" placeholder="请选择" class="items" disabled>
|
||||||
</u-field>
|
</u-field>
|
||||||
<image src="../../static/jiantou.png" mode=""></image>
|
<image src="../../static/jiantou.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-field v-model="list.receiveAddress" label-width="170" label="详细地址" placeholder="如街道、门牌号、小区等"
|
<u-field v-model="infolist.receiveAddress" label-width="170" label="详细地址" placeholder="如街道、门牌号、小区等"
|
||||||
class="items">
|
class="items" maxlength='50'>
|
||||||
</u-field>
|
</u-field>
|
||||||
</view>
|
</view>
|
||||||
<view class="save" @tap='submit()'>
|
<view class="save" @tap='submit()'>
|
||||||
@ -60,6 +55,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<u-select v-model="areashow" mode="mutil-column-auto" label-name='areaName' value-name='areaCode'
|
||||||
|
:list="arealist" @confirm="areaconfirm"></u-select>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -70,6 +67,8 @@
|
|||||||
delnursingStation,
|
delnursingStation,
|
||||||
nursingStationGoodsinfo,
|
nursingStationGoodsinfo,
|
||||||
updatenursingStation,
|
updatenursingStation,
|
||||||
|
getSubordinateRegions,
|
||||||
|
getSubordinate
|
||||||
} from '@/api/modifyAddress/modifyAddress.js';
|
} from '@/api/modifyAddress/modifyAddress.js';
|
||||||
import baseurl from '@/api/baseurl.js'
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
@ -79,24 +78,26 @@
|
|||||||
delshow: false, //删除弹框
|
delshow: false, //删除弹框
|
||||||
content: '确认要删除信息吗?',
|
content: '确认要删除信息吗?',
|
||||||
show: false, //弹框
|
show: false, //弹框
|
||||||
list: {
|
areashow: false, //经纬度开关
|
||||||
|
arealist: [], //区街道list
|
||||||
|
areaCode: '',
|
||||||
|
shipAddress: '添加收货地址',
|
||||||
|
infolist: {
|
||||||
receiveName: '',
|
receiveName: '',
|
||||||
receivePhone: '',
|
receivePhone: '',
|
||||||
receiveAddress: '',
|
receiveAddress: '',
|
||||||
areaCode: '',
|
areaCode: '',
|
||||||
patientId: 2,
|
patientId: 2,
|
||||||
|
address: '', //页面所属区域
|
||||||
},
|
},
|
||||||
goodPatient: [], // 查询地址信息
|
goodPatient: [], // 查询地址信息
|
||||||
patientId: 2,
|
patientId: 2,
|
||||||
// delId: '',
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
//获取传值
|
//获取传值
|
||||||
this.goodsList()
|
this.goodsList()
|
||||||
|
this.areaInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查询地址信息
|
// 查询地址信息
|
||||||
@ -108,120 +109,126 @@
|
|||||||
},
|
},
|
||||||
// 保存按钮
|
// 保存按钮
|
||||||
submit() {
|
submit() {
|
||||||
let that=this
|
let that = this
|
||||||
if (that.isedit == true) {
|
if (that.isedit == true) {
|
||||||
addnursingStation(that.list).then(res => {
|
addnursingStation(that.infolist).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
that.$refs.uToast.show({
|
uni.showToast({
|
||||||
title: '新增成功',
|
title: '新增成功',
|
||||||
duration: 20000000
|
duration: 1500
|
||||||
});
|
});
|
||||||
that.show = false;
|
that.show = false;
|
||||||
// console.log(res)
|
setTimeout(e => {
|
||||||
that.goodsList()
|
that.goodsList()
|
||||||
that.list = {}
|
}, 1500)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
updatenursingStation(that.list).then(res => {
|
updatenursingStation(that.infolist).then(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '修改成功',
|
title: '修改成功',
|
||||||
duration: 2000
|
duration: 1500
|
||||||
});
|
});
|
||||||
that.show = false;
|
that.show = false;
|
||||||
// console.log(res)
|
setTimeout(e => {
|
||||||
that.goodsList()
|
that.goodsList()
|
||||||
// this.list = {}
|
}, 1500)
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 修改按钮
|
// 修改按钮
|
||||||
updata(item) {
|
updata(item) {
|
||||||
|
this.shipAddress = '修改收货地址'
|
||||||
this.isedit = false
|
this.isedit = false
|
||||||
nursingStationGoodsinfo(item.id).then(res => {
|
nursingStationGoodsinfo(item.id).then(res => {
|
||||||
console.log(item)
|
this.infolist = res.data
|
||||||
this.list = res.data
|
getSubordinate(res.data.areaCode).then(res => {
|
||||||
this.show = true
|
this.infolist.address = res.data.regionName + res.data.streetName
|
||||||
|
console.log(this.infolist)
|
||||||
|
this.show = true
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
add() {
|
add() {
|
||||||
|
this.infolist = {
|
||||||
|
receiveName: '',
|
||||||
|
receivePhone: '',
|
||||||
|
receiveAddress: '',
|
||||||
|
areaCode: '',
|
||||||
|
patientId: 2,
|
||||||
|
}
|
||||||
this.isedit = true
|
this.isedit = true
|
||||||
this.show = 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) {
|
del(item) {
|
||||||
let that=this
|
let that = this
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确认要删除信息吗',
|
content: '确认要删除信息吗',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
delnursingStation(item.id).then(res => {
|
delnursingStation(item.id).then(res => {
|
||||||
|
uni.showToast({
|
||||||
uni.showToast({
|
title: '删除成功',
|
||||||
title: '删除成功',
|
duration: 1500,
|
||||||
duration: 2000,
|
|
||||||
|
|
||||||
});
|
|
||||||
console.log(111),
|
|
||||||
that.delshow = false;
|
|
||||||
that.goodsList()
|
|
||||||
// console.log(this)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
setTimeout(e => {
|
||||||
|
that.goodsList()
|
||||||
|
}, 1500)
|
||||||
|
that.delshow = false;
|
||||||
})
|
})
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
console.log('用户点击取消');
|
console.log('用户点击取消');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// this.delId = item.id
|
|
||||||
// this.delshow = true
|
|
||||||
},
|
},
|
||||||
// 取消
|
// 取消
|
||||||
cencel() {
|
cencel() {
|
||||||
this.show = false
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
::v-deep .u-mask {
|
|
||||||
background-color: rgba(118, 118, 118, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.app {
|
.app {
|
||||||
padding: 4%;
|
padding: 4%;
|
||||||
|
// height: 100%;
|
||||||
|
padding-bottom: 100rpx;
|
||||||
|
|
||||||
.address {
|
.address {
|
||||||
/* position: absolute; */
|
|
||||||
width: 99%;
|
width: 99%;
|
||||||
height: 270rpx;
|
height: 280rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
@ -335,6 +342,5 @@
|
|||||||
color: #030001;
|
color: #030001;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user