手环管理

This commit is contained in:
jjLv 2024-08-09 16:21:52 +08:00
parent 118a935096
commit a27149e390
1 changed files with 4 additions and 81 deletions

View File

@ -475,8 +475,8 @@
</el-table>
<pagination
v-show="total>0"
:total="total"
v-show="totalTwo>0"
:total="totalTwo"
:page.sync="queryShbox.pageNum"
:limit.sync="queryShbox.pageSize"
@pagination="getboxList"
@ -929,21 +929,16 @@
methods: {
//-
picturePreview(file) {
console.log(file)
this.dialogImageUrl = file.url
this.dialogVisible = true
},
//
handleChange(file, fileList) {
console.log(file)
// this.$refs["form"].clearValidate()
this.formThree.fileName = file.name;
this.fileList = fileList;
},
handleRemove(file, fileList) {
let sum = 0
console.log(111111)
console.log(this.fileList)
this.fileList.forEach((item, index) => {
if (item.uid == file.uid) {
sum = index
@ -996,7 +991,6 @@
//
cancelEdit() {
this.showShEdit = false;
// this.resetEdit();
},
//
cancelBind() {
@ -1155,7 +1149,6 @@
this.shboxCodeTemp = row.shboxCode
let str = row.shboxCode
this.$nextTick(() => {
// this.selectionList.forEach((item, index) => {
this.$refs.codeItem.innerHTML = ''
var qrcode = new QRCode(this.$refs.codeItem, {
text: str, //
@ -1185,7 +1178,6 @@
},
/** 解除绑定操作 */
handleDelSh(row) {
console.log(row)
const param = {
shId:row.shId,
}
@ -1193,14 +1185,12 @@
return delSh(param);
}).then(() => {
this.getList();
// this.getBoxInfo();
this.$modal.msgSuccess("解除绑定成功");
}).catch(() => {});
},
/** 手环箱管理页面解除绑定操作 */
handleDelShbox(row) {
console.log(row)
const param = {
shId:row.shId,
}
@ -1248,7 +1238,6 @@
submitFormAttribute() {
this.$refs["formThree"].validate(valid => {
if (valid) {
console.log(this.formThree)
const reqData = new FormData()
reqData.append('params', JSON.stringify(this.formThree))
const { file } = this.getFileData()
@ -1276,12 +1265,10 @@
/** 绑定操作 */
handleBindSh(row) {
const shIds = row.shId || this.ids;
console.log(shIds)
const param = {
shboxId:this.shboxbindId,
shIds:shIds,
}
console.log(param)
this.$modal.confirm('确定与该手环箱绑定吗?').then(function() {
return bindSh(param);
}).then(() => {
@ -1373,7 +1360,6 @@
}else{
this.shboxId = row.shboxId;
}
console.log(this.queryshEdit)
},
@ -1394,30 +1380,10 @@
}
},
// getShboxBindNameAdd(e,row){
// this.queryshCodeBind.shboxId = row.shboxId;
// this.queryshCodeBind.shboxName = row.shboxName;
// this.queryshCodeBind.shboxCapacity = row.shboxCapacity;
// this.queryshCodeBind.shboxBindNum = row.shboxBindNum;
// if(this.shboxIdOne == row.shboxId){
// this.shboxIdOne = null
// e.target.checked = false;
// this.queryshCodeBind.shboxId = null;
// this.queryshCodeBind.shboxName =null;
// this.queryshCodeBind.shboxCapacity = null;
// this.queryshCodeBind.shboxBindNum = null;
// }else{
// this.shboxIdOne = row.shboxId;
// }
// },
/** 提交按钮 */
submitForm() {
this.queryshCode.shCode = this.queryshCode.shCode;
console.log(this.queryshCode);
this.$refs["queryshCode"].validate(valid => {
if (valid) {
addSh(this.queryshCode).then(response => {
@ -1432,7 +1398,6 @@
/** 手环绑定选择页面提交按钮 */
submitFormBind() {
console.log(this.queryshCodeBind);
if(this.queryshCodeBind.shboxId == undefined){
this.$modal.msgError("请选择手环箱");
return;
@ -1450,7 +1415,6 @@
/** 修改手环页面提交按钮 */
submitFormEdit() {
console.log(this.queryshEdit);
this.queryshEdit.shCode = this.queryshEdit.shCode;
this.queryshEdit.shboxId = this.shboxId;
this.$refs["queryshEdit"].validate(valid => {
@ -1470,14 +1434,12 @@
this.$refs["formTwo"].validate(valid => {
if (valid) {
if (this.formTwo.shboxId != undefined) {
console.log(this.formTwo)
editBox(this.formTwo).then(response => {
this.$modal.msgSuccess("修改成功");
this.openbox = false;
this.getboxList();
});
} else {
console.log(this.formTwo)
addBox(this.formTwo).then(response => {
this.$modal.msgSuccess("新增成功");
this.openbox = false;
@ -1492,13 +1454,11 @@
/** 删除按钮操作 */
handleDelete(row) {
console.log(row)
if(row.shboxName!=this.boxName){
this.$alert('请先解绑手环', '提示', {
type: 'warning',
confirmButtonText: '确定',
});
// this.$modal.msgError("");
return;
}
const param = {
@ -1514,14 +1474,11 @@
/** 手环箱子管理页面删除按钮操作 */
handleDeletebox(row) {
console.log(row)
console.log(row.shboxBindNum);
if (row.shboxBindNum!=0) {
this.$alert('手环箱不为空,还存放有手环,无法删除', '提示', {
type: 'warning',
confirmButtonText: '确定',
});
// this.$modal.msgError("");
return;
}
const param = {
@ -1553,7 +1510,6 @@
this.loadingTwo = true;
listShbox(this.queryshCode).then(response => {
this.shboxList = response.rows;
console.log(this.shboxList)
this.totalTwo = response.total;
this.loadingTwo = false;
});
@ -1572,11 +1528,9 @@
/** 手环箱管理查询手环箱列表 */
getboxList() {
this.loadingFive = true;
console.log(this.queryShbox);
listShboxall(this.queryShbox).then(response => {
this.shboxallList = response.rows;
console.log(this.shboxallList)
this.total = response.total;
this.totalTwo = response.total;
this.loadingFive = false;
if (this.currentSelection.length) {
this.$nextTick(() => {
@ -1599,7 +1553,6 @@
this.loadingFour = true;
listShbox(this.queryshEdit).then(response => {
this.shboxList = response.rows;
console.log(this.shboxList)
this.totalTwo = response.total;
this.loadingFour = false;
});
@ -1610,7 +1563,6 @@
this.loadingThree = true;
listShboxBind(this.queryshCodeBind).then(response => {
this.shboxListBind = response.rows;
console.log(this.shboxListBind)
this.totalThree = response.total;
this.loadingThree = false;
});
@ -1620,10 +1572,8 @@
getListNoBind(){
this.loadingSeven = true;
this.queryshNoBind.shboxId = this.queryShBoxall.shboxId;
console.log(this.queryshNoBind)
listShNoBind(this.queryshNoBind).then(response => {
this.shListNoBind = response.rows;
console.log(this.shboxListBind)
this.totalTwo = response.total;
this.loadingSeven = false;
});
@ -1631,19 +1581,16 @@
//
openShbox(row){
// this.sidebandId = row.sidebandId;
this.shboxIdOne = null;
this.title = "新增手环"
this.showsh = true;
this.getListTemp();
// this.radioOne=null;
this.queryshCode.pageNum = 1;
this.queryshCode.shCode = undefined;
},
//
openShboxTemp(row){
// this.sidebandId = row.sidebandId;
openShboxTemp(row){
this.queryshCodeBind = {};
this.shboxIdTwo = null;
this.title = "选择"
@ -1667,13 +1614,10 @@
//
openShall(row){
this.shboxId = row.shboxId;
console.log(row)
this.title = "绑定的手环信息",
this.boxId = row.shboxId;
this.Capacity = Number(row.shboxCapacity),
this.BindNum = Number(row.shboxBindNum),
// this.numers = Number(row.shboxCapacity)-Number(row.shboxBindNum);
// this.addNums = this.numers;
this.queryShBoxall.shboxId = row.shboxId;
this.showShall = true;
this.getListBoxall();
@ -1683,7 +1627,6 @@
//
getBoxInfo(){
console.log("------->"+this.shboxId);
getBoxNewInfo(this.boxId).then(response => {
console.log(response.data.boxNum)
this.numers = response.data.boxNum;
@ -1692,26 +1635,6 @@
})
},
//
cancelGt(){
this.highImgList = []
this.electricianImgList = []
this.elseImgList = []
this.showsh = false;
},
//
submitCertificate(){
console.log(this.highImgList)
console.log(this.electricianImgList)
console.log(this.elseImgList)
// this.highImgList = []
// this.electricianImgList = []
// this.elseImgList = []
this.showsh = false;
},
}
};
</script>