|
|
@@ -199,13 +199,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <template v-if="exceptionInfo.id">
|
|
|
- <div class="check-info-label-title">异常信息</div>
|
|
|
- <!-- <el-row class="m-b-20px">
|
|
|
- <el-button v-if="!exceptionInfo.id" type="primary" @click="addExceptionInfo">添加异常单</el-button>
|
|
|
- <el-button v-else type="primary" @click="deleteExceptionInfo">删除异常单</el-button>
|
|
|
- </el-row> -->
|
|
|
- <el-row class="form-group" :gutter="24">
|
|
|
+ <div class="check-info-label-title">异常信息</div>
|
|
|
+ <el-row class="m-b-20px">
|
|
|
+ <el-button v-if="!exceptionInfo.id" type="primary" @click="addExceptionInfo">添加异常单</el-button>
|
|
|
+ <el-button v-else type="primary" @click="deleteExceptionInfo">删除异常单</el-button>
|
|
|
+ </el-row>
|
|
|
+ <el-row v-if="exceptionInfo.id" class="form-group" :gutter="24">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="有效日期调整原因" prop="effectiveDateAdjustReason">
|
|
|
<el-input v-model="exceptionInfo.effectiveDateAdjustReason" placeholder="请输入有效日期调整原因"/>
|
|
|
@@ -257,7 +256,6 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </template>
|
|
|
<div class="check-info-label-title">检验收费</div>
|
|
|
<el-row class="form-group" :gutter="24">
|
|
|
<el-col :span="24">
|
|
|
@@ -674,11 +672,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="tsx">
|
|
|
-import { ref, onMounted, computed, watch } from 'vue'
|
|
|
+import { ref, onMounted, computed, watch, unref } from 'vue'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { BoilerAcceptOrderApi } from '@/api/pressure2/boileracceptorder'
|
|
|
import PipeBatchEditForm from '@/views/pressure2/planNew/components/PipeBatchEditForm.vue'
|
|
|
-import { BoilerAppointmentConfirmOrderEquipmentVO, BoilerAppointmentConfirmOrderApi } from '@/api/pressure2/appointmentconfirmorder'
|
|
|
+import { BoilerAppointmentConfirmOrderEquipmentVO } from '@/api/pressure2/appointmentconfirmorder'
|
|
|
import { type CheckerItem } from '@/views/pressure2/components/CheckerSelect'
|
|
|
import dayjs from 'dayjs'
|
|
|
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
|
@@ -695,12 +693,14 @@ import FileUploadModal from '@/views/pressure2/orderConfirm/components/ImportFil
|
|
|
import { buildFileUrl } from '@/utils'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
import { Icon } from '@/components/Icon'
|
|
|
+import { cloneDeep } from 'lodash-es'
|
|
|
import {
|
|
|
PipeEquipmentApi,
|
|
|
PipeEquipmentDetailVO,
|
|
|
PipeEquipmentVO
|
|
|
} from "@/api/pressure2/pipeequipment";
|
|
|
import {PipeAcceptOrderApi} from "@/api/pressure2/pipeacceptorder";
|
|
|
+import {PipeAppointmentConfirmOrderApi} from "@/api/pressure2/pipeappointmentconfirmorder";
|
|
|
import {UserQualificationsApi} from "@/api/pressure2/userQualifications";
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
import {PressurePipeCheckTypeMap} from "../../../utils/constants";
|
|
|
@@ -1420,7 +1420,10 @@ const handleGenerateAcceptance = () => {
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
- ).then(() => {
|
|
|
+ ).then(async () => {
|
|
|
+ if(exceptionInfo.value.id){
|
|
|
+ await handleSaveException()
|
|
|
+ }
|
|
|
// 确认后提交
|
|
|
submitAcceptance()
|
|
|
}).catch(() => {
|
|
|
@@ -1483,6 +1486,12 @@ const submitAcceptance = async () => {
|
|
|
return acc;
|
|
|
}, [])
|
|
|
}
|
|
|
+ if(exceptionInfo.value.id){
|
|
|
+ submitData.boilerOrderExceptionSaveReqVO = cloneDeep({
|
|
|
+ ...exceptionInfo.value,
|
|
|
+ adjustEffectiveDate: unref(exceptionInfo).adjustEffectiveDate && unref(exceptionInfo).adjustEffectiveDate.split('-').map(item=>Number(item)),
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
// 调用API提交受理单
|
|
|
await PipeAcceptOrderApi.resubmitAcceptOrder(submitData)
|
|
|
@@ -1584,9 +1593,9 @@ const getExceptionItem = (field: string, fieldAttr: string)=>{
|
|
|
<div class="ml-10px">
|
|
|
<el-link href={fileUrl} underline={false} download target="_blank" type="primary">下载</el-link>
|
|
|
</div>
|
|
|
- {/* <div class="ml-10px">
|
|
|
+ <div class="ml-10px">
|
|
|
<el-button link type="danger" onClick={()=>handleRemove(field, fieldAttr)}>删除</el-button>
|
|
|
- </div> */}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</>
|
|
|
)
|
|
|
@@ -1601,15 +1610,15 @@ const getExceptionItem = (field: string, fieldAttr: string)=>{
|
|
|
}
|
|
|
|
|
|
const addExceptionInfo = () => {
|
|
|
- const orderId = formData.value.id || route.query?.id;
|
|
|
+ const orderId = orderDetail.value?.id || props.id;
|
|
|
if(!orderId) {
|
|
|
// ElMessage.error('请先保存订单')
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- BoilerAppointmentConfirmOrderApi.createExceptionInfo({
|
|
|
- orderId: formData.value.id || route.query?.id,
|
|
|
- orderType: 100,
|
|
|
+ PipeAppointmentConfirmOrderApi.createExceptionInfo({
|
|
|
+ orderId: orderDetail.value?.id || props.id,
|
|
|
+ orderType: 200,
|
|
|
}).then((res) => {
|
|
|
if(res) {
|
|
|
ElMessage.success('生成成功')
|
|
|
@@ -1626,7 +1635,7 @@ const deleteExceptionInfo = () => {
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
|
}).then(() => {
|
|
|
- BoilerAppointmentConfirmOrderApi.deleteExceptionInfo(exceptionInfo.value.id).then(res=>{
|
|
|
+ PipeAppointmentConfirmOrderApi.deleteExceptionInfo(exceptionInfo.value.id).then(res=>{
|
|
|
if(res) {
|
|
|
ElMessage.success('删除成功')
|
|
|
exceptionInfo.value = {}
|
|
|
@@ -1646,7 +1655,7 @@ const handleSaveException=()=>{
|
|
|
...exceptionInfo.value,
|
|
|
adjustEffectiveDate: adjustEffectiveDate && adjustEffectiveDate.split('-').map(item=>Number(item)),
|
|
|
}
|
|
|
- BoilerAppointmentConfirmOrderApi.updateExceptionInfo(params).then(res=>{
|
|
|
+ PipeAppointmentConfirmOrderApi.updateExceptionInfo(params).then(res=>{
|
|
|
resolve(res)
|
|
|
}).catch((error)=>{
|
|
|
reject(error)
|
|
|
@@ -1655,8 +1664,8 @@ const handleSaveException=()=>{
|
|
|
}
|
|
|
|
|
|
const getExceptionInfoList = () => {
|
|
|
- BoilerAppointmentConfirmOrderApi.getExceptionInfoList({
|
|
|
- orderId: formData.value.id || route.query?.id,
|
|
|
+ PipeAppointmentConfirmOrderApi.getExceptionInfoList({
|
|
|
+ orderId: orderDetail.value?.id || props.id,
|
|
|
}).then(res=>{
|
|
|
console.log('getExceptionInfoList:',res)
|
|
|
})
|
|
|
@@ -1664,7 +1673,7 @@ const getExceptionInfoList = () => {
|
|
|
|
|
|
|
|
|
const handleGetExceptionInfo = (id: string) => {
|
|
|
- BoilerAppointmentConfirmOrderApi.getExceptionInfo(id).then((res) => {
|
|
|
+ PipeAppointmentConfirmOrderApi.getExceptionInfo(id).then((res) => {
|
|
|
if(res) exceptionInfo.value = {
|
|
|
...res,
|
|
|
adjustEffectiveDate: res.adjustEffectiveDate?.join('-')
|