Browse Source

feat 手动发单个人地址发单去掉shopId

Funny 3 years atrás
parent
commit
bddd8e844d
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/components/manualCreate.vue

+ 5 - 3
src/components/manualCreate.vue

@@ -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",