Browse Source

HL-5853 列表添加上传履历表功能

hella_online_20240911
yufei_wang 2 months ago
parent
commit
b0bc5e660d
  1. 1
      src/locales/en-US.ts
  2. 1
      src/locales/zh-CN.ts
  3. 29
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts
  4. 47
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

1
src/locales/en-US.ts

@ -760,6 +760,7 @@ export default {
:'Change Record', :'Change Record',
:'Add Detail', :'Add Detail',
:'Upload quality report', :'Upload quality report',
:'Upload your resume',
:'Upload the quality inspection report', :'Upload the quality inspection report',
:'piece', :'piece',
:'sheet', :'sheet',

1
src/locales/zh-CN.ts

@ -760,6 +760,7 @@ export default {
:'变更记录', :'变更记录',
:'添加明细', :'添加明细',
:'上传质量报告', :'上传质量报告',
:'上传履历表',
:'上传质检报告', :'上传质检报告',
:'个', :'个',
:'张', :'张',

29
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts

@ -159,3 +159,32 @@ export const SupplierdeliverInspectionDetailRules = reactive({
{ required: true, message: '请输入发货数量', trigger: 'blur' } { required: true, message: '请输入发货数量', trigger: 'blur' }
], ],
}) })
export const CurriculumVitae = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '上传履历表',
field: 'uploadFile',
sort: 'custom',
isTable:false,
isTableForm:false,
form: {
component: 'UploadFile',
componentProps: {
upData:{
tableId: '',
tableName: 'SupplierdeliverInspectionDetail',
},
fileType:['pdf'],
fileSize:100,
limit:20000
}
},
}
]))
//表单校验
export const CurriculumVitaeRules = reactive({
uploadFile: [
{ required: true, message: '请上传文件', trigger: 'blur' }
]
})

47
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -152,6 +152,14 @@
@footButtonClick="footButtonClick" @footButtonClick="footButtonClick"
@formSelectChange="formSelectChangeLabel" @formSelectChange="formSelectChangeLabel"
/> />
<!-- 上传履历表 -->
<BasicForm
ref="curriculumVitaeRef"
:formAllSchemas="CurriculumVitae.allSchemas"
@success="submitCurriculumVitae"
:tableFormRules="CurriculumVitaeRules"
:isBusiness="false"
/>
<!-- 上传质量报告 --> <!-- 上传质量报告 -->
<BasicForm <BasicForm
ref="ploadQualityReportRef" ref="ploadQualityReportRef"
@ -199,7 +207,9 @@ import {
} from './supplierdeliverRequestMain.data' } from './supplierdeliverRequestMain.data'
import { import {
SupplierdeliverInspectionDetail, SupplierdeliverInspectionDetail,
SupplierdeliverInspectionDetailRules SupplierdeliverInspectionDetailRules,
CurriculumVitae,
CurriculumVitaeRules
} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data' } from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data'
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
@ -534,6 +544,16 @@ const butttondata = (row, $index) => {
hide: isShowMainButton(row, ['1', '2', '3']), hide: isShowMainButton(row, ['1', '2', '3']),
hasPermi: 'wms:supplierdeliver-request-main:uploadCheck' hasPermi: 'wms:supplierdeliver-request-main:uploadCheck'
}), // }), //
{
label: t('ts.上传履历表'),
name: 'mainPlanCurriculumVitae',
hide: row.status!=5,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true //
}, //
defaultButtons.mainListPlanSubBtn({ defaultButtons.mainListPlanSubBtn({
hide: isShowMainButton(row, ['1']), hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:supplierdeliver-request-main:sub' hasPermi: 'wms:supplierdeliver-request-main:sub'
@ -606,6 +626,9 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanUploadQualityReport') { } else if (val == 'mainPlanUploadQualityReport') {
// //
handleUploadQualityReport(row) handleUploadQualityReport(row)
}else if (val == 'mainPlanCurriculumVitae') {
//
handleUploadCurriculumVitae(row)
} else if (val == 'mainPlanSub') { } else if (val == 'mainPlanSub') {
// //
handleSub(row.masterId) handleSub(row.masterId)
@ -948,6 +971,28 @@ const handleUploadQualityReport = async (row) => {
//uploadQualityReportTableData.value = [tableFormKeys] //uploadQualityReportTableData.value = [tableFormKeys]
} }
const curriculumVitaeRef = ref()
const submitCurriculumVitae = async (formType, data) => {
console.log('上传履历表',data)
}
/** 上传质量报告 */
const handleUploadCurriculumVitae = async (row) => {
const uploadFile = SupplierdeliverInspectionDetail.allSchemas.formSchema.find(
(item) => item.field == 'uploadFile'
)
if (uploadFile) {
uploadFile['componentProps']['upData']['tableId'] = row.masterId
}
curriculumVitaeRef.value.open(
'create',
null,
{ masterId: row.masterId },
t('ts.上传履历表'),
t('ts.上传履历表')
)
}
const submitFormUploadQualityReport = async (formType, data) => { const submitFormUploadQualityReport = async (formType, data) => {
delete data.number delete data.number
data.subList = uploadQualityReportTableData.value // data.subList = uploadQualityReportTableData.value //

Loading…
Cancel
Save