Commit 60a388ba authored by zhengke's avatar zhengke

修改

parent a3b66ff9
......@@ -11,7 +11,7 @@ export default {
</script>
<style>
@import "//at.alicdn.com/t/font_1769104_3piwls5qg15.css";
@import "//at.alicdn.com/t/font_1769104_m5nx47o7118.css";
@import "./assets/css/common.css";
@import "./assets/css/zkcss.css";
html,
......
......@@ -8,9 +8,9 @@
</div>
<div class="content">
<div>
<div class="searchInput" style="width:150px">
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:125px;height:30px" placeholder="活动类型名称" v-model="msg.TypeName"
style="display:inline-block;width:225px;height:30px" placeholder="活动类型名称" v-model="msg.TypeName"
size="small" clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
......@@ -23,6 +23,10 @@
<el-table-column prop="TypeName" label="类型名称">
</el-table-column>
<el-table-column prop="CoverImage" label="封面图">
<template slot-scope="scope">
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.CoverImage + ')',backgroundSize:'cover'}">
</div>
</template>
</el-table-column>
<el-table-column prop="Id" width="200" label="操作">
<template slot-scope="scope">
......@@ -31,8 +35,7 @@
alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="delType(scope.row)" circle style="padding:6px;">
</el-button>
<img @click="delType(scope.row)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
</template>
</el-table-column>
......@@ -50,7 +53,7 @@
<div class="content">
<el-form label-width="120px">
<el-form-item label="类型名称">
<el-input type="text" class="w300" v-model="addMsg.TypeName" size="small"></el-input>
<el-input type="text" class="w400" v-model="addMsg.TypeName" size="small"></el-input>
</el-form-item>
<el-form-item label="封面图" size="small">
<el-button @click="isShowImage=true" size="small">选择文件</el-button>
......
......@@ -6,13 +6,13 @@
<div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px" style="width:60%">
<el-form-item label="姓名" prop="Name" class="is-required">
<el-input v-model="addMsg.Name" placeholder="请输入姓名" maxlength="20" />
<el-input v-model="addMsg.Name" placeholder="请输入姓名" size="small" maxlength="20" />
</el-form-item>
<el-form-item label="电话" class="is-required">
<el-input v-model="addMsg.Tel" placeholder="请输入联系电话" maxlength="20" />
<el-form-item label="电话" class="is-required" prop="Tel">
<el-input v-model="addMsg.Tel" placeholder="请输入联系电话" size="small" maxlength="20" />
</el-form-item>
<el-form-item label="职位" class="is-required">
<el-input v-model="addMsg.Position" placeholder="请输入职位名称" maxlength="50" />
<el-form-item label="职位" class="is-required" prop="Position">
<el-input v-model="addMsg.Position" placeholder="请输入职位名称" size="small" maxlength="50" />
</el-form-item>
<el-form-item label="头像">
<div>
......@@ -37,7 +37,7 @@
</div>
</el-form-item>
<el-form-item label="介绍">
<el-input type="textarea" :rows="3" v-model="addMsg.Intro" class="w400" size="small" placeholder="介绍"
<el-input type="textarea" :rows="3" v-model="addMsg.Intro" size="small" placeholder="介绍"
maxlength="1000" />
</el-form-item>
</el-form>
......@@ -65,6 +65,16 @@
message: '请输入姓名',
trigger: 'blur'
}],
Tel:[{
required: true,
message: '请输入电话',
trigger: 'blur'
}],
Position:[{
required: true,
message: '请输入职位',
trigger: 'blur'
}]
},
choicImg: false, //是否显示选择文件
chooseType: 1, //选择类型1-头像,2-背景图
......@@ -221,5 +231,12 @@
height: 32px;
margin: 0 5px;
}
.addContact .headerImg{
width:80px;
height:80px;
}
.addContact .headerImg img{
width:100%;
height:100%;
}
</style>
......@@ -5,9 +5,9 @@
</div>
<div class="content">
<div>
<div class="searchInput" style="width:150px">
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:125px;height:30px" placeholder="请输入公司名称" v-model="msg.CompanyName"
style="display:inline-block;width:225px;height:30px" placeholder="请输入公司名称" v-model="msg.CompanyName"
size="small" clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
......@@ -23,7 +23,7 @@
</el-table-column>
<el-table-column prop="Mobile" width="150" label="联系电话">
</el-table-column>
<el-table-column prop="EMail" width="150" label="邮箱">
<el-table-column prop="EMail" width="200" label="邮箱">
</el-table-column>
<el-table-column prop="Industry" width="150" label="行业">
</el-table-column>
......@@ -33,9 +33,8 @@
</el-table-column>
<el-table-column prop="address" width="200" label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="详情" placement="top">
<img @click="EditgoUrl(scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/edit.png"
alt="">
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<img @click="EditgoUrl(scope.row)" src="../../assets/img/userman/icon-show.png" alt="">
</el-tooltip>
</template>
</el-table-column>
......@@ -162,5 +161,4 @@
padding: 20px;
box-sizing: border-box;
}
</style>
......@@ -9,9 +9,9 @@
</div>
<div class="content">
<div>
<div class="searchInput" style="width:150px">
<div class="searchInput" style="width:250px;">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:125px;height:30px" placeholder="请输入昵称" v-model="msg.Name" size="small"
style="display:inline-block;width:225px;height:30px" placeholder="请输入昵称" v-model="msg.Name" size="small"
clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
......@@ -47,8 +47,7 @@
alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="delContactus(scope.row)" circle
style="padding:6px;"></el-button>
<img @click="delContactus(scope.row)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
</template>
</el-table-column>
......
......@@ -6,9 +6,9 @@
</div>
<div class="content">
<div>
<div class="searchInput" style="width:150px">
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:125px;height:30px" placeholder="请输入公司名称" v-model="msg.CompanyName"
style="display:inline-block;width:225px;height:30px" placeholder="请输入公司名称" v-model="msg.CompanyName"
size="small" clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
......@@ -34,9 +34,8 @@
</el-table-column>
<el-table-column prop="address" width="200" label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="详情" placement="top">
<img @click="getInfo(scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/edit.png"
alt="">
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<img @click="getInfo(scope.row)" src="../../assets/img/userman/icon-show.png" alt="">
</el-tooltip>
</template>
</el-table-column>
......@@ -54,73 +53,73 @@
<div class="content">
<el-form label-width="120px">
<el-form-item label="采购类目">
<el-input type="text" v-model="addMsg.GoodsCategory" disabled></el-input>
<el-input type="text" v-model="addMsg.GoodsCategory" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="进口数量">
<el-input type="text" v-model="addMsg.ImportNum" disabled></el-input>
<el-input type="text" v-model="addMsg.ImportNum" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="产品说明">
<el-input type="text" v-model="addMsg.Describe" disabled></el-input>
<el-input type="text" v-model="addMsg.Describe" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="公司名称">
<el-input type="text" v-model="addMsg.CompanyName" disabled></el-input>
<el-input type="text" v-model="addMsg.CompanyName" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="公司英文名称">
<el-input type="text" v-model="addMsg.CompanyEnName" disabled></el-input>
<el-input type="text" v-model="addMsg.CompanyEnName" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="手机号码">
<el-input type="text" v-model="addMsg.Mobile" disabled></el-input>
<el-input type="text" v-model="addMsg.Mobile" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="E-Mail">
<el-input type="text" v-model="addMsg.EMail" disabled></el-input>
<el-input type="text" v-model="addMsg.EMail" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="企业法人">
<el-input type="text" v-model="addMsg.LegalPerson" disabled></el-input>
<el-input type="text" v-model="addMsg.LegalPerson" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="负责人">
<el-input type="text" v-model="addMsg.Principal" disabled></el-input>
<el-input type="text" v-model="addMsg.Principal" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="微信号">
<el-input type="text" v-model="addMsg.WechatNo" disabled></el-input>
<el-input type="text" v-model="addMsg.WechatNo" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="官网">
<el-input type="text" v-model="addMsg.DomainUrl" disabled></el-input>
<el-input type="text" v-model="addMsg.DomainUrl" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="行业">
<el-input type="text" v-model="addMsg.Industry" disabled></el-input>
<el-input type="text" v-model="addMsg.Industry" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="成立时间">
<el-input type="text" v-model="addMsg.FoundingTimeStr" disabled></el-input>
<el-input type="text" v-model="addMsg.FoundingTimeStr" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="员工人数">
<el-input type="text" v-model="addMsg.EmployeeNum" disabled></el-input>
<el-input type="text" v-model="addMsg.EmployeeNum" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="年销售(万元)">
<el-input type="text" v-model="addMsg.AnnualSales" disabled></el-input>
<el-input type="text" v-model="addMsg.AnnualSales" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="详细地址">
<el-input type="text" v-model="addMsg.Address" disabled></el-input>
<el-input type="text" v-model="addMsg.Address" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="详细地址英文">
<el-input type="text" v-model="addMsg.EnAddress" disabled></el-input>
<el-input type="text" v-model="addMsg.EnAddress" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="年进口额">
<el-input type="text" v-model="addMsg.AnnualImport" disabled></el-input>
<el-input type="text" v-model="addMsg.AnnualImport" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="主要进口品目">
<el-input type="text" v-model="addMsg.ImportCategory" disabled></el-input>
<el-input type="text" v-model="addMsg.ImportCategory" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="主要进口国">
<el-input type="text" v-model="addMsg.ImportCountry" disabled></el-input>
<el-input type="text" v-model="addMsg.ImportCountry" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="主要出口国">
<el-input type="text" v-model="addMsg.ExportCountry" disabled></el-input>
<el-input type="text" v-model="addMsg.ExportCountry" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="公司介绍">
<el-input type="text" v-model="addMsg.CompanyIntro" disabled></el-input>
<el-input type="text" v-model="addMsg.CompanyIntro" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="其他内容">
<el-input type="text" v-model="addMsg.OtherInfo" disabled></el-input>
<el-input type="text" v-model="addMsg.OtherInfo" class="w400" disabled></el-input>
</el-form-item>
</el-form>
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="isShowInfo=false">返回
......
......@@ -8,9 +8,9 @@
</div>
<div class="content">
<div>
<div class="searchInput" style="width:150px">
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:125px;height:30px" placeholder="请输入标题" v-model="msg.Title" size="small"
style="display:inline-block;width:225px;height:30px" placeholder="请输入标题" v-model="msg.Title" size="small"
clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
......@@ -23,6 +23,11 @@
<el-table-column prop="Title" label="新闻标题">
</el-table-column>
<el-table-column prop="CoverImg" width="150" label="封面图">
<template slot-scope="scope">
<div class="app-image"
:style="{backgroundImage:'url(' + scope.row.CoverImg + ')',backgroundSize:'cover'}">
</div>
</template>
</el-table-column>
<el-table-column prop="PublishTimeStr" width="200" label="发布时间">
</el-table-column>
......@@ -35,8 +40,8 @@
alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="delNews(scope.row)" circle style="padding:6px;">
</el-button>
<img @click="delNews(scope.row)" style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
</template>
</el-table-column>
......@@ -52,16 +57,16 @@
style="margin:0 9px;color:#C0C4CC">/</span><span>新闻信息</span>
</div>
<div class="content">
<el-form label-width="120px">
<el-form-item label="新闻标题">
<el-input type="text" class="w300" v-model="addMsg.Title" size="small"></el-input>
<el-form label-width="120px" :model="addMsg" :rules="rules" ref="addMsg">
<el-form-item label="新闻标题" class="is-required" prop="Title">
<el-input type="text" class="w400" v-model="addMsg.Title" size="small"></el-input>
</el-form-item>
<el-form-item label="发布时间">
<el-date-picker class="w300" v-model="addMsg.PublishTime" type="date" placeholder="发布时间">
<el-form-item label="发布时间" class="is-required" prop="PublishTime">
<el-date-picker class="w400" v-model="addMsg.PublishTime" size="small" type="date" placeholder="发布时间">
</el-date-picker>
</el-form-item>
<el-form-item label="行业">
<el-input type="text" class="w300" v-model="addMsg.Industry" size="small"></el-input>
<el-form-item label="行业" class="is-required" prop="Industry">
<el-input type="text" class="w400" v-model="addMsg.Industry" size="small"></el-input>
</el-form-item>
<el-form-item label="封面图" size="small">
<el-button @click="isShowImage=true" size="small">选择文件</el-button>
......@@ -71,12 +76,12 @@
<img v-else style="width:80px;height:80px" :src="addMsg.CoverImg" alt="">
</div>
</el-form-item>
<el-form-item label="活动详情">
<el-form-item label="活动详情" style="line-height:0;">
<UE style="width:750px;" :defaultMsg="defaultMsg" :config="config" :IsMultiple="true" ref="ue"></UE>
</el-form-item>
</el-form>
</div>
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform()">保存
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存
</el-button>
</template>
<!-- 选择文件 -->
......@@ -117,6 +122,23 @@
PublishTime: "", //发布时间
NewsInfo: "", //新闻详情
},
rules: {
Title: [{
required: true,
message: '请输入新闻标题',
trigger: 'blur'
}],
PublishTime: [{
required: true,
message: '请选择发布时间',
trigger: 'blur'
}],
Industry: [{
required: true,
message: '请输入行业',
trigger: 'blur'
}]
},
};
},
created() {
......@@ -193,19 +215,25 @@
}
})
}, //新增修改
submitform() {
let content = this.$refs.ue.getUEContent();
this.addMsg.NewsInfo = content;
this.apipost("/api/Trade/SetCommerceNews", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.isShowAdd = false;
this.getList();
this.clearMsg();
this.Success(res.data.message);
submitform(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let content = this.$refs.ue.getUEContent();
this.addMsg.NewsInfo = content;
this.apipost("/api/Trade/SetCommerceNews", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.isShowAdd = false;
this.getList();
this.clearMsg();
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
})
} else {
this.Error(res.data.message);
return false;
}
})
});
}
},
mounted() {}
......@@ -263,4 +291,8 @@
box-sizing: border-box;
}
.newsList .el-form-item__content {
line-height: 0;
}
</style>
......@@ -6,9 +6,9 @@
</div>
<div class="content">
<div>
<div class="searchInput" style="width:150px">
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:125px;height:30px" placeholder="请输入公司名称" v-model="msg.CompanyName"
style="display:inline-block;width:225px;height:30px" placeholder="请输入公司名称" v-model="msg.CompanyName"
size="small" clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
......@@ -34,9 +34,8 @@
</el-table-column>
<el-table-column prop="address" width="200" label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="详情" placement="top">
<img @click="getInfo(scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/edit.png"
alt="">
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<img @click="getInfo(scope.row)" src="../../assets/img/userman/icon-show.png" alt="">
</el-tooltip>
</template>
</el-table-column>
......@@ -54,73 +53,73 @@
<div class="content">
<el-form label-width="120px">
<el-form-item label="采购类目">
<el-input type="text" v-model="addMsg.GoodsCategory" disabled></el-input>
<el-input type="text" v-model="addMsg.GoodsCategory" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="进口数量">
<el-input type="text" v-model="addMsg.ImportNum" disabled></el-input>
<el-input type="text" v-model="addMsg.ImportNum" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="产品说明">
<el-input type="text" v-model="addMsg.Describe" disabled></el-input>
<el-input type="text" v-model="addMsg.Describe" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="公司名称">
<el-input type="text" v-model="addMsg.CompanyName" disabled></el-input>
<el-input type="text" v-model="addMsg.CompanyName" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="公司英文名称">
<el-input type="text" v-model="addMsg.CompanyEnName" disabled></el-input>
<el-input type="text" v-model="addMsg.CompanyEnName" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="手机号码">
<el-input type="text" v-model="addMsg.Mobile" disabled></el-input>
<el-input type="text" v-model="addMsg.Mobile" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="E-Mail">
<el-input type="text" v-model="addMsg.EMail" disabled></el-input>
<el-input type="text" v-model="addMsg.EMail" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="企业法人">
<el-input type="text" v-model="addMsg.LegalPerson" disabled></el-input>
<el-input type="text" v-model="addMsg.LegalPerson" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="负责人">
<el-input type="text" v-model="addMsg.Principal" disabled></el-input>
<el-input type="text" v-model="addMsg.Principal" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="微信号">
<el-input type="text" v-model="addMsg.WechatNo" disabled></el-input>
<el-input type="text" v-model="addMsg.WechatNo" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="官网">
<el-input type="text" v-model="addMsg.DomainUrl" disabled></el-input>
<el-input type="text" v-model="addMsg.DomainUrl" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="行业">
<el-input type="text" v-model="addMsg.Industry" disabled></el-input>
<el-input type="text" v-model="addMsg.Industry" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="成立时间">
<el-input type="text" v-model="addMsg.FoundingTimeStr" disabled></el-input>
<el-input type="text" v-model="addMsg.FoundingTimeStr" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="员工人数">
<el-input type="text" v-model="addMsg.EmployeeNum" disabled></el-input>
<el-input type="text" v-model="addMsg.EmployeeNum" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="年销售(万元)">
<el-input type="text" v-model="addMsg.AnnualSales" disabled></el-input>
<el-input type="text" v-model="addMsg.AnnualSales" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="详细地址">
<el-input type="text" v-model="addMsg.Address" disabled></el-input>
<el-input type="text" v-model="addMsg.Address" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="详细地址英文">
<el-input type="text" v-model="addMsg.EnAddress" disabled></el-input>
<el-input type="text" v-model="addMsg.EnAddress" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="年进口额">
<el-input type="text" v-model="addMsg.AnnualImport" disabled></el-input>
<el-input type="text" v-model="addMsg.AnnualImport" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="主要进口品目">
<el-input type="text" v-model="addMsg.ImportCategory" disabled></el-input>
<el-input type="text" v-model="addMsg.ImportCategory" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="主要进口国">
<el-input type="text" v-model="addMsg.ImportCountry" disabled></el-input>
<el-input type="text" v-model="addMsg.ImportCountry" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="主要出口国">
<el-input type="text" v-model="addMsg.ExportCountry" disabled></el-input>
<el-input type="text" v-model="addMsg.ExportCountry" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="公司介绍">
<el-input type="text" v-model="addMsg.CompanyIntro" disabled></el-input>
<el-input type="text" v-model="addMsg.CompanyIntro" class="w400" disabled></el-input>
</el-form-item>
<el-form-item label="其他内容">
<el-input type="text" v-model="addMsg.OtherInfo" disabled></el-input>
<el-input type="text" v-model="addMsg.OtherInfo" class="w400" disabled></el-input>
</el-form-item>
</el-form>
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="isShowInfo=false">返回
......
<template>
<div class="companyList">
<div class="companyList tradeactivity">
<template v-if="isShowAdd">
<div class="head-title">
活动管理
......@@ -8,9 +8,9 @@
</div>
<div class="content">
<div>
<div class="searchInput" style="width:150px">
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" @clear="msg.pageIndex=1,getList()"
style="display:inline-block;width:125px;height:30px" placeholder="活动名称" v-model="msg.ActivityName"
style="display:inline-block;width:225px;height:30px" placeholder="活动名称" v-model="msg.ActivityName"
size="small" clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search"
......@@ -25,6 +25,11 @@
<el-table-column prop="ActivityTypeName" label="活动类型">
</el-table-column>
<el-table-column prop="CoverImg" label="封面图">
<template slot-scope="scope">
<div class="app-image"
:style="{backgroundImage:'url(' + scope.row.CoverImg + ')',backgroundSize:'cover'}">
</div>
</template>
</el-table-column>
<el-table-column prop="StartTimeStr" label="开始时间">
</el-table-column>
......@@ -37,8 +42,8 @@
alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="delType(scope.row)" circle style="padding:6px;">
</el-button>
<img @click="delType(scope.row)" style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
</template>
</el-table-column>
......@@ -54,21 +59,22 @@
style="margin:0 9px;color:#C0C4CC">/</span><span>修改活动</span>
</div>
<div class="content">
<el-form label-width="120px">
<el-form-item label="活动名称">
<el-input type="text" class="w300" v-model="addMsg.ActivityName" size="small"></el-input>
<el-form label-width="120px" :model="addMsg" :rules="rules" ref="addMsg">
<el-form-item label="活动名称" class="is-required" prop="ActivityName">
<el-input type="text" class="w400" v-model="addMsg.ActivityName" size="small"></el-input>
</el-form-item>
<el-form-item label="开始时间">
<el-date-picker class="w300" v-model="addMsg.StartTime" type="date" placeholder="开始时间">
<el-form-item label="开始时间" class="is-required" prop="StartTime">
<el-date-picker class="w300" :picker-options="pickerBeginDateBefore" value-format="yyyy-MM-dd"
v-model="addMsg.StartTime" type="date" size="small" placeholder="开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间">
<el-date-picker class="w300" v-model="addMsg.EndTime" type="date" placeholder="结束时间">
<el-form-item label="结束时间" class="is-required" prop="EndTime">
<el-date-picker class="w300" :picker-options="pickerBeginDateAfter" v-model="addMsg.EndTime" type="date"
size="small" placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="活动类型">
<el-select class="w150" style="margin-right: 10px;" v-model="addMsg.ActivityType" size="small"
placeholder="请选择">
<el-form-item label="活动类型" class="is-required" prop="ActivityType">
<el-select class="w300" v-model="addMsg.ActivityType" size="small" placeholder="请选择">
<el-option :key="0" label="请选择" :value="0"></el-option>
<el-option v-for="item in activityTypeList" :key="item.Id" :label="item.TypeName" :value="item.Id">
</el-option>
......@@ -87,7 +93,7 @@
</el-form-item>
</el-form>
</div>
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform()">保存
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存
</el-button>
</template>
<!-- 选择文件 -->
......@@ -105,6 +111,13 @@
UE,
},
data() {
let validataTrade = (rule, value, callback) => {
if (this.addMsg.ActivityType == 0) {
return callback(new Error('请选择活动类型'));
} else {
callback();
}
}
return {
defaultMsg: "",
config: {
......@@ -130,6 +143,44 @@
ActivityInfo: "", //活动详情
},
activityTypeList: [], //活动类型列表
rules: {
ActivityName: [{
required: true,
message: '请输入活动名称',
trigger: 'blur'
}],
StartTime: [{
required: true,
message: '请选择开始时间',
trigger: 'blur'
}],
EndTime: [{
required: true,
message: '请选择结束时间',
trigger: 'blur'
}],
ActivityType: [{
validator: validataTrade,
trigger: "change",
required: true
}]
},
pickerBeginDateBefore: {
disabledDate: time => {
if (this.addMsg.EndTime == null) {
return false;
} else {
let endTime = new Date(this.addMsg.EndTime)
return endTime.getTime() < time.getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.addMsg.StartTime)
return startTime.getTime() >= time.getTime()
}
}
};
},
created() {
......@@ -218,17 +269,23 @@
});
},
//新增修改
submitform() {
let content = this.$refs.ue.getUEContent();
this.addMsg.ActivityInfo = content;
this.apipost("/api/Trade/SetCommerceActivity", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.isShowAdd = true;
this.getList();
this.clearMsg();
this.Success(res.data.message);
submitform(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let content = this.$refs.ue.getUEContent();
this.addMsg.ActivityInfo = content;
this.apipost("/api/Trade/SetCommerceActivity", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.isShowAdd = true;
this.getList();
this.clearMsg();
this.Success(res.data.message);
} else {
this.Error(res.data.message);
}
})
} else {
this.Error(res.data.message);
return false;
}
})
}
......@@ -287,5 +344,7 @@
padding: 20px;
box-sizing: border-box;
}
.tradeactivity .el-form-item__content{
line-height: 0;
}
</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