|
|
@ -5,7 +5,6 @@ |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">生成</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -31,7 +30,7 @@ |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">新车主名称</div> |
|
|
|
<div class="span-sty"><span class="icon">*</span>新车主名称</div> |
|
|
|
<el-form-item> |
|
|
|
<el-select v-model="formobj.customerName" class="addinputInfo" filterable clearable placeholder="" @change="changeCustomer"> |
|
|
|
<el-option v-for="item in customer_list" :key="item.newCustomerSid" :label="item.vinOwner" :value="item.vinOwner"/> |
|
|
@ -39,11 +38,11 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">客户类型</div> |
|
|
|
<div class="span-sty"><span class="icon">*</span>客户类型</div> |
|
|
|
<el-form-item><span class="addinputInfo">{{ formobj.customerType }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">联系电话</div> |
|
|
|
<div class="span-sty"><span class="icon">*</span>联系电话</div> |
|
|
|
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -80,6 +79,23 @@ |
|
|
|
<el-table-column prop="vehType" label="车辆类型" align="center" min-width="120"/> |
|
|
|
<el-table-column prop="modelName" label="车型" align="center" min-width="130"/> |
|
|
|
</el-table> |
|
|
|
<div class="title">附件</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<div class="span-sty">合同</div> |
|
|
|
<el-form-item> |
|
|
|
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.contractFiles" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<div class="span-sty">证件</div> |
|
|
|
<el-form-item> |
|
|
|
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.otherFiles" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -184,6 +200,8 @@ export default { |
|
|
|
endDate: '', |
|
|
|
certificateAddress: '', |
|
|
|
loanSecondarySalesVehVoList: [], |
|
|
|
contractFiles: [], |
|
|
|
otherFiles: [] |
|
|
|
}, |
|
|
|
rules: {} |
|
|
|
} |
|
|
@ -275,9 +293,27 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
saveOrUpdate() { |
|
|
|
if (this.formobj.customerName === '' || this.formobj.mobile === '' || this.formobj.customerType === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '客户信息中新车主名称、客户类型、联系电话等不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
if (this.formobj.contractFiles.length > 0) { |
|
|
|
const aa = [] |
|
|
|
this.formobj.contractFiles.forEach((e) => { |
|
|
|
aa.push(e.url) |
|
|
|
}) |
|
|
|
this.formobj.contractFiles = aa |
|
|
|
} |
|
|
|
if (this.formobj.otherFiles.length > 0) { |
|
|
|
const bb = [] |
|
|
|
this.formobj.otherFiles.forEach((e) => { |
|
|
|
bb.push(e.url) |
|
|
|
}) |
|
|
|
this.formobj.otherFiles = bb |
|
|
|
} |
|
|
|
req.save(this.formobj).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
|
@ -291,23 +327,6 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
submit() { |
|
|
|
// this.$refs['form_obj'].validate((valid) => { |
|
|
|
// if (valid) { |
|
|
|
// this.submitdisabled = true |
|
|
|
// req.saveOrUpdate(this.formobj).then((res) => { |
|
|
|
// if (res.success) { |
|
|
|
// this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
|
|
// this.handleReturn('true') |
|
|
|
// } else { |
|
|
|
// this.submitdisabled = false |
|
|
|
// } |
|
|
|
// }).catch(() => { |
|
|
|
// this.submitdisabled = false |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
|
this.formobj = { |
|
|
|