From 9d3f1aa7571cd532c0c27bf8376ebf4b2178a252 Mon Sep 17 00:00:00 2001
From: charles <981744753@qq.com>
Date: 星期三, 24 七月 2024 17:45:45 +0800
Subject: [PATCH] fix:解决srm之前改了域名,处理各种异常状态,跳转也会出现异常等问题。

---
 src/api/supplierManage/supplier.js |   78 ++++++++++++++++++++++++++++++--------
 1 files changed, 61 insertions(+), 17 deletions(-)

diff --git a/src/api/supplierManage/supplier.js b/src/api/supplierManage/supplier.js
index 0f556e1..ade24f4 100644
--- a/src/api/supplierManage/supplier.js
+++ b/src/api/supplierManage/supplier.js
@@ -1,16 +1,18 @@
 import request from "@/common/untils/request.js"
-import axios from "axios"
+// import axios from "axios"
 
 // 鏈嶅姟鍟嗗垪琛�
-export const getSupplierList = async (data) => {
-  return await axios.get(`/api/s/getSupplierList`, {
+export function getSupplierList(data) {
+  return request({
+    url: "/api-srm/s/getSupplierList",
+    method: "get",
     params: data
   })
 }
 // 鍒涘缓鏈嶅姟鍟�
 export function createSupplier(data) {
   return request({
-    url: "/api/s/createSupplier",
+    url: "/api-srm/s/createSupplier",
     method: "post",
     data
   })
@@ -18,7 +20,7 @@
 // 鍒犻櫎鏈嶅姟鍟�
 export function deleteSupplier(data) {
   return request({
-    url: "/api/s/deleteSupplier",
+    url: "/api-srm/s/deleteSupplier",
     method: "delete",
     data
   })
@@ -26,7 +28,7 @@
 // 鏇存柊鏈嶅姟鍟�
 export function updateSupplier(data) {
   return request({
-    url: "/api/s/updateSupplier",
+    url: "/api-srm/s/updateSupplier",
     method: "put",
     data
   })
@@ -34,14 +36,16 @@
 //  淇敼鏈嶅姟鍟嗙姸鎬�
 export function changeSupplierStatus(data) {
   return request({
-    url: "/api/s/changeSupplierStatus",
+    url: "/api-srm/s/changeSupplierStatus",
     method: "post",
     data
   })
 }
 // 鐢╥d鏌ヨ鏈嶅姟鍟�
-export const findSupplier = async (data) => {
-  return await axios.get(`/api/s/findSupplier`, {
+export function findSupplier(data) {
+  return request({
+    url: "/api-srm/s/findSupplier",
+    method: "get",
     params: data
   })
 }
@@ -49,31 +53,71 @@
 // 鏇存柊鏈嶅姟鍟嗙被鍨�
 export function updateSupplierType(data) {
   return request({
-    url: "/api/st/updateSupplierType",
+    url: "/api-srm/st/updateSupplierType",
     method: "put",
     data
   })
 }
 // 鏈嶅姟鍟嗙被鍨嬪垪琛�
-export const getSupplierTypeList = async (data) => {
-  return await axios.get(`/api/st/getSupplierTypeList`, {
+export function getSupplierTypeList(data) {
+  return request({
+    url: "/api-srm/st/getSupplierTypeList",
+    method: "get",
     params: data
   })
 }
 
 // 涓婁紶鍚堝悓
-export const createContract = async (data) => {
-  return await axios.post(`/api/con/createContract`, data, {
-    headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8" }
+// export const createContract = async (data) => {
+//   return await axios.post(`/api-srm/con/createContract`, data, {
+//     headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8" }
+//   })
+// }
+export function createContract(data) {
+  return request({
+    url: "/api-srm/con/createContract",
+    method: "post",
+    data
   })
 }
 // 鍒犻櫎鍚堝悓
 export function deleteContract(data) {
   return request({
-    url: "/api/con/deleteContract",
+    url: "/api-srm/con/deleteContract",
     method: "delete",
     data
   })
 }
+// 棰勮鍚堝悓
+export function previewContract(data) {
+  return request({
+    url: "/api-srm/con/previewContract",
+    method: "get",
+    params: data
+  })
+}
+// 涓嬭浇鍚堝悓
+export function downloadContract(data) {
+  return request({
+    url: "/api-srm/downloadContract",
+    method: "get",
+    params: data
+  })
+}
 
-//
+// 鏇存柊鎵�灞炶涓�
+export function updateIndustry(data) {
+  return request({
+    url: "/api-srm/i/updateIndustry",
+    method: "put",
+    data
+  })
+}
+// 鎵�灞炶涓氬垪琛�
+export function getIndustryList(data) {
+  return request({
+    url: "/api-srm/i/getIndustryList",
+    method: "get",
+    params: data
+  })
+}

--
Gitblit v1.8.0