Commit fe05001d authored by zhuli's avatar zhuli

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

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