1.修复页面校验信息未清除问题

2.修复未选择条码也可以进行删除问题
3.调整仓库字典页面,添加分页插件
master
x_z 3 years ago
parent 07dc8c7ea3
commit 18e5dfb618

@ -192,6 +192,15 @@
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="busQuery.limit"
@current-change="loadBussinessTypeList"
layout="prev, pager, next"
:total="busTotal"
:current-page="busQuery.page"
>
</el-pagination>
</el-card>
</div>
@ -217,7 +226,7 @@
<el-pagination
:page-size="addUserQuery.limit"
@current-change="loadUserList"
@current-change="getAddUserList"
layout="prev, pager, next"
:total="addUserTotal"
:current-page="addUserQuery.page"
@ -257,6 +266,15 @@
<el-table-column label="单据类型名称" prop="name" fixed></el-table-column>
</el-table>
<el-pagination
:page-size="bussinessTypeQuery.limit"
@current-change="addBussinessType"
layout="prev, pager, next"
:total="bussinessTypeTotal"
:current-page="bussinessTypeQuery.page"
>
</el-pagination>
<div slot="footer" class="dialog-footer">
<el-button @click.native="bussinessTypeFormVisible = !bussinessTypeFormVisible"
>取消
@ -868,24 +886,15 @@ export default {
this.$forceUpdate();
},
loadLinkData(row) {
let query = {
code: row.code
};
this.currentCode = row.code;
this.currentRow = row;
//
warehouseUserList(query).then((res) => {
this.userData = res.data;
}).catch((error) => {
this.$message.error("用户数据加载失败");
});
//
warehouseBussinessTypeList(query).then((res) => {
this.bussinessTypeData = res.data;
}).catch((error) => {
this.$message.error("单据类型数据加载失败");
});
this.userQuery.code = this.currentCode;
this.userQuery.page = 1;
this.busQuery.code = this.currentCode;
this.busQuery.page = 1;
this.loadUserList();
this.loadBussinessTypeList();
},
getAddUserList(val) {
this.addUserQuery.page = val;
@ -908,10 +917,14 @@ export default {
});
});
},
addUser() {
addUser(val) {
if (this.currentCode == null || this.currentCode == "") {
this.$message.error("请先选择仓库");
} else {
if (val === null || val === undefined) {
this.addUserQuery.page = 1;
this.addUserTotal = 0;
}
this.userFormVisible = true;
this.getAddUserList(1);
}
@ -920,15 +933,27 @@ export default {
loadUserList(val) {
if (val != null) {
this.userQuery.page = val;
}
};
//
warehouseUserList(this.userQuery).then((res) => {
this.userData = res.data.list;
this.userTotal = res.data.total;
this.userData = res.data.list || [];
this.userTotal = res.data.total || 0;
}).catch((error) => {
this.$message.error("用户数据加载失败")
});
},
loadBussinessTypeList(val) {
if (val != null) {
this.busQuery.page = val;
}
//
warehouseBussinessTypeList(this.busQuery).then((res) => {
this.bussinessTypeData = res.data.list || [];
this.busTotal = res.data.total || 0;
}).catch((error) => {
this.$message.error("单据类型数据加载失败");
});
},
handleUserSelectionChange(row) {
let _this = this;
_this.selectUserList = [];
@ -958,27 +983,25 @@ export default {
let loadParam = {
code: this.currentCode
};
//
warehouseUserList(loadParam).then((res) => {
this.userData = res.data;
}).catch((error) => {
});
this.loadUserList();
}).catch((error) => {
this.$message.error("添加失败");
});
},
addBussinessType() {
addBussinessType(val) {
if (this.currentCode == null || this.currentCode == "") {
this.$message.error("请先选择仓库");
} else {
this.bussinessTypeFormVisible = true;
let query = {
enabled: true,
customerId: this.$store.getters.customerId
};
getJoinBussinessType(query).then((res) => {
if (val === null || val === undefined) {
this.bussinessTypeQuery.page = 1;
} else {
this.bussinessTypeQuery.page = val;
}
getJoinBussinessType(this.bussinessTypeQuery).then((res) => {
this.selectBussinessTypeList = [];
this.bussinessTypeList = res.data.list;
this.bussinessTypeList = res.data.list || [];
this.bussinessTypeTotal = res.data.total || 0;
var that = this;
that.$nextTick(() => {
@ -1007,15 +1030,11 @@ export default {
bussinessTypes: JSON.stringify(this.selectBussinessTypeList)
};
saveWarehouseBussinessType(query).then((res) => {
this.$message.success("添加成功");
//
let loadParam = {
code: this.currentCode
};
warehouseBussinessTypeList(loadParam).then((res) => {
this.bussinessTypeData = res.data;
}).catch((error) => {
});
if (res.code === 20000) {
this.$message.success("添加成功");
//
this.loadBussinessTypeList();
}
}).catch((error) => {
});
}

@ -340,7 +340,9 @@ export default {
//
resetForm() {
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.formName === "add") {
this.$refs["dataForm"].resetFields();
}
this.$refs["dataForm"].clearValidate();
});
},
@ -349,23 +351,22 @@ export default {
//
this.formVisible = !this.formVisible;
//
this.$refs["dataForm"].resetFields();
return true;
},
//
handleForm(index, row) {
this.formVisible = true;
this.resetForm();
this.formData = JSON.parse(JSON.stringify(formJson));
if (row !== null) {
this.formData = Object.assign({}, row);
}
this.formName = "add";
this.formRules = this.addRules;
if (index !== null) {
this.index = index;
this.formName = "edit";
this.formRules = this.editRules;
this.formData = JSON.parse(JSON.stringify(formJson));
if (row !== null) {
this.formData = Object.assign({}, row);
}
}
if (this.$store.getters.customerId == 110) {
this.showRole = true;

@ -181,6 +181,10 @@ export default {
},
deleteDialog() {
if (this.multipleSelection.length === 0) {
this.$message.warning("请选择需要删除的条码")
return;
}
this.$confirm("是否删除所选条码?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -227,11 +231,15 @@ export default {
codes: codeList,
};
deleteCodes(tquery).then((response) => {
this.getCodeList();
this.$message({
type: "success",
message: "删除成功!",
});
if (response.code === 20000) {
this.getCodeList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error("删除失败!");
}
});
},

Loading…
Cancel
Save