+
{{ '上传' }}
-
+
- ×
+ ×
-
onFileChange(e, scope.row, 'receivedAmount')">
@@ -823,3 +851,12 @@
}
}
+
+
diff --git a/src/api/finance/businessSettlement.ts b/src/api/finance/businessSettlement.ts
index 5a18d24..530043b 100644
--- a/src/api/finance/businessSettlement.ts
+++ b/src/api/finance/businessSettlement.ts
@@ -57,3 +57,13 @@
})
}
+// 获取流
+export function getStream(data: { id: string; settlementType: string }) {
+ return request({
+ url: '/finance/settlement/form/export',
+ method: 'post',
+ responseType: 'blob',
+ data,
+ })
+}
+
diff --git a/src/assets/icons/icon-export-settlementDoc.svg b/src/assets/icons/icon-export-settlementDoc.svg
new file mode 100644
index 0000000..faf6296
--- /dev/null
+++ b/src/assets/icons/icon-export-settlementDoc.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts
index f511148..3536752 100644
--- a/src/router/modules/business.ts
+++ b/src/router/modules/business.ts
@@ -349,50 +349,50 @@
activeMenu: '/lab/measureDataList',
},
},
- {
- path: 'reportOnCredentialsApproval',
- name: 'ReportOnCredentialsApproval',
- component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'),
- meta: {
- title: '证书报告',
- icon: 'ep:key',
- auth: '/lab/reportOnCredentialsApproval',
- },
- },
- {
- path: 'reportOnCredentialsApproval/:type/:id?',
- name: 'reportOnCredentialsAdd',
- component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'),
- meta: {
- title: '证书报告详情',
- icon: 'ep:key',
- sidebar: false,
- breadcrumb: true,
- activeMenu: '/lab/reportOnCredentialsApproval',
- },
- },
- {
- path: 'primitiveLogList',
- name: 'PrimitiveLogList',
- component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'),
- meta: {
- title: '原始记录',
- icon: 'ep:key',
- auth: '/lab/primitiveLogList',
- },
- },
- {
- path: 'primitiveLogList/:type/:id?',
- name: 'PrimitiveLogAdd',
- component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'),
- meta: {
- title: '原始记录详情',
- icon: 'ep:key',
- sidebar: false,
- breadcrumb: true,
- activeMenu: '/lab/primitiveLogList',
- },
- },
+ // {
+ // path: 'reportOnCredentialsApproval',
+ // name: 'ReportOnCredentialsApproval',
+ // component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'),
+ // meta: {
+ // title: '证书报告',
+ // icon: 'ep:key',
+ // auth: '/lab/reportOnCredentialsApproval',
+ // },
+ // },
+ // {
+ // path: 'reportOnCredentialsApproval/:type/:id?',
+ // name: 'reportOnCredentialsAdd',
+ // component: () => import('@/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue'),
+ // meta: {
+ // title: '证书报告详情',
+ // icon: 'ep:key',
+ // sidebar: false,
+ // breadcrumb: true,
+ // activeMenu: '/lab/reportOnCredentialsApproval',
+ // },
+ // },
+ // {
+ // path: 'primitiveLogList',
+ // name: 'PrimitiveLogList',
+ // component: () => import('@/views/business/lab/primitiveLog/primitiveLogList.vue'),
+ // meta: {
+ // title: '原始记录',
+ // icon: 'ep:key',
+ // auth: '/lab/primitiveLogList',
+ // },
+ // },
+ // {
+ // path: 'primitiveLogList/:type/:id?',
+ // name: 'PrimitiveLogAdd',
+ // component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'),
+ // meta: {
+ // title: '原始记录详情',
+ // icon: 'ep:key',
+ // sidebar: false,
+ // breadcrumb: true,
+ // activeMenu: '/lab/primitiveLogList',
+ // },
+ // },
{
path: 'environmentalList',
name: 'EnvironmentalList',
diff --git a/src/views/business/lab/measureData/measureDataDetail.vue b/src/views/business/lab/measureData/measureDataDetail.vue
index c554c33..b0453a5 100644
--- a/src/views/business/lab/measureData/measureDataDetail.vue
+++ b/src/views/business/lab/measureData/measureDataDetail.vue
@@ -13,6 +13,7 @@
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 ApprovalDialog from '@/components/Approval/ApprovalDialog.vue'
import type { TableColumn } from '@/components/NormalTable/table_interface'
@@ -47,7 +48,7 @@
const ruleFormRef = ref
() as any
const form = ref({
invalid: 0, // 替代已生成证书
- formId: query.formId as string,
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS,
oldCertificateCode: '', // 原证书
calibrationMajor: '', // 检校专业
calibrationMajorName: '', // 检校专业名称
@@ -552,7 +553,7 @@
})
const params = {
id: submitId.value,
- formId: query.formId as string, // 表单id
+ formId: SCHEDULE.BUSINESS_REPORT_ON_CREDENTIALS, // 表单id
}
submit(params).then(() => {
ElMessage.success('提交成功')
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index ed79cb2..9bd9daa 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -603,9 +603,9 @@
导出
-
+
保存
diff --git a/src/views/finance/businessSettlement/edit.vue b/src/views/finance/businessSettlement/edit.vue
index 7630aeb..ab4378b 100644
--- a/src/views/finance/businessSettlement/edit.vue
+++ b/src/views/finance/businessSettlement/edit.vue
@@ -11,8 +11,9 @@
import { getDictByCode } from '@/api/system/dict'
import { UploadFile } from '@/api/measure/file'
import { calc } from '@/utils/useCalc'
+import showPhoto from '@/views/system/tool/showPhoto.vue'
import type { dictType } from '@/global'
-import type { TableColumn } from '@/components/NormalTable/table_interface'
+import { getTaskDetail } from '@/api/business/schedule/task'
import useUserStore from '@/store/modules/user'
import selectOrder from '@/views/business/schedule/interchangeReceipt/selectOrder.vue'
import type { IOrderList } from '@/views/business/schedule/order/orderList_interface'
@@ -181,15 +182,16 @@
}
// ----------------------------------------上传附件----------------------------------------------------
+const uploadIndex = ref(0) // 上传附件的索引
+const uploadType = ref('receivedAmount') // 上传附件的表格类型
// 删除附件
const del = (index: number, row: any) => {
- row.value.attachment.splice(index, 1)
+ row.attachment.splice(index, 1)
}
const fileRef = ref() // 文件上传input
-const onFileChange = (event: any, row?: any, type?: 'receivedAmount' | 'invoiceAmount') => {
+const onFileChange = (event: any) => {
// 原生上传
- console.log(event.target.files)
const files = event.target.files
if (files.length !== 0) {
// 创建formdata对象
@@ -197,22 +199,32 @@
for (var i = 0; i < files.length; i++) {
fd.append('multipartFile', files[i])
}
+ const loading = ElLoading.service({})
+
UploadFile(fd).then((res) => {
if (res.code === 200) {
res.data.forEach((item: string) => {
- row.attachment.push({
- minioFileName: item,
- })
+ if (uploadType.value === 'receivedAmount') { // 到账金额明细
+ receivedAmountList.value[uploadIndex.value].attachment.push(item)
+ console.log('receivedAmountList', receivedAmountList.value)
+ }
+ else { // 开票金额明细
+ invoiceAmountList.value[uploadIndex.value].attachment.push(item)
+ }
})
ElMessage.success('文件上传成功')
+ loading.close()
}
else {
ElMessage.error(res.message)
+ loading.close()
}
})
}
}
-const upload = () => {
+const upload = (index: number, type: 'receivedAmount' | 'invoiceAmount') => {
+ uploadIndex.value = index
+ uploadType.value = type
fileRef.value.click()
}
// ------------------------------------结算明细--------------------------------------------------------------------
@@ -355,10 +367,22 @@
lock: true,
background: 'rgba(255, 255, 255, 0.8)',
})
+ const receivedAmount = receivedAmountList.value.map((item: any) => {
+ return {
+ ...item,
+ attachment: Array.isArray(item.attachment) ? item.attachment.join(',') : item.attachment,
+ }
+ })
+ const invoiceAmount = invoiceAmountList.value.map((item: any) => {
+ return {
+ ...item,
+ attachment: Array.isArray(item.attachment) ? item.attachment.join(',') : item.attachment,
+ }
+ })
const params = {
id: infoId.value,
...form.value,
- amountDetailsList: receivedAmountList.value.concat(invoiceAmountList.value),
+ amountDetailsList: receivedAmount.concat(invoiceAmount),
sampleList: list.value,
}
// 新建
@@ -393,8 +417,14 @@
const loading = ElLoading.service({})
getBusinessSettlementDetail({ id: infoId.value }).then((res) => {
form.value = res.data
- receivedAmountList.value = res.data.amountDetailsList.filter((item: { moneyType: string }) => `${item.moneyType}` === '1')
- invoiceAmountList.value = res.data.amountDetailsList.filter((item: { moneyType: string }) => `${item.moneyType}` === '2')
+ const amountList = res.data.amountDetailsList.map((item: { attachment: string }) => {
+ return {
+ ...item,
+ attachment: item.attachment ? item.attachment.split(',') : item.attachment,
+ }
+ })
+ receivedAmountList.value = amountList.filter((item: { moneyType: string }) => `${item.moneyType}` === '1')
+ invoiceAmountList.value = amountList.filter((item: { moneyType: string }) => `${item.moneyType}` === '2')
list.value = res.data.sampleDetailsList.map((item: { editable: boolean; orderTime: string }) => {
return {
...item,
@@ -417,7 +447,7 @@
-
+
@@ -645,6 +675,7 @@
+