Quellcode durchsuchen

change: indent 转单前弹框确认.

peter vor 4 Monaten
Ursprung
Commit
00a235e9b7
1 geänderte Dateien mit 20 neuen und 13 gelöschten Zeilen
  1. 20 13
      src/pages/indent-manage/indent/components/quoteRecord.vue

+ 20 - 13
src/pages/indent-manage/indent/components/quoteRecord.vue

@@ -81,6 +81,7 @@ import {
   ElNotification,
   ElPagination,
   ElMessage,
+  ElMessageBox,
 } from 'element-plus'
 import { getCalcPriceRecord, generateOrder } from '@/api/indent'
 defineComponent({
@@ -123,19 +124,25 @@ let close = (done = {} as any) => {
 }
 
 const onChangeOrderClick = (row: any) => {
-  loading.value = true
-  generateOrder({ id: row.id })
-    .then((res: any) => {
-      if (res.code === 1) {
-        ElMessage.success('转单成功')
-      } else {
-        ElNotification({
-          title: '转单失败',
-          message: res.message + ', ' + row.toString(),
-        })
-      }
-    })
-    .finally(() => (loading.value = false))
+  ElMessageBox.confirm('选择该条计价记录进行转单, 是否继续?', '提示', {
+    confirmButtonText: '确定',
+    cancelButtonText: '取消',
+    type: 'warning',
+  }).then(() => {
+    loading.value = true
+    generateOrder({ id: row.id })
+      .then((res: any) => {
+        if (res.code === 1) {
+          ElMessage.success('转单成功')
+        } else {
+          ElNotification({
+            title: '转单失败',
+            message: res.message + ', ' + row.toString(),
+          })
+        }
+      })
+      .finally(() => (loading.value = false))
+  })
 }
 </script>
 <style lang="scss"></style>