Commit 75abd0ef authored by 罗超's avatar 罗超

1

parent a6525538
...@@ -813,7 +813,7 @@ ...@@ -813,7 +813,7 @@
}, { }, {
"path": "modifyAddress" //修改地址 "path": "modifyAddress" //修改地址
}, { }, {
"path": "returnAddress" //退货地址 "path": "returnModifyAddress" //修改退货地址
}, { }, {
"path": "address" //退货地址列表 "path": "address" //退货地址列表
}, { }, {
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
<view class="AddaddressStyle" :style="{ height: contentHeight }"> <view class="AddaddressStyle" :style="{ height: contentHeight }">
<view class="addcenter"> <view class="addcenter">
<view class="addcenter_item2"> <view class="addcenter_item2">
<Text>收货人</Text> <view><text style="color: #f56c6c; margin-right: 4rpx;font-size:24rpx">*</text>收货人</view>
<input class="uni-input inputM" v-model="modifyMsg.Consignee" /> <input class="uni-input inputM" v-model="modifyMsg.Name" />
</view> </view>
<view style="width: 100%; height: 1px; background: #f5f5f5" /> <view style="width: 100%; height: 1px; background: #f5f5f5" />
<view class="addcenter_item2"> <view class="addcenter_item2">
<Text>联系电话</Text> <view><text style="color: #f56c6c; margin-right: 4rpx;font-size:24rpx">*</text>联系电话</view>
<input class="uni-input inputM" v-model="modifyMsg.Mobile" /> <input class="uni-input inputM" v-model="modifyMsg.Mobile" />
</view> </view>
<view style="width: 100%; height: 1px; background: #f5f5f5" /> <view style="width: 100%; height: 1px; background: #f5f5f5" />
<!-- TODO 动态获取地址数据 --> <!-- TODO 动态获取地址数据 -->
<view class="addcenter_item"> <view class="addcenter_item">
<Text>所在地区</Text> <view><text style="color: #f56c6c; margin-right: 4rpx;font-size:24rpx">*</text>所在地区</view>
<view <view
style="display: flex; flex-direction: row; align-items: center" style="display: flex; flex-direction: row; align-items: center"
@click="addressShow = true" @click="addressShow = true"
...@@ -29,10 +29,18 @@ ...@@ -29,10 +29,18 @@
<view style="width: 100%; height: 1px; background: #f5f5f5" /> <view style="width: 100%; height: 1px; background: #f5f5f5" />
<view class="addcenter_item2" style="align-items: flex-start"> <view class="addcenter_item2" style="align-items: flex-start">
<Text>详细地址</Text> <Text>详细地址</Text>
<input
class="inputM"
v-model="modifyMsg.Address"
/>
</view>
<view style="width: 100%; height: 1px; background: #f5f5f5" />
<view class="addcenter_item2" style="align-items: flex-start">
<Text>备注</Text>
<textarea <textarea
style="height: 50px" style="height: 50px"
class="inputM" class="inputM"
v-model="modifyMsg.ShoppingAddress" v-model="modifyMsg.Remarks"
/> />
</view> </view>
</view> </view>
...@@ -50,29 +58,20 @@ export default { ...@@ -50,29 +58,20 @@ export default {
}, },
data() { data() {
return { return {
pageTitle: "修改地址", pageTitle: "编辑退货地址",
contentHeight: 0, contentHeight: 0,
mainColor: "", mainColor: "",
msg: {
Id: 0,
Name: "",
Mobile: "",
Province: "",
City: "",
District: "",
Address: "",
},
address: "", address: "",
Pickershwo: false,
addressShow: false, addressShow: false,
modifyMsg: { modifyMsg: {
OrderId: 0, ID: 0,
Consignee: "", Name: "",
Mobile: "", Mobile: "",
Province: "", Address: "",
City: "", Remarks: "",
District: "", ProvinceId: 0,
ShoppingAddress: "", CityId: 0,
DistrictId: 0,
}, },
}; };
}, },
...@@ -84,25 +83,41 @@ export default { ...@@ -84,25 +83,41 @@ export default {
}); });
}, },
onLoad(option) { onLoad(option) {
//option为object类型,会序列化上个页面传递的参数 if (option.Id) {
if (option.AddressId) { this.modifyMsg.ID = option.Id;
this.getAddressInfo(option.AddressId); this.getData(option.Id);
}
if (option.OrderId) {
this.modifyMsg.OrderId = option.OrderId;
this.getData();
} }
}, },
methods: { methods: {
preserve() { preserve() {
if(!this.modifyMsg.Name){
uni.showToast({
title: '请输入姓名',
icon:'none'
});
return
}
if(!this.modifyMsg.Mobile){
uni.showToast({
title: '请输入电话',
icon:'none'
});
return
}
if(this.modifyMsg.ProvinceId===0){
uni.showToast({
title: '请选择所在地区',
icon:'none'
});
return
}
let pages = getCurrentPages(); // 当前页面 let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 前一个页面 let beforePage = pages[pages.length - 2]; // 前一个页面
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
this.requestAdmin( this.requestAdmin(
"/api/order/SetOrderShopingAddress", "/api/MallBase/AddOrUpdateLogisticsDelivery",
this.modifyMsg, this.modifyMsg,
(res) => { (res) => {
console.log(110, res);
uni.showToast({ uni.showToast({
title: "操作成功", title: "操作成功",
icon: "success", icon: "success",
...@@ -120,33 +135,30 @@ export default { ...@@ -120,33 +135,30 @@ export default {
}, },
addresspick(obj) { addresspick(obj) {
this.modifyMsg.Province = obj.province.ID; this.modifyMsg.ProvinceId = obj.province.ID;
this.modifyMsg.City = obj.city.ID; this.modifyMsg.CityId = obj.city.ID;
if (obj.area != undefined) { if (obj.area != undefined) {
this.modifyMsg.District = obj.area.ID; this.modifyMsg.DistrictId = obj.area.ID;
this.address = this.address =
obj.province.Name + "," + obj.city.Name + "," + obj.area.Name; obj.province.Name + "," + obj.city.Name + "," + obj.area.Name;
} else { } else {
this.modifyMsg.District = ""; this.modifyMsg.DistrictId = "";
this.address = obj.province.Name + "," + obj.city.Name; this.address = obj.province.Name + "," + obj.city.Name;
} }
console.log(128, this.modifyMsg)
}, },
getData() { getData(ID) {
this.requestAdmin( this.requestAdmin(
"/api/order/GetGoodsOrderInfo", "/api/MallBase/GetLogisticsDelivery",
{ { ID: ID },
OrderId: this.modifyMsg.OrderId,
},
(res) => { (res) => {
let OrderInfo = res.data.OrderInfo; this.modifyMsg.Name = res.data.Name;
this.address = OrderInfo.DistrictAddress.split(" ").join(","); this.modifyMsg.Mobile = res.data.Mobile;
this.modifyMsg.Consignee = OrderInfo.Consignee; this.modifyMsg.Address = res.data.Address;
this.modifyMsg.Mobile = OrderInfo.Mobile; this.modifyMsg.ProvinceId = res.data.ProvinceId;
this.modifyMsg.ShoppingAddress = OrderInfo.ShoppingAddress; this.modifyMsg.CityId = res.data.CityId;
this.modifyMsg.Province = OrderInfo.Province; this.modifyMsg.DistrictId = res.data.DistrictId;
this.modifyMsg.City = OrderInfo.City; this.address=res.data.ProvinceName+','+res.data.CityName+','+res.data.DistrictName;
this.modifyMsg.District = OrderInfo.District;
console.log(OrderInfo);
} }
); );
}, },
......
...@@ -187,18 +187,21 @@ export default { ...@@ -187,18 +187,21 @@ export default {
//图片 //图片
if (x.groupList && x.groupList.length > 0) { if (x.groupList && x.groupList.length > 0) {
x.groupList.forEach((j) => { x.groupList.forEach((j) => {
this.imgList.push(...j.FileList); // this.imgList.push(...j.FileList);
this.imgList=this.imgList.concat(j.FileList)
}); });
} }
} else { } else {
if (x.groupList && x.groupList.length > 0) { if (x.groupList && x.groupList.length > 0) {
x.groupList.forEach((j) => { x.groupList.forEach((j) => {
this.videolist.push(...j.FileList); // this.videolist.push(...j.FileList);
this.videolist= this.videolist.concat(j.FileList)
}); });
} }
} }
}); });
console.log(this.imgList, this.videolist); console.log(1,this.imgList);
console.log(2,this.videolist);
this.imgList.map((e) => { this.imgList.map((e) => {
this.preImg.push(e.Path); this.preImg.push(e.Path);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment