| | |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>--> |
| | | <!-- <el-button icon="el-icon-download" @click="upload">导入</el-button>--> |
| | | <el-button icon="el-icon-switch-button" @click="handleClose('close')">批量关单</el-button> |
| | | <el-button icon="el-icon-switch-button" @click="handleClose('noClose')">批量反关单</el-button> |
| | | |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="80px" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="工单状态" style=" display: flex;"> |
| | | <el-form-item label="工单状态" label-width="70px" style=" display: flex;"> |
| | | <el-input v-model="form.mesorderstus" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工单编号" style=" display: flex;"> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label-width="70px" label="产品编码" style=" display: flex;"> |
| | | <el-input v-model="form.partcode" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label="产品名称" style=" display: flex;"> |
| | | <el-input v-model="form.partname" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label="产品规格" style=" display: flex;"> |
| | | <el-input v-model="form.partspec" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="创建人员" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label="创建人员" style=" display: flex;"> |
| | | <el-input v-model="form.creatuser" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="创建时间" style=" display: flex;"> |
| | | <el-form-item v-show="isExpandForm" label-width="70px" label="创建时间" style=" display: flex;"> |
| | | <el-input v-model="form.createdate" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2"> |
| | | <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | </div> |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | > |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseout'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'" |
| | | @mouseenter="mouseHoverType=$event.type" |
| | | /> |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseenter'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown':'doubleUp'" |
| | | @click="isExpandForm=!isExpandForm" |
| | | @mouseout="mouseHoverType=$event.type" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="multipleTable" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | :height="tableHeight+'px'" |
| | | :height="isExpandForm?tableHeight:(tableHeight+80)+'px'" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | |
| | | prop="partname" |
| | | min-width="150" |
| | | label="产品名称" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="产品规格" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | | isExpandForm: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | |
| | | data.push({ wo_code: item.wo_code }) |
| | | } |
| | | }) |
| | | this.$confirm('是否确认批量关单?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | MesOrderBitchClosedSeave({ dt: data }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('批量关单成功!') |
| | | this.$refs.multipleTable.clearSelection() |
| | | } |
| | | if (data.length > 0) { |
| | | this.$confirm('是否确认批量关单?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | MesOrderBitchClosedSeave(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('批量关单成功!') |
| | | this.$refs.multipleTable.clearSelection() |
| | | this.getMesOrderBitchClosedSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消批量关单!') |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消批量关单!') |
| | | }) |
| | | } else if (data.length === 0) { |
| | | this.$message.info('无符合可关闭的工单!') |
| | | } |
| | | } else if (val === 'noClose') { |
| | | this.multipleSelection.forEach(item => { |
| | | if (item.status === 'CLOSED') { |
| | | data.push({ wo_code: item.wo_code }) |
| | | } |
| | | }) |
| | | this.$confirm('是否确认批量反关单?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | MesOrderBitchAntiClosedSeave({ dt: data }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('批量反关单成功!') |
| | | this.$refs.multipleTable.clearSelection() |
| | | } |
| | | if (data.length > 0) { |
| | | this.$confirm('是否确认批量反关单?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | MesOrderBitchAntiClosedSeave(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('批量反关单成功!') |
| | | this.$refs.multipleTable.clearSelection() |
| | | this.getMesOrderBitchClosedSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消批量反关单!') |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消批量反关单!') |
| | | }) |
| | | } else if (data.length === 0) { |
| | | this.$message.info('无符合可反关闭的工单!') |
| | | } |
| | | } |
| | | }, |
| | | |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 240 |
| | | this.tableHeight = this.mainHeight - 295 |
| | | this.$refs.multipleTable.doLayout() |
| | | }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .tableFixed{ |
| | | ::v-deep .el-table__fixed-right{ |
| | | height: 100% !important; |
| | | } |
| | | ::v-deep .el-table__fixed{ |
| | | height: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | |