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> <script>
import { getAction, postAction, deleteAction } from '@/api/manage' import { getAction, postAction, deleteAction } from '@/api/manage'
import moment from 'moment' import moment from 'moment'
import uploadFile from '@/components/uploadFile/file'
export default { export default {
name: 'basicInformation', name: 'basicInformation',
components:{ components:{
@@ -112,16 +112,30 @@ export default {
} }
}, },
mounted() { mounted() {
this.getData()
}, },
methods: { 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(){ save(){
let obj={} let obj={}
obj.zsl = this.formInline.zsl obj.zsl = this.formInline.zsl
obj.scrqks = this.formInline.dateofproduction[0] obj.scrqks = this.formInline.dateofproduction[0]
obj.scrqjs = this.formInline.dateofproduction[1] obj.scrqjs = this.formInline.dateofproduction[1]
obj.VINcodelist = this.formInline.VINcodelist obj.VINcodelist = this.formInline.VINcodelist
postAction('ota/otaBaSjSjmbcl/add',obj).then(res=>{ postAction('/ota/otaBaSjSjmbcl/add',obj).then(res=>{
console.log(res); console.log(res);
}) })
}, },
@@ -22,6 +22,7 @@
<a-form-model-item class="itemModel" prop="dutyTerritory"> <a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="form.cxmb"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false"/> :triggerChange="false"/>
@@ -34,44 +35,34 @@
<span class="title-text-text" :title="$t('upgraderecordnumber')">{{$t('upgraderecordnumber')}}</span> <span class="title-text-text" :title="$t('upgraderecordnumber')">{{$t('upgraderecordnumber')}}</span>
</div> </div>
<div class="title-text-add-input"> <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>
</div> </div>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text-add"> <div class="box-title-text-add">
<div class="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>
<div class="title-text-add-input"> <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>
</div> </div>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text-add"> <div class="box-title-text-add">
<div class="title-text-add"> <div class="title-text-add">
<span class="title-text-text" :title="$t('Modelandfunctionrecord')">{{$t('Modelandfunctionrecord')}}</span> <span class="title-text-text" :title="$t('Modelandfunctionrecord')">{{$t('Modelandfunctionrecord')}}</span>
</div> </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"> <a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
v-model="form.bapc"
:triggerChange="false"/> :triggerChange="false"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -83,7 +74,8 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" disabled
v-model="form.cpsb"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false"/> :triggerChange="false"/>
@@ -97,7 +89,8 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" disabled
v-model="form.cpmc"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false"/> :triggerChange="false"/>
@@ -111,7 +104,8 @@
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" disabled
v-model="form.cpxh"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :type="'select'"
:triggerChange="false"/> :triggerChange="false"/>
@@ -123,15 +117,37 @@
<div class="title-text-add"> <div class="title-text-add">
<span class="title-text-text" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span> <span class="title-text-text" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel" style="width: 38%">
<j-dict-select-tag class="box-input" <!-- <j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
@change="projectNameChange"
:placeholder="$t('PleaseSelect')" :placeholder="$t('PleaseSelect')"
:type="'select'" :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> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
</a-spin> </a-spin>
@@ -153,15 +169,52 @@
return { return {
confirmLoading: false, confirmLoading: false,
disabled: false, disabled: false,
form:{},
projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'],
projectNameList2:[],
} }
}, },
mounted() { 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(){
}, },
methods: {
next(){ next(){
this.save()
this.$emit('basicInformationForm') 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> </script>