diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 8f052bcd8..4cd0f7d50 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1717,6 +1717,7 @@ module.exports = { complianceReporting:'Compliance Reporting', youCanOnlySelectStatusClearSubmit:'You can only select data with a process status of Clear to Submit', note:'Note: The attachment includes the list of test items and test report. Test standard or technical specification', + notecsv:'Note: CSV format is supported. The value is within 20M', format:'It supports doc/docx/pdf format and is less than 50M in size', cantTransferToYourself:"Can't transfer to yourself", theDataYouInitiate:'The data you selected does not meet the process initiation criteria. Please recheck and initiate', diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index afb84484e..2bfb28112 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1821,7 +1821,8 @@ module.exports = { note:'注:附件包括测试项目清单、测试报告.测试标准或技术规范', format:'支持doc/docx/pdf格式,大小50M以内', cantTransferToYourself:"不能转办给自己", - noteone:'注:支持CSV格式,大小20M以内,数量1-10个', + noteone:'注:支持CSV格式,大小20M以内,数量1-20个', + notecsv:'注:支持CSV格式,大小20M以内', theDataYouInitiate:'您所选的数据,均不符合流程发起条件,请重新检查后发起', dataWithProcessReleasedCannotBeReset:'流程状态为清单待发布的数据不能被重置', reasonForReturnOfDesignCompliance:'设计符合性退回原因', diff --git a/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue b/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue index c3bed400a..43e14fb72 100644 --- a/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue +++ b/jero-web/src/views/otamanagement/upgradeactivity/components/upgradecompletion.vue @@ -66,6 +66,7 @@ formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') }} +

{{$t('notecsv')}}

@@ -123,6 +124,7 @@ formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') }} +

{{$t('format')}}

@@ -151,11 +153,12 @@ + @click="clickButtonToUpload('VINcodelist1')"> {{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') }} +

{{$t('format')}}

@@ -167,7 +170,7 @@ {{$t('submit')}} - + @@ -189,6 +192,7 @@ export default { disabled: false, formInline: {}, confirmLoading: false, + acceptcode:'', projectNameList: [], DeliverableTreeList: [], rules: { @@ -302,6 +306,11 @@ export default { }) }, clickButtonToUpload(item) { + if(item == 'VINcodelist'){ + this.acceptcode = 'csv' + }else { + this.acceptcode = 'doc,docx,pdf' + } this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.visible = true this.uploadName = item diff --git a/jero-web/src/views/otamanagement/upgradeactivity/index.vue b/jero-web/src/views/otamanagement/upgradeactivity/index.vue index 1900bb800..9e0b371ed 100644 --- a/jero-web/src/views/otamanagement/upgradeactivity/index.vue +++ b/jero-web/src/views/otamanagement/upgradeactivity/index.vue @@ -288,7 +288,7 @@ export default { align: 'left', ellipsis: true, width: 170, - dataIndex: 'cjsj' + dataIndex: 'createTime' }, { title: this.$t('remarks'), diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue index c664a3c94..64ac09ad3 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue @@ -53,7 +53,11 @@
- {{$t('uploadattachment')}} + + {{ (fileList === 'null' || fileList === '' || + fileList == null) ? $t('uploadattachment') : $t('viewUploadedFiles') + }} +

{{$t('note')}}

    {{$t('format')}}

@@ -64,7 +68,7 @@ {{$t('last')}} {{$t('next')}}
- +
@@ -86,6 +90,7 @@ export default { } ], + fileList:'', loading: false, disable:false, columns: [ @@ -216,14 +221,39 @@ export default { } getAction('/ota/otaBaSjSjfzbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ this.dataSource =res.result.list == null ? {} : res.result.list + this.fileList = res.result.fj }) }, save(){ - postAction('/ota/otaBaSjSjfzbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{ + postAction('/ota/otaBaSjSjfzbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource,fj:this.fileList}).then(res=>{ console.log(res); this.$message.success(this.$t('SavedSuccessfully')) }) }, + uploadSuccess(data) { + let attIdList = [] + if (data && data.length > 0) { + data.map(item => { + attIdList.push(item.id || data.name) + }) + } + this.$forceUpdate() + // /** 赋值给当前对应的表单文件 */ + this.fileList = attIdList.join(',') + // this.fileList.certifyingmaterials = this.$t('viewFile') + }, + clickButtonToUpload(current) { + this.$refs.uploadFile.perentHandleFunc() + this.$refs.uploadFile.visible = true + this.uploadName = current + getAction('sys/common/getFileInfos', { id: current }).then((res) => { + if (res.success) { + this.$refs.uploadFile.perentHandleFunc(res.result) + } else { + this.$refs.uploadFile.perentHandleFunc() + } + }) + }, last(){ this.save() this.$emit('beupgradedonlineup') @@ -239,20 +269,6 @@ export default { deleteData(record){ this.dataSource.splice(this.dataSource.indexOf(record),1) }, - uploadSuccess(data) { - let attIdList = [] - if (data && data.length > 0) { - data.map(item => { - attIdList.push({ - id:item.id, - fileName:item.fileName - }) - }) - } - /** 赋值给当前对应的表单文件 */ - this.fileList.uploadName = attIdList - this.fileList.certifyingmaterials = this.$t('viewFile') - }, } } diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue index 3b8a3e96a..64cd0d4a7 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue @@ -72,15 +72,15 @@ - + - {{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || - formInline.VINcodelist == null) ? $t('VINcodeupload') : $t('viewUploadedFiles') + @click="clickButtonToUpload('csv')"> + {{ (formInline.csv === 'null' || formInline.csv === '' || + formInline.csv == null) ? $t('VINcodeupload') : $t('viewUploadedFiles') }}

{{$t('noteone')}}

- +
@@ -139,6 +139,7 @@ export default { if(res.code==200){ this.formInline.zsl=res.result.zsl this.formInline.vinList=res.result.vinList + this.formInline.csv=res.result.csv this.formInline.dateofproduction=[] this.formInline.dateofproduction.push(res.result.scrqks) this.formInline.dateofproduction.push(res.result.scrqjs) @@ -152,6 +153,7 @@ export default { let obj={} obj.otaId=localStorage.getItem('otaId') obj.zsl = this.formInline.zsl + obj.csv = this.formInline.csv if(this.formInline.dateofproduction){ obj.scrqks = this.formInline.dateofproduction[0] obj.scrqjs = this.formInline.dateofproduction[1] @@ -188,6 +190,25 @@ export default { } }) }, + /** 上传文件的回调 */ + uploadSuccess(data) { + // console.log(data) + let attIdList = [] + if(data && data.length>0){ + data.map(item => { + attIdList.push(item.id || data.name) + }) + /** 赋值给当前对应的表单文件 */ + this.formInline.csv = attIdList.join(',') + this.formInline = { ...this.formInline } + // console.log('form',this.formInline) + }else{ + this.formInline.csv = '' + this.formInline = { ...this.formInline } + // console.log('form',this.formInline) + + } + }, } } diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue index ef5679a0d..482073698 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue @@ -146,7 +146,7 @@ {{$t('last')}} {{$t('next')}} - + @@ -331,7 +331,7 @@ this.$forceUpdate() this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.visible = true this.uploadName = item - getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => { + getAction('sys/common/getFileInfos', { id: this.form[item] }).then((res) => { if (res.success) { this.$refs.uploadFile.perentHandleFunc(res.result) } else { @@ -339,33 +339,22 @@ this.$forceUpdate() } }) }, - getList() { - let queryParam = JSON.parse(JSON.stringify(this.queryParam)) - Object.keys(queryParam).forEach(val => { - if (queryParam[val] instanceof Array) { - queryParam[val] = queryParam[val].join(',') - } - }) - let query = { - pageNo: this.pageNo, - pageSize: this.pageSize, - ...queryParam + uploadSuccess(data) { + let attIdList = [] + if(data && data.length>0){ + data.map(item => { + attIdList.push(item.id || data.name) + }) + /** 赋值给当前对应的表单文件 */ + this.form[this.uploadName] = attIdList.join(',') + this.form = { ...this.form } + // console.log('form',this.formInline) + }else{ + this.form[this.uploadName] = '' + this.form = { ...this.form } + // console.log('form',this.formInline) + } - this.loading = true - getAction(this.url.list, query).then((res) => { - if (res.success) { - if (res.result.current > 1 && res.result.records.length == 0) { - this.pageNo = 1 - this.getList() - return - } - this.dataSource = res.result.records || [] - this.total = res.result.total - this.loading = false - } else { - this.loading = false - } - }) }, getData(){ let otaIdT=localStorage.getItem('otaIdT') @@ -411,20 +400,6 @@ this.$forceUpdate() this.save() this.$emit('safetyPrecautionsdown') }, - uploadSuccess(data) { - let attIdList = [] - if (data && data.length > 0) { - data.map(item => { - attIdList.push({ - id:item.id, - fileName:item.fileName - }) - }) - } - /** 赋值给当前对应的表单文件 */ - this.fileList.uploadName = attIdList - this.fileList.certifyingmaterials = this.$t('viewFile') - }, } } diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue index 65f16e1cb..6edfa5d44 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue @@ -170,7 +170,7 @@ {{$t('last')}} {{$t('next')}} - + diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue index 1b0838b3e..23b599f46 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue @@ -311,6 +311,7 @@ import uploadFileOta from '@/components/uploadFileOta/file' if(otaIdT==null){ otaIdT='' } + let randomNum = Math.floor(Math.random()*99999999999+1) getAction('/ota/otaBaCxKsjxtmccs/queryByOtaId',{otaIdT:otaIdT,otaId:localStorage.getItem('otaId')}).then(res=>{ if(res.code==200){ if(res.result.list.length==0){ @@ -341,8 +342,9 @@ import uploadFileOta from '@/components/uploadFileOta/file' }, ] }else{ - res.result.list.forEach(item =>{ - item.sfksj =Number(item.sfksj) + res.result.list.forEach((item,index) =>{ + item.sfksj = Number(item.sfksj) + item.key = randomNum + index }) this.dataSource=res.result.list this.fileList = res.result.fj diff --git a/jero-web/src/views/otamanagement/vehicleregistration/index.vue b/jero-web/src/views/otamanagement/vehicleregistration/index.vue index 9ddc8ef68..2764a0ad4 100644 --- a/jero-web/src/views/otamanagement/vehicleregistration/index.vue +++ b/jero-web/src/views/otamanagement/vehicleregistration/index.vue @@ -256,7 +256,7 @@ export default { align: 'left', ellipsis: true, width: 170, - dataIndex: 'cjsj' + dataIndex: 'createTime' }, { title: this.$t('remarks'),