Commit f6d1a6db authored by 罗超's avatar 罗超

1

parent 1da1bec1
<template>
<div v-loading="pageloading" class="editVehicle">
<div class="head-title">
<span @click="CommonJump('VehicleManagement')" class="blue point">载体管理</span> / 编辑载体
<span @click="CommonJump('VehicleManagement')" class="blue point"
>载体管理</span
>
/ 编辑载体
</div>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px">
<el-card shadow="never" style="margin-top:10px" class="box-card">
<el-card shadow="never" style="margin-top: 10px" class="box-card">
<el-form-item label="项目名称" prop="CarrierName">
<el-input v-model="addMsg.CarrierName" style="width:690px" placeholder="请输入项目名称" size="small">
<el-input
v-model="addMsg.CarrierName"
style="width: 690px"
placeholder="请输入项目名称"
size="small"
>
</el-input>
</el-form-item>
<el-form-item label="Logo" prop="Logo">
<div>
<el-tooltip class="item" effect="dark" content="建议尺寸:88*88" placement="top-start">
<el-button size="small" @click="choicImg=true,type=1">选择文件</el-button>
<el-tooltip
class="item"
effect="dark"
content="建议尺寸:88*88"
placement="top-start"
>
<el-button size="small" @click="(choicImg = true), (type = 1)"
>选择文件</el-button
>
</el-tooltip>
</div>
<div class="editIconImg">
<el-image style="width: 80px;height:80px;" v-if="addMsg.Logo" :src="addMsg.Logo"
:preview-src-list="LogoList">
<el-image
style="width: 80px; height: 80px"
v-if="addMsg.Logo"
:src="addMsg.Logo"
:preview-src-list="LogoList"
>
</el-image>
<img v-else src="../../assets/img/default.png" alt="" />
<img
v-else
style="width: 80px; height: 80px"
src="../../assets/img/default.png"
alt=""
/>
</div>
</el-form-item>
<el-form-item label="介绍图(多张)" class="is-required">
<div class="nav_Main">
<div class="nav_IconContent">
<draggable v-model="introImgList">
<div v-for="(item, index) in introImgList" :key="index+'2'"
style="margin-right: 20px; position: relative;display:inline-block; ">
<el-image style="width: 100px;height:100px;" :src="item" :preview-src-list="introImgList">
<div
v-for="(item, index) in introImgList"
:key="index + '2'"
style="
margin-right: 20px;
position: relative;
display: inline-block;
"
>
<el-image
style="width: 100px; height: 100px"
:src="item"
:preview-src-list="introImgList"
>
</el-image>
<el-button
@click="ClearCarouse(index)"
class="delBtn"
type="danger"
icon="el-icon-close"
circle
>
</el-button>
</div>
</draggable>
</div>
<div
@click="(choicImg = true), (type = 2)"
class="add-image-btn 2222"
>
+ 添加图片
</div>
</div>
</el-form-item>
<el-form-item label="荣誉徽章" class="is-required">
<div class="nav_Main">
<div class="nav_IconContent">
<draggable v-model="addMsg.HonorList">
<div
v-for="(item, index) in addMsg.HonorList"
:key="index + '2'"
style="
margin-right: 20px;
position: relative;
display: inline-block;
"
>
<el-image
style="width: 100px; height: 100px"
:src="item"
:preview-src-list="addMsg.HonorList"
>
</el-image>
<el-button @click="ClearCarouse(index)" class="delBtn" type="danger" icon="el-icon-close" circle>
<el-button
@click="ClearCarouse(index)"
class="delBtn"
type="danger"
icon="el-icon-close"
circle
>
</el-button>
</div>
</draggable>
</div>
<div @click="choicImg=true,type=2" class="add-image-btn 2222">
<div
@click="(choicImg = true), (type = 3)"
class="add-image-btn 2222"
>
+ 添加图片
</div>
</div>
</el-form-item>
<el-form-item label="开发商" prop="Developers">
<el-input v-model="addMsg.Developers" style="width:690px" size="small" placeholder="请输入开发商"></el-input>
<el-input
v-model="addMsg.Developers"
style="width: 690px"
size="small"
placeholder="请输入开发商"
></el-input>
</el-form-item>
<el-form-item label="首店数量" prop="Developers">
<div
style="width: 690px; display: flex"
v-for="(item, index) in addMsg.HonorList"
>
<el-select
v-model="item.Id"
filterable
size="small"
placeholder="请选择"
>
<el-option
v-for="item in shenList"
:key="item.Id"
:label="item.Name"
:value="item.Id"
>
</el-option>
</el-select>
<el-input
v-model="item.Num"
size="small"
placeholder="首店数量"
></el-input>
</div>
</el-form-item>
<el-form-item label="载体视频">
<el-input v-model="addMsg.VideoUrl" style="width:690px" size="small" placeholder="请输入载体视频">
<el-button @click="changeState1 = true" slot="append">添加视频</el-button>
<el-input
v-model="addMsg.VideoUrl"
style="width: 690px"
size="small"
placeholder="请输入载体视频"
>
<el-button @click="changeState1 = true" slot="append"
>添加视频</el-button
>
</el-input>
<div>
<a v-if="addMsg.VideoUrl != ''" class="blue noline" :href="addMsg.VideoUrl" target="_blank">视频链接</a>
<a
v-if="addMsg.VideoUrl != ''"
class="blue noline"
:href="addMsg.VideoUrl"
target="_blank"
>视频链接</a
>
</div>
</el-form-item>
<el-form-item label="项目地址">
<el-input v-model="addMsg.Address" style="width:690px" size="small" placeholder="请输入项目地址"></el-input>
<el-input
v-model="addMsg.Address"
style="width: 690px"
size="small"
placeholder="请输入项目地址"
></el-input>
</el-form-item>
<el-form-item label="经纬度" style="margin-top: 15px;" size="small">
<el-input v-model="addMsg.LatAndLon" style="width:690px" :disabled="true">
<el-button @click="isShowMap = true" slot="append">展开地图</el-button>
<el-form-item label="经纬度" style="margin-top: 15px" size="small">
<el-input
v-model="addMsg.LatAndLon"
style="width: 690px"
:disabled="true"
>
<el-button @click="isShowMap = true" slot="append"
>展开地图</el-button
>
</el-input>
</el-form-item>
<el-form-item label="开业时间">
<el-date-picker v-model="addMsg.OpenTime" clearable value-format="yyyy-MM-dd HH:mm:ss" size="small"
type="datetime" placeholder="选择开业时间">
<el-date-picker
v-model="addMsg.OpenTime"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
size="small"
type="datetime"
placeholder="选择开业时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="项目类型" prop="ProjectType">
<el-select style="width:220px;" v-model="addMsg.ProjectType" size="small" placeholder="请选择">
<el-option v-for="item in ProjectTypeList" :key="item.Id" :label="item.Name" :value="item.Id">
<el-select
style="width: 220px"
v-model="addMsg.ProjectType"
size="small"
placeholder="请选择"
>
<el-option
v-for="item in ProjectTypeList"
:key="item.Id"
:label="item.Name"
:value="item.Id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="店铺数量">
<el-input
v-model="addMsg.ShopNum"
type="number"
style="width: 690px"
size="small"
placeholder="请输入店铺数量"
>
</el-input>
</el-form-item>
<el-form-item label="经营面积">
<el-input
v-model="addMsg.BuiltUpArea"
type="number"
style="width: 690px"
size="small"
placeholder="请输入经营面积"
>
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="可租赁面积">
<el-input
v-model="addMsg.AreaRequirement"
type="number"
style="width: 690px"
size="small"
placeholder="请输入可租赁面积"
>
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="去年业绩">
<el-input
v-model="addMsg.YeJi"
type="number"
style="width: 690px"
size="small"
placeholder="请输入去年业绩"
>
</el-input>
</el-form-item>
<el-form-item label="商业体量">
<el-input v-model="addMsg.CarrierSize" style="width:690px" size="small" placeholder="请输入商业体量">
<el-input
v-model="addMsg.CarrierSize"
style="width: 690px"
size="small"
placeholder="请输入商业体量"
>
<template slot="append">万平方米</template>
</el-input>
</el-form-item>
<el-form-item label="商业层数">
<el-input v-model="addMsg.LayersNum" style="width:690px" size="small" placeholder="请输入商业层数">
<el-input
v-model="addMsg.LayersNum"
style="width: 690px"
size="small"
placeholder="请输入商业层数"
>
</el-input>
</el-form-item>
<el-form-item label="车位数量">
<el-input v-model="addMsg.CarNum" @keyup.native="checkInteger(addMsg,'CarNum')" style="width:690px"
size="small" placeholder="请输入车位数量">
<el-input
v-model="addMsg.CarNum"
@keyup.native="checkInteger(addMsg, 'CarNum')"
style="width: 690px"
size="small"
placeholder="请输入车位数量"
>
</el-input>
</el-form-item>
<el-form-item label="业态规则">
<el-input v-model="addMsg.CarrierPlan" style="width:690px" size="small" placeholder="请输入业态规则">
<el-input
v-model="addMsg.CarrierPlan"
style="width: 690px"
size="small"
placeholder="请输入业态规则"
>
</el-input>
</el-form-item>
<el-form-item label="招引目标">
<el-input v-model="addMsg.CarrierTarget" style="width:690px" size="small" placeholder="请输入招引目标">
<el-input
v-model="addMsg.CarrierTarget"
style="width: 690px"
size="small"
placeholder="请输入招引目标"
>
</el-input>
</el-form-item>
<el-form-item label="总体定位">
<el-input v-model="addMsg.Location" style="width:690px" size="small" placeholder="请输入总体定位">
<el-input
v-model="addMsg.Location"
style="width: 690px"
size="small"
placeholder="请输入总体定位"
>
</el-input>
</el-form-item>
<el-form-item label="目标人群">
<el-input v-model="addMsg.Crowd" style="width:690px" size="small" placeholder="请输入目标人群">
<el-input
v-model="addMsg.Crowd"
style="width: 690px"
size="small"
placeholder="请输入目标人群"
>
</el-input>
</el-form-item>
<el-form-item label="招引优惠政策">
<el-input
v-model="addMsg.Discount"
style="width: 690px"
size="small"
placeholder="请输入招引优惠政策"
>
</el-input>
</el-form-item>
<el-form-item label="首发、首秀、首展的招引优惠政策">
<el-input
v-model="addMsg.StartingInfo"
style="width: 690px"
size="small"
placeholder="请输入首发、首秀、首展的招引优惠政策"
>
</el-input>
</el-form-item>
<el-form-item label="地铁信息">
<div v-for="(item,index) in MetroList" :key="index" style="position:relative;width:690px;">
<el-input v-model="item.MetroNum" @keyup.native="checkInteger(item,'MetroNum')" style="width:200px"
size="small" placeholder="地铁线路" />
<el-input v-model="item.MetroName" style="width:200px" size="small" placeholder="站点名称" />
<el-input v-model="item.Distance" style="width:200px" size="small" placeholder="距离" />
<el-button @click="delCarrier(index)" class="delCarrClose" type="danger" icon="el-icon-close" circle>
<div
v-for="(item, index) in MetroList"
:key="index"
style="position: relative; width: 690px"
>
<el-input
v-model="item.MetroNum"
@keyup.native="checkInteger(item, 'MetroNum')"
style="width: 200px"
size="small"
placeholder="地铁线路"
/>
<el-input
v-model="item.MetroName"
style="width: 200px"
size="small"
placeholder="站点名称"
/>
<el-input
v-model="item.Distance"
style="width: 200px"
size="small"
placeholder="距离"
/>
<el-button
@click="delCarrier(index)"
class="delCarrClose"
type="danger"
icon="el-icon-close"
circle
>
</el-button>
</div>
<el-button type="primary" @click="addMetroList" icon="el-icon-plus" circle></el-button>
<el-button
type="primary"
@click="addMetroList"
icon="el-icon-plus"
circle
></el-button>
</el-form-item>
</el-card>
</el-form>
<div style="padding:20px;background:#fff;margin-top:10px">
<el-button @click="Save('addMsg')" size="small" type="primary">保存</el-button>
<div style="padding: 20px; background: #fff; margin-top: 10px">
<el-button @click="Save('addMsg')" size="small" type="primary"
>保存</el-button
>
</div>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
......@@ -128,76 +408,100 @@
<el-dialog title="地图展示" :visible.sync="isShowMap" width="960px">
<commonMap @map-submit="mapEvent"></commonMap>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
import commonMap from "@/components/common/commonMap.vue";
import draggable from "vuedraggable"
import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
import commonMap from "@/components/common/commonMap.vue";
import draggable from "vuedraggable";
export default {
export default {
name: "editVehicle",
data() {
let validataType = (rule, value, callback) => {
if (this.addMsg.ProjectType == 0) {
return callback(new Error('请选择项目类型'));
return callback(new Error("请选择项目类型"));
} else {
callback();
}
}
};
let validataLogo = (rule, value, callback) => {
if (this.addMsg.Logo == '') {
return callback(new Error('请上传Logo'));
if (this.addMsg.Logo == "") {
return callback(new Error("请上传Logo"));
} else {
callback();
}
}
};
return {
pageloading: false,
addMsg: {
ID: 0,
CarrierName: '', // 载体名称
Logo: '',
CarrierName: "", // 载体名称
Logo: "",
BannerList: [], //载体介绍图
VideoUrl: '', //载体视频
Address: '', //载体地址
LatAndLon: '', //载体地址经纬度
Developers: '', //开发商
OpenTime: '', //开业时间
VideoUrl: "", //载体视频
Address: "", //载体地址
LatAndLon: "", //载体地址经纬度
Developers: "", //开发商
OpenTime: "", //开业时间
ProjectType: 0, //项目类型
CarrierSize: 0, //商业体量
LayersNum: '', //商业层数
LayersNum: "", //商业层数
CarNum: 0, //车位数量
CarrierPlan: '', //业态规划
CarrierTarget: '', //招引目标
Location: '', //定位
Crowd: '', //目标人群
CarrierMetroList: [] //地铁信息
CarrierPlan: "", //业态规划
CarrierTarget: "", //招引目标
Location: "", //定位
Crowd: "", //目标人群
CarrierMetroList: [], //地铁信息
FirstShopNumList: [
//载体类型、数量
{
Id: 0,
Name: "",
Num: 0,
},
],
HonorList: [], //载体荣誉
Discount: "", //招引优惠政策
StartingInfo: "", //首发政策
FirstShow: "", //首秀政策
FirstExhibition: "", //首展政策
ShopNum: "", //店铺数量
BuiltUpArea: "", //经营面积
AreaRequirement: "", //可租赁面积
YeJi: "", //去年业绩
},
rules: {
CarrierName: [{
CarrierName: [
{
required: true,
message: '请输入载体名称',
trigger: 'blur'
}],
Developers: [{
message: "请输入载体名称",
trigger: "blur",
},
],
Developers: [
{
required: true,
message: '请输入开发商',
trigger: 'blur'
}],
ProjectType: [{
message: "请输入开发商",
trigger: "blur",
},
],
ProjectType: [
{
required: true,
validator: validataType,
trigger: 'change'
}],
Logo: [{
trigger: "change",
},
],
Logo: [
{
required: true,
validator: validataLogo,
trigger: 'change'
}]
trigger: "change",
},
],
},
ID: 0,
type: -1,
......@@ -208,42 +512,44 @@
ProjectTypeList: [], //项目类型数组
introImgList: [], //介绍图
LogoList: [],
}
shenList: [],
};
},
components: {
ChooseImg,
Choosevideo,
commonMap,
draggable
draggable,
},
created() {
if (this.$route.query.ID) {
this.ID = this.$route.query.ID;
this.getData()
this.getData();
}
this.getTypeEnumList();
this.GetAuthenticationCategoryEnumList();
},
methods: {
//获取项目类型
getTypeEnumList() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, res => {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.ProjectTypeList = res.data.data;
let obj = {
Name: '不限',
Id: 0
}
Name: "不限",
Id: 0,
};
this.ProjectTypeList.unshift(obj);
}
})
});
},
//新增地铁信息
addMetroList() {
let obj = {
MetroNum: '',
MetroName: '',
Distance: ''
}
MetroNum: "",
MetroName: "",
Distance: "",
};
this.MetroList.push(obj);
},
//删除地铁信息
......@@ -255,12 +561,12 @@
if (valid) {
if (this.MetroList.length > 0) {
for (var i = 0; i < this.MetroList.length; i++) {
if (this.MetroList[i].MetroNum == '') {
this.Error(`请填写第地铁信息${i+1}行地铁线路`);
if (this.MetroList[i].MetroNum == "") {
this.Error(`请填写第地铁信息${i + 1}行地铁线路`);
return;
}
if (this.MetroList[i].MetroName == '') {
this.Error(`请填写第地铁信息${i+1}行站点名称`);
if (this.MetroList[i].MetroName == "") {
this.Error(`请填写第地铁信息${i + 1}行站点名称`);
return;
}
}
......@@ -271,11 +577,13 @@
// }
this.addMsg.CarrierMetroList = this.MetroList;
this.addMsg.BannerList = this.introImgList;
this.apipost('/api/Trade/GetSetCarrier', this.addMsg,
res => {
this.apipost(
"/api/Trade/GetSetCarrier",
this.addMsg,
(res) => {
if (res.data.resultCode === 1) {
this.CommonJump('VehicleManagement')
this.Success(res.data.message)
this.CommonJump("VehicleManagement");
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
......@@ -290,28 +598,38 @@
getData() {
this.pageloading = true;
this.apipost("/api/Trade/GetCarrierDetails", {
ID: this.ID
}, res => {
this.apipost(
"/api/Trade/GetCarrierDetails",
{
ID: this.ID,
},
(res) => {
this.pageloading = false;
if (res.data.resultCode == 1) {
let data = res.data.data
let data = res.data.data;
this.addMsg = res.data.data;
if (res.data.data.CarrierMetroList && res.data.data.CarrierMetroList.length > 0) {
this.MetroList = res.data.data.CarrierMetroList
if (
res.data.data.CarrierMetroList &&
res.data.data.CarrierMetroList.length > 0
) {
this.MetroList = res.data.data.CarrierMetroList;
}
if (res.data.data.BannerList && res.data.data.BannerList.length > 0) {
this.introImgList = res.data.data.BannerList
if (
res.data.data.BannerList &&
res.data.data.BannerList.length > 0
) {
this.introImgList = res.data.data.BannerList;
}
if (res.data.data.OpenTime) {
this.addMsg.OpenTime = this.addMsg.OpenTime.replace('T', ' ');
this.addMsg.OpenTime = this.addMsg.OpenTime.replace("T", " ");
}
this.LogoList = [];
this.LogoList.push(this.addMsg.Logo);
} else {
this.Error(res.data.message);
}
})
}
);
},
//选择图片
SelectId(msg) {
......@@ -321,10 +639,18 @@
if (this.type == 2) {
this.introImgList.push(msg.url);
}
if (this.type == 3) {
this.addMsg.HonorList.push(msg.url);
}
this.choicImg = false;
},
ClearCarouse(index) {
if (this.type == 2) {
this.introImgList.splice(index, 1);
}
if (this.type == 3) {
this.addMsg.HonorList.splice(index, 1);
}
},
Selectvideo(val) {
this.addMsg.VideoUrl = val.Path;
......@@ -332,29 +658,39 @@
},
//得到地图信息
mapEvent(e) {
this.addMsg.LatAndLon = e.lat + ',' + e.long;
this.addMsg.LatAndLon = e.lat + "," + e.long;
// this.addMsg.Address = e.Address;
this.isShowMap = false;
},
//获取首店类别
GetAuthenticationCategoryEnumList() {
this.apipost(
"/api/AppletTrade/GetAuthenticationCategoryEnumList",
{ Name: "", Id: "" },
(res) => {
if (res.resultCode == 1) {
this.shenList = res.data;
}
}
);
},
};
},
};
</script>
<style>
.editVehicle .content {
.editVehicle .content {
background: #fff;
margin-top: 10px;
box-sizing: border-box;
}
}
.editVehicle .editIconImg {
.editVehicle .editIconImg {
width: 80px;
height: 80px;
}
}
.editVehicle .add-image-btn {
.editVehicle .add-image-btn {
width: 100px;
height: 100px;
line-height: 100px;
......@@ -362,45 +698,43 @@
border: 1px solid #e2e2e2;
cursor: pointer;
text-align: center;
}
}
.editVehicle .nav_Main {
.editVehicle .nav_Main {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
}
.editVehicle .nav_IconContent {
.editVehicle .nav_IconContent {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
}
/* .editVehicle .nav_IconContent div>div {
/* .editVehicle .nav_IconContent div>div {
display: inline-block;
} */
.editVehicle .colapp-image {
.editVehicle .colapp-image {
background-size: cover;
background-position: center center;
width: 100px;
height: 100px;
border-radius: 0%;
}
}
.editVehicle .delBtn {
.editVehicle .delBtn {
position: absolute;
right: -8px;
top: -8px;
padding: 4px 4px !important;
}
}
.delCarrClose {
.delCarrClose {
position: absolute;
right: 53px;
top: 8px;
padding: 4px 4px !important;
}
}
</style>
<template>
<div class="firstStoreApply">
<div class="head-title" >
<div class="head-title">
首店申请
<div style="float:right;margin-top:-5px">
<el-button type="primary" size="small" @click="batchadopt(1)">审核通过</el-button>
<el-button type="primary" size="small" @click="batchadopt(2)">审核拒绝</el-button>
<div style="float: right; margin-top: -5px">
<el-button type="primary" size="small" @click="batchadopt(1)"
>审核通过</el-button
>
<el-button type="primary" size="small" @click="batchadopt(2)"
>审核拒绝</el-button
>
<el-button style="" size="small" type="primary" @click="Export()">
下载excel
</el-button>
</div>
</div>
<div class="content">
<div>
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:225px;height:30px" placeholder="首店名称" v-model="msg.Name" size="small"
clearable>
<div class="searchInput" style="width: 250px">
<el-input
@keyup.enter.native="(msg.pageIndex = 1), getList()"
@clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px"
placeholder="首店名称"
v-model="msg.Name"
size="small"
clearable
>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
<span
@click="(msg.pageIndex = 1), getList()"
class="el-icon-search"
style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"
></span>
</div>
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:225px;height:30px" placeholder="联系人" v-model="msg.Contact" size="small"
clearable>
<div class="searchInput" style="width: 250px">
<el-input
@keyup.enter.native="(msg.pageIndex = 1), getList()"
@clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px"
placeholder="联系人"
v-model="msg.Contact"
size="small"
clearable
>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
<span
@click="(msg.pageIndex = 1), getList()"
class="el-icon-search"
style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"
></span>
</div>
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:225px;height:30px" placeholder="联系电话" v-model="msg.ContactMobile"
size="small" clearable>
<div class="searchInput" style="width: 250px">
<el-input
@keyup.enter.native="(msg.pageIndex = 1), getList()"
@clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px"
placeholder="联系电话"
v-model="msg.ContactMobile"
size="small"
clearable
>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
<span
@click="(msg.pageIndex = 1), getList()"
class="el-icon-search"
style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"
></span>
</div>
<el-date-picker class="indataPicker" type="daterange" v-model="dateStr" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" size="small" @change="getList" value-format="yyyy-MM-dd">
<el-date-picker
class="indataPicker"
type="daterange"
v-model="dateStr"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
size="small"
@change="getList"
value-format="yyyy-MM-dd"
>
</el-date-picker>
<el-select class="w100" @change="getList()" style="margin-left: 10px;" v-model="msg.AuditState" size="small"
placeholder="请选择">
<el-select
class="w100"
@change="getList()"
style="margin-left: 10px"
v-model="msg.AuditState"
size="small"
placeholder="请选择"
>
<el-option label="不限" :value="0"></el-option>
<el-option label="未审核" :value="1"></el-option>
<el-option label="审核通过" :value="2"></el-option>
<el-option label="审核不通过" :value="3"></el-option>
</el-select>
</div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%;margin:20px 0" @selection-change="handleSelectionChange">
<el-table
:data="tableData"
v-loading="loading"
border
style="width: 100%; margin: 20px 0"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
:selectable="checkSelectable"
width="55"></el-table-column>
width="55"
></el-table-column>
<el-table-column prop="Name" width="200" label="首店名称">
</el-table-column>
<el-table-column prop="CoverImage" label="封面图" width="150">
<template slot-scope="scope">
<el-image title="点击查看大图" style="width:60px;" :src="scope.row.CoverImage"
:preview-src-list="scope.row.ImageList"></el-image>
<el-image
title="点击查看大图"
style="width: 60px"
:src="scope.row.CoverImage"
:preview-src-list="scope.row.ImageList"
></el-image>
</template>
</el-table-column>
<el-table-column prop="TypeName" width="100" label="类型">
......@@ -69,97 +140,235 @@
</el-table-column>
<el-table-column prop="AuditState" width="100" label="审核状态">
<template slot-scope="scope">
<span v-if="scope.row.AuditState==1" style="color:#1273bc;">未审核</span>
<span v-if="scope.row.AuditState==2" style="color:green;">审核通过</span>
<span v-if="scope.row.AuditState==3" style="color:#e95252;">审核不通过</span>
<span v-if="scope.row.AuditState == 1" style="color: #1273bc"
>未审核</span
>
<span v-if="scope.row.AuditState == 2" style="color: green"
>审核通过</span
>
<span v-if="scope.row.AuditState == 3" style="color: #e95252"
>审核不通过</span
>
</template>
</el-table-column>
<el-table-column prop="AuditDate" width="200" label="审核时间">
</el-table-column>
<el-table-column prop="Contact" label="联系人">
</el-table-column>
<el-table-column prop="Contact" label="联系人"> </el-table-column>
<el-table-column prop="ContactMobile" label="联系电话">
</el-table-column>
<el-table-column label="操作" width="130">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="详情" placement="top">
<img @click="CommonJump('firstStoreDetail',{ID:scope.row.Id})"
src="../../assets/img/userman/icon-show.png" alt="">
<el-tooltip
class="item"
effect="dark"
content="详情"
placement="top"
>
<img
@click="CommonJump('firstStoreDetail', { ID: scope.row.Id })"
src="../../assets/img/userman/icon-show.png"
alt=""
/>
</el-tooltip>
<template v-if="scope.row.AuditState==1">
<el-tooltip class="item" effect="dark" content="审核通过" placement="top">
<img @click="AuditStore(scope.row.Id)" src="../../assets/img/userman/pass.png" alt="">
<template v-if="scope.row.AuditState == 1">
<el-tooltip
class="item"
effect="dark"
content="审核通过"
placement="top"
>
<img
@click="AuditStore(scope.row.Id)"
src="../../assets/img/userman/pass.png"
alt=""
/>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="审核拒绝" placement="top">
<img @click="AuditJujue(scope.row.Id)" src="../../assets/img/userman/nopass.png" alt="">
<el-tooltip
class="item"
effect="dark"
content="审核拒绝"
placement="top"
>
<img
@click="AuditJujue(scope.row.Id)"
src="../../assets/img/userman/nopass.png"
alt=""
/>
</el-tooltip>
</template>
<el-tooltip
class="item"
effect="dark"
content="选择奖章"
placement="top"
v-if="scope.row.AuditState == 2 && scope.row.ExistBrandId > 0"
>
<img
@click="showMedalDialog(scope.row)"
src="../../assets/img/userman/detail1.png"
alt=""
/>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
:current-page.sync="msg.pageIndex" layout="total,prev, pager, next" :total="total">
<el-pagination
style="text-align: right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
:current-page.sync="msg.pageIndex"
layout="total,prev, pager, next"
:total="total"
>
</el-pagination>
</div>
<el-dialog title="审核拒绝" :visible.sync="resondialog" width="600px">
<el-form label-width="80px">
<el-form-item label="拒绝原因" class="is-required">
<el-input type="textarea" :rows="6" v-model="auditMsg.AuditRemark"></el-input>
<el-input
type="textarea"
:rows="6"
v-model="auditMsg.AuditRemark"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="resondialog = false">取 消</el-button>
<el-button @click="sureJujue" size="small" type="primary">确 定</el-button>
<el-button @click="sureJujue" size="small" type="primary"
>确 定</el-button
>
</span>
</el-dialog>
<el-dialog title="审核拒绝" :visible.sync="resondialog2" width="600px">
<el-form label-width="80px">
<el-form-item label="拒绝原因" class="is-required">
<el-input type="textarea" :rows="6" v-model="batchmsg.AuditRemark"></el-input>
<el-input
type="textarea"
:rows="6"
v-model="batchmsg.AuditRemark"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="resondialog2 = false">取 消</el-button>
<el-button @click="BatchAuthenticationAudit(1)" size="small" type="primary">确 定</el-button>
<el-button
@click="BatchAuthenticationAudit(1)"
size="small"
type="primary"
>确 定</el-button
>
</span>
</el-dialog>
<el-dialog title="选择奖章" :visible.sync="Medaldialog" width="800px">
<el-table
:data="prizeList"
border
style="width: 100%; margin: 20px 0"
@selection-change="prizeSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="Name" label="奖项名称"> </el-table-column>
<el-table-column prop="BigIco" width="150" label="大奖章">
<template slot-scope="scope">
<div
class="app-image"
:style="{
backgroundImage: 'url(' + scope.row.BigIco + ')',
backgroundSize: 'cover',
}"
></div>
</template>
</el-table-column>
<el-table-column prop="SmallIco" width="150" label="小奖章">
<template slot-scope="scope">
<div
class="app-image"
:style="{
backgroundImage: 'url(' + scope.row.SmallIco + ')',
backgroundSize: 'cover',
}"
></div>
</template>
</el-table-column>
<el-table-column prop="YearInfo" width="200" label="年份">
</el-table-column>
<!-- <el-table-column prop="BrandCount" width="200" label="关联品牌数量">
<template slot-scope="scope">
<div
@click="jumpBrandList(scope.row)"
style="cursor: pointer; color: red"
>
{{ scope.row.TotalCount }}
</div>
</template>
</el-table-column> -->
</el-table>
<el-pagination
style="text-align: right"
background
@current-change="handlePrizeChange"
:page-size="prizeMsg.pageSize"
:current-page.sync="prizeMsg.pageIndex"
layout="total,prev, pager, next"
:total="prizeTotal"
>
</el-pagination>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="Medaldialog = false">取 消</el-button>
<el-button @click="choosePrize" size="small" type="primary"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
export default {
data() {
return {
msg: {
pageIndex: 1,
pageSize: 15,
Name: '', //首店名称
Contact: '', //联系人
StartTime: '', //开业开始时间
EndTime: '', //开业结束时间
ContactMobile: '', //联系电话
AuditState: 0 //审核状态 1未审核 2审核通过 3审核不通过
Name: "", //首店名称
Contact: "", //联系人
StartTime: "", //开业开始时间
EndTime: "", //开业结束时间
ContactMobile: "", //联系电话
AuditState: 0, //审核状态 1未审核 2审核通过 3审核不通过
},
dateStr: [], //日期
total: 0,
tableData: [], //数据列表
auditMsg: {
AuthenticationId: '',
AuthenticationId: "",
AuditState: 2,
AuditRemark: ''
AuditRemark: "",
},
batchmsg:{
AuthenticationIds:'',
AuditState:2,
AuditRemark:'',
batchmsg: {
AuthenticationIds: "",
AuditState: 2,
AuditRemark: "",
},
choiceList:[],
choiceList: [],
resondialog: false,
resondialog2: false,
Medaldialog: false,
prizeList: [],
prizeTotal: 0,
prizeMsg: {
pageIndex: 1,
pageSize: 10,
Name: "",
},
multipleSelection: [],
currrentId: 0,
};
},
created() {
this.getList();
this.getprizeList();
},
methods: {
getList() {
......@@ -168,39 +377,44 @@
this.msg.StartTime = this.dateStr[0];
this.msg.EndTime = this.dateStr[1];
} else {
this.msg.StartTime = '';
this.msg.EndTime = '';
this.msg.StartTime = "";
this.msg.EndTime = "";
}
this.apipost("/api/Trade/GetAuthenticationPageList", this.msg, res => {
this.apipost("/api/Trade/GetAuthenticationPageList", this.msg, (res) => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let pageData = res.data.data.pageData;
this.tableData = pageData;
}
})
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
handlePrizeChange(val) {
this.prizeMsg.pageIndex = val;
this.getprizeList();
},
//审核通过
AuditStore(Id) {
let that = this;
that.auditMsg.AuthenticationId = Id;
that.auditMsg.AuditRemark = '';
that.auditMsg.AuditRemark = "";
that.auditMsg.AuditState = 2;
that.Confirm("确定审核通过?", function () {
that.apipost(
"/api/Trade/SetAuthenticationAudit", that.auditMsg,
res => {
"/api/Trade/SetAuthenticationAudit",
that.auditMsg,
(res) => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
}
);
});
},
......@@ -208,17 +422,18 @@
this.resondialog = true;
this.auditMsg.AuthenticationId = Id;
this.auditMsg.AuditState = 3;
this.auditMsg.AuditRemark = '';
this.auditMsg.AuditRemark = "";
},
//审核拒绝
sureJujue() {
if(this.auditMsg.AuditRemark==''){
this.Error('请输入拒绝原因');
if (this.auditMsg.AuditRemark == "") {
this.Error("请输入拒绝原因");
return;
}
this.apipost(
"/api/Trade/SetAuthenticationAudit", this.auditMsg,
res => {
"/api/Trade/SetAuthenticationAudit",
this.auditMsg,
(res) => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
......@@ -226,7 +441,7 @@
} else {
this.Error(res.data.message);
}
},
}
);
},
//导出excel
......@@ -240,45 +455,42 @@
"首店申请列表.xls"
);
},
handleSelectionChange(e){
this.choiceList =[]
e.map(x=>{
this.choiceList.push(x.Id)
})
handleSelectionChange(e) {
this.choiceList = [];
e.map((x) => {
this.choiceList.push(x.Id);
});
},
batchadopt(type){
batchadopt(type) {
let that = this;
if(that.choiceList.length==0){
that.Error('请选择要审核的首店')
}else{
that.batchmsg.AuthenticationIds = that.choiceList.join(',');
if (that.choiceList.length == 0) {
that.Error("请选择要审核的首店");
} else {
that.batchmsg.AuthenticationIds = that.choiceList.join(",");
if(type==1){
if (type == 1) {
that.batchmsg.AuditState = 2;
that.batchmsg.AuditRemark = '';
that.batchmsg.AuditRemark = "";
that.Confirm("确定审核通过?", function () {
that.BatchAuthenticationAudit()
that.BatchAuthenticationAudit();
});
}else if(type==2){
} else if (type == 2) {
that.resondialog2 = true;
that.batchmsg.AuditState = 3;
that.batchmsg.AuditRemark = '';
that.batchmsg.AuditRemark = "";
}
}
},
BatchAuthenticationAudit(type=0){
if(type==1 && this.batchmsg.AuditRemark==''){
this.Error('请输入拒绝原因');
BatchAuthenticationAudit(type = 0) {
if (type == 1 && this.batchmsg.AuditRemark == "") {
this.Error("请输入拒绝原因");
return;
}
this.apipost(
"/api/Trade/BatchAuthenticationAudit", this.batchmsg,
res => {
"/api/Trade/BatchAuthenticationAudit",
this.batchmsg,
(res) => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
......@@ -286,32 +498,68 @@
} else {
this.Error(res.data.message);
}
},
}
);
},
checkSelectable(row){//判断是否可以选择
return row.AuditState==1
checkSelectable(row) {
//判断是否可以选择
return row.AuditState == 1;
},
showMedalDialog(item) {
this.Medaldialog = true;
this.currrentId = item.Id;
},
//获取奖章列表
getprizeList() {
this.apipost("/api/Trade/GetPrizePageList", this.prizeMsg, (res) => {
if (res.data.resultCode == 1) {
this.prizeTotal = res.data.data.count;
this.prizeList = res.data.data.pageData;
}
});
},
mounted() {}
prizeSelectionChange(val) {
this.multipleSelection = val;
},
// 选择奖章
choosePrize() {
let ids = this.multipleSelection
.map((e) => {
return e.Id;
})
.toString();
let msg = {
AuthenticationIds: this.currrentId,
SourceIds: ids,
};
this.apipost("/api/trade/SetAuthenticationPrize", msg, (res) => {
if (res.data.resultCode == 1) {
this.Medaldialog = false;
this.$message.Success("操作成功");
} else {
this.$message.Error(res.data.message);
}
});
},
},
mounted() {},
};
</script>
<style>
.firstStoreApply .content .searchInput {
border: 1px solid #DCDFE6;
.firstStoreApply .content .searchInput {
border: 1px solid #dcdfe6;
border-radius: 4px;
}
}
.firstStoreApply .content .searchInput .el-input__inner {
.firstStoreApply .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
}
.firstStoreApply .content .searchInput {
.firstStoreApply .content .searchInput {
line-height: normal;
display: inline-table;
width: 100%;
......@@ -319,13 +567,20 @@
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
}
.firstStoreApply .content {
.firstStoreApply .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
}
.app-image {
background-position: center center;
width: 50px;
height: 50px;
border-radius: 0%;
float: left;
margin-right: 8px;
}
</style>
......@@ -158,9 +158,9 @@
class="is-required"
prop="BigIco"
>
<el-button @click="openImageChoose(1)" size="small"
<!-- <el-button @click="openImageChoose(1)" size="small"
>选择大奖章</el-button
>
> -->
<div
class="app-gallery-item"
style="
......@@ -170,18 +170,30 @@
border: none;
"
>
<img
<!-- <img
v-if="!addMsg.BigIco || addMsg.BigIco == ''"
src="../../assets/img/default.png"
style="width: 80px; height: 80px"
alt=""
/>
<img
/> -->
<!-- <img
v-else
style="width: 80px; height: 80px"
:src="addMsg.BigIco"
alt=""
/>
/> -->
<el-upload
class="avatar-uploader"
action
:show-file-list="false"
:http-request="UploadBig"
>
<i
v-if="!addMsg.BigIco || addMsg.BigIco == ''"
class="el-icon-plus avatar-uploader-icon"
></i>
<img v-else :src="addMsg.BigIco" class="avatar" />
</el-upload>
</div>
</el-form-item>
<el-form-item
......@@ -190,9 +202,9 @@
class="is-required"
prop="SmallIco"
>
<el-button @click="openImageChoose(2)" size="small"
<!-- <el-button @click="openImageChoose(2)" size="small"
>选择小奖章</el-button
>
> -->
<div
class="app-gallery-item"
style="
......@@ -202,7 +214,7 @@
border: none;
"
>
<img
<!-- <img
v-if="!addMsg.SmallIco || addMsg.SmallIco == ''"
src="../../assets/img/default.png"
style="width: 80px; height: 80px"
......@@ -213,7 +225,19 @@
style="width: 80px; height: 80px"
:src="addMsg.SmallIco"
alt=""
/>
/> -->
<el-upload
class="avatar-uploader"
action
:show-file-list="false"
:http-request="UploadSmall"
>
<i
v-if="!addMsg.SmallIco || addMsg.SmallIco == ''"
class="el-icon-plus avatar-uploader-icon"
></i>
<img v-else :src="addMsg.SmallIco" class="avatar" />
</el-upload>
</div>
</el-form-item>
<el-form-item
......@@ -222,7 +246,7 @@
class="is-required"
prop="YearInfo"
>
<el-select
<!-- <el-select
v-model="addMsg.YearInfo"
filterable
placeholder="请选择"
......@@ -234,7 +258,13 @@
:value="item.name"
>
</el-option>
</el-select>
</el-select> -->
<el-input
v-model="addMsg.YearInfo"
placeholder="年份"
type="number"
style="width: 400px"
></el-input>
</el-form-item>
</el-form>
</div>
......@@ -476,6 +506,27 @@ export default {
});
}
},
//选择图片
UploadBig(file) {
this.UploadFileToTencent(this.FileType().UserImg, file.file, (res) => {
if (res.resultCode == 1) {
this.addMsg.BigIco = res.FileUrl;
}
});
},
UploadSmall(file) {
console.log(494, file.file);
const isLt1M = file.file.size / 1024 / 1024 < 1;
if (!isLt1M) {
this.$message.error("上传头像图片大小不能超过 1MB!");
return;
}
this.UploadFileToTencent(this.FileType().UserImg, file.file, (res) => {
if (res.resultCode == 1) {
this.addMsg.SmallIco = res.FileUrl;
}
});
},
},
mounted() {},
};
......@@ -533,4 +584,27 @@ export default {
.brandClassification .el-form-item__content {
line-height: 0;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 80px;
height: 80px;
line-height: 80px;
text-align: center;
}
.avatar {
width: 80px;
height: 80px;
display: block;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment