|
@@ -249,8 +249,10 @@ export default {
|
|
|
});
|
|
|
if (newVal) {
|
|
|
this.addressType = 1;
|
|
|
+ this.form.shopId = this.$store.state.userInfo.shopId;
|
|
|
} else {
|
|
|
this.addressType = 2;
|
|
|
+ this.form.shopId = "";
|
|
|
}
|
|
|
this.getData();
|
|
|
},
|
|
@@ -321,11 +323,12 @@ export default {
|
|
|
let sendAddress;
|
|
|
if (this.addressType === 1) {
|
|
|
this.addressList = res.data.shop;
|
|
|
+ let shopId = this.form.shopId;
|
|
|
sendAddress = this.addressList.filter((v) => {
|
|
|
- return v.id === this.form.shopId;
|
|
|
+ return v.id === shopId;
|
|
|
})[0];
|
|
|
this.curIdx = this.addressList.findIndex((v) => {
|
|
|
- return v.id === this.form.shopId;
|
|
|
+ return v.id === shopId;
|
|
|
});
|
|
|
console.log("sendAddress1", sendAddress);
|
|
|
Object.keys(this.form.sendAddress).map((v) => {
|
|
@@ -417,7 +420,6 @@ export default {
|
|
|
}
|
|
|
// 个人发件
|
|
|
if (!this.sendType) {
|
|
|
- this.form.shopId = this.$store.state.userInfo.shopId;
|
|
|
if (!this.form.sendAddress.contact.trim()) {
|
|
|
return this.$message({
|
|
|
type: "error",
|