|
@@ -33,22 +33,9 @@
|
|
|
clearable
|
|
clearable
|
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
|
>
|
|
>
|
|
|
- <el-option
|
|
|
|
|
- v-for="(item, key) in PressurePipeCheckTypeMap"
|
|
|
|
|
- :key="key"
|
|
|
|
|
- :label="item"
|
|
|
|
|
- :value="key"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-option v-for="(item, key) in PressurePipeCheckTypeMap" :key="key" :label="item" :value="key" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="检验部门" prop="deptId">
|
|
|
|
|
- <DeptSelect
|
|
|
|
|
- v-model="queryParams.deptId"
|
|
|
|
|
- placeholder="请选择部门"
|
|
|
|
|
- clearable
|
|
|
|
|
- class="!w-240px"
|
|
|
|
|
- />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
<el-form-item label="检验时间" prop="checkDate">
|
|
<el-form-item label="检验时间" prop="checkDate">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="queryParams.checkDate"
|
|
v-model="queryParams.checkDate"
|
|
@@ -96,12 +83,7 @@
|
|
|
class="!w-240px"
|
|
class="!w-240px"
|
|
|
>
|
|
>
|
|
|
<el-option label="全部" value="all" />
|
|
<el-option label="全部" value="all" />
|
|
|
- <el-option
|
|
|
|
|
- v-for="(item, key) in filteredTaskStatusMap"
|
|
|
|
|
- :key="key"
|
|
|
|
|
- :label="item"
|
|
|
|
|
- :value="key"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-option v-for="(item, key) in filteredTaskStatusMap" :key="key" :label="item" :value="key"/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="受理单提交人" prop="submitIds">
|
|
<el-form-item label="受理单提交人" prop="submitIds">
|
|
@@ -149,15 +131,16 @@
|
|
|
<el-table-column label="任务单号" align="center" prop="orderNo" min-width="150px" />
|
|
<el-table-column label="任务单号" align="center" prop="orderNo" min-width="150px" />
|
|
|
<el-table-column label="使用单位" align="center" prop="unitName" min-width="150px" />
|
|
<el-table-column label="使用单位" align="center" prop="unitName" min-width="150px" />
|
|
|
<el-table-column label="检验性质" align="center" prop="checkType" min-width="120px">
|
|
<el-table-column label="检验性质" align="center" prop="checkType" min-width="120px">
|
|
|
- 法定检验
|
|
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ {{ typeOptions.find(type => type.value == inspectionNatureTypeList.find(item => item.nature == scope.row.checkType).type)?.label || '-' }}
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="检验部门" align="center" prop="deptName" min-width="120px" />
|
|
|
|
|
<el-table-column label="检验项目" align="center" prop="checkType" min-width="120px">
|
|
<el-table-column label="检验项目" align="center" prop="checkType" min-width="120px">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
{{ PressurePipeCheckTypeMap[scope.row.checkType] }}
|
|
{{ PressurePipeCheckTypeMap[scope.row.checkType] }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="设备数量" align="center" prop="equipNum" min-width="150px" />
|
|
|
|
|
|
|
+ <el-table-column label="设备数量" align="center" prop="equipNum" min-width="150px"/>
|
|
|
<el-table-column label="任务单状态" align="center" prop="taskStatus" min-width="150px">
|
|
<el-table-column label="任务单状态" align="center" prop="taskStatus" min-width="150px">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-tag :type="getTypeColor(scope.row.taskStatus)">{{ PressureTaskOrderTaskStatusMap[scope.row.taskStatus] }}</el-tag>
|
|
<el-tag :type="getTypeColor(scope.row.taskStatus)">{{ PressureTaskOrderTaskStatusMap[scope.row.taskStatus] }}</el-tag>
|
|
@@ -173,7 +156,7 @@
|
|
|
{{ formatArrayDate(scope.row.checkDate) }}
|
|
{{ formatArrayDate(scope.row.checkDate) }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="主检员" align="center" prop="manager" min-width="120px">
|
|
|
|
|
|
|
+ <el-table-column label="主检员" align="center" prop="manager" min-width="120px" >
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
{{ scope.row.manager ? scope.row.manager.nickname : '-' }}
|
|
{{ scope.row.manager ? scope.row.manager.nickname : '-' }}
|
|
|
</template>
|
|
</template>
|
|
@@ -213,7 +196,7 @@
|
|
|
v-if="scope.row.taskStatus === PressureTaskOrderTaskStatus.WAIT_CONFIRM"
|
|
v-if="scope.row.taskStatus === PressureTaskOrderTaskStatus.WAIT_CONFIRM"
|
|
|
link
|
|
link
|
|
|
type="primary"
|
|
type="primary"
|
|
|
- @click="handleConfirm(scope.row.id, formatArrayDate(scope.row.checkDate))"
|
|
|
|
|
|
|
+ @click="handleConfirm(scope.row.id,formatArrayDate(scope.row.checkDate))"
|
|
|
>
|
|
>
|
|
|
认领
|
|
认领
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -327,6 +310,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
@@ -339,15 +323,14 @@ import {
|
|
|
PressureTaskOrderTaskStatus,
|
|
PressureTaskOrderTaskStatus,
|
|
|
PressurePipeCheckTypeMap
|
|
PressurePipeCheckTypeMap
|
|
|
} from '@/utils/constants'
|
|
} from '@/utils/constants'
|
|
|
-import { ElMessageBox, ElMessage, ElTable, dayjs } from 'element-plus'
|
|
|
|
|
|
|
+import {ElMessageBox, ElMessage, ElTable, dayjs} from 'element-plus'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
// 在script部分
|
|
// 在script部分
|
|
|
import { getUserPage } from '@/api/system/user'
|
|
import { getUserPage } from '@/api/system/user'
|
|
|
-import SmartTable from '@/components/SmartTable/SmartTable'
|
|
|
|
|
|
|
+import SmartTable from "@/components/SmartTable/SmartTable";
|
|
|
import { getUserList } from '@/api/common/user'
|
|
import { getUserList } from '@/api/common/user'
|
|
|
-import { useUserStore } from '@/store/modules/user'
|
|
|
|
|
-import DeptSelect from '@/views/pressure2/pipescheduling/components/DeptSelect.vue'
|
|
|
|
|
-
|
|
|
|
|
|
|
+import {useUserStore} from "@/store/modules/user";
|
|
|
|
|
+import {InspectionNatureTypeApi} from "@/api/pressure2/inspectionnaturetype";
|
|
|
// 定义用户搜索相关的响应式变量
|
|
// 定义用户搜索相关的响应式变量
|
|
|
const userOptions = ref([])
|
|
const userOptions = ref([])
|
|
|
const userSearchLoading = ref(false)
|
|
const userSearchLoading = ref(false)
|
|
@@ -360,8 +343,17 @@ const setPipeConfirmDialogVisible = ref(false)
|
|
|
const pipeOrderItemList = ref([])
|
|
const pipeOrderItemList = ref([])
|
|
|
const selectedOrderItemId = ref('')
|
|
const selectedOrderItemId = ref('')
|
|
|
const selectedOrderId = ref('')
|
|
const selectedOrderId = ref('')
|
|
|
-const userStore = useUserStore()
|
|
|
|
|
-
|
|
|
|
|
|
|
+const inspectionNatureTypeList = ref([])
|
|
|
|
|
+const typeOptions = [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 1,
|
|
|
|
|
+ label: '法定'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 2,
|
|
|
|
|
+ label: '委托'
|
|
|
|
|
+ }
|
|
|
|
|
+]
|
|
|
// 通过输入的值查询对应受理单提交人名字
|
|
// 通过输入的值查询对应受理单提交人名字
|
|
|
// 远程搜索用户方法
|
|
// 远程搜索用户方法
|
|
|
const remoteSearchUsers = (query) => {
|
|
const remoteSearchUsers = (query) => {
|
|
@@ -371,18 +363,16 @@ const remoteSearchUsers = (query) => {
|
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
nickName: query
|
|
nickName: query
|
|
|
|
|
+ }).then(response => {
|
|
|
|
|
+ const users = response.list || []
|
|
|
|
|
+ userOptions.value = users.map(user => ({
|
|
|
|
|
+ value: user.id, // 值是用户ID
|
|
|
|
|
+ label: user.nickname, // 显示的是用户昵称
|
|
|
|
|
+ key: user.id // 用于v-for的key
|
|
|
|
|
+ }))
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ userSearchLoading.value = false
|
|
|
})
|
|
})
|
|
|
- .then((response) => {
|
|
|
|
|
- const users = response.list || []
|
|
|
|
|
- userOptions.value = users.map((user) => ({
|
|
|
|
|
- value: user.id, // 值是用户ID
|
|
|
|
|
- label: user.nickname, // 显示的是用户昵称
|
|
|
|
|
- key: user.id // 用于v-for的key
|
|
|
|
|
- }))
|
|
|
|
|
- })
|
|
|
|
|
- .finally(() => {
|
|
|
|
|
- userSearchLoading.value = false
|
|
|
|
|
- })
|
|
|
|
|
} else {
|
|
} else {
|
|
|
userOptions.value = []
|
|
userOptions.value = []
|
|
|
}
|
|
}
|
|
@@ -390,26 +380,26 @@ const remoteSearchUsers = (query) => {
|
|
|
|
|
|
|
|
// 剔除查询模块中不需要的选项
|
|
// 剔除查询模块中不需要的选项
|
|
|
const filteredTaskStatusMap = computed(() => {
|
|
const filteredTaskStatusMap = computed(() => {
|
|
|
- const result = {}
|
|
|
|
|
|
|
+ const result = {};
|
|
|
|
|
|
|
|
// 需要剔除的状态
|
|
// 需要剔除的状态
|
|
|
const excludeStatus = [
|
|
const excludeStatus = [
|
|
|
- PressureTaskOrderTaskStatus.RECORD_INPUT, // 记录录入 500
|
|
|
|
|
- PressureTaskOrderTaskStatus.RECORD_CHECK, // 记录校核 510
|
|
|
|
|
- PressureTaskOrderTaskStatus.REPORT_INPUT, // 报告编制 520
|
|
|
|
|
- PressureTaskOrderTaskStatus.REPORT_AUDIT, // 报告审核 600
|
|
|
|
|
- PressureTaskOrderTaskStatus.REPORT_APPROVE // 报告审批 700
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ PressureTaskOrderTaskStatus.RECORD_INPUT, // 记录录入 500
|
|
|
|
|
+ PressureTaskOrderTaskStatus.RECORD_CHECK, // 记录校核 510
|
|
|
|
|
+ PressureTaskOrderTaskStatus.REPORT_INPUT, // 报告编制 520
|
|
|
|
|
+ PressureTaskOrderTaskStatus.REPORT_AUDIT, // 报告审核 600
|
|
|
|
|
+ PressureTaskOrderTaskStatus.REPORT_APPROVE // 报告审批 700
|
|
|
|
|
+ ];
|
|
|
|
|
|
|
|
// 只保留不在排除列表中的状态
|
|
// 只保留不在排除列表中的状态
|
|
|
Object.entries(PressureTaskOrderTaskStatusMap).forEach(([key, value]) => {
|
|
Object.entries(PressureTaskOrderTaskStatusMap).forEach(([key, value]) => {
|
|
|
if (!excludeStatus.includes(Number(key))) {
|
|
if (!excludeStatus.includes(Number(key))) {
|
|
|
- result[key] = value
|
|
|
|
|
|
|
+ result[key] = value;
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- return result
|
|
|
|
|
-})
|
|
|
|
|
|
|
+ return result;
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
const getTypeColor = (status: string | number) => {
|
|
const getTypeColor = (status: string | number) => {
|
|
|
const statusMap = {
|
|
const statusMap = {
|
|
@@ -425,8 +415,8 @@ const getTypeColor = (status: string | number) => {
|
|
|
[PressureTaskOrderTaskStatus.REPORT_AUDIT]: 'warning',
|
|
[PressureTaskOrderTaskStatus.REPORT_AUDIT]: 'warning',
|
|
|
[PressureTaskOrderTaskStatus.REPORT_APPROVE]: 'warning',
|
|
[PressureTaskOrderTaskStatus.REPORT_APPROVE]: 'warning',
|
|
|
[PressureTaskOrderTaskStatus.REPORT_END]: 'success'
|
|
[PressureTaskOrderTaskStatus.REPORT_END]: 'success'
|
|
|
- }
|
|
|
|
|
- return statusMap[status] || 'info'
|
|
|
|
|
|
|
+ };
|
|
|
|
|
+ return statusMap[status] || 'info';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** 承压任务单 列表 */
|
|
/** 承压任务单 列表 */
|
|
@@ -441,20 +431,25 @@ const queryParams = reactive({
|
|
|
orderNo: undefined,
|
|
orderNo: undefined,
|
|
|
unitName: undefined,
|
|
unitName: undefined,
|
|
|
checkType: undefined,
|
|
checkType: undefined,
|
|
|
- deptId: userStore.user.deptId,
|
|
|
|
|
checkDate: [],
|
|
checkDate: [],
|
|
|
checkUserIds: [],
|
|
checkUserIds: [],
|
|
|
- submitIds: [],
|
|
|
|
|
|
|
+ submitIds:[],
|
|
|
contractNo: undefined,
|
|
contractNo: undefined,
|
|
|
taskStatus: 'all',
|
|
taskStatus: 'all',
|
|
|
submitTime: []
|
|
submitTime: []
|
|
|
})
|
|
})
|
|
|
const queryFormRef = ref()
|
|
const queryFormRef = ref()
|
|
|
-
|
|
|
|
|
/** 查询列表 */
|
|
/** 查询列表 */
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
try {
|
|
try {
|
|
|
|
|
+
|
|
|
|
|
+ await InspectionNatureTypeApi.getInspectionNatureTypePage({
|
|
|
|
|
+ equip:"300"
|
|
|
|
|
+ }).then(res=>{
|
|
|
|
|
+ inspectionNatureTypeList.value = res.list
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
const params = { ...queryParams }
|
|
const params = { ...queryParams }
|
|
|
if (params.taskStatus === 'all') {
|
|
if (params.taskStatus === 'all') {
|
|
|
params.taskStatus = undefined
|
|
params.taskStatus = undefined
|
|
@@ -497,7 +492,8 @@ const showChangeLog = (row: PipeTaskOrderVO) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 认领
|
|
// 认领
|
|
|
-const handleConfirm = async (id: string, checkDate: string) => {
|
|
|
|
|
|
|
+const handleConfirm = async (id: string,checkDate: string) => {
|
|
|
|
|
+
|
|
|
// 检查检验日期是否在三天内
|
|
// 检查检验日期是否在三天内
|
|
|
// if (checkDate) {
|
|
// if (checkDate) {
|
|
|
|
|
|
|
@@ -520,7 +516,7 @@ const handleConfirm = async (id: string, checkDate: string) => {
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
})
|
|
})
|
|
|
- await PipeTaskOrderApi.confirmTaskOrder({ id, confirm: true })
|
|
|
|
|
|
|
+ await PipeTaskOrderApi.confirmTaskOrder({ id, "confirm": true })
|
|
|
ElMessage.success('认领成功')
|
|
ElMessage.success('认领成功')
|
|
|
getList()
|
|
getList()
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -539,6 +535,7 @@ const handleConfirm = async (id: string, checkDate: string) => {
|
|
|
// const response = await PipeTaskOrderApi.getPipeByOrderId(params)
|
|
// const response = await PipeTaskOrderApi.getPipeByOrderId(params)
|
|
|
// pipeOrderItemList.value = response || []
|
|
// pipeOrderItemList.value = response || []
|
|
|
// setPipeConfirmDialogVisible.value = true
|
|
// setPipeConfirmDialogVisible.value = true
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 取消认领
|
|
// 取消认领
|
|
@@ -549,7 +546,7 @@ const handleCancelConfirm = async (id: string) => {
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
})
|
|
})
|
|
|
- await PipeTaskOrderApi.confirmTaskOrder({ id, confirm: false })
|
|
|
|
|
|
|
+ await PipeTaskOrderApi.confirmTaskOrder({ id, "confirm": false })
|
|
|
ElMessage.success('取消认领成功')
|
|
ElMessage.success('取消认领成功')
|
|
|
getList()
|
|
getList()
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -622,6 +619,7 @@ const handleConfirmationFn = async (id: string) => {
|
|
|
|
|
|
|
|
// 人员选择弹窗 start
|
|
// 人员选择弹窗 start
|
|
|
const userTableRef = ref()
|
|
const userTableRef = ref()
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
const userInfo = computed(() => userStore.user)
|
|
const userInfo = computed(() => userStore.user)
|
|
|
const fieldKey = ref('')
|
|
const fieldKey = ref('')
|
|
|
const customUserDialogVisible = ref(false)
|
|
const customUserDialogVisible = ref(false)
|
|
@@ -717,6 +715,7 @@ const handleCancelSetPipeInfo = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const handleConfirmSetPipeInfo = async () => {
|
|
const handleConfirmSetPipeInfo = async () => {
|
|
|
|
|
+
|
|
|
if (!selectedOrderItemId.value) {
|
|
if (!selectedOrderItemId.value) {
|
|
|
ElMessage.warning('请选择主检管道')
|
|
ElMessage.warning('请选择主检管道')
|
|
|
return
|
|
return
|
|
@@ -724,7 +723,7 @@ const handleConfirmSetPipeInfo = async () => {
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
const params = {
|
|
const params = {
|
|
|
- id: selectedOrderId.value,
|
|
|
|
|
|
|
+ id : selectedOrderId.value,
|
|
|
confirm: true,
|
|
confirm: true,
|
|
|
orderItemId: selectedOrderItemId.value
|
|
orderItemId: selectedOrderItemId.value
|
|
|
}
|
|
}
|
|
@@ -753,4 +752,6 @@ onMounted(() => {
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+
|
|
|
|
|
+</style>
|