| | |
| | | v-hasPermi="['om:productionOrde:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | :disabled="move" |
| | | size="mini" |
| | | @click="moveUp" |
| | | >上移</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | :disabled="move" |
| | | @click="down" |
| | | >下移</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | |
| | | </el-table-column> |
| | | <el-table-column label="客户" width="80" align="center" prop="custom"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" width="500" label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column fixed="right" width="350" label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <!-- 工单状态(1创建、2已发布、3生产中、4已冻结、5已完工、6已关闭) --> |
| | | <el-button type="success" :disabled="scope.row.orderStatus !== '1'" style="width: 72px" plain @click="handleCommand('3',scope.row.id)" size="mini">开始</el-button> |
| | |
| | | <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '4'" v-if="scope.row.orderStatus === '4'" plain @click="handleCommand('3',scope.row.id)" type="warning" size="mini">解冻</el-button> |
| | | <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '1'" plain @click="handleCommand('6',scope.row.id)" v-if="scope.row.orderStatus === '1'||scope.row.orderStatus === '3'||scope.row.orderStatus === '4'||scope.row.orderStatus === '5'" type="danger" size="mini">关闭</el-button> |
| | | <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">启用</el-button> |
| | | |
| | | <el-button |
| | | :disabled="scope.row.orderStatus !== '1'" |
| | | size="mini" |
| | | type="success" |
| | | style="width: 72px" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['om:productionOrde:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | :disabled="scope.row.orderStatus !== '1'" |
| | | size="mini" |
| | | type="warning" |
| | | style="width: 72px" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['om:productionOrde:remove']" |
| | | >删除</el-button> |
| | | <!-- <el-button--> |
| | | <!-- :disabled="scope.row.orderStatus !== '1'"--> |
| | | <!-- size="mini"--> |
| | | <!-- type="success"--> |
| | | <!-- style="width: 72px"--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- @click="handleUpdate(scope.row)"--> |
| | | <!-- v-hasPermi="['om:productionOrde:edit']"--> |
| | | <!-- >修改</el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- :disabled="scope.row.orderStatus !== '1'"--> |
| | | <!-- size="mini"--> |
| | | <!-- type="warning"--> |
| | | <!-- style="width: 72px"--> |
| | | <!-- icon="el-icon-delete"--> |
| | | <!-- @click="handleDelete(scope.row)"--> |
| | | <!-- v-hasPermi="['om:productionOrde:remove']"--> |
| | | <!-- >删除</el-button>--> |
| | | <el-button style="width: 72px" :disabled="scope.row.orderStatus === '4'||scope.row.orderStatus === '6'" v-if="scope.row.orderStatus !== '5'" @click="handleCommand('5',scope.row.id)" type="success" size="mini">完成</el-button> |
| | | <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">已完工</el-button> |
| | | <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">已完工</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">启用</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | move: true, |
| | | selectedRowIndex: -1, // 存储选中行的索引 |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | |
| | | this.initWorkshop(); |
| | | }, |
| | | methods: { |
| | | moveUp(){ |
| | | this.$modal.msgSuccess("上移"); |
| | | }, |
| | | down(selection){ |
| | | this.$modal.msgSuccess("下移"); |
| | | }, |
| | | initWorkshop(){ |
| | | listWorkshop(this.queryParams).then(response => { |
| | | this.options = response.rows; |
| | |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | const statusSize = selection.map(item => item.orderStatus) |
| | | const intArr = statusSize.map(str => parseInt(str)); |
| | | const sum = intArr.reduce((a, b) => a + b, 0); |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | if(selection[0].orderStatus!== '1'||sum!==selection.length){ |
| | | this.single = true |
| | | this.multiple = true |
| | | } |
| | | if(selection.length > 1){ |
| | | this.move = true |
| | | }else { |
| | | this.move = false |
| | | } |
| | | // if (selection.length === 1) { |
| | | // this.move = false; |
| | | // } |
| | | |
| | | if (selection.length > 0) { |
| | | this.selectedRowIndex = this.productionOrdeList.indexOf(rows[0]); // 获取选中行的索引 |
| | | } else { |
| | | this.selectedRowIndex = -1; // 如果没有选中行,则将索引设为-1 |
| | | } |
| | | |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |