This commit is contained in:
yuekuo
2023-03-26 14:44:26 +08:00
parent af746fcc60
commit 2bf6dee569
2 changed files with 61 additions and 17 deletions
@@ -132,8 +132,14 @@ export default {
let obj={}
obj.zsl = this.formInline.zsl
obj.scrqks = this.formInline.dateofproduction[0]
obj.scrqjs = this.formInline.dateofproduction[1]
if(this.formInline.dateofproduction){
obj.scrqks = this.formInline.dateofproduction[0]
obj.scrqjs = this.formInline.dateofproduction[1]
}else{
obj.scrqks=''
obj.scrqjs =''
}
obj.VINcodelist = this.formInline.VINcodelist
postAction('/ota/otaBaSjSjmbcl/add',obj).then(res=>{
console.log(res);
@@ -20,12 +20,17 @@
<span class="title-text-text" :title="$t('selectTheVehicleTemplate')">{{$t('selectTheVehicleTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input"
<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 selectListMb" :key="key" :value="item.id" >
{{ item.cpdjbh }}
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input"
:disabled="disabled"
v-model="form.cxmb"
:placeholder="$t('PleaseSelect')"
:type="'select'"
:triggerChange="false"/>
:triggerChange="false"/> -->
</a-form-model-item>
</div>
</a-col>
@@ -36,7 +41,7 @@
</div>
<div class="title-text-add-input">
<!-- <span class="title-text-text">中文</span> -->
<a-input class="box-input" v-model="form.babh" :placeholder="$t('pleaseEnter')" disabled style="width:100%"></a-input>
<a-input class="box-input" v-model="form.babh" :placeholder="$t('pleaseEnter')" disabled ></a-input>
</div>
</div>
</a-col>
@@ -47,7 +52,7 @@
</div>
<div class="title-text-add-input">
<!-- <span class="title-text-text">中文</span> -->
<a-input class="box-input" v-model="form.qymc" :placeholder="$t('pleaseEnter')" disabled style="width:100%"></a-input>
<a-input class="box-input" v-model="form.qymc" :placeholder="$t('pleaseEnter')" disabled ></a-input>
</div>
</div>
</a-col>
@@ -58,12 +63,11 @@
<span class="title-text-text" :title="$t('Modelandfunctionrecord')">{{$t('Modelandfunctionrecord')}}</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-select :disabled="disabled" class="box-input" v-model="form.bapc" allowClear :placeholder="$t('PleaseSelect')" @change="changeId">
<a-select-option v-for="(item , key ) in selectListPc" :key="key" :value="item.id" >
{{ item.ggpc }}
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
@@ -152,7 +156,7 @@
</a-form-model>
</a-spin>
<div class="bootom-button">
<a-button style="margin-right:50px">{{$t('preservation')}}</a-button>
<a-button style="margin-right:50px" @click="save">{{$t('preservation')}}</a-button>
<a-button type="primary" @click='next'>{{$t('next')}}</a-button>
</div>
</div>
@@ -172,10 +176,13 @@
form:{},
projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'],
projectNameList2:[],
selectListPc:[],
selectListMb:[],
}
},
mounted() {
// this.getData()
this.getSelect()
this.getData()
},
methods: {
@@ -188,17 +195,45 @@
if(otaId==null){
otaId=''
}
getAction('/ota/otaBaSjSjmbcl/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
console.log(res);
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
if(res.code == 200){
// this.form=res.result
}
})
},
save(){
postAction('/ota/otaBaSjSjmbcx/add',this.form).then(res=>{
localStorage.setItem('otaId', res.result.otaId)
})
},
next(){
this.save()
this.$emit('basicInformationForm')
},
getSelect(){
getAction('/ota/otaBaCxList/list').then(res=>{
if(res.code==200){
this.selectListPc=[]
res.result.forEach(item=>{
let obj={}
obj.id=item.id
obj.ggpc=item.ggpc
this.selectListPc.push(obj)
})
}
})
getAction('/ota/otaBaSjList/list').then(res=>{
if(res.code==200){
this.selectListMb=[]
res.result.forEach(item=>{
let obj={}
obj.id=item.id
obj.cpdjbh=item.cpdjbh
this.selectListMb.push(obj)
})
}
})
},
changeSelect(target){
this.form.dllx2=undefined
if(target =='传统动力汽车'){
@@ -212,6 +247,9 @@
}
},
changeId(value){
this.$forceUpdate()
},
update(){
this.$forceUpdate()
}