Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
高嵩
2023-03-28 11:23:44 +08:00
29 changed files with 447 additions and 216 deletions
@@ -33,8 +33,11 @@ import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.system.util.StringUtils; import com.jero.modules.system.util.StringUtils;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.top.entity.TopProjectEO; import com.jero.modules.top.entity.TopProjectEO;
import com.jero.modules.top.service.ITopProjectEOService; import com.jero.modules.top.service.ITopProjectEOService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFSheet;
@@ -147,6 +150,9 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
@Autowired @Autowired
private IProjectCertificationInventoryEOService projectCertificationInventoryEOService; private IProjectCertificationInventoryEOService projectCertificationInventoryEOService;
@Autowired
private IProcessInfoDetailEOService processInfoDetailEOService;
/** /**
* 保存 * 保存
* *
@@ -441,6 +447,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
} }
} }
} }
setRzlcCertificationEngineerTask(projectLibraryBase);
checkExitData(projectLibraryBase); checkExitData(projectLibraryBase);
saveOrUpdate(projectLibraryBase); saveOrUpdate(projectLibraryBase);
checkVersionOrder(projectLibraryBase.getParentId(),projectLibraryBase.getProjectVersion(),projectLibraryBase.getId()); checkVersionOrder(projectLibraryBase.getParentId(),projectLibraryBase.getProjectVersion(),projectLibraryBase.getId());
@@ -666,6 +674,87 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
} }
/**
* 重新设置认证工程师在待办中心的 认证流程的 待办任务。
* @param projectLibraryBase
*/
private void setRzlcCertificationEngineerTask(ProjectLibraryBase projectLibraryBase) {
if(org.apache.commons.lang3.StringUtils.isNotEmpty(projectLibraryBase.getCertificationEngineer())){
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
QueryWrapper<ProjectCertificationInventoryEO> pciQueryWrap = new QueryWrapper<>();
pciQueryWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId, projectLibraryBase.getId());
List<ProjectCertificationInventoryEO> pciEOList = this.projectCertificationInventoryEOService.list(pciQueryWrap);
if(CollectionUtils.isNotEmpty(pciEOList)){
// 清单待校核的数据
List<ProjectCertificationInventoryEO> pciToBeCheckedList = pciEOList.stream().filter(pci -> {
boolean flag = false;
if(StringUtils.equals(pci.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
// 如果该项目下清单待校核的数据不为空,给这些认证工程师分配待办任务。
if(CollectionUtils.isNotEmpty(pciToBeCheckedList)){
// 删除待办中心(是这个项目库的 pre-Homo流程的待办任务, 认证工程师接受任务节点的数据)
QueryWrapper<ProcessInfoDetailEO> pidRemoveWrap = new QueryWrapper<>();
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId, projectLibraryBase.getId());
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue());
this.processInfoDetailEOService.remove(pidRemoveWrap);
// 给认证工程师分配任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (String userId : certificationEngineerIdList) {
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(userId);
processInfoDetailEO.setTaskDefinitionKey(CertificationFlowNodeEnum.RZGCSJSRW.getKey());
processInfoDetailEO.setCreateTime(new Date());
processInfoDetailEO.setStatus(TaskStatusEnum.NOT_DONE.getValue());
processInfoDetailEO.setProcessInfoId(projectLibraryBase.getId());
processInfoDetailEO.setActiProcInstId(projectLibraryBase.getId());
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEOList.add(processInfoDetailEO);
}
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
}
// 结果待提交的数据
List<ProjectCertificationInventoryEO> pciToBeReviewEDList = pciEOList.stream().filter(pci -> {
boolean flag = false;
if(StringUtils.equals(pci.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(pciToBeReviewEDList)){
// 删除待办中心(是这个项目库的 pre-Homo流程的待办任务, 认证工程师审查 任务节点的数据)
QueryWrapper<ProcessInfoDetailEO> pidRemoveWrap = new QueryWrapper<>();
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId, projectLibraryBase.getId());
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSSC.getKey());
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue());
this.processInfoDetailEOService.remove(pidRemoveWrap);
// 给认证工程师分配任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (String userId : certificationEngineerIdList) {
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(userId);
processInfoDetailEO.setTaskDefinitionKey(CertificationFlowNodeEnum.RZGCSSC.getKey());
processInfoDetailEO.setCreateTime(new Date());
processInfoDetailEO.setStatus(TaskStatusEnum.NOT_DONE.getValue());
processInfoDetailEO.setProcessInfoId(projectLibraryBase.getId());
processInfoDetailEO.setActiProcInstId(projectLibraryBase.getId());
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEOList.add(processInfoDetailEO);
}
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
}
}
}
}
/** /**
* 通过id删除 * 通过id删除
* *
+5
View File
@@ -1717,6 +1717,7 @@ module.exports = {
complianceReporting:'Compliance Reporting', complianceReporting:'Compliance Reporting',
youCanOnlySelectStatusClearSubmit:'You can only select data with a process status of Clear to Submit', 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', 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', format:'It supports doc/docx/pdf format and is less than 50M in size',
cantTransferToYourself:"Can't transfer to yourself", cantTransferToYourself:"Can't transfer to yourself",
theDataYouInitiate:'The data you selected does not meet the process initiation criteria. Please recheck and initiate', theDataYouInitiate:'The data you selected does not meet the process initiation criteria. Please recheck and initiate',
@@ -1725,4 +1726,8 @@ module.exports = {
noteone:'Note: CSV format is supported. The value is within 20M and the number is 1 to 10', noteone:'Note: CSV format is supported. The value is within 20M and the number is 1 to 10',
notetwo:'\n1. Provide the modified or expanded batch of "Announcement" and supporting materials;\n2. Verification materials shall be submitted to ensure that products meet the relevant requirements of national laws and regulations, technologies, standards and technical specifications;\n', notetwo:'\n1. Provide the modified or expanded batch of "Announcement" and supporting materials;\n2. Verification materials shall be submitted to ensure that products meet the relevant requirements of national laws and regulations, technologies, standards and technical specifications;\n',
notethree:'Provide supporting materials', notethree:'Provide supporting materials',
verifyComplianceConfirmReturnReason:'Verify compliance Confirm return reason',
theDeliverablesCannotReferencedPleaseReselect:'The deliverables of this project cannot be referenced, please reselect',
regulationListModuleMaintenance:'Regulation list module maintenance',
regulationListModule:'Regulation list module',
} }
+7 -2
View File
@@ -1821,10 +1821,15 @@ module.exports = {
note:'注:附件包括测试项目清单、测试报告.测试标准或技术规范', note:'注:附件包括测试项目清单、测试报告.测试标准或技术规范',
format:'支持doc/docx/pdf格式,大小50M以内', format:'支持doc/docx/pdf格式,大小50M以内',
cantTransferToYourself:"不能转办给自己", cantTransferToYourself:"不能转办给自己",
noteone:'注:支持CSV格式,大小20M以内,数量1-10个', noteone:'注:支持CSV格式,大小20M以内,数量1-20个',
notecsv:'注:支持CSV格式,大小20M以内',
theDataYouInitiate:'您所选的数据,均不符合流程发起条件,请重新检查后发起', theDataYouInitiate:'您所选的数据,均不符合流程发起条件,请重新检查后发起',
dataWithProcessReleasedCannotBeReset:'流程状态为清单待发布的数据不能被重置', dataWithProcessReleasedCannotBeReset:'流程状态为清单待发布的数据不能被重置',
reasonForReturnOfDesignCompliance:'设计符合性退回原因', reasonForReturnOfDesignCompliance:'设计符合性确认退回原因',
notetwo:'\n1、提供变更或扩展后的《公告》批次及证明材料;\n2、应提交验证材料,保障产品符合国家法律法规、技术、标准及技术规范等相关要求;\n', notetwo:'\n1、提供变更或扩展后的《公告》批次及证明材料;\n2、应提交验证材料,保障产品符合国家法律法规、技术、标准及技术规范等相关要求;\n',
notethree:'\n提供证明材料\n', notethree:'\n提供证明材料\n',
verifyComplianceConfirmReturnReason:'验证符合性确认退回原因',
theDeliverablesCannotReferencedPleaseReselect:'不能引用本项目的交付物,请重新选择',
regulationListModuleMaintenance:'法规清单模块维护',
regulationListModule:'法规清单模块',
} }
+5 -5
View File
@@ -133,7 +133,7 @@
// } // }
// } // }
// } // }
this.$message.destroy() // this.$message.destroy()
}, },
remove() { remove() {
this.fileTypeSatus = true this.fileTypeSatus = true
@@ -153,7 +153,7 @@
}) })
if (status === 'error') { if (status === 'error') {
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() // this.$message.destroy()
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed')) this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') { } else if (status === 'removed') {
this.myfileList = info.fileList this.myfileList = info.fileList
@@ -167,7 +167,7 @@
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) { if (this.myfileList.length > 0) {
this.$message.destroy() // this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully')) this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
} }
} else if (status === 'done') { } else if (status === 'done') {
@@ -184,7 +184,7 @@
} }
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() // this.$message.destroy()
this.$message.error(this.$t('UploadMost')) this.$message.error(this.$t('UploadMost'))
return return
} }
@@ -197,7 +197,7 @@
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) { if (this.myfileList.length > 0) {
this.$message.destroy() // this.$message.destroy()
if (file.response.success) { if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully')) this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
} }
@@ -109,7 +109,7 @@
// this.fileTypeSatus = false; // this.fileTypeSatus = false;
// } // }
// } // }
this.$message.destroy() // this.$message.destroy()
}, },
remove() { remove() {
this.fileTypeSatus = true this.fileTypeSatus = true
@@ -133,7 +133,7 @@
}) })
if (status === 'error') { if (status === 'error') {
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() // this.$message.destroy()
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed')) this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') { } else if (status === 'removed') {
this.myfileList = info.fileList this.myfileList = info.fileList
@@ -147,7 +147,7 @@
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) { if (this.myfileList.length > 0) {
this.$message.destroy() // this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully')) this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
} }
} else if (status === 'done') { } else if (status === 'done') {
@@ -164,7 +164,7 @@
} }
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() // this.$message.destroy()
this.$message.error(this.$t('UploadMost')) this.$message.error(this.$t('UploadMost'))
return return
} }
@@ -177,7 +177,7 @@
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) { if (this.myfileList.length > 0) {
this.$message.destroy() // this.$message.destroy()
if (file.response.success) { if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully')) this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
} }
@@ -135,7 +135,7 @@ import { mapGetters } from 'vuex'
// this.fileTypeSatus = false; // this.fileTypeSatus = false;
// } // }
// } // }
this.$message.destroy() // this.$message.destroy()
}, },
remove() { remove() {
this.fileTypeSatus = true this.fileTypeSatus = true
@@ -159,7 +159,7 @@ import { mapGetters } from 'vuex'
}) })
if (status === 'error') { if (status === 'error') {
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() // this.$message.destroy()
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed')) this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') { } else if (status === 'removed') {
this.myfileList = info.fileList this.myfileList = info.fileList
@@ -173,7 +173,7 @@ import { mapGetters } from 'vuex'
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) { if (this.myfileList.length > 0) {
this.$message.destroy() // this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully')) this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
} }
} else if (status === 'done') { } else if (status === 'done') {
@@ -190,7 +190,7 @@ import { mapGetters } from 'vuex'
} }
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() // this.$message.destroy()
this.$message.error(this.$t('UploadMost')) this.$message.error(this.$t('UploadMost'))
return return
} }
@@ -203,7 +203,7 @@ import { mapGetters } from 'vuex'
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) { if (this.myfileList.length > 0) {
this.$message.destroy() // this.$message.destroy()
if (file.response.success) { if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully')) this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
} }
@@ -132,7 +132,7 @@
// this.fileTypeSatus = false; // this.fileTypeSatus = false;
// } // }
// } // }
this.$message.destroy() // this.$message.destroy()
}, },
remove() { remove() {
this.fileTypeSatus = true this.fileTypeSatus = true
@@ -152,7 +152,7 @@
}) })
if (status === 'error') { if (status === 'error') {
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() // this.$message.destroy()
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed')) this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') { } else if (status === 'removed') {
this.myfileList = info.fileList this.myfileList = info.fileList
@@ -166,7 +166,7 @@
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) { if (this.myfileList.length > 0) {
this.$message.destroy() // this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully')) this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
} }
} else if (status === 'done') { } else if (status === 'done') {
@@ -183,7 +183,7 @@
} }
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() // this.$message.destroy()
this.$message.error(this.$t('UploadMost')) this.$message.error(this.$t('UploadMost'))
return return
} }
@@ -196,7 +196,7 @@
}) })
this.$emit('uploadSuccess', this.fileList) this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) { if (this.myfileList.length > 0) {
this.$message.destroy() // this.$message.destroy()
if (file.response.success) { if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully')) this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
} }
@@ -6,7 +6,7 @@
<!-- <a-icon @click="iconClick" type="arrow-left" style="margin-right: 6px;font-size: 26px;"/>--> <!-- <a-icon @click="iconClick" type="arrow-left" style="margin-right: 6px;font-size: 26px;"/>-->
<!-- </span>--> <!-- </span>-->
<span> <span>
{{isTrue ? $t('maintainVirtualList'):$t('virtualListDetails')}} {{isTrue ? $t('regulationListModuleMaintenance'):$t('regulationListModuleMaintenance')}}
</span> </span>
</div> </div>
<div class="Virtual-detail-right"> <div class="Virtual-detail-right">
@@ -23,8 +23,8 @@
<div class="Virtual-detail-content"> <div class="Virtual-detail-content">
<div class="box-title-text-add"> <div class="box-title-text-add">
<div class="title-text-add"> <div class="title-text-add">
<span class="text-left" :title="$t('VirtualListName')"> <span class="text-left" :title="$t('regulationListModule')">
{{$t('VirtualListName')}} {{$t('regulationListModule')}}
</span> </span>
<span class="text-right" style="margin-right: 100px" :title="$route.query.name"> <span class="text-right" style="margin-right: 100px" :title="$route.query.name">
{{$route.query.name}} {{$route.query.name}}
@@ -20,6 +20,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="bazt"> <a-form-model-item class="itemModel" prop="bazt">
<j-dict-select-tag class="box-input" v-model="formInline.bazt" <j-dict-select-tag class="box-input" v-model="formInline.bazt"
@input="selectchange"
:placeholder="$t('PleaseSelect')+$t('recordstatus')" :placeholder="$t('PleaseSelect')+$t('recordstatus')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'recordstatus'"/> :triggerChange="false" :dictCode="'recordstatus'"/>
@@ -77,7 +78,7 @@ export default {
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
formInline: { formInline: {
bazt:'', bazt:undefined,
batjsj:'', batjsj:'',
bz:'', bz:'',
}, },
@@ -196,6 +197,12 @@ export default {
} }
}) })
}, },
selectchange(value){
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField('bazt')
})
},
handleCancel() { handleCancel() {
this.formInline = { this.formInline = {
bazt:undefined, bazt:undefined,
@@ -13,13 +13,13 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" :rules="rules" ref="ruleForm"> <a-form-model :model="formInline" :rules="rules" ref="ruleForm">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24"> <a-col :span="20">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="$t ('implementedupgrade')">{{$t('implementedupgrade')}}</span> <span class="title-text-text" :title="$t ('implementedupgrade')">{{$t('implementedupgrade')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="implementedupgrade"> <a-form-model-item class="itemModel" prop="implementedupgrade">
<a-radio-group style="margin-top: 2px" class="box-input" v-model="formInline.implementedupgrade"> <a-radio-group style="margin-top: 2px" class="box-input" v-model="formInline.implementedupgrade" :disabled="disabled">
<a-radio value="0"> <a-radio value="0">
{{$t('yes')}} {{$t('yes')}}
</a-radio> </a-radio>
@@ -27,16 +27,13 @@
{{$t('not')}} {{$t('not')}}
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
<!-- <j-dict-select-tag class="box-input"-->
<!-- :disabled="disabled"-->
<!-- @input="handleInput('implementedupgrade')"-->
<!-- v-model="formInline.implementedupgrade"-->
<!-- :placeholder="$t('PleaseSelect')+$t('implementedupgrade')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="4" v-if="showButton">
<a-button type="primary" @click="isEdit">编辑</a-button>
</a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
@@ -61,11 +58,13 @@
</div> </div>
<a-form-model-item class="itemModel" prop="VINcodelist"> <a-form-model-item class="itemModel" prop="VINcodelist">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
:disabled="disabled"
@click="clickButtonToUpload('VINcodelist')"> @click="clickButtonToUpload('VINcodelist')">
{{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || {{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' ||
formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
<p>{{$t('notecsv')}}</p>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -75,7 +74,7 @@
{{$t('vehicleshavenotcompletedonlineupgrade')}} {{$t('vehicleshavenotcompletedonlineupgrade')}}
<a-icon class="icon-text" @click="addClick(index)" type="plus-circle"/> <a-icon class="icon-text" @click="addClick(index)" type="plus-circle"/>
<a-icon class="icon-text" v-if="formInline.dataList.length > 1" @click="deleteClick(index)" <a-icon class="icon-text" v-if="formInline.dataList.length > 1" @click="deleteClick(index)"
type="minus-circle"/> type="minus-circle" :disabled="disabled"/>
</div> </div>
<div style='margin-left: 25px'> <div style='margin-left: 25px'>
<a-row :gutter="24"> <a-row :gutter="24">
@@ -86,6 +85,7 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled"
v-model="item.cause" v-model="item.cause"
:placeholder="$t('PleaseEnter')+$t('cause')"/> :placeholder="$t('PleaseEnter')+$t('cause')"/>
</a-form-model-item> </a-form-model-item>
@@ -101,6 +101,7 @@
<!-- {max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'}]"--> <!-- {max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'}]"-->
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled"
v-model="item.Quantity" v-model="item.Quantity"
:placeholder="$t('PleaseEnter')+$t('Quantity')"/> :placeholder="$t('PleaseEnter')+$t('Quantity')"/>
</a-form-model-item> </a-form-model-item>
@@ -118,11 +119,13 @@
<!-- {max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'}]"--> <!-- {max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'}]"-->
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
:disabled="disabled"
@click="clickButtonToUpload('VINcodelist')"> @click="clickButtonToUpload('VINcodelist')">
{{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || {{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' ||
formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
<p style='width: 243px'>{{$t('format')}}</p>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -138,6 +141,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="implementationrecords"> <a-form-model-item class="itemModel" prop="implementationrecords">
<a-textarea :placeholder="$t('pleaseEnter')+$t('implementationrecords')" <a-textarea :placeholder="$t('pleaseEnter')+$t('implementationrecords')"
:disabled="disabled"
:rows="2" v-model="formInline.remarks"/> :rows="2" v-model="formInline.remarks"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -151,11 +155,12 @@
</div> </div>
<a-form-model-item class="itemModel" prop="VINcodelist"> <a-form-model-item class="itemModel" prop="VINcodelist">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload('VINcodelist')"> @click="clickButtonToUpload('VINcodelist1')">
{{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || {{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' ||
formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
<p>{{$t('format')}}</p>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -167,7 +172,7 @@
<a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/> <uploadFile ref="uploadFile" :acceptcode="acceptcode" @uploadSuccess="uploadSuccess"/>
</div> </div>
</template> </template>
@@ -179,7 +184,6 @@ import { mapGetters } from 'vuex'
export default { export default {
name:"addModel", name:"addModel",
props: ['url'],
components:{ components:{
uploadFile uploadFile
}, },
@@ -187,8 +191,10 @@ export default {
return { return {
visible: false, visible: false,
disabled: false, disabled: false,
showButton:false,
formInline: {}, formInline: {},
confirmLoading: false, confirmLoading: false,
acceptcode:'',
projectNameList: [], projectNameList: [],
DeliverableTreeList: [], DeliverableTreeList: [],
rules: { rules: {
@@ -219,6 +225,9 @@ export default {
} }
], ],
}, },
url:{
addModel:''
}
} }
}, },
mounted() { mounted() {
@@ -226,14 +235,17 @@ export default {
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
addModel() { addModel(flag) {
if(flag=='1')
this.disabled=true
this.showButton=true
this.visible = true this.visible = true
this.formInline = {} this.formInline = {}
this.formInline.dataList = [{}] this.formInline.dataList = [{}]
this.$nextTick(() => { this.$nextTick(() => {
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
this.$refs.codeNumber.number() // this.$refs.codeNumber.number()
}) })
}, },
handleCancel() { handleCancel() {
@@ -251,17 +263,18 @@ export default {
this.formInline.authDummyInventoryBaseId = this.$route.query.id this.formInline.authDummyInventoryBaseId = this.$route.query.id
let query = JSON.parse(JSON.stringify(this.formInline)) let query = JSON.parse(JSON.stringify(this.formInline))
this.confirmLoading = true this.confirmLoading = true
postAction(this.url.addModel, query).then((res) => { // postAction(this.url.addModel, query).then((res) => {
if (res.success) { // if (res.success) {
this.confirmLoading = false // this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful')) // this.$message.success(this.$t('OperationSuccessful'))
// } else {
// this.$message.warning(res.message)
// this.confirmLoading = false
// }
// })
this.visible = false this.visible = false
this.$emit('addModelList') this.$emit('addModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
} }
}) })
}, },
@@ -302,6 +315,11 @@ export default {
}) })
}, },
clickButtonToUpload(item) { clickButtonToUpload(item) {
if(item == 'VINcodelist'){
this.acceptcode = 'csv'
}else {
this.acceptcode = 'doc,docx,pdf'
}
this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true this.$refs.uploadFile.visible = true
this.uploadName = item this.uploadName = item
@@ -325,6 +343,9 @@ export default {
this.formInline[this.uploadName] = attIdList.join(',') this.formInline[this.uploadName] = attIdList.join(',')
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}, },
isEdit(){
this.disabled=false
}
} }
} }
</script> </script>
@@ -141,8 +141,11 @@
@click="detailclick(record)">{{$t('See')}}</a> @click="detailclick(record)">{{$t('See')}}</a>
<a class="text-operation" <a class="text-operation"
@click="maintenanceClick(record)">{{$t('maintenance')}}</a> @click="maintenanceClick(record)">{{$t('maintenance')}}</a>
<a class="text-operation" <a class="text-operation"
@click="endUpgrade(record)">{{$t('endUpgrade')}}</a> @click="endUpgrade(record , '0')" v-if="!onShow">{{$t('endUpgrade')}}</a>
<a class="text-operation"
@click="endUpgrade(record , '1')" v-if="onShow">{{$t('upgradecompletion')}}</a>
<a class="text-operation" <a class="text-operation"
@click="handleExport(record)">{{$t('export')}}</a> @click="handleExport(record)">{{$t('export')}}</a>
<a class="text-operation" <a class="text-operation"
@@ -164,7 +167,7 @@
</div> </div>
</div> </div>
<maintenance @getList="getList" ref="maintenanceRef"/> <maintenance @getList="getList" ref="maintenanceRef"/>
<upgradecompletion ref="upgradecompletionRef"/> <upgradecompletion ref="upgradecompletionRef" @addModelList="addModelList"/>
</a-card> </a-card>
</template> </template>
@@ -288,7 +291,7 @@ export default {
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
width: 170, width: 170,
dataIndex: 'cjsj' dataIndex: 'createTime'
}, },
{ {
title: this.$t('remarks'), title: this.$t('remarks'),
@@ -306,7 +309,8 @@ export default {
} }
], ],
userInfoQuery: {}, userInfoQuery: {},
administrators: false administrators: false,
onShow:false
} }
}, },
mounted() { mounted() {
@@ -440,8 +444,8 @@ export default {
downloadFile(this.url.exportData, text + '.xls', query, this.Deselect) downloadFile(this.url.exportData, text + '.xls', query, this.Deselect)
}, },
// 结束升级 // 结束升级
endUpgrade(){ endUpgrade(record,flag){
this.$refs.upgradecompletionRef.addModel() this.$refs.upgradecompletionRef.addModel(flag)
}, },
// 查看 // 查看
detailclick(){ detailclick(){
@@ -464,6 +468,9 @@ export default {
handleModule(){ handleModule(){
downloadFile('params/paramsInfo/exportTemplate', this.$t('parameterTemplateExportName') + '.xlsx', {}) downloadFile('params/paramsInfo/exportTemplate', this.$t('parameterTemplateExportName') + '.xlsx', {})
}, },
addModelList(){
this.onShow=true
}
} }
} }
</script> </script>
@@ -23,25 +23,25 @@
style="margin-bottom: 20px" style="margin-bottom: 20px"
> >
<span slot="functionname" slot-scope="text,record"> <span slot="functionname" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.gnmc"></a-input> <a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.gnmc" :max-length="50"></a-input>
</span> </span>
<span slot="upgradedestinationype" slot-scope="text,record"> <span slot="upgradedestinationype" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sjmdlx"></a-input> <a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sjmdlx" :max-length="50"></a-input>
</span> </span>
<span slot="preupgrade" slot-scope="text,record"> <span slot="preupgrade" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjqbgcs"></a-input> <a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjqbgcs" :max-length="500"></a-input>
</span> </span>
<span slot="afterupgrade" slot-scope="text,record"> <span slot="afterupgrade" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjhbgcs"></a-input> <a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjhbgcs":max-length="500"></a-input>
</span> </span>
<span slot="functionalchangedescription" slot-scope="text,record"> <span slot="functionalchangedescription" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.gnbgms" ></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.gnbgms" :max-length="500"></a-input>
</span> </span>
<span slot="variationofapplicableconditions" slot-scope="text,record"> <span slot="variationofapplicableconditions" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sytjbg"></a-input> <a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sytjbg" :max-length="500"></a-input>
</span> </span>
<span slot="upgradetheelectroniccontrollerinvolved" slot-scope="text,record"> <span slot="upgradetheelectroniccontrollerinvolved" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sjsjkzq"></a-input> <a-input :placeholder="$t('pleaseEnter')" :title="$t('ifNot')" v-model="record.sjsjkzq" :max-length="500"></a-input>
</span> </span>
@@ -53,7 +53,11 @@
</span> </span>
</a-table> </a-table>
<div> <div>
<a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button> <a-button type="primary" @click="clickButtonToUpload(fileList)">
{{ (fileList === 'null' || fileList === '' ||
fileList == null) ? $t('uploadattachment') : $t('viewUploadedFiles')
}}
</a-button>
<div style='margin-top: 20px'> <div style='margin-top: 20px'>
<p>{{$t('note')}}</p> <p>{{$t('note')}}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;{{$t('format')}}</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;{{$t('format')}}</p>
@@ -64,7 +68,7 @@
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
@@ -86,6 +90,7 @@ export default {
} }
], ],
fileList:'',
loading: false, loading: false,
disable:false, disable:false,
columns: [ columns: [
@@ -216,14 +221,41 @@ export default {
} }
getAction('/ota/otaBaSjSjfzbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{ getAction('/ota/otaBaSjSjfzbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
this.dataSource =res.result.list == null ? {} : res.result.list this.dataSource =res.result.list == null ? {} : res.result.list
this.fileList = res.result.fj
}) })
}, },
save(){ 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}).then(res=>{
console.log(res); if(res.code==200){
this.$message.success(this.$t('SavedSuccessfully')) this.$message.success(this.$t('SavedSuccessfully'))
this.getData()
}
}) })
}, },
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(){ last(){
this.save() this.save()
this.$emit('beupgradedonlineup') this.$emit('beupgradedonlineup')
@@ -239,20 +271,6 @@ export default {
deleteData(record){ deleteData(record){
this.dataSource.splice(this.dataSource.indexOf(record),1) 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')
},
} }
} }
</script> </script>
@@ -12,7 +12,8 @@
<a-form-model-item class="itemModel" prop="dutyTerritory"> <a-form-model-item class="itemModel" prop="dutyTerritory">
<a-input <a-input
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
v-model.trim="queryParam.rwmc"></a-input> v-model.trim="queryParam.rwmc"
:max-length="500"></a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -108,8 +109,10 @@ export default {
} }
this.queryParam.otaId = otaId this.queryParam.otaId = otaId
postAction('/ota/otaBaSjQtsjxx/add' ,this.queryParam).then(res=>{ postAction('/ota/otaBaSjQtsjxx/add' ,this.queryParam).then(res=>{
this.$message.success(this.$t('SavedSuccessfully')) if(res.code==200){
console.log(res); this.$message.success(this.$t('SavedSuccessfully'))
this.getData()
}
}) })
}, },
@@ -54,7 +54,8 @@
<a-form-model-item class="itemModel" prop="VINcodelist"> <a-form-model-item class="itemModel" prop="VINcodelist">
<a-textarea :placeholder="$t('pleaseEnter')+$t('VINcodelist')" <a-textarea :placeholder="$t('pleaseEnter')+$t('VINcodelist')"
v-model="formInline.vinList" v-model="formInline.vinList"
:rows="4"/> :rows="4"
:max-length="500"/>
</a-form-model-item> </a-form-model-item>
<!-- <a-form-model-item class="itemModel" prop="VINcodelist">--> <!-- <a-form-model-item class="itemModel" prop="VINcodelist">-->
<!-- <a-button type="primary" class="button-text"--> <!-- <a-button type="primary" class="button-text"-->
@@ -72,15 +73,15 @@
<!-- <span class="Required">*</span>--> <!-- <span class="Required">*</span>-->
<span class="title-text-text"></span> <span class="title-text-text"></span>
</div> </div>
<a-form-model-item class="itemModel" prop="VINcodelist"> <a-form-model-item class="itemModel" prop="csv">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload('VINcodelist')"> @click="clickButtonToUpload('csv')">
{{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || {{ (formInline.csv === 'null' || formInline.csv === '' ||
formInline.VINcodelist == null) ? $t('VINcodeupload') : $t('viewUploadedFiles') formInline.csv == null) ? $t('VINcodeupload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
<p>{{$t('noteone')}}</p> <p>{{$t('noteone')}}</p>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'csv'" @uploadSuccess="uploadSuccess"></uploadFile>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -139,6 +140,7 @@ export default {
if(res.code==200){ if(res.code==200){
this.formInline.zsl=res.result.zsl this.formInline.zsl=res.result.zsl
this.formInline.vinList=res.result.vinList this.formInline.vinList=res.result.vinList
this.formInline.csv=res.result.csv
this.formInline.dateofproduction=[] this.formInline.dateofproduction=[]
this.formInline.dateofproduction.push(res.result.scrqks) this.formInline.dateofproduction.push(res.result.scrqks)
this.formInline.dateofproduction.push(res.result.scrqjs) this.formInline.dateofproduction.push(res.result.scrqjs)
@@ -152,6 +154,7 @@ export default {
let obj={} let obj={}
obj.otaId=localStorage.getItem('otaId') obj.otaId=localStorage.getItem('otaId')
obj.zsl = this.formInline.zsl obj.zsl = this.formInline.zsl
obj.csv = this.formInline.csv
if(this.formInline.dateofproduction){ if(this.formInline.dateofproduction){
obj.scrqks = this.formInline.dateofproduction[0] obj.scrqks = this.formInline.dateofproduction[0]
obj.scrqjs = this.formInline.dateofproduction[1] obj.scrqjs = this.formInline.dateofproduction[1]
@@ -162,7 +165,10 @@ export default {
obj.vinList = this.formInline.vinList obj.vinList = this.formInline.vinList
postAction('/ota/otaBaSjSjmbcl/add',obj).then(res=>{ postAction('/ota/otaBaSjSjmbcl/add',obj).then(res=>{
if(res.code==200){
this.$message.success(this.$t('SavedSuccessfully')) this.$message.success(this.$t('SavedSuccessfully'))
this.getData()
}
}) })
}, },
next(){ next(){
@@ -188,6 +194,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)
}
},
} }
} }
</script> </script>
@@ -23,39 +23,39 @@
style="margin-bottom: 20px" style="margin-bottom: 20px"
> >
<span slot="systemname" slot-scope="text,record"> <span slot="systemname" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.xtmc" :max-length="50"></a-input>
</span> </span>
<!-- 升级前--> <!-- 升级前-->
<span slot="preupgrade" slot-scope="text,record"> <span slot="preupgrade" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjqbgcs"></a-input> <a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjqbgcs" :max-length="500"></a-input>
</span> </span>
<!-- 升级后--> <!-- 升级后-->
<span slot="afterupgrade" slot-scope="text,record"> <span slot="afterupgrade" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjhbgcs"></a-input> <a-input :placeholder="$t('ifNot')" :title="$t('ifNot')" v-model="record.sjhbgcs" :max-length="500"></a-input>
</span> </span>
<span slot="nameoftheupgradedelectroniccontroller" slot-scope="text,record"> <span slot="nameoftheupgradedelectroniccontroller" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjkzqmc" ></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjkzqmc" :max-length="50"></a-input>
</span> </span>
<span slot="adaptivehardwareversion" slot-scope="text,record"> <span slot="adaptivehardwareversion" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.yjbb"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.yjbb" :max-length="50"></a-input>
</span> </span>
<span slot="beforethesoftwareversionupgraded" slot-scope="text,record"> <span slot="beforethesoftwareversionupgraded" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjqrjbb" ></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjqrjbb" :max-length="50"></a-input>
</span> </span>
<span slot="afterthesoftwareversionupgraded" slot-scope="text,record"> <span slot="afterthesoftwareversionupgraded" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjhrjbb"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjhrjbb" :max-length="50"></a-input>
</span> </span>
<span slot="beforetheOSversionupgraded" slot-scope="text,record"> <span slot="beforetheOSversionupgraded" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjqczxt"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjqczxt" :max-length="50"></a-input>
</span> </span>
<span slot="aftertheoperatingsystemversionupgraded" slot-scope="text,record"> <span slot="aftertheoperatingsystemversionupgraded" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjhczxt"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjhczxt" :max-length="50"></a-input>
</span> </span>
<span slot="upgradepackageintegrityverificationdata" slot-scope="text,record"> <span slot="upgradepackageintegrityverificationdata" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjbyzsj" ></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjbyzsj" :max-length="500"></a-input>
</span> </span>
<span slot="upgradepackagesize" slot-scope="text,record"> <span slot="upgradepackagesize" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjbdx"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjbdx" :max-length="50"></a-input>
</span> </span>
<span slot="differentialupgradeornot" slot-scope="text,record"> <span slot="differentialupgradeornot" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sfcfsj"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sfcfsj"></a-input>
@@ -290,8 +290,10 @@ export default {
}, },
save(){ save(){
postAction('/ota/otaBaSjSjxtbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{ postAction('/ota/otaBaSjSjxtbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{
console.log(res); if(res.code==200){
this.$message.success(this.$t('SavedSuccessfully')) this.$message.success(this.$t('SavedSuccessfully'))
this.getData()
}
}) })
}, },
last(){ last(){
@@ -63,7 +63,12 @@
</span> </span>
</a-layout-content> </a-layout-content>
<a-layout-content style='border: black solid 1px;border-left: none;border-bottom: none;max-width: 428px'> <a-layout-content style='border: black solid 1px;border-left: none;border-bottom: none;max-width: 428px'>
<a-button style='margin-top: 15%;margin-left: 10%;' @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button> <a-button type="primary" style='margin-top: 15%;margin-left: 10%;'
@click="clickButtonToUpload('bgfj')">
{{ (form.bgfj === 'null' || form.bgfj === '' ||
form.bgfj == null) ? $t('uploadattachment') : $t('viewUploadedFiles')
}}
</a-button>
<span class="spanone">{{$t('notetwo')}}</span> <span class="spanone">{{$t('notetwo')}}</span>
<span class="spanone">{{$t('format')}}</span> <span class="spanone">{{$t('format')}}</span>
</a-layout-content> </a-layout-content>
@@ -135,7 +140,12 @@
</span> </span>
</div> </div>
<div class='layout-box-three'> <div class='layout-box-three'>
<a-button style='margin-top: 15%;margin-left: 10%;' @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button> <a-button type="primary" style='margin-top: 15%;margin-left: 10%;'
@click="clickButtonToUpload('clfj')">
{{ (form.clfj === 'null' || form.clfj === '' ||
form.clfj == null) ? $t('uploadattachment') : $t('viewUploadedFiles')
}}
</a-button>
<span class="spanone">{{$t('notethree')}}</span> <span class="spanone">{{$t('notethree')}}</span>
<span class="spanone">{{$t('format')}}</span> <span class="spanone">{{$t('format')}}</span>
</div> </div>
@@ -146,7 +156,7 @@
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
@@ -331,7 +341,7 @@ this.$forceUpdate()
this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true this.$refs.uploadFile.visible = true
this.uploadName = item 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) { if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result) this.$refs.uploadFile.perentHandleFunc(res.result)
} else { } else {
@@ -339,33 +349,22 @@ this.$forceUpdate()
} }
}) })
}, },
getList() { uploadSuccess(data) {
let queryParam = JSON.parse(JSON.stringify(this.queryParam)) let attIdList = []
Object.keys(queryParam).forEach(val => { if(data && data.length>0){
if (queryParam[val] instanceof Array) { data.map(item => {
queryParam[val] = queryParam[val].join(',') attIdList.push(item.id || data.name)
} })
}) /** 赋值给当前对应的表单文件 */
let query = { this.form[this.uploadName] = attIdList.join(',')
pageNo: this.pageNo, this.form = { ...this.form }
pageSize: this.pageSize, // console.log('form',this.formInline)
...queryParam }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(){ getData(){
let otaIdT=localStorage.getItem('otaIdT') let otaIdT=localStorage.getItem('otaIdT')
@@ -399,8 +398,10 @@ this.$forceUpdate()
} }
this.form.otaId=otaId this.form.otaId=otaId
postAction('/ota/otaBaSjSjyxpg/add',this.form).then(res=>{ postAction('/ota/otaBaSjSjyxpg/add',this.form).then(res=>{
this.$message.success(this.$t('SavedSuccessfully')) if(res.code==200){
console.log(res); this.$message.success(this.$t('SavedSuccessfully'))
this.getData()
}
}) })
}, },
last(){ last(){
@@ -411,20 +412,6 @@ this.$forceUpdate()
this.save() this.save()
this.$emit('safetyPrecautionsdown') 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')
},
} }
} }
</script> </script>
@@ -207,8 +207,11 @@ import ImportFile from '@/components/ImportFileData/index'
otaId='' otaId=''
} }
postAction('/ota/otaBaSjSjmbcx/add',{otaId:otaId,...this.form}).then(res=>{ postAction('/ota/otaBaSjSjmbcx/add',{otaId:otaId,...this.form}).then(res=>{
this.$message.success(this.$t('SavedSuccessfully')) if(res.code==200){
localStorage.setItem('otaId', res.result.otaId) localStorage.setItem('otaId', res.result.otaId)
this.$message.success(this.$t('SavedSuccessfully'))
this.getData()
}
}) })
}, },
next(){ next(){
@@ -22,6 +22,7 @@
<a-form-model-item class="itemModel" prop="sjmd"> <a-form-model-item class="itemModel" prop="sjmd">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
:max-length="500"
v-model='formInline.sjmd' v-model='formInline.sjmd'
:placeholder="$t('pleaseEnter')"></a-input> :placeholder="$t('pleaseEnter')"></a-input>
</a-form-model-item> </a-form-model-item>
@@ -35,6 +36,7 @@
<a-form-model-item class="itemModel" prop="gxbh"> <a-form-model-item class="itemModel" prop="gxbh">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
:max-length="500"
v-model='formInline.gxbh' v-model='formInline.gxbh'
:placeholder="$t('pleaseEnter')"></a-input> :placeholder="$t('pleaseEnter')"></a-input>
</a-form-model-item> </a-form-model-item>
@@ -48,6 +50,7 @@
<a-form-model-item class="itemModel" prop="sjsj"> <a-form-model-item class="itemModel" prop="sjsj">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
:max-length="50"
v-model='formInline.sjsj' v-model='formInline.sjsj'
:placeholder="$t('pleaseEnter')"></a-input> :placeholder="$t('pleaseEnter')"></a-input>
</a-form-model-item> </a-form-model-item>
@@ -61,6 +64,7 @@
<a-form-model-item class="itemModel" prop="sjky"> <a-form-model-item class="itemModel" prop="sjky">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
:max-length="50"
v-model='formInline.sjky' v-model='formInline.sjky'
:placeholder="$t('pleaseEnter')"></a-input> :placeholder="$t('pleaseEnter')"></a-input>
</a-form-model-item> </a-form-model-item>
@@ -74,6 +78,7 @@
<a-form-model-item class="itemModel" prop="sjbkygn"> <a-form-model-item class="itemModel" prop="sjbkygn">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
:max-length="50"
v-model='formInline.sjbkygn' v-model='formInline.sjbkygn'
:placeholder="$t('pleaseEnter')"></a-input> :placeholder="$t('pleaseEnter')"></a-input>
</a-form-model-item> </a-form-model-item>
@@ -87,6 +92,7 @@
<a-form-model-item class="itemModel" prop="zdxx"> <a-form-model-item class="itemModel" prop="zdxx">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
:max-length="500"
v-model='formInline.zdxx' v-model='formInline.zdxx'
:placeholder="$t('pleaseEnter')"></a-input> :placeholder="$t('pleaseEnter')"></a-input>
</a-form-model-item> </a-form-model-item>
@@ -170,7 +176,7 @@
<a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button> <a-button type="primary" style='width: 73px;margin-right: 50px' @click='last'>{{$t('last')}}</a-button>
<a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button> <a-button type="primary" style='width: 73px' @click='next'>{{$t('next')}}</a-button>
</div> </div>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :acceptcode="'doc,docx,pdf'" @uploadSuccess="uploadSuccess"></uploadFile>
</div> </div>
</template> </template>
@@ -252,8 +258,10 @@ export default {
} }
this.formInline.otaId = otaId this.formInline.otaId = otaId
postAction('/ota/otaBaSjGgnrfs/add' ,this.formInline).then(res=>{ postAction('/ota/otaBaSjGgnrfs/add' ,this.formInline).then(res=>{
this.$message.success(this.$t('SavedSuccessfully')) if(res.code==200){
console.log(res); this.$message.success(this.$t('SavedSuccessfully'))
this.getData()
}
}) })
}, },
@@ -35,7 +35,7 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input <a-input
:max-length="500" :max-length="50"
:disabled="disabled" :disabled="disabled"
class="box-input" class="box-input"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
@@ -53,7 +53,7 @@
<a-form-model-item class="itemModel" prop="djbh"> <a-form-model-item class="itemModel" prop="djbh">
<a-input <a-input
:max-length="500" :max-length="50"
:disabled="disabled" :disabled="disabled"
class="box-input" class="box-input"
:placeholder="$t('pleaseEnter')" :placeholder="$t('pleaseEnter')"
@@ -89,7 +89,7 @@
:max-length="500" :max-length="500"
:disabled="disabled" :disabled="disabled"
class="box-input" class="box-input"
:placeholder="$t('PleaseSelect')" :placeholder="$t('pleaseEnter')"
v-model="form.ggpc"> v-model="form.ggpc">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
@@ -102,10 +102,10 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input <a-input
:max-length="500" :max-length="50"
:disabled="disabled" :disabled="disabled"
class="box-input" class="box-input"
:placeholder="$t('PleaseSelect')" :placeholder="$t('pleaseEnter')"
v-model="form.cpsb"> v-model="form.cpsb">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
@@ -118,10 +118,10 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input <a-input
:max-length="500" :max-length="50"
:disabled="disabled" :disabled="disabled"
class="box-input" class="box-input"
:placeholder="$t('PleaseSelect')" :placeholder="$t('pleaseEnter')"
v-model="form.cpmc"> v-model="form.cpmc">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
@@ -135,10 +135,10 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input <a-input
:max-length="500" :max-length="50"
:disabled="disabled" :disabled="disabled"
class="box-input" class="box-input"
:placeholder="$t('PleaseSelect')" :placeholder="$t('pleaseEnter')"
v-model="form.cpxh"> v-model="form.cpxh">
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
@@ -59,23 +59,23 @@
<a-input :placeholder="$t('ifNot')" :title="record.sytj ? record.sytj:$t('ifNot')" v-model="record.sytj" :max-length="500"></a-input> <a-input :placeholder="$t('ifNot')" :title="record.sytj ? record.sytj:$t('ifNot')" v-model="record.sytj" :max-length="500"></a-input>
</span> </span>
<span slot="functiondeelectronicscription" slot-scope="text,record"> <span slot="functiondeelectronicscription" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqmc" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqmc" :max-length="50"></a-input>
</span> </span>
<span slot="electroniccontrollerproductionenterprises" slot-scope="text,record"> <span slot="electroniccontrollerproductionenterprises" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqscqy" :max-length="500"> </a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqscqy" :max-length="50"> </a-input>
</span> </span>
<span slot="electroniccontrollertypeone" slot-scope="text,record"> <span slot="electroniccontrollertypeone" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqxh" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqxh" :max-length="50"></a-input>
</span> </span>
<span slot="hardwareversioninformation" slot-scope="text,record"> <span slot="hardwareversioninformation" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.yjbbxx" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.yjbbxx" :max-length="50"></a-input>
</span> </span>
<span slot="softwaredevelopmententerprise" slot-scope="text,record"> <span slot="softwaredevelopmententerprise" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.rjkfqy" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.rjkfqy" :max-length="50"></a-input>
</span> </span>
<span slot="operatingsystemversion" slot-scope="text,record"> <span slot="operatingsystemversion" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.czxtbbh" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.czxtbbh" :max-length="50"></a-input>
</span> </span>
<span slot="inflammatorydata" slot-scope="text,record"> <span slot="inflammatorydata" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.csyzsj" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.csyzsj" :max-length="500"></a-input>
@@ -218,7 +218,7 @@
<div style='width: 700px'> <div style='width: 700px'>
<span class='content-text' style='background: #f3f6f6;line-height: 50px;text-align: center;color: #191E29;font-weight: bold'>{{$t('fillincontent')}}</span> <span class='content-text' style='background: #f3f6f6;line-height: 50px;text-align: center;color: #191E29;font-weight: bold'>{{$t('fillincontent')}}</span>
<span v-for='(item,index) in dataSource' class='content-text'> <span v-for='(item,index) in dataSource' class='content-text'>
<a-input v-model="item.val" class="item-input" :placeholder="item.fillincontent" :max-length="500"/> <a-input v-model="item.val" class="item-input" :placeholder="item.fillincontent" :max-length="50"/>
</span><br> </span><br>
</div> </div>
</div> </div>
@@ -234,7 +234,7 @@
style="margin-bottom: 20px" style="margin-bottom: 20px"
> >
<span slot="componentname" slot-scope="text,record"> <span slot="componentname" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.bjmc" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.bjmc" :max-length="50"></a-input>
</span> </span>
<!-- 可升级--> <!-- 可升级-->
<span slot="systemclass" slot-scope="text,record" > <span slot="systemclass" slot-scope="text,record" >
@@ -244,22 +244,22 @@
</a-radio-group> </a-radio-group>
</span> </span>
<span slot="controllername" slot-scope="text,record"> <span slot="controllername" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqmc" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqmc" :max-length="50"></a-input>
</span> </span>
<span slot="hardwarespecificationmodel" slot-scope="text,record"> <span slot="hardwarespecificationmodel" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.yjggxh" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.yjggxh" :max-length="50"></a-input>
</span> </span>
<span slot="hardwaremanufacturer" slot-scope="text,record"> <span slot="hardwaremanufacturer" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.yjscqy" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.yjscqy" :max-length="50"></a-input>
</span> </span>
<span slot="softwareversion" slot-scope="text,record"> <span slot="softwareversion" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.rjbb" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.rjbb" :max-length="50"></a-input>
</span> </span>
<span slot="softwaredevelopmententerprise" slot-scope="text,record"> <span slot="softwaredevelopmententerprise" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.rjkfqy" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.rjkfqy" :max-length="50"></a-input>
</span> </span>
<span slot="layoutposition" slot-scope="text,record"> <span slot="layoutposition" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.bzwz" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.bzwz" :max-length="50"></a-input>
</span> </span>
<!-- 操作列--> <!-- 操作列-->
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
@@ -207,7 +207,7 @@ import ImportFile from '@/components/ImportFileData/index'
this.dataSource[2].info= res.result.sjsbcs this.dataSource[2].info= res.result.sjsbcs
this.dataSource[3].info= res.result.xxaqjz this.dataSource[3].info= res.result.xxaqjz
if(res.result.zmclList){ if(res.result.zmclList){
console.log(this.dataSource[0].certifyingmaterials = this.$t('viewFile')) this.dataSource[0].certifyingmaterials = this.$t('viewFile')
} }
this.fileList.uploadName = res.result.zmclList this.fileList.uploadName = res.result.zmclList
this.$refs.uploadFile.perentHandleFunc(this.fileList.uploadName) this.$refs.uploadFile.perentHandleFunc(this.fileList.uploadName)
@@ -229,7 +229,7 @@ export default {
this.dataSource[8].relevantverification=Number(res.result.sjgg) this.dataSource[8].relevantverification=Number(res.result.sjgg)
this.dataSource[9].relevantverification=Number(res.result.sjzt) this.dataSource[9].relevantverification=Number(res.result.sjzt)
if(res.result.zmclList){ if(res.result.zmclList){
console.log(this.dataSource[0].certifyingmaterials = this.$t('viewFile')) this.dataSource[0].certifyingmaterials = this.$t('viewFile')
} }
this.fileList.uploadName = res.result.zmclList this.fileList.uploadName = res.result.zmclList
this.$refs.uploadFile.perentHandleFunc(this.fileList.uploadName) this.$refs.uploadFile.perentHandleFunc(this.fileList.uploadName)
@@ -43,37 +43,37 @@
</a-button> </a-button>
</span> </span>
<span slot="electronicController" slot-scope="text,record"> <span slot="electronicController" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqmc" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqmc" :max-length="50"></a-input>
</span> </span>
<span slot="electroniccontrollername" slot-scope="text,record"> <span slot="electroniccontrollername" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.aqwzxdj" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.aqwzxdj" :max-length="50"></a-input>
</span> </span>
<span slot="electroniccontrollerproductionenterprises" slot-scope="text,record"> <span slot="electroniccontrollerproductionenterprises" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqscqy" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqscqy" :max-length="50"></a-input>
</span> </span>
<span slot="electroniccontrollertype" slot-scope="text,record"> <span slot="electroniccontrollertype" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqxh" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.kzqxh" :max-length="50"></a-input>
</span> </span>
<span slot="hardwareversioninformation" slot-scope="text,record"> <span slot="hardwareversioninformation" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.yjbbxx" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.yjbbxx" :max-length="50"></a-input>
</span> </span>
<span slot="initialsoftwareversionnumber" slot-scope="text,record"> <span slot="initialsoftwareversionnumber" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.csrjbbh" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.csrjbbh" :max-length="50"></a-input>
</span> </span>
<span slot="initialpackageforintegrityinflammatorydata" slot-scope="text,record"> <span slot="initialpackageforintegrityinflammatorydata" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.csrjbwzsj" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.csrjbwzsj" :max-length="500"></a-input>
</span> </span>
<span slot="environmentalprotection" slot-scope="text,record"> <span slot="environmentalprotection" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.sjsfyx" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.sjsfyx" :max-length="50"></a-input>
</span> </span>
<span slot="operatingsystemtype" slot-scope="text,record"> <span slot="operatingsystemtype" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.czxtlx" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.czxtlx" :max-length="50"></a-input>
</span> </span>
<span slot="operatingsystemmanufacturer" slot-scope="text,record"> <span slot="operatingsystemmanufacturer" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.czxtscqy" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.czxtscqy" :max-length="50"></a-input>
</span> </span>
<span slot="operatingsystemversion" slot-scope="text,record"> <span slot="operatingsystemversion" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.czxtbbh" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.czxtbbh" :max-length="50"></a-input>
</span> </span>
<!-- 操作列--> <!-- 操作列-->
<span slot="operation" slot-scope="text,record" > <span slot="operation" slot-scope="text,record" >
@@ -311,6 +311,7 @@ import uploadFileOta from '@/components/uploadFileOta/file'
if(otaIdT==null){ if(otaIdT==null){
otaIdT='' otaIdT=''
} }
let randomNum = Math.floor(Math.random()*99999999999+1)
getAction('/ota/otaBaCxKsjxtmccs/queryByOtaId',{otaIdT:otaIdT,otaId:localStorage.getItem('otaId')}).then(res=>{ getAction('/ota/otaBaCxKsjxtmccs/queryByOtaId',{otaIdT:otaIdT,otaId:localStorage.getItem('otaId')}).then(res=>{
if(res.code==200){ if(res.code==200){
if(res.result.list.length==0){ if(res.result.list.length==0){
@@ -341,8 +342,9 @@ import uploadFileOta from '@/components/uploadFileOta/file'
}, },
] ]
}else{ }else{
res.result.list.forEach(item =>{ res.result.list.forEach((item,index) =>{
item.sfksj =Number(item.sfksj) item.sfksj = Number(item.sfksj)
item.key = randomNum + index
}) })
this.dataSource=res.result.list this.dataSource=res.result.list
this.fileList = res.result.fj this.fileList = res.result.fj
@@ -256,7 +256,7 @@ export default {
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
width: 170, width: 170,
dataIndex: 'cjsj' dataIndex: 'createTime'
}, },
{ {
title: this.$t('remarks'), title: this.$t('remarks'),
@@ -96,16 +96,18 @@
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
ids: '' ids: '',
detailedWarningList: []
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
transferModel(ids) { transferModel(ids, detailedWarningList) {
this.visible = true this.visible = true
this.queryParam = {} this.queryParam = {}
this.detailedWarningList = detailedWarningList
this.selectedRowKeys = [] this.selectedRowKeys = []
this.ids = ids.join(',') this.ids = ids.join(',')
this.replacePage() this.replacePage()
@@ -154,10 +156,20 @@
handleCancel() { handleCancel() {
this.visible = false this.visible = false
}, },
failedMessageOne(data) {
let detailedWarningList = data
this.$warning({
content: ( < div > { detailedWarningList } < /div>)
})
},
handleSubmit() { handleSubmit() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
if (selectedRowKeys.join(',') == this.$route.query.id) {
this.$message.warning(this.$t('theDeliverablesCannotReferencedPleaseReselect'))
return
}
this.confirmLoading = true
postAction('/project/projectCertificationInventoryEO/citeDeliverable', { postAction('/project/projectCertificationInventoryEO/citeDeliverable', {
projectCertificationInventoryIds: this.ids, projectCertificationInventoryIds: this.ids,
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
@@ -173,6 +185,9 @@
this.visible = false this.visible = false
this.selectedRowKeys = [] this.selectedRowKeys = []
this.$emit('referenceDeliverablesListForm') this.$emit('referenceDeliverablesListForm')
if (this.detailedWarningList && this.detailedWarningList.length > 0) {
this.failedMessageOne(this.detailedWarningList)
}
} else { } else {
if (res.result) { if (res.result) {
this.$message.warning(res.result) this.$message.warning(res.result)
@@ -78,7 +78,8 @@
</div> </div>
<!-- 保存--> <!-- 保存-->
<div @click="preservationClick(1)" v-if="roleSwitchingCode == 2 || roleSwitchingCode == 0" class="operator-text"> <div @click="preservationClick(1)" v-if="roleSwitchingCode == 2 || roleSwitchingCode == 0"
class="operator-text">
<a-icon type="check-circle"/> <a-icon type="check-circle"/>
{{ $t('preservation') }} {{ $t('preservation') }}
</div> </div>
@@ -687,7 +688,7 @@
title: this.$t('DeliverablesResult'), title: this.$t('DeliverablesResult'),
align: 'left', align: 'left',
dataIndex: 'deliveryResult', dataIndex: 'deliveryResult',
width: 180, width: 210,
ellipsis: true, ellipsis: true,
scopedSlots: { customRender: 'DeliverablesResult' } scopedSlots: { customRender: 'DeliverablesResult' }
}, },
@@ -1406,17 +1407,45 @@
referenceDeliverablesClick() { referenceDeliverablesClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let isTrue let isTrue
for (let i = 0; i < this.selectedRowKeysList.length; i++) { let ids = []
if (this.selectedRowKeysList[i].flowStatus == 'Results to be submitted') { let notConditions = []
isTrue = true let notConditionsOne = []
} else { let data = ''
isTrue = false let dataOne = ''
this.$message.warning(this.$t('youCanOnlySelectStatusClearSubmit')) let detailedWarningList= []
return if (this.roleSwitchingCode == 20) {
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) {
if (this.selectedRowKeysList[i].flowStatus == 'Results to be submitted') {
ids.push(this.selectedRowKeysList[i].id)
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
} else {
notConditionsOne.push(this.selectedRowKeysList[i].inspectionItem)
}
}
} else {
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'Results to be submitted') {
ids.push(this.selectedRowKeysList[i].id)
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
} }
} }
if (isTrue) { if (notConditions && notConditions.length > 0) {
this.$refs.referenceDeliverablesListRef.transferModel(JSON.parse(JSON.stringify(this.selectedRowKeys))) data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataStatusSubmittedCanBeSelected')
detailedWarningList.push(<div>{data}</div>)
}
if (notConditionsOne && notConditionsOne.length > 0){
dataOne = this.$t('inspectionItems') + '"' + notConditionsOne.join('、')+'"'+this.$t('operationWithoutPermission')
detailedWarningList.push(<div>{dataOne}</div>)
}
if (ids && ids.length > 0) {
this.$refs.referenceDeliverablesListRef.transferModel(ids,detailedWarningList)
} else {
this.failedMessageOne(detailedWarningList)
} }
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
@@ -1738,7 +1767,12 @@
content: ( < div > { detailedWarningList } < /div>) content: ( < div > { detailedWarningList } < /div>)
}) })
}, },
failedMessageOne(data) {
let detailedWarningList = data
this.$warning({
content: ( < div > { detailedWarningList } < /div>)
})
},
submitTask(value, prompt, ids, notConditions, data) { submitTask(value, prompt, ids, notConditions, data) {
let _this = this let _this = this
this.$confirm({ this.$confirm({
@@ -782,11 +782,11 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<div class="header-text" v-if="rejectCauseList && rejectCauseList.length > 0"> <div class="header-text" v-if="rejectCauseList && rejectCauseList.length > 0 && formInline.roleCodeIndex == 0">
{{$t('listConfirmationRejectionReason')}} {{$t('reasonForReturnOfDesignCompliance')}}
</div> </div>
<div v-if="rejectCauseList && rejectCauseList.length > 0" <div v-if="rejectCauseList && rejectCauseList.length > 0 && formInline.roleCodeIndex == 0"
v-for="(item,index) in rejectCauseList"> v-for="(item,index) in rejectCauseList">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
@@ -827,11 +827,11 @@
</a-row> </a-row>
</div> </div>
<div class="header-text" v-if="rejectCauseListOne && rejectCauseListOne.length > 0"> <div class="header-text" v-if="rejectCauseListOne && rejectCauseListOne.length > 0 && formInline.roleCodeIndex == 0">
{{$t('taskConfirmationRejectionReason')}} {{$t('verifyComplianceConfirmReturnReason')}}
</div> </div>
<div v-if="rejectCauseListOne && rejectCauseListOne.length > 0" <div v-if="rejectCauseListOne && rejectCauseListOne.length > 0 && formInline.roleCodeIndex == 0"
v-for="(item,index) in rejectCauseListOne"> v-for="(item,index) in rejectCauseListOne">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
@@ -310,14 +310,14 @@
title: this.$t('configurationItem'), title: this.$t('configurationItem'),
align: 'left', align: 'left',
dataIndex: 'configItem', dataIndex: 'configItem',
width: 150, width: 200,
ellipsis: true ellipsis: true
}, },
{ {
title: 'WVTA ID', title: 'WVTA ID',
align: 'left', align: 'left',
dataIndex: 'wvtaId', dataIndex: 'wvtaId',
width: 150, width: 200,
ellipsis: true ellipsis: true
}, },
{ {
@@ -338,14 +338,14 @@
title: this.$t('typeOfDeliverables'), title: this.$t('typeOfDeliverables'),
align: 'left', align: 'left',
dataIndex: 'deliverableTypeName', dataIndex: 'deliverableTypeName',
width: 200, width: 330,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
align: 'left', align: 'left',
fixed: 'right', fixed: 'right',
width: 200, width: 250,
scopedSlots: { customRender: 'operation' } scopedSlots: { customRender: 'operation' }
} }
], ],
@@ -544,7 +544,7 @@
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
@import '~@assets/less/common.less'; @import'~@assets/less/common.less';
.doc-detail { .doc-detail {
background: #fff; background: #fff;