Browse Source

【上传资质】

master
chenshengle 2 years ago
parent
commit
ec645acf00
5 changed files with 673 additions and 2 deletions
  1. +5
    -0
      src/components/layout/topLayout.vue
  2. +271
    -0
      src/components/ttpoiList/addCertification.vue
  3. +377
    -0
      src/components/ttpoiList/list.vue
  4. +15
    -2
      src/router/index.js
  5. +5
    -0
      src/utils/config.js

+ 5
- 0
src/components/layout/topLayout.vue View File

@@ -16,6 +16,7 @@
<el-menu-item index="4">发布列表</el-menu-item>
<el-menu-item index="5">成员管理</el-menu-item>
<el-menu-item index="2">基础设置</el-menu-item>
<el-menu-item index="8">抖音poi</el-menu-item>
</el-menu>
<img class="logout" src="./../../static/images/logout.png" @click="logout" alt="">
</div>
@@ -66,6 +67,10 @@
this.$router.push({
path: "/codesubmit"
});
}else if(key == 8){
this.$router.push({
path: "/ttpoiList"
});
}
},
logout(){


+ 271
- 0
src/components/ttpoiList/addCertification.vue View File

@@ -0,0 +1,271 @@
<template>
<el-form class="demo-ruleForm">
<div class="layout-content">
<div class="edit-item">
<el-form-item label="商铺营业执照路径" label-width="180px">
<el-upload
action="/T/merchantPoi/upload_material"
:data="{appId:appId,materialType:7}"
list-type="picture-card"
:on-success="license"
:on-remove="licenseRemove"
:limit="1"
>
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
</div>

<div class="edit-item">
<el-form-item label="商家授权路径" label-width="180px">
<el-upload
action="/T/merchantPoi/upload_material"
class="upload-demo"
list-type="text"
:data="{appId:appId,materialType:8}"
:on-success="authorization"
:on-remove="authorizationRemove"
:limit="1"
>
<!-- <i class="el-icon-plus"></i> -->
<div slot="tip" class="el-upload__tip">只能上传pdf文件</div>
</el-upload>
</el-form-item>
</div>

<div class="edit-item">
<el-form-item label="商铺行业资质材料信息" label-width="180px">
<el-upload
action="/T/merchantPoi/upload_material"
list-type="picture-card"
:data="{appId:appId,materialType:7}"
:on-success="industry"
:on-remove="industryRemove "
>
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
</div>

<div class="edit-item">
<el-form-item label="过期时间" label-width="180px">
<el-date-picker
v-model="expireTime"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
></el-date-picker>
<samp>(营业执照、合作协议、行业资质材料)中的最早到期时间</samp>
</el-form-item>
</div>

<div class="edit-item">
<el-form-item label="其他补充资质" label-width="180px" >
<el-select v-model="additionalQualType" placeholder="请选择" clearable >
<el-option
v-for="(item,index) in additionalLsit"
:key="index"
:value="item.val"
:label="item.name"
></el-option>
</el-select>
<el-upload
style="margin-top: 10px;"
action="/T/merchantPoi/upload_material"
list-type="picture-card"
:data="{appId:appId,materialType:7}"
:on-success="rests"
:on-remove="restsRemove"
>
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
</div>

<div class="butBox">
<el-button class="save-btn mr_20" type="primary" @click="save">保 存</el-button>
</div>
</div>
</el-form>
</template>


<script>
import { configUrl } from "../../utils/config";
export default {
name: "addCertification",
data() {
return {
appId: "",
expireTime: "",
supplierExtId: "",
additionalQualType:"1",
additionalLsit:[
{
name:"身份证",
val:"1"
},
{
name:"健康证",
val:"2"
}
],
ruleForm: {
bizLicencePath: "",
contractPath: "",
qualMaterial: [],
restsUrlLsit: []
}
};
},
methods: {
licenseRemove(file, fileList) {
//dei商铺营业执照路径
this.ruleForm.bizLicencePath = "";
},

license(file, fileList) {
//add商铺营业执照路径
console.log(file, fileList);
if (file.code == 200) {
this.ruleForm.bizLicencePath = file.data;
} else {
this.$message.error(file.message);
}
},

authorizationRemove(file, fileList) {
//dei商家授权路径
console.log(file, fileList);
this.ruleForm.contractPath = "";
},

authorization(file, fileList) {
//add商家授权路径
console.log(file, fileList);

if (file.code == 200) {
this.ruleForm.contractPath = file.data;
} else {
this.$message.error(file.message);
}
},

industryRemove(file, fileList) {
//dei商铺行业资质材料信息
console.log(file, fileList);
let tempArr = [];
fileList.map(item => {
tempArr.push({ path: item.response.data });
});
this.ruleForm.qualMaterial = [];
},

industry(file, fileList) {
//add商铺行业资质材料信息
console.log(file, fileList);
if (file.code == 200) {
this.ruleForm.qualMaterial.push({ path: file.data });
} else {
this.$message.error(file.message);
}
// this.dialogVisible = true;
},

restsRemove(file, fileList) {
//dei其他补充资质
let tempArr = [];
fileList.map(item => {
tempArr.push({ path: item.response.data });
});
this.ruleForm.restsUrlLsit = [];
console.log(file, fileList);
},

rests(file, fileList) {
//add其他补充资质
console.log(file, fileList);
if (file.code == 200) {
this.ruleForm.restsUrlLsit.push({ path: file.data });
} else {
this.$message.error(file.message);
}
// this.dialogVisible = true;
},

save() {
console.log(this.ruleForm);
if (this.ruleForm.bizLicencePath == "") {
this.$message.error("请上传商铺营业执照路径!");
return;
} else if (this.ruleForm.contractPath == "") {
this.$message.error("请上传商家授权路径!");
return;
} else if (this.expireTime == "") {
this.$message.error("请填写过期时间!");
} else {
let parmer = {};
parmer.bizLicencePath = this.ruleForm.bizLicencePath
parmer.contractPath = this.ruleForm.contractPath
parmer.qualMaterial = JSON.stringify(this.ruleForm.qualMaterial);
console.log(this.ruleForm.qualMaterial);
parmer.additionalQual=[]

parmer.additionalQual.push({
additional_qual_type:this.additionalQualType,
paths:this.ruleForm.restsUrlLsit
})
parmer.additionalQual = JSON.stringify(parmer.additionalQual)
// parmer.restsUrlLsit = JSON.stringify(parmer.restsUrlLsit);
parmer.appId = this.appId;
parmer.supplierExtId = this.supplierExtId;
parmer.expireTime = this.expireTime;
this.postFetch(configUrl.material, parmer).then(res => {
this.$message.success("提交成功!")
this.$router.back(-1)
}).catch(err=>{
this.$message.error(err.message)
})
}
}
},
mounted() {
this.appId = this.$route.query.appId;
this.supplierExtId = this.$route.query.id;
}
};
</script>
<style scoped>
.layout-content {
width: 100%;
background: #ffffff;
padding: 0 20px 20px;
overflow: hidden;
}
.edit-item {
text-align: left;
overflow: hidden;
margin-top: 20px;
}
.btnBox {
background-color: #ffffff;
text-align: center;
}
.save-btn {
width: 108px;
background: RGBA(63, 196, 150, 1);
}
.save-btn:hover {
background: #409ef0;
}
.butBox {
display: flex;
justify-content: center;
}
.upload-demo {
width: 260px;
}
</style>

+ 377
- 0
src/components/ttpoiList/list.vue View File

@@ -0,0 +1,377 @@
<template>
<div>
<div class="layout-content" style="padding-bottom:0;">
<el-form :inline="true" :model="ruleForm" ref="ruleForm" class="demo-form-inline forms">
<el-form-item label="小程序" class="fx_title" v-if="list.length>0">
<el-select v-model="id" placeholder="请选择" @change="setId" clearable>
<el-option
v-for="(item,index) in list"
:key="index"
:value="item.id"
:label="item.name"
></el-option>
</el-select>
</el-form-item>

<el-form-item label="商户名称" class="fx_title">
<el-input
style="width:211px;"
v-model.trim="ruleForm.merchantName"
placeholder="请输入"
clearable
></el-input>
</el-form-item>

<el-form-item
label="poi名称"
prop="type"
class="fx_title"
style="margin-bottom: 0px!important"
>
<el-input
style="width:211px;"
v-model.trim="ruleForm.poiName"
placeholder="请输入"
clearable
></el-input>
</el-form-item>

<el-form-item style="margin-bottom: 0px !important">
<el-button
class="hoverBtn"
type="primary"
icon="el-icon-search"
:style="'border:0;background:'"
size="medium"
@click.stop="search"
></el-button>
</el-form-item>
</el-form>
</div>

<el-dialog title="审核信息" :visible.sync="showBox" v-if="dataObj!={}">
<el-form>
<el-form-item label="营业资质" v-if="dataObj.audit_shop_material">
<span>{{setStatus(dataObj.audit_shop_material.biz_licence.status)}}</span>
<span v-if="dataObj.audit_shop_material.biz_licence.reason">{{dataObj.audit_shop_material.biz_licence.reason}}</span>
</el-form-item>
<el-form-item label="商家授权函" v-if="dataObj.audit_shop_material">
<span>{{setStatus(dataObj.audit_shop_material.contract.status)}}</span>
<span v-if="dataObj.audit_shop_material.contract.reason">{{dataObj.audit_shop_material.contract.reason}}</span>
</el-form-item>
<div v-if="dataObj.audit_shop_material&&dataObj.audit_shop_material.qual_material.length>0">
<el-form-item :label="'商铺行业资质'+(index+1)" v-for="(item ,index) in dataObj.audit_shop_material.qual_material" :key="index">
<span>{{setStatus(item.status)}}</span>
<span v-if="item.reason">{{item.reason}}</span>
</el-form-item>
</div>
</el-form>
<!-- <div slot="footer" class="dialog-footer">
<el-button @click="showBox = false">取 消</el-button>
<el-button type="primary" @click="showBox = false">确 定</el-button>
</div>-->
</el-dialog>

<table-list :ref="tk" :options="optionsTable"></table-list>
</div>
</template>

<script>
import TableList from "../../core/comps/table/tableList.vue";
import { configUrl } from "../../utils/config.js";
import { mapState, mapActions } from "vuex";
// import moment from "moment";
export default {
name: "ttPoi",
components: { TableList },
data() {
return {
tk: "ttPoi",
list: [],
id: "",
tenantId: "",
authorizerAppid: "",
showBox: false,
dataObj: {}, //查询审核状态 返回数据
ruleForm: {
merchantName: "",
poiName: ""
},

optionsTable: {
actions: [
{
key: "edit",
val: "上传",
action: this.goAdd
// show: item => {
// //不是正在合作 是自己的
// // if (item.type != 2 && item.ownerInfo != undefined) {
// if (item.type != 2) {
// return true;
// }
// return false;
// }
},
{
key: "edit",
val: "查询审核状态",
action: this.inquireStatus,
show: item => {
if (item.bizLicencePath != "") {
return true;
}
return false;
}
}
],
showCk: false,
map: [
{ key: "supplierExtId", val: "商户ID" },
{ key: "merchantName", val: "商户名称" },
{ key: "longitude", val: "经度" },
{ key: "latitude", val: "纬度" },

{ key: "poiId", val: "已匹配PoiId" },
{ key: "poiName", val: "已匹配Poi名称" },
{ key: "province", val: "已匹配Poi省份" },
{ key: "city", val: "已匹配Poi城市" },
{ key: "address", val: "已匹配Poi地址" }
],
getUrl: () => {
let str = `/T/merchantPoi/list?merchantName=${
this.ruleForm.merchantName
}&poiName=${this.ruleForm.poiName}&tenantId=${this.tenantId}`;

return str;
},
pageOption: {
sizeKey: "pageSize",
indexKey: "pageNum",
index: 1,
size: 10
},
analysis: data => {
return {
//aaa
data: data.data.list,
count: data.data.total
};
}
}
};
},
computed: {
...mapState({
topNav: state => state.topNav.data, //
//新增computed属性
navigationInfo: state => state.topNav.navigationInfo
})
},
watch: {},
methods: {
...mapActions([
"setIndex" // 将this.setNavData 映射为 this.$store.dispatch('setNavData')
]),

// dealBrandName(row, item) {
// // return item.brand[row.key];
// return item.brand.name;
// },
//
setStatus(status){
if(status==1){
return "审核中"
}else if(status==2){
return "审核成功"
}else if(status==3){
return "审核失败"
}
},
setId(e) {
let obj = this.list.filter(item => {
return item.id === e;
})[0];

this.authorizerAppid = obj.authorizerAppid;
this.tenantId = obj.tenantId;
console.log(this.authorizerAppid, this.tenantId);
},
getLsit() {
this.getFetch(
configUrl.weappList + `?type=2&name=&pageNum=1&pageSize=100`
).then(res => {
console.log(res.data);
this.list = res.data.list;
this.id = res.data.list[0].id;
});
},
goAdd(row, item) {
this.$router.push({
path: "/addCertification",
query: {
appId: this.authorizerAppid,
id: row.id
}
});
},

inquireStatus(row, item) {
this.getFetch(
configUrl.queryMeaterial + `?appId=${this.authorizerAppid}&id=${row.id}`
).then(res => {
this.dataObj = JSON.parse(res.data).data;
this.showBox = true;
console.log(this.dataObj);
});
},

search: function() {
let tk = this.$refs[this.tk];
tk.search(tk.getParams().index);
}
},
activated() {},
created() {
this.setIndex("8");
},
mounted() {
this.search();
this.getLsit();
}
};
</script>

<style scoped>
.el-select-dropdown__item {
display: block;
}
.forms {
background: #f5f7f8;
text-align: left;
padding: 25px 22px 22px;
margin-bottom: 20px !important;
}
.layout-content {
width: 100%;
height: auto;
/* min-height: 300px; */
/* background: #141e29; */
border-radius: 2px;

overflow: hidden;
text-align: left;
}
.demo-form-inline {
background: #f5f7f8;
text-align: left;
padding: 25px 22px 0;
margin-bottom: 20px !important;
}
.tableContainer {
margin-top: 20px !important;
background: #fff;
}
.el-button {
width: 60px;
height: 40px;
}
.builtBtn {
width: 100px;
height: 32px;
background: rgba(81, 169, 201, 1);
border: 0 !important;
line-height: 32px;
text-align: center;
margin: 0;
padding: 0 !important;
}
.builtBtn i {
margin-right: 10px;
}
.builtBtn:hover {
background: rgba(81, 169, 201, 0.88);
}
.fx_title .el-input {
width: 150px;
}
.fx_dialog_setrole .el-dialog .el-dialog__header .el-dialog__title {
font-size: 25px;
color: #555555;
}
.edit-item label {
width: 80px;
float: left;
text-align: right;
margin-left: 10px;
font-size: 14px;
font-weight: normal;
color: #555555;
}
.edit-item-input {
width: 230px;
}
.edit-item label.name {
padding-top: 10px;
}
.el-form-item__content {
text-align: left;
}
.edit-item-box {
margin-left: 100px;
color: #555555;
overflow: hidden;
}
.edit-box .edit-item {
margin-bottom: 22px;
}
.el-dialog {
border-radius: 6px !important;
}
.edit-item-box input {
width: 169px;
height: 40px;
font-size: 14px;
display: block;
border-radius: 4px;
border: 1px solid #e1e6ea;
text-indent: 1em;
outline: none;
}
.group-btn {
text-align: center;
padding-bottom: 20px;
}
.group-btn .draftBtn,
.group-btn .putinBtn {
width: 100px;
height: 40px;
line-height: 16px;
font-size: 14px;
border-radius: 3px;
display: inline-block;
cursor: pointer;
}
.group-btn .draftBtn {
margin-left: 10px;
border: 1px solid #e1e6ea;
color: #555555;
}
.group-btn .putinBtn {
margin-right: 10px;
background: rgb(212, 35, 122);
color: #ffffff;
}
.my-upload-wrap {
display: inline-block;
}
.my-upload-wrap /deep/ .el-upload__input {
display: none;
}
.display_inline_block {
display: inline-block;
width: 80px;
}
</style>

+ 15
- 2
src/router/index.js View File

@@ -71,11 +71,24 @@ export default new Router({
component: r => require.ensure([], () => r(require('../components/release/list.vue')), 'release')
},
// 成员管理
{
{
path: '/member',
name: 'member',
component: r => require.ensure([], () => r(require('../components/member/list.vue')), 'member')
}
},
// 抖音poi
{
path: '/ttpoiList',
name: 'ttpoiList',
component: r => require.ensure([], () => r(require('../components/ttpoiList/list.vue')), 'ttpoiList')
},
// 抖音poi添加资质
{
path: '/addCertification',
name: 'addCertification',
component: r => require.ensure([], () => r(require('../components/ttpoiList/addCertification.vue')), 'addCertification')
},
]
},



+ 5
- 0
src/utils/config.js View File

@@ -1,5 +1,10 @@

export let configUrl = {
//查询审核状态
queryMeaterial :"/T/merchantPoi/query_shop_meaterial",

//上传资料
material:"/T/merchantPoi/add_shop_material",
//登录
doLogin:"/T/doLogin",
//获得后端版本号


Loading…
Cancel
Save