Kaynağa Gözat

代码优化

yjwang 21 saat önce
ebeveyn
işleme
7722a44735
1 değiştirilmiş dosya ile 110 ekleme ve 15 silme
  1. 110 15
      src/api/store/storeOrder.js

+ 110 - 15
src/api/store/storeOrder.js

@@ -23,6 +23,27 @@ export function getStoreOrder(orderId) {
     method: 'get'
   })
 }
+
+/** 兼容列表页命名:getOrder */
+export function getOrder(orderId) {
+  return getStoreOrder(orderId)
+}
+
+// 查询收货地址
+export function getStoreOrderAddress(id) {
+  return request({
+    url: '/store/storeOrder/queryAddress/' + id,
+    method: 'get'
+  })
+}
+
+// 查询收货人电话
+export function getStoreOrderPhone(id) {
+  return request({
+    url: '/store/storeOrder/queryPhone/' + id,
+    method: 'get'
+  })
+}
 export function getPrescribe(orderId) {
   return request({
     url: '/store/storeOrder/Prescribe/' + orderId,
@@ -56,16 +77,18 @@ export function listOrderitem(orderId) {
     method: 'get'
   })
 }
-export function createErpOrder(orderId) {
+export function createErpOrder(query) {
   return request({
-    url: '/store/storeOrder/createErpOrder/' + orderId,
-    method: 'get'
+    url: '/store/storeOrder/createErpOrder',
+    method: 'get',
+    params: query
   })
 }
-export function getEroOrder(orderId) {
+export function getEroOrder(query) {
   return request({
-    url: '/store/storeOrder/getEroOrder/' + orderId,
-    method: 'get'
+    url: '/store/storeOrder/getEroOrder',
+    method: 'get',
+    params: query
   })
 }
 export function getExpress(orderId) {
@@ -74,23 +97,26 @@ export function getExpress(orderId) {
     method: 'get'
   })
 }
-export function editTuiMoney(orderId) {
+export function editTuiMoney(data) {
   return request({
-    url: '/store/storeOrder/editTuiMoney/' + orderId,
-    method: 'get'
+    url: '/store/storeOrder/editTuiMoney',
+    method: 'post',
+    data: data
   })
 }
 
-export function syncExpress(orderId) {
+export function syncExpress(data) {
   return request({
-    url: '/store/storeOrder/syncExpress/' + orderId,
-    method: 'get'
+    url: '/store/storeOrder/syncExpress',
+    method: 'post',
+    data: data
   })
 }
-export function updateExpress(orderId) {
+export function updateExpress(data) {
   return request({
-    url: '/store/storeOrder/updateExpress/' + orderId,
-    method: 'get'
+    url: '/store/storeOrder/updateExpress',
+    method: 'post',
+    data: data
   })
 }
 // 新增订单
@@ -102,6 +128,11 @@ export function addOrder(data) {
   })
 }
 
+/** 兼容详情页命名:addStoreOrder */
+export function addStoreOrder(data) {
+  return addOrder(data)
+}
+
 // 修改订单
 export function updateStoreOrder(data) {
   return request({
@@ -111,6 +142,11 @@ export function updateStoreOrder(data) {
   })
 }
 
+/** 兼容列表页命名:updateOrder */
+export function updateOrder(data) {
+  return updateStoreOrder(data)
+}
+
 // 修改物流编号
 export function updateDeliveryId(data) {
   return request({
@@ -180,6 +216,11 @@ export function delOrder(orderId) {
   })
 }
 
+/** 兼容详情页命名:delStoreOrder */
+export function delStoreOrder(orderId) {
+  return delOrder(orderId)
+}
+
 // 导出订单
 export function exportOrder(query) {
   return request({
@@ -188,6 +229,60 @@ export function exportOrder(query) {
     params: query
   })
 }
+
+/** 兼容详情页命名:exportStoreOrder / listStoreOrder */
+export function exportStoreOrder(query) {
+  return exportOrder(query)
+}
+
+export function listStoreOrder(query) {
+  return listOrder(query)
+}
+
+// 确认收货
+export function finishOrder(data) {
+  return request({
+    url: '/store/storeOrder/finishOrder',
+    method: 'post',
+    data: data
+  })
+}
+
+// 退款
+export function refundOrderMoney(data) {
+  return request({
+    url: '/store/storeOrder/refundOrderMoney',
+    method: 'post',
+    data: data
+  })
+}
+
+// 同步ERP物流
+export function updateErp(data) {
+  return request({
+    url: '/store/storeOrder/updateErpOrder',
+    method: 'post',
+    data: data
+  })
+}
+
+// 分佣
+export function addTuiMoney(data) {
+  return request({
+    url: '/store/storeOrder/addTuiMoney',
+    method: 'post',
+    data: data
+  })
+}
+
+// 尾款审核
+export function auditPayRemain(data) {
+  return request({
+    url: '/store/storeOrder/auditPayRemain',
+    method: 'post',
+    data: data
+  })
+}
 export function getCustomerOrderList(query) {
   return request({
     url: '/store/storeOrder/getCustomerOrderList',