diff --git a/src/api/url.js b/src/api/url.js
index e2c02d7..a828494 100644
--- a/src/api/url.js
+++ b/src/api/url.js
@@ -180,6 +180,8 @@ export default {
searchAllocationSN: "/accountManager/searchAllocationSN",
// 搜索可分配的单位用户
searchAllocationUser: "/accountManager/searchAllocationUser",
+ // 修改可管理的SN号数量
+ editSNCount: "/accountManager/editSNCount",
// B端分配SN号
allocationSN: "/accountManager/allocationSN",
// 查看B端SN号分配记录
diff --git a/src/components/mainPage/SNAdmin.vue b/src/components/mainPage/SNAdmin.vue
index 79daab9..033d094 100644
--- a/src/components/mainPage/SNAdmin.vue
+++ b/src/components/mainPage/SNAdmin.vue
@@ -43,7 +43,7 @@
>
用户可管理的SN号数量
-
+
+
+ 修改
+
确认{{ mode ? "绑定" : "解绑" }}
@@ -227,6 +230,32 @@ const searchAllocationSN = () => {
});
};
+const editSNCount = () => {
+ if (selectedUser.value === "") {
+ ElMessage.warning("请选择用户!");
+ return;
+ }
+ const data = {
+ user_uid: userObj.value[selectedUser.value].uid,
+ length: snCount.value
+ };
+ $http.post($url.editSNCount, data).then((res) => {
+ if (res.data.code === 200) {
+ resetCheckForm();
+ usersArr.value = [];
+ SNArr.value = [];
+ searchAllocationUser();
+ searchAllocationSN();
+ ElMessage({
+ message: "修改成功!",
+ type: "success",
+ });
+ } else {
+ ElMessage.error("修改失败!");
+ }
+ });
+};
+
const allocationSN = () => {
if (
selectedUser.value === "" ||