|
|
|
@ -146,6 +146,15 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="userQuery.limit"
|
|
|
|
|
@current-change="loadUserList"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="userTotal"
|
|
|
|
|
:current-page="userQuery.page"
|
|
|
|
|
>
|
|
|
|
|
</el-pagination>
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-card style="width: 49%; float: right; margin-left: 0px;">
|
|
|
|
@ -206,6 +215,15 @@
|
|
|
|
|
<el-table-column label="用户名" prop="employeeName" fixed></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="addUserQuery.limit"
|
|
|
|
|
@current-change="loadUserList"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="addUserTotal"
|
|
|
|
|
:current-page="addUserQuery.page"
|
|
|
|
|
>
|
|
|
|
|
</el-pagination>
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click.native="userFormVisible = !userFormVisible"
|
|
|
|
|
>取消
|
|
|
|
@ -558,7 +576,32 @@ export default {
|
|
|
|
|
thrWareHouseVisible: false,
|
|
|
|
|
checkThrWarehouseRow: null,
|
|
|
|
|
currentSysId: null,
|
|
|
|
|
thirdSysVisible: false
|
|
|
|
|
thirdSysVisible: false,
|
|
|
|
|
userQuery: {
|
|
|
|
|
code: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
},
|
|
|
|
|
userTotal: 0,
|
|
|
|
|
busQuery: {
|
|
|
|
|
code: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
},
|
|
|
|
|
busTotal: 0,
|
|
|
|
|
addUserQuery: {
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
},
|
|
|
|
|
addUserTotal: 0,
|
|
|
|
|
bussinessTypeQuery: {
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
enabled: true,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
},
|
|
|
|
|
bussinessTypeTotal: 0
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -844,30 +887,47 @@ export default {
|
|
|
|
|
this.$message.error("单据类型数据加载失败");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getAddUserList(val) {
|
|
|
|
|
this.addUserQuery.page = val;
|
|
|
|
|
getUserList(this.addUserQuery).then((res) => {
|
|
|
|
|
this.selectUserList = [];
|
|
|
|
|
this.userList = res.data.list || [];
|
|
|
|
|
this.addUserTotal = res.data.total || 0;
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addUser() {
|
|
|
|
|
if (this.currentCode == null || this.currentCode == "") {
|
|
|
|
|
this.$message.error("请先选择仓库");
|
|
|
|
|
} else {
|
|
|
|
|
this.userFormVisible = true;
|
|
|
|
|
let query = {customerId: this.$store.getters.customerId};
|
|
|
|
|
getUserList(query).then((res) => {
|
|
|
|
|
this.selectUserList = [];
|
|
|
|
|
this.userList = res.data;
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
this.getAddUserList(1);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
loadUserList(val) {
|
|
|
|
|
if (val != null) {
|
|
|
|
|
this.userQuery.page = val;
|
|
|
|
|
}
|
|
|
|
|
//加载用户数据
|
|
|
|
|
warehouseUserList(this.userQuery).then((res) => {
|
|
|
|
|
this.userData = res.data.list;
|
|
|
|
|
this.userTotal = res.data.total;
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error("用户数据加载失败")
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleUserSelectionChange(row) {
|
|
|
|
|
let _this = this;
|
|
|
|
|