Browse Source

HL-5853供应商发货申请增加上传履历表功能,非必填项

hella_online_20240913
yufei_wang 2 months ago
parent
commit
d7d23b38b1
  1. 12
      src/components/Detail/src/Detail.vue
  2. 71
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

12
src/components/Detail/src/Detail.vue

@ -646,10 +646,18 @@ const change = (item, index) => {
emit('changeTabs', item)
if(otherList.find(other=>other.label==item.label)){
// // --
scrollbar.value.scrollTo({ top: 0});
scrollbar.value?.scrollTo({ top: 0});
}
}
const changeTabCurrent = ({label,index})=>{
if(label){
let tab = tabsList.value.find(item=>item.label==label)
change(tab,tabsList.value.indexOf(tab))
}else{
change(tabsList.value[index],index)
}
}
//
const masterParmas = ref({
@ -1106,7 +1114,7 @@ watch(
getList()
}
)
defineExpose({ openDetail, formRef ,updateList,submitUpdateList}) // open
defineExpose({ openDetail, formRef ,updateList,submitUpdateList,changeTabCurrent}) // open
</script>
<style lang="scss">

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

@ -152,14 +152,7 @@
@footButtonClick="footButtonClick"
@formSelectChange="formSelectChangeLabel"
/>
<!-- 上传履历表 -->
<BasicForm
ref="curriculumVitaeRef"
:formAllSchemas="CurriculumVitae.allSchemas"
@success="submitCurriculumVitae"
:tableFormRules="CurriculumVitaeRules"
:isBusiness="false"
/>
<!-- 上传质量报告 -->
<BasicForm
ref="ploadQualityReportRef"
@ -544,16 +537,16 @@ const butttondata = (row, $index) => {
hide: isShowMainButton(row, ['1', '2', '3']),
hasPermi: 'wms:supplierdeliver-request-main:uploadCheck'
}), //
// {
// label: t('ts.'),
// name: 'mainPlanCurriculumVitae',
// hide: row.status!=5,
// type: 'primary',
// icon: '',
// color: '',
// hasPermi: '',
// link: true //
// }, //
{
label: t('ts.上传履历表'),
name: 'mainPlanCurriculumVitae',
hide: row.status!=5,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true //
}, //
defaultButtons.mainListPlanSubBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:supplierdeliver-request-main:sub'
@ -628,7 +621,7 @@ const buttonTableClick = async (val, row) => {
handleUploadQualityReport(row)
}else if (val == 'mainPlanCurriculumVitae') {
//
handleUploadCurriculumVitae(row)
handleUploadCurriculumVitae(row,'发货单号', row.asnNumber)
} else if (val == 'mainPlanSub') {
//
handleSub(row.masterId)
@ -830,6 +823,20 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
annexInspectionDetail.value.hiddenDelete = row.status==8 //HL-5838-status=8
detailRef.value.openDetail(row, titleName, titleValue, 'requestSupplierdeliverMain')
}
/** 上传履历表 */
const handleUploadCurriculumVitae = async (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache
.get(CACHE_KEY.DEPT)
.find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
annexInspectionDetail.value.hiddenDelete = row.status==8 //HL-5838-status=8
detailRef.value.openDetail(row, titleName, titleValue, 'requestSupplierdeliverMain')
nextTick(()=>{
detailRef.value.changeTabCurrent({
label:'履历表'
})
})
}
///
const formRef = ref()
const supplierdeliverFormRef = ref()
@ -971,30 +978,8 @@ const handleUploadQualityReport = async (row) => {
//uploadQualityReportTableData.value = [tableFormKeys]
}
const curriculumVitaeRef = ref()
const submitCurriculumVitae = async (formType, data) => {
console.log('上传履历表',data)
await SupplierdeliverRequestDetailApi.uploadCurriculumVitae(data)
message.success(t('common.createSuccess'))
curriculumVitaeRef.value.dialogVisible = false
getList()
}
/** 上传质量报告 */
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) => {
delete data.number

Loading…
Cancel
Save