| | |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <div class="bodyTopButtonGroup"> |
| | | <el-button v-waves icon="el-icon-switch-button" type="success" @click="orderClose()">工单关闭</el-button> |
| | | <el-button v-waves icon="el-icon-switch-button" type="danger" @click="orderClose()">工单关闭</el-button> |
| | | <el-button v-waves icon="el-icon-thumb" type="success" @click="orderOpen()">工单启动</el-button> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <!-- @row-click="rowClick"--> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | @row-click="rowClick" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="50" |
| | | :selectable="selected" |
| | | /> |
| | | <!-- :selectable="selected"--> |
| | | <el-table-column |
| | | prop="rowNum" |
| | | width="50" |
| | | width="80" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | |
| | | |
| | | <el-tooltip class="item" effect="dark" content="工单关闭" placement="top"> |
| | | <i |
| | | v-if="row.status!=='CLOSED'" |
| | | class="el-icon-switch-button" |
| | | style="cursor: pointer;margin-left: 15px" |
| | | :style="{color:$store.state.settings.theme}" |
| | | :style="{color:'red'}" |
| | | @click.stop="orderClose(row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" content="工单启动" placement="top"> |
| | | <i |
| | | v-if="row.status==='CLOSED'" |
| | | class="el-icon-thumb" |
| | | style="cursor: pointer;margin-left: 15px" |
| | | :style="{color:$store.state.settings.theme}" |
| | | @click.stop="orderOpen(row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | |
| | | AddUpdateMesOrder, DeleteMesOrder, |
| | | MesBadOrderSearch, MesOrderDistribution, |
| | | MesOrderClosedSearch, |
| | | UpdateMesOrderStepSearch, MesOrderBitchClosedSeave |
| | | UpdateMesOrderStepSearch, MesOrderBitchClosedSeave, MesOrderBitchReverseClosedSeave |
| | | } from '@/api/WorkOrder' |
| | | import { PartSelect } from '@/api/ProductModel' |
| | | import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData' |
| | |
| | | this.dialogVisibleTask = false |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val.map(i => i.wo_code) |
| | | this.multipleSelection = val |
| | | }, |
| | | |
| | | selected(row, index) { |
| | |
| | | }, |
| | | // 工单关闭事件 |
| | | async orderClose(row) { |
| | | this.$confirm('是否确认删除?', '提示', { |
| | | this.$confirm('是否确认关闭?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let data = null |
| | | if (row) { // 行关闭工单 |
| | | this.multipleSelection = [row.wo_code] |
| | | data = [row.wo_code] |
| | | } else { |
| | | data = this.multipleSelection.filter(i => i.status !== 'CLOSED').map(i => i.wo_code) |
| | | } |
| | | MesOrderBitchClosedSeave(this.multipleSelection).then(res => { |
| | | |
| | | MesOrderBitchClosedSeave(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$notify.success('关闭成功!') |
| | | // if (this.form.page > 1 && this.tableData.length === 1) { |
| | |
| | | this.$notify.info('已取消删除!') |
| | | }) |
| | | }, |
| | | // 工单启动事件 |
| | | async orderOpen(row) { |
| | | this.$confirm('是否确认启动?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let data = null |
| | | if (row) { // 行启动工单 |
| | | data = [row.wo_code] |
| | | } else { |
| | | data = this.multipleSelection.filter(i => i.status === 'CLOSED').map(i => i.wo_code) |
| | | } |
| | | |
| | | MesOrderBitchReverseClosedSeave(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$notify.success('启动成功!') |
| | | // if (this.form.page > 1 && this.tableData.length === 1) { |
| | | // this.form.page-- |
| | | // } |
| | | this.getMesOrderClosedSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$notify.info('已取消删除!') |
| | | }) |
| | | }, |
| | | // 对话框产品信息值改变 |
| | | partcodeChangeDialog(val) { |
| | | console.log(val) |