This commit is contained in:
yuekuo
2023-03-26 13:52:37 +08:00
parent 99aba4d595
commit af746fcc60
2 changed files with 94 additions and 27 deletions
@@ -98,7 +98,7 @@
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import moment from 'moment'
import uploadFile from '@/components/uploadFile/file'
export default {
name: 'basicInformation',
components:{
@@ -112,16 +112,30 @@ export default {
}
},
mounted() {
this.getData()
},
methods: {
getData(){
let otaIdT=localStorage.getItem('otaIdT')
if(otaIdT==null){
otaIdT=''
}
let otaId=localStorage.getItem('otaId')
if(otaId==null){
otaId=''
}
getAction('/ota/otaBaSjSjmbcl/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
console.log(res);
})
},
save(){
let obj={}
obj.zsl = this.formInline.zsl
obj.scrqks = this.formInline.dateofproduction[0]
obj.scrqjs = this.formInline.dateofproduction[1]
obj.VINcodelist = this.formInline.VINcodelist
postAction('ota/otaBaSjSjmbcl/add',obj).then(res=>{
postAction('/ota/otaBaSjSjmbcl/add',obj).then(res=>{
console.log(res);
})
},
@@ -22,6 +22,7 @@
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input"
:disabled="disabled"
v-model="form.cxmb"
:placeholder="$t('PleaseSelect')"
:type="'select'"
:triggerChange="false"/>
@@ -34,44 +35,34 @@
<span class="title-text-text" :title="$t('upgraderecordnumber')">{{$t('upgraderecordnumber')}}</span>
</div>
<div class="title-text-add-input">
<span class="title-text-text">中文</span>
<!-- <span class="title-text-text">中文</span> -->
<a-input class="box-input" v-model="form.babh" :placeholder="$t('pleaseEnter')" disabled style="width:100%"></a-input>
</div>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text-add">
<div class="title-text-add">
<span class="title-text-text" :title="$t('registrationnumber')">{{$t('registrationnumber')}}</span>
<span class="title-text-text" :title="$t('theNameOfFirm')">{{$t('theNameOfFirm')}}</span>
</div>
<div class="title-text-add-input">
<span class="title-text-text">中文</span>
<!-- <span class="title-text-text">中文</span> -->
<a-input class="box-input" v-model="form.qymc" :placeholder="$t('pleaseEnter')" disabled style="width:100%"></a-input>
</div>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text-add">
<div class="title-text-add">
<span class="title-text-text" :title="$t('Modelandfunctionrecord')">{{$t('Modelandfunctionrecord')}}</span>
</div>
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input"
:disabled="disabled"
:placeholder="$t('PleaseSelect')"
:type="'select'"
:triggerChange="false"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text-add">
<div class="title-text-add">
<span class="title-text-text" :title="$t('noticebatch')">{{$t('noticebatch')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input"
:disabled="disabled"
:placeholder="$t('PleaseSelect')"
:type="'select'"
v-model="form.bapc"
:triggerChange="false"/>
</a-form-model-item>
</div>
@@ -83,7 +74,8 @@
</div>
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input"
:disabled="disabled"
disabled
v-model="form.cpsb"
:placeholder="$t('PleaseSelect')"
:type="'select'"
:triggerChange="false"/>
@@ -97,7 +89,8 @@
</div>
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input"
:disabled="disabled"
disabled
v-model="form.cpmc"
:placeholder="$t('PleaseSelect')"
:type="'select'"
:triggerChange="false"/>
@@ -111,7 +104,8 @@
</div>
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input"
:disabled="disabled"
disabled
v-model="form.cpxh"
:placeholder="$t('PleaseSelect')"
:type="'select'"
:triggerChange="false"/>
@@ -123,15 +117,37 @@
<div class="title-text-add">
<span class="title-text-text" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span>
</div>
<a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input"
<a-form-model-item class="itemModel" style="width: 38%">
<!-- <j-dict-select-tag class="box-input"
:disabled="disabled"
@change="projectNameChange"
:placeholder="$t('PleaseSelect')"
:type="'select'"
:triggerChange="false"/>
:triggerChange="false"
v-model="form.Vehicledynamictype"/> -->
<a-select class="box-input" v-model="form.dllx1" :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="changeSelect($event,target)">
<a-select-option v-for="(item, key) in projectNameList1"
:key="key"
:value="item">
{{ item }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item class="itemModel" style="width: 40%;margin-left:20px">
<a-select v-model="form.dllx2" class="box-input" :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="update">
<a-select-option v-for="(item, key) in projectNameList2"
:key="key"
:value="item">
{{ item }}
<!-- <span style="display: inline-block;width: 100%" :title=" item.projectName ">
{{ item.projectName}}
</span> -->
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
@@ -153,15 +169,52 @@
return {
confirmLoading: false,
disabled: false,
form:{},
projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'],
projectNameList2:[],
}
},
mounted() {
// this.getData()
},
methods: {
getData(){
let otaIdT=localStorage.getItem('otaIdT')
if(otaIdT==null){
otaIdT=''
}
let otaId=localStorage.getItem('otaId')
if(otaId==null){
otaId=''
}
getAction('/ota/otaBaSjSjmbcl/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
console.log(res);
})
},
save(){
},
next(){
this.save()
this.$emit('basicInformationForm')
},
changeSelect(target){
this.form.dllx2=undefined
if(target =='传统动力汽车'){
this. projectNameList2=['汽油','柴油']
}else if (target =='节能汽车'){
this. projectNameList2=['混合动力','天然气','甲醇','其他']
}else if (target =='新能源汽车'){
this. projectNameList2=['纯电动','插电式混合动力','燃料电池']
}else{
this. projectNameList2=['其他']
}
},
update(){
this.$forceUpdate()
}
}
}
</script>