| | |
| | | <el-form-item 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="创建时间" style=" display: flex;"> |
| | | <el-input v-model="form.createdate" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </div> |
| | |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | @click="isExpandForm=!isExpandForm" |
| | | > |
| | | <i |
| | | :class="!isExpandForm?'el-icon-arrow-down':'el-icon-arrow-up'" |
| | | :style="{color:'#42B983'}" |
| | | /></div> |
| | | <div class="elTableDiv" style="margin-top: 0"> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :data="tableData" |
| | | :height="tableHeight+'px'" |
| | | :height="isExpandForm?tableHeight:(tableHeight+40)+'px'" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:tableHeight+'px',}" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | 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 - 250 |
| | | }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |