Pārlūkot izejas kodu

change: 创建PO接口字段名调整. 换用zoho 2.1版本API

peter 1 gadu atpakaļ
vecāks
revīzija
1cc52e9cbe
1 mainītis faili ar 9 papildinājumiem un 6 dzēšanām
  1. 9 6
      src/pages/purchase-order/edit.vue

+ 9 - 6
src/pages/purchase-order/edit.vue

@@ -1303,17 +1303,17 @@ const createPurchaseOrders = function () {
     name: form.value.Title,
   }
 
-  data.Product_Details = data.productList.map((item: any) => {
+  data.Purchase_Items = data.productList.map((item: any) => {
     return {
-      quantity: item.quantity,
+      Quantity: item.quantity,
       Discount: item.discount || 0,
-      list_price: item.rate,
+      List_Price: item.rate,
       Tax: 0,
       total: item.amount,
       total_after_discount: Number(item.amount) - Number(item.discount),
-      net_total: Number(item.amount) - Number(item.discount),
-      description: item.desc,
-      requirement: item.requirement,
+      Net_Total: Number(item.amount) - Number(item.discount),
+      Description: item.desc,
+      Requirement: item.requirement,
       line_tax: [],
       // book: '',
       // id: item.id,
@@ -1322,6 +1322,9 @@ const createPurchaseOrders = function () {
         id: item.id,
         // Product_Code: item.Product_Code,
       },
+      Product_Name: {
+        id: item.id,
+      },
       // 这两个是crm有的, 但是文档没有
       List_Price_Non_Currency: item.rate,
       Price_Book_Name: '',