查看+结束升级

This commit is contained in:
yuekuo
2023-03-28 17:50:00 +08:00
parent 4b935fb42e
commit db1f4a084e
2 changed files with 46 additions and 36 deletions
@@ -19,11 +19,11 @@
<span class="title-text-text" :title="$t ('implementedupgrade')">{{$t('implementedupgrade')}}</span> <span class="title-text-text" :title="$t ('implementedupgrade')">{{$t('implementedupgrade')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="implementedupgrade"> <a-form-model-item class="itemModel" prop="implementedupgrade">
<a-radio-group style="margin-top: 2px" class="box-input" v-model="formInline.implementedupgrade" :disabled="disabled"> <a-radio-group style="margin-top: 2px" class="box-input" v-model="formInline.sfyz" :disabled="disabled">
<a-radio value="0"> <a-radio :value="0">
{{$t('yes')}} {{$t('yes')}}
</a-radio> </a-radio>
<a-radio value="1"> <a-radio :value="1">
{{$t('not')}} {{$t('not')}}
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
@@ -43,7 +43,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="numberofvehicles"> <a-form-model-item class="itemModel" prop="numberofvehicles">
<a-input class="box-input" <a-input class="box-input"
v-model='formInline.numberofvehicles' v-model='formInline.wccls'
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseEnter')+$t('numberofvehicles')"/> :placeholder="$t('PleaseEnter')+$t('numberofvehicles')"/>
</a-form-model-item> </a-form-model-item>
@@ -59,9 +59,9 @@
<a-form-model-item class="itemModel" prop="VINcodelist"> <a-form-model-item class="itemModel" prop="VINcodelist">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
:disabled="disabled" :disabled="disabled"
@click="clickButtonToUpload('VINcodelist')"> @click="clickButtonToUpload('csv')">
{{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || {{ (formInline.csv === 'null' || formInline.csv === '' ||
formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') formInline.csv == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
<p>{{$t('notecsv')}}</p> <p>{{$t('notecsv')}}</p>
@@ -69,11 +69,11 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<div v-for="(item,index) in formInline.dataList" :key="index"> <div v-for="(item,index) in formInline.list" :key="index">
<div class="header-text"> <div class="header-text">
{{$t('vehicleshavenotcompletedonlineupgrade')}} {{$t('vehicleshavenotcompletedonlineupgrade')}}
<a-icon class="icon-text" @click="addClick(index)" type="plus-circle"/> <a-icon class="icon-text" @click="addClick(index)" type="plus-circle"/>
<a-icon class="icon-text" v-if="formInline.dataList.length > 1" @click="deleteClick(index)" <a-icon class="icon-text" v-if="formInline.list.length > 1" @click="deleteClick(index)"
type="minus-circle" :disabled="disabled"/> type="minus-circle" :disabled="disabled"/>
</div> </div>
<div style='margin-left: 25px'> <div style='margin-left: 25px'>
@@ -86,7 +86,7 @@
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.cause" v-model="item.wwcyy"
:placeholder="$t('PleaseEnter')+$t('cause')"/> :placeholder="$t('PleaseEnter')+$t('cause')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -96,13 +96,13 @@
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="$t('Quantity')">{{$t('Quantity')}}</span> <span class="title-text-text" :title="$t('Quantity')">{{$t('Quantity')}}</span>
</div> </div>
<!-- :prop="'dataList.'+index+'.inspectionItem'"--> <!-- :prop="'list.'+index+'.inspectionItem'"-->
<!-- :rules="[{ required: true, message: $t('inspectionItems') + $t('cannotEmpty'), trigger: 'blur'},--> <!-- :rules="[{ required: true, message: $t('inspectionItems') + $t('cannotEmpty'), trigger: 'blur'},-->
<!-- {max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'}]"--> <!-- {max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'}]"-->
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.Quantity" v-model="item.wwcsl"
:placeholder="$t('PleaseEnter')+$t('Quantity')"/> :placeholder="$t('PleaseEnter')+$t('Quantity')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -114,15 +114,15 @@
<div class="title-text"> <div class="title-text">
<span class="title-text-text"></span> <span class="title-text-text"></span>
</div> </div>
<!-- :prop="'dataList.'+index+'.inspectionItem'"--> <!-- :prop="'list.'+index+'.inspectionItem'"-->
<!-- :rules="[{ required: true, message: $t('inspectionItems') + $t('cannotEmpty'), trigger: 'blur'},--> <!-- :rules="[{ required: true, message: $t('inspectionItems') + $t('cannotEmpty'), trigger: 'blur'},-->
<!-- {max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'}]"--> <!-- {max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'}]"-->
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
:disabled="disabled" :disabled="disabled"
@click="clickButtonToUpload('VINcodelist')"> @click="clickButtonToUpload('wwcfj')">
{{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || {{ (formInline.wwcfj === 'null' || formInline.wwcfj === '' ||
formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') formInline.wwcfj == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
<p style='width: 243px'>{{$t('format')}}</p> <p style='width: 243px'>{{$t('format')}}</p>
@@ -142,7 +142,7 @@
<a-form-model-item class="itemModel" prop="implementationrecords"> <a-form-model-item class="itemModel" prop="implementationrecords">
<a-textarea :placeholder="$t('pleaseEnter')+$t('implementationrecords')" <a-textarea :placeholder="$t('pleaseEnter')+$t('implementationrecords')"
:disabled="disabled" :disabled="disabled"
:rows="2" v-model="formInline.remarks"/> :rows="2" v-model="formInline.ssjl"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -155,9 +155,9 @@
</div> </div>
<a-form-model-item class="itemModel" prop="VINcodelist"> <a-form-model-item class="itemModel" prop="VINcodelist">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload('VINcodelist1')"> @click="clickButtonToUpload('ssjlfj')">
{{ (formInline.VINcodelist === 'null' || formInline.VINcodelist === '' || {{ (formInline.ssjlfj === 'null' || formInline.ssjlfj === '' ||
formInline.VINcodelist == null) ? $t('clickUpload') : $t('viewUploadedFiles') formInline.ssjlfj == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}} }}
</a-button> </a-button>
<p>{{$t('format')}}</p> <p>{{$t('format')}}</p>
@@ -192,7 +192,9 @@ export default {
visible: false, visible: false,
disabled: false, disabled: false,
showButton:false, showButton:false,
formInline: {}, formInline: {
list:[{}]
},
confirmLoading: false, confirmLoading: false,
acceptcode:'', acceptcode:'',
projectNameList: [], projectNameList: [],
@@ -237,6 +239,8 @@ export default {
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
addModel(record,flag) { addModel(record,flag) {
this.disabled=false
this.showButton=false
if(flag=='1'){ if(flag=='1'){
this.disabled=true this.disabled=true
this.showButton=true this.showButton=true
@@ -244,12 +248,11 @@ export default {
this.record=record this.record=record
this.visible = true this.visible = true
this.confirmLoading = false this.confirmLoading = false
this.formInline = {} // this.formInline = {}
this.formInline.dataList = [{}] // this.formInline.list = [{}]
this.$nextTick(() => { this.$nextTick(() => {
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
// this.$refs.codeNumber.number()
}) })
}, },
handleCancel() { handleCancel() {
@@ -267,27 +270,27 @@ export default {
this.formInline.authDummyInventoryBaseId = this.$route.query.id this.formInline.authDummyInventoryBaseId = this.$route.query.id
let query = JSON.parse(JSON.stringify(this.formInline)) let query = JSON.parse(JSON.stringify(this.formInline))
this.confirmLoading = true this.confirmLoading = true
// postAction(this.url.addModel, query).then((res) => { postAction('/ota/otaBaSjJssj/add',{otaId:this.record.id,...this.formInline}).then((res) => {
// if (res.success) { if (res.success) {
// this.confirmLoading = false this.confirmLoading = false
// this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
// } else { } else {
// this.$message.warning(res.message) this.$message.warning(res.message)
// this.confirmLoading = false this.confirmLoading = false
// } }
// }) })
this.visible = false this.visible = false
this.$emit('addModelList',this.record) this.$emit('addModelList',this.record)
} }
}) })
}, },
addClick(index){ addClick(index){
this.formInline.dataList.splice(index + 1, 0, {}) this.formInline.list.splice(index + 1, 0, {})
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}, },
deleteClick(index) { deleteClick(index) {
this.formInline.dataList.splice(index, 1) this.formInline.list.splice(index, 1)
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}, },
getRegulationNo() { getRegulationNo() {
@@ -444,11 +444,18 @@ export default {
}, },
// 结束升级 // 结束升级
endUpgrade(record,flag){ endUpgrade(record,flag){
console.log('model',record);
this.$refs.upgradecompletionRef.addModel(record,flag) this.$refs.upgradecompletionRef.addModel(record,flag)
}, },
// 查看 // 查看
detailclick(record){ detailclick(record){
localStorage.removeItem('otaIdT')
localStorage.removeItem('otaId')
localStorage.setItem('otaId',record.id)
this.$router.push({
path: '/upgradeactivityrecord',
query: {}
})
}, },
// 维护 // 维护
maintenanceClick(row){ maintenanceClick(row){