添加修改SN号数量功能
This commit is contained in:
@@ -180,6 +180,8 @@ export default {
|
|||||||
searchAllocationSN: "/accountManager/searchAllocationSN",
|
searchAllocationSN: "/accountManager/searchAllocationSN",
|
||||||
// 搜索可分配的单位用户
|
// 搜索可分配的单位用户
|
||||||
searchAllocationUser: "/accountManager/searchAllocationUser",
|
searchAllocationUser: "/accountManager/searchAllocationUser",
|
||||||
|
// 修改可管理的SN号数量
|
||||||
|
editSNCount: "/accountManager/editSNCount",
|
||||||
// B端分配SN号
|
// B端分配SN号
|
||||||
allocationSN: "/accountManager/allocationSN",
|
allocationSN: "/accountManager/allocationSN",
|
||||||
// 查看B端SN号分配记录
|
// 查看B端SN号分配记录
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
>
|
>
|
||||||
<div class="sn-count-label">
|
<div class="sn-count-label">
|
||||||
用户可管理的SN号数量
|
用户可管理的SN号数量
|
||||||
<div>
|
<div class="flex justify-center">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.number="snCount"
|
v-model.number="snCount"
|
||||||
type="number"
|
type="number"
|
||||||
@@ -52,6 +52,9 @@
|
|||||||
:min="0"
|
:min="0"
|
||||||
@change="validateSNCount"
|
@change="validateSNCount"
|
||||||
/>
|
/>
|
||||||
|
<el-button type="primary" @click="editSNCount">
|
||||||
|
修改
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button class="bind-button" type="primary" @click="allocationSN">
|
<el-button class="bind-button" type="primary" @click="allocationSN">
|
||||||
确认{{ mode ? "绑定" : "解绑" }}
|
确认{{ 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 = () => {
|
const allocationSN = () => {
|
||||||
if (
|
if (
|
||||||
selectedUser.value === "" ||
|
selectedUser.value === "" ||
|
||||||
|
|||||||
Reference in New Issue
Block a user