123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <el-dialog
- title="查看"
- width="70%"
- :close-on-click-modal="false"
- :visible.sync="visible"
- @close="onChose"
- >
- <div class="production">
- <el-table
- :data="dataList"
- border
- style="width: 100%;">
- <el-table-column
- label="序号"
- type="index"
- width="50"
- align="center">
- </el-table-column>
- <el-table-column
- prop="productName"
- header-align="center"
- align="center"
- min-width="120"
- :show-tooltip-when-overflow="true"
- label="物料名称"/>
- <el-table-column
- prop="productSpec"
- header-align="center"
- align="center"
- min-width="120"
- :show-tooltip-when-overflow="true"
- label="物料规格"/>
- <el-table-column
- prop="productNumber"
- header-align="center"
- align="center"
- min-width="120"
- :show-tooltip-when-overflow="true"
- label="物料编号"/>
- <el-table-column
- prop="batchNumber"
- header-align="center"
- align="center"
- min-width="120"
- :show-tooltip-when-overflow="true"
- label="批次号"/>
- <el-table-column
- prop="startTime"
- header-align="center"
- align="center"
- min-width="120"
- :show-tooltip-when-overflow="true"
- label="开始时间"/>
- <el-table-column
- prop="endTime"
- header-align="center"
- align="center"
- min-width="120"
- :show-tooltip-when-overflow="true"
- label="结束时间"/>
- <el-table-column
- header-align="center"
- align="center"
- fixed="right"
- min-width="80"
- :show-tooltip-when-overflow="true"
- label="状态">
- <template slot-scope="scope">{{stateFormat(scope.row)}}</template>
- </el-table-column>
- </el-table>
- </div>
- <span slot="footer">
- <el-button @click="onChose">返回</el-button>
- </span>
- </el-dialog>
- </template>
- <script>
- import AttachDetail from '@/views/modules/common/attach-detail'
- import AttachDetailDialog from '@/views/modules/common/attach-detail-dialog'
- import InspectTypeDialog from '@/views/modules/production/inspect-type-dialog'
- import {optionsMaterialState} from '@/utils/enums'
- export default {
- name: 'prod-management-details-dialog',
- components: {InspectTypeDialog, AttachDetailDialog, AttachDetail},
- data () {
- return {
- visible: false,
- dataList: [],
- optionsState: optionsMaterialState
- }
- },
- methods: {
- onChose () {
- this.visible = false
- },
- // 初始化表单
- async init (productList) {
- this.dataList = productList
- this.visible = true
- },
- // 转换属性“状态”
- stateFormat (row) {
- if (this.optionsState) {
- for (let i = 0; i < this.optionsState.length; i++) {
- if (this.optionsState[i].code === row.prodState) {
- return this.optionsState[i].value
- }
- }
- }
- }
- }
- }
- </script>
- <style scoped lang="scss">
- /deep/ .my-row .super-flow__node {
- width: 180px;
- height: 80px;
- }
- </style>
|