基础管理-班组

master
A0010407 1 year ago
parent 52f0da7945
commit 934045afe6

@ -9,6 +9,24 @@ export function listTeam(query) {
});
}
// 查询班组列表
export function listTeamMembers(query) {
return request({
url: '/wms/teamUser/listTeamMembers',
method: 'get',
params: query
});
}
// 查询班组列表
export function getRightList(query) {
return request({
url: '/wms/teamUser/getRightList',
method: 'get',
params: query
});
}
// 查询班组详细
export function getTeam(teamId) {
return request({

@ -216,7 +216,7 @@
</el-col>
</el-row>
</el-form>
<!-- <el-divider></el-divider>
<el-divider></el-divider>
<el-card>
<div style="text-align: center">
<template>
@ -224,6 +224,7 @@
filterable
filter-placeholder="请输入班组人员名称"
:titles="['可选班组人员', '当前班组人员']"
:button-texts="['解除添加', '添加']"
:data="leftList"
v-model="rightList"
style="text-align: left"
@ -231,7 +232,7 @@
</el-transfer>
</template>
</div>
</el-card> -->
</el-card>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
@ -241,7 +242,7 @@
</template>
<script>
import { listTeam, getTeam, delTeam, addTeam, updateTeam ,listTeamMembers} from "@/api/wms/team";
import { listTeam, getTeam, delTeam, addTeam, updateTeam ,listTeamMembers,getRightList} from "@/api/wms/team";
export default {
name: "Team",
@ -263,10 +264,10 @@ export default {
//
teamList: [],
teamMembersList:[],
// //
// leftList: [],
// // key
// rightList: [],
//
leftList: [],
// key
rightList: [],
//
title: "",
//
@ -330,24 +331,24 @@ export default {
indexMethod(index) {
return index + 1;
},
// getTeamMembers() {
// //
// listTeamMembers(this.queryParams).then(response => {
// for(let i in response.rows){
// // 穿
// this.leftList.push({
// key: response.rows[i].userId,
// label: response.rows[i].userName
// })
// }
// for(let i in response.selected){
// // 穿
// this.rightList.push(response.selected[i].key);
// this.form.rightData = this.rightList;
// }
// this.loading = false;
// });
// },
getTeamMembers() {
//
listTeamMembers(this.queryParams).then(response => {
console.log(response.rows);
for(let i in response.rows){
// 穿
this.leftList.push({
key: response.rows[i].userId,
label: response.rows[i].userName
})
}
for(let i in response.selected){
this.rightList.push(response.selected[i].key);
this.form.rightData = this.rightList;
}
this.loading = false;
});
},
/** 查询班组列表 */
getList() {
this.loading = true;
@ -388,7 +389,6 @@ export default {
teamProperties: null,
attendanceQuantity: null,
assignedQuantity: null
// rightData: null
};
this.resetForm("form");
},
@ -411,18 +411,39 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.rightList = [];
this.open = true;
this.title = "添加班组";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.rightList = [];
this.reset();
const teamId = row.teamId || this.ids
// listTeamMembers(this.queryParams).then(response => {
// console.log(response.rows);
// for(let i in response.rows){
// // 穿
// this.leftList.push({
// id:response.rows[i].userId,
// key: response.rows[i].userId,
// label: response.rows[i].userName
// })
// }
// });
console.log('this.leftList',this.leftList);
getTeam(teamId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改班组";
});
for(let i in response.data.selectedData){
// 穿
this.rightList.push(
response.data.selectedData[i].userId
)
};
console.log('response.data.selectedData',response.data.selectedData);
})
this.open = true;
this.title = "修改班组";
},
/** 提交按钮 */
submitForm() {

Loading…
Cancel
Save