|
|
|
@ -1,23 +1,31 @@ |
|
|
|
|
<template> |
|
|
|
|
<div style="padding:30px 75px 50px;"> |
|
|
|
|
<div style="width:100%;position: absolute;top: 15px;left: 0;"> |
|
|
|
|
<div style="display: flex; |
|
|
|
|
align-items: center;padding-left: 20px;"> |
|
|
|
|
<div style="padding: 30px 75px 50px"> |
|
|
|
|
<div style="width: 100%; position: absolute; top: 15px; left: 0"> |
|
|
|
|
<div style="display: flex; align-items: center; padding-left: 20px"> |
|
|
|
|
<svg-icon |
|
|
|
|
icon-class="iconsiji2" |
|
|
|
|
style="font-size: 30px;margin-right: 10px;" |
|
|
|
|
/> |
|
|
|
|
<span>添加认证信息</span> |
|
|
|
|
icon-class="iconsiji2" |
|
|
|
|
style="font-size: 30px; margin-right: 10px" |
|
|
|
|
/> |
|
|
|
|
<span>添加认证信息</span> |
|
|
|
|
</div> |
|
|
|
|
<el-divider style="width:100%"></el-divider> |
|
|
|
|
<el-divider style="width: 100%"></el-divider> |
|
|
|
|
</div> |
|
|
|
|
<el-row> |
|
|
|
|
<el-form ref="form" :rules="rules" :model="oilCompanyAuth" label-width="100px" :size="$store.getters.size"> |
|
|
|
|
<el-form |
|
|
|
|
ref="form" |
|
|
|
|
:rules="rules" |
|
|
|
|
:model="oilCompanyAuth" |
|
|
|
|
label-width="100px" |
|
|
|
|
:size="$store.getters.size" |
|
|
|
|
> |
|
|
|
|
<el-row :gutter="gridNum.row.gutter"> |
|
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="企业名称" prop="companyName"> |
|
|
|
|
<el-input v-model="oilCompanyAuth.companyName" clearable disabled/> |
|
|
|
|
<el-input |
|
|
|
|
v-model="oilCompanyAuth.companyName" |
|
|
|
|
clearable |
|
|
|
|
disabled |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
@ -28,7 +36,11 @@ |
|
|
|
|
:size="$store.getters.size" |
|
|
|
|
style="width: 100%" |
|
|
|
|
:options="areaTree" |
|
|
|
|
:props="{value:'id', label:'areaName', children:'childList'}" |
|
|
|
|
:props="{ |
|
|
|
|
value: 'id', |
|
|
|
|
label: 'areaName', |
|
|
|
|
children: 'childList', |
|
|
|
|
}" |
|
|
|
|
filterable |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
@ -36,41 +48,68 @@ |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="详细地址" prop="address"> |
|
|
|
|
<el-input v-model="oilCompanyAuth.address" clearable placeholder="不包含省市区" /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="oilCompanyAuth.address" |
|
|
|
|
clearable |
|
|
|
|
placeholder="不包含省市区" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="法人代表" prop="companyLegalPerson"> |
|
|
|
|
<el-input v-model="oilCompanyAuth.companyLegalPerson" clearable placeholder="法人姓名" /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="oilCompanyAuth.companyLegalPerson" |
|
|
|
|
clearable |
|
|
|
|
placeholder="法人姓名" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="注册资本" prop="registeredCapital"> |
|
|
|
|
<el-input v-model="oilCompanyAuth.registeredCapital" clearable placeholder="小写数字" /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="oilCompanyAuth.registeredCapital" |
|
|
|
|
clearable |
|
|
|
|
placeholder="小写数字" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="经营资质" prop="businessQualia"> |
|
|
|
|
<el-input v-model="oilCompanyAuth.businessQualia" clearable placeholder="企业经营资质" /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="oilCompanyAuth.businessQualia" |
|
|
|
|
clearable |
|
|
|
|
placeholder="企业经营资质" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="联系方式" prop="contactPhone"> |
|
|
|
|
<el-input v-model="oilCompanyAuth.contactPhone" clearable placeholder="手机号" /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="oilCompanyAuth.contactPhone" |
|
|
|
|
clearable |
|
|
|
|
placeholder="手机号" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="企业网址" prop="website"> |
|
|
|
|
<el-input v-model="oilCompanyAuth.website" clearable placeholder="企业门户" /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="oilCompanyAuth.website" |
|
|
|
|
clearable |
|
|
|
|
placeholder="企业门户" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="营业执照号码" prop="businessLienceId"> |
|
|
|
|
<el-input v-model="oilCompanyAuth.businessLienceId" clearable placeholder="营业执照号码" /> |
|
|
|
|
</el-form-item></el-col> |
|
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="营业执照号码" prop="businessLienceId"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="oilCompanyAuth.businessLienceId" |
|
|
|
|
clearable |
|
|
|
|
placeholder="营业执照号码" |
|
|
|
|
/> </el-form-item |
|
|
|
|
></el-col> |
|
|
|
|
</el-col> |
|
|
|
|
<!-- <el-col :span="12"> |
|
|
|
|
<el-form-item label="打款名称" prop="bankCardName"> |
|
|
|
@ -117,7 +156,7 @@ |
|
|
|
|
</el-col> --> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-form-item label="营业执照照片" prop="businessLienceImg"> |
|
|
|
|
<el-upload |
|
|
|
|
<!-- <el-upload |
|
|
|
|
action="/lsm/ocr/business" |
|
|
|
|
list-type="picture-card" |
|
|
|
|
:on-preview="businessLienceImgPreview" |
|
|
|
@ -127,7 +166,7 @@ |
|
|
|
|
:limit="1" |
|
|
|
|
> |
|
|
|
|
<i class="el-icon-plus" /> |
|
|
|
|
</el-upload> |
|
|
|
|
</el-upload> --> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-dialog |
|
|
|
|
v-el-drag-dialog |
|
|
|
@ -135,7 +174,11 @@ |
|
|
|
|
title="营业执照" |
|
|
|
|
:modal="false" |
|
|
|
|
> |
|
|
|
|
<img width="100%" :src="oilCompanyAuth.ibusinessLienceImgImageShow" alt=""> |
|
|
|
|
<img |
|
|
|
|
width="100%" |
|
|
|
|
:src="oilCompanyAuth.ibusinessLienceImgImageShow" |
|
|
|
|
alt="" |
|
|
|
|
/> |
|
|
|
|
</el-dialog> |
|
|
|
|
</el-col> |
|
|
|
|
<!-- <el-col :span="12"> |
|
|
|
@ -147,49 +190,59 @@ |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> --> |
|
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
</el-form> |
|
|
|
|
</el-row> |
|
|
|
|
<div :span="24" style="background:#fff;margin-top:20px;text-align: right;width:100%;position: absolute;bottom: 15px;left: 0;"> |
|
|
|
|
<el-divider style="width:100%"></el-divider> |
|
|
|
|
<el-button @click="close">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="submit" style="margin-right:10px">提交</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div |
|
|
|
|
:span="24" |
|
|
|
|
style=" |
|
|
|
|
background: #fff; |
|
|
|
|
margin-top: 20px; |
|
|
|
|
text-align: right; |
|
|
|
|
width: 100%; |
|
|
|
|
position: absolute; |
|
|
|
|
bottom: 15px; |
|
|
|
|
left: 0; |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
<el-divider style="width: 100%"></el-divider> |
|
|
|
|
<el-button @click="close">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="submit" style="margin-right: 10px" |
|
|
|
|
>提交</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import oilCompanyAuthApi from '@/api/customerManagement/oilCompanyAuth' |
|
|
|
|
import AreaCodeApi from '@/api/customerManagement/areaCode' |
|
|
|
|
import { imgCompress } from '@/utils' |
|
|
|
|
import axios from 'axios' |
|
|
|
|
import oilCompanyAuthApi from "@/api/customerManagement/oilCompanyAuth"; |
|
|
|
|
import AreaCodeApi from "@/api/customerManagement/areaCode"; |
|
|
|
|
// import { imgCompress } from "@/utils"; |
|
|
|
|
import axios from "axios"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
props: { |
|
|
|
|
oilCompanyInfo: { |
|
|
|
|
type: Object, |
|
|
|
|
default() { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
default() {}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
gridNum: { |
|
|
|
|
row: { |
|
|
|
|
gutter: 2 |
|
|
|
|
gutter: 2, |
|
|
|
|
}, |
|
|
|
|
cols: { |
|
|
|
|
xs: 24, |
|
|
|
|
sm: 24, |
|
|
|
|
md: 12, |
|
|
|
|
lg: 12, |
|
|
|
|
xl: 6 |
|
|
|
|
} |
|
|
|
|
xl: 6, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
loading:false, |
|
|
|
|
imgCompress, |
|
|
|
|
userList:[], |
|
|
|
|
loading: false, |
|
|
|
|
// imgCompress, |
|
|
|
|
userList: [], |
|
|
|
|
uploadUrl: process.env.VUE_APP_UPLOAD_PRIVATE_URL, // 加密图片url |
|
|
|
|
imgeDialogVisible: false, |
|
|
|
|
areaTree: [], // 省市区树形结构 |
|
|
|
@ -212,145 +265,193 @@ export default { |
|
|
|
|
businessLienceId: undefined, |
|
|
|
|
auth: false, |
|
|
|
|
auditMark: undefined, |
|
|
|
|
createSource: 'WEBM' |
|
|
|
|
createSource: "WEBM", |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
companyName: [ |
|
|
|
|
{ required: true, message: '请输入企业名称', trigger: 'blur' }, |
|
|
|
|
{ min: 3, max: 50, message: '长度在 3 到 50 个字符', trigger: 'blur' } |
|
|
|
|
{ required: true, message: "请输入企业名称", trigger: "blur" }, |
|
|
|
|
{ |
|
|
|
|
min: 3, |
|
|
|
|
max: 50, |
|
|
|
|
message: "长度在 3 到 50 个字符", |
|
|
|
|
trigger: "blur", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
bankCardName:[ |
|
|
|
|
{ required: true, message: '请输入打款名称', trigger: 'blur' }, |
|
|
|
|
bankCardName: [ |
|
|
|
|
{ required: true, message: "请输入打款名称", trigger: "blur" }, |
|
|
|
|
], |
|
|
|
|
bankCardNo:[ |
|
|
|
|
{ required: true, message: '请输入银行卡号', trigger: 'blur' }, |
|
|
|
|
bankCardNo: [ |
|
|
|
|
{ required: true, message: "请输入银行卡号", trigger: "blur" }, |
|
|
|
|
], |
|
|
|
|
bankName:[ |
|
|
|
|
{ required: true, message: '请输入开户行名称', trigger: 'change' }, |
|
|
|
|
bankName: [ |
|
|
|
|
{ required: true, message: "请输入开户行名称", trigger: "change" }, |
|
|
|
|
], |
|
|
|
|
interBankCode:[ |
|
|
|
|
{ required: true, message: '请输入联行号', trigger: 'blur' }, |
|
|
|
|
interBankCode: [ |
|
|
|
|
{ required: true, message: "请输入联行号", trigger: "blur" }, |
|
|
|
|
], |
|
|
|
|
address: [ |
|
|
|
|
{ min: 1, max: 300, message: '长度在 1 到 300 个字符', trigger: 'blur' } |
|
|
|
|
{ |
|
|
|
|
min: 1, |
|
|
|
|
max: 300, |
|
|
|
|
message: "长度在 1 到 300 个字符", |
|
|
|
|
trigger: "blur", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
companyLegalPerson: [ |
|
|
|
|
{ min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
registeredCapital: [ |
|
|
|
|
{ pattern: /^\d*$/, message: '只能输入数值' } |
|
|
|
|
{ |
|
|
|
|
min: 1, |
|
|
|
|
max: 50, |
|
|
|
|
message: "长度在 1 到 50 个字符", |
|
|
|
|
trigger: "blur", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
registeredCapital: [{ pattern: /^\d*$/, message: "只能输入数值" }], |
|
|
|
|
businessQualia: [ |
|
|
|
|
{ min: 1, max: 255, message: '长度在 1 到 255 个字符', trigger: 'blur' } |
|
|
|
|
{ |
|
|
|
|
min: 1, |
|
|
|
|
max: 255, |
|
|
|
|
message: "长度在 1 到 255 个字符", |
|
|
|
|
trigger: "blur", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
contactPhone: [ |
|
|
|
|
{ pattern: /^1[3456789]\d{9}$/, message: '目前只支持中国大陆的手机号码' } |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
pattern: /^1[3456789]\d{9}$/, |
|
|
|
|
message: "目前只支持中国大陆的手机号码", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
website: [ |
|
|
|
|
{ pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/, message: '请输入正确网址' } |
|
|
|
|
{ |
|
|
|
|
pattern: |
|
|
|
|
/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/, |
|
|
|
|
message: "请输入正确网址", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
businessLienceId: [ |
|
|
|
|
{ min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur' } |
|
|
|
|
{ |
|
|
|
|
min: 1, |
|
|
|
|
max: 50, |
|
|
|
|
message: "长度在 1 到 50 个字符", |
|
|
|
|
trigger: "blur", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
businessScope: [ |
|
|
|
|
{ min: 1, max: 255, message: '长度在 1 到 255 个字符', trigger: 'blur' } |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
{ |
|
|
|
|
min: 1, |
|
|
|
|
max: 255, |
|
|
|
|
message: "长度在 1 到 255 个字符", |
|
|
|
|
trigger: "blur", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
this.oilCompanyAuth.companyId = this.oilCompanyInfo.id |
|
|
|
|
this.oilCompanyAuth.companyName = this.oilCompanyInfo.name |
|
|
|
|
AreaCodeApi.getTree().then(res => { |
|
|
|
|
this.areaTree = res.data |
|
|
|
|
}) |
|
|
|
|
this.oilCompanyAuth.companyId = this.oilCompanyInfo.id; |
|
|
|
|
this.oilCompanyAuth.companyName = this.oilCompanyInfo.name; |
|
|
|
|
AreaCodeApi.getTree().then((res) => { |
|
|
|
|
this.areaTree = res.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
handleSelect(e){ |
|
|
|
|
console.log(e) |
|
|
|
|
if(e){ |
|
|
|
|
console.log(this.userList.filter((item,index)=>item.bankName==e)[0].cnaps); |
|
|
|
|
this.oilCompanyAuth.interBankCode = this.userList.filter((item,index)=>item.bankName==e)[0].cnaps |
|
|
|
|
handleSelect(e) { |
|
|
|
|
console.log(e); |
|
|
|
|
if (e) { |
|
|
|
|
console.log( |
|
|
|
|
this.userList.filter((item, index) => item.bankName == e)[0].cnaps |
|
|
|
|
); |
|
|
|
|
this.oilCompanyAuth.interBankCode = this.userList.filter( |
|
|
|
|
(item, index) => item.bankName == e |
|
|
|
|
)[0].cnaps; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
userRemoteMethod(queryString){ |
|
|
|
|
this.loading = true; |
|
|
|
|
if(this.timer){ |
|
|
|
|
clearTimeout(this.timer) |
|
|
|
|
userRemoteMethod(queryString) { |
|
|
|
|
this.loading = true; |
|
|
|
|
if (this.timer) { |
|
|
|
|
clearTimeout(this.timer); |
|
|
|
|
} |
|
|
|
|
this.timer = setTimeout(()=>{ |
|
|
|
|
AreaCodeApi.findAllByName({name:queryString}).then(res=>{ |
|
|
|
|
this.loading = false |
|
|
|
|
this.userList = res.data |
|
|
|
|
}) |
|
|
|
|
},300) |
|
|
|
|
|
|
|
|
|
this.timer = setTimeout(() => { |
|
|
|
|
AreaCodeApi.findAllByName({ name: queryString }).then((res) => { |
|
|
|
|
this.loading = false; |
|
|
|
|
this.userList = res.data; |
|
|
|
|
}); |
|
|
|
|
}, 300); |
|
|
|
|
}, |
|
|
|
|
businessLienceImgPreview(file) { // 查询大图 |
|
|
|
|
this.oilCompanyAuth.ibusinessLienceImgImageShow = file.url |
|
|
|
|
this.imgeDialogVisible = true |
|
|
|
|
businessLienceImgPreview(file) { |
|
|
|
|
// 查询大图 |
|
|
|
|
this.oilCompanyAuth.ibusinessLienceImgImageShow = file.url; |
|
|
|
|
this.imgeDialogVisible = true; |
|
|
|
|
}, |
|
|
|
|
businessLienceImgSuccess(response, file) { // 营业执照上传成功 |
|
|
|
|
if (response.code === '0') { |
|
|
|
|
this.oilCompanyAuth.businessLienceId = response.data.words_result.creditCode.words |
|
|
|
|
this.oilCompanyAuth.companyName = response.data.words_result.unitName.words |
|
|
|
|
this.oilCompanyAuth.companyLegalPerson = response.data.words_result.legal.words |
|
|
|
|
this.oilCompanyAuth.businessScope = response.data.words_result.scope.words |
|
|
|
|
businessLienceImgSuccess(response, file) { |
|
|
|
|
// 营业执照上传成功 |
|
|
|
|
if (response.code === "0") { |
|
|
|
|
this.oilCompanyAuth.businessLienceId = |
|
|
|
|
response.data.words_result.creditCode.words; |
|
|
|
|
this.oilCompanyAuth.companyName = |
|
|
|
|
response.data.words_result.unitName.words; |
|
|
|
|
this.oilCompanyAuth.companyLegalPerson = |
|
|
|
|
response.data.words_result.legal.words; |
|
|
|
|
this.oilCompanyAuth.businessScope = |
|
|
|
|
response.data.words_result.scope.words; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
imgCompress(file.raw).then(res => { |
|
|
|
|
const form = new FormData() |
|
|
|
|
res.fileName = file.fileName |
|
|
|
|
form.append('file', res) |
|
|
|
|
form.append('code', 'A003') |
|
|
|
|
// imgCompress(file.raw).then((res) => { |
|
|
|
|
// const form = new FormData(); |
|
|
|
|
// res.fileName = file.fileName; |
|
|
|
|
// form.append("file", res); |
|
|
|
|
// form.append("code", "A003"); |
|
|
|
|
|
|
|
|
|
// 上传到oss |
|
|
|
|
axios.post(this.uploadUrl, form, { headers: { 'Content-type': 'application/x-www-form-urlencoded' }}).then(res => { |
|
|
|
|
if (res.data.code === 20000) { |
|
|
|
|
this.oilCompanyAuth.businessLienceImg = res.data.data.path |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
// // 上传到oss |
|
|
|
|
// axios |
|
|
|
|
// .post(this.uploadUrl, form, { |
|
|
|
|
// headers: { "Content-type": "application/x-www-form-urlencoded" }, |
|
|
|
|
// }) |
|
|
|
|
// .then((res) => { |
|
|
|
|
// if (res.data.code === 20000) { |
|
|
|
|
// this.oilCompanyAuth.businessLienceImg = res.data.data.path; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
businessLienceImgRemove() { // 营业执照删除 |
|
|
|
|
this.oilCompanyAuth.ibusinessLienceImgImageShow = undefined |
|
|
|
|
this.oilCompanyAuth.businessLienceImg = undefined |
|
|
|
|
businessLienceImgRemove() { |
|
|
|
|
// 营业执照删除 |
|
|
|
|
this.oilCompanyAuth.ibusinessLienceImgImageShow = undefined; |
|
|
|
|
this.oilCompanyAuth.businessLienceImg = undefined; |
|
|
|
|
}, |
|
|
|
|
submit() { |
|
|
|
|
this.$refs['form'].validate((valid) => { |
|
|
|
|
this.$refs["form"].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
this.save(this.oilCompanyAuth) |
|
|
|
|
this.save(this.oilCompanyAuth); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
save() { |
|
|
|
|
const data = { ...this.oilCompanyAuth } |
|
|
|
|
const data = { ...this.oilCompanyAuth }; |
|
|
|
|
if (data.auth) { |
|
|
|
|
data.auditMark = 1 |
|
|
|
|
data.auditMark = 1; |
|
|
|
|
} else { |
|
|
|
|
data.auditMark = 2 |
|
|
|
|
data.auditMark = 2; |
|
|
|
|
} |
|
|
|
|
if (this.addrCode.length > 1) { |
|
|
|
|
data.provinceCode = this.addrCode[0] |
|
|
|
|
data.cityCode = this.addrCode[1] |
|
|
|
|
data.areaCode = this.addrCode[2] |
|
|
|
|
data.provinceCode = this.addrCode[0]; |
|
|
|
|
data.cityCode = this.addrCode[1]; |
|
|
|
|
data.areaCode = this.addrCode[2]; |
|
|
|
|
} |
|
|
|
|
// 保存 |
|
|
|
|
oilCompanyAuthApi.save(data).then(res => { |
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
this.$emit('closeDialog') |
|
|
|
|
this.$emit('getByPage') |
|
|
|
|
}) |
|
|
|
|
oilCompanyAuthApi.save(data).then((res) => { |
|
|
|
|
this.$message.success(res.msg); |
|
|
|
|
this.$emit("closeDialog"); |
|
|
|
|
this.$emit("getByPage"); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
close() { |
|
|
|
|
this.$emit('closeDialog') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.$emit("closeDialog"); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style scoped> |
|
|
|
|
.el-divider--horizontal{ |
|
|
|
|
.el-divider--horizontal { |
|
|
|
|
margin: 10px 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|