| | |
| | | :data="tableData" |
| | | :height="isExpandForm?tableHeight:(tableHeight+80)+'px'" |
| | | border |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | :row-class-name="tableRowClassName" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}" |
| | | highlight-current-row |
| | |
| | | v-if="mesSetting.workOrder" |
| | | class="el-icon-files" |
| | | style="cursor: pointer;color:#42b983;margin-right: 15px" |
| | | @click="pre(row,1)" |
| | | @click.stop="pre(row,1)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | |
| | | <i |
| | | class="el-icon-edit-outline" |
| | | :style="{color:$store.state.settings.theme}" |
| | | @click="edit('edit',row)" |
| | | @click.stop="edit('edit',row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top"> |
| | | <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" /> |
| | | <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click.stop="del(row)" /> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip class="item" effect="dark" content="打印工单" placement="top"> |
| | |
| | | :style="{color:$store.state.settings.theme}" |
| | | class="el-icon-printer" |
| | | style="cursor: pointer;margin-right: 15px" |
| | | @click="handlePrint(row.wo_code,row.saleOrderCod)" |
| | | @click.stop="handlePrint(row.wo_code,row.saleOrderCod)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | |
| | | class="el-icon-view" |
| | | style="cursor: pointer;" |
| | | :style="{color:$store.state.settings.theme}" |
| | | @click="edit('view',row)" |
| | | @click.stop="edit('view',row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | class="sop" |
| | | title="设备SOP预览" |
| | | title="SOP预览" |
| | | :visible.sync="SopDialogVisible" |
| | | width="800px" |
| | | :close-on-click-modal="false" |
| | |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | this.dialogForm.data_sources = 'MES' |
| | | |
| | | this.sourceType = true |
| | | this.$nextTick(() => { |
| | | this.setSort() |
| | | }) |
| | |
| | | ) |
| | | }) |
| | | this.stepSelectedValue = this.stepTableData.map(i => i.stepcode) |
| | | this.sourceType = true |
| | | } else { |
| | | const data2 = { |
| | | wkshopcode: this.dialogForm.wkshopcode, |
| | |
| | | ) |
| | | }) |
| | | this.stepSelectedValue = this.stepTableData.map(i => i.stepcode) |
| | | this.sourceType = false |
| | | } |
| | | } |
| | | } else { |
| | |
| | | ) |
| | | }) |
| | | this.stepSelectedValue = this.stepTableData.map(i => i.stepcode) |
| | | this.sourceType = true |
| | | } else { |
| | | this.sourceType = false |
| | | await this.getBasicProcessData() |
| | | } |
| | | } |
| | |
| | | }, |
| | | stepSelectedValueChange(val) { |
| | | // console.log(val, 123) |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | const i = 9 |
| | | columns.forEach((column, index) => { |
| | | if (index === i) { |
| | | sums[index] = '总数' |
| | | return |
| | | } |
| | | const values = data.map(item => Number(item[column.property])) |
| | | if (column.property === 'plan_qty') { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr) |
| | | if (!isNaN(value)) { |
| | | return prev + curr |
| | | // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100 |
| | | } |
| | | }, 0) |
| | | |
| | | sums[index] += '' |
| | | } |
| | | }) |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | return sums |
| | | } |
| | | } |
| | | } |