|
|
@@ -328,6 +328,27 @@
|
|
|
<span>{{ scope.row.totalScore !== null && scope.row.totalScore !== undefined ? parseFloat(scope.row.totalScore).toFixed(2) : '' }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- 额外工分和工单得分 - 仅当维保工单且维保类型包含其他/其它时显示 -->
|
|
|
+ <el-table-column
|
|
|
+ label="额外工分"
|
|
|
+ align="center"
|
|
|
+ prop="extraScore"
|
|
|
+ v-if="viewForm.orderType === 2 && hasOtherOrQitaInspectionType()"
|
|
|
+ style="width: 33%;">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.extraScore !== null && scope.row.extraScore !== undefined ? parseFloat(scope.row.extraScore).toFixed(2) : '' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="工单得分"
|
|
|
+ align="center"
|
|
|
+ prop="totalScore"
|
|
|
+ v-if="viewForm.orderType === 2 && hasOtherOrQitaInspectionType()"
|
|
|
+ style="width: 33%;">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.totalScore !== null && scope.row.totalScore !== undefined ? parseFloat(scope.row.totalScore).toFixed(2) : '' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="奖励得分"
|
|
|
align="center"
|
|
|
@@ -1638,20 +1659,25 @@ function handleSelectionChange(selection) {
|
|
|
/** 查看详情 */
|
|
|
function handleView(row) {
|
|
|
getOrderScore(row.orderType, row.id).then(response => {
|
|
|
- viewForm.value = response.data;
|
|
|
+ const data = response.data;
|
|
|
+ viewForm.value = data;
|
|
|
viewForm.value.orderType = row.orderType;
|
|
|
// 根据工单类型设置总结内容
|
|
|
- viewForm.value.workSummary = row.orderType === 1 ? response.data.content : response.data.realContent;
|
|
|
- viewForm.value.extraWork = row.orderType === 1 ? response.data.extraWork : null; // 额外工作总结
|
|
|
+ viewForm.value.workSummary = row.orderType === 1 ? data.content : data.realContent;
|
|
|
+ viewForm.value.extraWork = row.orderType === 1 ? data.extraWork : null; // 额外工作总结
|
|
|
+ // 特别处理维保工单的inspectionType字段
|
|
|
+ if (row.orderType === 2) {
|
|
|
+ viewForm.value.inspectionType = data.inspectionType ? (Array.isArray(data.inspectionType) ? data.inspectionType : data.inspectionType.split(',')) : [];
|
|
|
+ }
|
|
|
// 根据工单类型设置人员列表
|
|
|
if (row.orderType === 1) {
|
|
|
// 维修工单
|
|
|
- viewForm.value.scorePersonList = response.data.repairOrderPersonList || [];
|
|
|
- flowList.value = response.data.repairOrderFlowList || [];
|
|
|
+ viewForm.value.scorePersonList = data.repairOrderPersonList || [];
|
|
|
+ flowList.value = data.repairOrderFlowList || [];
|
|
|
} else if (row.orderType === 2) {
|
|
|
// 维保工单
|
|
|
- viewForm.value.scorePersonList = response.data.workOrderPersonList || [];
|
|
|
- flowList.value = response.data.workOrderFlowList || [];
|
|
|
+ viewForm.value.scorePersonList = data.workOrderPersonList || [];
|
|
|
+ flowList.value = data.workOrderFlowList || [];
|
|
|
}
|
|
|
viewDialogVisible.value = true;
|
|
|
});
|
|
|
@@ -3009,6 +3035,10 @@ function hasOtherOrQitaInspectionType() {
|
|
|
currentForm = confirmForm.value;
|
|
|
orderType = confirmForm.value.orderType;
|
|
|
inspectionType = confirmForm.value.inspectionType;
|
|
|
+ } else if (viewForm.value && viewForm.value.orderType) {
|
|
|
+ currentForm = viewForm.value;
|
|
|
+ orderType = viewForm.value.orderType;
|
|
|
+ inspectionType = viewForm.value.inspectionType;
|
|
|
}
|
|
|
|
|
|
if (orderType === 2 && Array.isArray(inspectionType) && inspectionType.length > 0) {
|