Procházet zdrojové kódy

change: 测试环境硬填充数据逻辑调整.

peter před 1 rokem
rodič
revize
4651b3f32d
2 změnil soubory, kde provedl 8 přidání a 22 odebrání
  1. 8 10
      src/pages/purchase-order/edit.vue
  2. 0 12
      vite.config.ts

+ 8 - 10
src/pages/purchase-order/edit.vue

@@ -1261,7 +1261,7 @@ const createPurchaseOrders = function () {
   data.Total_Discount = totalDiscount.value
   data.Adjustment = adjustment.value
   data.Grand_Total = grandTotal.value
-  data.Subject = '这里不用填个p4'
+  data.Subject = '这里不用填'
   data.Created_By = {
     id: userInfo.value.users_id || route.query.user,
     name: userInfo.value.full_name || '',
@@ -1865,15 +1865,13 @@ axios
       (item: any) => !productBlackList.includes(item.product_id),
     )
 
-    if (import.meta.env.MODE !== 'production') {
-      temp = [
-        {
-          product_id: '5757019000000523001',
-          product_name: '测试商品, 强行写的',
-          quantity: 3,
-          rate: 2,
-        },
-      ]
+    if (import.meta.env.MODE !== 'production' && temp.length < 1) {
+      temp.unshift({
+        product_id: '5757019000000523001',
+        product_name: 'peter607',
+        quantity: 3,
+        rate: 2,
+      })
     }
     if (!temp.length) return
     form.value.productList = []

+ 0 - 12
vite.config.ts

@@ -15,18 +15,6 @@ export default defineConfig(({ mode }) => {
           changeOrigin: true,
           rewrite: (path) => path.replace(/^\/api/, ''),
         },
-        // '/common': {
-        //   target: 'http://zohocrm.promocollection.com.au:9008/',
-        //   changeOrigin: true,
-        // },
-        // '/purchase_orders': {
-        //   target: 'http://zohocrm.promocollection.com.au:9008/',
-        //   changeOrigin: true,
-        // },
-        // '/Purchase_orders': {
-        //   target: 'http://zohocrm.promocollection.com.au:9008/',
-        //   changeOrigin: true,
-        // },
       },
     },
     resolve: {