diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue index a6492f9..9ec6aaa 100644 --- a/src/components/ScanSampleDialog/index.vue +++ b/src/components/ScanSampleDialog/index.vue @@ -95,22 +95,24 @@ status: businessStatus.value, // 场景状态 strSet: [labelId], // 扫码集合 } - getReaderSampleList(param).then((res) => { - if (res && res.data && res.data.length) { - const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) - if (index === -1) { - list.value.push({ - ...res.data[0], - checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 - certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 - requireCertifications: 0, // 应出具证书数量 - }) + if (`${businessType.value}` && `${businessStatus.value}` && [labelId].length) { + getReaderSampleList(param).then((res) => { + if (res && res.data && res.data.length) { + const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) + if (index === -1) { + list.value.push({ + ...res.data[0], + checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 + certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 + requireCertifications: 0, // 应出具证书数量 + }) + } + else { + console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) + } } - else { - console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) - } - } - }) + }) + } } } @@ -139,9 +141,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue index a6492f9..9ec6aaa 100644 --- a/src/components/ScanSampleDialog/index.vue +++ b/src/components/ScanSampleDialog/index.vue @@ -95,22 +95,24 @@ status: businessStatus.value, // 场景状态 strSet: [labelId], // 扫码集合 } - getReaderSampleList(param).then((res) => { - if (res && res.data && res.data.length) { - const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) - if (index === -1) { - list.value.push({ - ...res.data[0], - checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 - certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 - requireCertifications: 0, // 应出具证书数量 - }) + if (`${businessType.value}` && `${businessStatus.value}` && [labelId].length) { + getReaderSampleList(param).then((res) => { + if (res && res.data && res.data.length) { + const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) + if (index === -1) { + list.value.push({ + ...res.data[0], + checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 + certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 + requireCertifications: 0, // 应出具证书数量 + }) + } + else { + console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) + } } - else { - console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) - } - } - }) + }) + } } } @@ -139,9 +141,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue index 81511a6..8fc1825 100644 --- a/src/components/scanEquipmentDialog/index.vue +++ b/src/components/scanEquipmentDialog/index.vue @@ -137,9 +137,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue index a6492f9..9ec6aaa 100644 --- a/src/components/ScanSampleDialog/index.vue +++ b/src/components/ScanSampleDialog/index.vue @@ -95,22 +95,24 @@ status: businessStatus.value, // 场景状态 strSet: [labelId], // 扫码集合 } - getReaderSampleList(param).then((res) => { - if (res && res.data && res.data.length) { - const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) - if (index === -1) { - list.value.push({ - ...res.data[0], - checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 - certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 - requireCertifications: 0, // 应出具证书数量 - }) + if (`${businessType.value}` && `${businessStatus.value}` && [labelId].length) { + getReaderSampleList(param).then((res) => { + if (res && res.data && res.data.length) { + const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) + if (index === -1) { + list.value.push({ + ...res.data[0], + checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 + certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 + requireCertifications: 0, // 应出具证书数量 + }) + } + else { + console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) + } } - else { - console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) - } - } - }) + }) + } } } @@ -139,9 +141,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue index 81511a6..8fc1825 100644 --- a/src/components/scanEquipmentDialog/index.vue +++ b/src/components/scanEquipmentDialog/index.vue @@ -137,9 +137,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts index fdaf528..3e3f3a8 100644 --- a/src/store/modules/websocket.ts +++ b/src/store/modules/websocket.ts @@ -99,6 +99,7 @@ this.wsIsReconnect = false if (this.websocket) { this.websocket.close() + this.messageList = [] ElMessage.success('websocket已断开') } if (this.wsPingTimer) { @@ -110,6 +111,7 @@ this.wsReconnectTimer = null } this.wsStatus = false + this.messageList = [] }, // websocket重连 reConnectWebsocket() { diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue index a6492f9..9ec6aaa 100644 --- a/src/components/ScanSampleDialog/index.vue +++ b/src/components/ScanSampleDialog/index.vue @@ -95,22 +95,24 @@ status: businessStatus.value, // 场景状态 strSet: [labelId], // 扫码集合 } - getReaderSampleList(param).then((res) => { - if (res && res.data && res.data.length) { - const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) - if (index === -1) { - list.value.push({ - ...res.data[0], - checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 - certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 - requireCertifications: 0, // 应出具证书数量 - }) + if (`${businessType.value}` && `${businessStatus.value}` && [labelId].length) { + getReaderSampleList(param).then((res) => { + if (res && res.data && res.data.length) { + const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) + if (index === -1) { + list.value.push({ + ...res.data[0], + checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 + certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 + requireCertifications: 0, // 应出具证书数量 + }) + } + else { + console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) + } } - else { - console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) - } - } - }) + }) + } } } @@ -139,9 +141,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue index 81511a6..8fc1825 100644 --- a/src/components/scanEquipmentDialog/index.vue +++ b/src/components/scanEquipmentDialog/index.vue @@ -137,9 +137,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts index fdaf528..3e3f3a8 100644 --- a/src/store/modules/websocket.ts +++ b/src/store/modules/websocket.ts @@ -99,6 +99,7 @@ this.wsIsReconnect = false if (this.websocket) { this.websocket.close() + this.messageList = [] ElMessage.success('websocket已断开') } if (this.wsPingTimer) { @@ -110,6 +111,7 @@ this.wsReconnectTimer = null } this.wsStatus = false + this.messageList = [] }, // websocket重连 reConnectWebsocket() { diff --git a/src/views/dataManagement/indexBak.vue b/src/views/dataManagement/indexBak.vue new file mode 100644 index 0000000..9876bc8 --- /dev/null +++ b/src/views/dataManagement/indexBak.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue index a6492f9..9ec6aaa 100644 --- a/src/components/ScanSampleDialog/index.vue +++ b/src/components/ScanSampleDialog/index.vue @@ -95,22 +95,24 @@ status: businessStatus.value, // 场景状态 strSet: [labelId], // 扫码集合 } - getReaderSampleList(param).then((res) => { - if (res && res.data && res.data.length) { - const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) - if (index === -1) { - list.value.push({ - ...res.data[0], - checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 - certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 - requireCertifications: 0, // 应出具证书数量 - }) + if (`${businessType.value}` && `${businessStatus.value}` && [labelId].length) { + getReaderSampleList(param).then((res) => { + if (res && res.data && res.data.length) { + const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) + if (index === -1) { + list.value.push({ + ...res.data[0], + checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 + certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 + requireCertifications: 0, // 应出具证书数量 + }) + } + else { + console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) + } } - else { - console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) - } - } - }) + }) + } } } @@ -139,9 +141,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue index 81511a6..8fc1825 100644 --- a/src/components/scanEquipmentDialog/index.vue +++ b/src/components/scanEquipmentDialog/index.vue @@ -137,9 +137,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts index fdaf528..3e3f3a8 100644 --- a/src/store/modules/websocket.ts +++ b/src/store/modules/websocket.ts @@ -99,6 +99,7 @@ this.wsIsReconnect = false if (this.websocket) { this.websocket.close() + this.messageList = [] ElMessage.success('websocket已断开') } if (this.wsPingTimer) { @@ -110,6 +111,7 @@ this.wsReconnectTimer = null } this.wsStatus = false + this.messageList = [] }, // websocket重连 reConnectWebsocket() { diff --git a/src/views/dataManagement/indexBak.vue b/src/views/dataManagement/indexBak.vue new file mode 100644 index 0000000..9876bc8 --- /dev/null +++ b/src/views/dataManagement/indexBak.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/resource/customer/contract/list.vue b/src/views/resource/customer/contract/list.vue index b89aa9b..9e62a14 100644 --- a/src/views/resource/customer/contract/list.vue +++ b/src/views/resource/customer/contract/list.vue @@ -5,7 +5,6 @@ import type { IList, IListQuery } from './contract-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import type { IMenu } from '@/components/buttonBox/buttonBox' -import type { IDictType } from '@/commonInterface/resource-interface' import { SCHEDULE } from '@/utils/scheduleDict' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { approvalDelete, cancelApproval, draftDelete, getCustomerContractList, refuseApproval } from '@/api/resource/contract' diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue index a6492f9..9ec6aaa 100644 --- a/src/components/ScanSampleDialog/index.vue +++ b/src/components/ScanSampleDialog/index.vue @@ -95,22 +95,24 @@ status: businessStatus.value, // 场景状态 strSet: [labelId], // 扫码集合 } - getReaderSampleList(param).then((res) => { - if (res && res.data && res.data.length) { - const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) - if (index === -1) { - list.value.push({ - ...res.data[0], - checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 - certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 - requireCertifications: 0, // 应出具证书数量 - }) + if (`${businessType.value}` && `${businessStatus.value}` && [labelId].length) { + getReaderSampleList(param).then((res) => { + if (res && res.data && res.data.length) { + const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) + if (index === -1) { + list.value.push({ + ...res.data[0], + checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 + certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 + requireCertifications: 0, // 应出具证书数量 + }) + } + else { + console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) + } } - else { - console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) - } - } - }) + }) + } } } @@ -139,9 +141,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue index 81511a6..8fc1825 100644 --- a/src/components/scanEquipmentDialog/index.vue +++ b/src/components/scanEquipmentDialog/index.vue @@ -137,9 +137,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts index fdaf528..3e3f3a8 100644 --- a/src/store/modules/websocket.ts +++ b/src/store/modules/websocket.ts @@ -99,6 +99,7 @@ this.wsIsReconnect = false if (this.websocket) { this.websocket.close() + this.messageList = [] ElMessage.success('websocket已断开') } if (this.wsPingTimer) { @@ -110,6 +111,7 @@ this.wsReconnectTimer = null } this.wsStatus = false + this.messageList = [] }, // websocket重连 reConnectWebsocket() { diff --git a/src/views/dataManagement/indexBak.vue b/src/views/dataManagement/indexBak.vue new file mode 100644 index 0000000..9876bc8 --- /dev/null +++ b/src/views/dataManagement/indexBak.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/resource/customer/contract/list.vue b/src/views/resource/customer/contract/list.vue index b89aa9b..9e62a14 100644 --- a/src/views/resource/customer/contract/list.vue +++ b/src/views/resource/customer/contract/list.vue @@ -5,7 +5,6 @@ import type { IList, IListQuery } from './contract-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import type { IMenu } from '@/components/buttonBox/buttonBox' -import type { IDictType } from '@/commonInterface/resource-interface' import { SCHEDULE } from '@/utils/scheduleDict' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { approvalDelete, cancelApproval, draftDelete, getCustomerContractList, refuseApproval } from '@/api/resource/contract' diff --git a/src/views/resource/file/change/dialog/selectSysFileDialog.vue b/src/views/resource/file/change/dialog/selectSysFileDialog.vue index 2be24d3..ebcde9d 100644 --- a/src/views/resource/file/change/dialog/selectSysFileDialog.vue +++ b/src/views/resource/file/change/dialog/selectSysFileDialog.vue @@ -194,6 +194,9 @@ + + + diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue index a6492f9..9ec6aaa 100644 --- a/src/components/ScanSampleDialog/index.vue +++ b/src/components/ScanSampleDialog/index.vue @@ -95,22 +95,24 @@ status: businessStatus.value, // 场景状态 strSet: [labelId], // 扫码集合 } - getReaderSampleList(param).then((res) => { - if (res && res.data && res.data.length) { - const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) - if (index === -1) { - list.value.push({ - ...res.data[0], - checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 - certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 - requireCertifications: 0, // 应出具证书数量 - }) + if (`${businessType.value}` && `${businessStatus.value}` && [labelId].length) { + getReaderSampleList(param).then((res) => { + if (res && res.data && res.data.length) { + const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) + if (index === -1) { + list.value.push({ + ...res.data[0], + checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 + certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 + requireCertifications: 0, // 应出具证书数量 + }) + } + else { + console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) + } } - else { - console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) - } - } - }) + }) + } } } @@ -139,9 +141,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue index 81511a6..8fc1825 100644 --- a/src/components/scanEquipmentDialog/index.vue +++ b/src/components/scanEquipmentDialog/index.vue @@ -137,9 +137,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts index fdaf528..3e3f3a8 100644 --- a/src/store/modules/websocket.ts +++ b/src/store/modules/websocket.ts @@ -99,6 +99,7 @@ this.wsIsReconnect = false if (this.websocket) { this.websocket.close() + this.messageList = [] ElMessage.success('websocket已断开') } if (this.wsPingTimer) { @@ -110,6 +111,7 @@ this.wsReconnectTimer = null } this.wsStatus = false + this.messageList = [] }, // websocket重连 reConnectWebsocket() { diff --git a/src/views/dataManagement/indexBak.vue b/src/views/dataManagement/indexBak.vue new file mode 100644 index 0000000..9876bc8 --- /dev/null +++ b/src/views/dataManagement/indexBak.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/resource/customer/contract/list.vue b/src/views/resource/customer/contract/list.vue index b89aa9b..9e62a14 100644 --- a/src/views/resource/customer/contract/list.vue +++ b/src/views/resource/customer/contract/list.vue @@ -5,7 +5,6 @@ import type { IList, IListQuery } from './contract-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import type { IMenu } from '@/components/buttonBox/buttonBox' -import type { IDictType } from '@/commonInterface/resource-interface' import { SCHEDULE } from '@/utils/scheduleDict' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { approvalDelete, cancelApproval, draftDelete, getCustomerContractList, refuseApproval } from '@/api/resource/contract' diff --git a/src/views/resource/file/change/dialog/selectSysFileDialog.vue b/src/views/resource/file/change/dialog/selectSysFileDialog.vue index 2be24d3..ebcde9d 100644 --- a/src/views/resource/file/change/dialog/selectSysFileDialog.vue +++ b/src/views/resource/file/change/dialog/selectSysFileDialog.vue @@ -194,6 +194,9 @@ + + + diff --git a/src/views/resource/file/grantNotice/detail.vue b/src/views/resource/file/grantNotice/detail.vue index 413cce3..131595a 100644 --- a/src/views/resource/file/grantNotice/detail.vue +++ b/src/views/resource/file/grantNotice/detail.vue @@ -5,6 +5,7 @@ import type { IFileGrandNotice, IFileNoticeInfo } from './notice-interface' import selectFileTypeDialog from './dialog/selectFileTypeDialog.vue' import selectCustomerExamineList from './dialog/selectCustomerExamineList.vue' +import selectCustomerContratList from './dialog/selectCustomerContratList.vue' import selectFileApprovalDialog from './dialog/selectFileApprovalDialog.vue' import selectMethodDialog from '@/views/resource/file/methodConfirm/selectMethodDialog.vue' import type { IDictType } from '@/commonInterface/resource-interface' @@ -95,58 +96,54 @@ { text: '备注', value: 'remark', align: 'center' }, ]) // 表头 const selectCustomerExamineListRef = ref() // 选择要求、委托书及合同评审表组件ref +const selectCustomerContratListRef = ref() // 选择合同执行变更登记表 const selectFileApprovalDialogRef = ref() // 文件审批组件ref const selectMethodDialogRef = ref() // 选择测试校准检定方法组件ref // 选好文件的类型 const confirmSelectFileType = (type: string) => { console.log('选择的添加文件的类型', type) switch (type) { - case '1': // 测试校准检定方法 - selectMethodDialogRef.value.initDialog() + case '1': // 体系文件 + selectFileApprovalDialogRef.value.initDialog() break - case '2': - ElMessage.info('敬请期待') + case '2': // 现行测试校准检定方法 + selectMethodDialogRef.value.initDialog() break - case '3': // 要求、委托书及合同评审表 + case '3': // 合同执行变更登记表 + selectCustomerContratListRef.value.initDialog() + break + case '4': // 要求、委托书及合同评审表 selectCustomerExamineListRef.value.initDialog() break - case '4': + case '5': // 溯源链变更管理 ElMessage.info('敬请期待') break - case '5': // 体系文件 - selectFileApprovalDialogRef.value.initDialog() - break } } // 选好文件 const confirmSelectFile = (listParam: any, type: string) => { - let title = '体系文件' - let grantType = '1' + let title = '' + const grantType = type switch (type) { case '1': - title = '现行测试校准检定方法' - grantType = '2' + title = '体系文件' break case '2': - title = '溯源链变更管理' - grantType = '5' + title = '现行测试校准检定方法' break - case '3': // 要求委托书及合同评审表 - title = '要求、委托书及合同评审表' - grantType = '4' + case '3': + title = '合同执行变更登记表' break case '4': - title = '合同执行变更登记表' - grantType = '3' + title = '要求、委托书及合同评审表' break case '5': - title = '体系文件' - grantType = '1' + title = '溯源链变更管理' break } - if (type === '5') { + if (type === '1') { // 体系文件 const listIds = listParam.map((item: { id: string }) => item.id) grantNoticeForm.value.fileApprovalCodes = listParam.map((item: { approvalNo: string }) => item.approvalNo).join(';') const requestList = listIds.map((id: string) => fetchFileApprovalDetail(id)) @@ -195,8 +192,8 @@ groupCodeName: item.groupCodeName, // 部门名称 fileNo: item.formNo || item.fileNo, // 文件编号 fileName: item.formName || item.fileName, // 文件名称 - fileVersion: type === '3' || type === '2' ? '/' : item.fileVersion, // 版本号 - pdfUrl: type === '3' ? '/' : type === '2' ? (item.file || '/') : item.pdfUrl, // 文件附件 + fileVersion: type === '2' || type === '3' || type === '4' ? '/' : item.fileVersion, // 版本号 + pdfUrl: type === '2' ? '/' : type === '4' ? (item.file || '/') : type === '3' ? item.contractExecutionFile : item.pdfUrl, // 文件附件 remark: '', // 备注 grantType, // 文件发放类型 grantTypeName: title, // 文件发放类型名称 @@ -799,7 +796,7 @@ - + radioChangeHandler(val)"> @@ -848,7 +845,7 @@ - + 选择 @@ -935,10 +932,12 @@ + + confirmSelectFile(list, '3')" /> - confirmSelectFile(list, '3')" /> + confirmSelectFile(list, '4')" /> - confirmSelectFile(list, '5')" /> + confirmSelectFile(list, '1')" /> confirmSelectFile(listParam, '2')" /> diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue index a6492f9..9ec6aaa 100644 --- a/src/components/ScanSampleDialog/index.vue +++ b/src/components/ScanSampleDialog/index.vue @@ -95,22 +95,24 @@ status: businessStatus.value, // 场景状态 strSet: [labelId], // 扫码集合 } - getReaderSampleList(param).then((res) => { - if (res && res.data && res.data.length) { - const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) - if (index === -1) { - list.value.push({ - ...res.data[0], - checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 - certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 - requireCertifications: 0, // 应出具证书数量 - }) + if (`${businessType.value}` && `${businessStatus.value}` && [labelId].length) { + getReaderSampleList(param).then((res) => { + if (res && res.data && res.data.length) { + const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) + if (index === -1) { + list.value.push({ + ...res.data[0], + checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 + certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 + requireCertifications: 0, // 应出具证书数量 + }) + } + else { + console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) + } } - else { - console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) - } - } - }) + }) + } } } @@ -139,9 +141,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue index 81511a6..8fc1825 100644 --- a/src/components/scanEquipmentDialog/index.vue +++ b/src/components/scanEquipmentDialog/index.vue @@ -137,9 +137,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts index fdaf528..3e3f3a8 100644 --- a/src/store/modules/websocket.ts +++ b/src/store/modules/websocket.ts @@ -99,6 +99,7 @@ this.wsIsReconnect = false if (this.websocket) { this.websocket.close() + this.messageList = [] ElMessage.success('websocket已断开') } if (this.wsPingTimer) { @@ -110,6 +111,7 @@ this.wsReconnectTimer = null } this.wsStatus = false + this.messageList = [] }, // websocket重连 reConnectWebsocket() { diff --git a/src/views/dataManagement/indexBak.vue b/src/views/dataManagement/indexBak.vue new file mode 100644 index 0000000..9876bc8 --- /dev/null +++ b/src/views/dataManagement/indexBak.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/resource/customer/contract/list.vue b/src/views/resource/customer/contract/list.vue index b89aa9b..9e62a14 100644 --- a/src/views/resource/customer/contract/list.vue +++ b/src/views/resource/customer/contract/list.vue @@ -5,7 +5,6 @@ import type { IList, IListQuery } from './contract-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import type { IMenu } from '@/components/buttonBox/buttonBox' -import type { IDictType } from '@/commonInterface/resource-interface' import { SCHEDULE } from '@/utils/scheduleDict' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { approvalDelete, cancelApproval, draftDelete, getCustomerContractList, refuseApproval } from '@/api/resource/contract' diff --git a/src/views/resource/file/change/dialog/selectSysFileDialog.vue b/src/views/resource/file/change/dialog/selectSysFileDialog.vue index 2be24d3..ebcde9d 100644 --- a/src/views/resource/file/change/dialog/selectSysFileDialog.vue +++ b/src/views/resource/file/change/dialog/selectSysFileDialog.vue @@ -194,6 +194,9 @@ + + + diff --git a/src/views/resource/file/grantNotice/detail.vue b/src/views/resource/file/grantNotice/detail.vue index 413cce3..131595a 100644 --- a/src/views/resource/file/grantNotice/detail.vue +++ b/src/views/resource/file/grantNotice/detail.vue @@ -5,6 +5,7 @@ import type { IFileGrandNotice, IFileNoticeInfo } from './notice-interface' import selectFileTypeDialog from './dialog/selectFileTypeDialog.vue' import selectCustomerExamineList from './dialog/selectCustomerExamineList.vue' +import selectCustomerContratList from './dialog/selectCustomerContratList.vue' import selectFileApprovalDialog from './dialog/selectFileApprovalDialog.vue' import selectMethodDialog from '@/views/resource/file/methodConfirm/selectMethodDialog.vue' import type { IDictType } from '@/commonInterface/resource-interface' @@ -95,58 +96,54 @@ { text: '备注', value: 'remark', align: 'center' }, ]) // 表头 const selectCustomerExamineListRef = ref() // 选择要求、委托书及合同评审表组件ref +const selectCustomerContratListRef = ref() // 选择合同执行变更登记表 const selectFileApprovalDialogRef = ref() // 文件审批组件ref const selectMethodDialogRef = ref() // 选择测试校准检定方法组件ref // 选好文件的类型 const confirmSelectFileType = (type: string) => { console.log('选择的添加文件的类型', type) switch (type) { - case '1': // 测试校准检定方法 - selectMethodDialogRef.value.initDialog() + case '1': // 体系文件 + selectFileApprovalDialogRef.value.initDialog() break - case '2': - ElMessage.info('敬请期待') + case '2': // 现行测试校准检定方法 + selectMethodDialogRef.value.initDialog() break - case '3': // 要求、委托书及合同评审表 + case '3': // 合同执行变更登记表 + selectCustomerContratListRef.value.initDialog() + break + case '4': // 要求、委托书及合同评审表 selectCustomerExamineListRef.value.initDialog() break - case '4': + case '5': // 溯源链变更管理 ElMessage.info('敬请期待') break - case '5': // 体系文件 - selectFileApprovalDialogRef.value.initDialog() - break } } // 选好文件 const confirmSelectFile = (listParam: any, type: string) => { - let title = '体系文件' - let grantType = '1' + let title = '' + const grantType = type switch (type) { case '1': - title = '现行测试校准检定方法' - grantType = '2' + title = '体系文件' break case '2': - title = '溯源链变更管理' - grantType = '5' + title = '现行测试校准检定方法' break - case '3': // 要求委托书及合同评审表 - title = '要求、委托书及合同评审表' - grantType = '4' + case '3': + title = '合同执行变更登记表' break case '4': - title = '合同执行变更登记表' - grantType = '3' + title = '要求、委托书及合同评审表' break case '5': - title = '体系文件' - grantType = '1' + title = '溯源链变更管理' break } - if (type === '5') { + if (type === '1') { // 体系文件 const listIds = listParam.map((item: { id: string }) => item.id) grantNoticeForm.value.fileApprovalCodes = listParam.map((item: { approvalNo: string }) => item.approvalNo).join(';') const requestList = listIds.map((id: string) => fetchFileApprovalDetail(id)) @@ -195,8 +192,8 @@ groupCodeName: item.groupCodeName, // 部门名称 fileNo: item.formNo || item.fileNo, // 文件编号 fileName: item.formName || item.fileName, // 文件名称 - fileVersion: type === '3' || type === '2' ? '/' : item.fileVersion, // 版本号 - pdfUrl: type === '3' ? '/' : type === '2' ? (item.file || '/') : item.pdfUrl, // 文件附件 + fileVersion: type === '2' || type === '3' || type === '4' ? '/' : item.fileVersion, // 版本号 + pdfUrl: type === '2' ? '/' : type === '4' ? (item.file || '/') : type === '3' ? item.contractExecutionFile : item.pdfUrl, // 文件附件 remark: '', // 备注 grantType, // 文件发放类型 grantTypeName: title, // 文件发放类型名称 @@ -799,7 +796,7 @@ - + radioChangeHandler(val)"> @@ -848,7 +845,7 @@ - + 选择 @@ -935,10 +932,12 @@ + + confirmSelectFile(list, '3')" /> - confirmSelectFile(list, '3')" /> + confirmSelectFile(list, '4')" /> - confirmSelectFile(list, '5')" /> + confirmSelectFile(list, '1')" /> confirmSelectFile(listParam, '2')" /> diff --git a/src/views/resource/file/grantNotice/dialog/selectCustomerContratList.vue b/src/views/resource/file/grantNotice/dialog/selectCustomerContratList.vue new file mode 100644 index 0000000..56fb34d --- /dev/null +++ b/src/views/resource/file/grantNotice/dialog/selectCustomerContratList.vue @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/components/QRcodeDeviceDialog/index.vue b/src/components/QRcodeDeviceDialog/index.vue index 115a364..f91f7f7 100644 --- a/src/components/QRcodeDeviceDialog/index.vue +++ b/src/components/QRcodeDeviceDialog/index.vue @@ -32,7 +32,7 @@ setTimeout(() => { // deviceDetaiRef.value.loading = true if (code.trim()) { - if (code) { + if (code && `${businessType.value}` && `${businessStatus.value}`) { tableLoading.value = true const param = { customerId: customerId.value, // 委托方id diff --git a/src/components/ScanSampleDialog/index.vue b/src/components/ScanSampleDialog/index.vue index a6492f9..9ec6aaa 100644 --- a/src/components/ScanSampleDialog/index.vue +++ b/src/components/ScanSampleDialog/index.vue @@ -95,22 +95,24 @@ status: businessStatus.value, // 场景状态 strSet: [labelId], // 扫码集合 } - getReaderSampleList(param).then((res) => { - if (res && res.data && res.data.length) { - const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) - if (index === -1) { - list.value.push({ - ...res.data[0], - checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 - certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 - requireCertifications: 0, // 应出具证书数量 - }) + if (`${businessType.value}` && `${businessStatus.value}` && [labelId].length) { + getReaderSampleList(param).then((res) => { + if (res && res.data && res.data.length) { + const index = list.value.findIndex((item: { sampleId: string }) => item.sampleId === res.data[0].sampleId) + if (index === -1) { + list.value.push({ + ...res.data[0], + checkDate: res.data[0].checkDate ? dayjs(res.data[0].checkDate).format('YYYY-MM-DD') : res.data[0].checkDate, // 检定日期 + certificateValid: res.data[0].certificateValid ? dayjs(res.data[0].certificateValid).format('YYYY-MM-DD') : res.data[0].certificateValid, // 证书有效期 + requireCertifications: 0, // 应出具证书数量 + }) + } + else { + console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) + } } - else { - console.log(`${list.value[index].sampleName}${list.value[index].sampleModel}${list.value[index].manufactureNo}已经添加过`) - } - } - }) + }) + } } } @@ -139,9 +141,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/components/scanEquipmentDialog/index.vue b/src/components/scanEquipmentDialog/index.vue index 81511a6..8fc1825 100644 --- a/src/components/scanEquipmentDialog/index.vue +++ b/src/components/scanEquipmentDialog/index.vue @@ -137,9 +137,7 @@ // 断开websocket function stopWebScket() { - if (websocket && websocket.wsStatus) { - websocket.destroyWebSocket() - } + websocket.destroyWebSocket() } // 重连 const reStartWebScket = () => { diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts index fdaf528..3e3f3a8 100644 --- a/src/store/modules/websocket.ts +++ b/src/store/modules/websocket.ts @@ -99,6 +99,7 @@ this.wsIsReconnect = false if (this.websocket) { this.websocket.close() + this.messageList = [] ElMessage.success('websocket已断开') } if (this.wsPingTimer) { @@ -110,6 +111,7 @@ this.wsReconnectTimer = null } this.wsStatus = false + this.messageList = [] }, // websocket重连 reConnectWebsocket() { diff --git a/src/views/dataManagement/indexBak.vue b/src/views/dataManagement/indexBak.vue new file mode 100644 index 0000000..9876bc8 --- /dev/null +++ b/src/views/dataManagement/indexBak.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/resource/customer/contract/list.vue b/src/views/resource/customer/contract/list.vue index b89aa9b..9e62a14 100644 --- a/src/views/resource/customer/contract/list.vue +++ b/src/views/resource/customer/contract/list.vue @@ -5,7 +5,6 @@ import type { IList, IListQuery } from './contract-interface' import type { TableColumn } from '@/components/NormalTable/table_interface' import type { IMenu } from '@/components/buttonBox/buttonBox' -import type { IDictType } from '@/commonInterface/resource-interface' import { SCHEDULE } from '@/utils/scheduleDict' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { approvalDelete, cancelApproval, draftDelete, getCustomerContractList, refuseApproval } from '@/api/resource/contract' diff --git a/src/views/resource/file/change/dialog/selectSysFileDialog.vue b/src/views/resource/file/change/dialog/selectSysFileDialog.vue index 2be24d3..ebcde9d 100644 --- a/src/views/resource/file/change/dialog/selectSysFileDialog.vue +++ b/src/views/resource/file/change/dialog/selectSysFileDialog.vue @@ -194,6 +194,9 @@ + + + diff --git a/src/views/resource/file/grantNotice/detail.vue b/src/views/resource/file/grantNotice/detail.vue index 413cce3..131595a 100644 --- a/src/views/resource/file/grantNotice/detail.vue +++ b/src/views/resource/file/grantNotice/detail.vue @@ -5,6 +5,7 @@ import type { IFileGrandNotice, IFileNoticeInfo } from './notice-interface' import selectFileTypeDialog from './dialog/selectFileTypeDialog.vue' import selectCustomerExamineList from './dialog/selectCustomerExamineList.vue' +import selectCustomerContratList from './dialog/selectCustomerContratList.vue' import selectFileApprovalDialog from './dialog/selectFileApprovalDialog.vue' import selectMethodDialog from '@/views/resource/file/methodConfirm/selectMethodDialog.vue' import type { IDictType } from '@/commonInterface/resource-interface' @@ -95,58 +96,54 @@ { text: '备注', value: 'remark', align: 'center' }, ]) // 表头 const selectCustomerExamineListRef = ref() // 选择要求、委托书及合同评审表组件ref +const selectCustomerContratListRef = ref() // 选择合同执行变更登记表 const selectFileApprovalDialogRef = ref() // 文件审批组件ref const selectMethodDialogRef = ref() // 选择测试校准检定方法组件ref // 选好文件的类型 const confirmSelectFileType = (type: string) => { console.log('选择的添加文件的类型', type) switch (type) { - case '1': // 测试校准检定方法 - selectMethodDialogRef.value.initDialog() + case '1': // 体系文件 + selectFileApprovalDialogRef.value.initDialog() break - case '2': - ElMessage.info('敬请期待') + case '2': // 现行测试校准检定方法 + selectMethodDialogRef.value.initDialog() break - case '3': // 要求、委托书及合同评审表 + case '3': // 合同执行变更登记表 + selectCustomerContratListRef.value.initDialog() + break + case '4': // 要求、委托书及合同评审表 selectCustomerExamineListRef.value.initDialog() break - case '4': + case '5': // 溯源链变更管理 ElMessage.info('敬请期待') break - case '5': // 体系文件 - selectFileApprovalDialogRef.value.initDialog() - break } } // 选好文件 const confirmSelectFile = (listParam: any, type: string) => { - let title = '体系文件' - let grantType = '1' + let title = '' + const grantType = type switch (type) { case '1': - title = '现行测试校准检定方法' - grantType = '2' + title = '体系文件' break case '2': - title = '溯源链变更管理' - grantType = '5' + title = '现行测试校准检定方法' break - case '3': // 要求委托书及合同评审表 - title = '要求、委托书及合同评审表' - grantType = '4' + case '3': + title = '合同执行变更登记表' break case '4': - title = '合同执行变更登记表' - grantType = '3' + title = '要求、委托书及合同评审表' break case '5': - title = '体系文件' - grantType = '1' + title = '溯源链变更管理' break } - if (type === '5') { + if (type === '1') { // 体系文件 const listIds = listParam.map((item: { id: string }) => item.id) grantNoticeForm.value.fileApprovalCodes = listParam.map((item: { approvalNo: string }) => item.approvalNo).join(';') const requestList = listIds.map((id: string) => fetchFileApprovalDetail(id)) @@ -195,8 +192,8 @@ groupCodeName: item.groupCodeName, // 部门名称 fileNo: item.formNo || item.fileNo, // 文件编号 fileName: item.formName || item.fileName, // 文件名称 - fileVersion: type === '3' || type === '2' ? '/' : item.fileVersion, // 版本号 - pdfUrl: type === '3' ? '/' : type === '2' ? (item.file || '/') : item.pdfUrl, // 文件附件 + fileVersion: type === '2' || type === '3' || type === '4' ? '/' : item.fileVersion, // 版本号 + pdfUrl: type === '2' ? '/' : type === '4' ? (item.file || '/') : type === '3' ? item.contractExecutionFile : item.pdfUrl, // 文件附件 remark: '', // 备注 grantType, // 文件发放类型 grantTypeName: title, // 文件发放类型名称 @@ -799,7 +796,7 @@ - + radioChangeHandler(val)"> @@ -848,7 +845,7 @@ - + 选择 @@ -935,10 +932,12 @@ + + confirmSelectFile(list, '3')" /> - confirmSelectFile(list, '3')" /> + confirmSelectFile(list, '4')" /> - confirmSelectFile(list, '5')" /> + confirmSelectFile(list, '1')" /> confirmSelectFile(listParam, '2')" /> diff --git a/src/views/resource/file/grantNotice/dialog/selectCustomerContratList.vue b/src/views/resource/file/grantNotice/dialog/selectCustomerContratList.vue new file mode 100644 index 0000000..56fb34d --- /dev/null +++ b/src/views/resource/file/grantNotice/dialog/selectCustomerContratList.vue @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} + + + + + + + + 确认 + + 取消 + + + + + + + diff --git a/src/views/resource/file/grantNotice/dialog/selectFileTypeDialog.vue b/src/views/resource/file/grantNotice/dialog/selectFileTypeDialog.vue index fd2a264..23a0842 100644 --- a/src/views/resource/file/grantNotice/dialog/selectFileTypeDialog.vue +++ b/src/views/resource/file/grantNotice/dialog/selectFileTypeDialog.vue @@ -7,10 +7,10 @@ const user = useUserStore() // 用户信息 const dialogVisible = ref(false) // 弹窗显示状态 const radioMenus = ref([ - { name: '现行测试校准检定方法', value: '1' }, - { name: '溯源链变更管理', value: '2' }, - { name: '要求、委托书及合同评审表', value: '3' }, - { name: '合同执行变更登记表', value: '4' }, + { name: '现行测试校准检定方法', value: '2' }, + { name: '溯源链变更管理', value: '5' }, + { name: '要求、委托书及合同评审表', value: '4' }, + { name: '合同执行变更登记表', value: '3' }, ]) const current = ref('1')