Commit 494e00ce authored by zhengke's avatar zhengke

修改

parent 28678855
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<div class="VehicleManagement"> <div class="VehicleManagement">
<div class="head-title"> <div class="head-title">
载体管理 载体管理
<el-button style="float:right;margin-top: -5px;" size="small" type="primary" <el-button style="float:right;margin-top: -5px;" size="small" type="primary" @click="CommonJump('editVehicle')">
@click="CommonJump('editVehicle')">新增载体</el-button> 新增载体</el-button>
</div> </div>
<div class="content"> <div class="content">
<div> <div>
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
</el-date-picker> </el-date-picker>
</div> </div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%;margin:20px 0"> <el-table :data="tableData" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="CarrierName" width="200" label="载体名称">
</el-table-column>
<el-table-column prop="CarrierMetroList" label="地铁信息" width="200"> <el-table-column prop="CarrierMetroList" label="地铁信息" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="(item,index) in scope.row.CarrierMetroList" :key="index" class="CarrierList"> <div v-for="(item,index) in scope.row.CarrierMetroList" :key="index" class="CarrierList">
...@@ -64,21 +66,12 @@ ...@@ -64,21 +66,12 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="BannerList" label="载体图片"> <el-table-column prop="Logo" width="100" label="logo">
<template slot-scope="scope">
<img :src="item" style="width:40px;" v-for="(item,index) in scope.row.BannerList" :key="index">
</template>
</el-table-column>
<el-table-column prop="ID" label="载体id" width="80">
</el-table-column>
<el-table-column prop="CarrierName" width="200" label="载体名称">
</el-table-column>
<el-table-column prop="Logo" width="150" label="logo">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.Logo" style="width:50px;" /> <img :src="scope.row.Logo" style="width:50px;" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="VideoUrl" width="150" label="载体视频"> <el-table-column prop="VideoUrl" width="200" label="载体视频">
</el-table-column> </el-table-column>
<el-table-column prop="Address" width="200" label="载体地址"> <el-table-column prop="Address" width="200" label="载体地址">
</el-table-column> </el-table-column>
...@@ -87,6 +80,9 @@ ...@@ -87,6 +80,9 @@
<el-table-column prop="OpenTime" width="180" label="开业时间"> <el-table-column prop="OpenTime" width="180" label="开业时间">
</el-table-column> </el-table-column>
<el-table-column prop="ProjectType" width="100" label="项目类型"> <el-table-column prop="ProjectType" width="100" label="项目类型">
<template slot-scope="scope">
{{getProject(scope.row.ProjectType)}}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="CarrierSize" width="100" label="商业体量"> <el-table-column prop="CarrierSize" width="100" label="商业体量">
</el-table-column> </el-table-column>
...@@ -136,11 +132,13 @@ ...@@ -136,11 +132,13 @@
dateStr: [], //日期 dateStr: [], //日期
total: 0, total: 0,
tableData: [], //数据列表 tableData: [], //数据列表
isShowAdd:false, //新增修改载体 isShowAdd: false, //新增修改载体
ProjectTypeList: [], //项目类型
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getTypeEnumList();
}, },
methods: { methods: {
getList() { getList() {
...@@ -163,7 +161,7 @@ ...@@ -163,7 +161,7 @@
}) })
}, },
//删除 //删除
delManage(obj){ delManage(obj) {
let that = this; let that = this;
that.Confirm("是否删除?", function () { that.Confirm("是否删除?", function () {
that.apipost( that.apipost(
...@@ -186,6 +184,26 @@ ...@@ -186,6 +184,26 @@
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
//获取项目类型
getTypeEnumList() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, res => {
if (res.data.resultCode == 1) {
this.ProjectTypeList = res.data.data;
console.log(res, '类型');
}
})
},
//获取项目类型
getProject(type) {
let str = ''
this.ProjectTypeList.forEach(x => {
if (x.Id == type) {
str = x.Name
}
})
return str;
}
}, },
mounted() {} mounted() {}
}; };
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
</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="Name"> <el-form-item label="载体名称" prop="CarrierName">
<el-input v-model="addMsg.CarrierName" style="width:690px" size="small"> <el-input v-model="addMsg.CarrierName" style="width:690px" size="small">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="Logo"> <el-form-item label="Logo" prop="Logo">
<div> <div>
<el-tooltip class="item" effect="dark" content="建议尺寸:88*88" placement="top-start"> <el-tooltip class="item" effect="dark" content="建议尺寸:88*88" placement="top-start">
<el-button size="small" @click="choicImg=true,type=1">选择文件</el-button> <el-button size="small" @click="choicImg=true,type=1">选择文件</el-button>
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
<img v-else src="../../assets/img/default.png" alt="" /> <img v-else src="../../assets/img/default.png" alt="" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="媒体介绍图(多张)"> <el-form-item label="介绍图(多张)">
<div class="nav_Main"> <div class="nav_Main">
<div class="nav_IconContent"> <div class="nav_IconContent">
<div v-for="(item, index) in addMsg.BannerList" :key="index+'2'" <div v-for="(item, index) in introImgList" :key="index+'2'"
style="margin-right: 20px; position: relative; "> style="margin-right: 20px; position: relative; ">
<div class="colapp-image" :style="{ <div class="colapp-image" :style="{
backgroundImage: 'url(' + item + ')' backgroundImage: 'url(' + item + ')'
...@@ -37,11 +37,16 @@ ...@@ -37,11 +37,16 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="开发商" prop="Developers">
<el-input v-model="addMsg.Developers" style="width:690px" size="small" placeholder="请输入内容"></el-input>
</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 v-model="addMsg.VideoUrl" style="width:690px" size="small" placeholder="请输入内容">
<el-button @click="changeState1 = true" slot="append">添加视频</el-button> <el-button @click="changeState1 = true" slot="append">添加视频</el-button>
</el-input> </el-input>
<a v-if="addMsg.VideoUrl != ''" class="blue noline" :href="addMsg.VideoUrl" target="_blank">视频链接</a> <div>
<a v-if="addMsg.VideoUrl != ''" class="blue noline" :href="addMsg.VideoUrl" target="_blank">视频链接</a>
</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>
...@@ -51,14 +56,12 @@ ...@@ -51,14 +56,12 @@
<el-button @click="isShowMap = true" slot="append">展开地图</el-button> <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="开业时间" prop="OpenTime">
<el-input v-model="addMsg.Developers" style="width:690px" size="small" placeholder="请输入内容"></el-input> <el-date-picker v-model="addMsg.OpenTime" value-format="yyyy-MM-dd HH:mm:ss" size="small"
</el-form-item> type="datetime" placeholder="选择开业时间">
<el-form-item label="开业时间">
<el-date-picker v-model="addMsg.OpenTime" size="small" type="datetime" placeholder="选择开业时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="项目类型"> <el-form-item label="项目类型" prop="ProjectType">
<el-select style="width:220px;" v-model="addMsg.ProjectType" size="small" placeholder="请选择"> <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 v-for="item in ProjectTypeList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option> </el-option>
...@@ -74,7 +77,8 @@ ...@@ -74,7 +77,8 @@
</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" size="small" placeholder="请输入内容"> <el-input 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="生态规则">
...@@ -94,14 +98,14 @@ ...@@ -94,14 +98,14 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="地铁信息"> <el-form-item label="地铁信息">
<div v-for="(item,index) in addMsg.CarrierMetroList" :key="index" style="position:relative;"> <div v-for="(item,index) in MetroList" :key="index" style="position:relative;width:690px;">
<el-input v-model="item.MetroNum" style="width:200px" size="small" placeholder="地铁线路"/> <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.MetroName" style="width:200px" size="small" placeholder="站点名称" />
<el-input v-model="item.Distance" 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 @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>
...@@ -132,6 +136,20 @@ ...@@ -132,6 +136,20 @@
export default { export default {
name: "editVehicle", name: "editVehicle",
data() { 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 { return {
pageloading: false, pageloading: false,
addMsg: { addMsg: {
...@@ -145,7 +163,7 @@ ...@@ -145,7 +163,7 @@
Developers: '', //开发商 Developers: '', //开发商
OpenTime: '', //开业时间 OpenTime: '', //开业时间
ProjectType: 0, //项目类型 ProjectType: 0, //项目类型
CarrierSize: '', //商业体量 CarrierSize: 0, //商业体量
LayersNum: '', //商业层数 LayersNum: '', //商业层数
CarNum: 0, //车位数量 CarNum: 0, //车位数量
CarrierPlan: '', //业态规划 CarrierPlan: '', //业态规划
...@@ -155,23 +173,40 @@ ...@@ -155,23 +173,40 @@
CarrierMetroList: [] //地铁信息 CarrierMetroList: [] //地铁信息
}, },
rules: { rules: {
Name: [{ CarrierName: [{
required: true, required: true,
message: '请输入供应商名称', message: '请输入载体名称',
trigger: 'blur' trigger: 'blur'
}, ], }],
Mobile: [{ Developers: [{
required: true, required: true,
message: '请输入电话', message: '请输入开发商',
trigger: 'blur' trigger: 'blur'
}, ], }],
OpenTime: [{
required: true,
message: '请输入开业时间',
trigger: 'blur'
}],
ProjectType: [{
required: true,
validator: validataType,
trigger: 'change'
}],
Logo: [{
required: true,
validator: validataLogo,
trigger: 'change'
}]
}, },
ID: 0, ID: 0,
type: -1, type: -1,
choicImg: false, choicImg: false,
changeState1: false, changeState1: false,
isShowMap: false, //显示地图 isShowMap: false, //显示地图
MetroList:[],//地铁信息数据
ProjectTypeList: [], //项目类型数组 ProjectTypeList: [], //项目类型数组
introImgList:[], //介绍图
} }
}, },
components: { components: {
...@@ -191,40 +226,54 @@ ...@@ -191,40 +226,54 @@
getTypeEnumList() { getTypeEnumList() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, res => { this.apipost("/api/Trade/GetProjectTypeEnumList", {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log(res, '项目类型');
this.ProjectTypeList = res.data.data; this.ProjectTypeList = res.data.data;
let obj = {
Name: '不限',
Id: 0
}
this.ProjectTypeList.unshift(obj);
} }
}) })
}, },
//新增地铁信息 //新增地铁信息
addMetroList(){ addMetroList() {
let obj = { let obj = {
MetroNum:'', MetroNum: '',
MetroName:'', MetroName: '',
Distance:'' Distance: ''
} }
this.addMsg.CarrierMetroList.push(obj); this.MetroList.push(obj);
}, },
//删除地铁信息 //删除地铁信息
delCarrier(index){ delCarrier(index) {
this.MetroList.splice(index, 1);
}, },
Save(formName) { Save(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if(this.MetroList.length>0){
if (this.addMsg.Introducer == '') { for(var i=0;i<this.MetroList.length;i++){
this.addMsg.Introducer = 0 if(this.MetroList[i].MetroNum==''){
} this.Error(`请填写第地铁信息${i+1}行地铁线路`);
if (this.addMsg.Introducer == 0) { return;
this.addMsg.SupplierCommissionList = [] }
if(this.MetroList[i].MetroName==''){
this.Error(`请填写第地铁信息${i+1}行站点名称`);
return;
}
if(this.MetroList[i].Distance==''){
this.Error(`请填写第地铁信息${i+1}行距离`);
return;
}
}
} }
this.apipost('/api/Supplier/SetSupplier', this.addMsg, this.addMsg.CarrierMetroList = this.MetroList;
this.addMsg.BannerList = this.introImgList;
this.apipost('/api/Trade/GetSetCarrier', this.addMsg,
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.CommonJump('supplierManage') this.CommonJump('VehicleManagement')
this.Success(res.data.message) this.Success(res.data.message)
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -245,18 +294,16 @@ ...@@ -245,18 +294,16 @@
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.ID = data.ID; this.addMsg = res.data.data;
// this.addMsg.Name = data.Name; if(res.data.data.CarrierMetroList&&res.data.data.CarrierMetroList.length>0){
// this.addMsg.Mobile = data.Mobile; this.MetroList = res.data.data.CarrierMetroList
// this.addMsg.Address = data.Address; }
// this.addMsg.Introducer = data.Introducer; if(res.data.data.BannerList&&res.data.data.BannerList.length>0){
// this.addMsg.ClientBankAccount.ID = data.ClientBankAccount.ID; this.introImgList = res.data.data.BannerList
// this.addMsg.ClientBankAccount.AccountClassify = data.ClientBankAccount.AccountClassify; }
// this.addMsg.ClientBankAccount.OpenBankName = data.ClientBankAccount.OpenBankName; if(res.data.data.OpenTime){
// this.addMsg.ClientBankAccount.AccountHolder = data.ClientBankAccount.AccountHolder; this.addMsg.OpenTime = this.addMsg.OpenTime.replace('T',' ');
// this.addMsg.ClientBankAccount.CardNum = data.ClientBankAccount.CardNum; }
// this.addMsg.ClientBankAccount.AccountAlias = data.ClientBankAccount.AccountAlias;
// this.search.Name = data.IntroducerName;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -268,12 +315,12 @@ ...@@ -268,12 +315,12 @@
this.addMsg.Logo = this.getIconLink(msg.url); this.addMsg.Logo = this.getIconLink(msg.url);
} }
if (this.type == 2) { if (this.type == 2) {
this.addMsg.BannerList.push(msg.url); this.introImgList.push(msg.url);
} }
this.choicImg = false; this.choicImg = false;
}, },
ClearCarouse(index) { ClearCarouse(index) {
this.addMsg.BannerList.splice(index, 1); this.introImgList.splice(index, 1);
}, },
Selectvideo(val) { Selectvideo(val) {
this.addMsg.VideoUrl = val.Path; this.addMsg.VideoUrl = val.Path;
...@@ -348,11 +395,13 @@ ...@@ -348,11 +395,13 @@
top: -8px; top: -8px;
padding: 4px 4px !important; padding: 4px 4px !important;
} }
.delCarrClose{
.delCarrClose {
position: absolute; position: absolute;
right: 0; right: 53px;
top: 0; top: 8px;
padding: 4px 4px !important; padding: 4px 4px !important;
} }
</style> </style>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="BusinessLicense" width="150" label="营业执照"> <el-table-column prop="BusinessLicense" width="150" label="营业执照">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.BusinessLicense" alt="" /> <img :src="scope.row.BusinessLicense" style="width:50px;" alt="" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="UnifiedCode" label="统一社会信用代码"> <el-table-column prop="UnifiedCode" label="统一社会信用代码">
...@@ -57,6 +57,9 @@ ...@@ -57,6 +57,9 @@
style="margin:0 9px;color:#C0C4CC">/</span><span>详情</span> style="margin:0 9px;color:#C0C4CC">/</span><span>详情</span>
</div> </div>
<div class="content"> <div class="content">
<div style="margin:20px 0;font-weight:bold;">
<span class="tradeLine"></span>公司信息
</div>
<el-row style="margin-bottom:20px;"> <el-row style="margin-bottom:20px;">
<el-col :span="6"> <el-col :span="6">
公司id:{{listInfo.CompanyId}} 公司id:{{listInfo.CompanyId}}
...@@ -65,7 +68,7 @@ ...@@ -65,7 +68,7 @@
企业名称:{{listInfo.CompanyName}} 企业名称:{{listInfo.CompanyName}}
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
营业执照:{{listInfo.BusinessLicense}} 法人:{{listInfo.LegalPerson}}
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
统一社会信用代码:{{listInfo.UnifiedCode}} 统一社会信用代码:{{listInfo.UnifiedCode}}
...@@ -81,12 +84,14 @@ ...@@ -81,12 +84,14 @@
<el-col :span="6"> <el-col :span="6">
联系电话:{{listInfo.Mobile}} 联系电话:{{listInfo.Mobile}}
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6" style="display:flex;">
法人:{{listInfo.LegalPerson}} 营业执照:<img :src="listInfo.BusinessLicense" style="width:40px;" />
</el-col> </el-col>
</el-row> </el-row>
<template v-if="listInfo.BrandModel"> <template v-if="listInfo.BrandModel">
<div style="margin:20px 0;">品牌信息</div> <div style="margin:20px 0;font-weight:bold;">
<span class="tradeLine"></span>品牌信息
</div>
<el-row style="margin-bottom:20px;"> <el-row style="margin-bottom:20px;">
<el-col :span="6"> <el-col :span="6">
客户群体:<span v-for="(item,index) in listInfo.BrandModel.CustomerTypeInfo" :key="index">{{item}}</span> 客户群体:<span v-for="(item,index) in listInfo.BrandModel.CustomerTypeInfo" :key="index">{{item}}</span>
...@@ -163,7 +168,6 @@ ...@@ -163,7 +168,6 @@
this.apipost("/api/Trade/GetCompanyPageList", this.msg, res => { this.apipost("/api/Trade/GetCompanyPageList", this.msg, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log(res, '数据来了');
this.total = res.data.data.count; this.total = res.data.data.count;
let pageData = res.data.data.pageData; let pageData = res.data.data.pageData;
this.tableData = pageData; this.tableData = pageData;
...@@ -184,7 +188,6 @@ ...@@ -184,7 +188,6 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.isShowInfo = true; this.isShowInfo = true;
this.listInfo = res.data.data; this.listInfo = res.data.data;
console.log(res,'详情数据!');
} }
}) })
}, },
...@@ -235,5 +238,11 @@ ...@@ -235,5 +238,11 @@
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.realAuthentication .tradeLine{
display: inline-block;
width:3px;
height:10px;
margin-right:5px;
background-color: #409EFF;
}
</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