Andy %!s(int64=3) %!d(string=hai) anos
pai
achega
49d9abb4ef
Modificáronse 1 ficheiros con 48 adicións e 6 borrados
  1. 48 6
      src/views/BidSystem/ProductDeOrder/infoDetail.vue

+ 48 - 6
src/views/BidSystem/ProductDeOrder/infoDetail.vue

@@ -425,7 +425,7 @@
             </FormItem>
           </Form>
         </div>
-        <Tabs type="card" @on-click="getData">
+        <Tabs type="card" @on-click="handleTabsChange">
           <TabPane
             v-for="tab in tabs"
             :key="tab"
@@ -642,6 +642,7 @@ export default {
       page_size: 10,
       save_state: false,
       uploadData: {},
+      currency_tag: 1,
     };
   },
   created() {
@@ -667,6 +668,10 @@ export default {
     }
   },
   methods: {
+    handleTabsChange(name) {
+      this.currency_tag = name;
+      this.getData(name);
+    },
     changeTotalSize(e) {
       this.page_size = e;
       this.getData();
@@ -686,6 +691,7 @@ export default {
     getData(type) {
       if (type === 1) {
         if (this.search_state) {
+          console.log("1 :>> ", 1);
           this.page_index = 1;
           this.page_size = 10;
           this.axios
@@ -699,6 +705,23 @@ export default {
               console.log(res);
               this.detailData = res.data.data;
               this.total = res.data.total;
+              this.area_code = res.data.area_code;
+              this.area_title = res.data.area_title;
+              this.color = res.data.color;
+              this.fashion = res.data.fashion;
+              this.house = res.data.house;
+              this.house_type = res.data.house_type;
+              this.layer = res.data.layer;
+              this.material = res.data.material;
+              this.number = res.data.number;
+              this.position = res.data.position;
+              this.product_title = res.data.product_title;
+              this.product_type = res.data.product_type;
+              this.state = res.data.state;
+              this.unit = res.data.unit;
+              this.url_number = res.data.url_number;
+              this.work = res.data.work;
+              this.copy_form = this.searchData;
             });
         } else {
           this.page_index = 1;
@@ -706,7 +729,7 @@ export default {
           this.$route.query.order_no &&
             this.axios
               .post("/api/order_area_details", {
-                order_no: this.$route.query.order_no,
+                order_no: this.$route.query.order_no || this.saveData.order_no,
                 page_index: this.page_index,
                 page_size: this.page_size,
               })
@@ -714,6 +737,23 @@ export default {
                 console.log(res);
                 this.detailData = res.data.data;
                 this.total = res.data.total;
+                this.area_code = res.data.area_code;
+                this.area_title = res.data.area_title;
+                this.color = res.data.color;
+                this.fashion = res.data.fashion;
+                this.house = res.data.house;
+                this.house_type = res.data.house_type;
+                this.layer = res.data.layer;
+                this.material = res.data.material;
+                this.number = res.data.number;
+                this.position = res.data.position;
+                this.product_title = res.data.product_title;
+                this.product_type = res.data.product_type;
+                this.state = res.data.state;
+                this.unit = res.data.unit;
+                this.url_number = res.data.url_number;
+                this.work = res.data.work;
+                this.copy_form = this.searchData;
               });
         }
       } else if (type === 0) {
@@ -769,9 +809,9 @@ export default {
     },
     uploadSuccess(res) {
       if (res.code == 200) {
-        console.log("111 :>> ", 111);
         this.$Message.success(res.data || "上传成功");
-        this.getData(0);
+        this.search_state = true;
+        this.getData(this.currency_tag);
       } else {
         this.$Message.warning(res.data || "上传失败");
       }
@@ -791,8 +831,10 @@ export default {
         this.axios
           .post("/api/order_area_save", { ...this.saveData })
           .then((res) => {
-            this.$Message.success(res.data);
-            this.save_state = true;
+            if (res.code == 200) {
+              this.$Message.success(res.msg);
+              this.save_state = true;
+            }
           });
       } else {
         this.$Message.error("请填写必要信息!");