From d55f094797f9a3552c4d196f69ae188e1222b7a6 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期六, 11 五月 2024 16:29:48 +0800 Subject: [PATCH] 修改 --- src/views/product/producttraceability/index.vue | 232 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 172 insertions(+), 60 deletions(-) diff --git a/src/views/product/producttraceability/index.vue b/src/views/product/producttraceability/index.vue index 9ba6bc5..6ea0e8d 100644 --- a/src/views/product/producttraceability/index.vue +++ b/src/views/product/producttraceability/index.vue @@ -10,6 +10,7 @@ :data="partList" :formatter="labelFormatter" :selectLoading="selectLoading" + ref="systemSelect" :valueColumn="valueColumn" @selectChange="queryBatchNoData" @remoteSearch="queryPart" @@ -343,8 +344,111 @@ </div> </el-tab-pane> --> <el-tab-pane label="妫�娴嬩俊鎭�" name="妫�娴嬩俊鎭�"> - <div style="margin-top:10px;"> - <el-tabs type="card"> + <div style="margin-top:10px;height: 80vh;overflow-y: scroll;"> + <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 + ? '涓嶅悎鏍�' + : (scope.row.isQualified==1?'鍚堟牸':'') + }} + </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 + ? '涓嶅悎鏍�' + : (scope.row.isQualified==1?'鍚堟牸':'') + }} + </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" @@ -423,30 +527,12 @@ </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="鐢熶骇璁板綍"> <div style="margin-top:10px;"> - <div style="padding:0px 14px;height: 100%;overflow: auto;"> + <div style="padding:0px 14px;height: 80vh !important;overflow: auto;"> <div class="product-record-div"> <div class="product-record-div-left"> <div class="product-record-list-header"> @@ -981,6 +1067,9 @@ .taskinfo-params-table >>> td { padding: 3px 0px; } +.checkMore{ + margin-top: 20px; +} </style> <script> import { @@ -1129,7 +1218,9 @@ traceType: 'posite', reportTypeOptions: [], checkItemList: [], - mouldRecordList: [] + mouldRecordList: [], + finished:null, + process:null } }, mounted() { @@ -1332,39 +1423,51 @@ _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 = { @@ -1392,11 +1495,11 @@ _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) // 鐢熶骇璁板綍 @@ -1616,6 +1719,15 @@ } 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' -- Gitblit v1.9.3