Переглянути джерело

feat: indent转单成功后跳转crm so详情页.

peter 3 тижнів тому
батько
коміт
42306b563f

+ 2 - 0
.env.development

@@ -1,6 +1,8 @@
 VITE_CRM_PATH=https://crm.zoho.com/crm/ShowHomePage.do
 VITE_PO_PATH=https://crm.zoho.com/crm/org742735154/tab/PurchaseOrders/
 VITE_PO_APPEND=/canvas/4791186000049921685
+VITE_SO_PATH=https://crm.zoho.com/crm/org742735154/tab/SalesOrders/
+VITE_SO_APPEND=/canvas/4791186000044787304
 VITE_API_PREFIX='//zohocrmapi.promocollection.com.au'
 VITE_API2_PREFIX='//zohocrmapi.promocollection.com.au'
 VITE_APP_OSS_PREFIX = '//promocollection.s3.ap-southeast-2.amazonaws.com'

+ 2 - 0
.env.production

@@ -1,6 +1,8 @@
 VITE_CRM_PATH=https://crm.zoho.com/crm/ShowHomePage.do
 VITE_PO_PATH=https://crm.zoho.com/crm/org742735154/tab/PurchaseOrders/
 VITE_PO_APPEND=/canvas/4791186000049921685
+VITE_SO_PATH=https://crm.zoho.com/crm/org742735154/tab/SalesOrders/
+VITE_SO_APPEND=/canvas/4791186000044787304
 VITE_API_PREFIX='//zohocrm.promocollection.com.au/api'
 VITE_API2_PREFIX='//zohocrm.promocollection.com.au/api'
 VITE_APP_OSS_PREFIX = '//promocollection.s3.ap-southeast-2.amazonaws.com'

+ 10 - 0
src/pages/indent-manage/indent/components/quoteRecord.vue

@@ -466,8 +466,18 @@ const onChangeOrderClick = (row: any) => {
     loading.value = true
     generateOrder(row)
       .then((res: any) => {
+        console.log(res, 'res')
         if (res.code === 1) {
           ElMessage.success('转单成功')
+          let temp = res.result.data
+          if (Array.isArray(temp) && temp.length) {
+            let id = temp[0].details?.id
+            window.open(
+              import.meta.env.VITE_SO_PATH +
+                `${id}` +
+                import.meta.env.VITE_SO_APPEND,
+            )
+          }
         } else {
           ElNotification({
             title: '转单失败',