<template>
|
<el-dialog
|
title="投入查看"
|
:close-on-click-modal="false"
|
:visible.sync="visible"
|
>
|
<div class="split-task-in-header">
|
<div></div>
|
<div></div>
|
</div>
|
<el-table
|
ref="splitTaskInTable"
|
:data="splitTaskInputList"
|
height="320px"
|
:header-cell-style="splitTaskInTableHeaderCellStyle"
|
:row-class-name="splitTaskInTableRowClassName"
|
>
|
<el-table-column type="index" label="序号" width="50"> </el-table-column>
|
<el-table-column
|
label="零件号"
|
prop="partNo"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
label="零件名称"
|
prop="partName"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
label="SN号"
|
prop="partBatchNo"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
label="IFS批次号"
|
prop="ifsBatchNo"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column label="调整数量" prop="adjustQty" align="center">
|
</el-table-column>
|
<el-table-column label="报废数量" prop="scrapQty" align="center">
|
</el-table-column>
|
<el-table-column label="单位" prop="unit" align="center">
|
</el-table-column>
|
</el-table>
|
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="visible = false">取消</el-button>
|
</span>
|
</el-dialog>
|
</template>
|
|
<script>
|
import { getListByTaskId } from '@/api/product/segmentationtaskrecord'
|
export default {
|
components: {},
|
data() {
|
return {
|
visible: false,
|
splitTaskInputList: []
|
}
|
},
|
methods: {
|
init(id) {
|
this.getListByTaskId(id)
|
this.visible = true
|
},
|
splitTaskInTableHeaderCellStyle({ row, column, rowIndex, columnIndex }) {
|
let headerStyle = 'background:#599ef4;color:#fff;'
|
if (columnIndex === 0) {
|
headerStyle += 'border-radius: 6px 0px 0px 0px;'
|
} else if (columnIndex === 7) {
|
headerStyle += 'border-radius: 0px 6px 0px 0px;'
|
}
|
return headerStyle
|
},
|
splitTaskInTableRowClassName({ row, rowIndex }) {
|
if (rowIndex % 2 === 1) {
|
return 'stripe-row'
|
} else {
|
return ''
|
}
|
},
|
// 根据报工主表id获取投入、产出明细
|
getListByTaskId(id) {
|
this.splitTaskInputList = []
|
getListByTaskId(id)
|
.then((response) => {
|
const code = response.data.code
|
if (code == 0) {
|
const splitTaskInputs = response.data.data
|
this.splitTaskInputList = splitTaskInputs
|
}
|
})
|
.catch((error) => {
|
this.$message.error('获取投入产出明细失败')
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.split-task-in-header {
|
margin-top: 10px;
|
margin-bottom: 14px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
.red-but.is-disabled {
|
color: #fab6b6;
|
}
|
|
.red-but {
|
color: red;
|
}
|
</style>
|