接口对接
This commit is contained in:
+15
-3
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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" 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>
|
||||
</div>
|
||||
@@ -219,12 +219,24 @@ export default {
|
||||
otaId=''
|
||||
}
|
||||
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(){
|
||||
postAction('/ota/otaBaSjSjfzbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{
|
||||
let objIsEmpty= ()=>{
|
||||
for (let key in this.dataSource[0]){
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
let list=[]
|
||||
if(this.dataSource.length==1 && objIsEmpty()){
|
||||
list=null
|
||||
}else{
|
||||
list=this.dataSource
|
||||
}
|
||||
postAction('/ota/otaBaSjSjfzbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:list,fj:this.fileList}).then(res=>{
|
||||
if(res.code==200){
|
||||
this.$message.success(this.$t('SavedSuccessfully'))
|
||||
this.getData()
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ export default {
|
||||
if(otaId==null){
|
||||
otaId=''
|
||||
}
|
||||
getAction('/ota/otaBaSjQtsjxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}),then(res=>{
|
||||
getAction('/ota/otaBaSjQtsjxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.queryParam= res.result ==null ? {} :res.result
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
v-model="formInline.zsl"
|
||||
:title='formInline.zsl'
|
||||
:max-length="50"
|
||||
:placeholder="$t('PleaseSelect')"></a-input>
|
||||
:placeholder="$t('pleaseEnter')"></a-input>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
+14
-2
@@ -285,11 +285,23 @@ export default {
|
||||
otaId=''
|
||||
}
|
||||
getAction('/ota/otaBaSjSjxtbh/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
|
||||
})
|
||||
},
|
||||
save(){
|
||||
postAction('/ota/otaBaSjSjxtbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list:this.dataSource}).then(res=>{
|
||||
let objIsEmpty= ()=>{
|
||||
for (let key in this.dataSource[0]){
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
let list=[]
|
||||
if(this.dataSource.length==1 && objIsEmpty()){
|
||||
list=null
|
||||
}else{
|
||||
list=this.dataSource
|
||||
}
|
||||
postAction('/ota/otaBaSjSjxtbh/add' ,{otaId:localStorage.getItem('otaId')== undefined ? '' :localStorage.getItem('otaId'),list: list }).then(res=>{
|
||||
if(res.code==200){
|
||||
this.$message.success(this.$t('SavedSuccessfully'))
|
||||
this.getData()
|
||||
|
||||
+16
-1
@@ -198,13 +198,28 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
getAction('/ota/otaBaSjSjmbcx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
|
||||
if(res.code == 200){
|
||||
if(res.result==null){
|
||||
this.form=res.result
|
||||
this.form={}
|
||||
this.form.cxmb=undefined
|
||||
this.form.bapc=undefined
|
||||
this.form.dllx1=undefined
|
||||
this.form.dllx2=undefined
|
||||
this.form.qymc='安徽江淮汽车集团股份有限公司'
|
||||
}else{
|
||||
this.form=res.result
|
||||
if(res.result.dllx1==null){
|
||||
this.form.dllx1=undefined
|
||||
|
||||
}
|
||||
if(res.result.dllx2==null){
|
||||
this.form.dllx2=undefined
|
||||
}
|
||||
if(res.result.cxmb==null){
|
||||
this.form.cxmb=undefined
|
||||
}
|
||||
if(res.result.bapc==null){
|
||||
this.form.bapc=undefined
|
||||
}
|
||||
this.$forceUpdate()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6
-2
@@ -178,7 +178,7 @@
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class="bootom-button">
|
||||
<a-button class='btn' style='margin-right: 50px'>{{$t('preservation')}}</a-button>
|
||||
<a-button class='btn' style='margin-right: 50px' @click="save">{{$t('preservation')}}</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>
|
||||
</div>
|
||||
@@ -243,6 +243,7 @@ export default {
|
||||
})
|
||||
},
|
||||
getData(){
|
||||
|
||||
let otaIdT=localStorage.getItem('otaIdT')
|
||||
if(otaIdT==null){
|
||||
otaIdT=''
|
||||
@@ -251,9 +252,12 @@ export default {
|
||||
if(otaId==null){
|
||||
otaId=''
|
||||
}
|
||||
getAction('/ota/otaBaSjGgnrfs/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}),then(res=>{
|
||||
getAction('/ota/otaBaSjGgnrfs/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
|
||||
if(res.code == 200){
|
||||
|
||||
this.formInline= res.result ==null ? {} :res.result
|
||||
this.formInline.id=res.result.id
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user