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

1

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