Commit fe05001d authored by zhuli's avatar zhuli

# 提交排班高级查询,编排单数量

parent 16b0bf6b
<template>
<el-dialog title="工作单元选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="80%"
>
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="班组编号" prop="teamCode">
<el-dialog title="工作单元选择" v-if="showFlag" :visible.sync="showFlag" :modal=false width="80%">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="工作单元编号" label-width="300rpx" prop="workunitCode">
<el-input
v-model="queryParams.teamCode"
placeholder="请输入班组编号"
v-model="queryParams.workunitCode"
placeholder="请输入工作单元编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="班组名称" prop="teamName">
<el-form-item label="工作单元名称" label-width="300rpx" prop="workunitName">
<el-input
v-model="queryParams.teamName"
placeholder="请输入班组名称"
v-model="queryParams.workunitName"
placeholder="请输入工作单元名称"
clearable
@keyup.enter.native="handleQuery"
/>
......@@ -26,12 +21,12 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form> -->
</el-form>
<el-table v-loading="loading" :data="teamList" @selection-change="handleSelectionChange" height="600px">
<el-table v-loading="loading" :data="workunitList" @selection-change="handleSelectionChange" height="600px">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工作单元ID" width="100" align="center" prop="workunitId" >
<el-table-column label="工作单元ID" width="100" align="center" prop="workunitId">
</el-table-column>
<el-table-column label="工作单元编码" align="center" prop="workunitCode" />
<el-table-column label="工作单元名称" align="center" prop="workunitName" />
......@@ -39,32 +34,27 @@
<el-table-column label="更新时间" align="center" prop="updateTime" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">确 定</el-button>
<el-button @click="showFlag=false">取 消</el-button>
<el-button type="primary" @click="confirmSelect">确 定</el-button>
<el-button @click="showFlag = false">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { listTeam} from "@/api/mes/cal/team";
import { listTeam } from "@/api/mes/cal/team";
export default {
name: "TeamSelect",
data() {
return {
showFlag:false,
showFlag: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
selectedRows:[],
selectedRows: [],
// 非单个禁用
single: true,
// 非多个禁用
......@@ -74,7 +64,7 @@ export default {
// 总条数
total: 0,
// 班组表格数据
teamList: [],
workunitList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
......@@ -83,8 +73,8 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
teamCode: null,
teamName: null,
workunitCode: null,
workunitName: null,
planId: this.$attrs.planId || null
},
};
......@@ -100,11 +90,11 @@ export default {
},
methods: {
/** 查询班组列表 */
/** 查询工作单元列表 */
getList() {
this.loading = true;
listTeam(this.queryParams).then(response => {
this.teamList = response.rows;
this.workunitList = response.rows;
this.total = response.total;
this.loading = false;
});
......@@ -121,21 +111,21 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.teamId)
this.ids = selection.map(item => item.teamId);
this.selectedRows = selection;
},
//确定选中
confirmSelect(){
if(this.selectedRows == null || this.selectedRows.size == 0){
this.$notify({
title:'提示',
type:'warning',
message: '请至少选择一条数据!'
});
return;
}
this.$emit('onSelected',this.selectedRows);
this.showFlag = false;
confirmSelect() {
if (this.selectedRows == null || this.selectedRows.size == 0) {
this.$notify({
title: '提示',
type: 'warning',
message: '请至少选择一条数据!'
});
return;
}
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
}
}
};
......
......@@ -116,6 +116,8 @@
>
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="quantity">
</el-table-column>
<el-table-column label="创建人" align="center" prop="createBy"/>
<el-table-column label="创建时间" align="center" prop="createTime"/>
<!-- <el-table-column label="序号" align="center" prop="arrangeSort"/>-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment