修改
This commit is contained in:
+52
-9
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model class="formAdd" ref="ruleForm" :model="form" >
|
||||
<a-form-model class="formAdd" ref="ruleForm" :model="form" :rules="rules">
|
||||
<!-- :rules="formRules" -->
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
@@ -20,9 +20,9 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
||||
|
||||
<a-select :disabled="disabled" class="box-input" v-model="form.cxmb" allowClear :triggerChange="false" :placeholder="$t('PleaseSelect')">
|
||||
<a-select-option v-for="(item , key ) in selectList" :key="key" :value="item.id">
|
||||
{{ item.ggpc }}
|
||||
<a-select :disabled="disabled" class="box-input" v-model="form.cxmb" allowClear :placeholder="$t('PleaseSelect')" @change="changeId">
|
||||
<a-select-option v-for="(item , key ) in selectList" :key="key" :value="item.id" >
|
||||
{{ item.value }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
@@ -47,9 +47,11 @@
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text-add">
|
||||
<div class="title-text-add">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('registrationnumber')">{{$t('registrationnumber')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel" prop="djbh">
|
||||
|
||||
<a-input
|
||||
:max-length="500"
|
||||
:disabled="disabled"
|
||||
@@ -221,6 +223,7 @@
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
|
||||
import ImportFile from '@/components/ImportFileData/index'
|
||||
import { message } from 'ant-design-vue'
|
||||
|
||||
export default {
|
||||
name: 'basicInformation',
|
||||
@@ -243,7 +246,16 @@
|
||||
projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'],
|
||||
projectNameList2:[],
|
||||
selectList:[],
|
||||
otaId:''
|
||||
otaId:'',
|
||||
rules:{
|
||||
djbh:[
|
||||
{
|
||||
required: true,
|
||||
message:this.$t('registrationnumber')+this.$t('cannotEmpty'),
|
||||
trigger:'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -252,6 +264,14 @@
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
changeId(value,option){
|
||||
localStorage.removeItem('otaId')
|
||||
localStorage.removeItem('otaIdT')
|
||||
localStorage.setItem('otaIdT',value)
|
||||
|
||||
this.$forceUpdate()
|
||||
this.getData()
|
||||
},
|
||||
// 模板下载
|
||||
handleModule() {
|
||||
downloadFile('ota/otaBaCxJbxx/exportTemplate', '车型及功能备案' + '.zip', {})
|
||||
@@ -263,7 +283,13 @@
|
||||
res.result.forEach(item=>{
|
||||
let obj={}
|
||||
obj.id=item.id
|
||||
obj.ggpc=item.ggpc
|
||||
if(item.cpmc==null){
|
||||
item.cpmc=''
|
||||
}
|
||||
if(item.cpxh==null){
|
||||
item.cpxh=''
|
||||
}
|
||||
obj.value=item.ggpc+'-'+item.cpmc+'-'+item.cpxh
|
||||
this.selectList.push(obj)
|
||||
})
|
||||
}
|
||||
@@ -281,14 +307,27 @@
|
||||
}
|
||||
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.form=res.result
|
||||
|
||||
this.form.qymc=res.result.qymc
|
||||
this.form.djbh=res.result.djbh
|
||||
this.form.cplb=res.result.cplb
|
||||
this.form.ggpc=res.result.ggpc
|
||||
this.form.cpsb=res.result.cpsb
|
||||
this.form.cpmc=res.result.cpmc
|
||||
this.form.cpxh=res.result.cpxh
|
||||
this.form.dllx1=res.result.dllx1
|
||||
this.form.dllx2=res.result.dllx2
|
||||
this.form.txzd=res.result.txzd
|
||||
this.form.cdotasj=res.result.cdotasj
|
||||
this.form.cxmb=this.form.ggpc+'-'+ this.form.cpmc+'-'+this.form.cpxh
|
||||
console.log(res.result);
|
||||
if(res.result.dllx1 == null ){
|
||||
res.result.dllx1 = undefined
|
||||
}
|
||||
if(res.result.dllx2 == null){
|
||||
res.result.dllx2 = undefined
|
||||
}
|
||||
this.changeSelect()
|
||||
// this.changeSelect()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -403,4 +442,8 @@
|
||||
// /deep/ .ant-input{
|
||||
// width: calc(100%+20px);
|
||||
// }
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 3px;
|
||||
}
|
||||
</style>
|
||||
+28
-14
@@ -87,7 +87,9 @@
|
||||
</span>
|
||||
</a-table>
|
||||
<div>
|
||||
<a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button>
|
||||
<a-button @click="clickButtonToUpload('fileKey')" type="primary"> {{ (formInline.fileKey === 'null' || formInline.fileKey === '' ||
|
||||
formInline.fileKey == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}</a-button>
|
||||
<p>注:附件包括测试项目清单、测试报告.测试标准或技术规范</p>
|
||||
<p> 支持doc/docx/pdf格式,大小50M以内</p>
|
||||
|
||||
@@ -114,6 +116,8 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
uploadName:'',
|
||||
url: {
|
||||
exportData: '/ota/otaBaCxKsjjsmccs/exportData',
|
||||
importZipUrl: '/ota/otaBaCxKsjjsmccs/importData',//导入
|
||||
@@ -318,6 +322,18 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
}
|
||||
})
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
this.$refs.uploadFile.visible = true
|
||||
this.uploadName = item
|
||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||
} else {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
}
|
||||
})
|
||||
},
|
||||
getData(){
|
||||
let otaIdT=localStorage.getItem('otaIdT')
|
||||
if(otaIdT==null){
|
||||
@@ -381,19 +397,17 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
this.$emit('beupgradedonlinedown')
|
||||
},
|
||||
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')
|
||||
},
|
||||
let attIdList = []
|
||||
if (data && data.length > 0) {
|
||||
data.map(item => {
|
||||
attIdList.push(item.id || data.name)
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.clearValidate(['fileKey'])
|
||||
},
|
||||
//中间加
|
||||
addlineAtMid(record){
|
||||
let obj = {gnmc:record.gnmc}
|
||||
|
||||
+12
-8
@@ -24,10 +24,11 @@
|
||||
<span slot="havemeasures" slot-scope="text,record">
|
||||
<j-dict-select-tag class="box-input"
|
||||
v-model="record.info"
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
:type="'select'"
|
||||
:dictCode="record.dictCode"
|
||||
:triggerChange="false"/>
|
||||
@change="update"
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
:type="'select'"
|
||||
:dictCode="record.dictCode"
|
||||
:triggerChange="false"/>
|
||||
</span>
|
||||
<span slot="certifyingmaterials" slot-scope="text,record">
|
||||
<a-button type="primary" @click="clickButtonToUpload(record.zmcl,record.key)" v-model="record.zmcl">
|
||||
@@ -177,8 +178,10 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
// this.getList()
|
||||
this.getData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 模板下载
|
||||
|
||||
handleModule() {
|
||||
downloadFile('ota/otaBaCxAqcs/exportTemplate', '车型及功能备案' + '.zip', {})
|
||||
},
|
||||
@@ -189,10 +192,11 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
}
|
||||
getAction('/ota/otaBaCxAqcs/queryByOtaId',{otaIdT:otaIdT,otaId:localStorage.getItem('otaId')}).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.dataSource[0].info = Number(res.result.bhjz)
|
||||
this.dataSource[1].info =Number(res.result.fsxjz)
|
||||
this.dataSource[2].info= Number(res.result.sjsbcs)
|
||||
this.dataSource[3].info=Number(res.result.xxaqjz)
|
||||
|
||||
this.dataSource[0].info = Number(res.result.bhjz) == 0 ? undefined :Number(res.result.bhjz)
|
||||
this.dataSource[1].info =Number(res.result.fsxjz)== 0 ? undefined :Number(res.result.fsxjz)
|
||||
this.dataSource[2].info= Number(res.result.sjsbcs)== 0 ? undefined :Number(res.result.sjsbcs)
|
||||
this.dataSource[3].info=Number(res.result.xxaqjz)== 0 ? undefined :Number(res.result.xxaqjz)
|
||||
this.fileList.uploadName = res.result.zmclList
|
||||
this.fileList.certifyingmaterials = this.$t('viewFile')
|
||||
this.$refs.uploadFile.perentHandleFunc(this.fileList.uploadName)
|
||||
|
||||
@@ -304,7 +304,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
}
|
||||
getAction('/ota/otaBaCxKsjxtmccs/queryByOtaId',{otaIdT:otaIdT,otaId:localStorage.getItem('otaId')}).then(res=>{
|
||||
if(res.code==200){
|
||||
if(res.result.length==0){
|
||||
if(res.result.list.length==0){
|
||||
this.dataSource= [
|
||||
{
|
||||
xtlb:'动力系统',
|
||||
@@ -332,10 +332,10 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
},
|
||||
]
|
||||
}else{
|
||||
res.result.forEach(item =>{
|
||||
res.result.list.forEach(item =>{
|
||||
item.sfksj =Number(item.sfksj)
|
||||
})
|
||||
this.dataSource=res.result
|
||||
this.dataSource=res.result.list
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -380,6 +380,7 @@ export default {
|
||||
// 创建车型
|
||||
createvehicleandfunctionrecords() {
|
||||
localStorage.removeItem('otaId')
|
||||
localStorage.removeItem('otaIdT')
|
||||
this.$router.push({
|
||||
path: '/vehicleinformation',
|
||||
query: {}
|
||||
@@ -398,8 +399,16 @@ export default {
|
||||
downloadFile(this.url.exportData, text + '.zip', query, this.Deselect)
|
||||
},
|
||||
// 查看
|
||||
detailclick() {
|
||||
|
||||
detailclick(data) {
|
||||
console.log('data',data);
|
||||
localStorage.removeItem('otaIdT')
|
||||
localStorage.removeItem('otaId')
|
||||
localStorage.setItem('otaId',data.id)
|
||||
console.log('data',data.id);
|
||||
this.$router.push({
|
||||
path: '/vehicleinformation',
|
||||
query: {}
|
||||
})
|
||||
},
|
||||
// 维护
|
||||
maintenanceClick(row) {
|
||||
|
||||
Reference in New Issue
Block a user