|
|
@@ -39,74 +39,62 @@
|
|
|
v-for="checkItem in checkItemList"
|
|
|
:key="checkItem.inspectionNature + '-' + checkItem.type"
|
|
|
>
|
|
|
- <div class="content-title" @click="toggleCheckItemCollapse(checkItem)">
|
|
|
- <el-icon class="collapse-icon" :class="{ 'is-collapsed': !checkItem.isExpanded }">
|
|
|
- <ArrowDown />
|
|
|
- </el-icon>
|
|
|
- {{ checkItem.inspectionNatureName }}
|
|
|
- </div>
|
|
|
- <div class="inspection-grid" v-show="checkItem.isExpanded">
|
|
|
- <!-- 标题行 -->
|
|
|
- <div class="grid-header">检验项目</div>
|
|
|
- <template v-if="checkItem.itemList.length > 0">
|
|
|
- <!-- Grid 容器 -->
|
|
|
- <div
|
|
|
- class="grid-container"
|
|
|
- :style="{
|
|
|
+ <div v-if="checkItem.inspectionNature == '100' ? checkItem.type == '1' : checkItem.type == '2'">
|
|
|
+ <div class="content-title" @click="toggleCheckItemCollapse(checkItem)">
|
|
|
+ <el-icon class="collapse-icon" :class="{ 'is-collapsed': !checkItem.isExpanded }">
|
|
|
+ <ArrowDown />
|
|
|
+ </el-icon>
|
|
|
+ {{ checkItem.inspectionNatureName }}
|
|
|
+ </div>
|
|
|
+ <div class="inspection-grid" v-show="checkItem.isExpanded">
|
|
|
+ <!-- 标题行 -->
|
|
|
+ <div class="grid-header">检验项目</div>
|
|
|
+ <template v-if="checkItem.itemList.length > 0">
|
|
|
+ <!-- Grid 容器 -->
|
|
|
+ <div class="grid-container" :style="{
|
|
|
'grid-template-columns':
|
|
|
checkItem.itemList.length < 5
|
|
|
? `repeat(${checkItem.itemList.length}, 1fr)`
|
|
|
: `repeat(5, 1fr)`
|
|
|
- }"
|
|
|
- >
|
|
|
- <!-- 循环渲染子项(模拟数据) -->
|
|
|
- <div class="grid-item" v-for="(item, index) in checkItem.itemList" :key="index">
|
|
|
- <div class="grid-item-top">
|
|
|
- <el-checkbox
|
|
|
- :disabled="item.projectType === 'MAIN'|| item.name === '一览表'"
|
|
|
- v-model="item.use"
|
|
|
- @change="(val) => handleCheckItemSelectedChange(item, val)"
|
|
|
- />
|
|
|
- <div style="display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1;">
|
|
|
+ }">
|
|
|
+ <!-- 循环渲染子项(模拟数据) -->
|
|
|
+ <div class="grid-item" v-for="(item, index) in checkItem.itemList" :key="index">
|
|
|
+ <div class="grid-item-top">
|
|
|
+ <el-checkbox :disabled="item.projectType === 'MAIN' || item.name === '一览表'" v-model="item.use"
|
|
|
+ @change="(val) => handleCheckItemSelectedChange(item, val)" />
|
|
|
+ <div style="display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1;">
|
|
|
<span v-if="item.projectType === 'MAIN'"
|
|
|
- style="display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 20px; height: 20px; background-color: #6cbcf5; color: #fff; font-size: 12px; border-radius: 2px; font-weight: bold;">主</span>
|
|
|
- <el-tooltip :content="item.name" placement="top" :show-after="500">
|
|
|
- <span style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; word-break: break-all;">{{ item.name }}</span>
|
|
|
- </el-tooltip>
|
|
|
+ style="display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 20px; height: 20px; background-color: #6cbcf5; color: #fff; font-size: 12px; border-radius: 2px; font-weight: bold;">主</span>
|
|
|
+ <el-tooltip :content="item.name" placement="top" :show-after="500">
|
|
|
+ <span
|
|
|
+ style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; word-break: break-all;">{{
|
|
|
+ item.name }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <template v-if="!item.use && item.isFee === '1'">
|
|
|
+ <span style="flex-shrink: 0; white-space: nowrap;">
|
|
|
+ (
|
|
|
+ <el-button link type="primary" @click="() => handleInputCalcField(item)">费用:{{
|
|
|
+ getCheckItemFeeType(item) }}</el-button>
|
|
|
+ )
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <template v-if="!item.use && item.isFee === '1'">
|
|
|
- <span style="flex-shrink: 0; white-space: nowrap;">
|
|
|
- (
|
|
|
- <el-button link type="primary" @click="() => handleInputCalcField(item)"
|
|
|
- >费用:{{ getCheckItemFeeType(item) }}</el-button
|
|
|
- >
|
|
|
- )
|
|
|
+ <div class="grid-item-bottom" v-if="item.use">
|
|
|
+ <el-input-number v-model="item.quantity" :min="1" :max="999" :precision="0" :step="1"
|
|
|
+ size="small" style="width: 76px; flex-shrink: 0;" @change="calculateAmounts" />
|
|
|
+ <span style="flex-shrink: 0; white-space: nowrap; margin-left: 8px;" v-if="item.isFee === '1'">
|
|
|
+ (
|
|
|
+ <el-button link type="primary" @click="() => handleInputCalcField(item)">费用:{{
|
|
|
+ getCheckItemFeeType(item) }}</el-button>
|
|
|
+ )
|
|
|
</span>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- <div class="grid-item-bottom" v-if="item.use">
|
|
|
- <el-input-number
|
|
|
- v-model="item.quantity"
|
|
|
- :min="1"
|
|
|
- :max="999"
|
|
|
- :precision="0"
|
|
|
- :step="1"
|
|
|
- size="small"
|
|
|
- style="width: 76px; flex-shrink: 0;"
|
|
|
- @change="calculateAmounts"
|
|
|
- />
|
|
|
- <span style="flex-shrink: 0; white-space: nowrap; margin-left: 8px;" v-if="item.isFee === '1'">
|
|
|
- (
|
|
|
- <el-button link type="primary" @click="() => handleInputCalcField(item)"
|
|
|
- >费用:{{ getCheckItemFeeType(item) }}</el-button
|
|
|
- >
|
|
|
- )
|
|
|
- </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <el-empty v-else :description="`暂无【${checkItem.inspectionNatureName}】检验项目`" />
|
|
|
+ </template>
|
|
|
+ <el-empty v-else :description="`暂无【${checkItem.inspectionNatureName}】检验项目`" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -280,6 +268,7 @@ import {
|
|
|
PressurePipeCheckTypeMap,
|
|
|
PressureReportType
|
|
|
} from '@/utils/constants'
|
|
|
+import {InspectionNatureTypeApi} from "@/api/pressure2/inspectionnaturetype";
|
|
|
import { ReportItemVO, PipeTaskOrderApi } from '@/api/pressure2/pipetaskorder'
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
import { is, isEmpty } from '@/utils/is'
|
|
|
@@ -418,15 +407,25 @@ const handleQueryCheckItemList = async (checkType) => {
|
|
|
itemIds: props.equipmentIds,
|
|
|
equipmentCategory: queryParams.value.equipmentCategory,
|
|
|
inspectionNature: [checkType],
|
|
|
- equipType:equipType
|
|
|
+ equipType: equipType
|
|
|
}
|
|
|
const queryResult = await queryCheckItemList(params)
|
|
|
+ const type = Number(checkType) || checkType
|
|
|
+ const inspectionNatureType = await InspectionNatureTypeApi.getInspectionNatureTypePage({
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 1,
|
|
|
+ equip: '300',
|
|
|
+ nature: type
|
|
|
+ })
|
|
|
+ const inType = inspectionNatureType.list[0].type
|
|
|
+
|
|
|
//console.log(queryResult)
|
|
|
checkItemList.value.push({
|
|
|
inspectionNatureName: filterPressurePipeCheckTypeMap.value[checkType] + " 法定收费项目",
|
|
|
inspectionNature: checkType,
|
|
|
type: '1',
|
|
|
- isExpanded: true, // 默认展开
|
|
|
+ // isExpanded: true, // 默认展开
|
|
|
+ isExpanded: inType == 1,
|
|
|
itemList: (queryResult || []).map((item) => ({
|
|
|
...item,
|
|
|
isAutoAmount: props.isBatch ? '0' : item.isAutoAmount,
|
|
|
@@ -435,14 +434,16 @@ const handleQueryCheckItemList = async (checkType) => {
|
|
|
//use: props.selectedIds.includes(item.templateId)
|
|
|
use:false,
|
|
|
type: '1',
|
|
|
- quantity: 1 // 默认数量为 1
|
|
|
+ quantity: 1, // 默认数量为 1
|
|
|
+ sort: item.sort
|
|
|
}))
|
|
|
})
|
|
|
checkItemList.value.push({
|
|
|
inspectionNatureName: filterPressurePipeCheckTypeMap.value[checkType] + " 服务收费项目",
|
|
|
inspectionNature: checkType,
|
|
|
type: '2',
|
|
|
- isExpanded: false, // 默认收起
|
|
|
+ // isExpanded: false, // 默认收起
|
|
|
+ isExpanded: inType == 2,
|
|
|
itemList: (queryResult || []).map((item) => ({
|
|
|
...item,
|
|
|
isAutoAmount: props.isBatch ? '0' : item.isAutoAmount,
|
|
|
@@ -451,7 +452,8 @@ const handleQueryCheckItemList = async (checkType) => {
|
|
|
//use: props.selectedIds.includes(item.templateId)
|
|
|
use:false,
|
|
|
type: '2',
|
|
|
- quantity: 1 // 默认数量为 1
|
|
|
+ quantity: 1 ,// 默认数量为 1
|
|
|
+ sort: item.sort
|
|
|
}))
|
|
|
})
|
|
|
}
|
|
|
@@ -852,7 +854,8 @@ const handleConfirm = async () => {
|
|
|
connectId: x.connectId,
|
|
|
fee: x.fee,
|
|
|
type: x.type,
|
|
|
- quantity: x.quantity || 1
|
|
|
+ quantity: x.quantity || 1,
|
|
|
+ sort: x.sort
|
|
|
}
|
|
|
if (x.name?.includes('壁厚测定')) {
|
|
|
result.wallThicknessList = x.wallThicknessList
|