|
@@ -43,31 +43,21 @@
|
|
|
type="date"
|
|
type="date"
|
|
|
placeholder="选择日期"
|
|
placeholder="选择日期"
|
|
|
value-format="YYYY-MM-DD"
|
|
value-format="YYYY-MM-DD"
|
|
|
- :disabled="formData.legalNoSchedule"
|
|
|
|
|
:disabled-date="(time) => time.getTime() < Date.now() - 8.64e7"
|
|
:disabled-date="(time) => time.getTime() < Date.now() - 8.64e7"
|
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
|
/>
|
|
/>
|
|
|
- <el-checkbox
|
|
|
|
|
- v-model="formData.legalNoSchedule"
|
|
|
|
|
- class="ml-4"
|
|
|
|
|
- @change="handleLegalNoScheduleChange"
|
|
|
|
|
- :disabled="legalEquipCount === 0"
|
|
|
|
|
- >
|
|
|
|
|
- 无需安排
|
|
|
|
|
- </el-checkbox>
|
|
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
v-model="formData.legalIsOrderConfirm"
|
|
v-model="formData.legalIsOrderConfirm"
|
|
|
class="ml-4"
|
|
class="ml-4"
|
|
|
- :disabled="formData.legalNoSchedule || legalEquipCount === 0"
|
|
|
|
|
|
|
+ :disabled="legalEquipCount === 0"
|
|
|
>
|
|
>
|
|
|
由前台约检确认
|
|
由前台约检确认
|
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="检验员" prop="legalTeamList">
|
|
<el-form-item label="检验员" prop="legalTeamList">
|
|
|
- <div class="checker-select-container"
|
|
|
|
|
- :class="{ 'opacity-50': formData.legalNoSchedule }">
|
|
|
|
|
- <div class="checker-list" v-if="!formData.legalNoSchedule && legalEquipCount > 0">
|
|
|
|
|
|
|
+ <div class="checker-select-container">
|
|
|
|
|
+ <div class="checker-list" v-if="legalEquipCount > 0">
|
|
|
<template v-if="legalProcessedDeptData.length">
|
|
<template v-if="legalProcessedDeptData.length">
|
|
|
<div v-for="dept in legalProcessedDeptData"
|
|
<div v-for="dept in legalProcessedDeptData"
|
|
|
:key="dept.dept?.id || dept.deptGroupId" class="dept-section">
|
|
:key="dept.dept?.id || dept.deptGroupId" class="dept-section">
|
|
@@ -81,7 +71,6 @@
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
v-model="subTeam.checked"
|
|
v-model="subTeam.checked"
|
|
|
@change="(val: boolean) => handleSubTeamCheckChange(val, subTeam, 'legal')"
|
|
@change="(val: boolean) => handleSubTeamCheckChange(val, subTeam, 'legal')"
|
|
|
- :disabled="formData.legalNoSchedule"
|
|
|
|
|
>
|
|
>
|
|
|
{{ subTeam.name }}
|
|
{{ subTeam.name }}
|
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
@@ -90,7 +79,6 @@
|
|
|
<el-checkbox-group
|
|
<el-checkbox-group
|
|
|
v-model="legalSelectedCheckerIds"
|
|
v-model="legalSelectedCheckerIds"
|
|
|
@change="handleLegalMemberChange"
|
|
@change="handleLegalMemberChange"
|
|
|
- :disabled="formData.legalNoSchedule"
|
|
|
|
|
>
|
|
>
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
v-for="member in subTeam.memberList"
|
|
v-for="member in subTeam.memberList"
|
|
@@ -111,9 +99,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
<el-empty v-else description="暂无检验员数据"/>
|
|
<el-empty v-else description="暂无检验员数据"/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="formData.legalNoSchedule || legalEquipCount === 0"
|
|
|
|
|
|
|
+ <div v-if="legalEquipCount === 0"
|
|
|
class="text-gray-400 py-4 text-center">
|
|
class="text-gray-400 py-4 text-center">
|
|
|
- 无需安排或无待检设备
|
|
|
|
|
|
|
+ 无待检设备
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -152,31 +140,21 @@
|
|
|
type="date"
|
|
type="date"
|
|
|
placeholder="选择日期"
|
|
placeholder="选择日期"
|
|
|
value-format="YYYY-MM-DD"
|
|
value-format="YYYY-MM-DD"
|
|
|
- :disabled="formData.yearNoSchedule"
|
|
|
|
|
:disabled-date="(time) => time.getTime() < Date.now() - 8.64e7"
|
|
:disabled-date="(time) => time.getTime() < Date.now() - 8.64e7"
|
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
|
/>
|
|
/>
|
|
|
- <el-checkbox
|
|
|
|
|
- v-model="formData.yearNoSchedule"
|
|
|
|
|
- class="ml-4"
|
|
|
|
|
- @change="handleYearNoScheduleChange"
|
|
|
|
|
- :disabled="yearEquipCount === 0"
|
|
|
|
|
- >
|
|
|
|
|
- 无需安排
|
|
|
|
|
- </el-checkbox>
|
|
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
v-model="formData.yearIsOrderConfirm"
|
|
v-model="formData.yearIsOrderConfirm"
|
|
|
class="ml-4"
|
|
class="ml-4"
|
|
|
- :disabled="formData.yearNoSchedule || yearEquipCount === 0"
|
|
|
|
|
|
|
+ :disabled="yearEquipCount === 0"
|
|
|
>
|
|
>
|
|
|
由前台约检确认
|
|
由前台约检确认
|
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="检验员" prop="yearTeamList">
|
|
<el-form-item label="检验员" prop="yearTeamList">
|
|
|
- <div class="checker-select-container"
|
|
|
|
|
- :class="{ 'opacity-50': formData.yearNoSchedule }">
|
|
|
|
|
- <div class="checker-list" v-if="!formData.yearNoSchedule && yearEquipCount > 0">
|
|
|
|
|
|
|
+ <div class="checker-select-container">
|
|
|
|
|
+ <div class="checker-list" v-if="yearEquipCount > 0">
|
|
|
<template v-if="yearProcessedDeptData.length">
|
|
<template v-if="yearProcessedDeptData.length">
|
|
|
<div v-for="dept in yearProcessedDeptData"
|
|
<div v-for="dept in yearProcessedDeptData"
|
|
|
:key="dept.dept?.id || dept.deptGroupId" class="dept-section">
|
|
:key="dept.dept?.id || dept.deptGroupId" class="dept-section">
|
|
@@ -190,7 +168,6 @@
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
v-model="subTeam.checked"
|
|
v-model="subTeam.checked"
|
|
|
@change="(val: boolean) => handleSubTeamCheckChange(val, subTeam, 'year')"
|
|
@change="(val: boolean) => handleSubTeamCheckChange(val, subTeam, 'year')"
|
|
|
- :disabled="formData.yearNoSchedule"
|
|
|
|
|
>
|
|
>
|
|
|
{{ subTeam.name }}
|
|
{{ subTeam.name }}
|
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
@@ -199,7 +176,6 @@
|
|
|
<el-checkbox-group
|
|
<el-checkbox-group
|
|
|
v-model="yearSelectedCheckerIds"
|
|
v-model="yearSelectedCheckerIds"
|
|
|
@change="handleYearMemberChange"
|
|
@change="handleYearMemberChange"
|
|
|
- :disabled="formData.yearNoSchedule"
|
|
|
|
|
>
|
|
>
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
v-for="member in subTeam.memberList"
|
|
v-for="member in subTeam.memberList"
|
|
@@ -220,9 +196,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
<el-empty v-else description="暂无检验员数据"/>
|
|
<el-empty v-else description="暂无检验员数据"/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="formData.yearNoSchedule || yearEquipCount === 0"
|
|
|
|
|
|
|
+ <div v-if="yearEquipCount === 0"
|
|
|
class="text-gray-400 py-4 text-center">
|
|
class="text-gray-400 py-4 text-center">
|
|
|
- 无需安排或无待检设备
|
|
|
|
|
|
|
+ 无待检设备
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -273,7 +249,7 @@
|
|
|
<!-- 循环渲染子项(模拟数据) -->
|
|
<!-- 循环渲染子项(模拟数据) -->
|
|
|
<div class="grid-item" v-for="(item, index) in checkItem.itemList" :key="index">
|
|
<div class="grid-item" v-for="(item, index) in checkItem.itemList" :key="index">
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
- :disabled="item.isMainProject === '1'|| item.name === '压力管道一览表'"
|
|
|
|
|
|
|
+ :disabled="item.isMainProject === '1'|| item.name === '一览表'"
|
|
|
v-model="item.use"
|
|
v-model="item.use"
|
|
|
/>
|
|
/>
|
|
|
<!-- @change="(val) => handleCheckItemSelectedChange(item, val)"-->
|
|
<!-- @change="(val) => handleCheckItemSelectedChange(item, val)"-->
|
|
@@ -348,7 +324,11 @@ import {FormInstance} from 'element-plus'
|
|
|
import {useMessage} from '@/hooks/web/useMessage'
|
|
import {useMessage} from '@/hooks/web/useMessage'
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
import {EquipPipeSchedulingApi, EquipPipeSchedulingVO} from "@/api/pressure2/pipescheduling";
|
|
import {EquipPipeSchedulingApi, EquipPipeSchedulingVO} from "@/api/pressure2/pipescheduling";
|
|
|
-import {PressurePipeCheckType, PressurePipeCheckTypeMap} from "@/utils/constants";
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ PressureBoilerCheckType,
|
|
|
|
|
+ PressurePipeCheckType,
|
|
|
|
|
+ PressurePipeCheckTypeMap
|
|
|
|
|
+} from "@/utils/constants";
|
|
|
import {PipeTaskOrderApi} from "@/api/pressure2/pipetaskorder";
|
|
import {PipeTaskOrderApi} from "@/api/pressure2/pipetaskorder";
|
|
|
import {DeptGroupTeamApi} from '@/api/pressure2/deptGroupTeam'
|
|
import {DeptGroupTeamApi} from '@/api/pressure2/deptGroupTeam'
|
|
|
import {processInspectorGroups} from '@/views/pressure2/equipboilerscheduling/components/inspector'
|
|
import {processInspectorGroups} from '@/views/pressure2/equipboilerscheduling/components/inspector'
|
|
@@ -434,7 +414,6 @@ const formData = ref({
|
|
|
checkType: '100',
|
|
checkType: '100',
|
|
|
// 定期检验
|
|
// 定期检验
|
|
|
legalDate: '',
|
|
legalDate: '',
|
|
|
- legalNoSchedule: false,
|
|
|
|
|
legalTeamList: [],
|
|
legalTeamList: [],
|
|
|
legalTaskList: [],
|
|
legalTaskList: [],
|
|
|
legalIsOrderConfirm: true,
|
|
legalIsOrderConfirm: true,
|
|
@@ -446,7 +425,6 @@ const formData = ref({
|
|
|
|
|
|
|
|
// 年度检查
|
|
// 年度检查
|
|
|
yearDate: '',
|
|
yearDate: '',
|
|
|
- yearNoSchedule: false,
|
|
|
|
|
yearTeamList: [],
|
|
yearTeamList: [],
|
|
|
yearTaskList: [],
|
|
yearTaskList: [],
|
|
|
yearIsOrderConfirm: true,
|
|
yearIsOrderConfirm: true,
|
|
@@ -473,7 +451,7 @@ const yearSelectedCheckerIds = ref<string[]>([])
|
|
|
const formRules = {
|
|
const formRules = {
|
|
|
legalDate: [{
|
|
legalDate: [{
|
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
|
- if (!formData.value.legalNoSchedule && !value) {
|
|
|
|
|
|
|
+ if (!value && formData.value.legalTaskList.length > 0) {
|
|
|
callback(new Error('请选择定检日期'))
|
|
callback(new Error('请选择定检日期'))
|
|
|
} else {
|
|
} else {
|
|
|
callback()
|
|
callback()
|
|
@@ -483,7 +461,7 @@ const formRules = {
|
|
|
}],
|
|
}],
|
|
|
legalTeamList: [{
|
|
legalTeamList: [{
|
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
|
- if (!formData.value.legalNoSchedule && (!value || value.length === 0) && !formData.value.legalIsOrderConfirm) {
|
|
|
|
|
|
|
+ if ((!value || value.length === 0) && !formData.value.legalIsOrderConfirm && formData.value.legalTaskList.length > 0) {
|
|
|
callback(new Error('请选择检验员'))
|
|
callback(new Error('请选择检验员'))
|
|
|
} else {
|
|
} else {
|
|
|
callback()
|
|
callback()
|
|
@@ -493,7 +471,7 @@ const formRules = {
|
|
|
}],
|
|
}],
|
|
|
yearDate: [{
|
|
yearDate: [{
|
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
|
- if (!formData.value.yearNoSchedule && !value) {
|
|
|
|
|
|
|
+ if (!value && formData.value.yearTaskList.length > 0) {
|
|
|
callback(new Error('请选择年检日期'))
|
|
callback(new Error('请选择年检日期'))
|
|
|
} else {
|
|
} else {
|
|
|
callback()
|
|
callback()
|
|
@@ -503,7 +481,7 @@ const formRules = {
|
|
|
}],
|
|
}],
|
|
|
yearTeamList: [{
|
|
yearTeamList: [{
|
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
|
- if (!formData.value.yearNoSchedule && (!value || value.length === 0) && !formData.value.yearIsOrderConfirm) {
|
|
|
|
|
|
|
+ if ((!value || value.length === 0) && !formData.value.yearIsOrderConfirm && formData.value.yearTaskList.length > 0) {
|
|
|
callback(new Error('请选择检验员'))
|
|
callback(new Error('请选择检验员'))
|
|
|
} else {
|
|
} else {
|
|
|
callback()
|
|
callback()
|
|
@@ -683,24 +661,6 @@ watch(() => yearSelectedCheckers.value, (newVal) => {
|
|
|
yearSelectedCheckerIds.value = newVal.map(c => c.groupTeamId + ':' + c.memberId)
|
|
yearSelectedCheckerIds.value = newVal.map(c => c.groupTeamId + ':' + c.memberId)
|
|
|
}, {deep: true})
|
|
}, {deep: true})
|
|
|
|
|
|
|
|
-/** 监听日期变化 */
|
|
|
|
|
-watch(() => formData.value.legalDate, (newDate) => {
|
|
|
|
|
- if (newDate) {
|
|
|
|
|
- // 只有在未设置且未勾选"无需安排"的情况下才自动填充
|
|
|
|
|
- if (!formData.value.yearDate && !formData.value.yearNoSchedule) {
|
|
|
|
|
- formData.value.yearDate = newDate
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-watch(() => formData.value.yearDate, (newDate) => {
|
|
|
|
|
- if (newDate) {
|
|
|
|
|
- if (!formData.value.yearDate && !formData.value.yearNoSchedule) {
|
|
|
|
|
- formData.value.yearDate = newDate
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
/** 监听检验员变化 */
|
|
/** 监听检验员变化 */
|
|
|
const syncCheckers = (sourceType: string, checkers: any[]) => {
|
|
const syncCheckers = (sourceType: string, checkers: any[]) => {
|
|
@@ -710,13 +670,12 @@ const syncCheckers = (sourceType: string, checkers: any[]) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
typeMap[sourceType].forEach(type => {
|
|
typeMap[sourceType].forEach(type => {
|
|
|
- const noScheduleKey = `${type}NoSchedule`
|
|
|
|
|
const checkerMap = {
|
|
const checkerMap = {
|
|
|
legal: legalSelectedCheckers,
|
|
legal: legalSelectedCheckers,
|
|
|
year: yearSelectedCheckers,
|
|
year: yearSelectedCheckers,
|
|
|
}
|
|
}
|
|
|
- // 只有在未选择检验员且未勾选"无需安排"的情况下才自动同步
|
|
|
|
|
- if (!formData.value[noScheduleKey] && checkerMap[type].value.length === 0) {
|
|
|
|
|
|
|
+ // 只有在未选择检验员的情况下才自动同步
|
|
|
|
|
+ if (checkerMap[type].value.length === 0) {
|
|
|
checkerMap[type].value = [...checkers]
|
|
checkerMap[type].value = [...checkers]
|
|
|
updateTeamList(type)
|
|
updateTeamList(type)
|
|
|
}
|
|
}
|
|
@@ -825,16 +784,15 @@ const handleCheckItemFeeConfirm = () => {
|
|
|
calculateYearAmounts()
|
|
calculateYearAmounts()
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
- * 根据无需安排展示项目
|
|
|
|
|
|
|
+ * 根据任务列表长度展示项目
|
|
|
* @param checkItem
|
|
* @param checkItem
|
|
|
*/
|
|
*/
|
|
|
const showCheck = (checkItem) => {
|
|
const showCheck = (checkItem) => {
|
|
|
- //console.log(checkItem)
|
|
|
|
|
if (checkItem.inspectionNature == PressurePipeCheckType.REGULAR) {
|
|
if (checkItem.inspectionNature == PressurePipeCheckType.REGULAR) {
|
|
|
- return !formData.value.legalNoSchedule
|
|
|
|
|
|
|
+ return formData.value.legalTaskList.length > 0
|
|
|
}
|
|
}
|
|
|
if (checkItem.inspectionNature == PressurePipeCheckType.ANNUAL) {
|
|
if (checkItem.inspectionNature == PressurePipeCheckType.ANNUAL) {
|
|
|
- return !formData.value.yearNoSchedule
|
|
|
|
|
|
|
+ return formData.value.yearTaskList.length > 0
|
|
|
}
|
|
}
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
@@ -883,16 +841,27 @@ const updateTeamList = (type) => {
|
|
|
|
|
|
|
|
// 查询项目列表
|
|
// 查询项目列表
|
|
|
const handleQueryCheckItemList = async () => {
|
|
const handleQueryCheckItemList = async () => {
|
|
|
- let req = []
|
|
|
|
|
- //console.log(props.selectedPipeRows, row)
|
|
|
|
|
- // if (props.selectedPipeRows?.length > 0) {
|
|
|
|
|
- // for (const item of props.selectedPipeRows) {
|
|
|
|
|
- // req = [...req, ...(item.legalEquipIds?.split(',') || []), ...(item.yearEquipIds?.split(',') || [])]
|
|
|
|
|
- // }
|
|
|
|
|
- // } else {
|
|
|
|
|
- // req = [...(row[0].legalEquipIds?.split(',') || []), ...(row[0].yearEquipIds?.split(',') || [])]
|
|
|
|
|
- // }
|
|
|
|
|
- //equipList.value = await EquipBoilerApi.getNameByIds(req)
|
|
|
|
|
|
|
+ checkItemList.value = []
|
|
|
|
|
+ // 校验所有选中的任务列表中的设备类型是否一致
|
|
|
|
|
+ const allTasks = [
|
|
|
|
|
+ ...formData.value.legalTaskList,
|
|
|
|
|
+ ...formData.value.yearTaskList
|
|
|
|
|
+ ]
|
|
|
|
|
+
|
|
|
|
|
+ if (allTasks.length > 0) {
|
|
|
|
|
+ const firstType = allTasks[0].pipeCategory
|
|
|
|
|
+ const hasDifferentType = allTasks.some(task => task.pipeCategory !== firstType)
|
|
|
|
|
+
|
|
|
|
|
+ if (hasDifferentType) {
|
|
|
|
|
+ ElMessage.error('请选择同一类型设备')
|
|
|
|
|
+ dialogVisible.value = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 获取统一的设备类型,如果列表为空则设为 undefined
|
|
|
|
|
+ const equipType = allTasks.length > 0 ? allTasks[0].pipeCategory : undefined
|
|
|
|
|
+
|
|
|
equipList.value = []
|
|
equipList.value = []
|
|
|
checkItemList.value = []
|
|
checkItemList.value = []
|
|
|
const checkTypes = [
|
|
const checkTypes = [
|
|
@@ -905,7 +874,8 @@ const handleQueryCheckItemList = async () => {
|
|
|
orderId: "0",
|
|
orderId: "0",
|
|
|
itemIds: equipList.value.map(item => item.id),
|
|
itemIds: equipList.value.map(item => item.id),
|
|
|
equipmentCategory: 200,
|
|
equipmentCategory: 200,
|
|
|
- inspectionNature: [type]
|
|
|
|
|
|
|
+ inspectionNature: [type],
|
|
|
|
|
+ equipType:equipType
|
|
|
};
|
|
};
|
|
|
const queryResult = await querySchedulingCheckItemList(params);
|
|
const queryResult = await querySchedulingCheckItemList(params);
|
|
|
const inspectionNatureType = await InspectionNatureTypeApi.getInspectionNatureTypePage({
|
|
const inspectionNatureType = await InspectionNatureTypeApi.getInspectionNatureTypePage({
|
|
@@ -925,7 +895,7 @@ const handleQueryCheckItemList = async () => {
|
|
|
isAutoAmount: '0', // 批量模式下默认为'0'
|
|
isAutoAmount: '0', // 批量模式下默认为'0'
|
|
|
inspectionNature: type,
|
|
inspectionNature: type,
|
|
|
type: '1',
|
|
type: '1',
|
|
|
- use: inType == 1 ? item.name === "压力管道一览表" ? true : item.use : false
|
|
|
|
|
|
|
+ use: inType == 1 ? item.name === "一览表" ? true : item.use : false
|
|
|
}
|
|
}
|
|
|
))
|
|
))
|
|
|
});
|
|
});
|
|
@@ -939,7 +909,7 @@ const handleQueryCheckItemList = async () => {
|
|
|
isAutoAmount: '0', // 批量模式下默认为'0'
|
|
isAutoAmount: '0', // 批量模式下默认为'0'
|
|
|
inspectionNature: type,
|
|
inspectionNature: type,
|
|
|
type: '2',
|
|
type: '2',
|
|
|
- use: inType == 2 ? item.name === "压力管道一览表" ? true : item.use : false
|
|
|
|
|
|
|
+ use: inType == 2 ? item.name === "一览表" ? true : item.use : false
|
|
|
}
|
|
}
|
|
|
))
|
|
))
|
|
|
});
|
|
});
|
|
@@ -973,7 +943,6 @@ const open = async (selectedLegalList?: EquipPipeSchedulingVO[], selectedYearLis
|
|
|
checkType: checkType || '100',
|
|
checkType: checkType || '100',
|
|
|
// 定期检验
|
|
// 定期检验
|
|
|
legalDate: '',
|
|
legalDate: '',
|
|
|
- legalNoSchedule: counts.legal === 0, // 使用实时计算的数量
|
|
|
|
|
legalTeamList: [],
|
|
legalTeamList: [],
|
|
|
legalTaskList: [],
|
|
legalTaskList: [],
|
|
|
legalIsOrderConfirm: true,
|
|
legalIsOrderConfirm: true,
|
|
@@ -984,7 +953,6 @@ const open = async (selectedLegalList?: EquipPipeSchedulingVO[], selectedYearLis
|
|
|
legalReduceFee: 0,
|
|
legalReduceFee: 0,
|
|
|
// 年度检查
|
|
// 年度检查
|
|
|
yearDate: '',
|
|
yearDate: '',
|
|
|
- yearNoSchedule: counts.year === 0, // 使用实时计算的数量
|
|
|
|
|
yearTeamList: [],
|
|
yearTeamList: [],
|
|
|
yearTaskList: [],
|
|
yearTaskList: [],
|
|
|
yearIsOrderConfirm: true,
|
|
yearIsOrderConfirm: true,
|
|
@@ -1065,7 +1033,7 @@ const handleConfirm = async () => {
|
|
|
Object.values(legalUnitList).forEach(item => {
|
|
Object.values(legalUnitList).forEach(item => {
|
|
|
|
|
|
|
|
// 处理定期检验
|
|
// 处理定期检验
|
|
|
- if (!formData.value.legalNoSchedule && formData.value.legalDate && formData.value.legalTaskList.length > 0) {
|
|
|
|
|
|
|
+ if (formData.value.legalDate && formData.value.legalTaskList.length > 0) {
|
|
|
let actualAmount = 0
|
|
let actualAmount = 0
|
|
|
checkItemList.value.find(i => i.inspectionNature == PressurePipeCheckType.REGULAR).itemList.filter(i => i.use).forEach(i => {
|
|
checkItemList.value.find(i => i.inspectionNature == PressurePipeCheckType.REGULAR).itemList.filter(i => i.use).forEach(i => {
|
|
|
actualAmount += i.fee
|
|
actualAmount += i.fee
|
|
@@ -1109,7 +1077,7 @@ const handleConfirm = async () => {
|
|
|
if (formData.value.checkType == '200') {
|
|
if (formData.value.checkType == '200') {
|
|
|
Object.values(yearUnitList).forEach(item => {
|
|
Object.values(yearUnitList).forEach(item => {
|
|
|
// 处理年度检查
|
|
// 处理年度检查
|
|
|
- if (!formData.value.yearNoSchedule && formData.value.yearDate && formData.value.yearTaskList.length > 0) {
|
|
|
|
|
|
|
+ if (formData.value.yearDate && formData.value.yearTaskList.length > 0) {
|
|
|
let actualAmount = 0
|
|
let actualAmount = 0
|
|
|
checkItemList.value.find(i => i.inspectionNature == PressurePipeCheckType.ANNUAL).itemList.filter(i => i.use).forEach(i => {
|
|
checkItemList.value.find(i => i.inspectionNature == PressurePipeCheckType.ANNUAL).itemList.filter(i => i.use).forEach(i => {
|
|
|
actualAmount += i.fee
|
|
actualAmount += i.fee
|
|
@@ -1163,25 +1131,6 @@ const handleConfirm = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 处理"无需安排"变化
|
|
|
|
|
-const handleLegalNoScheduleChange = (val: boolean) => {
|
|
|
|
|
- if (val) {
|
|
|
|
|
- formData.value.legalDate = ''
|
|
|
|
|
- legalSelectedCheckers.value = []
|
|
|
|
|
- legalSelectedCheckerIds.value = []
|
|
|
|
|
- formData.value.legalTeamList = []
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const handleYearNoScheduleChange = (val: boolean) => {
|
|
|
|
|
- if (val) {
|
|
|
|
|
- formData.value.yearDate = ''
|
|
|
|
|
- yearSelectedCheckers.value = []
|
|
|
|
|
- yearSelectedCheckerIds.value = []
|
|
|
|
|
- formData.value.yearTeamList = []
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 禁用内部日期
|
|
* 禁用内部日期
|