Browse Source

no message

linwenxin 1 năm trước cách đây
mục cha
commit
b26083f5e1

+ 7 - 1
src/views/secondHandMall/orderManagement/add.vue

@@ -25,6 +25,12 @@ import { required, mobileRequired, mobile, httpUrl, email } from '@/components/t
 export default {
   components: {ImageUpload},
   mixins: [getLbsAmapRegion, editTable],
+  props:{
+    detailsType: {
+      type: [String, Number],
+      default: ""
+    },
+  },
   data(){
     return {
       formData: {
@@ -440,7 +446,7 @@ export default {
     })
     esGoodsList({"pageNum":1,"pageSize":-1,"params":[{"param":"a.status","compare":"=","value":"ON"}]}).then(res=>{
       this.esGoodsList = res.data.records
-      if(this?.$route?.params?.pageType==="add" && this?.$route?.params?.pageCode){
+      if(this?.$route?.params?.pageType==="add" && this?.$route?.params?.pageCode && this.detailsType == 0){
         var data = this.esGoodsList.find( item => item.id===this?.$route?.params?.pageCode )
         this.formData.esOrderInfos.push({
           "area": "",

+ 5 - 5
src/views/secondHandMall/orderManagement/index.vue

@@ -67,7 +67,7 @@
                       <el-tab-pane label="已退货/取消" name="CANCEL"></el-tab-pane>
                       <el-tab-pane label="已超时" name="TIME_OUT"></el-tab-pane>
                     </el-tabs>
-                    <el-button class="fl" type="primary" size="small" @click="add">新增</el-button>
+                    <el-button class="fl" type="primary" size="small" @click="add(1)">新增</el-button>
                   </div>
                   <div class="fr">
                     <el-button size="small" type="primary" @click="handleExport">导出</el-button>
@@ -180,7 +180,7 @@
           </div>
           <!-- 新增 -->
           <div v-if="activeKey == 'add'" style="width:100%;height:100%;">
-            <add :detailsId="detailsId" @removeTab="()=>{
+            <add :detailsId="detailsId" :detailsType="detailsType" @removeTab="()=>{
               getList()
               data.removeTab()
             }"/>
@@ -262,7 +262,7 @@ export default {
     }
     if(this.pageType==="add" && this.pageCode){
       this.$nextTick(()=>{
-        this.add()
+        this.add(0)
       })
     }
   },
@@ -283,7 +283,7 @@ export default {
         this.getList();
       })
     },
-    add(){
+    add(type){
       this.$refs.tabPage.addTab({
         // 对应显示的模块
         activeKey: "add",
@@ -293,7 +293,7 @@ export default {
         label: "新增订单",
         // 打开时事件
         triggerEvent: () => {
-        
+          this.detailsType = type
         },
         // 关闭时事件
         closeEvent: () => {