提交 b4676ca5 authored 作者: huaxinzhu's avatar huaxinzhu

云仓2.5-暂存

上级 0a0b7195
import request from '@/utils/request'; import request from '@/utils/request';
// 获取用户详细信息
export function getInfo(param) {
return request({
url: '/system/index/getInfo',
method: 'get',
params: param
})
}
// 获取主体信息 // 获取主体信息
export function getMainInf(query) { export function getMainInf(query) {
...@@ -69,14 +77,6 @@ export function upLoadImg (data) { ...@@ -69,14 +77,6 @@ export function upLoadImg (data) {
}); });
} }
// old
// export function upLoadImg (data) {
// return request({
// url: '/system/goods/uploadImg',
// method: 'post',
// data: data
// });
// }
// 获取商品类目 // 获取商品类目
export function getGoodsType(query) { export function getGoodsType(query) {
return request({ return request({
...@@ -85,3 +85,30 @@ export function getGoodsType(query) { ...@@ -85,3 +85,30 @@ export function getGoodsType(query) {
params: query params: query
}); });
} }
// 营业执照 图片识别信息
export function getLicenseImgInfoData(query) {
return request({
url: '/local/check/businessLicense',
method: 'get',
params: query
});
}
// 身份证 正/反 图片识别信息
export function getIdcardImgInfoData(query) {
return request({
url: '/local/check/idCard',
method: 'get',
params: query
});
}
// 查询 入驻类目资质
export function getUploadQualificationListData(query) {
return request({
url: '/local/qualification/list',
method: 'get',
params: query
});
}
...@@ -136,14 +136,14 @@ export default { ...@@ -136,14 +136,14 @@ export default {
}) })
}, },
async logout() { async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', { this.$confirm('确定退出系统吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
var ssa = window.location.host let ssa = window.location.host
var ht = document.location.protocol let ht = document.location.protocol
if(ssa =='localhost:1024'){ if(ssa =='localhost:1024'){
window.location.href=ht+'//'+this.ssourl +'/logout?redirect='+ht+'//'+ssa+'/login' window.location.href=ht+'//'+this.ssourl +'/logout?redirect='+ht+'//'+ssa+'/login'
}else{ }else{
......
...@@ -10,7 +10,13 @@ const user = { ...@@ -10,7 +10,13 @@ const user = {
sellerid:0, sellerid:0,
roles: [], roles: [],
permissions: [], permissions: [],
ssourl:'' ssourl:'',
// 客户信息中,入驻审核状态
// 0-未提交信息;
// 1-审核成;
// 2-审核中;
// 3-审核拒绝;
applyState: -1,
}, },
mutations: { mutations: {
...@@ -34,6 +40,9 @@ const user = { ...@@ -34,6 +40,9 @@ const user = {
}, },
SET_PERMISSIONS: (state, permissions) => { SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions state.permissions = permissions
},
SET_APPLYSTATE: (state, applyState) => {
state.applyState = applyState
} }
}, },
...@@ -98,6 +107,7 @@ const user = { ...@@ -98,6 +107,7 @@ const user = {
} }
commit('SET_NAME', user.Username) commit('SET_NAME', user.Username)
commit('SET_SELLERID', user.SellerId) commit('SET_SELLERID', user.SellerId)
commit('SET_APPLYSTATE', user.state) // 记录 商户入驻后的审核状态
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
resolve(res) resolve(res)
}).catch(error => { }).catch(error => {
......
...@@ -5,43 +5,28 @@ ...@@ -5,43 +5,28 @@
</div> </div>
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix steps"> <div slot="header" class="clearfix steps">
<el-steps :active="0" align-center finish-status="success"> <el-steps :active="1" align-center finish-status="success">
<!-- <el-step title="签署入驻协议"></el-step>--> <el-step title="注册账号"></el-step>
<el-step title="填写主体信息"></el-step> <el-step title="填写主体信息"></el-step>
<el-step title="填写品牌信息"></el-step>
<el-step title="填写店铺信息"></el-step> <el-step title="填写店铺信息"></el-step>
<el-step title="提交入驻审核"></el-step> <el-step title="提交入驻审核"></el-step>
</el-steps> </el-steps>
</div> </div>
<div class="main-con"> <div class="main-con">
<el-form ref="mainForm" :model="mainForm" :rules="mainRules" label-width="180px"> <el-form ref="mainForm" :model="mainForm" :rules="mainRules" label-width="180px" class="main-form-con" size="small">
<el-form-item label="主体类型:"> <el-form-item>
<el-radio-group v-model="mainForm.organization_type"> <p class="main-form-title">企业资质信息</p>
<el-radio :label="1">企业/公司</el-radio>
<el-radio :label="2">个体工商户</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="执照类型:" prop="license_type"> <el-form-item label="营业执照:" prop="license" >
<el-select v-model="mainForm.license_type" placeholder="请选择..." style="width: 400px;">
<el-option
v-for="item in zzOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="营业执照电子版:" prop="license" >
<div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;"> <div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;">
<div style="padding-right:6px;"> <div style="padding-right:6px;">
<el-upload <el-upload
class="uploadData" :class="['uploadData',{ 'hiden-dom': licenseImgFileList.length >= 1 }]"
action="#" action="#"
list-type="picture-card" list-type="picture-card"
:http-request="uploadLicenseImages" :http-request="uploadLicenseImages"
:limit="2" :limit="1"
:on-exceed="showTip" :on-exceed="showTip"
:before-upload = "beforeUpImg" :before-upload = "beforeUpImg"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
...@@ -60,7 +45,8 @@ ...@@ -60,7 +45,8 @@
</span> </span>
</div> </div>
<div style="width:380px;line-height: 24px;padding-top: 6px;"> <div style="width:380px;line-height: 24px;padding-top: 6px;">
<span class="tips-text">图片大小在2MB以内,支持png,jpg格式,最多可上传2张</span> <span class="tips-text">图片大小在2MB以内,支持png,jpg格式,最多可上传2张</span></br>
<span class="tips-text">请确保营业执照在有效期内</span>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -70,59 +56,50 @@ ...@@ -70,59 +56,50 @@
<span class="tips-text"><i class="el-icon-warning h-warning"></i>请按照营业执照上登记的完整名称填写</span> <span class="tips-text"><i class="el-icon-warning h-warning"></i>请按照营业执照上登记的完整名称填写</span>
</el-form-item> </el-form-item>
<el-form-item label="营业执照详细地址:" prop="organization_address"> <el-form-item label="统一社会代码:" prop="license_number" inline-message="true">
<el-input v-model="mainForm.organization_address" style="width: 400px;"></el-input> <el-input v-model="mainForm.license_number" style="width: 400px;"></el-input>
<span class="tips-text"><i class="el-icon-warning h-warning"></i>请按照营业执照上的详细地址填写</span> <span class="tips-text"><i class="el-icon-warning h-warning"></i>请按照营业执照上登记的完整名称填写</span>
</el-form-item> </el-form-item>
<el-form-item :gutter="20" label="营业期限:" prop="license_expires_time"> <el-form-item :gutter="20" label="营业期限:" prop="license_expires_time">
<el-date-picker type="date" placeholder="选择日期" v-model="periodConcreteTime" <el-date-picker
style="width: 300px;" :disabled="isConcretePeriod" @change="periodConcrete"></el-date-picker> style="width:400px;"
v-model="periodConcreteTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="periodLongTermChange"
:clearable="false"
/>
<el-checkbox v-model="periodLongTermVal" :disabled="isPeriodDisabled" <el-checkbox v-model="periodLongTermVal" :disabled="isPeriodDisabled"
style="padding-left:15px;" @change="periodLongTerm">长期 style="padding-left:15px;" @change="periodConcreteChange">长期
</el-checkbox> </el-checkbox>
<span class="tips-text"><i class="el-icon-warning h-warning"></i>具体时间和长期,二者必填一个</span> <span class="tips-text"><i class="el-icon-warning h-warning"></i>具体时间和长期,二者必填一个</span>
</el-form-item> </el-form-item>
<el-form-item label="法定代表人证件类型:" prop="idcard_type"> <el-form-item>
<el-select v-model="mainForm.idcard_type" placeholder="请选择..." style="width: 400px;"> <p class="main-form-tips">请核对营业执照信息,若信息不符合,可手动修改</p>
<el-option
v-for="item in idcardTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="法定代表人姓名:" prop="real_name">
<el-input v-model="mainForm.real_name" style="width: 400px;"></el-input>
<span class="tips-text"><i class="el-icon-warning h-warning"></i>请按照营业执照上登记的法人填写</span>
</el-form-item>
<el-form-item label="法定代表人证件号:" prop="idcard_number">
<el-input v-model="mainForm.idcard_number" style="width: 400px;"></el-input>
</el-form-item> </el-form-item>
<el-divider></el-divider>
<el-form-item label="有效期至:" prop="idcard_expires_time"> <el-form-item>
<el-date-picker type="date" placeholder="选择日期" v-model="validityConcreteTime" <p class="main-form-title">企业法人信息</p>
style="width: 300px;" @change="validityConcrete"></el-date-picker>
<el-checkbox v-model="validityLongTermVal" style="padding-left:15px;"
@change="validityLongTerm">长期
</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item label="法人证件电子版:" prop="idcard_front"> <el-form-item label="法人身份证:" prop="idcard_front">
<div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;"> <div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;">
<div style="padding-right:6px;"> <!-- 身份证正面 -->
<div style="padding: 0 20px;">
<el-upload <el-upload
class="uploadData" :class="['uploadData',{ 'hiden-dom': idcardImgFileList.length >= 1 }]"
list-type="picture-card" list-type="picture-card"
action="#" action="#"
:limit="2" :limit="1"
:on-exceed="showTip" :on-exceed="showTip"
:before-upload = "beforeUpImg" :before-upload = "beforeUpImg"
:http-request="uploadIdcardImages" :http-request="uploadIdcardPositive"
:on-preview="handlePictureCardPreview2" :on-preview="handlePictureCardPreview2"
:on-remove="handleRemove2" :on-remove="handleRemove2"
:file-list = 'idcardImgFileList' :file-list = 'idcardImgFileList'
...@@ -133,21 +110,70 @@ ...@@ -133,21 +110,70 @@
<img width="100%" :src="dialogImageUrl2" alt=""> <img width="100%" :src="dialogImageUrl2" alt="">
</el-dialog> </el-dialog>
</div> </div>
<!-- 身份证反面 -->
<div style="padding: 0 20px;">
<el-upload
:class="['uploadData',{ 'hiden-dom': idcardBackImgFileList.length >= 1 }]"
list-type="picture-card"
action="#"
:limit="1"
:on-exceed="showTip"
:file-list = 'idcardBackImgFileList'
:before-upload = "beforeUpImg"
:on-preview="handleBackPictureCardPreview2"
:on-remove="handleBackRemove2"
:http-request="uploadIdcardBack"
>
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogBackVisible2">
<img width="100%" :src="dialogBackImageUrl2" alt="">
</el-dialog>
</div>
<div> <div>
<span class="tips-text"> <span class="tips-text">
<i class="el-icon-warning h-warning"></i> <i class="el-icon-warning h-warning"></i>
</span> </span>
</div> </div>
<div style="width:380px;line-height: 24px;padding-top: 6px;"> <div style="width:380px;line-height: 24px;padding-top: 6px;">
<span class="tips-text">请按顺序分别上传正面(照片面)和反面(国徽面)电子版图片,文件大小在 2MB以内,支持png,jpg格式,最多可上传2张</span> <span class="tips-text">请按顺序分别上传正面(照片面)和反面(国徽面)电子版图片,文件大小在 2MB以内,支持png,jpg格式,最多可上传2张</span>
</div> </div>
</div> </div>
<div class="idcard-tips-con">
<p>请上传身份证正面</p>
<p>请上传身份证国徽面</p>
</div>
</el-form-item>
<el-form-item label="法定姓名:" prop="real_name">
<el-input v-model="mainForm.real_name" style="width: 400px;"></el-input>
<span class="tips-text"><i class="el-icon-warning h-warning"></i>请按照营业执照上登记的法人填写</span>
</el-form-item>
<el-form-item label="法定代表人证件号:" prop="idcard_number">
<el-input v-model="mainForm.idcard_number" style="width: 400px;"></el-input>
</el-form-item>
<el-form-item label="有效期至:" prop="idcard_expires_time">
<el-date-picker
style="width:400px;"
v-model="validityConcreteTime"
type="daterange"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="validityConcreteTimeChange"
:clearable="false"
/>
<el-checkbox v-model="validityLongTermVal" style="padding-left:15px;" @change="validityLongTermValChange">长期
</el-checkbox>
</el-form-item>
<el-form-item>
<p class="main-form-tips">请核对企业法人信息,若信息不符合,可手动修改</p>
</el-form-item> </el-form-item>
<!-- <el-form-item style="padding-top:20px;">-->
<!--&lt;!&ndash; <el-button type="primary" @click="back" style="margin-right: 40px;">上一步</el-button>&ndash;&gt;-->
<!-- <el-button type="primary" @click="next('mainForm')">下一步</el-button>-->
<!-- </el-form-item>-->
<div class="confirm-btn"> <div class="confirm-btn">
<p> <p>
<el-button type="primary" style="padding: 8px 30px;" @click="next('mainForm')">下一步</el-button> <el-button type="primary" style="padding: 8px 30px;" @click="next('mainForm')">下一步</el-button>
...@@ -164,7 +190,8 @@ ...@@ -164,7 +190,8 @@
</template> </template>
<script> <script>
import { getMainInf,addMain,upLoadImg } from '@/api/module/entry'; import { getInfo,getMainInf,addMain,upLoadImg,getLicenseImgInfoData,getIdcardImgInfoData } from '@/api/module/entry';
import { dateFormat } from '@/utils'
export default { export default {
name: "FillMainInf", name: "FillMainInf",
data() { data() {
...@@ -202,7 +229,7 @@ ...@@ -202,7 +229,7 @@
} }
}; };
let licenseTimeValidator = (rule, value, callback) => { let licenseTimeValidator = (rule, value, callback) => {
if (this.periodConcreteTime === null && this.periodLongTermVal === false) { if (this.periodConcreteTime == [] && this.periodLongTermVal === false) {
callback(new Error("营业期限具体时间和长期必须填写其中一个")); callback(new Error("营业期限具体时间和长期必须填写其中一个"));
} else { } else {
callback(); callback();
...@@ -217,55 +244,46 @@ ...@@ -217,55 +244,46 @@
}; };
return { return {
licenseImgFileList: [], // 营业执照图片 licenseImgFileList: [], // 营业执照图片
idcardImgFileList: [], // 法人证件照图片 idcardImgFileList: [], // 身份证件照图片
idcardBackImgFileList: [], // 身份证国徽面
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
dialogImageUrl2: '', dialogImageUrl2: '',
dialogVisible2: false, dialogVisible2: false,
// 执照类型 dialogBackImageUrl2: '',
zzOptions: [ dialogBackVisible2: false,
{label: "多证合一营业执照(统一社会信用代码)", value: 1},
{label: "多证合一营业执照(非统一社会信用代码)", value: 2},
],
// 法人执照类型
idcardTypeOptions: [
{label: "大陆身份证", value: 1},
{label: "护照", value: 2},
{label: "港奥台居民通行证", value: 3},
{label: "台湾居民通行证", value: 4},
],
// 营业期限 // 营业期限
periodConcreteTime: null, periodConcreteTime: [],
periodLongTermVal: false, periodLongTermVal: false,
// 证件有效期 // 证件有效期
validityConcreteTime: null, validityConcreteTime: [],
validityLongTermVal: false, validityLongTermVal: false,
isConcretePeriod: false, isConcretePeriod: false,
isPeriodDisabled: false, isPeriodDisabled: false,
isValidity: true, // 有效期至 是否填写 isValidity: true, // 有效期至 是否填写
submitTime: [],
// 主体信息 // 主体信息
mainForm: { mainForm: {
organization_type: 2,
license_type: '',
license: '', license: '',
organization_name: '', organization_name: '',
organization_address: '', license_number: '',
license_expires_time: '', // 法人信息
idcard_type: '', idcard_front: '',
idcard_back: '',
real_name: '', real_name: '',
idcard_number: '', idcard_number: '',
idcard_start_time: '',
idcard_expires_time: '', idcard_expires_time: '',
idcard_front: '', license_expires_time: '',
idcardback: 'jiazhuangwshifanmian' license_start_time: ''
}, },
// 主体信息校验 // 主体信息校验
hasLicense: false, hasLicense: false,
mainRules: { mainRules: {
license_type: [{required: true, message: '营业执照类型不能为空', trigger: 'change'}],
license: [{required: true, message: '请上传营业执照电子版',validator: licenseValidator}], license: [{required: true, message: '请上传营业执照电子版',validator: licenseValidator}],
organization_name: [{required: true, message: '企业名称不能为空', trigger: 'blur'}], organization_name: [{required: true, message: '企业名称不能为空', trigger: 'blur'}],
organization_address: [{required: true, message: '营业执照地址不能为空', trigger: 'blur'}], license_number: [{required: true, message: '统一社会代码不能为空', trigger: 'blur'}],
idcard_type: [{required: true, message: '证件类型不能为空', trigger: 'change'}], // idcard_type: [{required: true, message: '证件类型不能为空', trigger: 'change'}],
real_name: [{required: true, message: '法人姓名不能为空', trigger: 'blur'}], real_name: [{required: true, message: '法人姓名不能为空', trigger: 'blur'}],
idcard_number: [ idcard_number: [
{required: true, message: '法人证件号不能为空', trigger: 'blur'}, {required: true, message: '法人证件号不能为空', trigger: 'blur'},
...@@ -278,35 +296,55 @@ ...@@ -278,35 +296,55 @@
} }
}, },
created() { created() {
this.getMain(); // 根据 用户信息,判断是否请求 回显接口
}, getInfo().then(res=> {
mounted() { if (res.code == 1 && res.data.user) {
let isRrequest = false;
if (res.data.user.state == 0) {
if (res.data.user.status == 1) {
isRrequest = true;
}else {
isRrequest = false;
}
}else if (res.data.user.state == 1 || res.data.user.state == 2 || res.data.user.state == 3) {
isRrequest = true;
}
if (isRrequest) {
this.getMain();
}
} // if end
}); // getInfo end
}, },
mounted() {},
methods: { methods: {
periodConcrete() { /** 营业期限 选择区间时间时 */
if (this.periodConcreteTime) { periodLongTermChange() {
if (Array.isArray(this.periodConcreteTime) && this.periodConcreteTime.length == 2) {
this.periodLongTermVal = false; this.periodLongTermVal = false;
} }
}, },
periodLongTerm() { /** 营业期限 选择 长期时 */
periodConcreteChange() {
if (this.periodLongTermVal) { if (this.periodLongTermVal) {
this.periodConcreteTime = null; this.periodConcreteTime = [];
} }
}, },
validityConcrete() { /** 身份证有效期 选择区间时间时 */
if (this.validityConcreteTime) { validityConcreteTimeChange() {
if (Array.isArray(this.validityConcreteTime) && this.validityConcreteTime.length == 2) {
this.validityLongTermVal = false; this.validityLongTermVal = false;
} }
}, },
validityLongTerm() { /** 身份证有效期 选择 长期时 */
validityLongTermValChange() {
if (this.validityLongTermVal) { if (this.validityLongTermVal) {
this.validityConcreteTime = null; this.validityConcreteTime = [];
} }
}, },
// 上传图片格式和大小的校验 /** 上传 图片大小和格式校验 */
beforeUpImg(file) { beforeUpImg(file) {
let isImgSize = (file.size / 1024 /1024) > 2; // let isImgSize = (file.size / 1024 / 100) > 5;
if(file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") { if(file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") {
this.$message({ this.$message({
message: '上传图片格式只支持png/png格式', message: '上传图片格式只支持png/png格式',
...@@ -314,15 +352,15 @@ ...@@ -314,15 +352,15 @@
}); });
return false; return false;
} }
if(isImgSize) { // if(isImgSize) {
this.$message({ // this.$message({
message: '上传图片大小不能超过2M', // message: '上传图片大小不能超过500k',
type: "warning" // type: "warning"
}); // });
return false; // return false;
} // }
}, },
// 营业执照图片,上传 /** 上传 营业执照图片 */
uploadLicenseImages(param) { uploadLicenseImages(param) {
this.getBase64(param.file).then((res) => { this.getBase64(param.file).then((res) => {
let result = res.split(","); let result = res.split(",");
...@@ -333,6 +371,8 @@ ...@@ -333,6 +371,8 @@
this.licenseImgFileList.push({'url':res.data.image_url}); this.licenseImgFileList.push({'url':res.data.image_url});
this.$message({type: 'success',message:'上传成功'}); this.$message({type: 'success',message:'上传成功'});
this.$refs.mainForm.clearValidate('license'); this.$refs.mainForm.clearValidate('license');
// 图片识别
this.readLicenseImgInfo(this.licenseImgFileList);
}else { }else {
this.$message({type:'error',message:res.message ? res.message : '上传失败'}); this.$message({type:'error',message:res.message ? res.message : '上传失败'});
} }
...@@ -350,8 +390,39 @@ ...@@ -350,8 +390,39 @@
} }
} }
}, },
// 上传法人证件照 /** 识别 营业执照信息 */
uploadIdcardImages(param) { readLicenseImgInfo(fileList) {
// debugger
if ( !Array.isArray(fileList) || !fileList[0].url) return
let data = {img: fileList[0].url}
// let data = {img: 'http://excel.jxhh.com/1626058781.jpg'}
getLicenseImgInfoData(data).then(res=> {
// console.log(369,res);
if (res.code == 1 ) {
this.mainForm.organization_name = res.data.words_result['单位名称'].words ? res.data.words_result['单位名称'].words : '';
this.mainForm.license_number = res.data.words_result['社会信用代码'].words ? res.data.words_result['社会信用代码'].words : '';
// 营业期限处理
if (res.data.words_result['有效期'].words == '长期' || res.data.words_result['有效期'].words == '年月日') {
this.periodConcreteTime = [];
this.periodLongTermVal = true;
// this.isConcretePeriod = true;
}else {
// 营业期限 日期处理 XXXX年XX月XX日 => xx-xx-xx
let beginTimeStr = res.data.words_result['成立日期'].words ? res.data.words_result['成立日期'].words : '';
let endTimeStr = res.data.words_result['有效期'].words
let beginTime = beginTimeStr.replace(/年|月|日/g,"-").substr(0,beginTimeStr.length - 1)
let endTime = endTimeStr.replace(/年|月|日/g,"-").substr(0,endTimeStr.length - 1)
this.periodConcreteTime = [];
this.periodConcreteTime.push(beginTime);
this.periodConcreteTime.push(endTime);
// this.isConcretePeriod = false;
this.periodLongTermVal = false;
}
}
});
},
/** 上传身份证 正面 */
uploadIdcardPositive(param) {
this.getBase64(param.file).then((res) => { this.getBase64(param.file).then((res) => {
let result = res.split(","); let result = res.split(",");
this.Base64img = result[1]; this.Base64img = result[1];
...@@ -361,12 +432,24 @@ ...@@ -361,12 +432,24 @@
this.idcardImgFileList.push({'url':res.data.image_url}); this.idcardImgFileList.push({'url':res.data.image_url});
this.$message({type:'success',message:'上传成功'}); this.$message({type:'success',message:'上传成功'});
this.$refs.mainForm.clearValidate('idcard_front'); this.$refs.mainForm.clearValidate('idcard_front');
this.readIdcardPositive(this.idcardImgFileList);
}else { }else {
this.$message({type:'error',message:res.message ? res.message : '上传失败'}); this.$message({type:'error',message:res.message ? res.message : '上传失败'});
} }
}); });
}); });
}, },
/** 识别 身份证 正面 */
readIdcardPositive(fileList) {
if ( !Array.isArray(fileList) || !fileList[0].url) return
let data = {img: fileList[0].url}
getIdcardImgInfoData(data).then(res=> {
if (res.code == 1 ) {
this.mainForm.real_name = res.data.words_result['姓名'].words ? res.data.words_result['姓名'].words : '';
this.mainForm.idcard_number = res.data.words_result['公民身份号码'].words ? res.data.words_result['公民身份号码'].words : '';
}
});
},
handlePictureCardPreview2(file) { handlePictureCardPreview2(file) {
this.dialogImageUrl2 = file.url; this.dialogImageUrl2 = file.url;
this.dialogVisible2 = true; this.dialogVisible2 = true;
...@@ -378,70 +461,149 @@ ...@@ -378,70 +461,149 @@
} }
} }
}, },
/** 上传身份证 反面 */
uploadIdcardBack(param) {
this.getBase64(param.file).then((res) => {
let result = res.split(",");
this.Base64img = result[1];
let data = {"img_data":this.Base64img};
upLoadImg(data).then((res) => {
if (res.code == 1){
this.idcardBackImgFileList.push({'url':res.data.image_url});
this.$message({type:'success',message:'上传成功'});
this.$refs.mainForm.clearValidate('idcard_back');
this.readIdcardBack(this.idcardBackImgFileList);
}else {
this.$message({type:'error',message:res.message ? res.message : '上传失败'});
}
});
});
},
/** 识别 身份证 反面 */
readIdcardBack(fileList) {
if ( !Array.isArray(fileList) || !fileList[0].url) return
let data = {img: fileList[0].url}
getIdcardImgInfoData(data).then(res=> {
if (res.code == 1 ) {
// 身份证 有效 XXXXXXXX日 => xx-xx-xx
let endStr = res.data.words_result['失效日期'].words ? res.data.words_result['失效日期'].words : '';
if (endStr == '长期') {
this.validityConcreteTime = [];
this.validityLongTermVal = true;
}else {
let beginStr = res.data.words_result['签发日期'].words ? res.data.words_result['签发日期'].words : '';
let reg = /^(\d{4})(\d{2})(\d{2})$/;
let begin = beginStr.replace(reg, "$1-$2-$3");
let end = endStr.replace(reg, "$1-$2-$3");
this.validityConcreteTime = [];
this.validityConcreteTime.push(begin);
this.validityConcreteTime.push(end);
this.validityLongTermVal = false;
}
}
});
},
handleBackPictureCardPreview2(file) {
this.dialogBackImageUrl2 = file.url;
this.dialogBackVisible2 = true;
},
handleBackRemove2(file) {
for(let i = 0; i < this.idcardBackImgFileList.length; i++) {
if(file.uid === this.idcardBackImgFileList[i].uid) {
this.idcardBackImgFileList.splice(i,1);
}
}
},
// 获取主体信息接口 // 获取主体信息接口
getMain() { getMain() {
getMainInf().then(res => { getMainInf().then(res => {
//console.log("获取主体数据:",res); // debugger
if(res.code === 1) { if(res.code == 1) {
this.resetForm('mainForm'); this.resetForm('mainForm');
this.mainForm = res.data; this.mainForm = res.data;
this.mainForm.idcardback = "jzwsfm";
// 营业执照电子图片处理
// 处理证件照 let licenseImgArr = [];
let licenseList = {}; let licenseImgUrl = {};
let licenseArr = []; licenseImgArr = this.mainForm.license.split(",");
if (licenseImgArr.length > 0) {
if(this.mainForm.license.indexOf(",") > 0) { licenseImgArr.forEach(item=> {
licenseArr = this.mainForm.license.split(","); licenseImgUrl = {};
for(let a = 0; a < licenseArr.length; a++){ if (item) {
licenseList = {}; licenseImgUrl.url = item
licenseList.url = licenseArr[a]; this.licenseImgFileList.push(licenseImgUrl)
this.licenseImgFileList.push(licenseList); }
} });
}else { }else {
licenseList.url = this.mainForm.license;
this.licenseImgFileList = []; this.licenseImgFileList = [];
this.licenseImgFileList.push(licenseList);
} }
// 身份证 正面数据处理
// 处理法人证件照 let idcardFrontImgArr = [];
let idcardList = {}; let idcardFrontImgUrl = {};
let idcardArr = []; idcardFrontImgArr = this.mainForm.idcard_front.split(",");
if(this.mainForm.idcard_front.indexOf(",") > 0) { if (idcardFrontImgArr.length > 0) {
idcardArr = this.mainForm.idcard_front.split(","); idcardFrontImgArr.forEach(item=> {
for(let a = 0; a < idcardArr.length; a++){ idcardFrontImgUrl = {};
idcardList = {}; if (item) {
idcardList.url = idcardArr[a]; idcardFrontImgUrl.url = item
this.idcardImgFileList.push(idcardList); this.idcardImgFileList.push(idcardFrontImgUrl)
} }
});
}else { }else {
idcardList.url = this.mainForm.idcard_front;
this.idcardImgFileList = []; this.idcardImgFileList = [];
this.idcardImgFileList.push(idcardList);
} }
// 身份证 反面数据处理
if(this.mainForm.idcard_expires_time === 0) { let idcardBackImgArr = [];
this.validityLongTermVal = true; let idcardBackImgUrl = {};
idcardBackImgArr = this.mainForm.idcard_back.split(",");
if (idcardBackImgArr.length > 0) {
idcardBackImgArr.forEach(item=> {
idcardBackImgUrl = {};
if (item) {
idcardBackImgUrl.url = item
this.idcardBackImgFileList.push(idcardBackImgUrl)
}
});
}else { }else {
this.validityConcreteTime = this.toStandTime(this.mainForm.idcard_expires_time); this.idcardBackImgFileList = [];
} }
// // 营业期限 日期格式处理
if(this.mainForm.license_expires_time === 0) { if (this.mainForm.license_expires_time == 0) {
this.periodLongTermVal = true; this.periodLongTermVal = true
}else { this.periodConcreteTime = [];
this.periodConcreteTime = this.toStandTime(this.mainForm.license_expires_time); } else if (this.mainForm.license_expires_time > 0) {
this.periodLongTermVal = false;
this.periodConcreteTime = [];
let start = this.formatterTime(this.mainForm.license_start_time)
let end = this.formatterTime(this.mainForm.license_expires_time);
this.periodConcreteTime.push(start)
this.periodConcreteTime.push(end)
} }
// 身份证 有效期 日期格式处理
if (this.mainForm.idcard_expires_time == 0) {
this.validityLongTermVal = true
this.validityConcreteTime = [];
} else if (this.mainForm.idcard_expires_time > 0) {
this.validityLongTermVal = false;
this.validityConcreteTime = [];
let start = this.formatterTime(this.mainForm.idcard_start_time)
let end = this.formatterTime(this.mainForm.idcard_expires_time);
this.validityConcreteTime.push(start)
this.validityConcreteTime.push(end)
}
} else { } else {
this.$message({type:'error',message:res.message ? res.message : ''}); this.$message({type:'error',message:res.message ? res.message : '获取主体信息失败'});
} }
}); });
}, },
resetForm(formName) { resetForm(formName) {
this.periodConcreteTime = [];
this.validityConcreteTime = [];
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
// 图片转换为base64位 // 图片转换为base64位
...@@ -462,39 +624,41 @@ ...@@ -462,39 +624,41 @@
}); });
}, },
// 时间戳转换为 标准时间格式 // 时间戳转换为 标准时间格式
toStandTime(val) { formatterTime(time) {
let date = new Date(val * 1000) return dateFormat(time *1000, 'Y-m-d')
let Y = date.getFullYear() + '-'
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
const D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
const h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
const m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'
const s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds())
return Y + M + D + h + m + s;
}, },
showTip(files,fileList) { /** 图片上传 数量限制 1张 */
showTip2() {
this.$message({message: '最多上传2张图片', type: 'warning'}); this.$message({message: '最多上传2张图片', type: 'warning'});
}, },
showTip() {
this.$message({message: '最多上传1张图片', type: 'warning'});
},
back() { back() {
this.$router.push("/agreement"); this.$router.push("/agreement");
}, },
next(form) { next(form) {
// 营业期限 // 营业期限 数据处理
if(this.periodLongTermVal) { if (this.periodLongTermVal) {
this.mainForm.license_expires_time = (this.periodLongTermVal - 0 - 1); // 布尔值减0得到对应数字 this.mainForm.license_expires_time = 0;
} else if(this.periodLongTermVal === false && this.periodConcreteTime) { this.mainForm.license_start_time = 0;
this.mainForm.license_expires_time = new Date(this.periodConcreteTime).getTime() / 1000; } else {
}else { if( Array.isArray(this.periodConcreteTime) && this.periodConcreteTime.length == 2) {
this.mainForm.license_expires_time = ''; this.mainForm.license_start_time = new Date(this.periodConcreteTime[0]).getTime() / 1000;
this.mainForm.license_expires_time = new Date(this.periodConcreteTime[1]).getTime() / 1000;
}
} }
// 法人证件期限
if(this.validityLongTermVal) { // 身份证有效期 数据处理
this.mainForm.idcard_expires_time = (this.validityLongTermVal - 0 -1); if (this.validityLongTermVal) {
}else if(this.validityLongTermVal === false && this.validityConcreteTime) { this.mainForm.idcard_expires_time = 0;
this.mainForm.idcard_expires_time = new Date(this.validityConcreteTime).getTime() / 1000; this.mainForm.idcard_start_time = 0;
}else { } else {
this.mainForm.idcard_expires_time = ''; if( Array.isArray(this.validityConcreteTime) && this.validityConcreteTime.length == 2) {
this.mainForm.idcard_start_time = new Date(this.validityConcreteTime[0]).getTime() / 1000;
this.mainForm.idcard_expires_time = new Date(this.validityConcreteTime[1]).getTime() / 1000;
}
} }
// 处理营业执照 // 处理营业执照
...@@ -509,7 +673,7 @@ ...@@ -509,7 +673,7 @@
} }
} }
// 处理法人证件照 // 身份证 正面 数据处理
if(this.idcardImgFileList.length > 0) { if(this.idcardImgFileList.length > 0) {
for(let i = 0; i < this.idcardImgFileList.length; i++) { for(let i = 0; i < this.idcardImgFileList.length; i++) {
if(i === 0) { if(i === 0) {
...@@ -520,11 +684,22 @@ ...@@ -520,11 +684,22 @@
} }
} }
// 身份证 反面 数据处理
if(this.idcardBackImgFileList.length > 0) {
for(let i = 0; i < this.idcardBackImgFileList.length; i++) {
if(i === 0) {
this.mainForm.idcard_back = this.idcardBackImgFileList[i].url;
}else {
this.mainForm.idcard_back += ',' + this.idcardBackImgFileList[i].url;
}
}
}
this.$refs[form].validate((valid) => { this.$refs[form].validate((valid) => {
if (valid) { if (valid) {
addMain(this.mainForm).then(res => { addMain(this.mainForm).then(res => {
if(res.code == 1) { if(res.code == 1) {
this.$router.push("/fillBrandInf"); this.$router.push("/fillShopInf");
}else { }else {
this.$message({type:'error',message:res.message ? res.message : '操作失败'}); this.$message({type:'error',message:res.message ? res.message : '操作失败'});
} }
...@@ -546,9 +721,9 @@ ...@@ -546,9 +721,9 @@
.box-card { .box-card {
width: 80%; width: 80%;
margin: 30px auto 30px; margin: 30px auto 30px;
height: calc(100% - 120px); height: calc(100% - 140px);
/deep/.el-card__body{ /deep/.el-card__body{
height: calc(100% - 120px); height: calc(100% - 140px);
overflow-x: hidden; overflow-x: hidden;
overflow-y: scroll; overflow-y: scroll;
} }
...@@ -607,7 +782,7 @@ ...@@ -607,7 +782,7 @@
// 主体信息 // 主体信息
.main-con { .main-con {
width: 70%; width: 70%;
margin: 30px auto 50px; margin: 30px auto;
overflow-y: scroll; overflow-y: scroll;
// 重置 提示图标颜色 // 重置 提示图标颜色
.tips-text { .tips-text {
...@@ -646,10 +821,44 @@ ...@@ -646,10 +821,44 @@
} }
} }
} }
.hiden-dom >>> .el-upload--picture-card {
display :none!important;
}
.idcard-tips-con {
display: flex;
flex-direction: row;
justify-content: normal;
justify-items : center;
}
.idcard-tips-con > p {
margin: 0;
padding: 0 15px;
}
.main-form-con {
margin-left: 100px;
}
.main-form-title {
color: #666;
font-size: 18px;
font-weight: 600;
padding: 0;
margin: 10px 0 10px -180px;
}
.main-form-tips {
color: #aaa;
font-size: 14px;
font-weight: 400;
padding: 0;
}
.confirm-btn { .confirm-btn {
//height: 100px;
width: 50%; width: 50%;
margin: 0 auto; margin: 40px auto 0;
p { p {
text-align: center; text-align: center;
} }
......
...@@ -7,15 +7,14 @@ ...@@ -7,15 +7,14 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix steps"> <div slot="header" class="clearfix steps">
<el-steps :active="2" align-center finish-status="success"> <el-steps :active="2" align-center finish-status="success">
<!-- <el-step title="签署入驻协议"></el-step>--> <el-step title="注册账号"></el-step>
<el-step title="填写主体信息"></el-step> <el-step title="填写主体信息"></el-step>
<el-step title="填写品牌信息"></el-step>
<el-step title="填写店铺信息"></el-step> <el-step title="填写店铺信息"></el-step>
<el-step title="提交入驻审核"></el-step> <el-step title="提交入驻审核"></el-step>
</el-steps> </el-steps>
</div> </div>
<div class="main-con"> <div class="main-con">
<el-form ref="storeForm" :model="storeForm" :rules="shopRules" label-width="180px"> <el-form ref="storeForm" :model="storeForm" :rules="shopRules" label-width="180px" size="small">
<el-form-item label="电商平台经验:" prop="is_business_experience"> <el-form-item label="电商平台经验:" prop="is_business_experience">
<el-radio-group v-model="storeForm.is_business_experience"> <el-radio-group v-model="storeForm.is_business_experience">
...@@ -29,7 +28,7 @@ ...@@ -29,7 +28,7 @@
</el-form-item> </el-form-item>
<el-form-item label="经营类目:" prop="scope"> <el-form-item label="经营类目:" prop="scope">
<el-select v-model="storeForm.scope" multiple placeholder="请选择..." style="width: 400px;"> <el-select v-model="storeForm.scope" @remove-tag="removeTag" @visible-change="scopeVisibleChange($event)" multiple placeholder="请选择..." style="width: 400px;">
<el-option <el-option
v-for="item in scopeOptions" v-for="item in scopeOptions"
:key="item.id" :key="item.id"
...@@ -43,7 +42,7 @@ ...@@ -43,7 +42,7 @@
<div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;"> <div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;">
<div style="padding-right:6px;"> <div style="padding-right:6px;">
<el-upload <el-upload
class="uploadData" :class="['uploadData',{ 'hiden-dom': logoImgFileList.length >= 1 }]"
action="#" action="#"
list-type="picture-card" list-type="picture-card"
:limit="1" :limit="1"
...@@ -84,50 +83,72 @@ ...@@ -84,50 +83,72 @@
生产许可证、化妆品生产企业许可证等,根据具体类目资质要求提交</p> 生产许可证、化妆品生产企业许可证等,根据具体类目资质要求提交</p>
</el-form-item> </el-form-item>
<el-form-item label="其他资质:" prop="business_auth"> <el-form-item label="其他资质:">
<div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;"> <div class="auth-con">
<div style="padding-right:6px;"> <!--*** 方法一 start ***-->
<el-upload <!-- :class="['uploadData',{ 'hiden-dom': businessImgFileList.length >= 1 }]"-->
class="uploadData" <!-- :class="uploadDataClass(item)"-->
action="#" <!-- <div v-for="(item,index) in qualificationList" :key="item.id" class="single-upload-con">-->
list-type="picture-card" <!-- <el-upload-->
:limit="20" <!-- :class="uploadDataClass(item,index)"-->
:on-exceed="showTip20" <!-- action="#"-->
:before-upload = "beforeUpBusImg" <!-- list-type="picture-card"-->
:http-request="uploadBusinessImgs" <!-- :limit="1"-->
:on-preview="handlePictureCardPreview2" <!-- :on-exceed="showTip1"-->
:on-remove="handleRemove2" <!-- :http-request="(item)=> {return uploadBusinessImgs(item)}"-->
:file-list = 'businessImgFileList'> <!-- :file-list="showIndexAuthImg(item,index)"-->
<i class="el-icon-plus"></i> <!-- ></el-upload>-->
</el-upload> <!-- <div class="single-title">{{ authTitleFormatter(item.content) }}</div>-->
<el-dialog :visible.sync="dialogVisible2"> <!-- </div>-->
<img width="100%" :src="dialogImageUrl2" alt=""> <!--*** 方法一 end ***-->
</el-dialog> <!--*** 方法二 start ***-->
</div> <div v-for="(item,index) in qualificationList" :key="item.id" class="single-upload-con">
<div> <div v-show="!item.url" class="single-auth-img" @click="upPreSpeImg(index)"></div>
<span class="tips-text">
<i class="el-icon-warning h-warning"></i> <div v-show="item.url" class="single-auth-img-con">
</span> <img class="auth-spec-img" :src="item.url" alt="" />
</div> <span class="span-img-del-loading">
<div style="width:380px;line-height: 24px;padding-top: 6px;color: #333;"> <span class="span-img-del el-icon-zoom-in zoom-span-block" @click="viewSingleSpecImg(index,item)"></span>
<span class="tips-text">请上其他资质,单个文件大小在2MB以内,支持jpg,png格式,最多可上传20张</span> <span class="span-img-del el-icon-delete del-span-block" @click="delSingleSpecImg(index,item)"></span>
</span>
</div>
<div class="single-title">{{ authTitleFormatter(item.content) }}</div>
<!-- 真正上传 dom 原生 input -->
<input type="file" style="display: none;" :ref=" 'hxz' + index " accept="image/*"
@change="changeIMG(index,item)">
</div> </div>
<!--*** 方法二 end ***-->
</div> </div>
</el-form-item> </el-form-item>
<el-form-item style="margin: 40px 0 0;"> <el-form-item class="confirm-btn">
<el-button type="primary" @click="back" style="margin-right: 40px;">上一步</el-button> <div>
<el-button type="primary" @click="next('storeForm')">提交审核</el-button> <el-button type="primary" @click="back" style="margin-right: 40px;">上一步</el-button>
<el-button type="primary" @click="next('storeForm')">提交审核</el-button>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</el-card> </el-card>
<!-- 图片预览 -->
<el-dialog
:visible.sync="imgDialog"
:destroy-on-close="true"
width="60%"
center
:close-on-click-modal="false"
class="img-dialog-con"
>
<img class="img-spe" :src="qualificationUrl" alt="">
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getGoodsType, getShopInf ,addShopInf ,upLoadImg} from '@/api/module/entry'; import { getInfo,getGoodsType, getShopInf ,addShopInf ,upLoadImg,getUploadQualificationListData} from '@/api/module/entry';
export default { export default {
name: "FillShopInf", name: "FillShopInf",
data() { data() {
...@@ -173,7 +194,10 @@ ...@@ -173,7 +194,10 @@
}, },
// //
shopRules: { shopRules: {
store_name: [{required: true, message: '店铺名称不能为空', trigger: 'blur'}], store_name: [
{required: true, message: '店铺名称不能为空', trigger: 'blur'},
{ max: 36,message: '店铺名称最多输入36个字符', trigger: 'blur' }
],
scope: [{required: true, message: '经营类目至少选择一种', trigger: 'change'}], scope: [{required: true, message: '经营类目至少选择一种', trigger: 'change'}],
shop_logo: [{required: true, message: '店铺Logo至少上传一张图片', validator: logoValidator}],// shop_logo: [{required: true, message: '店铺Logo至少上传一张图片', validator: logoValidator}],//
emergency_name: [{required: true, message: '运营负责人不能为空', trigger: 'blur'}],// emergency_name: [{required: true, message: '运营负责人不能为空', trigger: 'blur'}],//
...@@ -181,8 +205,11 @@ ...@@ -181,8 +205,11 @@
{required: true, message: '联系人手机号码不能为空', trigger: 'blur'}, {required: true, message: '联系人手机号码不能为空', trigger: 'blur'},
{required: true, validator: checkTel,trigger: 'blur' } {required: true, validator: checkTel,trigger: 'blur' }
], ],
business_auth: [{required: true, message: '其他资质至少上传一张图片', validator: busAuthValidator}],// },
} // 需要上传的资质
qualificationList: [],
qualificationUrl: '',
imgDialog: false
} }
}, },
created() { created() {
...@@ -195,11 +222,17 @@ ...@@ -195,11 +222,17 @@
} }
}); });
// 获取店铺信息 // 获取店铺信息
this.getShop(); getInfo().then(res=> {
}, if (res.code == 1 && res.data.user) {
mounted() { if (res.data.user.state > 0) {
this.getShop();
}
}else {
this.$message({type:'error',message: res.message ? res.message : '获取数据失败'});
}
});
}, },
mounted() {},
methods: { methods: {
showTip1(files,fileList){ showTip1(files,fileList){
this.$message({message: '最多上传1张图片', type: 'warning'}); this.$message({message: '最多上传1张图片', type: 'warning'});
...@@ -243,10 +276,10 @@ ...@@ -243,10 +276,10 @@
return false; return false;
} }
}, },
// 获取 店铺信息 /** 获取 店铺信息 */
getShop() { getShop() {
getShopInf().then(res => { getShopInf().then(res => {
if(res.code == 1 && res.data){ if(res.code == 1){
// 处理 select 下拉回显数据格式 // 处理 select 下拉回显数据格式
this.storeForm.scope = []; this.storeForm.scope = [];
if(res.data.scope === '') { if(res.data.scope === '') {
...@@ -260,41 +293,26 @@ ...@@ -260,41 +293,26 @@
this.storeForm = res.data; this.storeForm = res.data;
this.storeForm.scope = scopeList; this.storeForm.scope = scopeList;
} }
//console.log("处理后的格式:",this.storeForm.scope);
// 店铺logo回显处理 // 店铺logo回显处理
let logoList = {}; let logoImgArr = [];
let logoArr = []; let logoImgUrl = {};
if(this.storeForm.shop_logo.indexOf(",") > 0) { logoImgArr = this.storeForm.shop_logo.split(",");
logoArr = this.storeForm.shop_logo.split(","); if (logoImgArr.length > 0) {
for(let a = 0; a < logoArr.length; a++){ logoImgArr.forEach(item=> {
logoList = {}; logoImgUrl = {};
logoList.url = logoArr[a]; if (item) {
this.logoImgFileList.push(logoList); logoImgUrl.url = item
} this.logoImgFileList.push(logoImgUrl)
}else if(this.storeForm.shop_logo) { }
logoList.url = this.storeForm.shop_logo; });
this.logoImgFileList = [];
this.logoImgFileList.push(logoList);
}else { }else {
this.logoImgFileList = []; this.logoImgFileList = [];
} }
// 资质图片回显处理 // 资质图片回显处理
let businessList = {}; this.qualificationList = this.storeForm.qualification;
let busArr = [];
if(this.storeForm.business_auth.indexOf(",") > 0) {
busArr = this.storeForm.business_auth.split(",");
for(let a = 0; a < busArr.length; a++){
businessList = {};
businessList.url = busArr[a];
this.businessImgFileList.push(businessList);
}
}else if(this.storeForm.business_auth) {
businessList.url = this.storeForm.business_auth;
this.businessImgFileList = [];
this.businessImgFileList.push(businessList);
}else {
this.businessImgFileList = [];
}
}else { }else {
this.$message({ this.$message({
message: res.message ? res.message : '操作失败' , message: res.message ? res.message : '操作失败' ,
...@@ -323,20 +341,22 @@ ...@@ -323,20 +341,22 @@
// 上传资质图片 // 上传资质图片
uploadBusinessImgs(param) { uploadBusinessImgs(param) {
this.getBase64(param.file).then((res) => {
let result = res.split(","); console.log(368,param);
this.Base64img = result[1]; // this.getBase64(param.file).then((res) => {
let data = {"img_data":this.Base64img}; // let result = res.split(",");
upLoadImg(data).then((res) => { // this.Base64img = result[1];
if(res.code == 1){ // let data = {"img_data":this.Base64img};
this.businessImgFileList.push({'url':res.data.image_url}); // upLoadImg(data).then((res) => {
this.$message({type:'success',message:'上传成功'}); // if(res.code == 1){
this.$refs.storeForm.clearValidate('business_auth'); // this.businessImgFileList.push({'url':res.data.image_url});
}else { // this.$message({type:'success',message:'上传成功'});
this.$message({type:'error',message:res.message ? res.message : '上传失败'}); // this.$refs.storeForm.clearValidate('business_auth');
} // }else {
}); // this.$message({type:'error',message:res.message ? res.message : '上传失败'});
}); // }
// });
// });
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
...@@ -380,18 +400,34 @@ ...@@ -380,18 +400,34 @@
}, },
// //
back() { back() {
this.$router.push("/fillBrandInf"); this.$router.push("/fillMainInf");
}, },
/** 提交审核数据 */ /** 提交审核数据 */
next(formName) { next(formName) {
// 其他 资质 填写拦截校验
let isComplete = false;
if (this.qualificationList.length > 0) {
for (let i = 0; i < this.qualificationList.length; i++) {
if (!this.qualificationList[i].url) {
isComplete = true;
break
}
}
if (isComplete) {
this.$message({type:'warning',message: '请上传对应资质所需的图片'});
return;
}
}
let scoprStr = ''; let scoprStr = '';
for(let i = 0; i < this.storeForm.scope.length; i++) { for(let i = 0; i < this.storeForm.scope.length; i++) {
scoprStr += this.storeForm.scope[i] + ','; scoprStr += this.storeForm.scope[i] + ',';
} }
this.storeForm.scope = scoprStr.substring(0,scoprStr.length - 1); this.storeForm.scope = scoprStr.substring(0,scoprStr.length - 1);
//console.log("提交前的scope",this.storeForm.scope);
// shop_logo图片地址字段 // shop_logo图片
if(this.logoImgFileList.length > 0) { if(this.logoImgFileList.length > 0) {
for(let i = 0; i < this.logoImgFileList.length; i++) { for(let i = 0; i < this.logoImgFileList.length; i++) {
if(i === 0) { if(i === 0) {
...@@ -402,18 +438,10 @@ ...@@ -402,18 +438,10 @@
} }
} }
// 其他资质图片字段处理 // 其他资质 数据格式处理
if(this.businessImgFileList.length > 0) { // let JSONqualificationList = JSON.stringify(this.qualificationList)
for(let i = 0; i < this.businessImgFileList.length; i++) { this.storeForm.qualification_auth = JSON.stringify(this.qualificationList)
if(i === 0) {
this.storeForm.business_auth = this.businessImgFileList[i].url;
}else {
this.storeForm.business_auth += ',' + this.businessImgFileList[i].url;
}
}
}
//console.log("新增/修改的店铺信息:",this.storeForm);
//formName //formName
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if(valid) { if(valid) {
...@@ -452,8 +480,104 @@ ...@@ -452,8 +480,104 @@
} }
} }
}); });
} },
} /** 删除单个 经营类目 触发 */
removeTag(indexVal) {
if (!indexVal) return;
if (this.storeForm.scope.length == 0) {
this.qualificationList = [];
}
if (this.storeForm.scope.length > 0) {
let data = { cate_ids: this.storeForm.scope }
getUploadQualificationListData(data).then(res=> {
if (res.code == 1) {
this.qualificationList = res.data ? res.data : [];
}
})
}
},
/** 经营类目 下拉框隐藏时候,触发 */
scopeVisibleChange(handleType) {
if (!handleType) {
if (Array.isArray(this.storeForm.scope) && this.storeForm.scope.length > 0) {
let data = { cate_ids: this.storeForm.scope }
getUploadQualificationListData(data).then(res=> {
if (res.code == 1) {
this.qualificationList = res.data ? res.data : [];
}
})
}
}
},
/** 上传 对应资质图片 */
upPreSpeImg(index) {
let domRef = "hxz" + index;
this.$refs[domRef][0].value = '';
this.$refs[domRef][0].click();
},
/** 真正的上传图片方法,原生input */
changeIMG(index, item) {
let curItem = item;
let inputDom = "hxz" + index;
let file = this.$refs[inputDom][0].files[0];
if( file.size > 1024 * 1024 * 3 ) {
this.$message({ type: 'error',message: '规格图片不能大于 3 M'});
return;
}
this.getBase64(file).then((res) => {
let result = res.split(",");
this.Base64img = result[1];
let data = {"img_data": this.Base64img}
upLoadImg(data).then(res => {
// this.loading = false;
if (res && res.code == 1) {
curItem.url = res.data.image_url;
// this.singleSpecImgList.push({'url': res.data.image_url})
this.$message({ message:'上传成功',type:'success'});
}else {
this.$message({ message:'上传失败,请重新上传',type:'error'});
}
})
});
},
/** 更换图片 */
// changeSpeImg(index,item) {
// this.upPreSpeImg(index,item);
// },
/** 删除 当前图片 */
delSingleSpecImg(index,item) {
if( item.url ) {
item.url = '';
this.$message({type: 'success',message: '删除成功'});
}
},
/** 查看 当前图片 */
viewSingleSpecImg(index,item) {
this.imgDialog = false;
// this.qualificationUrl = "";
if (!item.url) return;
this.imgDialog = true;
this.qualificationUrl = item.url
},
/** 资质类目 title格式化 */
authTitleFormatter(textVal) {
let res = '',resoult = '';
if (textVal) {
res = textVal.trim();
// if(textVal.left(0) == '《') {
//
// }
// if(textVal.right(0) == '《') {
//
// }
// console.log(111,textVal.left(0));
// console.log(222,textVal.right(0));
}
return res
},
} // methods end
} }
</script> </script>
...@@ -466,9 +590,9 @@ ...@@ -466,9 +590,9 @@
.box-card { .box-card {
width: 80%; width: 80%;
margin: 30px auto 30px; margin: 30px auto 30px;
height: calc(100% - 120px); height: calc(100% - 140px);
/deep/.el-card__body{ /deep/.el-card__body{
height: calc(100% - 120px); height: calc(100% - 180px);
overflow-x: hidden; overflow-x: hidden;
overflow-y: scroll; overflow-y: scroll;
} }
...@@ -531,9 +655,8 @@ ...@@ -531,9 +655,8 @@
// 主体信息 // 主体信息
.main-con { .main-con {
width: 70%; width: 70%;
//height :calc(100% - 170px); height: 100%;
margin: 20px auto 0; margin: 20px auto 0;
overflow-y: scroll;
// 重置 提示图标颜色 // 重置 提示图标颜色
...@@ -580,5 +703,120 @@ ...@@ -580,5 +703,120 @@
} }
} }
.hiden-dom >>> .el-upload--picture-card {
display :none!important;
}
/*** 资质 样式 start ***/
.auth-con {
width:100%;
height: 100%;
display: flex;
flex-direction: row;
justify-content: normal;
flex-wrap: wrap;
}
.single-upload-con {
width: 160px;
height: 140px;
text-align :center;
overflow:hidden;
}
.single-auth-img {
width: 98px;
height: 98px;
border-radius : 6px;
border: 1px dashed #eee;
margin: 5px auto;
cursor: pointer;
}
.single-auth-img-con{
margin: 0;
padding: 0;
display : inline-block;
width:98px;
height:98px;
position: relative;
//top:4px;
cursor: pointer;
border-radius: 6px;
border: 1px solid #c0ccda;
}
.auth-spec-img {
width: 100%;
height: 100%;
border-radius: 6px;
cursor: pointer;
position: relative;
border: none;
}
/* 当前图片滑过 效果,显示删除icon */
.span-img-del-loading {
display : none;
position: absolute;
width: 98px;
height: 98px;
top: 0;
left: 0;
border-radius : 5px;
z-index: 66;
background-color: rgba(0,0,0,0.5);
opacity: 0.75;
transition: opacity .3s;
}
.span-img-del-loading > .zoom-span-block {
color: #fff;
font-size: 20px;
font-weight : 500;
margin: 41px 4px 0;
z-index: 70;
}
.span-img-del-loading > .del-span-block {
color: #fff;
font-size: 20px;
font-weight : 500;
margin: 41px 4px 0;
z-index: 70;
}
.single-auth-img-con:hover > .span-img-del-loading {
display : block;
}
.single-title {
font-size: 12px;
color: #666;
text-align: center;
//line-height :14px;
//margin: 10px 0;
}
/*** 资质 样式 end ***/
.confirm-btn {
width: 50%;
margin: 40px auto 20px;
}
.confirm-btn > div {
text-align: center;
}
}
.img-dialog-con >>> .el-dialog__body {
text-align : center;
}
.img-spe {
//width: 80%;
margin: 0 auto;
} }
</style> </style>
...@@ -6,9 +6,8 @@ ...@@ -6,9 +6,8 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix steps"> <div slot="header" class="clearfix steps">
<el-steps :active="3" align-center finish-status="success" process-status="error"> <el-steps :active="3" align-center finish-status="success" process-status="error">
<!-- <el-step title="签署入驻协议"></el-step>--> <el-step title="注册账号"></el-step>
<el-step title="填写主体信息"></el-step> <el-step title="填写主体信息"></el-step>
<el-step title="填写品牌信息"></el-step>
<el-step title="填写店铺信息"></el-step> <el-step title="填写店铺信息"></el-step>
<el-step title="提交入驻审核"></el-step> <el-step title="提交入驻审核"></el-step>
</el-steps> </el-steps>
...@@ -33,6 +32,7 @@ ...@@ -33,6 +32,7 @@
</template> </template>
<script> <script>
import { getInfo } from '@/api/module/entry';
export default { export default {
name: "ReviewFail", name: "ReviewFail",
data() { data() {
...@@ -40,10 +40,32 @@ ...@@ -40,10 +40,32 @@
msg: '具体原因,请联系售后' msg: '具体原因,请联系售后'
} }
}, },
created() {
getInfo().then(res=> {
if (res.code == 1 && res.data.user) {
if (res.data.user.state == 1) {
this.$router.push({path: '/home/index'});
}
if (res.data.user.state == 2) {
this.$router.push({path: '/reviewing'})
}
if (res.data.user.state == 3) {
this.$router.push({path: '/reviewFail'});
}
} else {
this.$router.push({path: '/reviewFail'});
}
});
},
mounted() { mounted() {
if(this.$route.params.msg) { if(this.$route.params.msg) {
this.msg = this.$route.params.msg; this.msg = this.$route.params.msg;
} }
/** 禁止 浏览器 后退 */
history.pushState(null,null,document.URL);
window.addEventListener('popstate', function () {
history.pushState(null, null, document.URL);
})
}, },
methods: { methods: {
// 重新提交审核 // 重新提交审核
......
...@@ -6,9 +6,8 @@ ...@@ -6,9 +6,8 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix steps"> <div slot="header" class="clearfix steps">
<el-steps :active="3" align-center finish-status="success"> <el-steps :active="3" align-center finish-status="success">
<!-- <el-step title="签署入驻协议" ></el-step>--> <el-step title="注册账号" ></el-step>
<el-step title="填写主体信息" ></el-step> <el-step title="填写主体信息" ></el-step>
<el-step title="填写品牌信息" ></el-step>
<el-step title="填写店铺信息" ></el-step> <el-step title="填写店铺信息" ></el-step>
<el-step title="提交入驻审核" ></el-step> <el-step title="提交入驻审核" ></el-step>
</el-steps> </el-steps>
...@@ -19,7 +18,7 @@ ...@@ -19,7 +18,7 @@
<img src="../../../public/images/entry/reviewSuccess.png" alt=""> <img src="../../../public/images/entry/reviewSuccess.png" alt="">
</p> </p>
<p>资料已提交,工作人员审核中。。。</p> <p>资料已提交,工作人员审核中。。。</p>
<!-- <p>感谢您使用云仓!</p>--> <p style="margin-top: 10px;">感谢您使用云仓!</p>
<p>您的资料已经提交审核,审核周期为1-3个工作日,请您耐心等待审核结果。</p> <p>您的资料已经提交审核,审核周期为1-3个工作日,请您耐心等待审核结果。</p>
<p>如果您有其它的问题,可以拔打我们的服务电话与我们联系!</p> <p>如果您有其它的问题,可以拔打我们的服务电话与我们联系!</p>
<!-- <p>服务电话:4000-188-199</p>--> <!-- <p>服务电话:4000-188-199</p>-->
...@@ -34,6 +33,25 @@ ...@@ -34,6 +33,25 @@
name: "ReviewSuccess", name: "ReviewSuccess",
data() { data() {
return {} return {}
},
created() {
// 刷新当前页面,如果sys操作,审核通过,那么这个applyState状态值会变为 1,代表审核通过,可以直接跳转登录页面,审核拒绝,则 为3,跳转到失败页面
if (this.$store.state.user.applyState == 1) {
this.$router.push({path: '/home/index'});
}
if (this.$store.state.user.applyState == 2) {
this.$router.push({path: '/reviewing'});
}
if (this.$store.state.user.applyState == 3) {
this.$router.push({path: '/reviewFail'});
}
},
mounted() {
/** 禁止 浏览器 后退 */
history.pushState(null,null,document.URL);
window.addEventListener('popstate', function () {
history.pushState(null, null, document.URL);
})
} }
} }
</script> </script>
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
'image': function (value) { 'image': function (value) {
if (value) { if (value) {
// 触发input框选择图片文件 // 触发input框选择图片文件
document.querySelector('#file').value = ''; // 清空是为了解决,连续上传同一张图片时,后续图片上传失效问题
document.querySelector('#file').click() document.querySelector('#file').click()
} else { } else {
this.quill.format('image', false); this.quill.format('image', false);
......
...@@ -46,28 +46,31 @@ ...@@ -46,28 +46,31 @@
</el-form> </el-form>
</div> </div>
<el-table v-loading="loading" :data="brandList" :height="tableHeight"> <el-table v-loading="loading" :data="brandList" :height="tableHeight">
<!-- <el-table-column type="selection" width="45" align="center"/>-->
<el-table-column label="序号" prop="id" align="center"></el-table-column>
<el-table-column label="品牌名称" prop="brand_cn" align="center"></el-table-column> <el-table-column label="品牌名称" prop="brand_cn" align="center"></el-table-column>
<el-table-column label="品牌经营类型" prop="brand_type" align="center"> <el-table-column label="品牌经营类型" prop="brand_type" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.brand_type === 1 ? '自有品牌' : '品牌厂商授权' }} {{ scope.row.brand_type === 1 ? '自有品牌' : '品牌厂商授权' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="品牌类型" prop="brand_range" align="center">
<template slot-scope="scope">
{{ scope.row.brand_range === 1 ? '国内' : '国外' }}
</template>
</el-table-column>
<el-table-column label="品牌商标注册号" prop="brand_number" align="center"></el-table-column> <el-table-column label="品牌商标注册号" prop="brand_number" align="center"></el-table-column>
<el-table-column label="品牌状态" prop="status" align="center"> <el-table-column label="品牌状态" prop="status" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status === 0 ? '未审核' : scope.row.status === 1 ? '已通过' : '已拒绝'}} {{ scope.row.status === 0 ? '未审核' : scope.row.status === 1 ? '已通过' : '已拒绝'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="授权期限" align="center">
<template slot-scope="scope">
<!-- <span>{{ timeFormatter(scope.row.send_time) }}</span>-->
<span>--</span>
<!-- <span>{{ timeFormatter(scope.row.send_time) }}</span>-->
</template>
</el-table-column>
<el-table-column label="审核说明" prop="sm" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handleDetails(scope.row)" :disabled="(scope.row.id === 1)">详情</el-button> <el-button type="text" size="small" @click="handleDetails(scope.row)" :disabled="(scope.row.id === 1)">编辑</el-button>
<el-divider direction="vertical"></el-divider>
<el-button type="text" size="small" @click="deleteBrand(scope.row)" :disabled="(scope.row.id === 1)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -312,7 +315,7 @@ ...@@ -312,7 +315,7 @@
<script> <script>
import {getBrandsInf, getDetails, addBrand, upBrand, upLoadImg} from '@/api/module/brand/brand' import {getBrandsInf, getDetails, addBrand, upBrand, upLoadImg} from '@/api/module/brand/brand'
import { dateFormat } from '@/utils'
export default { export default {
name: "Brand", name: "Brand",
data() { data() {
...@@ -667,7 +670,7 @@ ...@@ -667,7 +670,7 @@
this.$message({ type: 'warning', message: '目前暂时只支持维护20个品牌数据!'}); this.$message({ type: 'warning', message: '目前暂时只支持维护20个品牌数据!'});
} }
}, },
// 详情 /** 详情 */
handleDetails(row) { handleDetails(row) {
this.isOpen = true; this.isOpen = true;
this.brandTitle = '品牌信息详情'; this.brandTitle = '品牌信息详情';
...@@ -851,6 +854,10 @@ ...@@ -851,6 +854,10 @@
}) })
}, },
/** 删除 品牌 */
deleteBrand(row) {
},
// 修改 // 修改
edit(param) { edit(param) {
upBrand(param).then(res => { upBrand(param).then(res => {
...@@ -930,6 +937,10 @@ ...@@ -930,6 +937,10 @@
}; };
}); });
}, },
/** 时间格式化 */
timeFormatter(timeVal) {
return dateFormat(timeVal *1000, 'Y-m-d')
},
// 时间戳转换为 标准时间格式 // 时间戳转换为 标准时间格式
toStandTime(val) { toStandTime(val) {
let date = new Date(val * 1000) let date = new Date(val * 1000)
......
<template> <template>
<div class="app-container" v-loading="loading"> <div class="app-container">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<div style="display: flex;flex-direction: row;justify-content: space-between;padding: 0 20px;"> <div style="display: flex;flex-direction: row;justify-content: space-between;padding: 0 20px;">
...@@ -17,77 +17,110 @@ ...@@ -17,77 +17,110 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<p>企业认证信息</p> <p>企业认证信息</p>
</div> </div>
<div> <el-form ref="mainForm" :model="mainForm" label-width="180px" class="main-form-con"
<el-form ref="mainForm" :model="mainForm" :rules="mainRules" label-width="180px"> size="small">
<el-form-item label="执照类型:" prop="license_type">
<el-select v-model="mainForm.license_type" placeholder="请选择..." :disabled="isMainItem" <el-form-item label="营业执照:" prop="license">
style="width: 400px;"> <div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;">
<el-option
v-for="item in zzOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="营业执照电子版:" prop="license">
<div class="demo-image__preview">
<div style="padding-right:6px;"> <div style="padding-right:6px;">
<div class="demo-image__preview"> <el-upload
<el-image v-for="(item,index) in licenseFileList" :key="index" :disabled="true"
style="width: 100px; height: 100px;border: 1px dashed #c0ccda;border-radius: 6px;margin: 0 5px;" :class="['uploadData',{ 'hiden-dom': licenseImgFileList.length >= 1 }]"
:src="item" action="#"
:preview-src-list="getPreviewImgList(item)"> list-type="picture-card"
</el-image> :on-preview="handleLicenseImgview"
</div> :file-list='licenseImgFileList'
>
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="isLicenseVisible">
<img width="100%" :src="licenseImgUrl" alt="">
</el-dialog>
</div> </div>
<div> <div>
<span class="tips-text"> <span class="tips-text">
<i class="el-icon-warning h-warning"></i> <i class="el-icon-warning h-warning"></i>
</span> </span>
</div> </div>
<div style="width:380px;line-height: 24px;padding-top: 6px;"> <div style="width:380px;line-height: 24px;padding-top: 6px;">
<!-- <span class="tips-text">图片大小在2MB以内,支持png,jpg格式,最多可上传2张</span>--> <span class="tips-text">点击可查看大图</span>
<span class="tips-text">点击图片,查看大图</span>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="企业名称:" prop="organization_name" inline-message="true"> <el-form-item label="企业名称:" prop="organization_name" inline-message="true">
<el-input v-model="mainForm.organization_name" :disabled="isMainItem" style="width: 400px;"></el-input> <el-input v-model="mainForm.organization_name" :disabled="isMainItem" style="width: 400px;"></el-input>
<span class="tips-text"><i class="el-icon-warning h-warning"></i>请按照营业执照上登记的完整名称填写</span>
</el-form-item> </el-form-item>
<el-form-item label="营业执照详细地址:" prop="organization_address"> <el-form-item label="统一社会代码:" prop="license_number" inline-message="true">
<el-input v-model="mainForm.organization_address" :disabled="isMainItem" <el-input v-model="mainForm.license_number" :disabled="isMainItem" style="width: 400px;"></el-input>
style="width: 400px;"></el-input>
<span class="tips-text"><i class="el-icon-warning h-warning"></i>请按照营业执照上的详细地址填写</span>
</el-form-item> </el-form-item>
<el-form-item :gutter="20" label="营业期限:" prop="license_expires_time"> <el-form-item label="营业期限:" prop="license_expires_time">
<el-date-picker type="date" placeholder="选择日期" v-model="periodConcreteTime" <el-date-picker
style="width: 300px;" :disabled="isMainItem"></el-date-picker> style="width:400px;"
<el-checkbox v-model="periodLongTermVal" :disabled="isMainItem" v-model="periodConcreteTime"
style="padding-left:15px;" >长期 type="daterange"
</el-checkbox> range-separator="至"
<span class="tips-text"><i class="el-icon-warning h-warning"></i>具体时间和长期,二者必填一个</span> start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:disabled="isMainItem"
/>
<el-checkbox v-model="periodLongTermVal" :disabled="isMainItem" style="padding-left:15px;">长期</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item label="法定代表人证件类型:" prop="idcard_type"> <el-form-item label="法人身份证:">
<el-select v-model="mainForm.idcard_type" :disabled="isMainItem" placeholder="请选择..." <div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;">
style="width: 400px;"> <!-- 身份证正面 -->
<el-option <div style="padding: 0 20px;">
v-for="item in idcardTypeOptions" <el-upload
:key="item.value" :disabled="true"
:label="item.label" :class="['uploadData',{ 'hiden-dom': idcardImgFileList.length >= 1 }]"
:value="item.value" list-type="picture-card"
></el-option> action="#"
</el-select> :on-preview="handleIdcardPositiveImgview"
:file-list='idcardImgFileList'
>
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="idcardPositiveVisible">
<img width="100%" :src="idcardPositiveImgUrl" alt="">
</el-dialog>
</div>
<!-- 身份证反面 -->
<div style="padding: 0 20px;">
<el-upload
:disabled="true"
:class="['uploadData',{ 'hiden-dom': idcardBackImgFileList.length >= 1 }]"
list-type="picture-card"
action="#"
:on-preview="handleIdcardBackImgview"
:file-list='idcardBackImgFileList'
>
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogBackVisible">
<img width="100%" :src="dialogBackImageUrl" alt="">
</el-dialog>
</div>
<div>
<span class="tips-text">
<i class="el-icon-warning h-warning"></i>
</span>
</div>
<div style="width:380px;line-height: 24px;padding-top: 6px;">
<span class="tips-text">点击可查看大图</span>
</div>
</div>
<div class="idcard-tips-con">
<p>请上传身份证正面</p>
<p>请上传身份证国徽面</p>
</div>
</el-form-item> </el-form-item>
<el-form-item label="法定代表人姓名:" prop="real_name"> <el-form-item label="法定姓名:" prop="real_name">
<el-input v-model="mainForm.real_name" :disabled="isMainItem" style="width: 400px;"></el-input> <el-input v-model="mainForm.real_name" :disabled="isMainItem" style="width: 400px;"></el-input>
<span class="tips-text"><i class="el-icon-warning h-warning"></i>请按照营业执照上登记的法人填写</span>
</el-form-item> </el-form-item>
<el-form-item label="法定代表人证件号:" prop="idcard_number"> <el-form-item label="法定代表人证件号:" prop="idcard_number">
...@@ -95,43 +128,30 @@ ...@@ -95,43 +128,30 @@
</el-form-item> </el-form-item>
<el-form-item label="有效期至:" prop="idcard_expires_time"> <el-form-item label="有效期至:" prop="idcard_expires_time">
<el-date-picker type="date" placeholder="选择日期" v-model="validityConcreteTime" <el-date-picker
style="width: 300px;" :disabled="isMainItem"></el-date-picker> style="width:400px;"
<el-checkbox v-model="validityLongTermVal" style="padding-left:15px;" :disabled="isMainItem">长期</el-checkbox> v-model="validityConcreteTime"
</el-form-item> type="daterange"
range-separator="至"
<el-form-item label="法人证件电子版:" prop="idcard_front"> value-format="yyyy-MM-dd"
<div class="demo-image__preview"> start-placeholder="开始日期"
<div style="padding-right:6px;"> end-placeholder="结束日期"
<div class="demo-image__preview"> :disabled="isMainItem"
<el-image v-for="(item,index) in idcardFileList" :key="index" />
style="width: 100px; height: 100px;border: 1px dashed #c0ccda;border-radius: 6px;margin: 0 5px;" <el-checkbox v-model="validityLongTermVal" style="padding-left:15px;"
:src="item" :disabled="isMainItem">长期
:preview-src-list="getPreviewImgList(item)"> </el-checkbox>
</el-image>
</div>
</div>
<div>
<span class="tips-text">
<i class="el-icon-warning h-warning"></i>
</span>
</div>
<div style="width:380px;line-height: 24px;padding-top: 6px;">
<span class="tips-text">点击图片,查看大图</span>
</div>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
</el-card> </el-card>
</div> </div>
<!-- 店铺信息 -->
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<el-card> <el-card>
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<p>店铺信息</p> <p>店铺信息</p>
</div> </div>
<div> <el-form ref="storeForm" :model="storeForm" label-width="180px">
<el-form ref="storeForm" :model="storeForm" :rules="shopRules" label-width="180px">
<el-form-item label="电商平台经验:" prop="is_business_experience"> <el-form-item label="电商平台经验:" prop="is_business_experience">
<el-radio-group v-model="storeForm.is_business_experience" :disabled="isMainItem"> <el-radio-group v-model="storeForm.is_business_experience" :disabled="isMainItem">
...@@ -158,15 +178,21 @@ ...@@ -158,15 +178,21 @@
</el-form-item> </el-form-item>
<el-form-item label="店铺LOGO:" prop="shop_logo"> <el-form-item label="店铺LOGO:" prop="shop_logo">
<div class="demo-image__preview"> <div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;">
<div style="padding-right:6px;"> <div style="padding-right:6px;">
<div class="demo-image__preview"> <el-upload
<el-image v-for="(item,index) in logoFileList" :key="index" :disabled="true"
style="width: 100px; height: 100px;border: 1px dashed #c0ccda;border-radius: 6px;margin: 0 5px;" :class="['uploadData',{ 'hiden-dom': logoImgFileList.length >= 1 }]"
:src="item" action="#"
:preview-src-list="getPreviewImgList(item)"> list-type="picture-card"
</el-image> :on-preview="handleShopLogoPreview"
</div> :file-list='logoImgFileList'
>
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="shopLogoVisible">
<img width="100%" :src="shopLogoImgUrl" alt="">
</el-dialog>
</div> </div>
<div> <div>
<span class="tips-text"> <span class="tips-text">
...@@ -174,7 +200,7 @@ ...@@ -174,7 +200,7 @@
</span> </span>
</div> </div>
<div style="width:380px;line-height: 24px;padding-top: 6px;"> <div style="width:380px;line-height: 24px;padding-top: 6px;">
<span class="tips-text">点击图片,查看大图</span> <span class="tips-text">点击查看大图</span>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -190,55 +216,51 @@ ...@@ -190,55 +216,51 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<p style="width:580px;line-height:24px;font-size:14px;margin: 0;"> <p style="width:580px;line-height:24px;font-size:14px;margin: 0;color: #333;">
需要提交特殊产品资质的类目请将资质上传在此处,包括全国工业生产许可证、3C、医疗品械 需要提交特殊产品资质的类目请将资质上传在此处,包括全国工业生产许可证、3C、医疗品械
生产许可证、化妆品生产企业许可证等,根据具体类目资质要求提交</p> 生产许可证、化妆品生产企业许可证等,根据具体类目资质要求提交</p>
</el-form-item> </el-form-item>
<el-form-item label="其他资质:" prop="business_auth"> <el-form-item label="其他资质:">
<div class="demo-image__preview"> <div class="auth-con">
<div style="padding-right:6px;"> <div v-for="(item,index) in qualificationList" :key="item.id" class="single-upload-con">
<div class="demo-image__preview"> <div v-show="!item.url" class="single-auth-img"></div>
<el-image v-for="(item,index) in businessFileList" :key="index"
style="width: 100px; height: 100px;border: 1px dashed #c0ccda;border-radius: 6px;margin: 0 5px;" <div v-show="item.url" class="single-auth-img-con">
:src="item" <img class="auth-spec-img" :src="item.url" alt=""/>
:preview-src-list="getPreviewImgList(item)"> <span class="span-img-del-loading">
</el-image> <span class="span-img-del el-icon-zoom-in zoom-span-block"
@click="viewSingleSpecImg(index,item)"></span>
</span>
</div> </div>
</div> <div class="single-title">{{ authTitleFormatter(item.content) }}</div>
<div>
<span class="tips-text">
<i class="el-icon-warning h-warning"></i>
</span>
</div>
<div style="width:380px;line-height: 24px;padding-top: 6px;color: #333;">
<span class="tips-text">点击图片,查看大图</span>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
</el-card> </el-card>
</div> </div>
</el-card> </el-card>
<!--编辑--> <!--编辑-->
<el-dialog :title="title" :visible.sync="isOpen" width="60%" class="shopinf-edit"> <el-dialog title="编辑店铺信息" :visible.sync="isOpen" width="65%" class="shopinf-edit"
<el-form ref="editForm" :model="editForm" :rules="eidtRules" label-width="180px"> center :close-on-click-modal="false">
<el-form ref="editStoreForm" :model="editStoreForm" :rules="shopRules" label-width="180px" size="small">
<el-form-item label="电商平台经验:" prop="is_business_experience"> <el-form-item label="电商平台经验:" prop="is_business_experience">
<el-radio-group v-model="editForm.is_business_experience"> <el-radio-group v-model="storeForm.is_business_experience">
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="店铺名称:" prop="store_name" inline-message="true"> <el-form-item label="店铺名称:" prop="store_name" inline-message="true">
<el-input v-model="editForm.store_name" style="width: 400px;" placeholder="请输入店铺名称"></el-input> <el-input v-model="storeForm.store_name" style="width: 400px;" placeholder="请输入店铺名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="经营类目:" prop="scope"> <el-form-item label="经营类目:" prop="scope">
<el-select v-model="editForm.scope" multiple placeholder="请选择..." style="width: 400px;" @change=""> <el-select v-model="storeForm.scope" @remove-tag="removeTag" @visible-change="scopeVisibleChange($event)" multiple placeholder="请选择..." style="width: 400px;">
<el-option <el-option
v-for="item in scopeOptions" v-for="item in scopeOptions"
:key="item.id" :key="item.id"
...@@ -252,12 +274,12 @@ ...@@ -252,12 +274,12 @@
<div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;"> <div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;">
<div style="padding-right:6px;"> <div style="padding-right:6px;">
<el-upload <el-upload
class="uploadData" :class="['uploadData',{ 'hiden-dom': logoImgFileList.length >= 1 }]"
action="#" action="#"
list-type="picture-card" list-type="picture-card"
:limit="1" :limit="1"
:on-exceed="showTip1" :on-exceed="showTip1"
:before-upload = "beforeUpLogoImg" :before-upload = "beforeUpImg"
:http-request="uploadLogoImgs" :http-request="uploadLogoImgs"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:on-remove="handleRemove" :on-remove="handleRemove"
...@@ -265,7 +287,7 @@ ...@@ -265,7 +287,7 @@
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
<el-dialog :visible.sync="dialogVisible"> <el-dialog :visible.sync="dialogVisible" append-to-body>
<img width="100%" :src="dialogImageUrl" alt=""> <img width="100%" :src="dialogImageUrl" alt="">
</el-dialog> </el-dialog>
</div> </div>
...@@ -281,11 +303,11 @@ ...@@ -281,11 +303,11 @@
</el-form-item> </el-form-item>
<el-form-item label="运营负责人:" prop="emergency_name" inline-message="true"> <el-form-item label="运营负责人:" prop="emergency_name" inline-message="true">
<el-input v-model="editForm.emergency_name" style="width: 400px;" placeholder="请输入运营负责人姓名"></el-input> <el-input v-model="storeForm.emergency_name" style="width: 400px;" placeholder="请输入运营负责人姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="联系电话:" prop="emergency_tel"> <el-form-item label="联系电话:" prop="emergency_tel">
<el-input v-model="editForm.emergency_tel" style="width: 400px;" placeholder="请输入联系电话"></el-input> <el-input v-model="storeForm.emergency_tel" style="width: 400px;" placeholder="请输入联系电话"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -293,134 +315,145 @@ ...@@ -293,134 +315,145 @@
生产许可证、化妆品生产企业许可证等,根据具体类目资质要求提交</p> 生产许可证、化妆品生产企业许可证等,根据具体类目资质要求提交</p>
</el-form-item> </el-form-item>
<el-form-item label="其他资质:" prop="business_auth"> <el-form-item label="其他资质:">
<div style="width:100%;height: 100%;display: flex;flex-direction: row;justify-content: normal;"> <div class="auth-con">
<div style="padding-right:6px;"> <div v-for="(item,index) in qualificationList" :key="item.id" class="single-upload-con">
<el-upload <div v-show="!item.url" class="single-auth-img" @click="upPreSpeImg(index)"></div>
class="uploadData"
action="#" <div v-show="item.url" class="single-auth-img-con">
list-type="picture-card" <img class="auth-spec-img" :src="item.url" alt="" />
:limit="20" <span class="span-img-del-loading">
:on-exceed="showTip20" <span class="span-img-del el-icon-zoom-in zoom-span-block" @click="viewSingleSpecImg(index,item)"></span>
:before-upload = "beforeUpBusImg" <span class="span-img-del el-icon-delete del-span-block" @click="delSingleSpecImg(index,item)"></span>
:http-request="uploadBusinessImgs" </span>
:on-preview="handlePictureCardPreview2" </div>
:on-remove="handleRemove2" <div class="single-title">{{ authTitleFormatter(item.content) }}</div>
:file-list = 'businessImgFileList'> <!-- 真正上传 dom 原生 input -->
<i class="el-icon-plus"></i> <input type="file" style="display: none;" :ref=" 'hxz' + index " accept="image/*"
</el-upload> @change="changeIMG(index,item)">
<el-dialog :visible.sync="dialogVisible2">
<img width="100%" :src="dialogImageUrl2" alt="">
</el-dialog>
</div>
<div>
<span class="tips-text">
<i class="el-icon-warning h-warning"></i>
</span>
</div>
<div style="width:380px;line-height: 24px;padding-top: 6px;color: #333;">
<span class="tips-text">请上其他资质,单个文件大小在2MB以内,支持jpg,png格式,最多可上传20张</span>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item class="btnCen"> <el-form-item class="btnCen">
<el-button type="" @click="handleCancel" style="margin-right: 40px;">取 消</el-button> <el-button type="" @click="handleCancel" style="margin-right: 20px;">取 消</el-button>
<el-button type="primary" @click="handleAdd('editForm')">提交审核</el-button> <el-button type="primary" @click="handleAdd('editForm')">提交审核</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-dialog> </el-dialog>
<!-- 图片预览 -->
<el-dialog
:visible.sync="imgDialog"
:destroy-on-close="true"
width="60%"
center
:close-on-click-modal="false"
class="img-dialog-con"
>
<img class="img-spe" :src="qualificationUrl" alt="">
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {getGoodsType, getMainInf, getShopInf,upLoadImg, addShopInf} from '@/api/module/entry'; import {getGoodsType, getMainInf, getShopInf, upLoadImg, addShopInf, getUploadQualificationListData} from '@/api/module/entry';
export default { export default {
name: "Shop", name: "Shop",
data() { data() {
let logoValidator = (rule, value, callback) => { let logoValidator = (rule, value, callback) => {
if(this.logoImgFileList.length > 0) { if (this.logoImgFileList.length > 0) {
callback(); callback();
}else if(this.logoImgFileList.length === 0) { } else if (this.logoImgFileList.length === 0) {
callback(new Error("店铺logo图片至少上传一张")); callback(new Error("店铺logo图片至少上传一张"));
} }
}; };
let busAuthValidator = (rule, value, callback) => { let busAuthValidator = (rule, value, callback) => {
if(this.businessImgFileList.length > 0) { if (this.businessImgFileList.length > 0) {
callback(); callback();
}else if(this.businessImgFileList.length === 0) { } else if (this.businessImgFileList.length === 0) {
callback(new Error("其他资质图片至少上传一张")); callback(new Error("其他资质图片至少上传一张"));
} }
}; };
// 手机号码格式校验 // 手机号码格式校验
let checkTel = (rule, value, callback) => { let checkTel = (rule, value, callback) => {
const reg = /^1[3456789]\d{9}$/; const reg = /^1[3456789]\d{9}$/;
if(!reg.test(value)){ if (!reg.test(value)) {
callback(new Error('手机号码格式有误')); callback(new Error('手机号码格式有误'));
}else { } else {
callback(); callback();
} }
}; };
return { return {
loading: false,
isOpen: false,
reviewResult: '加载中。。', reviewResult: '加载中。。',
title: '', isMainItem: true,// 主体/企业信息 是否可以修改,目前暂时不能
isMainItem: true,// 主体/企业信息 单项 是否可以修改,目前暂时不能
// 执照类型
zzOptions: [
{label: "多证合一营业执照(统一社会信用代码)", value: 1},
{label: "多证合一营业执照(非统一社会信用代码)", value: 2},
],
// 法人执照类型
idcardTypeOptions: [
{label: "大陆身份证", value: 1},
{label: "护照", value: 2},
{label: "港奥台居民通行证", value: 3},
{label: "台湾居民通行证", value: 4},
],
scopeOptions: [],
// 营业期限
periodConcreteTime: null,
periodLongTermVal: false,
// 证件有效期
validityConcreteTime: null,
validityLongTermVal: false,
licenseFileList: [], // 营业执照图片
idcardFileList: [], // 法人证件照
logoFileList: [], // 店铺logo
businessFileList: [], // 其他资质
mainForm: { mainForm: {
organization_type: '',
license_type: '',
license: '', license: '',
organization_name: '', organization_name: '',
organization_address: '', license_number: '',
license_start_time: '',
license_expires_time: '', license_expires_time: '',
idcard_type: '', idcard_front: '',
idcard_back: '',
real_name: '', real_name: '',
idcard_number: '', idcard_number: '',
idcard_start_time: '',
idcard_expires_time: '', idcard_expires_time: '',
idcard_front: '',
//idcardback: 'jiazhuangwshifanmian'
}, },
// 营业执照图片
licenseImgFileList: [],
isLicenseVisible: false,
licenseImgUrl: '',
// 营业期限
periodConcreteTime: [], // 区间时间
periodLongTermVal: false, // 是否长期
// 身份证 正面
idcardImgFileList: [],
idcardPositiveVisible: false,
idcardPositiveImgUrl: '',
// 身份证国徽面
idcardBackImgFileList: [],
idcardBackVisible: false,
idcardBackImgUrl: '',
// 身份证 有效期
validityConcreteTime: [],
validityLongTermVal: false,
// 店铺信息
storeForm: { storeForm: {
is_business_experience: '', is_business_experience: '',
store_name: '', store_name: '',
scope: [], scope: [],
shop_logo: '', shop_logo: '',
business_auth: '',
emergency_name: '', emergency_name: '',
emergency_tel: '',
business_auth: '',
}, },
shopRules: {}, scopeOptions: [], // 经营类目
mainRules: {}, // 店铺logo 图片
dialogImageUrl: '', logoImgFileList: [],
shopLogoVisible: false,
shopLogoImgUrl: '',
// 需要上传的资质
qualificationList: [],
qualificationUrl: '',
imgDialog: false,
// 编辑
isOpen: false,
//-------------------------
dialogVisible: false, dialogVisible: false,
// --------------------
dialogImageUrl2: '', dialogImageUrl2: '',
dialogVisible2: false, dialogVisible2: false,
logoImgFileList: [], dialogBackImageUrl: '',
dialogBackVisible: false,
logoFileList: [], // 店铺logo
businessFileList: [], // 其他资质
shopRules: {},
businessImgFileList: [], businessImgFileList: [],
editForm: { editForm: {
is_business_experience: 0, is_business_experience: 0,
...@@ -437,12 +470,13 @@ ...@@ -437,12 +470,13 @@
emergency_name: [{required: true, message: '运营负责人不能为空', trigger: 'blur'}],// emergency_name: [{required: true, message: '运营负责人不能为空', trigger: 'blur'}],//
emergency_tel: [ emergency_tel: [
{required: true, message: '联系人手机号码不能为空', trigger: 'blur'}, {required: true, message: '联系人手机号码不能为空', trigger: 'blur'},
{required: true, validator: checkTel,trigger: 'blur' } {required: true, validator: checkTel, trigger: 'blur'}
], ],
business_auth: [{required: true, message: '店铺Logo至少上传一张图片', validator: busAuthValidator}],// business_auth: [{required: true, message: '店铺Logo至少上传一张图片', validator: busAuthValidator}],//
} },
} }
}, }, // data end
created() { created() {
// 获取经营一级类目 // 获取经营一级类目
getGoodsType().then(res => { getGoodsType().then(res => {
...@@ -460,65 +494,112 @@ ...@@ -460,65 +494,112 @@
arr.push(ele); arr.push(ele);
return arr; return arr;
}, },
// 获取 主体=企业 信息 /** 获取 主体即企业 信息 */
getMain() { getMain() {
getMainInf().then(res => { getMainInf().then(res => {
if (res.code === 1 && res.data) { if (res.code == 1) {
this.mainForm = res.data; this.mainForm = res.data;
// 处理证件照
let licenseArr = []; // 营业执照电子图片处理
if (this.mainForm.license.indexOf(",") > 0) { let licenseImgArr = [];
licenseArr = this.mainForm.license.split(","); let licenseImgUrl = {};
licenseImgArr = this.mainForm.license.split(",");
if (licenseImgArr.length > 0) {
licenseImgArr.forEach(item => {
licenseImgUrl = {};
if (item) {
licenseImgUrl.url = item
this.licenseImgFileList.push(licenseImgUrl)
}
});
} else { } else {
licenseArr.push(this.mainForm.license); this.licenseImgFileList = [];
} }
this.licenseFileList = licenseArr;
// 处理法人证件照 // 身份证 正面数据处理
let idcardArr = []; let idcardFrontImgArr = [];
if (this.mainForm.idcard_front.indexOf(",") > 0) { let idcardFrontImgUrl = {};
idcardArr = this.mainForm.idcard_front.split(","); idcardFrontImgArr = this.mainForm.idcard_front.split(",");
if (idcardFrontImgArr.length > 0) {
idcardFrontImgArr.forEach(item => {
idcardFrontImgUrl = {};
if (item) {
idcardFrontImgUrl.url = item
this.idcardImgFileList.push(idcardFrontImgUrl)
}
});
} else { } else {
idcardArr.push(this.mainForm.idcard_front); this.idcardImgFileList = [];
} }
this.idcardFileList = idcardArr;
if(this.mainForm.idcard_expires_time === 0) { // 身份证 反面数据处理
this.validityLongTermVal = true; let idcardBackImgArr = [];
}else { let idcardBackImgUrl = {};
this.validityConcreteTime = this.toStandTime(this.mainForm.idcard_expires_time);
idcardBackImgArr = this.mainForm.idcard_back.split(",");
if (idcardBackImgArr.length > 0) {
idcardBackImgArr.forEach(item => {
idcardBackImgUrl = {};
if (item) {
idcardBackImgUrl.url = item
this.idcardBackImgFileList.push(idcardBackImgUrl)
}
});
} else {
this.idcardBackImgFileList = [];
}
// 营业期限 日期格式处理
if (this.mainForm.license_expires_time == 0) {
this.periodLongTermVal = true
this.periodConcreteTime = [];
} else if (this.mainForm.license_expires_time > 0) {
this.periodLongTermVal = false;
this.periodConcreteTime = [];
let start = this.formatterTime(this.mainForm.license_start_time)
let end = this.formatterTime(this.mainForm.license_expires_time);
this.periodConcreteTime.push(start)
this.periodConcreteTime.push(end)
} }
if(this.mainForm.license_expires_time === 0) { // 身份证 有效期 日期格式处理
this.periodLongTermVal = true; if (this.mainForm.idcard_expires_time == 0) {
}else { this.validityLongTermVal = true
this.periodConcreteTime = this.toStandTime(this.mainForm.license_expires_time); this.validityConcreteTime = [];
} else if (this.mainForm.idcard_expires_time > 0) {
this.validityLongTermVal = false;
this.validityConcreteTime = [];
let start = this.formatterTime(this.mainForm.idcard_start_time)
let end = this.formatterTime(this.mainForm.idcard_expires_time);
this.validityConcreteTime.push(start)
this.validityConcreteTime.push(end)
} }
} }
}); });
}, },
/** 获取 店铺信息 */
getShop() { getShop() {
getShopInf().then(res => { getShopInf().then(res => {
if (res.code === 1 && res.data) { if (res.code == 1) {
// 审核状态 // 审核状态
if(res.data.state === 1) { if (res.data.state === 1) {
this.reviewResult = '已通过'; this.reviewResult = '已通过';
}else if(res.data.state === 2) { } else if (res.data.state === 2) {
this.reviewResult = '未审核'; this.reviewResult = '未审核';
}else if(res.data.state === 3) { } else if (res.data.state === 3) {
this.reviewResult = '未通过'; this.reviewResult = '未通过';
}else { } else {
this.reviewResult = ''; this.reviewResult = '';
} }
// 处理 select 下拉回显数据格式 // 处理 select 下拉回显数据格式
this.storeForm.scope = []; this.storeForm.scope = [];
if(res.data.scope === '') { if (res.data.scope === '') {
this.storeForm.scope = []; this.storeForm.scope = [];
}else { } else {
let scopeListStr = res.data.scope.split(','); let scopeListStr = res.data.scope.split(',');
let scopeList = []; let scopeList = [];
for(let i = 0; i < scopeListStr.length; i++) { for (let i = 0; i < scopeListStr.length; i++) {
scopeList.push(parseInt(scopeListStr[i])); scopeList.push(parseInt(scopeListStr[i]));
} }
this.storeForm = res.data; this.storeForm = res.data;
...@@ -527,54 +608,78 @@ ...@@ -527,54 +608,78 @@
// 店铺信息展示 start // 店铺信息展示 start
this.storeForm = res.data; this.storeForm = res.data;
console.log("00",res.data);
// 店铺logo图片处理
let logoArr = [];
if (this.storeForm.shop_logo.indexOf(",") > 0) {
logoArr = this.storeForm.shop_logo.split(",");
} else {
logoArr.push(this.storeForm.shop_logo);
}
this.logoFileList = logoArr;
// 其他资质图片处理 business // 店铺logo回显处理
let businessArr = []; let logoImgArr = [];
if (this.storeForm.business_auth.indexOf(",") > 0) { let logoImgUrl = {};
businessArr = this.storeForm.business_auth.split(","); logoImgArr = this.storeForm.shop_logo.split(",");
if (logoImgArr.length > 0) {
logoImgArr.forEach(item => {
logoImgUrl = {};
if (item) {
logoImgUrl.url = item
this.logoImgFileList.push(logoImgUrl)
}
});
} else { } else {
businessArr.push(this.storeForm.business_auth); this.logoImgFileList = [];
} }
this.businessFileList = businessArr;
// 店铺信息展示 end // 资质图片回显处理
}else if( res.code === 0 && res.msg) { this.qualificationList = this.storeForm.qualification ? this.storeForm.qualification : [];
this.$message({
message: res.msg, } else if (res.code) {
type: 'error' this.$message({message: res.msg, type: 'error'});
});
}else {
this.$message({
message: "数据有误!",
type: 'error'
});
} }
}); });
}, },
/** 预览 营业执照 */
handleLicenseImgview(file) {
this.licenseImgUrl = file.url;
this.isLicenseVisible = true;
},
/** 预览 身份证 正面 */
handleIdcardPositiveImgview(file) {
this.idcardPositiveImgUrl = file.url;
this.idcardPositiveVisible = true;
},
/** 预览 身份证 反面 */
handleIdcardBackImgview(file) {
this.idcardBackImgUrl = file.url;
this.idcardBackVisible = true;
},
/** 预览 店铺 logo */
handleShopLogoPreview(file) {
this.shopLogoImgUrl = file.url;
this.shopLogoVisible = true;
},
/** 预览 当前资质对应图片 */
viewSingleSpecImg(index,item) {
this.imgDialog = false;
if (!item.url) return;
this.imgDialog = true;
this.qualificationUrl = item.url
},
// 修改 店铺信息的 回显数据 // 修改 店铺信息的 回显数据
showShopInf() { showShopInf() {
getShopInf().then(res => { getShopInf().then(res => {
if (res.code === 1 && res.data) { if (res.code === 1 && res.data) {
// 店铺信息修改 start // 店铺信息修改 start
//this.editForm = res.data; //this.editForm = res.data;
console.log("处理后的格式555:",res.data);
this.editForm.scope = []; this.editForm.scope = [];
if(res.data.scope === '') { if (res.data.scope === '') {
this.editForm.scope = []; this.editForm.scope = [];
}else { } else {
let scopeListStr = res.data.scope.split(','); let scopeListStr = res.data.scope.split(',');
let scopeList = []; let scopeList = [];
for(let i = 0; i < scopeListStr.length; i++) { for (let i = 0; i < scopeListStr.length; i++) {
scopeList.push(Number(scopeListStr[i])); scopeList.push(Number(scopeListStr[i]));
} }
this.editForm = res.data; this.editForm = res.data;
...@@ -584,44 +689,44 @@ ...@@ -584,44 +689,44 @@
// 店铺logo回显处理 // 店铺logo回显处理
let logoList = {}; let logoList = {};
let eidtLogoArr = []; let eidtLogoArr = [];
if(this.editForm.shop_logo.indexOf(",") > 0) { if (this.editForm.shop_logo.indexOf(",") > 0) {
eidtLogoArr = this.editForm.shop_logo.split(","); eidtLogoArr = this.editForm.shop_logo.split(",");
for(let a = 0; a < eidtLogoArr.length; a++){ for (let a = 0; a < eidtLogoArr.length; a++) {
logoList = {}; logoList = {};
logoList.url = eidtLogoArr[a]; logoList.url = eidtLogoArr[a];
this.logoImgFileList.push(logoList); this.logoImgFileList.push(logoList);
} }
}else if(this.editForm.shop_logo) { } else if (this.editForm.shop_logo) {
logoList.url = this.editForm.shop_logo; logoList.url = this.editForm.shop_logo;
this.logoImgFileList = []; this.logoImgFileList = [];
this.logoImgFileList.push(logoList); this.logoImgFileList.push(logoList);
}else { } else {
this.logoImgFileList = []; this.logoImgFileList = [];
} }
// 资质图片回显处理 // 资质图片回显处理
let businessList = {}; let businessList = {};
let editBusArr = []; let editBusArr = [];
if(this.editForm.business_auth.indexOf(",") > 0) { if (this.editForm.business_auth.indexOf(",") > 0) {
editBusArr = this.editForm.business_auth.split(","); editBusArr = this.editForm.business_auth.split(",");
for(let a = 0; a < editBusArr.length; a++){ for (let a = 0; a < editBusArr.length; a++) {
businessList = {}; businessList = {};
businessList.url = editBusArr[a]; businessList.url = editBusArr[a];
this.businessImgFileList.push(businessList); this.businessImgFileList.push(businessList);
} }
}else if(this.editForm.business_auth) { } else if (this.editForm.business_auth) {
businessList.url = this.editForm.business_auth; businessList.url = this.editForm.business_auth;
this.businessImgFileList = []; this.businessImgFileList = [];
this.businessImgFileList.push(businessList); this.businessImgFileList.push(businessList);
}else { } else {
this.businessImgFileList = []; this.businessImgFileList = [];
} }
// 店铺信息修改 end // 店铺信息修改 end
}else if( res.code === 0 && res.msg) { } else if (res.code === 0 && res.msg) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: 'error' type: 'error'
}); });
}else { } else {
this.$message({ this.$message({
message: "数据有误!", message: "数据有误!",
type: 'error' type: 'error'
...@@ -632,7 +737,6 @@ ...@@ -632,7 +737,6 @@
// 编辑 // 编辑
handleEdit() { handleEdit() {
this.isOpen = true; this.isOpen = true;
this.title = '编辑店铺信息';
this.showShopInf(); this.showShopInf();
}, },
// 保存 // 保存
...@@ -650,57 +754,57 @@ ...@@ -650,57 +754,57 @@
}, },
save(formName) { save(formName) {
let scoprStr = ''; let scoprStr = '';
for(let i = 0; i < this.editForm.scope.length; i++) { for (let i = 0; i < this.editForm.scope.length; i++) {
scoprStr += this.editForm.scope[i] + ','; scoprStr += this.editForm.scope[i] + ',';
} }
this.editForm.scope = scoprStr.substring(0,scoprStr.length - 1); this.editForm.scope = scoprStr.substring(0, scoprStr.length - 1);
// shop_logo图片地址字段 // shop_logo图片地址字段
if(this.logoImgFileList.length > 0) { if (this.logoImgFileList.length > 0) {
for(let i = 0; i < this.logoImgFileList.length; i++) { for (let i = 0; i < this.logoImgFileList.length; i++) {
if(i === 0) { if (i === 0) {
this.editForm.shop_logo = this.logoImgFileList[i].url; this.editForm.shop_logo = this.logoImgFileList[i].url;
}else { } else {
this.editForm.shop_logo += ',' + this.logoImgFileList[i].url; this.editForm.shop_logo += ',' + this.logoImgFileList[i].url;
} }
} }
} }
// 其他资质图片字段处理 // 其他资质图片字段处理
if(this.businessImgFileList.length > 0) { if (this.businessImgFileList.length > 0) {
for(let i = 0; i < this.businessImgFileList.length; i++) { for (let i = 0; i < this.businessImgFileList.length; i++) {
if(i === 0) { if (i === 0) {
this.editForm.business_auth = this.businessImgFileList[i].url; this.editForm.business_auth = this.businessImgFileList[i].url;
}else { } else {
this.editForm.business_auth += ',' + this.businessImgFileList[i].url; this.editForm.business_auth += ',' + this.businessImgFileList[i].url;
} }
} }
} }
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if(valid) { if (valid) {
addShopInf(this.editForm).then(res => { addShopInf(this.editForm).then(res => {
if(res.code === 1){ if (res.code === 1) {
this.getShop(); this.getShop();
this.$message({message: '店铺信息修改成功', type:'success'}); this.$message({message: '店铺信息修改成功', type: 'success'});
this.isOpen = false; this.isOpen = false;
}else if(res.code === 0 && res.msg) { } else if (res.code === 0 && res.msg) {
// 处理 scope数据格式冲突 // 处理 scope数据格式冲突
if(this.editForm.scope === '') { if (this.editForm.scope === '') {
this.editForm.scope = []; this.editForm.scope = [];
}else { } else {
let scopeListStr = this.editForm.scope.split(','); let scopeListStr = this.editForm.scope.split(',');
let scopeList = []; let scopeList = [];
for(let i = 0; i < scopeListStr.length; i++) { for (let i = 0; i < scopeListStr.length; i++) {
scopeList.push(parseInt(scopeListStr[i])); scopeList.push(parseInt(scopeListStr[i]));
} }
this.editForm.scope = scopeList; this.editForm.scope = scopeList;
} }
if(res.msg) { if (res.msg) {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: 'error' type: 'error'
}); });
}else { } else {
this.$message({ this.$message({
message: "数据开小差了,请稍后重试", message: "数据开小差了,请稍后重试",
type: 'error' type: 'error'
...@@ -708,17 +812,16 @@ ...@@ -708,17 +812,16 @@
} }
} }
}); });
} } else {
else {
// 因 scope字段是selcet的绑定值,必须为数组类型,但是,在传给后台的时候,是字符串类型,传入的时候需要处理,回显的时候也需要处理 // 因 scope字段是selcet的绑定值,必须为数组类型,但是,在传给后台的时候,是字符串类型,传入的时候需要处理,回显的时候也需要处理
// 在校验时候就产出了这个bug,校验不通过的话,他已经被处理为字符串了,不通过的话,还原格式,不能还原数据 // 在校验时候就产出了这个bug,校验不通过的话,他已经被处理为字符串了,不通过的话,还原格式,不能还原数据
//this.storeForm.scope = []; //this.storeForm.scope = [];
if(this.storeForm.scope === '') { if (this.storeForm.scope === '') {
this.storeForm.scope = []; this.storeForm.scope = [];
}else { } else {
let scopeListStr = this.storeForm.scope.split(','); let scopeListStr = this.storeForm.scope.split(',');
let scopeList = []; let scopeList = [];
for(let i = 0; i < scopeListStr.length; i++) { for (let i = 0; i < scopeListStr.length; i++) {
scopeList.push(parseInt(scopeListStr[i])); scopeList.push(parseInt(scopeListStr[i]));
} }
this.storeForm.scope = scopeList; this.storeForm.scope = scopeList;
...@@ -731,22 +834,53 @@ ...@@ -731,22 +834,53 @@
this.resetForm('editForm'); this.resetForm('editForm');
this.isOpen = false; this.isOpen = false;
}, },
showTip1(files,fileList){ showTip1(files, fileList) {
this.$message({message: '最多上传1张图片', type: 'warning'}); this.$message({message: '最多上传1张图片', type: 'warning'});
}, },
showTip20(files,fileList) { showTip20(files, fileList) {
this.$message({message: '最多上传20张图片', type: 'warning'}); this.$message({message: '最多上传20张图片', type: 'warning'});
}, },
/** 上传 营业执照图片 */
uploadLicenseImages(param) {
this.getBase64(param.file).then((res) => {
let result = res.split(",");
this.Base64img = result[1];
let data = {"img_data": this.Base64img};
upLoadImg(data).then((res) => {
if (res.code == 1) {
this.licenseImgFileList.push({'url': res.data.image_url});
this.$message({type: 'success', message: '上传成功'});
this.$refs.mainForm.clearValidate('license');
// 图片识别
this.readLicenseImgInfo(this.licenseImgFileList);
} else {
this.$message({type: 'error', message: res.message ? res.message : '上传失败'});
}
});
});
},
// handlePictureCardPreview(file) {
// this.dialogImageUrl = file.url;
// this.dialogVisible = true;
// },
handleRemove(file, fileList) {
for (let i = 0; i < this.licenseImgFileList.length; i++) {
if (file.uid === this.licenseImgFileList[i].uid) {
this.licenseImgFileList.splice(i, 1);
}
}
},
// 上传店铺logo图片 // 上传店铺logo图片
uploadLogoImgs(param) { uploadLogoImgs(param) {
this.getBase64(param.file).then((res) => { this.getBase64(param.file).then((res) => {
let result = res.split(","); let result = res.split(",");
this.Base64img = result[1]; this.Base64img = result[1];
let data = {"img_data":this.Base64img}; let data = {"img_data": this.Base64img};
upLoadImg(data).then((res) => { upLoadImg(data).then((res) => {
if(res && res.code == 1){ if (res && res.code == 1) {
this.logoImgFileList.push({'url':res.data.image_url}); this.logoImgFileList.push({'url': res.data.image_url});
this.$message({message: '上传成功', type: 'success'}); this.$message({message: '上传成功', type: 'success'});
this.$refs.storeForm.clearValidate('shop_logo'); this.$refs.storeForm.clearValidate('shop_logo');
} }
...@@ -758,10 +892,10 @@ ...@@ -758,10 +892,10 @@
this.getBase64(param.file).then((res) => { this.getBase64(param.file).then((res) => {
let result = res.split(","); let result = res.split(",");
this.Base64img = result[1]; this.Base64img = result[1];
let data = {"img_data":this.Base64img}; let data = {"img_data": this.Base64img};
upLoadImg(data).then((res) => { upLoadImg(data).then((res) => {
if(res && res.code == 1){ if (res && res.code == 1) {
this.businessImgFileList.push({'url':res.data.image_url}); this.businessImgFileList.push({'url': res.data.image_url});
this.$message({message: '上传成功', type: 'success'}); this.$message({message: '上传成功', type: 'success'});
this.$refs.storeForm.clearValidate('business_auth'); this.$refs.storeForm.clearValidate('business_auth');
} }
...@@ -769,16 +903,16 @@ ...@@ -769,16 +903,16 @@
}); });
}, },
// 店铺logo图片上传格式和大小的校验 // 店铺logo图片上传格式和大小的校验
beforeUpLogoImg(file) { beforeUpImg(file) {
let isImgSize = (file.size / 1024 ) > 500; let isImgSize = (file.size / 1024) > 500;
if(file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") { if (file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") {
this.$message({ this.$message({
message: '上传图片格式只支持png/png格式', message: '上传图片格式只支持png/png格式',
type: "warning" type: "warning"
}); });
return false; return false;
} }
if(isImgSize) { if (isImgSize) {
this.$message({ this.$message({
message: '上传图片大小不能超过500kb', message: '上传图片大小不能超过500kb',
type: "warning" type: "warning"
...@@ -787,64 +921,220 @@ ...@@ -787,64 +921,220 @@
} }
}, },
// 其他资质图片上传 校验 // 其他资质图片上传 校验
beforeUpBusImg(file) { // beforeUpBusImg(file) {
let isImgSize = (file.size / 1024 /1024) > 2; // let isImgSize = (file.size / 1024 /1024) > 2;
if(file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") { // if(file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") {
this.$message({ // this.$message({
message: '上传图片格式只支持png/png格式', // message: '上传图片格式只支持png/png格式',
type: "warning" // type: "warning"
// });
// return false;
// }
// if(isImgSize) {
// this.$message({
// message: '上传图片大小不能超过2M',
// type: "warning"
// });
// return false;
// }
// },
// handlePictureCardPreview(file) {
// this.dialogImageUrl = file.url;
// this.dialogVisible = true;
// },
// handleRemove(file,fileList) {
// for(let i = 0; i < this.logoImgFileList.length; i++) {
// if(file.uid === this.logoImgFileList[i].uid) {
// this.logoImgFileList.splice(i,1);
// }
// }
// },
/** 上传身份证 正面 */
uploadIdcardPositive(param) {
this.getBase64(param.file).then((res) => {
let result = res.split(",");
this.Base64img = result[1];
let data = {"img_data": this.Base64img};
upLoadImg(data).then((res) => {
if (res.code == 1) {
this.idcardImgFileList.push({'url': res.data.image_url});
this.$message({type: 'success', message: '上传成功'});
this.$refs.mainForm.clearValidate('idcard_front');
this.readIdcardPositive(this.idcardImgFileList);
} else {
this.$message({type: 'error', message: res.message ? res.message : '上传失败'});
}
}); });
return false; });
},
/** 识别 身份证 正面 */
readIdcardPositive(fileList) {
if (!Array.isArray(fileList) || !fileList[0].url) return
let data = {img: fileList[0].url}
getIdcardImgInfoData(data).then(res => {
if (res.code == 1) {
this.mainForm.real_name = res.data.words_result['姓名'].words ? res.data.words_result['姓名'].words : '';
this.mainForm.idcard_number = res.data.words_result['公民身份号码'].words ? res.data.words_result['公民身份号码'].words : '';
}
});
},
// handlePictureCardPreview2(file) {
// this.dialogImageUrl2 = file.url;
// this.dialogVisible2 = true;
// },
handleRemove2(file, fileList) {
for (let i = 0; i < this.idcardImgFileList.length; i++) {
if (file.uid === this.idcardImgFileList[i].uid) {
this.idcardImgFileList.splice(i, 1);
}
} }
if(isImgSize) { },
this.$message({ /** 上传身份证 反面 */
message: '上传图片大小不能超过2M', uploadIdcardBack(param) {
type: "warning" this.getBase64(param.file).then((res) => {
let result = res.split(",");
this.Base64img = result[1];
let data = {"img_data": this.Base64img};
upLoadImg(data).then((res) => {
if (res.code == 1) {
this.idcardBackImgFileList.push({'url': res.data.image_url});
this.$message({type: 'success', message: '上传成功'});
this.$refs.mainForm.clearValidate('idcard_back');
this.readIdcardBack(this.idcardBackImgFileList);
} else {
this.$message({type: 'error', message: res.message ? res.message : '上传失败'});
}
}); });
return false; });
}
}, },
/** 识别 身份证 反面 */
handlePictureCardPreview(file) { readIdcardBack(fileList) {
this.dialogImageUrl = file.url; if (!Array.isArray(fileList) || !fileList[0].url) return
this.dialogVisible = true; let data = {img: fileList[0].url}
getIdcardImgInfoData(data).then(res => {
if (res.code == 1) {
// 身份证 有效 XXXXXXXX日 => xx-xx-xx
let endStr = res.data.words_result['失效日期'].words ? res.data.words_result['失效日期'].words : '';
if (endStr == '长期') {
this.validityConcreteTime = [];
this.validityLongTermVal = true;
} else {
let beginStr = res.data.words_result['签发日期'].words ? res.data.words_result['签发日期'].words : '';
let reg = /^(\d{4})(\d{2})(\d{2})$/;
let begin = beginStr.replace(reg, "$1-$2-$3");
let end = endStr.replace(reg, "$1-$2-$3");
this.validityConcreteTime = [];
this.validityConcreteTime.push(begin);
this.validityConcreteTime.push(end);
this.validityLongTermVal = false;
}
}
});
}, },
handleRemove(file,fileList) { /** 预览 身份证反面 */
for(let i = 0; i < this.logoImgFileList.length; i++) { handleIdcardBackPreview(file) {
if(file.uid === this.logoImgFileList[i].uid) { this.dialogBackImageUrl = file.url;
this.logoImgFileList.splice(i,1); this.dialogBackVisible = true;
},
/** 删除 身份证反面 */
handleBackRemove2(file) {
for (let i = 0; i < this.idcardBackImgFileList.length; i++) {
if (file.uid === this.idcardBackImgFileList[i].uid) {
this.idcardBackImgFileList.splice(i, 1);
} }
} }
}, },
handlePictureCardPreview2(file) { /** 营业期限 选择区间时间时 */
this.dialogImageUrl2 = file.url; periodLongTermChange() {
this.dialogVisible2 = true; if (Array.isArray(this.periodConcreteTime) && this.periodConcreteTime.length == 2) {
this.periodLongTermVal = false;
}
},
/** 营业期限 选择 长期时 */
periodConcreteChange() {
if (this.periodLongTermVal) {
this.periodConcreteTime = [];
}
},
/** 身份证有效期 选择区间时间时 */
validityConcreteTimeChange() {
if (Array.isArray(this.validityConcreteTime) && this.validityConcreteTime.length == 2) {
this.validityLongTermVal = false;
}
},
/** 身份证有效期 选择 长期时 */
validityLongTermValChange() {
if (this.validityLongTermVal) {
this.validityConcreteTime = [];
}
},
/** 删除单个 经营类目 触发 */
removeTag(indexVal) {
if (!indexVal) return;
if (this.storeForm.scope.length == 0) {
this.qualificationList = [];
}
if (this.storeForm.scope.length > 0) {
let data = { cate_ids: this.storeForm.scope }
getUploadQualificationListData(data).then(res=> {
if (res.code == 1) {
this.qualificationList = res.data ? res.data : [];
}
})
}
}, },
handleRemove2(file,fileList) { /** 经营类目 下拉框隐藏时候,触发 */
for(let i = 0; i < this.businessImgFileList.length; i++) { scopeVisibleChange(handleType) {
if(file.uid === this.businessImgFileList[i].uid) { if (!handleType) {
this.businessImgFileList.splice(i,1); if (Array.isArray(this.storeForm.scope) && this.storeForm.scope.length > 0) {
let data = { cate_ids: this.storeForm.scope }
getUploadQualificationListData(data).then(res=> {
if (res.code == 1) {
this.qualificationList = res.data ? res.data : [];
}
})
} }
} }
}, },
// 图片转换为base64位 // 图片转换为base64位
getBase64(file) { getBase64(file) {
return new Promise(function(resolve, reject) { return new Promise(function (resolve, reject) {
let reader = new FileReader(); let reader = new FileReader();
let imgResult = ""; let imgResult = "";
reader.readAsDataURL(file); reader.readAsDataURL(file);
reader.onload = function() { reader.onload = function () {
imgResult = reader.result; imgResult = reader.result;
}; };
reader.onerror = function(error) { reader.onerror = function (error) {
reject(error); reject(error);
}; };
reader.onloadend = function() { reader.onloadend = function () {
resolve(imgResult); resolve(imgResult);
}; };
}); });
}, },
/** 资质类目 title格式化 */
authTitleFormatter(textVal) {
let res = '',resoult = '';
if (textVal) {
res = textVal.trim();
// if(textVal.left(0) == '《') {
//
// }
// if(textVal.right(0) == '《') {
//
// }
// console.log(111,textVal.left(0));
// console.log(222,textVal.right(0));
}
return res
},
// 时间戳转换为 标准时间格式 // 时间戳转换为 标准时间格式
toStandTime(val) { toStandTime(val) {
...@@ -863,18 +1153,39 @@ ...@@ -863,18 +1153,39 @@
<style lang="scss" type="text/stylus" scoped> <style lang="scss" type="text/stylus" scoped>
.shopinf-edit{ .shopinf-edit {
/deep/.el-dialog { ///deep/.el-dialog {
height: 80%; // height: 80%;
overflow : hidden; // overflow : hidden;
} //}
/deep/.el-dialog__body{ ///deep/.el-dialog__body{
height: calc(100% - 60px); // height: calc(100% - 60px);
overflow-x: hidden; // overflow-x: hidden;
overflow-y: scroll; // overflow-y: scroll;
} //}
}
/* 弹窗 样式 重置 */
.shopinf-edit >>> .el-dialog {
width: 60%;
height: 80%;
overflow: hidden;
}
.shopinf-edit >>> .el-dialog .el-dialog__body {
height: calc(100% - 60px);
padding: 10px 20px 20px 40px;
overflow: auto;
} }
/* 弹窗 样式 重置 ---- end ---- */
.main-form-con {
//margin-left: 100px;
}
/deep/ .el-card__body { /deep/ .el-card__body {
height: calc(100% - 80px); height: calc(100% - 80px);
margin: 10px 0; margin: 10px 0;
...@@ -890,6 +1201,7 @@ ...@@ -890,6 +1201,7 @@
/deep/ .speTip { /deep/ .speTip {
color: #c0ccda; color: #c0ccda;
font-size: 14px;
} }
.text-v-c { .text-v-c {
...@@ -897,8 +1209,8 @@ ...@@ -897,8 +1209,8 @@
display: -webkit-flex; display: -webkit-flex;
} }
.demo-image__preview{ .demo-image__preview {
width:100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -938,6 +1250,117 @@ ...@@ -938,6 +1250,117 @@
} }
} }
.hiden-dom >>> .el-upload--picture-card {
display: none !important;
}
.idcard-tips-con {
display: flex;
flex-direction: row;
justify-content: normal;
justify-items: center;
}
.idcard-tips-con > p {
margin: 0;
padding: 0 15px;
}
/*** 资质 样式 start ***/
.auth-con {
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
justify-content: normal;
flex-wrap: wrap;
}
.single-upload-con {
width: 160px;
height: 140px;
text-align: center;
overflow: hidden;
}
.single-auth-img {
width: 98px;
height: 98px;
border-radius: 6px;
border: 1px dashed #eee;
margin: 5px auto;
cursor: pointer;
}
.single-auth-img-con {
margin: 0;
padding: 0;
display: inline-block;
width: 98px;
height: 98px;
position: relative;
//top:4px;
cursor: pointer;
border-radius: 6px;
border: 1px solid #c0ccda;
}
.auth-spec-img {
width: 100%;
height: 100%;
border-radius: 6px;
cursor: pointer;
position: relative;
border: none;
}
/* 当前图片滑过 效果,显示删除icon */
.span-img-del-loading {
display: none;
position: absolute;
width: 98px;
height: 98px;
top: 0;
left: 0;
border-radius: 5px;
z-index: 66;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0.75;
transition: opacity .3s;
}
.span-img-del-loading > .zoom-span-block {
color: #fff;
font-size: 20px;
font-weight: 500;
margin: 41px 4px 0;
z-index: 70;
}
.span-img-del-loading > .del-span-block {
color: #fff;
font-size: 20px;
font-weight: 500;
margin: 41px 4px 0;
z-index: 70;
}
.single-auth-img-con:hover > .span-img-del-loading {
display: block;
}
.single-title {
font-size: 12px;
color: #666;
text-align: center;
//line-height :14px;
//margin: 10px 0;
}
/*** 资质 样式 end ***/
// 提示语 样式 start // 提示语 样式 start
.tips-text { .tips-text {
font-size: 14px; font-size: 14px;
...@@ -948,13 +1371,23 @@ ...@@ -948,13 +1371,23 @@
.h-warning:before { .h-warning:before {
color: #e3c300; color: #e3c300;
} }
// 提示语样式 end // 提示语样式 end
.btnCen { .btnCen {
/deep/.el-form-item__content { /deep/ .el-form-item__content {
margin-left: 0!important; margin-left: 0 !important;
text-align : center; text-align: center;
//margin-top: 30px; //margin-top: 30px;
} }
} }
/* 预览 资质图片 */
.img-dialog-con >>> .el-dialog__body {
text-align : center;
}
.img-spe {
//width: 80%;
margin: 0 auto;
}
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论