diff --git a/src/api/finance/businessSettlement.ts b/src/api/finance/businessSettlement.ts index 530043b..95727f5 100644 --- a/src/api/finance/businessSettlement.ts +++ b/src/api/finance/businessSettlement.ts @@ -58,7 +58,7 @@ } // 获取流 -export function getStream(data: { id: string; settlementType: string }) { +export function getStream(data: { ids?: string[] ;id?: string; settlementType: string }) { return request({ url: '/finance/settlement/form/export', method: 'post', diff --git a/src/api/finance/businessSettlement.ts b/src/api/finance/businessSettlement.ts index 530043b..95727f5 100644 --- a/src/api/finance/businessSettlement.ts +++ b/src/api/finance/businessSettlement.ts @@ -58,7 +58,7 @@ } // 获取流 -export function getStream(data: { id: string; settlementType: string }) { +export function getStream(data: { ids?: string[] ;id?: string; settlementType: string }) { return request({ url: '/finance/settlement/form/export', method: 'post', diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index d3ebf61..de8a874 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -14,6 +14,7 @@ }) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 +const signCategory = ref('') // 签章类型 // 查询参数 const searchQuery = reactive({ signNo: '', // 编号 @@ -25,6 +26,7 @@ limit: 5, offset: 1, signType: '', + signCategory: '', }) // 查询参数 const loadingTable = ref(false) // loading const list = ref([]) // 表格参数 @@ -32,22 +34,35 @@ const columns = ref([ { text: '签章编号', value: 'signNo', align: 'center', width: '180' }, { text: '签章名称', value: 'signName', align: 'center', width: '150' }, + { text: '签章类型', value: 'signCategoryName', align: 'center' }, { text: '签章负责人', value: 'signDirector', align: 'center', width: '100' }, { text: '创建时间', value: 'createTime', align: 'center', width: '250' }, { text: '描述', value: 'signDesc', align: 'center' }, ]) const checkoutList = ref([]) // 多选选中参数 +const signCategoryDict = ref({}) as any // 签章类型 +const signCategoryList = ref({}) as any // 签章类型 // 获取类型 const getType = async () => { const res = await getDictByCode('signType') searchQuery.signType = res.data.filter((item: typeofSign) => item.name === '签章')[0].value + const resSignCategory = await getDictByCode('signCategory') + signCategoryList.value = resSignCategory.data + resSignCategory.data.forEach((item: { value: string; name: string }) => { + signCategoryDict.value[`${item.value}`] = item.name + }) } // 获取数据列表 const getList = () => { loadingTable.value = true listPageApi(searchQuery).then((res) => { if (res.code === 200) { - list.value = res.data.rows + list.value = res.data.rows.map((item: { signCategory: string }) => { + return { + ...item, + signCategoryName: item.signCategory ? signCategoryDict.value[item.signCategory] : item.signCategory, // 签章类型 + } + }) total.value = res.data.total } loadingTable.value = false @@ -78,6 +93,7 @@ searchQuery.signDirector = '' searchQuery.signName = '' searchQuery.signNo = '' + searchQuery.signCategory = '' getList() } @@ -104,8 +120,10 @@ } // 初始化 -const initDialog = () => { +const initDialog = (signCategoryParam: string) => { dialogFormVisible.value = true + signCategory.value = signCategoryParam // 签章类型 + searchQuery.signCategory = signCategory.value // 签章类型 getType().then((_) => { getList() }) @@ -124,6 +142,11 @@ + + + + + diff --git a/src/api/finance/businessSettlement.ts b/src/api/finance/businessSettlement.ts index 530043b..95727f5 100644 --- a/src/api/finance/businessSettlement.ts +++ b/src/api/finance/businessSettlement.ts @@ -58,7 +58,7 @@ } // 获取流 -export function getStream(data: { id: string; settlementType: string }) { +export function getStream(data: { ids?: string[] ;id?: string; settlementType: string }) { return request({ url: '/finance/settlement/form/export', method: 'post', diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index d3ebf61..de8a874 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -14,6 +14,7 @@ }) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 +const signCategory = ref('') // 签章类型 // 查询参数 const searchQuery = reactive({ signNo: '', // 编号 @@ -25,6 +26,7 @@ limit: 5, offset: 1, signType: '', + signCategory: '', }) // 查询参数 const loadingTable = ref(false) // loading const list = ref([]) // 表格参数 @@ -32,22 +34,35 @@ const columns = ref([ { text: '签章编号', value: 'signNo', align: 'center', width: '180' }, { text: '签章名称', value: 'signName', align: 'center', width: '150' }, + { text: '签章类型', value: 'signCategoryName', align: 'center' }, { text: '签章负责人', value: 'signDirector', align: 'center', width: '100' }, { text: '创建时间', value: 'createTime', align: 'center', width: '250' }, { text: '描述', value: 'signDesc', align: 'center' }, ]) const checkoutList = ref([]) // 多选选中参数 +const signCategoryDict = ref({}) as any // 签章类型 +const signCategoryList = ref({}) as any // 签章类型 // 获取类型 const getType = async () => { const res = await getDictByCode('signType') searchQuery.signType = res.data.filter((item: typeofSign) => item.name === '签章')[0].value + const resSignCategory = await getDictByCode('signCategory') + signCategoryList.value = resSignCategory.data + resSignCategory.data.forEach((item: { value: string; name: string }) => { + signCategoryDict.value[`${item.value}`] = item.name + }) } // 获取数据列表 const getList = () => { loadingTable.value = true listPageApi(searchQuery).then((res) => { if (res.code === 200) { - list.value = res.data.rows + list.value = res.data.rows.map((item: { signCategory: string }) => { + return { + ...item, + signCategoryName: item.signCategory ? signCategoryDict.value[item.signCategory] : item.signCategory, // 签章类型 + } + }) total.value = res.data.total } loadingTable.value = false @@ -78,6 +93,7 @@ searchQuery.signDirector = '' searchQuery.signName = '' searchQuery.signNo = '' + searchQuery.signCategory = '' getList() } @@ -104,8 +120,10 @@ } // 初始化 -const initDialog = () => { +const initDialog = (signCategoryParam: string) => { dialogFormVisible.value = true + signCategory.value = signCategoryParam // 签章类型 + searchQuery.signCategory = signCategory.value // 签章类型 getType().then((_) => { getList() }) @@ -124,6 +142,11 @@ + + + + + diff --git a/src/views/business/lab/measureData/dialog/selectMyMeasureDialog.vue b/src/views/business/lab/measureData/dialog/selectMyMeasureDialog.vue new file mode 100644 index 0000000..b04c827 --- /dev/null +++ b/src/views/business/lab/measureData/dialog/selectMyMeasureDialog.vue @@ -0,0 +1,272 @@ + + + + + + diff --git a/src/api/finance/businessSettlement.ts b/src/api/finance/businessSettlement.ts index 530043b..95727f5 100644 --- a/src/api/finance/businessSettlement.ts +++ b/src/api/finance/businessSettlement.ts @@ -58,7 +58,7 @@ } // 获取流 -export function getStream(data: { id: string; settlementType: string }) { +export function getStream(data: { ids?: string[] ;id?: string; settlementType: string }) { return request({ url: '/finance/settlement/form/export', method: 'post', diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index d3ebf61..de8a874 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -14,6 +14,7 @@ }) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 +const signCategory = ref('') // 签章类型 // 查询参数 const searchQuery = reactive({ signNo: '', // 编号 @@ -25,6 +26,7 @@ limit: 5, offset: 1, signType: '', + signCategory: '', }) // 查询参数 const loadingTable = ref(false) // loading const list = ref([]) // 表格参数 @@ -32,22 +34,35 @@ const columns = ref([ { text: '签章编号', value: 'signNo', align: 'center', width: '180' }, { text: '签章名称', value: 'signName', align: 'center', width: '150' }, + { text: '签章类型', value: 'signCategoryName', align: 'center' }, { text: '签章负责人', value: 'signDirector', align: 'center', width: '100' }, { text: '创建时间', value: 'createTime', align: 'center', width: '250' }, { text: '描述', value: 'signDesc', align: 'center' }, ]) const checkoutList = ref([]) // 多选选中参数 +const signCategoryDict = ref({}) as any // 签章类型 +const signCategoryList = ref({}) as any // 签章类型 // 获取类型 const getType = async () => { const res = await getDictByCode('signType') searchQuery.signType = res.data.filter((item: typeofSign) => item.name === '签章')[0].value + const resSignCategory = await getDictByCode('signCategory') + signCategoryList.value = resSignCategory.data + resSignCategory.data.forEach((item: { value: string; name: string }) => { + signCategoryDict.value[`${item.value}`] = item.name + }) } // 获取数据列表 const getList = () => { loadingTable.value = true listPageApi(searchQuery).then((res) => { if (res.code === 200) { - list.value = res.data.rows + list.value = res.data.rows.map((item: { signCategory: string }) => { + return { + ...item, + signCategoryName: item.signCategory ? signCategoryDict.value[item.signCategory] : item.signCategory, // 签章类型 + } + }) total.value = res.data.total } loadingTable.value = false @@ -78,6 +93,7 @@ searchQuery.signDirector = '' searchQuery.signName = '' searchQuery.signNo = '' + searchQuery.signCategory = '' getList() } @@ -104,8 +120,10 @@ } // 初始化 -const initDialog = () => { +const initDialog = (signCategoryParam: string) => { dialogFormVisible.value = true + signCategory.value = signCategoryParam // 签章类型 + searchQuery.signCategory = signCategory.value // 签章类型 getType().then((_) => { getList() }) @@ -124,6 +142,11 @@ + + + + + diff --git a/src/views/business/lab/measureData/dialog/selectMyMeasureDialog.vue b/src/views/business/lab/measureData/dialog/selectMyMeasureDialog.vue new file mode 100644 index 0000000..b04c827 --- /dev/null +++ b/src/views/business/lab/measureData/dialog/selectMyMeasureDialog.vue @@ -0,0 +1,272 @@ + + + + + + diff --git a/src/views/business/lab/measureData/measureDataDetail.vue b/src/views/business/lab/measureData/measureDataDetail.vue index c2d6cb2..60b3e3d 100644 --- a/src/views/business/lab/measureData/measureDataDetail.vue +++ b/src/views/business/lab/measureData/measureDataDetail.vue @@ -10,11 +10,13 @@ import SelectOrderSamplesDialog from '../components/selectOrderSamplesDialog.vue' import SelectSamplesDialog from '../components/selectSamplesDialog.vue' import selectMeasureDevice from '../components/selectMeasureDevice.vue' +import selectMyMeasureDialog from './dialog/selectMyMeasureDialog.vue' import type { IEquipmentList, IForm, ISampleList } from './measureData-interface' import selectMeasueDataDialog from './dialog/selectMeasueDataDialog.vue' import selectTechFilesDialog from './dialog/selectTechFilesDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' import { UploadFile } from '@/api/measure/file' +import { updateSample } from '@/api/customer/sampleList' import { getStaffList } from '@/api/measure/person' // import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue' @@ -170,7 +172,7 @@ const signatureDialog = ref() // 选择签章模板 const handleClickSignature = () => { - signatureDialog.value.initDialog() + signatureDialog.value.initDialog('1') } // 选择签章确认 const confirmCheckoutSignature = (val: any) => { @@ -183,7 +185,7 @@ const specialSignatureDialog = ref() // 选择认可标志专用章 const handleClickSpecialSignature = () => { - specialSignatureDialog.value.initDialog() + specialSignatureDialog.value.initDialog('2') } // 选择认可标志专用章确认 const confirmCheckoutSpecialSignature = (val: any) => { @@ -258,6 +260,7 @@ // ----------------------------------------------样品-------------------------------------------- const selectOrderSamplesDialogRef = ref() // 选择委托书下的样品清单组件ref +const selectMyMeasureDialogRef = ref() // 选择我的检测下的样品ref const selectSamplesDialogRef = ref() // 选择样品库中的样品组件ref const sampleList = ref([])// 表格数据 const checkoutSampleList = ref([])// 多选样品列表 @@ -278,8 +281,9 @@ // 点击批量添加/选择 const addSample = () => { - if (form.value.orderId) { // 选择委托单下的样品 - selectOrderSamplesDialogRef.value.initDialog(form.value.orderId, false) + if (form.value.orderCode) { // 选择委托单下的样品 + // selectOrderSamplesDialogRef.value.initDialog(form.value.orderId, false) + selectMyMeasureDialogRef.value.initDialog(form.value.orderCode, false) } else { // 选择样品库中的样品 selectSamplesDialogRef.value.initDialog() @@ -288,13 +292,14 @@ // 选好样品 const confirmSelectSample = (val: any, type: 'warehouse' | 'order') => { - val.forEach((item: ISampleList) => { - // 只添加列表里不存在的 - const index = sampleList.value.findIndex((i: ISampleList) => item.sampleNo === i.sampleNo) - if (index === -1) { - sampleList.value.push(item) - } - }) + // val.forEach((item: ISampleList) => { + // // 只添加列表里不存在的 + // const index = sampleList.value.findIndex((i: ISampleList) => item.sampleNo === i.sampleNo) + // if (index === -1) { + // sampleList.value.push(item) + // } + // }) + sampleList.value = [{ ...val[0] }] } // 删除样品 @@ -311,6 +316,16 @@ }) }) } + +// 修改样品 +const clickUpdateSample = () => { + sampleList.value = sampleList.value.map((item) => { + return { + ...item, + editable: true, // 表格是否可修改 + } + }) +} // ----------------------------------------------所用的计量标准器具-------------------------------------------- const equipmentVisible = ref(false) // 选择设备对话框显隐 const equipmentInfoList = ref([])// 表格数据 @@ -517,6 +532,24 @@ $router.back() } +// 样品编辑 +const handleUpdateSample = () => { + const allRequest = [] as any // 所有的请求 + sampleList.value.forEach((item) => { + const params = { + id: item.id, + sampleNo: item.sampleNo, // 样品编号 + sampleName: item.sampleName, // 样品名称 + sampleModel: item.sampleModel, // 样品型号 + manufacturingNo: item.manufacturingNo, // 出厂编号 + remark: item.remark, // 备注 + } + const request = updateSample(params) + allRequest.push(request) + }) + Promise.all(allRequest) +} + // 保存 function handleSave(type = '') { if (!sampleList.value.length) { @@ -540,6 +573,7 @@ infoId.value = res.data.data.id form.value.certificateReportCode = res.data.data.certificateReportCode form.value.certificateReportName = res.data.data.certificateReportName + handleUpdateSample() ElMessage.success('保存成功') loading.close() }).catch(() => { @@ -550,22 +584,18 @@ else if (pageType.value === 'edit' || (pageType.value === 'add' && infoId.value)) { // 编辑 if (query.approvalStatusName === '未通过-驳回') { // 未通过-驳回 failUpdateMeasureData(params).then((res) => { + handleUpdateSample() ElMessage.success('保存成功') loading.close() - // if (type !== 'saveUploadFile') { - // close() - // } }).catch(() => { loading.close() }) } else { // 草稿箱和已取消 draftUpdateMeasureData(params).then((res) => { + handleUpdateSample() ElMessage.success('保存成功') loading.close() - // if (type !== 'saveUploadFile') { - // close() - // } }).catch(() => { loading.close() }) @@ -1123,6 +1153,9 @@ 选择 + + 修改 + 删除行 @@ -1144,7 +1177,17 @@ :width="item.width" show-overflow-tooltip align="center" - /> + > + + @@ -1197,6 +1240,8 @@ + + diff --git a/src/api/finance/businessSettlement.ts b/src/api/finance/businessSettlement.ts index 530043b..95727f5 100644 --- a/src/api/finance/businessSettlement.ts +++ b/src/api/finance/businessSettlement.ts @@ -58,7 +58,7 @@ } // 获取流 -export function getStream(data: { id: string; settlementType: string }) { +export function getStream(data: { ids?: string[] ;id?: string; settlementType: string }) { return request({ url: '/finance/settlement/form/export', method: 'post', diff --git a/src/views/business/lab/components/selectSignature.vue b/src/views/business/lab/components/selectSignature.vue index d3ebf61..de8a874 100644 --- a/src/views/business/lab/components/selectSignature.vue +++ b/src/views/business/lab/components/selectSignature.vue @@ -14,6 +14,7 @@ }) const emits = defineEmits(['add']) const dialogFormVisible = ref(false) // 控制弹窗显隐 +const signCategory = ref('') // 签章类型 // 查询参数 const searchQuery = reactive({ signNo: '', // 编号 @@ -25,6 +26,7 @@ limit: 5, offset: 1, signType: '', + signCategory: '', }) // 查询参数 const loadingTable = ref(false) // loading const list = ref([]) // 表格参数 @@ -32,22 +34,35 @@ const columns = ref([ { text: '签章编号', value: 'signNo', align: 'center', width: '180' }, { text: '签章名称', value: 'signName', align: 'center', width: '150' }, + { text: '签章类型', value: 'signCategoryName', align: 'center' }, { text: '签章负责人', value: 'signDirector', align: 'center', width: '100' }, { text: '创建时间', value: 'createTime', align: 'center', width: '250' }, { text: '描述', value: 'signDesc', align: 'center' }, ]) const checkoutList = ref([]) // 多选选中参数 +const signCategoryDict = ref({}) as any // 签章类型 +const signCategoryList = ref({}) as any // 签章类型 // 获取类型 const getType = async () => { const res = await getDictByCode('signType') searchQuery.signType = res.data.filter((item: typeofSign) => item.name === '签章')[0].value + const resSignCategory = await getDictByCode('signCategory') + signCategoryList.value = resSignCategory.data + resSignCategory.data.forEach((item: { value: string; name: string }) => { + signCategoryDict.value[`${item.value}`] = item.name + }) } // 获取数据列表 const getList = () => { loadingTable.value = true listPageApi(searchQuery).then((res) => { if (res.code === 200) { - list.value = res.data.rows + list.value = res.data.rows.map((item: { signCategory: string }) => { + return { + ...item, + signCategoryName: item.signCategory ? signCategoryDict.value[item.signCategory] : item.signCategory, // 签章类型 + } + }) total.value = res.data.total } loadingTable.value = false @@ -78,6 +93,7 @@ searchQuery.signDirector = '' searchQuery.signName = '' searchQuery.signNo = '' + searchQuery.signCategory = '' getList() } @@ -104,8 +120,10 @@ } // 初始化 -const initDialog = () => { +const initDialog = (signCategoryParam: string) => { dialogFormVisible.value = true + signCategory.value = signCategoryParam // 签章类型 + searchQuery.signCategory = signCategory.value // 签章类型 getType().then((_) => { getList() }) @@ -124,6 +142,11 @@ + + + + + diff --git a/src/views/business/lab/measureData/dialog/selectMyMeasureDialog.vue b/src/views/business/lab/measureData/dialog/selectMyMeasureDialog.vue new file mode 100644 index 0000000..b04c827 --- /dev/null +++ b/src/views/business/lab/measureData/dialog/selectMyMeasureDialog.vue @@ -0,0 +1,272 @@ + + + + + + diff --git a/src/views/business/lab/measureData/measureDataDetail.vue b/src/views/business/lab/measureData/measureDataDetail.vue index c2d6cb2..60b3e3d 100644 --- a/src/views/business/lab/measureData/measureDataDetail.vue +++ b/src/views/business/lab/measureData/measureDataDetail.vue @@ -10,11 +10,13 @@ import SelectOrderSamplesDialog from '../components/selectOrderSamplesDialog.vue' import SelectSamplesDialog from '../components/selectSamplesDialog.vue' import selectMeasureDevice from '../components/selectMeasureDevice.vue' +import selectMyMeasureDialog from './dialog/selectMyMeasureDialog.vue' import type { IEquipmentList, IForm, ISampleList } from './measureData-interface' import selectMeasueDataDialog from './dialog/selectMeasueDataDialog.vue' import selectTechFilesDialog from './dialog/selectTechFilesDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' import { UploadFile } from '@/api/measure/file' +import { updateSample } from '@/api/customer/sampleList' import { getStaffList } from '@/api/measure/person' // import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import ApprovalDialog from '@/components/Approval/ApprovalDialogByProcess.vue' @@ -170,7 +172,7 @@ const signatureDialog = ref() // 选择签章模板 const handleClickSignature = () => { - signatureDialog.value.initDialog() + signatureDialog.value.initDialog('1') } // 选择签章确认 const confirmCheckoutSignature = (val: any) => { @@ -183,7 +185,7 @@ const specialSignatureDialog = ref() // 选择认可标志专用章 const handleClickSpecialSignature = () => { - specialSignatureDialog.value.initDialog() + specialSignatureDialog.value.initDialog('2') } // 选择认可标志专用章确认 const confirmCheckoutSpecialSignature = (val: any) => { @@ -258,6 +260,7 @@ // ----------------------------------------------样品-------------------------------------------- const selectOrderSamplesDialogRef = ref() // 选择委托书下的样品清单组件ref +const selectMyMeasureDialogRef = ref() // 选择我的检测下的样品ref const selectSamplesDialogRef = ref() // 选择样品库中的样品组件ref const sampleList = ref([])// 表格数据 const checkoutSampleList = ref([])// 多选样品列表 @@ -278,8 +281,9 @@ // 点击批量添加/选择 const addSample = () => { - if (form.value.orderId) { // 选择委托单下的样品 - selectOrderSamplesDialogRef.value.initDialog(form.value.orderId, false) + if (form.value.orderCode) { // 选择委托单下的样品 + // selectOrderSamplesDialogRef.value.initDialog(form.value.orderId, false) + selectMyMeasureDialogRef.value.initDialog(form.value.orderCode, false) } else { // 选择样品库中的样品 selectSamplesDialogRef.value.initDialog() @@ -288,13 +292,14 @@ // 选好样品 const confirmSelectSample = (val: any, type: 'warehouse' | 'order') => { - val.forEach((item: ISampleList) => { - // 只添加列表里不存在的 - const index = sampleList.value.findIndex((i: ISampleList) => item.sampleNo === i.sampleNo) - if (index === -1) { - sampleList.value.push(item) - } - }) + // val.forEach((item: ISampleList) => { + // // 只添加列表里不存在的 + // const index = sampleList.value.findIndex((i: ISampleList) => item.sampleNo === i.sampleNo) + // if (index === -1) { + // sampleList.value.push(item) + // } + // }) + sampleList.value = [{ ...val[0] }] } // 删除样品 @@ -311,6 +316,16 @@ }) }) } + +// 修改样品 +const clickUpdateSample = () => { + sampleList.value = sampleList.value.map((item) => { + return { + ...item, + editable: true, // 表格是否可修改 + } + }) +} // ----------------------------------------------所用的计量标准器具-------------------------------------------- const equipmentVisible = ref(false) // 选择设备对话框显隐 const equipmentInfoList = ref([])// 表格数据 @@ -517,6 +532,24 @@ $router.back() } +// 样品编辑 +const handleUpdateSample = () => { + const allRequest = [] as any // 所有的请求 + sampleList.value.forEach((item) => { + const params = { + id: item.id, + sampleNo: item.sampleNo, // 样品编号 + sampleName: item.sampleName, // 样品名称 + sampleModel: item.sampleModel, // 样品型号 + manufacturingNo: item.manufacturingNo, // 出厂编号 + remark: item.remark, // 备注 + } + const request = updateSample(params) + allRequest.push(request) + }) + Promise.all(allRequest) +} + // 保存 function handleSave(type = '') { if (!sampleList.value.length) { @@ -540,6 +573,7 @@ infoId.value = res.data.data.id form.value.certificateReportCode = res.data.data.certificateReportCode form.value.certificateReportName = res.data.data.certificateReportName + handleUpdateSample() ElMessage.success('保存成功') loading.close() }).catch(() => { @@ -550,22 +584,18 @@ else if (pageType.value === 'edit' || (pageType.value === 'add' && infoId.value)) { // 编辑 if (query.approvalStatusName === '未通过-驳回') { // 未通过-驳回 failUpdateMeasureData(params).then((res) => { + handleUpdateSample() ElMessage.success('保存成功') loading.close() - // if (type !== 'saveUploadFile') { - // close() - // } }).catch(() => { loading.close() }) } else { // 草稿箱和已取消 draftUpdateMeasureData(params).then((res) => { + handleUpdateSample() ElMessage.success('保存成功') loading.close() - // if (type !== 'saveUploadFile') { - // close() - // } }).catch(() => { loading.close() }) @@ -1123,6 +1153,9 @@ 选择 + + 修改 + 删除行 @@ -1144,7 +1177,17 @@ :width="item.width" show-overflow-tooltip align="center" - /> + > + + @@ -1197,6 +1240,8 @@ + + diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue index bd27a3e..1ca5e66 100644 --- a/src/views/business/schedule/order/orderEdit.vue +++ b/src/views/business/schedule/order/orderEdit.vue @@ -24,7 +24,7 @@ const visible = ref(false) // 控制选择委托方对话框显隐 const sampleVisible = ref(false) // 控制选择样品对话框显隐 const ruleFormRef = ref() -const orderType = ref('') // 委托书类型 1检测委托单、2检定或校准委托单 +const orderType = ref('') // 委托书类型 1检测委托单、2校准委托单 // 表单 const dataForm: Ref = ref({ id: '', @@ -49,6 +49,7 @@ certificationCompanyAddress: '', // 证书单位地址 needContact: '1', // 需联络后再做退件处理0、直接退件处理1 + timeRequire: '1', // 时间要求 staffNo: '', // 收件人工号 staffName: '', // 收件人名称 receiveDate: '', // 收件日期 @@ -422,14 +423,14 @@ const params = { ...dataForm.value, customerPhone: dataForm.value.phone, // 委托方电话 - accordLab: checkCertificateList.value.includes('如无相应检定规程/校准规范,可按本实验室的方法进行校准') ? '1' : '0', - agreeOther: checkCertificateList.value.includes('如不能出具所选证书类型,同意受托方出具其他类型证书') ? '1' : '0', - needAccordDeclare: checkCertificateList.value.includes('需要符合性声明') ? '1' : '0', - needAdvice: checkCertificateList.value.includes('需要建议再校准日期') ? '1' : '0', + accordLab: checkCertificateList.value.includes('校准规范') ? '1' : '0', + agreeOther: checkCertificateList.value.includes('需要建议再校准日期') ? '1' : '0', + needAccordDeclare: checkCertificateList.value.includes('检定规程') ? '1' : '0', + needAdvice: checkCertificateList.value.includes('如需要符合性声明,合格判据:本实验室合格判据考虑测量不确定度') ? '1' : '0', contactReturn: dataForm.value.needContact === '1' ? '1' : '0', // 需联系之后退件处理 directReturn: dataForm.value.needContact === '2' ? '1' : '0', // 直接退件处理 orderType: orderType.value === 'measure' ? '1' : orderType.value === 'calibration' ? '2' : '', - orderTypeName: orderType.value === 'measure' ? '检测委托单' : orderType.value === 'calibration' ? '检定或校准委托单' : '', + orderTypeName: orderType.value === 'measure' ? '检测委托单' : orderType.value === 'calibration' ? '校准委托单' : '', customerSampleInfoList: list.value, orderTime: dataForm.value.createTime, } @@ -488,9 +489,9 @@ text: '加载中...', background: 'rgba(255, 255, 255, 0.6)', }) - const exportTitle = orderType.value === 'measure' ? '检测委托单' : '检定或校准委托单' + const exportTitle = orderType.value === 'measure' ? '检测委托单' : '校准委托单' getStream({ id: infoId.value, excel: true }).then((res) => { - exportFile(res.data, `${exportTitle}.xls`) + exportFile(res.data, `${exportTitle}.xlsx`) loading.close() }) } @@ -520,16 +521,16 @@ dataForm.value.phone = res.data.customerPhone if (`${res.data.accordLab}` === '1') { - checkCertificateList.value.push('如无相应检定规程/校准规范,可按本实验室的方法进行校准') + checkCertificateList.value.push('校准规范') } if (`${res.data.agreeOther}` === '1') { - checkCertificateList.value.push('如不能出具所选证书类型,同意受托方出具其他类型证书') + checkCertificateList.value.push('需要建议再校准日期') } if (`${res.data.needAccordDeclare}` === '1') { - checkCertificateList.value.push('需要符合性声明') + checkCertificateList.value.push('检定规程') } if (`${res.data.needAdvice}` === '1') { - checkCertificateList.value.push('需要建议再校准日期') + checkCertificateList.value.push('如需要符合性声明,合格判据:本实验室合格判据考虑测量不确定度') } if (`${res.data.contactReturn}` === '1') { // 需联系之后退件处理 dataForm.value.needContact = '1' @@ -537,6 +538,7 @@ if (`${res.data.directReturn}` === '1') { // 直接退件处理 dataForm.value.needContact = '2' } + dataForm.value.timeRequire = `${res.data.timeRequire}` // 时间要求 orderType.value = res.data.orderType === '1' ? 'measure' : 'calibration' // 委托书类型 list.value = res.data.customerSampleInfoList.map((item: any) => { @@ -583,7 +585,7 @@ }, { deep: true }) onMounted(async () => { await getDict() - orderType.value = $route.query.orderType as string // 委托书类型 1检测委托单、2检定或校准委托单 + orderType.value = $route.query.orderType as string // 委托书类型 1检测委托单、2校准委托单 // 非添加页面获取详情 if (pageType.value !== 'add') { getInfo() @@ -600,7 +602,7 @@ 航天计量检测技术(江苏)有限公司 --> - +