| | |
| | | </el-tab-pane> --> |
| | | <el-tab-pane label="检测信息" name="检测信息"> |
| | | <div style="margin-top:10px;"> |
| | | <el-tabs type="card"> |
| | | <div class="process" v-if="process"> |
| | | <el-divider |
| | | class="pane-divider" |
| | | direction="vertical" |
| | | ></el-divider> |
| | | <span style="font-size:14px;font-weight:bold" |
| | | >过程检</span> |
| | | <div style="font-size: 12px;margin-top: 10px;margin-left: 10px;">样品名:<span style="font-weight: 700;">{{process.sampleName}}</span></div> |
| | | <el-table |
| | | stripe |
| | | :data="process.sampleItem" |
| | | :height="paramsTableHeight" |
| | | :header-cell-style="paramsTableHeaderStyle0" |
| | | :row-class-name="tableRowClassName" |
| | | class="taskinfo-params-table" |
| | | style="margin: 10px;width: 95%;" |
| | | > |
| | | <el-table-column |
| | | prop="father" |
| | | label="项目" |
| | | align="center" |
| | | min-width="75px" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | label="指标" |
| | | align="center" |
| | | min-width="100px" |
| | | /> |
| | | <el-table-column |
| | | prop="result" |
| | | label="结果" |
| | | align="center" |
| | | min-width="60px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{ |
| | | scope.row.isQualified == 0 |
| | | ? '不合格' |
| | | : '合格' |
| | | }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="userName" |
| | | label="检验人" |
| | | align="center" |
| | | min-width="90px" |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | <div class="product" v-if="finished" :class="{checkMore:process}"> |
| | | <el-divider |
| | | class="pane-divider" |
| | | direction="vertical" |
| | | ></el-divider> |
| | | <span style="font-size:14px;font-weight:bold" |
| | | >产品检</span> |
| | | <div style="font-size: 12px;margin-top: 10px;margin-left: 10px;">样品名:<span style="font-weight: 700;">{{finished.sampleName}}</span></div> |
| | | <el-table |
| | | stripe |
| | | :data="finished.sampleItem" |
| | | :height="paramsTableHeight" |
| | | :header-cell-style="paramsTableHeaderStyle0" |
| | | :row-class-name="tableRowClassName" |
| | | class="taskinfo-params-table" |
| | | style="margin: 10px;width: 95%;" |
| | | > |
| | | <el-table-column |
| | | prop="father" |
| | | label="项目" |
| | | align="center" |
| | | min-width="75px" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | label="指标" |
| | | align="center" |
| | | min-width="100px" |
| | | /> |
| | | <el-table-column |
| | | prop="result" |
| | | label="结果" |
| | | align="center" |
| | | min-width="60px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{ |
| | | scope.row.isQualified == 0 |
| | | ? '不合格' |
| | | : '合格' |
| | | }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="userName" |
| | | label="检验人" |
| | | align="center" |
| | | min-width="90px" |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | <!-- <p v-show="!process&&!finished">暂无数据</p> --> |
| | | <!-- <el-tabs type="card"> |
| | | <el-tab-pane |
| | | v-for="(item, index) in checkItemList" |
| | | :key="item.reportTypeLabel" |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <!--<el-tab-pane label="附件"> |
| | | <el-upload |
| | | drag |
| | | ref="upload" |
| | | action="/mes/reportSample/upload" |
| | | :headers="headers" |
| | | :auto-upload="true" |
| | | :file-list="fileList" |
| | | list-type="text" |
| | | :on-preview="handlePreview" |
| | | :with-credentials="true" |
| | | > |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text"> |
| | | 将文件拖到此处,或<em>点击上传</em> |
| | | </div> |
| | | </el-upload> |
| | | </el-tab-pane>--> |
| | | </el-tabs> |
| | | </el-tabs> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="生产记录" name="生产记录"> |
| | |
| | | .taskinfo-params-table >>> td { |
| | | padding: 3px 0px; |
| | | } |
| | | .checkMore{ |
| | | margin-top: 20px; |
| | | } |
| | | </style> |
| | | <script> |
| | | import { |
| | |
| | | traceType: 'posite', |
| | | reportTypeOptions: [], |
| | | checkItemList: [], |
| | | mouldRecordList: [] |
| | | mouldRecordList: [], |
| | | finished:null, |
| | | process:null |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | _that.currProductTracking = {} |
| | | } |
| | | // 检测信息 |
| | | const sampleItemList = data.data.sampleItems |
| | | if (sampleItemList != null && sampleItemList.length > 0) { |
| | | _that.paramValues = sampleItemList |
| | | _that.checkItemList = [] |
| | | sampleItemList.forEach((item) => { |
| | | const reportTypeLabel = _that.reportTypeOptions.find( |
| | | (el) => { |
| | | return item.reportType == el.value |
| | | } |
| | | ) |
| | | if (reportTypeLabel) { |
| | | const existCheckItem = _that.checkItemList.find( |
| | | (checkItem) => { |
| | | return ( |
| | | reportTypeLabel.label == checkItem.reportTypeLabel |
| | | ) |
| | | } |
| | | ) |
| | | if (existCheckItem) { |
| | | existCheckItem.itemList.push(item) |
| | | } else { |
| | | _that.checkItemList.push({ |
| | | reportTypeLabel: reportTypeLabel.label, |
| | | itemList: [item] |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | // reportTypeOptions |
| | | } else { |
| | | _that.paramValues = [] |
| | | _that.checkItemList = [] |
| | | const sampleItems = data.data.sampleItems |
| | | // 检测信息-过程检 |
| | | if(sampleItems&&sampleItems.process&&sampleItems.process.length>0){ |
| | | _that.process = sampleItems.process[0] |
| | | }else{ |
| | | _that.process = null |
| | | } |
| | | // 检测信息-产品检 |
| | | if(sampleItems&&sampleItems.finished&&sampleItems.finished.length>0){ |
| | | _that.finished = sampleItems.finished[0] |
| | | }else{ |
| | | _that.finished = null |
| | | } |
| | | // if (sampleItemList != null && sampleItemList.length > 0) { |
| | | // _that.paramValues = sampleItemList |
| | | // _that.checkItemList = [] |
| | | // sampleItemList.forEach((item) => { |
| | | // const reportTypeLabel = _that.reportTypeOptions.find( |
| | | // (el) => { |
| | | // return item.reportType == el.value |
| | | // } |
| | | // ) |
| | | // if (reportTypeLabel) { |
| | | // const existCheckItem = _that.checkItemList.find( |
| | | // (checkItem) => { |
| | | // return ( |
| | | // reportTypeLabel.label == checkItem.reportTypeLabel |
| | | // ) |
| | | // } |
| | | // ) |
| | | // if (existCheckItem) { |
| | | // existCheckItem.itemList.push(item) |
| | | // } else { |
| | | // _that.checkItemList.push({ |
| | | // reportTypeLabel: reportTypeLabel.label, |
| | | // itemList: [item] |
| | | // }) |
| | | // } |
| | | // } |
| | | // }) |
| | | // // reportTypeOptions |
| | | // } else { |
| | | // _that.paramValues = [] |
| | | // _that.checkItemList = [] |
| | | // } |
| | | _that.currOperateTask = data.data.operationTask |
| | | if (_that.currOperateTask == null) { |
| | | _that.currOperateTask = { |
| | |
| | | _that.productRecordParamValues = [] |
| | | _that.paramTabs = [] |
| | | } else { |
| | | // 工步信息 |
| | | _that.getStepRecords({ |
| | | id: _that.currOperateTask.id, |
| | | sn: nodeData.batchNo.split('SN号:')[1] |
| | | }) |
| | | // 工步信息--报错注释掉了 |
| | | // _that.getStepRecords({ |
| | | // id: _that.currOperateTask.id, |
| | | // sn: nodeData.batchNo.split('SN号:')[1] |
| | | // }) |
| | | // 工艺参数信息 |
| | | _that.queryTechnologyInfo(_that.currOperateTask.id) |
| | | // 生产记录 |
| | |
| | | } |
| | | return headerStyle |
| | | }, |
| | | paramsTableHeaderStyle0({ row, column, rowIndex, columnIndex }) { |
| | | let headerStyle = 'background:#599ef4;color:#fff;' |
| | | if (columnIndex === 0) { |
| | | headerStyle += 'border-radius: 6px 0px 0px 0px;' |
| | | } else if (columnIndex === 3) { |
| | | headerStyle += 'border-radius: 0px 6px 0px 0px;' |
| | | } |
| | | return headerStyle |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (rowIndex % 2 === 1) { |
| | | return 'stripe-row' |