Sfoglia il codice sorgente

修改账号相关接口

xiaodai2017 2 anni fa
parent
commit
ff86ba145d

+ 21 - 3
src/api/interest/companyAccount/index.ts

@@ -10,11 +10,24 @@ interface ResponseType extends Promise<any> {
 }
 }
 // 添加
 // 添加
 export const httpAdd = (data: object): ResponseType => {
 export const httpAdd = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}useradd`, { data });
+  return http.request("post", `${yewuApi}useradd`, {
+    data: {
+      ...data,
+      level: "2"
+    }
+  });
 };
 };
 // 列表
 // 列表
 export const httpList = (data: object): ResponseType => {
 export const httpList = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}userlist`, { data });
+  return http.request("post", `${yewuApi}usersinglelist`, {
+    data: {
+      ...data,
+      level: "2"
+    }
+  });
+};
+export const httpCompanyList = (data: object = {}): ResponseType => {
+  return http.request("post", `${yewuApi}companylist`, { data });
 };
 };
 // 详情
 // 详情
 export const httpDetail = (data: object): ResponseType => {
 export const httpDetail = (data: object): ResponseType => {
@@ -22,7 +35,12 @@ export const httpDetail = (data: object): ResponseType => {
 };
 };
 // 更新
 // 更新
 export const httpUpdate = (data: object): ResponseType => {
 export const httpUpdate = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}usersave`, { data });
+  return http.request("post", `${yewuApi}useradd`, {
+    data: {
+      ...data,
+      level: "2"
+    }
+  });
 };
 };
 // 状态
 // 状态
 export const httpStatus = (data: object): ResponseType => {
 export const httpStatus = (data: object): ResponseType => {

+ 17 - 5
src/api/supplierManage/supplierAccoutManage/index.ts

@@ -10,14 +10,21 @@ interface ResponseType extends Promise<any> {
 }
 }
 // 添加
 // 添加
 export const httpAdd = (data: object): ResponseType => {
 export const httpAdd = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}supplierAccountAdd`, { data });
+  return http.request("post", `${yewuApi}useradd`, {
+    data: {
+      ...data,
+      level: "3"
+    }
+  });
 };
 };
 // 列表
 // 列表
 export const httpList = (data: object = {}): ResponseType => {
 export const httpList = (data: object = {}): ResponseType => {
-  return http.request("post", `${yewuApi}usersinglelist`, { data : {
-     ...data,
+  return http.request("post", `${yewuApi}usersinglelist`, {
+    data: {
+      ...data,
       level: "3"
       level: "3"
-    }});
+    }
+  });
 };
 };
 
 
 // 详情
 // 详情
@@ -27,7 +34,12 @@ export const httpDetail = (data: object): ResponseType => {
 
 
 // 更新
 // 更新
 export const httpUpdate = (data: object): ResponseType => {
 export const httpUpdate = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}usersave`, { data });
+  return http.request("post", `${yewuApi}useradd`, {
+    data: {
+      ...data,
+      level: "3"
+    }
+  });
 };
 };
 
 
 // 状态
 // 状态

+ 17 - 8
src/api/interest/account/index.ts → src/api/system/account/index.ts

@@ -10,26 +10,35 @@ interface ResponseType extends Promise<any> {
 }
 }
 // 添加
 // 添加
 export const httpAdd = (data: object): ResponseType => {
 export const httpAdd = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}useradd`, { data });
+  return http.request("post", `${yewuApi}useradd`, {
+    data: {
+      ...data,
+      level: "1"
+    }
+  });
 };
 };
 // 列表
 // 列表
 export const httpList = (data: object = {}): ResponseType => {
 export const httpList = (data: object = {}): ResponseType => {
-  return http.request("post", `${yewuApi}usersinglelist`, {data:{
+  return http.request("post", `${yewuApi}usersinglelist`, {
+    data: {
       ...data,
       ...data,
-      level: "2"
-    }});
+      level: "1"
+    }
+  });
 };
 };
 
 
-export const httpCompanyList = (data: object = {}): ResponseType => {
-  return http.request("post", `${yewuApi}companylist`, { data });
-};
 // 详情
 // 详情
 export const httpDetail = (data: object): ResponseType => {
 export const httpDetail = (data: object): ResponseType => {
   return http.request("post", `${yewuApi}userinfo`, { data });
   return http.request("post", `${yewuApi}userinfo`, { data });
 };
 };
 // 更新
 // 更新
 export const httpUpdate = (data: object): ResponseType => {
 export const httpUpdate = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}usersave`, { data });
+  return http.request("post", `${yewuApi}useradd`, {
+    data: {
+      ...data,
+      level: "1"
+    }
+  });
 };
 };
 // 状态
 // 状态
 export const httpStatus = (data: object): ResponseType => {
 export const httpStatus = (data: object): ResponseType => {

+ 1 - 1
src/views/interest/accountQuery/index.vue

@@ -4,7 +4,7 @@ import RoleModal from "./components/role-modal.vue";
 import contentConfig from "./config/content.config";
 import contentConfig from "./config/content.config";
 import searchConfig from "./config/search.config";
 import searchConfig from "./config/search.config";
 import { usePageSearch, type PageHooks, type PageEvents } from "/@/hooks/page";
 import { usePageSearch, type PageHooks, type PageEvents } from "/@/hooks/page";
-import { httpSetRole } from "/@/api/interest/account";
+import { httpSetRole } from "/@/api/system/account";
 import { useAsync } from "/@/hooks/core/useAsync";
 import { useAsync } from "/@/hooks/core/useAsync";
 import { ModalTypes } from "./types";
 import { ModalTypes } from "./types";
 
 

+ 1 - 1
src/views/interest/companyAccount-origin/index.vue

@@ -1,7 +1,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { watch } from "vue";
 import { watch } from "vue";
 import { useColumns } from "./columns";
 import { useColumns } from "./columns";
-import { httpList, httpStatus } from "/@/api/interest/account";
+import { httpList, httpStatus } from "/@/api/system/account";
 import { reactive, ref, onMounted } from "vue";
 import { reactive, ref, onMounted } from "vue";
 import { type FormInstance } from "element-plus";
 import { type FormInstance } from "element-plus";
 import { TableProBar } from "/@/components/ReTable";
 import { TableProBar } from "/@/components/ReTable";

+ 1 - 1
src/views/interest/companyAccount-origin/resetPassword.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
 <script setup lang="ts">
-import { httpSetPwd } from "/@/api/interest/account";
+import { httpSetPwd } from "/@/api/system/account";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { reactive, ref, watch, nextTick } from "vue";
 import { reactive, ref, watch, nextTick } from "vue";
 import { useNav } from "/@/layout/hooks/nav";
 import { useNav } from "/@/layout/hooks/nav";

+ 6 - 2
src/views/interest/companyAccount/components/company-modal.vue

@@ -2,7 +2,7 @@
 import { ElTable } from "element-plus";
 import { ElTable } from "element-plus";
 import { reactive, ref, unref } from "vue";
 import { reactive, ref, unref } from "vue";
 import { useResponseHandle } from "/@/hooks/core/useAsync";
 import { useResponseHandle } from "/@/hooks/core/useAsync";
-import { httpCompanyList } from "/@/api/interest/account";
+import { httpCompanyList } from "/@/api/interest/companyAccount";
 
 
 const paymentList = ref<Array<Record<string, string>>>([]);
 const paymentList = ref<Array<Record<string, string>>>([]);
 const selectOrder = ref<Array<Record<string, string>>>([]);
 const selectOrder = ref<Array<Record<string, string>>>([]);
@@ -104,7 +104,11 @@ defineExpose({
       @selection-change="handleSelectionChange"
       @selection-change="handleSelectionChange"
     >
     >
       <el-table-column type="selection" width="55" />
       <el-table-column type="selection" width="55" />
-      <el-table-column label="公司编号" prop="companyNo" show-overflow-tooltip />
+      <el-table-column
+        label="公司编号"
+        prop="companyNo"
+        show-overflow-tooltip
+      />
       <el-table-column label="公司名称" prop="name" show-overflow-tooltip />
       <el-table-column label="公司名称" prop="name" show-overflow-tooltip />
       <!--<el-table-column label="公司类型" prop="nature" show-overflow-tooltip />-->
       <!--<el-table-column label="公司类型" prop="nature" show-overflow-tooltip />-->
     </el-table>
     </el-table>

+ 1 - 2
src/views/interest/companyAccount/index.vue

@@ -1,7 +1,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { watch } from "vue";
 import { watch } from "vue";
 import { useColumns } from "./columns";
 import { useColumns } from "./columns";
-import { httpList, httpStatus } from "/@/api/interest/account";
+import { httpList, httpStatus } from "/@/api/interest/companyAccount";
 import { reactive, ref, onMounted } from "vue";
 import { reactive, ref, onMounted } from "vue";
 import { type FormInstance } from "element-plus";
 import { type FormInstance } from "element-plus";
 import { TableProBar } from "/@/components/ReTable";
 import { TableProBar } from "/@/components/ReTable";
@@ -74,7 +74,6 @@ const handleStatus = async row => {
     status: status + "" === "1" ? "0" : "1"
     status: status + "" === "1" ? "0" : "1"
   });
   });
 
 
-
   responseHandle({
   responseHandle({
     code,
     code,
     message,
     message,

+ 1 - 1
src/views/interest/companyAccount/resetPassword.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
 <script setup lang="ts">
-import { httpSetPwd } from "/@/api/interest/account";
+import { httpSetPwd } from "/@/api/interest/companyAccount";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { reactive, ref, watch, nextTick } from "vue";
 import { reactive, ref, watch, nextTick } from "vue";
 import { useNav } from "/@/layout/hooks/nav";
 import { useNav } from "/@/layout/hooks/nav";

+ 1 - 1
src/views/supplierManage/supplierAccoutManage/resetPassword.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
 <script setup lang="ts">
-import { httpSetPwd } from "/@/api/interest/account";
+import { httpSetPwd } from "/@/api/system/account";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { reactive, ref, watch, nextTick } from "vue";
 import { reactive, ref, watch, nextTick } from "vue";
 import { useNav } from "/@/layout/hooks/nav";
 import { useNav } from "/@/layout/hooks/nav";

+ 1 - 1
src/views/system/account/addEdit.vue

@@ -1,6 +1,6 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { reactive, ref, watch, nextTick } from "vue";
 import { reactive, ref, watch, nextTick } from "vue";
-import { httpAdd, httpUpdate } from "/@/api/interest/account";
+import { httpAdd, httpUpdate } from "/@/api/system/account";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { useNav } from "/@/layout/hooks/nav";
 import { useNav } from "/@/layout/hooks/nav";
 import { isMobile } from "/@/utils/validate";
 import { isMobile } from "/@/utils/validate";

+ 1 - 1
src/views/system/account/index.vue

@@ -1,6 +1,6 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { useColumns } from "./columns";
 import { useColumns } from "./columns";
-import { httpList, httpStatus } from "/@/api/interest/account";
+import { httpList, httpStatus } from "/@/api/system/account";
 import { reactive, ref, onMounted } from "vue";
 import { reactive, ref, onMounted } from "vue";
 import { type FormInstance } from "element-plus";
 import { type FormInstance } from "element-plus";
 import { TableProBar } from "/@/components/ReTable";
 import { TableProBar } from "/@/components/ReTable";

+ 1 - 1
src/views/system/account/resetPassword.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
 <script setup lang="ts">
-import { httpSetPwd } from "/@/api/interest/account";
+import { httpSetPwd } from "/@/api/system/account";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { ElMessage, FormInstance, FormRules } from "element-plus";
 import { reactive, ref, watch, nextTick } from "vue";
 import { reactive, ref, watch, nextTick } from "vue";
 import { useNav } from "/@/layout/hooks/nav";
 import { useNav } from "/@/layout/hooks/nav";