|
|
@ -4,6 +4,7 @@ |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button> |
|
|
|
<el-button type="primary" size="small" @click="saveVinNo()">仅保存车架号</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -299,16 +300,16 @@ |
|
|
|
<el-dialog center :visible.sync="dialogVisible" width="50%" :close-on-click-modal="false"> |
|
|
|
<el-form class="formadd"> |
|
|
|
<el-row style="border-top: 1px solid #E0E3EB"> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>说明原因</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="21"> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item><el-input v-model="smRemarks" type="textarea" :rows="3" maxlength="125" placeholder="" class="addinputw addinputw_remarks" clearable/></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" size="small" @click="handleCreate">确 定</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleConfirm">确 定</el-button> |
|
|
|
<el-button size="small" @click="handleQuXiao">取 消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
@ -316,9 +317,10 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { details, SaveList, Update } from '@/api/cheliang/basevehiclecertificate' |
|
|
|
import { details, SaveList, Update, updateVinNo } from '@/api/cheliang/basevehiclecertificate' |
|
|
|
import { typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
import ImageUpload from '@/components/uploadFile/ManyImageUpload' // 上传文件 |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'PinpaiAdd', |
|
|
|
components: { ImageUpload }, |
|
|
@ -329,6 +331,7 @@ export default { |
|
|
|
smRemarks: '', |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
vinNodisabled: false, |
|
|
|
temp: { |
|
|
|
createOrgSid: '', |
|
|
|
certificateSituation: '', |
|
|
@ -462,10 +465,54 @@ export default { |
|
|
|
fileChangeIt(files, imgFiles) { |
|
|
|
this.temp.certificatePhoto = imgFiles |
|
|
|
}, |
|
|
|
handleConfirm() { |
|
|
|
if (this.vinNodisabled) { |
|
|
|
this.saveVinNo() |
|
|
|
} else { |
|
|
|
this.handleCreate() |
|
|
|
} |
|
|
|
}, |
|
|
|
handleQuXiao() { |
|
|
|
this.smRemarks = '' |
|
|
|
this.dialogVisible = false |
|
|
|
}, |
|
|
|
saveVinNo() { |
|
|
|
if (this.temp.vinNo !== '' && this.temp.vinNo !== null && this.temp.vinNo !== undefined && this.temp.vinNo.length < 17) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请检查车架号的长度应为17位' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.temp.smRemarks = this.smRemarks |
|
|
|
updateVinNo({ sid: this.temp.sid, vinNo: this.temp.vinNo, smRemarks: this.temp.smRemarks }).then((response) => { |
|
|
|
this.FormLoading = false |
|
|
|
if (response.success) { |
|
|
|
if (response.msg !== '该车架号后八位与车辆台账中车架号不符,请填写说明原因') { |
|
|
|
this.dialogFormVisible = false |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '修改成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
const tip = response.msg |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.smRemarks = '' |
|
|
|
this.dialogVisible = true |
|
|
|
this.vinNodisabled = true |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 提交添加数据 |
|
|
|
handleCreate() { |
|
|
|
if (this.temp.vinNo !== '' && this.temp.vinNo !== null && this.temp.vinNo !== undefined && this.temp.vinNo.length < 17 && this.temp.vinNo.length !== 8) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请检查车架号的长度应为8位或17位' }) |
|
|
|
if (this.temp.vinNo !== '' && this.temp.vinNo !== null && this.temp.vinNo !== undefined && this.temp.vinNo.length < 17) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请检查车架号的长度应为17位' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.temp.certificateStateValue === '正式' && this.temp.carModel === '') { |
|
|
@ -522,10 +569,6 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleQuXiao() { |
|
|
|
this.smRemarks = '' |
|
|
|
this.dialogVisible = false |
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
@ -539,6 +582,7 @@ export default { |
|
|
|
} // 添加和修改 |
|
|
|
this.dialogVisible = false |
|
|
|
this.smRemarks = '' |
|
|
|
this.vinNodisabled= false |
|
|
|
this.$emit('doback') |
|
|
|
} |
|
|
|
} |
|
|
|