|
|
@@ -3,6 +3,8 @@
|
|
|
<form @submit="formSubmit">
|
|
|
<view class="module-com input-line-wrap">
|
|
|
|
|
|
+ <view style="background-color: white;font-size:36upx;font-weight:bold;padding:20upx 0 10upx 30upx;">修改本订单地址:</view>
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="hasMap == 1">
|
|
|
<view class="tui-title">地址类型</view>
|
|
|
<button :class="[couldNavigation==1?'blue':'default']" class="admin-button-com middle" @click.stop="setStyle(1)" style="width:180upx;">支持导航</button>
|
|
|
@@ -26,11 +28,20 @@
|
|
|
<view class="tui-title">地址</view>
|
|
|
<input v-model="form.address" placeholder-class="phcolor" class="tui-input" name="address" placeholder="请填写地址" />
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title ">门牌</view>
|
|
|
- <input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号,建议填写,方便查找"/>
|
|
|
- </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title ">门牌</view>
|
|
|
+ <input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号,建议填写,方便查找"/>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <view class="checkbox-wrap">
|
|
|
+ <label class="checkbox-label">
|
|
|
+ <checkbox v-model="syncDefaultAddress" :true-value="1" :false-value="0" color="#007AFF" style="margin-right: 10upx;"></checkbox>
|
|
|
+ <text>同步到客户的默认地址</text>
|
|
|
+ </label>
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
<view class="confirm-btn">
|
|
|
<button class="admin-button-com big blue" formType="submit">提交</button>
|
|
|
</view>
|
|
|
@@ -72,10 +83,11 @@ export default {
|
|
|
lat: 0,
|
|
|
long: 0
|
|
|
},
|
|
|
- cityPickerValueDefault: [0, 0],
|
|
|
- showRegion: false,
|
|
|
- hasMap: 0,
|
|
|
- couldNavigation:1
|
|
|
+ cityPickerValueDefault: [0, 0],
|
|
|
+ showRegion: false,
|
|
|
+ hasMap: 0,
|
|
|
+ couldNavigation:1,
|
|
|
+ syncDefaultAddress: 0
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
@@ -140,20 +152,20 @@ export default {
|
|
|
const cityIndex = districtStr.indexOf('市');
|
|
|
this.form.dist = cityIndex !== -1 ? districtStr.substring(cityIndex + 1) : districtStr;
|
|
|
},
|
|
|
- confirmFn() {
|
|
|
- let that = this
|
|
|
- this.form.id = this.option.id ? this.option.id : 0
|
|
|
- this.form = {...this.form, ...this.region}
|
|
|
- uni.showLoading({mask:true})
|
|
|
- modifyAddress(this.form).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- that.$msg('修改成功')
|
|
|
- setTimeout(() => {
|
|
|
- uni.navigateBack({})
|
|
|
- }, 1200)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ confirmFn() {
|
|
|
+ let that = this
|
|
|
+ this.form.id = this.option.id ? this.option.id : 0
|
|
|
+ this.form = {...this.form, ...this.region, syncDefaultAddress: this.syncDefaultAddress}
|
|
|
+ uni.showLoading()
|
|
|
+ modifyAddress(this.form).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg('修改成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.navigateBack({})
|
|
|
+ }, 1200)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
formSubmit(e) {
|
|
|
let rules = [
|
|
|
{
|
|
|
@@ -211,4 +223,18 @@ export default {
|
|
|
width: 100%;
|
|
|
}
|
|
|
}
|
|
|
+ // 复选框
|
|
|
+ .checkbox-wrap {
|
|
|
+ padding: 20upx 30upx;
|
|
|
+ background-color: white;
|
|
|
+ border-bottom: 1px solid #f0f0f0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ .checkbox-label {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 36upx;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|