1.仓库添加关联用户和单据类型候选列表页添加分页功能

fengcang
x_z 3 years ago
parent f09537dc0d
commit 7d76a568af

@ -317,6 +317,15 @@
<el-table-column label="用户名" prop="employeeName" fixed></el-table-column> <el-table-column label="用户名" prop="employeeName" fixed></el-table-column>
</el-table> </el-table>
<el-pagination
:page-size="hospitalUserQuery.limit"
@current-change="getHospitalUser"
layout="prev, pager, next"
:total="hospitalUserTotal"
:current-page="hospitalUserQuery.page"
>
</el-pagination>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click.native="userFormVisible = !userFormVisible" <el-button @click.native="userFormVisible = !userFormVisible"
>取消 >取消
@ -349,6 +358,15 @@
<el-table-column label="单据类型名称" prop="name" fixed></el-table-column> <el-table-column label="单据类型名称" prop="name" fixed></el-table-column>
</el-table> </el-table>
<el-pagination
:page-size="bussinessTypeQuery.limit"
@current-change="getBussinessType"
layout="prev, pager, next"
:total="bussinessTypeTotal"
:current-page="bussinessTypeQuery.page"
>
</el-pagination>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click.native="bussinessTypeFormVisible = !bussinessTypeFormVisible" <el-button @click.native="bussinessTypeFormVisible = !bussinessTypeFormVisible"
>取消 >取消
@ -863,7 +881,18 @@ export default {
page: 1, page: 1,
limit: 10 limit: 10
}, },
busTotal: 0 busTotal: 0,
hospitalUserQuery: {
page: 1,
limit: 10
},
hospitalUserTotal: 0,
bussinessTypeQuery: {
enabled: true,
page: 1,
limit: 10
},
bussinessTypeTotal: 0
}; };
}, },
methods: { methods: {
@ -1298,24 +1327,56 @@ export default {
this.$message.error("请先选择当前分库!") this.$message.error("请先选择当前分库!")
} else { } else {
this.userFormVisible = true; this.userFormVisible = true;
getHospitalUserList().then((res) => { this.hospitalUserQuery.page = 1;
this.selectUserList = []; this.getHospitalUser();
this.userList = res.data; }
var that = this; },
that.$nextTick(() => { getHospitalUser(val) {
if (that.$refs.checkUserList) { if (val != null) {
that.$refs.checkUserList.clearSelection(); this.hospitalUserQuery.page = val;
}
getHospitalUserList(this.hospitalUserQuery).then((res) => {
this.selectUserList = [];
this.userList = res.data.list;
this.hospitalUserTotal = res.data.total;
var that = this;
that.$nextTick(() => {
if (that.$refs.checkUserList) {
that.$refs.checkUserList.clearSelection();
}
that.userList.forEach(row => {
for (let j in that.userData) {
if (row.id == that.userData[j].userid) {
that.$refs.checkUserList.toggleRowSelection(row, true);
}
} }
that.userList.forEach(row => { });
for (let j in that.userData) { })
if (row.id == that.userData[j].userid) { });
that.$refs.checkUserList.toggleRowSelection(row, true); },
} getBussinessType(val) {
if (val != null) {
this.bussinessTypeQuery.page = val;
}
getJoinBussinessType(this.bussinessTypeQuery).then((res) => {
this.selectBussinessTypeList = [];
this.bussinessTypeList = res.data.list;
var that = this;
that.$nextTick(() => {
if (that.$refs.typeList) {
that.$refs.typeList.clearSelection();
}
that.bussinessTypeList.forEach(row => {
for (let j in that.bussinessTypeData) {
if (row.action == that.bussinessTypeData[j].action) {
that.$refs.typeList.toggleRowSelection(row, true);
} }
}); }
}) });
}); });
} }).catch((error) => {
});
}, },
handleUserSelectionChange(row) { handleUserSelectionChange(row) {
let _this = this; let _this = this;
@ -1379,28 +1440,8 @@ export default {
this.$message.error("请先选择当前分库!") this.$message.error("请先选择当前分库!")
} else { } else {
this.bussinessTypeFormVisible = true; this.bussinessTypeFormVisible = true;
let query = { this.bussinessTypeQuery.page = 1;
enabled: true this.getBussinessType();
};
getJoinBussinessType(query).then((res) => {
this.selectBussinessTypeList = [];
this.bussinessTypeList = res.data.list;
var that = this;
that.$nextTick(() => {
if (that.$refs.typeList) {
that.$refs.typeList.clearSelection();
}
that.bussinessTypeList.forEach(row => {
for (let j in that.bussinessTypeData) {
if (row.action == that.bussinessTypeData[j].action) {
that.$refs.typeList.toggleRowSelection(row, true);
}
}
});
});
}).catch((error) => {
});
} }
}, },
addBussinessTypeData() { addBussinessTypeData() {

Loading…
Cancel
Save