Commit f6d1a6db authored by 罗超's avatar 罗超

1

parent 1da1bec1
<template> <template>
<div v-loading="pageloading" class="editVehicle"> <div v-loading="pageloading" class="editVehicle">
<div class="head-title"> <div class="head-title">
<span @click="CommonJump('VehicleManagement')" class="blue point">载体管理</span> / 编辑载体 <span @click="CommonJump('VehicleManagement')" class="blue point"
>载体管理</span
>
/ 编辑载体
</div> </div>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px"> <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-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-input>
</el-form-item> </el-form-item>
<el-form-item label="Logo" prop="Logo"> <el-form-item label="Logo" prop="Logo">
<div> <div>
<el-tooltip class="item" effect="dark" content="建议尺寸:88*88" placement="top-start"> <el-tooltip
<el-button size="small" @click="choicImg=true,type=1">选择文件</el-button> class="item"
effect="dark"
content="建议尺寸:88*88"
placement="top-start"
>
<el-button size="small" @click="(choicImg = true), (type = 1)"
>选择文件</el-button
>
</el-tooltip> </el-tooltip>
</div> </div>
<div class="editIconImg"> <div class="editIconImg">
<el-image style="width: 80px;height:80px;" v-if="addMsg.Logo" :src="addMsg.Logo" <el-image
:preview-src-list="LogoList"> style="width: 80px; height: 80px"
v-if="addMsg.Logo"
:src="addMsg.Logo"
:preview-src-list="LogoList"
>
</el-image> </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> </div>
</el-form-item> </el-form-item>
<el-form-item label="介绍图(多张)" class="is-required"> <el-form-item label="介绍图(多张)" class="is-required">
<div class="nav_Main"> <div class="nav_Main">
<div class="nav_IconContent"> <div class="nav_IconContent">
<draggable v-model="introImgList"> <draggable v-model="introImgList">
<div v-for="(item, index) in introImgList" :key="index+'2'" <div
style="margin-right: 20px; position: relative;display:inline-block; "> v-for="(item, index) in introImgList"
<el-image style="width: 100px;height:100px;" :src="item" :preview-src-list="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-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> </el-button>
</div> </div>
</draggable> </draggable>
</div> </div>
<div @click="choicImg=true,type=2" class="add-image-btn 2222"> <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>
</div>
</draggable>
</div>
<div
@click="(choicImg = true), (type = 3)"
class="add-image-btn 2222"
>
+ 添加图片 + 添加图片
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="开发商" prop="Developers"> <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>
<el-form-item label="载体视频"> <el-form-item label="载体视频">
<el-input v-model="addMsg.VideoUrl" style="width:690px" size="small" placeholder="请输入载体视频"> <el-input
<el-button @click="changeState1 = true" slot="append">添加视频</el-button> v-model="addMsg.VideoUrl"
style="width: 690px"
size="small"
placeholder="请输入载体视频"
>
<el-button @click="changeState1 = true" slot="append"
>添加视频</el-button
>
</el-input> </el-input>
<div> <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> </div>
</el-form-item> </el-form-item>
<el-form-item label="项目地址"> <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>
<el-form-item label="经纬度" style="margin-top: 15px;" size="small"> <el-form-item label="经纬度" style="margin-top: 15px" size="small">
<el-input v-model="addMsg.LatAndLon" style="width:690px" :disabled="true"> <el-input
<el-button @click="isShowMap = true" slot="append">展开地图</el-button> v-model="addMsg.LatAndLon"
style="width: 690px"
:disabled="true"
>
<el-button @click="isShowMap = true" slot="append"
>展开地图</el-button
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="开业时间"> <el-form-item label="开业时间">
<el-date-picker v-model="addMsg.OpenTime" clearable value-format="yyyy-MM-dd HH:mm:ss" size="small" <el-date-picker
type="datetime" placeholder="选择开业时间"> v-model="addMsg.OpenTime"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
size="small"
type="datetime"
placeholder="选择开业时间"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="项目类型" prop="ProjectType"> <el-form-item label="项目类型" prop="ProjectType">
<el-select style="width:220px;" v-model="addMsg.ProjectType" size="small" placeholder="请选择"> <el-select
<el-option v-for="item in ProjectTypeList" :key="item.Id" :label="item.Name" :value="item.Id"> 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-option>
</el-select> </el-select>
</el-form-item> </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-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> <template slot="append">万平方米</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="商业层数"> <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-input>
</el-form-item> </el-form-item>
<el-form-item label="车位数量"> <el-form-item label="车位数量">
<el-input v-model="addMsg.CarNum" @keyup.native="checkInteger(addMsg,'CarNum')" style="width:690px" <el-input
size="small" placeholder="请输入车位数量"> v-model="addMsg.CarNum"
@keyup.native="checkInteger(addMsg, 'CarNum')"
style="width: 690px"
size="small"
placeholder="请输入车位数量"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="业态规则"> <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-input>
</el-form-item> </el-form-item>
<el-form-item label="招引目标"> <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-input>
</el-form-item> </el-form-item>
<el-form-item label="总体定位"> <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-input>
</el-form-item> </el-form-item>
<el-form-item label="目标人群"> <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-input>
</el-form-item> </el-form-item>
<el-form-item label="地铁信息"> <el-form-item label="地铁信息">
<div v-for="(item,index) in MetroList" :key="index" style="position:relative;width:690px;"> <div
<el-input v-model="item.MetroNum" @keyup.native="checkInteger(item,'MetroNum')" style="width:200px" v-for="(item, index) in MetroList"
size="small" placeholder="地铁线路" /> :key="index"
<el-input v-model="item.MetroName" style="width:200px" size="small" placeholder="站点名称" /> style="position: relative; width: 690px"
<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-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> </el-button>
</div> </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-form-item>
</el-card> </el-card>
</el-form> </el-form>
<div style="padding:20px;background:#fff;margin-top:10px"> <div style="padding: 20px; background: #fff; margin-top: 10px">
<el-button @click="Save('addMsg')" size="small" type="primary">保存</el-button> <el-button @click="Save('addMsg')" size="small" type="primary"
>保存</el-button
>
</div> </div>
<!-- 选择图片文件 --> <!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px"> <el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
...@@ -128,279 +408,333 @@ ...@@ -128,279 +408,333 @@
<el-dialog title="地图展示" :visible.sync="isShowMap" width="960px"> <el-dialog title="地图展示" :visible.sync="isShowMap" width="960px">
<commonMap @map-submit="mapEvent"></commonMap> <commonMap @map-submit="mapEvent"></commonMap>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import ChooseImg from "@/components/global/ChooseImg.vue"; import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue"; import Choosevideo from "@/components/global/Choosevideo.vue";
import commonMap from "@/components/common/commonMap.vue"; import commonMap from "@/components/common/commonMap.vue";
import draggable from "vuedraggable" import draggable from "vuedraggable";
export default { export default {
name: "editVehicle", name: "editVehicle",
data() { data() {
let validataType = (rule, value, callback) => { let validataType = (rule, value, callback) => {
if (this.addMsg.ProjectType == 0) { if (this.addMsg.ProjectType == 0) {
return callback(new Error('请选择项目类型')); return callback(new Error("请选择项目类型"));
} else { } else {
callback(); callback();
}
} }
let validataLogo = (rule, value, callback) => { };
if (this.addMsg.Logo == '') { let validataLogo = (rule, value, callback) => {
return callback(new Error('请上传Logo')); if (this.addMsg.Logo == "") {
} else { return callback(new Error("请上传Logo"));
callback(); } else {
} callback();
} }
return { };
pageloading: false, return {
addMsg: { pageloading: false,
ID: 0, addMsg: {
CarrierName: '', // 载体名称 ID: 0,
Logo: '', CarrierName: "", // 载体名称
BannerList: [], //载体介绍图 Logo: "",
VideoUrl: '', //载体视频 BannerList: [], //载体介绍图
Address: '', //载体地址 VideoUrl: "", //载体视频
LatAndLon: '', //载体地址经纬度 Address: "", //载体地址
Developers: '', //开发商 LatAndLon: "", //载体地址经纬度
OpenTime: '', //开业时间 Developers: "", //开发商
ProjectType: 0, //项目类型 OpenTime: "", //开业时间
CarrierSize: 0, //商业体量 ProjectType: 0, //项目类型
LayersNum: '', //商业层数 CarrierSize: 0, //商业体量
CarNum: 0, //车位数量 LayersNum: "", //商业层数
CarrierPlan: '', //业态规划 CarNum: 0, //车位数量
CarrierTarget: '', //招引目标 CarrierPlan: "", //业态规划
Location: '', //定位 CarrierTarget: "", //招引目标
Crowd: '', //目标人群 Location: "", //定位
CarrierMetroList: [] //地铁信息 Crowd: "", //目标人群
}, CarrierMetroList: [], //地铁信息
rules: { FirstShopNumList: [
CarrierName: [{ //载体类型、数量
{
Id: 0,
Name: "",
Num: 0,
},
],
HonorList: [], //载体荣誉
Discount: "", //招引优惠政策
StartingInfo: "", //首发政策
FirstShow: "", //首秀政策
FirstExhibition: "", //首展政策
ShopNum: "", //店铺数量
BuiltUpArea: "", //经营面积
AreaRequirement: "", //可租赁面积
YeJi: "", //去年业绩
},
rules: {
CarrierName: [
{
required: true, required: true,
message: '请输入载体名称', message: "请输入载体名称",
trigger: 'blur' trigger: "blur",
}], },
Developers: [{ ],
Developers: [
{
required: true, required: true,
message: '请输入开发商', message: "请输入开发商",
trigger: 'blur' trigger: "blur",
}], },
ProjectType: [{ ],
ProjectType: [
{
required: true, required: true,
validator: validataType, validator: validataType,
trigger: 'change' trigger: "change",
}], },
Logo: [{ ],
Logo: [
{
required: true, required: true,
validator: validataLogo, validator: validataLogo,
trigger: 'change' trigger: "change",
}] },
}, ],
ID: 0, },
type: -1, ID: 0,
choicImg: false, type: -1,
changeState1: false, choicImg: false,
isShowMap: false, //显示地图 changeState1: false,
MetroList: [], //地铁信息数据 isShowMap: false, //显示地图
ProjectTypeList: [], //项目类型数组 MetroList: [], //地铁信息数据
introImgList: [], //介绍图 ProjectTypeList: [], //项目类型数组
LogoList: [], introImgList: [], //介绍图
} LogoList: [],
shenList: [],
};
},
components: {
ChooseImg,
Choosevideo,
commonMap,
draggable,
},
created() {
if (this.$route.query.ID) {
this.ID = this.$route.query.ID;
this.getData();
}
this.getTypeEnumList();
this.GetAuthenticationCategoryEnumList();
},
methods: {
//获取项目类型
getTypeEnumList() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.ProjectTypeList = res.data.data;
let obj = {
Name: "不限",
Id: 0,
};
this.ProjectTypeList.unshift(obj);
}
});
}, },
components: { //新增地铁信息
ChooseImg, addMetroList() {
Choosevideo, let obj = {
commonMap, MetroNum: "",
draggable MetroName: "",
Distance: "",
};
this.MetroList.push(obj);
}, },
created() { //删除地铁信息
if (this.$route.query.ID) { delCarrier(index) {
this.ID = this.$route.query.ID; this.MetroList.splice(index, 1);
this.getData()
}
this.getTypeEnumList();
}, },
methods: { Save(formName) {
//获取项目类型 this.$refs[formName].validate((valid) => {
getTypeEnumList() { if (valid) {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, res => { if (this.MetroList.length > 0) {
if (res.data.resultCode == 1) { for (var i = 0; i < this.MetroList.length; i++) {
this.ProjectTypeList = res.data.data; if (this.MetroList[i].MetroNum == "") {
let obj = { this.Error(`请填写第地铁信息${i + 1}行地铁线路`);
Name: '不限', return;
Id: 0 }
} if (this.MetroList[i].MetroName == "") {
this.ProjectTypeList.unshift(obj); this.Error(`请填写第地铁信息${i + 1}行站点名称`);
} return;
})
},
//新增地铁信息
addMetroList() {
let obj = {
MetroNum: '',
MetroName: '',
Distance: ''
}
this.MetroList.push(obj);
},
//删除地铁信息
delCarrier(index) {
this.MetroList.splice(index, 1);
},
Save(formName) {
this.$refs[formName].validate((valid) => {
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}行地铁线路`);
return;
}
if (this.MetroList[i].MetroName == '') {
this.Error(`请填写第地铁信息${i+1}行站点名称`);
return;
}
} }
} }
// if(this.introImgList.length==0){
// this.Error('请上传介绍图');
// return;
// }
this.addMsg.CarrierMetroList = this.MetroList;
this.addMsg.BannerList = this.introImgList;
this.apipost('/api/Trade/GetSetCarrier', this.addMsg,
res => {
if (res.data.resultCode === 1) {
this.CommonJump('VehicleManagement')
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
} }
}); // if(this.introImgList.length==0){
}, // this.Error('请上传介绍图');
// return;
// }
this.addMsg.CarrierMetroList = this.MetroList;
this.addMsg.BannerList = this.introImgList;
this.apipost(
"/api/Trade/GetSetCarrier",
this.addMsg,
(res) => {
if (res.data.resultCode === 1) {
this.CommonJump("VehicleManagement");
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
getData() { getData() {
this.pageloading = true; this.pageloading = true;
this.apipost("/api/Trade/GetCarrierDetails", { this.apipost(
ID: this.ID "/api/Trade/GetCarrierDetails",
}, res => { {
ID: this.ID,
},
(res) => {
this.pageloading = false; this.pageloading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data let data = res.data.data;
this.addMsg = res.data.data; this.addMsg = res.data.data;
if (res.data.data.CarrierMetroList && res.data.data.CarrierMetroList.length > 0) { if (
this.MetroList = res.data.data.CarrierMetroList 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) { if (
this.introImgList = res.data.data.BannerList res.data.data.BannerList &&
res.data.data.BannerList.length > 0
) {
this.introImgList = res.data.data.BannerList;
} }
if (res.data.data.OpenTime) { 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 = [];
this.LogoList.push(this.addMsg.Logo); this.LogoList.push(this.addMsg.Logo);
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
})
},
//选择图片
SelectId(msg) {
if (this.type == 1) {
this.addMsg.Logo = this.getIconLink(msg.url);
} }
if (this.type == 2) { );
this.introImgList.push(msg.url); },
} //选择图片
this.choicImg = false; SelectId(msg) {
}, if (this.type == 1) {
ClearCarouse(index) { this.addMsg.Logo = this.getIconLink(msg.url);
}
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); this.introImgList.splice(index, 1);
}, }
Selectvideo(val) { if (this.type == 3) {
this.addMsg.VideoUrl = val.Path; this.addMsg.HonorList.splice(index, 1);
this.changeState1 = false; }
},
//得到地图信息
mapEvent(e) {
this.addMsg.LatAndLon = e.lat + ',' + e.long;
// this.addMsg.Address = e.Address;
this.isShowMap = false;
},
}, },
}; Selectvideo(val) {
this.addMsg.VideoUrl = val.Path;
this.changeState1 = false;
},
//得到地图信息
mapEvent(e) {
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> </script>
<style> <style>
.editVehicle .content { .editVehicle .content {
background: #fff; background: #fff;
margin-top: 10px; margin-top: 10px;
box-sizing: border-box; box-sizing: border-box;
} }
.editVehicle .editIconImg { .editVehicle .editIconImg {
width: 80px; width: 80px;
height: 80px; height: 80px;
} }
.editVehicle .add-image-btn { .editVehicle .add-image-btn {
width: 100px; width: 100px;
height: 100px; height: 100px;
line-height: 100px; line-height: 100px;
color: #419efb; color: #419efb;
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
} }
.editVehicle .nav_Main { .editVehicle .nav_Main {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
} }
.editVehicle .nav_IconContent { .editVehicle .nav_IconContent {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
} }
/* .editVehicle .nav_IconContent div>div { /* .editVehicle .nav_IconContent div>div {
display: inline-block; display: inline-block;
} */ } */
.editVehicle .colapp-image { .editVehicle .colapp-image {
background-size: cover; background-size: cover;
background-position: center center; background-position: center center;
width: 100px; width: 100px;
height: 100px; height: 100px;
border-radius: 0%; border-radius: 0%;
} }
.editVehicle .delBtn {
position: absolute;
right: -8px;
top: -8px;
padding: 4px 4px !important;
}
.delCarrClose {
position: absolute;
right: 53px;
top: 8px;
padding: 4px 4px !important;
} .editVehicle .delBtn {
position: absolute;
right: -8px;
top: -8px;
padding: 4px 4px !important;
}
.delCarrClose {
position: absolute;
right: 53px;
top: 8px;
padding: 4px 4px !important;
}
</style> </style>
<template> <template>
<div class="firstStoreApply"> <div class="firstStoreApply">
<div class="head-title" > <div class="head-title">
首店申请 首店申请
<div style="float:right;margin-top:-5px"> <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(1)"
<el-button type="primary" size="small" @click="batchadopt(2)">审核拒绝</el-button> >审核通过</el-button
<el-button style="" size="small" type="primary" @click="Export()"> >
下载excel <el-button type="primary" size="small" @click="batchadopt(2)"
</el-button> >审核拒绝</el-button
>
<el-button style="" size="small" type="primary" @click="Export()">
下载excel
</el-button>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<div> <div>
<div class="searchInput" style="width:250px"> <div class="searchInput" style="width: 250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()" <el-input
style="display:inline-block;width:225px;height:30px" placeholder="首店名称" v-model="msg.Name" size="small" @keyup.enter.native="(msg.pageIndex = 1), getList()"
clearable> @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px"
placeholder="首店名称"
v-model="msg.Name"
size="small"
clearable
>
</el-input> </el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search" <span
style="color:#979dad;font-size:14px;position:relative;top:1px"></span> @click="(msg.pageIndex = 1), getList()"
class="el-icon-search"
style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"
></span>
</div> </div>
<div class="searchInput" style="width:250px"> <div class="searchInput" style="width: 250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()" <el-input
style="display:inline-block;width:225px;height:30px" placeholder="联系人" v-model="msg.Contact" size="small" @keyup.enter.native="(msg.pageIndex = 1), getList()"
clearable> @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px"
placeholder="联系人"
v-model="msg.Contact"
size="small"
clearable
>
</el-input> </el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search" <span
style="color:#979dad;font-size:14px;position:relative;top:1px"></span> @click="(msg.pageIndex = 1), getList()"
class="el-icon-search"
style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"
></span>
</div> </div>
<div class="searchInput" style="width:250px"> <div class="searchInput" style="width: 250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()" <el-input
style="display:inline-block;width:225px;height:30px" placeholder="联系电话" v-model="msg.ContactMobile" @keyup.enter.native="(msg.pageIndex = 1), getList()"
size="small" clearable> @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px"
placeholder="联系电话"
v-model="msg.ContactMobile"
size="small"
clearable
>
</el-input> </el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search" <span
style="color:#979dad;font-size:14px;position:relative;top:1px"></span> @click="(msg.pageIndex = 1), getList()"
class="el-icon-search"
style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"
></span>
</div> </div>
<el-date-picker class="indataPicker" type="daterange" v-model="dateStr" range-separator="至" <el-date-picker
start-placeholder="开始日期" end-placeholder="结束日期" size="small" @change="getList" value-format="yyyy-MM-dd"> 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-date-picker>
<el-select class="w100" @change="getList()" style="margin-left: 10px;" v-model="msg.AuditState" size="small" <el-select
placeholder="请选择"> 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="0"></el-option>
<el-option label="未审核" :value="1"></el-option> <el-option label="未审核" :value="1"></el-option>
<el-option label="审核通过" :value="2"></el-option> <el-option label="审核通过" :value="2"></el-option>
<el-option label="审核不通过" :value="3"></el-option> <el-option label="审核不通过" :value="3"></el-option>
</el-select> </el-select>
</div> </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 <el-table-column
type="selection" type="selection"
:selectable="checkSelectable" :selectable="checkSelectable"
width="55"></el-table-column> width="55"
></el-table-column>
<el-table-column prop="Name" width="200" label="首店名称"> <el-table-column prop="Name" width="200" label="首店名称">
</el-table-column> </el-table-column>
<el-table-column prop="CoverImage" label="封面图" width="150"> <el-table-column prop="CoverImage" label="封面图" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image title="点击查看大图" style="width:60px;" :src="scope.row.CoverImage" <el-image
:preview-src-list="scope.row.ImageList"></el-image> title="点击查看大图"
style="width: 60px"
:src="scope.row.CoverImage"
:preview-src-list="scope.row.ImageList"
></el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="TypeName" width="100" label="类型"> <el-table-column prop="TypeName" width="100" label="类型">
...@@ -69,263 +140,447 @@ ...@@ -69,263 +140,447 @@
</el-table-column> </el-table-column>
<el-table-column prop="AuditState" width="100" label="审核状态"> <el-table-column prop="AuditState" width="100" label="审核状态">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.AuditState==1" style="color:#1273bc;">未审核</span> <span v-if="scope.row.AuditState == 1" style="color: #1273bc"
<span v-if="scope.row.AuditState==2" style="color:green;">审核通过</span> >未审核</span
<span v-if="scope.row.AuditState==3" style="color:#e95252;">审核不通过</span> >
<span v-if="scope.row.AuditState == 2" style="color: green"
>审核通过</span
>
<span v-if="scope.row.AuditState == 3" style="color: #e95252"
>审核不通过</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="AuditDate" width="200" label="审核时间"> <el-table-column prop="AuditDate" width="200" label="审核时间">
</el-table-column> </el-table-column>
<el-table-column prop="Contact" label="联系人"> <el-table-column prop="Contact" label="联系人"> </el-table-column>
</el-table-column>
<el-table-column prop="ContactMobile" label="联系电话"> <el-table-column prop="ContactMobile" label="联系电话">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="130"> <el-table-column label="操作" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="详情" placement="top"> <el-tooltip
<img @click="CommonJump('firstStoreDetail',{ID:scope.row.Id})" class="item"
src="../../assets/img/userman/icon-show.png" alt=""> effect="dark"
content="详情"
placement="top"
>
<img
@click="CommonJump('firstStoreDetail', { ID: scope.row.Id })"
src="../../assets/img/userman/icon-show.png"
alt=""
/>
</el-tooltip> </el-tooltip>
<template v-if="scope.row.AuditState==1"> <template v-if="scope.row.AuditState == 1">
<el-tooltip class="item" effect="dark" content="审核通过" placement="top"> <el-tooltip
<img @click="AuditStore(scope.row.Id)" src="../../assets/img/userman/pass.png" alt=""> class="item"
effect="dark"
content="审核通过"
placement="top"
>
<img
@click="AuditStore(scope.row.Id)"
src="../../assets/img/userman/pass.png"
alt=""
/>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="审核拒绝" placement="top"> <el-tooltip
<img @click="AuditJujue(scope.row.Id)" src="../../assets/img/userman/nopass.png" alt=""> class="item"
effect="dark"
content="审核拒绝"
placement="top"
>
<img
@click="AuditJujue(scope.row.Id)"
src="../../assets/img/userman/nopass.png"
alt=""
/>
</el-tooltip> </el-tooltip>
</template> </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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize" <el-pagination
:current-page.sync="msg.pageIndex" layout="total,prev, pager, next" :total="total"> 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> </el-pagination>
</div> </div>
<el-dialog title="审核拒绝" :visible.sync="resondialog" width="600px"> <el-dialog title="审核拒绝" :visible.sync="resondialog" width="600px">
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item label="拒绝原因" class="is-required"> <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-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="resondialog = false">取 消</el-button> <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> </span>
</el-dialog> </el-dialog>
<el-dialog title="审核拒绝" :visible.sync="resondialog2" width="600px"> <el-dialog title="审核拒绝" :visible.sync="resondialog2" width="600px">
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item label="拒绝原因" class="is-required"> <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-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="resondialog2 = false">取 消</el-button> <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> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
Name: '', //首店名称 Name: "", //首店名称
Contact: '', //联系人 Contact: "", //联系人
StartTime: '', //开业开始时间 StartTime: "", //开业开始时间
EndTime: '', //开业结束时间 EndTime: "", //开业结束时间
ContactMobile: '', //联系电话 ContactMobile: "", //联系电话
AuditState: 0 //审核状态 1未审核 2审核通过 3审核不通过 AuditState: 0, //审核状态 1未审核 2审核通过 3审核不通过
},
dateStr: [], //日期
total: 0,
tableData: [], //数据列表
auditMsg: {
AuthenticationId: '',
AuditState: 2,
AuditRemark: ''
},
batchmsg:{
AuthenticationIds:'',
AuditState:2,
AuditRemark:'',
},
choiceList:[],
resondialog: false,
resondialog2: false,
};
},
created() {
this.getList();
},
methods: {
getList() {
this.loading = true;
if (this.dateStr && this.dateStr.length > 0) {
this.msg.StartTime = this.dateStr[0];
this.msg.EndTime = this.dateStr[1];
} else {
this.msg.StartTime = '';
this.msg.EndTime = '';
}
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) { dateStr: [], //日期
this.msg.pageIndex = val; total: 0,
this.getList(); tableData: [], //数据列表
auditMsg: {
AuthenticationId: "",
AuditState: 2,
AuditRemark: "",
}, },
//审核通过 batchmsg: {
AuditStore(Id) { AuthenticationIds: "",
let that = this; AuditState: 2,
that.auditMsg.AuthenticationId = Id; AuditRemark: "",
that.auditMsg.AuditRemark = '';
that.auditMsg.AuditState = 2;
that.Confirm("确定审核通过?", function () {
that.apipost(
"/api/Trade/SetAuthenticationAudit", that.auditMsg,
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
);
});
}, },
AuditJujue(Id) { choiceList: [],
this.resondialog = true; resondialog: false,
this.auditMsg.AuthenticationId = Id; resondialog2: false,
this.auditMsg.AuditState = 3; Medaldialog: false,
this.auditMsg.AuditRemark = ''; prizeList: [],
prizeTotal: 0,
prizeMsg: {
pageIndex: 1,
pageSize: 10,
Name: "",
}, },
//审核拒绝 multipleSelection: [],
sureJujue() { currrentId: 0,
if(this.auditMsg.AuditRemark==''){ };
this.Error('请输入拒绝原因'); },
return; created() {
this.getList();
this.getprizeList();
},
methods: {
getList() {
this.loading = true;
if (this.dateStr && this.dateStr.length > 0) {
this.msg.StartTime = this.dateStr[0];
this.msg.EndTime = this.dateStr[1];
} else {
this.msg.StartTime = "";
this.msg.EndTime = "";
}
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;
} }
this.apipost( });
"/api/Trade/SetAuthenticationAudit", this.auditMsg, },
res => { 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.AuditState = 2;
that.Confirm("确定审核通过?", function () {
that.apipost(
"/api/Trade/SetAuthenticationAudit",
that.auditMsg,
(res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message); that.Success(res.data.message);
this.getList(); that.getList();
this.resondialog = false;
} else { } else {
this.Error(res.data.message); that.Error(res.data.message);
} }
}, }
);
},
//导出excel
Export() {
let msg = this.msg;
msg = JSON.parse(JSON.stringify(msg));
msg.pageSize = 999;
this.GetLocalFile(
"/api/Trade/GetAuthenticationListToExcel",
msg,
"首店申请列表.xls"
); );
}, });
handleSelectionChange(e){ },
this.choiceList =[] AuditJujue(Id) {
e.map(x=>{ this.resondialog = true;
this.choiceList.push(x.Id) this.auditMsg.AuthenticationId = Id;
}) this.auditMsg.AuditState = 3;
this.auditMsg.AuditRemark = "";
}, },
batchadopt(type){ //审核拒绝
let that = this; sureJujue() {
if (this.auditMsg.AuditRemark == "") {
if(that.choiceList.length==0){ this.Error("请输入拒绝原因");
that.Error('请选择要审核的首店') return;
}else{ }
that.batchmsg.AuthenticationIds = that.choiceList.join(','); this.apipost(
"/api/Trade/SetAuthenticationAudit",
this.auditMsg,
if(type==1){ (res) => {
that.batchmsg.AuditState = 2; if (res.data.resultCode == 1) {
that.batchmsg.AuditRemark = ''; this.Success(res.data.message);
that.Confirm("确定审核通过?", function () { this.getList();
that.BatchAuthenticationAudit() this.resondialog = false;
}); } else {
}else if(type==2){ this.Error(res.data.message);
that.resondialog2 = true;
that.batchmsg.AuditState = 3;
that.batchmsg.AuditRemark = '';
} }
}
);
},
//导出excel
Export() {
let msg = this.msg;
msg = JSON.parse(JSON.stringify(msg));
msg.pageSize = 999;
this.GetLocalFile(
"/api/Trade/GetAuthenticationListToExcel",
msg,
"首店申请列表.xls"
);
},
handleSelectionChange(e) {
this.choiceList = [];
e.map((x) => {
this.choiceList.push(x.Id);
});
},
batchadopt(type) {
let that = this;
if (that.choiceList.length == 0) {
that.Error("请选择要审核的首店");
} else {
that.batchmsg.AuthenticationIds = that.choiceList.join(",");
if (type == 1) {
that.batchmsg.AuditState = 2;
that.batchmsg.AuditRemark = "";
that.Confirm("确定审核通过?", function () {
that.BatchAuthenticationAudit();
});
} else if (type == 2) {
that.resondialog2 = true;
that.batchmsg.AuditState = 3;
that.batchmsg.AuditRemark = "";
} }
}, }
BatchAuthenticationAudit(type=0){ },
if(type==1 && this.batchmsg.AuditRemark==''){ BatchAuthenticationAudit(type = 0) {
this.Error('请输入拒绝原因'); if (type == 1 && this.batchmsg.AuditRemark == "") {
return; this.Error("请输入拒绝原因");
return;
}
this.apipost(
"/api/Trade/BatchAuthenticationAudit",
this.batchmsg,
(res) => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
this.resondialog2 = false;
} else {
this.Error(res.data.message);
} }
this.apipost( }
"/api/Trade/BatchAuthenticationAudit", this.batchmsg, );
res => { },
if (res.data.resultCode == 1) { checkSelectable(row) {
this.Success(res.data.message); //判断是否可以选择
this.getList(); return row.AuditState == 1;
this.resondialog2 = false; },
} else { showMedalDialog(item) {
this.Error(res.data.message); this.Medaldialog = true;
} this.currrentId = item.Id;
}, },
); //获取奖章列表
}, getprizeList() {
checkSelectable(row){//判断是否可以选择 this.apipost("/api/Trade/GetPrizePageList", this.prizeMsg, (res) => {
return row.AuditState==1 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> </script>
<style> <style>
.firstStoreApply .content .searchInput { .firstStoreApply .content .searchInput {
border: 1px solid #DCDFE6; border: 1px solid #dcdfe6;
border-radius: 4px; border-radius: 4px;
} }
.firstStoreApply .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.firstStoreApply .content .searchInput { .firstStoreApply .content .searchInput .el-input__inner {
line-height: normal; border: none;
display: inline-table; outline: none;
width: 100%; height: 30px;
border-collapse: separate; line-height: 30px;
border-spacing: 0; }
width: 250px;
margin-right: 20px;
}
.firstStoreApply .content { .firstStoreApply .content .searchInput {
background: #fff; line-height: normal;
margin-top: 10px; display: inline-table;
padding: 20px; width: 100%;
box-sizing: border-box; border-collapse: separate;
} border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.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> </style>
...@@ -158,9 +158,9 @@ ...@@ -158,9 +158,9 @@
class="is-required" class="is-required"
prop="BigIco" prop="BigIco"
> >
<el-button @click="openImageChoose(1)" size="small" <!-- <el-button @click="openImageChoose(1)" size="small"
>选择大奖章</el-button >选择大奖章</el-button
> > -->
<div <div
class="app-gallery-item" class="app-gallery-item"
style=" style="
...@@ -170,18 +170,30 @@ ...@@ -170,18 +170,30 @@
border: none; border: none;
" "
> >
<img <!-- <img
v-if="!addMsg.BigIco || addMsg.BigIco == ''" v-if="!addMsg.BigIco || addMsg.BigIco == ''"
src="../../assets/img/default.png" src="../../assets/img/default.png"
style="width: 80px; height: 80px" style="width: 80px; height: 80px"
alt="" alt=""
/> /> -->
<img <!-- <img
v-else v-else
style="width: 80px; height: 80px" style="width: 80px; height: 80px"
:src="addMsg.BigIco" :src="addMsg.BigIco"
alt="" 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> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -190,9 +202,9 @@ ...@@ -190,9 +202,9 @@
class="is-required" class="is-required"
prop="SmallIco" prop="SmallIco"
> >
<el-button @click="openImageChoose(2)" size="small" <!-- <el-button @click="openImageChoose(2)" size="small"
>选择小奖章</el-button >选择小奖章</el-button
> > -->
<div <div
class="app-gallery-item" class="app-gallery-item"
style=" style="
...@@ -202,7 +214,7 @@ ...@@ -202,7 +214,7 @@
border: none; border: none;
" "
> >
<img <!-- <img
v-if="!addMsg.SmallIco || addMsg.SmallIco == ''" v-if="!addMsg.SmallIco || addMsg.SmallIco == ''"
src="../../assets/img/default.png" src="../../assets/img/default.png"
style="width: 80px; height: 80px" style="width: 80px; height: 80px"
...@@ -213,7 +225,19 @@ ...@@ -213,7 +225,19 @@
style="width: 80px; height: 80px" style="width: 80px; height: 80px"
:src="addMsg.SmallIco" :src="addMsg.SmallIco"
alt="" 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> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
...@@ -222,7 +246,7 @@ ...@@ -222,7 +246,7 @@
class="is-required" class="is-required"
prop="YearInfo" prop="YearInfo"
> >
<el-select <!-- <el-select
v-model="addMsg.YearInfo" v-model="addMsg.YearInfo"
filterable filterable
placeholder="请选择" placeholder="请选择"
...@@ -234,7 +258,13 @@ ...@@ -234,7 +258,13 @@
:value="item.name" :value="item.name"
> >
</el-option> </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-item>
</el-form> </el-form>
</div> </div>
...@@ -476,6 +506,27 @@ export default { ...@@ -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() {}, mounted() {},
}; };
...@@ -533,4 +584,27 @@ export default { ...@@ -533,4 +584,27 @@ export default {
.brandClassification .el-form-item__content { .brandClassification .el-form-item__content {
line-height: 0; 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> </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