|
|
@@ -74,9 +74,9 @@
|
|
|
:rules="ruleValidate"
|
|
|
:label-width="'100px'"
|
|
|
>
|
|
|
- <el-form-item label="企业名称" prop="companyName">
|
|
|
+ <el-form-item label="企业名称" prop="name">
|
|
|
<el-input
|
|
|
- v-model="formModel.companyName"
|
|
|
+ v-model="formModel.name"
|
|
|
placeholder="请输入企业名称"
|
|
|
style="width: 300px"
|
|
|
></el-input>
|
|
|
@@ -96,31 +96,51 @@
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="企业规模" prop="scale">
|
|
|
- <el-input
|
|
|
- v-model="formModel.scale"
|
|
|
- placeholder="请输入企业规模"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ <el-select v-model="formModel.scale" filterable placeholder="请选择企业规模" style="width:300px">
|
|
|
+ <el-option v-for="item in scaleList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属行业" prop="industry">
|
|
|
- <el-input
|
|
|
- v-model="formModel.industry"
|
|
|
- placeholder="请输入所属行业"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ <el-select v-model="formModel.industry" filterable placeholder="请选择所属行业" style="width:300px">
|
|
|
+ <el-option v-for="item in industryList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="公司地址" prop="address">
|
|
|
- <el-input
|
|
|
- v-model="formModel.address"
|
|
|
- placeholder="请输入公司地址"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
+ <el-form-item label="公司地址" prop="zone">
|
|
|
+ <el-select v-model="formModel.province" filterable placeholder="省" style="width:85px;margin-right:20px" @change="changeCityList">
|
|
|
+ <el-option v-for="item in provinceList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.cityName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="formModel.city" filterable placeholder="市" style="width:85px;margin-right:20px" @change="changeZoneList">
|
|
|
+ <el-option v-for="item in cityList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.cityName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="formModel.zone" filterable placeholder="区" style="width:85px">
|
|
|
+ <el-option v-for="item in zoneList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.cityName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item >
|
|
|
+ <el-form-item prop="address">
|
|
|
<el-input
|
|
|
type="textarea"
|
|
|
:rows="5"
|
|
|
- v-model="formModel.address2"
|
|
|
+ v-model="formModel.address"
|
|
|
placeholder="请输入详细地址"
|
|
|
style="width: 300px"
|
|
|
></el-input>
|
|
|
@@ -147,9 +167,9 @@
|
|
|
:rules="ruleValidate2"
|
|
|
:label-width="'100px'"
|
|
|
>
|
|
|
- <el-form-item label="企业名称" prop="companyName" >
|
|
|
+ <el-form-item label="企业名称" prop="name" >
|
|
|
<el-input readonly="readonly"
|
|
|
- v-model="formModel.companyName"
|
|
|
+ v-model="formModel.name"
|
|
|
placeholder="请输入企业名称"
|
|
|
style="width: 300px"
|
|
|
></el-input>
|
|
|
@@ -194,7 +214,11 @@
|
|
|
<van-empty description="企业资料审核中..."></van-empty>
|
|
|
</div>
|
|
|
<div class="formPanel4" v-show="vshow4">
|
|
|
-
|
|
|
+ <el-result icon="success" title="企业认证完成" subTitle="请根据提示进行操作">
|
|
|
+ <template slot="extra">
|
|
|
+ <el-button type="primary" size="medium" @click="handleEdit">修改企业信息</el-button>
|
|
|
+ </template>
|
|
|
+ </el-result>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
@@ -203,6 +227,8 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import Constant from "@/constant";
|
|
|
+import cityApi from "@/api/base/city";
|
|
|
+import dataDictionaryApi from "@/api/sys/dataDictionary";
|
|
|
import enterpriseCertificationApproveApi from "@/api/base/enterpriseCertificationApprove";
|
|
|
import { getToken } from "@/utils/auth"; // get token from cookie
|
|
|
|
|
|
@@ -213,12 +239,13 @@ export default {
|
|
|
formModel: {},
|
|
|
formModel2: {},
|
|
|
ruleValidate: {
|
|
|
- companyName: [{ required: true, message: "企业名称不能为空", trigger: "blur" }],
|
|
|
+ name: [{ required: true, message: "企业名称不能为空", trigger: "blur" }],
|
|
|
scale: [{ required: true, message: "企业规模不能为空", trigger: "blur" }],
|
|
|
industry: [{ required: true, message: "所属行业不能为空", trigger: "blur" }],
|
|
|
address: [{ required: true, message: "公司地址不能为空", trigger: "blur" }],
|
|
|
logo: [{ required: true, message: "公司LOGO不能为空", trigger: "blur" }],
|
|
|
tel: [{ required: true, message: "企业电话不能为空", trigger: "blur" }],
|
|
|
+ zone: [{ required: true, message: "公司地址不能为空", trigger: "blur" }],
|
|
|
},
|
|
|
ruleValidate2: {
|
|
|
creditCode: [
|
|
|
@@ -251,14 +278,81 @@ export default {
|
|
|
},
|
|
|
fileUrl: "",
|
|
|
businessLicenseUrl:"",
|
|
|
+ industryList:[],
|
|
|
+ scaleList:[],
|
|
|
+ provinceList:[],
|
|
|
+ cityList:[],
|
|
|
+ zoneList:[],
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ var self = this;
|
|
|
+
|
|
|
+ dataDictionaryApi
|
|
|
+ .findByCatalogName({
|
|
|
+ catalogName: "所属行业",
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
+ var jsonData = response.data;
|
|
|
+ this.industryList = jsonData.data;
|
|
|
+ });
|
|
|
+
|
|
|
+ dataDictionaryApi
|
|
|
+ .findByCatalogName({
|
|
|
+ catalogName: "企业规模",
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
+ var jsonData = response.data;
|
|
|
+ this.scaleList = jsonData.data;
|
|
|
+ });
|
|
|
+
|
|
|
+ var formData = new FormData();
|
|
|
+
|
|
|
+ formData.append("type", "1");
|
|
|
+
|
|
|
+ cityApi.cityListByType(formData)
|
|
|
+ .then(function (response) {
|
|
|
+ var jsonData = response.data;
|
|
|
+ self.provinceList = jsonData.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ changeCityList(val){
|
|
|
+ var self = this;
|
|
|
+
|
|
|
+ var formData = new FormData();
|
|
|
+
|
|
|
+ formData.append("pid", val);
|
|
|
+
|
|
|
+ cityApi.cityListByPid(formData)
|
|
|
+ .then(function (response) {
|
|
|
+ var jsonData = response.data;
|
|
|
+ self.cityList = jsonData.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeZoneList(val){
|
|
|
+ var self = this;
|
|
|
+
|
|
|
+ var formData = new FormData();
|
|
|
+
|
|
|
+ formData.append("pid", val);
|
|
|
+
|
|
|
+ cityApi.cityListByPid(formData)
|
|
|
+ .then(function (response) {
|
|
|
+ var jsonData = response.data;
|
|
|
+ self.zoneList = jsonData.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
closeDialog() {
|
|
|
this.active = 0;
|
|
|
this.vshow1 = true;
|
|
|
this.vshow2 = false;
|
|
|
},
|
|
|
+ handleEdit(){
|
|
|
+ this.active = 0;
|
|
|
+ this.vshow1 = true;
|
|
|
+ this.vshow4 = false;
|
|
|
+ },
|
|
|
handleSubmit() {
|
|
|
var self = this;
|
|
|
|
|
|
@@ -277,17 +371,13 @@ export default {
|
|
|
this.$refs["form2"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
(function () {
|
|
|
- var id = self.formModel.id;
|
|
|
+ var enterpriseCertificationApproveId = self.formModel.enterpriseCertificationApproveId;
|
|
|
|
|
|
self.formModel.creditCode = self.formModel2.creditCode;
|
|
|
self.formModel.legalPerson = self.formModel2.legalPerson
|
|
|
self.formModel.businessLicenseUrl = self.formModel2.businessLicenseUrl
|
|
|
|
|
|
- if (id == null || id.length == 0) {
|
|
|
- return enterpriseCertificationApproveApi.add(self.formModel);
|
|
|
- } else {
|
|
|
- return enterpriseCertificationApproveApi.update(self.formModel);
|
|
|
- }
|
|
|
+ return enterpriseCertificationApproveApi.add(self.formModel);
|
|
|
})().then(function (response) {
|
|
|
var jsonData = response.data;
|
|
|
|
|
|
@@ -303,8 +393,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -342,9 +430,7 @@ export default {
|
|
|
var self = this;
|
|
|
|
|
|
(function () {
|
|
|
-
|
|
|
return enterpriseCertificationApproveApi.create();
|
|
|
-
|
|
|
})()
|
|
|
.then((response) => {
|
|
|
var jsonData = response.data;
|
|
|
@@ -352,6 +438,49 @@ export default {
|
|
|
|
|
|
if (jsonData.result) {
|
|
|
self.formModel = jsonData.data;
|
|
|
+
|
|
|
+ if(jsonData.data.province!=null){
|
|
|
+ self.formModel.province = parseInt(jsonData.data.province);
|
|
|
+
|
|
|
+ self.changeCityList(self.formModel.province);
|
|
|
+
|
|
|
+ if(jsonData.data.city!=null){
|
|
|
+ self.formModel.city = parseInt(jsonData.data.city);
|
|
|
+
|
|
|
+ self.changeZoneList(self.formModel.city);
|
|
|
+
|
|
|
+ if(jsonData.data.zone!=null){
|
|
|
+ self.formModel.zone = parseInt(jsonData.data.zone)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ self.formModel2 = jsonData.data;
|
|
|
+
|
|
|
+ if(jsonData.data.isCertification=='1'){
|
|
|
+ self.active = 2;
|
|
|
+ self.vshow3 = true;
|
|
|
+ self.vshow1 = false;
|
|
|
+ }
|
|
|
+ else if(jsonData.data.isCertification=='2'){
|
|
|
+ self.active = 3;
|
|
|
+ self.vshow4 = true;
|
|
|
+ self.vshow1 = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ let logo = self.formModel.logo;
|
|
|
+ if (logo != null) {
|
|
|
+ self.fileUrl =
|
|
|
+ logo + "?x-oss-process=image/resize,m_lfit,h_400,w_400";
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ let businessLicenseUrl = self.formModel.businessLicenseUrl;
|
|
|
+ if (businessLicenseUrl != null) {
|
|
|
+ self.businessLicenseUrl =
|
|
|
+ businessLicenseUrl + "?x-oss-process=image/resize,m_lfit,h_400,w_400";
|
|
|
+
|
|
|
+ }
|
|
|
} else {
|
|
|
self.$message.error(jsonData.message + "");
|
|
|
}
|