2024-08-16 18:26:19 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<view class="container">
|
|
|
|
<view class="my-header">
|
|
|
|
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
2024-09-24 15:50:38 +08:00
|
|
|
<view class="my-text">编辑预留信息</view>
|
2024-08-16 18:26:19 +08:00
|
|
|
<view class="my-icons"></view>
|
|
|
|
</view>
|
|
|
|
<view class="box-gang">
|
2024-09-24 15:50:38 +08:00
|
|
|
<view class="g-name">姓名</view>
|
|
|
|
<input type="text" placeholder="请输入联系人姓名" style="text-align: right;" v-model='dataForm.name' />
|
2024-08-16 18:26:19 +08:00
|
|
|
</view>
|
|
|
|
<view class="box-gang">
|
2024-09-24 15:50:38 +08:00
|
|
|
<view class="g-name">性别</view>
|
2024-09-25 10:39:17 +08:00
|
|
|
<view>
|
|
|
|
<u-radio-group v-model="dataForm.sex">
|
|
|
|
<u-radio label="先生" :name="0"></u-radio>
|
|
|
|
<u-radio label="女士" :name="1"></u-radio>
|
2024-09-24 15:50:38 +08:00
|
|
|
</u-radio-group>
|
|
|
|
</view>
|
2024-09-25 10:39:17 +08:00
|
|
|
|
2024-08-16 18:26:19 +08:00
|
|
|
</view>
|
|
|
|
<view class="box-gang">
|
2024-09-24 15:50:38 +08:00
|
|
|
<view class="g-name">电话</view>
|
|
|
|
<input type="text" placeholder="请输入联系人手机号码" style="text-align: right;" v-model='dataForm.mobile' />
|
|
|
|
</view>
|
|
|
|
<!-- <view class="box-gang">
|
2024-08-16 18:26:19 +08:00
|
|
|
<view class="g-name">所在地区</view>
|
|
|
|
<input type="text" placeholder="请填写所在地区" v-model='dataForm.address' />
|
|
|
|
</view>
|
|
|
|
<view class="box-gang">
|
|
|
|
<view class="g-name">详细地区</view>
|
|
|
|
<input type="text" placeholder="请填写详细地区" v-model='dataForm.fullAddress' />
|
2024-09-24 15:50:38 +08:00
|
|
|
</view> -->
|
2024-08-16 18:26:19 +08:00
|
|
|
|
|
|
|
<!-- 顶部区域 -->
|
|
|
|
|
|
|
|
<view class="bottom-anniu" @click="goedit()">
|
2024-09-24 15:50:38 +08:00
|
|
|
<view class="">保存</view>
|
2024-08-16 18:26:19 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import config from '@/config'
|
|
|
|
import request from '../../utils/request'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
title: '',
|
|
|
|
value: true,
|
|
|
|
dataForm: {
|
|
|
|
name: '',
|
|
|
|
mobile: '',
|
|
|
|
address: '',
|
|
|
|
fullAddress: '',
|
2024-09-25 10:39:17 +08:00
|
|
|
sex: "",
|
|
|
|
storeId: uni.getStorageSync("storeId")
|
2024-08-16 18:26:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
this.dataForm = {}
|
|
|
|
uni.$on('addressInfo', (data) => {
|
|
|
|
if (data != null) {
|
|
|
|
this.dataForm = data
|
|
|
|
if (this.dataForm.ifDefault == 1) {
|
|
|
|
this.value = true
|
|
|
|
} else {
|
|
|
|
this.value = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
uni.$emit('unAddressInfo')
|
2024-09-25 10:39:17 +08:00
|
|
|
console.log(this.dataForm,78);
|
2024-08-16 18:26:19 +08:00
|
|
|
},
|
|
|
|
components: {
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
change(e) {
|
|
|
|
console.log(e);
|
|
|
|
},
|
|
|
|
goback() {
|
|
|
|
uni.navigateBack()
|
|
|
|
},
|
|
|
|
goedit() {
|
2024-09-25 10:39:17 +08:00
|
|
|
let url = '/business/userManager/mtUserExpressAddress'
|
|
|
|
if (this.dataForm.id) {
|
2024-08-16 18:26:19 +08:00
|
|
|
request({
|
|
|
|
url: url,
|
|
|
|
method: 'put',
|
|
|
|
data: this.dataForm
|
|
|
|
}).then((res) => {
|
|
|
|
if (res.code == 200) {
|
|
|
|
uni.showToast({
|
|
|
|
title: '修改成功',
|
|
|
|
icon: 'none'
|
|
|
|
}),
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
request({
|
|
|
|
url: url,
|
|
|
|
method: 'post',
|
|
|
|
data: this.dataForm
|
|
|
|
}).then((res) => {
|
|
|
|
if (res.code == 200) {
|
|
|
|
uni.showToast({
|
|
|
|
title: '提交成功',
|
|
|
|
icon: 'none'
|
|
|
|
}),
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.content {
|
|
|
|
background: #f4f5f6;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
width: 100%;
|
|
|
|
height: 100vh;
|
|
|
|
box-sizing: border-box;
|
2024-09-24 15:50:38 +08:00
|
|
|
padding-top: 89px;
|
2024-08-16 18:26:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.my-header {
|
|
|
|
width: 100%;
|
|
|
|
height: 88px;
|
|
|
|
background: #ffffff;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
color: #000;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 0px 15px;
|
|
|
|
padding-top: 40px;
|
|
|
|
|
|
|
|
.my-icons {
|
|
|
|
width: 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
top: 0px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.box-gang {
|
|
|
|
width: 100%;
|
|
|
|
background-color: #ffffff;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 15px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
border-bottom: 1px solid #f4f5f6;
|
2024-09-24 15:50:38 +08:00
|
|
|
justify-content: space-between;
|
2024-08-16 18:26:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.g-name {
|
|
|
|
margin-right: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.box-gang-bt {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
background-color: #ffffff;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dataform {
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
|
|
margin: 20px 20px 20px 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.bottom-anniu {
|
2024-09-24 15:50:38 +08:00
|
|
|
width: 84%;
|
|
|
|
height: 40px;
|
2024-08-16 18:26:19 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2024-09-24 15:50:38 +08:00
|
|
|
background: #FF9655;
|
2024-08-16 18:26:19 +08:00
|
|
|
color: white;
|
|
|
|
justify-content: center;
|
2024-09-24 15:50:38 +08:00
|
|
|
position: fixed;
|
|
|
|
bottom: 40px;
|
|
|
|
left: 50%;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
border-radius: 50px;
|
2024-08-16 18:26:19 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|