Commit 80a96668 authored by 黄奎's avatar 黄奎

新增联系人,联系电话

parent 486449cf
......@@ -16,7 +16,8 @@
<div class="head-title">
载体管理
<div>
<el-button @click="checkAll=false,dialogVisible = true" style="float: right; margin-top: -25px" size="small" type="primary">
<el-button @click="checkAll=false,dialogVisible = true" style="float: right; margin-top: -25px" size="small"
type="primary">
批量导出
</el-button>
</div>
......@@ -116,8 +117,15 @@
</el-table-column>
<el-table-column prop="CarrierSize" label="商业体量"> </el-table-column>
<el-table-column prop="LayersNum" width="150" label="商业层数"></el-table-column>
<el-table-column prop="ContactName" label="联系人" width="100">
<template slot-scope="scope">
{{ scope.row.ContactName }}
<br />
{{ scope.row.ContactPhone }}
</template>
</el-table-column>
<el-table-column prop="UserName" width="100" label="认证用户"></el-table-column>
<el-table-column label="操作" width="100">
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="修改" placement="top">
<img @click="CommonJump('editVehicle', { ID: scope.row.ID })" src="../../assets/img/userman/edit.png"
......@@ -184,7 +192,7 @@
EndOpenTime: "", // 开业截止时间
ExcelEnumIds: [],
UserId: 0,
RandomNum:0,//随机数
RandomNum: 0, //随机数
},
usermsg: {
pageIndex: 1,
......@@ -268,11 +276,11 @@
downLoadCarrier() {
this.msg.ExcelEnumIds = this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
msg.RandomNum=Math.random();
msg.RandomNum = Math.random();
if (!msg.Id || msg.Id == "") {
msg.Id = 0;
}
this.downLoadLoading = true;
this.downLoadLoading = true;
this.loadingText = "正在生成载体文件,请勿关闭或刷新页面...";
var that = this;
this.download_timer = setInterval(function () {
......
<template>
<div v-loading="loading" class="addbrand">
<div class="head-title">
<span @click="CommonJump('brandManagement')" class="blue point"
>品牌管理</span
>
<span @click="CommonJump('brandManagement')" class="blue point">品牌管理</span>
/ 编辑品牌管理
</div>
<div class="content">
<el-form
:model="addMsg"
:rules="rules"
ref="addMsg"
label-width="150px"
style="width: 70%"
>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px" style="width: 70%">
<el-form-item label="品牌分类" class="is-required" prop="BrandClassId">
<el-select
class="w300"
v-model="addMsg.BrandClassId"
size="small"
placeholder="请选择"
>
<el-select class="w300" v-model="addMsg.BrandClassId" size="small" placeholder="请选择">
<el-option :key="0" label="请选择" :value="0"></el-option>
<el-option
v-for="item in BrandClassList"
:key="item.ID"
:label="item.ClassName"
:value="item.ID"
>
<el-option v-for="item in BrandClassList" :key="item.ID" :label="item.ClassName" :value="item.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="品牌全名"
prop="FullBrandName"
class="is-required"
size="small"
>
<el-input
v-model="addMsg.FullBrandName"
class="w600"
placeholder="请输入品牌全名"
maxlength="100"
/>
<el-form-item label="品牌全名" prop="FullBrandName" class="is-required" size="small">
<el-input v-model="addMsg.FullBrandName" class="w600" placeholder="请输入品牌全名" maxlength="100" />
</el-form-item>
<el-form-item
label="品牌名"
prop="BrandName"
class="is-required"
size="small"
>
<el-input
v-model="addMsg.BrandName"
class="w600"
placeholder="请输入品牌名"
maxlength="100"
/>
<el-form-item label="品牌名" prop="BrandName" class="is-required" size="small">
<el-input v-model="addMsg.BrandName" class="w600" placeholder="请输入品牌名" maxlength="100" />
</el-form-item>
<el-form-item label="品牌视频">
<el-input
v-model="addMsg.VideoUrl"
class="w600"
size="small"
placeholder="请输入内容"
>
<el-button @click="changeState1 = true" slot="append"
>添加视频</el-button
>
<el-input v-model="addMsg.VideoUrl" class="w600" size="small" placeholder="请输入内容">
<el-button @click="changeState1 = true" slot="append">添加视频</el-button>
</el-input>
<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>
</el-form-item>
<el-form-item label="Logo" class="is-required" prop="Logo" size="small">
<el-button @click="openChangeDig(1)" size="small">选择文件</el-button>
<div
class="app-gallery-item"
style="position: relative; width: 100px; margin-top: 10px"
>
<img
v-if="!addMsg.Logo || addMsg.Logo == ''"
src="../../assets/img/default.png"
style="width: 80px; height: 80px"
alt=""
/>
<el-image
v-else
style="width: 80px; height: 80px"
:src="addMsg.Logo"
:preview-src-list="logoList"
>
<div class="app-gallery-item" style="position: relative; width: 100px; margin-top: 10px">
<img v-if="!addMsg.Logo || addMsg.Logo == ''" src="../../assets/img/default.png"
style="width: 80px; height: 80px" alt="" />
<el-image v-else style="width: 80px; height: 80px" :src="addMsg.Logo" :preview-src-list="logoList">
</el-image>
</div>
</el-form-item>
<el-form-item label="品牌介绍图">
<el-tooltip
class="item"
effect="dark"
content="第一张图片为封面图"
placement="top"
style="position: absolute; left: -5px; top: 12px"
>
<el-tooltip class="item" effect="dark" content="第一张图片为封面图" placement="top"
style="position: absolute; left: -5px; top: 12px">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<p style="color: #c9c9c9; margin: 0 0 12px 20px">
......@@ -113,128 +45,54 @@
<div class="nav_Main">
<div class="nav_IconContent">
<draggable v-model="addMsg.BannerList">
<div
style="
<div style="
position: relative;
margin-right: 20px;
display: inline-block;
"
v-for="(item, index) in addMsg.BannerList"
:key="index + '2'"
>
<el-image
style="width: 100px; height: 100px"
:src="item"
:preview-src-list="addMsg.BannerList"
>
" v-for="(item, index) in addMsg.BannerList" :key="index + '2'">
<el-image style="width: 100px; height: 100px" :src="item" :preview-src-list="addMsg.BannerList">
</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="openChangeDig(2)"
v-if="addMsg.BannerList.length < 9"
class="add-image-btn 2222"
style="cursor: pointer"
>
<div @click="openChangeDig(2)" v-if="addMsg.BannerList.length < 9" class="add-image-btn 2222"
style="cursor: pointer">
+ 添加图片
</div>
</div>
</el-form-item>
<el-form-item
label="店铺数量"
prop="ShopNum"
class="is-required"
size="small"
>
<el-input
v-model="addMsg.ShopNum"
class="w600"
placeholder="请输入店铺数量"
type="number"
maxlength="3"
/>
<el-form-item label="店铺数量" prop="ShopNum" class="is-required" size="small">
<el-input v-model="addMsg.ShopNum" class="w600" placeholder="请输入店铺数量" type="number" maxlength="3" />
</el-form-item>
<el-form-item label="建筑面积" size="small" >
<el-input
v-model="addMsg.BuiltUpArea"
placeholder="请输入建筑面积"
type="number"
style="width: 200px"
maxlength="7"
/>
<el-form-item label="建筑面积" size="small">
<el-input v-model="addMsg.BuiltUpArea" placeholder="请输入建筑面积" type="number" style="width: 200px"
maxlength="7" />
<span style="margin: 0 10px">~</span>
<el-input
v-model="addMsg.EndBuiltUpArea"
placeholder="请输入建筑面积"
type="number"
style="width: 200px"
maxlength="7"
/>
<el-input v-model="addMsg.EndBuiltUpArea" placeholder="请输入建筑面积" type="number" style="width: 200px"
maxlength="7" />
</el-form-item>
<el-form-item label="需求面积" size="small">
<el-input
v-model="addMsg.AreaRequirement"
placeholder="请输入需求面积"
type="number"
style="width: 200px"
maxlength="7"
/>
<el-input v-model="addMsg.AreaRequirement" placeholder="请输入需求面积" type="number" style="width: 200px"
maxlength="7" />
<span style="margin: 0 10px">~</span>
<el-input
v-model="addMsg.EndAreaRequirement"
placeholder="请输入需求面积"
type="number"
style="width: 200px"
maxlength="7"
/>
<el-input v-model="addMsg.EndAreaRequirement" placeholder="请输入需求面积" type="number" style="width: 200px"
maxlength="7" />
</el-form-item>
<el-form-item label="客群定位" size="small">
<el-input
v-model="addMsg.CustomerType"
placeholder="请输入客群定位"
class="w600"
maxlength="200"
/>
<el-input v-model="addMsg.CustomerType" placeholder="请输入客群定位" class="w600" maxlength="200" />
</el-form-item>
<el-form-item label="品牌定位" size="small">
<el-input
v-model="addMsg.BrandType"
placeholder="请输入品牌定位"
class="w600"
maxlength="100"
/>
<el-input v-model="addMsg.BrandType" placeholder="请输入品牌定位" class="w600" maxlength="100" />
</el-form-item>
<el-form-item label="拓店区域" size="small">
<el-input
v-model="addMsg.StoreExpansion"
placeholder="请输入拓店区域"
class="w600"
maxlength="200"
/>
<el-input v-model="addMsg.StoreExpansion" placeholder="请输入拓店区域" class="w600" maxlength="200" />
</el-form-item>
<el-form-item label="商铺性质" size="small">
<el-select
class="w300"
v-model="addMsg.ProjectType"
size="small"
placeholder="请选择商铺性质"
>
<el-select class="w300" v-model="addMsg.ProjectType" size="small" placeholder="请选择商铺性质">
<el-option :key="0" label="请选择" :value="0"></el-option>
<el-option
v-for="item in ProjectTypeList"
:key="item.Id"
:label="item.Name"
:value="item.Id"
>
<el-option v-for="item in ProjectTypeList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
......@@ -247,28 +105,16 @@
<el-radio v-model="addMsg.IsShopSize" :label="1"></el-radio>
<el-radio v-model="addMsg.IsShopSize" :label="0"></el-radio>
</el-form-item>
<el-input
v-model="addMsg.ShopSize"
v-if="addMsg.IsShopSize == 1"
size="small"
class="w120"
placeholder="店铺开口尺寸"
maxlength="80"
/>
<el-input v-model="addMsg.ShopSize" v-if="addMsg.IsShopSize == 1" size="small" class="w120"
placeholder="店铺开口尺寸" maxlength="80" />
</div>
<div class="brandShuxing_item">
<el-form-item label="燃气" class="is-required">
<el-radio v-model="addMsg.RanQi" :label="1"></el-radio>
<el-radio v-model="addMsg.RanQi" :label="0"></el-radio>
</el-form-item>
<el-input
v-model="addMsg.RanQiBZ"
v-if="addMsg.RanQi == 1"
size="small"
class="w120"
placeholder="燃气备注"
maxlength="80"
/>
<el-input v-model="addMsg.RanQiBZ" v-if="addMsg.RanQi == 1" size="small" class="w120" placeholder="燃气备注"
maxlength="80" />
</div>
</div>
<div class="brandShuxing">
......@@ -277,28 +123,16 @@
<el-radio v-model="addMsg.PaiYan" :label="1"></el-radio>
<el-radio v-model="addMsg.PaiYan" :label="0"></el-radio>
</el-form-item>
<el-input
v-model="addMsg.PaiYanBZ"
v-if="addMsg.PaiYan == 1"
size="small"
class="w120"
placeholder="排烟量"
maxlength="80"
/>
<el-input v-model="addMsg.PaiYanBZ" v-if="addMsg.PaiYan == 1" size="small" class="w120" placeholder="排烟量"
maxlength="80" />
</div>
<div class="brandShuxing_item">
<div class="brandShuxing_item">
<el-form-item label="电量" class="is-required">
<el-radio v-model="addMsg.IsDianLiang" :label="1"></el-radio>
<el-radio v-model="addMsg.IsDianLiang" :label="0"></el-radio>
</el-form-item>
<el-input
v-model="addMsg.DianLiang"
v-if="addMsg.IsDianLiang == 1"
size="small"
class="w120"
placeholder="电量"
maxlength="80"
/>
<el-input v-model="addMsg.DianLiang" v-if="addMsg.IsDianLiang == 1" size="small" class="w120"
placeholder="电量" maxlength="80" />
</div>
</div>
<div class="brandShuxing">
......@@ -328,11 +162,11 @@
<el-radio v-model="addMsg.KongTiao" :label="0"></el-radio>
</el-form-item>
</div>
</div>
<div class="brandShuxing">
<div class="brandShuxing_item">
<el-form-item label="新风" class="is-required">
<el-radio v-model="addMsg.XinFeng" :label="1"></el-radio>
......@@ -345,47 +179,36 @@
<el-radio v-model="addMsg.IsInChengdu" :label="0"></el-radio>
</el-form-item>
</div>
</div>
<div class="brandShuxing">
<div class="brandShuxing_item">
<el-form-item label="开店意愿" class="is-required">
<el-radio v-model="ShopWish" :label="1"></el-radio>
<el-radio v-model="ShopWish" :label="0"></el-radio>
</el-form-item>
<el-rate
style="margin-top: 10px;"
v-model="addMsg.OpenShopWish"
v-if="ShopWish == 1"
:colors="colors">
</el-rate>
<el-rate style="margin-top: 10px;" v-model="addMsg.OpenShopWish" v-if="ShopWish == 1" :colors="colors">
</el-rate>
</div>
</div>
<el-form-item label="联系人">
<el-input v-model="addMsg.ContactName" class="w600" size="small" placeholder="请输入联系人">
</el-input>
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="addMsg.ContactPhone" class="w600" size="small" placeholder="请输入联系电话">
</el-input>
</el-form-item>
<el-form-item label="招引需求" class="ue-style">
<el-input
type="textarea"
placeholder="请输入招引需求"
v-model="addMsg.Other"
maxlength="500"
show-word-limit
class="w600"
rows="8"
>
<el-input type="textarea" placeholder="请输入招引需求" v-model="addMsg.Other" maxlength="500" show-word-limit
class="w600" rows="8">
</el-input>
</el-form-item>
<el-form-item label="广告" class="ue-style">
<UE
style="width: 700px"
:defaultMsg="Advertising"
:config="config"
:IsMultiple="true"
ref="ue"
></UE>
<UE style="width: 700px" :defaultMsg="Advertising" :config="config" :IsMultiple="true" ref="ue"></UE>
</el-form-item>
<!-- <el-form-item label="其他" class="ue-style">
<UE
......@@ -399,9 +222,7 @@
</el-form>
</div>
<div style="margin-top: 20px">
<el-button size="small" type="primary" @click="Save('addMsg')"
>保存</el-button
>
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
</div>
<!-- 选择文件 -->
<el-dialog title="选择文件" :visible.sync="changeState" width="1240px">
......@@ -414,377 +235,375 @@
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import UE from "@/components/global/UE.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
import draggable from "vuedraggable";
export default {
components: {
ChooseImg,
UE,
Choosevideo,
draggable,
},
data() {
return {
colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
addMsg: {
ID: 0,
Logo: "", //Logo
BannerList: [], //品牌介绍图
VideoUrl: "", //品牌视频
FullBrandName: "", //品牌全名
BrandName: "", //品牌名
ShopNum: "", //店铺数量
BuiltUpArea: 0, //建筑面积小
EndBuiltUpArea: 0, //建筑面积大
CustomerType: "", //客群定位
BrandType: "", //品牌定位
StoreExpansion: "", //扩店区域
ProjectType: 0, //商铺性质
AreaRequirement: 0, //
EndAreaRequirement: 0, //
Advertising: "", //广告
Other: "", //其他
ShopSize: 1, //店铺开口尺寸
Plumbing: 1, //上下水
Caliber: 1, //管径
Sewage: 1, //排污
RanQi: 1, //燃气
DianLiang: "", //电量
PaiYan: 1, //排烟量
KongTiao: 1, //空调
XinFeng: 1, //新风
BrandClassId: 0, //品牌分类Id
RanQiBZ: "", //燃气备注
IsDianLiang: 1, //电量(0-否1-有)
PaiYanBZ: "", //排烟量备注
ShopSize: "", //店铺开口尺寸
IsShopSize: 1, //店铺开口尺寸(0-否1-有)
OpenShopWish:5,//开店意愿
IsInChengdu:0,//是否成都落地
},
loadingPeople: false,
dynamicTags: [],
dynamicTags2: [],
inputVisible: false,
inputValue: "",
inputVisible2: false,
inputValue2: "",
Advertising: "",
Other: "",
config: {
initialFrameWidth: null,
initialFrameHeight: 200,
},
Picindex: 0,
rules: {
FullBrandName: [
{
import ChooseImg from "@/components/global/ChooseImg.vue";
import UE from "@/components/global/UE.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
import draggable from "vuedraggable";
export default {
components: {
ChooseImg,
UE,
Choosevideo,
draggable,
},
data() {
return {
colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
addMsg: {
ID: 0,
Logo: "", //Logo
BannerList: [], //品牌介绍图
VideoUrl: "", //品牌视频
FullBrandName: "", //品牌全名
BrandName: "", //品牌名
ShopNum: "", //店铺数量
BuiltUpArea: 0, //建筑面积小
EndBuiltUpArea: 0, //建筑面积大
CustomerType: "", //客群定位
BrandType: "", //品牌定位
StoreExpansion: "", //扩店区域
ProjectType: 0, //商铺性质
AreaRequirement: 0, //
EndAreaRequirement: 0, //
Advertising: "", //广告
Other: "", //其他
ShopSize: 1, //店铺开口尺寸
Plumbing: 1, //上下水
Caliber: 1, //管径
Sewage: 1, //排污
RanQi: 1, //燃气
DianLiang: "", //电量
PaiYan: 1, //排烟量
KongTiao: 1, //空调
XinFeng: 1, //新风
BrandClassId: 0, //品牌分类Id
RanQiBZ: "", //燃气备注
IsDianLiang: 1, //电量(0-否1-有)
PaiYanBZ: "", //排烟量备注
ShopSize: "", //店铺开口尺寸
IsShopSize: 1, //店铺开口尺寸(0-否1-有)
OpenShopWish: 5, //开店意愿
IsInChengdu: 0, //是否成都落地
ContactName: "", //联系人
ContactPhone: "", //联系电话
},
loadingPeople: false,
dynamicTags: [],
dynamicTags2: [],
inputVisible: false,
inputValue: "",
inputVisible2: false,
inputValue2: "",
Advertising: "",
Other: "",
config: {
initialFrameWidth: null,
initialFrameHeight: 200,
},
Picindex: 0,
rules: {
FullBrandName: [{
required: true,
message: "请输入品牌全名",
trigger: "blur",
},
],
BrandName: [
{
}, ],
BrandName: [{
required: true,
message: "请输入品牌名",
trigger: "blur",
},
],
Logo: [
{
}, ],
Logo: [{
required: true,
message: "请选择Logo",
trigger: "blur",
},
],
ShopNum: [
{
}, ],
ShopNum: [{
required: true,
message: "请输入店铺数量",
trigger: "blur",
},
],
},
loading: false,
changeState: false,
changeState1: false,
imgType: 0,
peopleData: [],
BrandClassList: [], //品牌分类列表
ProjectTypeList: [], //商铺性质列表
logoList: [],
ShopWish:1,
};
},
created() {
this.getBrandClassList();
this.getProjectType();
},
mounted() {
if (this.$route.query.ID) {
this.getData(this.$route.query.ID);
}
},
methods: {
//获取商铺性质
getProjectType() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.ProjectTypeList = res.data.data;
} else {
this.Error(res.data.message);
}
});
},
//选择图片
SelectId(msg) {
let url = this.getIconLink(msg.url);
if (this.imgType == 1) {
this.addMsg.Logo = url;
}
if (this.imgType == 2) {
this.addMsg.BannerList.push(url);
}
this.changeState = false;
},
//删除品牌介绍图片
ClearCarouse(index) {
this.addMsg.BannerList.splice(index, 1);
}, ],
},
loading: false,
changeState: false,
changeState1: false,
imgType: 0,
peopleData: [],
BrandClassList: [], //品牌分类列表
ProjectTypeList: [], //商铺性质列表
logoList: [],
ShopWish: 1,
};
},
openChangeDig(num) {
this.changeState = true;
this.imgType = num;
created() {
this.getBrandClassList();
this.getProjectType();
},
Selectvideo(val) {
this.addMsg.VideoUrl = val.Path;
this.changeState1 = false;
mounted() {
if (this.$route.query.ID) {
this.getData(this.$route.query.ID);
}
},
getBrandClassList() {
this.apipost("/api/Trade/GetBrandClassList", { BrandCategory:3}, (res) => {
if (res.data.resultCode == 1) {
this.BrandClassList = res.data.data;
} else {
this.Error(res.data.message);
methods: {
//获取商铺性质
getProjectType() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.ProjectTypeList = res.data.data;
} else {
this.Error(res.data.message);
}
});
},
//选择图片
SelectId(msg) {
let url = this.getIconLink(msg.url);
if (this.imgType == 1) {
this.addMsg.Logo = url;
}
});
},
//保存品牌
Save(formName) {
//广告
let advertising = this.$refs.ue.getUEContent();
this.addMsg.Advertising = advertising;
//其他
// let other = this.$refs.ueother.getUEContent();
// this.addMsg.Other = other;
if(this.addMsg.BuiltUpArea==='' || this.addMsg.EndBuiltUpArea===''){
this.Error('请输入建筑面积')
return
}
if(this.addMsg.AreaRequirement==='' || this.addMsg.EndAreaRequirement===''){
this.Error('请输入需求面积')
return
}
if(this.ShopWish == 0){
this.addMsg.OpenShopWish = -1
}
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost("/api/Trade/GetSetBrand", this.addMsg, (res) => {
if (res.data.resultCode == 1) {
this.CommonJump("brandManagement");
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
});
} else {
return false;
if (this.imgType == 2) {
this.addMsg.BannerList.push(url);
}
});
},
//获取详情
getData(ID) {
this.loading = true;
this.apipost(
"/api/Trade/GetBrandDetails",
{
ID: ID,
},
(res) => {
this.loading = false;
this.changeState = false;
},
//删除品牌介绍图片
ClearCarouse(index) {
this.addMsg.BannerList.splice(index, 1);
},
openChangeDig(num) {
this.changeState = true;
this.imgType = num;
},
Selectvideo(val) {
this.addMsg.VideoUrl = val.Path;
this.changeState1 = false;
},
getBrandClassList() {
this.apipost("/api/Trade/GetBrandClassList", {
BrandCategory: 3
}, (res) => {
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
if (this.addMsg.Advertising && this.addMsg.Advertising != "") {
this.Advertising = this.addMsg.Advertising;
}
// if (this.addMsg.Other && this.addMsg.Other != "") {
// this.Other = this.addMsg.Other;
// }
if(this.addMsg.OpenShopWish==-1){
this.ShopWish = 0
}
this.logoList = [];
this.logoList.push(this.addMsg.Logo);
this.BrandClassList = res.data.data;
} else {
this.Error(res.data.message);
}
});
},
//保存品牌
Save(formName) {
//广告
let advertising = this.$refs.ue.getUEContent();
this.addMsg.Advertising = advertising;
//其他
// let other = this.$refs.ueother.getUEContent();
// this.addMsg.Other = other;
if (this.addMsg.BuiltUpArea === '' || this.addMsg.EndBuiltUpArea === '') {
this.Error('请输入建筑面积')
return
}
if (this.addMsg.AreaRequirement === '' || this.addMsg.EndAreaRequirement === '') {
this.Error('请输入需求面积')
return
}
);
if (this.ShopWish == 0) {
this.addMsg.OpenShopWish = -1
}
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost("/api/Trade/GetSetBrand", this.addMsg, (res) => {
if (res.data.resultCode == 1) {
this.CommonJump("brandManagement");
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
});
} else {
return false;
}
});
},
//获取详情
getData(ID) {
this.loading = true;
this.apipost(
"/api/Trade/GetBrandDetails", {
ID: ID,
},
(res) => {
this.loading = false;
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
if (this.addMsg.Advertising && this.addMsg.Advertising != "") {
this.Advertising = this.addMsg.Advertising;
}
// if (this.addMsg.Other && this.addMsg.Other != "") {
// this.Other = this.addMsg.Other;
// }
if (this.addMsg.OpenShopWish == -1) {
this.ShopWish = 0
}
this.logoList = [];
this.logoList.push(this.addMsg.Logo);
}
}
);
},
},
},
};
};
</script>
<style>
.app-add-cat .el-checkbox-group {
font-size: 14px !important;
}
.app-add-cat .el-checkbox {
margin-right: 0;
}
.app-add-cat .el-dialog__body {
padding: 10px 20px !important;
}
.app-add-cat .tag-box .tag-item {
margin-right: 5px;
}
.app-add-cat .tag-box {
margin: 20px 0;
}
.app-add-cat .app-goods-cat-list .active {
background: #fafafa;
}
.app-add-cat .app-goods-cat-list .cat-item {
cursor: pointer;
padding: 5px 10px;
}
.app-add-cat .app-goods-cat-list {
border: 1px solid #e8eaee;
border-radius: 5px;
margin-top: -5px;
padding: 10px 0;
overflow: scroll;
height: 400px;
}
.addbrand .blue {
color: #409eff;
}
.addbrand .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
.addbrand .gez_list {
/*width: 650px;*/
margin-bottom: 12px;
padding: 20px;
border: 1px solid #ebeef5;
background-color: #fff;
color: #303133;
}
.addbrand .quyu {
background-color: #f4f4f5;
color: #909399;
padding: 10px;
line-height: 30px;
height: 30px;
font-size: 12px;
border-radius: 4px;
white-space: nowrap;
margin: 5px;
}
.addbrand .el-tag + .el-tag {
margin-left: 10px;
}
.addbrand .button-new-tag {
margin-left: 10px;
height: 32px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
.addbrand .input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
.addbrand .ue-style .el-form-item__content {
line-height: 0;
}
.addbrand .app-gallery-item {
border: none;
}
.addbrand .nav_Main {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.addbrand .nav_IconContent {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
/* .addbrand .nav_IconContent div>div {
.app-add-cat .el-checkbox-group {
font-size: 14px !important;
}
.app-add-cat .el-checkbox {
margin-right: 0;
}
.app-add-cat .el-dialog__body {
padding: 10px 20px !important;
}
.app-add-cat .tag-box .tag-item {
margin-right: 5px;
}
.app-add-cat .tag-box {
margin: 20px 0;
}
.app-add-cat .app-goods-cat-list .active {
background: #fafafa;
}
.app-add-cat .app-goods-cat-list .cat-item {
cursor: pointer;
padding: 5px 10px;
}
.app-add-cat .app-goods-cat-list {
border: 1px solid #e8eaee;
border-radius: 5px;
margin-top: -5px;
padding: 10px 0;
overflow: scroll;
height: 400px;
}
.addbrand .blue {
color: #409eff;
}
.addbrand .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
.addbrand .gez_list {
/*width: 650px;*/
margin-bottom: 12px;
padding: 20px;
border: 1px solid #ebeef5;
background-color: #fff;
color: #303133;
}
.addbrand .quyu {
background-color: #f4f4f5;
color: #909399;
padding: 10px;
line-height: 30px;
height: 30px;
font-size: 12px;
border-radius: 4px;
white-space: nowrap;
margin: 5px;
}
.addbrand .el-tag+.el-tag {
margin-left: 10px;
}
.addbrand .button-new-tag {
margin-left: 10px;
height: 32px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
.addbrand .input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
.addbrand .ue-style .el-form-item__content {
line-height: 0;
}
.addbrand .app-gallery-item {
border: none;
}
.addbrand .nav_Main {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.addbrand .nav_IconContent {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
/* .addbrand .nav_IconContent div>div {
display: inline-block;
} */
.addbrand .colapp-image {
background-size: cover;
background-position: center center;
width: 100px;
height: 100px;
border-radius: 0%;
}
.addbrand .add-image-btn {
width: 100px;
height: 100px;
line-height: 100px;
color: #419efb;
border: 1px solid #e2e2e2;
cursor: pointer;
text-align: center;
}
.addbrand .delBtn {
position: absolute;
right: -8px;
top: -8px;
padding: 4px 4px !important;
}
.addbrand .w600 {
width: 600px;
}
.addbrand .brandShuxing {
display: flex;
justify-content: space-between;
width: 850px;
}
.addbrand .brandShuxing_item {
display: flex;
justify-content: space-between;
width: 50%;
}
.addbrand .colapp-image {
background-size: cover;
background-position: center center;
width: 100px;
height: 100px;
border-radius: 0%;
}
.addbrand .add-image-btn {
width: 100px;
height: 100px;
line-height: 100px;
color: #419efb;
border: 1px solid #e2e2e2;
cursor: pointer;
text-align: center;
}
.addbrand .delBtn {
position: absolute;
right: -8px;
top: -8px;
padding: 4px 4px !important;
}
.addbrand .w600 {
width: 600px;
}
.addbrand .brandShuxing {
display: flex;
justify-content: space-between;
width: 850px;
}
.addbrand .brandShuxing_item {
display: flex;
justify-content: space-between;
width: 50%;
}
</style>
......@@ -151,6 +151,13 @@
</el-table-column>
<el-table-column prop="CustomerType" label="客群定位" width="160">
</el-table-column>
<el-table-column prop="ContactName" label="联系人" width="100">
<template slot-scope="scope">
{{ scope.row.ContactName }}
<br />
{{ scope.row.ContactPhone }}
</template>
</el-table-column>
<el-table-column prop="UserName" width="100" label="认证用户"></el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope" v-if="!readonly">
......@@ -227,7 +234,7 @@
ExcelEnumIds: [],
UserId: 0, //用户认证
PrizeId: 0,
RandomNum:0,//随机数
RandomNum: 0, //随机数
},
usermsg: {
pageIndex: 1,
......@@ -303,7 +310,7 @@
downloadBrandFile() {
this.msg.ExcelEnumIds = this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
msg.RandomNum=Math.random();
msg.RandomNum = Math.random();
if (!msg.Id || msg.Id == "") {
msg.Id = 0;
}
......@@ -415,7 +422,7 @@
},
getBrandClassList() {
this.apipost("/api/Trade/GetBrandClassList", {
BrandCategory:3
BrandCategory: 3
}, (res) => {
if (res.data.resultCode == 1) {
this.BrandClassList = res.data.data;
......
<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-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
style="width: 80px; height: 80px"
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="
<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 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 @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 = 2)" class="add-image-btn 2222">
+ 添加图片
</div>
</div>
......@@ -88,61 +48,29 @@
<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="
<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 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 = 3)"
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="">
<el-select
v-model="addMsg.OpeningStatus"
filterable
size="small"
placeholder="请选择"
>
<el-option
v-for="item in OpeningStatusList"
:key="item.id"
:label="item.name"
:value="item.id"
>
<el-select v-model="addMsg.OpeningStatus" filterable size="small" placeholder="请选择">
<el-option v-for="item in OpeningStatusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
......@@ -158,11 +86,8 @@
<i class="el-icon-plus" @click="addTypeAndNum"></i>
</el-tooltip> -->
</div>
<div
style="width: 690px; display: flex; align-items: center"
v-for="(item, index) in addMsg.FirstShopNumList"
:key="index"
>
<div style="width: 690px; display: flex; align-items: center" v-for="(item, index) in addMsg.FirstShopNumList"
:key="index">
<!-- <el-select
v-model="item.Id"
filterable
......@@ -178,23 +103,17 @@
>
</el-option>
</el-select> -->
<div
style="
<div style="
width: 40%;
white-space: nowrap;
border-radius: 4px;
border: 1px solid #dcdfe6;
height: 32px;
line-height: 32px;
"
>
">
{{ item.Name }}
</div>
<el-input
v-model="item.Num"
size="small"
placeholder="首店数量"
></el-input>
<el-input v-model="item.Num" size="small" placeholder="首店数量"></el-input>
<!-- <el-tooltip
class="item"
effect="dark"
......@@ -206,245 +125,116 @@
</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="项目地址" prop="Address">
<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-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="店铺数量" prop="ShopNum">
<el-input
v-model="addMsg.ShopNum"
@keyup.native="checkInteger(addMsg, 'ShopNum')"
style="width: 690px"
size="small"
placeholder="请输入店铺数量"
>
<el-input v-model="addMsg.ShopNum" @keyup.native="checkInteger(addMsg, 'ShopNum')" style="width: 690px"
size="small" placeholder="请输入店铺数量">
</el-input>
</el-form-item>
<el-form-item label="经营面积" prop="BuiltUpArea">
<el-input
v-model="addMsg.BuiltUpArea"
@keyup.native="checkPrice(addMsg, 'BuiltUpArea')"
style="width: 690px"
size="small"
placeholder="请输入经营面积"
>
<el-input v-model="addMsg.BuiltUpArea" @keyup.native="checkPrice(addMsg, 'BuiltUpArea')" style="width: 690px"
size="small" placeholder="请输入经营面积">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="可租赁面积" prop="AreaRequirement">
<el-input
v-model="addMsg.AreaRequirement"
@keyup.native="checkPrice(addMsg, 'AreaRequirement')"
style="width: 690px"
size="small"
placeholder="请输入可租赁面积"
>
<el-input v-model="addMsg.AreaRequirement" @keyup.native="checkPrice(addMsg, 'AreaRequirement')"
style="width: 690px" size="small" placeholder="请输入可租赁面积">
<template slot="append"></template>
</el-input>
</el-form-item>
<el-form-item label="去年业绩" prop="YeJi">
<el-input
v-model="addMsg.YeJi"
@keyup.native="checkPrice(addMsg, 'YeJi')"
style="width: 690px"
size="small"
placeholder="请输入去年业绩"
>
<el-input v-model="addMsg.YeJi" @keyup.native="checkPrice(addMsg, 'YeJi')" style="width: 690px" size="small"
placeholder="请输入去年业绩">
</el-input>
</el-form-item>
<el-form-item label="商业体量" prop="CarrierSize">
<el-input
v-model="addMsg.CarrierSize"
@keyup.native="checkPrice(addMsg, 'CarrierSize')"
style="width: 690px"
size="small"
placeholder="请输入商业体量"
>
<el-input v-model="addMsg.CarrierSize" @keyup.native="checkPrice(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 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 v-model="addMsg.StartingInfo" style="width: 690px" size="small" placeholder="请输入首发、首秀、首展的招引优惠政策">
</el-input>
</el-form-item>
<el-form-item label="联系人">
<el-input v-model="addMsg.ContactName" style="width: 690px" size="small" placeholder="请输入联系人">
</el-input>
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="addMsg.ContactPhone" 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
>
<el-button @click="Save('addMsg')" size="small" type="primary">保存</el-button>
</div>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
......@@ -462,409 +252,391 @@
</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 {
name: "editVehicle",
data() {
let validataType = (rule, value, callback) => {
if (this.addMsg.ProjectType == 0) {
return callback(new Error("请选择项目类型"));
} else {
callback();
}
};
let validataLogo = (rule, value, callback) => {
if (this.addMsg.Logo == "") {
return callback(new Error("请上传Logo"));
} else {
callback();
}
};
return {
pageloading: false,
addMsg: {
ID: 0,
CarrierName: "", // 载体名称
Logo: "",
BannerList: [], //载体介绍图
VideoUrl: "", //载体视频
Address: "", //载体地址
LatAndLon: "", //载体地址经纬度
Developers: "", //开发商
OpenTime: "", //开业时间
ProjectType: 0, //项目类型
CarrierSize: 0, //商业体量
LayersNum: "", //商业层数
CarNum: 0, //车位数量
CarrierPlan: "", //业态规划
CarrierTarget: "", //招引目标
Location: "", //定位
Crowd: "", //目标人群
CarrierMetroList: [], //地铁信息
FirstShopNumList: [
//载体类型、数量
// {
// Id: 0,
// Name: "",
// Num: 0,
// },
],
HonorList: [], //载体荣誉
Discount: "", //招引优惠政策
StartingInfo: "", //首发政策
FirstShow: "", //首秀政策
FirstExhibition: "", //首展政策
ShopNum: "", //店铺数量
BuiltUpArea: "", //经营面积
AreaRequirement: "", //可租赁面积
YeJi: "", //去年业绩
OpeningStatus: -1,
},
OpeningStatusList: [
{
id: 0,
name: "即将开业",
},
{
id: 1,
name: "已开业",
export default {
name: "editVehicle",
data() {
let validataType = (rule, value, callback) => {
if (this.addMsg.ProjectType == 0) {
return callback(new Error("请选择项目类型"));
} else {
callback();
}
};
let validataLogo = (rule, value, callback) => {
if (this.addMsg.Logo == "") {
return callback(new Error("请上传Logo"));
} else {
callback();
}
};
return {
pageloading: false,
addMsg: {
ID: 0,
CarrierName: "", // 载体名称
Logo: "",
BannerList: [], //载体介绍图
VideoUrl: "", //载体视频
Address: "", //载体地址
LatAndLon: "", //载体地址经纬度
Developers: "", //开发商
OpenTime: "", //开业时间
ProjectType: 0, //项目类型
CarrierSize: 0, //商业体量
LayersNum: "", //商业层数
CarNum: 0, //车位数量
CarrierPlan: "", //业态规划
CarrierTarget: "", //招引目标
Location: "", //定位
Crowd: "", //目标人群
CarrierMetroList: [], //地铁信息
FirstShopNumList: [
//载体类型、数量
// {
// Id: 0,
// Name: "",
// Num: 0,
// },
],
HonorList: [], //载体荣誉
Discount: "", //招引优惠政策
StartingInfo: "", //首发政策
FirstShow: "", //首秀政策
FirstExhibition: "", //首展政策
ShopNum: "", //店铺数量
BuiltUpArea: "", //经营面积
AreaRequirement: "", //可租赁面积
YeJi: "", //去年业绩
OpeningStatus: -1,
ContactName: "", //联系人
ContactPhone: "", //联系电话
},
],
rules: {
CarrierName: [
OpeningStatusList: [{
id: 0,
name: "即将开业",
},
{
id: 1,
name: "已开业",
},
],
rules: {
CarrierName: [{
required: true,
message: "请输入载体名称",
trigger: "blur",
},
],
Developers: [
{
}, ],
Developers: [{
required: true,
message: "请输入开发商",
trigger: "blur",
},
],
Address: [
{
}, ],
Address: [{
required: true,
message: "请输入项目地址",
trigger: "blur",
},
],
OpenTime: [
{
}, ],
OpenTime: [{
required: true,
message: "请选择开业时间",
trigger: "blur",
},
],
ProjectType: [
{
}, ],
ProjectType: [{
required: true,
validator: validataType,
trigger: "change",
},
],
Logo: [
{
}, ],
Logo: [{
required: true,
validator: validataLogo,
trigger: "change",
},
],
ShopNum: [
{
}, ],
ShopNum: [{
required: true,
message: "请输入店铺数量",
trigger: "change",
},
],
BuiltUpArea: [
{
}, ],
BuiltUpArea: [{
required: true,
message: "请输入经营面积",
trigger: "change",
},
],
AreaRequirement: [
{
}, ],
AreaRequirement: [{
required: true,
message: "请输入可租赁面积",
trigger: "change",
},
],
YeJi: [
{
}, ],
YeJi: [{
required: true,
message: "请输入去年业绩",
trigger: "change",
},
],
CarrierSize: [
{
}, ],
CarrierSize: [{
required: true,
message: "请输入商业体量",
trigger: "change",
},
],
},
ID: 0,
type: -1,
choicImg: false,
changeState1: false,
isShowMap: false, //显示地图
MetroList: [], //地铁信息数据
ProjectTypeList: [], //项目类型数组
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);
}
});
},
//新增地铁信息
addMetroList() {
let obj = {
MetroNum: "",
MetroName: "",
Distance: "",
}, ],
},
ID: 0,
type: -1,
choicImg: false,
changeState1: false,
isShowMap: false, //显示地图
MetroList: [], //地铁信息数据
ProjectTypeList: [], //项目类型数组
introImgList: [], //介绍图
LogoList: [],
shenList: [],
};
this.MetroList.push(obj);
},
//删除地铁信息
delCarrier(index) {
this.MetroList.splice(index, 1);
components: {
ChooseImg,
Choosevideo,
commonMap,
draggable,
},
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;
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);
}
});
},
//新增地铁信息
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() {
this.pageloading = true;
this.apipost(
"/api/Trade/GetCarrierDetails",
{
ID: this.ID,
},
(res) => {
this.pageloading = false;
if (res.data.resultCode == 1) {
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.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", " ");
getData() {
this.pageloading = true;
this.apipost(
"/api/Trade/GetCarrierDetails", {
ID: this.ID,
},
(res) => {
this.pageloading = false;
if (res.data.resultCode == 1) {
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.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.LogoList = [];
this.LogoList.push(this.addMsg.Logo);
} else {
this.Error(res.data.message);
}
this.LogoList = [];
this.LogoList.push(this.addMsg.Logo);
} else {
this.Error(res.data.message);
}
);
},
//选择图片
SelectId(msg) {
if (this.type == 1) {
this.addMsg.Logo = this.getIconLink(msg.url);
}
);
},
//选择图片
SelectId(msg) {
if (this.type == 1) {
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);
}
if (this.type == 3) {
this.addMsg.HonorList.splice(index, 1);
}
},
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.data.resultCode == 1) {
this.shenList = res.data.data;
if (this.addMsg.FirstShopNumList.length === 0) {
this.shenList.map((e) => {
let obj = {
Id: e.Id,
Name: e.Name,
Num: 0,
};
this.addMsg.FirstShopNumList.push(obj);
});
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;
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.data.resultCode == 1) {
this.shenList = res.data.data;
if (this.addMsg.FirstShopNumList.length === 0) {
this.shenList.map((e) => {
let obj = {
Id: e.Id,
Name: e.Name,
Num: 0,
};
this.addMsg.FirstShopNumList.push(obj);
});
}
}
}
}
);
},
addTypeAndNum() {
this.addMsg.FirstShopNumList.push({
Id: 0,
Name: "",
Num: 0,
});
},
delTypeAndNum(index) {
this.addMsg.FirstShopNumList.splice(index, 1);
);
},
addTypeAndNum() {
this.addMsg.FirstShopNumList.push({
Id: 0,
Name: "",
Num: 0,
});
},
delTypeAndNum(index) {
this.addMsg.FirstShopNumList.splice(index, 1);
},
},
},
};
};
</script>
<style>
.editVehicle .content {
background: #fff;
margin-top: 10px;
box-sizing: border-box;
}
.editVehicle .content {
background: #fff;
margin-top: 10px;
box-sizing: border-box;
}
.editVehicle .editIconImg {
width: 80px;
height: 80px;
}
.editVehicle .editIconImg {
width: 80px;
height: 80px;
}
.editVehicle .add-image-btn {
width: 100px;
height: 100px;
line-height: 100px;
color: #419efb;
border: 1px solid #e2e2e2;
cursor: pointer;
text-align: center;
}
.editVehicle .add-image-btn {
width: 100px;
height: 100px;
line-height: 100px;
color: #419efb;
border: 1px solid #e2e2e2;
cursor: pointer;
text-align: center;
}
.editVehicle .nav_Main {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.editVehicle .nav_Main {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.editVehicle .nav_IconContent {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.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 {
background-size: cover;
background-position: center center;
width: 100px;
height: 100px;
border-radius: 0%;
}
.editVehicle .colapp-image {
background-size: cover;
background-position: center center;
width: 100px;
height: 100px;
border-radius: 0%;
}
.editVehicle .delBtn {
position: absolute;
right: -8px;
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;
}
.delCarrClose {
position: absolute;
right: 53px;
top: 8px;
padding: 4px 4px !important;
}
</style>
......@@ -72,7 +72,7 @@
}
.offlineIndex .mainRightLeft {
width: 110px;
width: 170px;
height: 60px;
line-height: 62px;
text-align: center;
......
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