chenrui 10 miesięcy temu
rodzic
commit
cd446d39d3

+ 9 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -221,7 +221,7 @@
     <!-- 缺货明细 -->
     <stockOutDetail :openModal="showStockOut" :detailData="detailData" :salesBillSn="$route.params.sn || bizSn" @close="showStockOut=false"></stockOutDetail>
     <!-- 改单 -->
-    <tipModal ref="tipModal" :openModal="openTipModal" :dataList="sourceData" @close="openTipModal=false" @ok="openTipModalOk"></tipModal>
+    <tipModal ref="tipModal" :openModal="openTipModal" :dataList="sourceData" @close="closeTipModal" @ok="openTipModalOk"></tipModal>
   </div>
 </template>
 
@@ -355,6 +355,14 @@ export default {
         }
       })
     },
+    // 取消时,跳转编辑页面
+    closeTipModal () {
+      this.openTipModal = false
+      this.$router.push({ name: 'salesNewEdit', params: { sn: this.tempSalesBillSn } })
+      this.$nextTick(() => {
+        this.tempSalesBillSn = null
+      })
+    },
     //  重置
     resetSearchForm () {
       this.warehouseSn = undefined

+ 9 - 1
src/views/salesManagement/salesQueryNew/list.vue

@@ -305,7 +305,7 @@
       <!-- 导出提示框 -->
       <reportModal :visible="showExport" @close="showExport=false"></reportModal>
       <!-- 改单 -->
-      <tipModal ref="tipModal" :openModal="openTipModal" :dataList="sourceData" @close="openTipModal=false" @ok="openTipModalOk"></tipModal>
+      <tipModal ref="tipModal" :openModal="openTipModal" :dataList="sourceData" @close="closeTipModal" @ok="openTipModalOk"></tipModal>
     </a-card>
   </div>
 </template>
@@ -613,6 +613,14 @@ export default {
         }
       })
     },
+    // 取消时,跳转编辑页面
+    closeTipModal () {
+      this.openTipModal = false
+      this.$router.push({ name: 'salesNewEdit', params: { sn: this.tempSalesBillSn } })
+      this.$nextTick(() => {
+        this.tempSalesBillSn = null
+      })
+    },
     // 删除
     handleDel (row) {
       const _this = this

+ 6 - 1
src/views/salesManagement/salesQueryNew/tipModal.vue

@@ -69,7 +69,7 @@
           </a-radio-group>
         </div>
         <div style="margin-top:36px;text-align:center;">
-          <a-button @click="isShow = false" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button @click="handleCancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
           <a-button type="primary" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
         </div>
       </div>
@@ -174,6 +174,11 @@ export default {
         productPriceChangeFlag: _this.priceVal
       }
       _this.$emit('ok', objInfo)
+    },
+    // 关闭弹窗
+    handleCancel () {
+      this.isShow = false
+      this.$emit('close')
     }
   },
   watch: {