Commit 36797e48 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp into master

parents b993b097 b210fa05
<style>
.activeSignUp {
height: 100vh;
/* padding: 30rpx; */
}
.activeSighTitle {
width: 100%;
margin: 10rpx 0 40rpx 0;
font-size: 35rpx;
font-weight: bold;
/* height: 100vh; */
}
.activeSignName {
font-size: 28rpx;
color: #1F1F1F;
font-weight: bold;
margin-bottom: 15rpx;
}
.activeSign_Input {
......@@ -23,42 +16,116 @@
}
.activeMainDiv {
margin-bottom: 30rpx;
margin-bottom: 50rpx;
}
.activeSignAdd{
display: flex;
justify-content: flex-end;
}
.active_Nature text{
display:inline-block;
padding:6rpx 10rpx;
background-color: gray;
color:black;
margin:0 30rpx 20rpx 0;
.active_Nature text {
display: inline-block;
padding: 6rpx 20rpx;
background-color: #D2D2D2;
color: black;
margin: 0 40rpx 30rpx 0;
border-radius: 10rpx;
font-weight: bold;
color: #1F1F1F;
}
.active_InTitle{
font-size:30rpx;
.active_InTitle {
font-size: 30rpx;
font-weight: bold;
margin-bottom:30rpx;
margin-bottom: 30rpx;
}
.active_InTitle text{
color:red;
margin-right:5rpx;
.active_InTitle text {
color: red;
margin-right: 5rpx;
}
.checkedNature{
background-color: pink;
color:red;
.checkedNature {
background-color: #FDCCD4 !important;
color: #F95771 !important;
}
.activeTopImg{
width:100%;
height:150px;
.activeTopImg {
width: 100%;
height: 150px;
}
.active_Main{
width:100%;
height:100%;
.active_Main {
width: 100%;
height: 100%;
background-color: #000815;
}
.active_Info {
padding: 30rpx 30rpx 45rpx 30rpx;
width: 92%;
margin: auto;
background-color: #fff;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
.active_ContractContrent {
display: flex;
border-bottom: 1px solid #F5F6F7;
padding-bottom: 20rpx;
margin-bottom: 40rpx;
}
.active_Conleft {
width: 170rpx;
height: 75px;
border-right: 1px solid #D5D5D5;
display: flex;
justify-content: space-between;
flex-direction: column;
}
.AContra_Name {
font-weight: bold;
font-size: 30rpx;
}
.ac_Leftname {
font-size: 26rpx;
color: #696969;
}
.ac_Rightname {
color: #1F1F1F;
font-size: 26rpx;
font-weight: bold;
}
.active_ConRight>view {
margin-bottom: 15rpx;
}
.ac_upBtn {
width: 40vw;
height: 80rpx;
border-radius: 20rpx;
background-color: #F70027;
color: #fff;
text-align: center;
line-height: 80rpx;
font-size: 32rpx;
font-weight: bold;
}
.ac_CancelBtn {
width: 40vw;
height: 80rpx;
border: 1px solid #E2E2E2;
color: #1F1F1F;
font-weight: bold;
font-size: 32rpx;
text-align: center;
line-height: 80rpx;
border-radius: 20rpx;
}
</style>
<template>
<view class="activeSignUp">
......@@ -66,56 +133,92 @@
<image mode="heightFit" style="width:100%;height:100%" src="@/static/images/signBack.png" />
</view>
<view class="active_Main">
<view style="width:100%;height:33px;">
<view style="width:100%;height:35px;">
<image mode="heightFit" style="width:100%;height:100%" src="@/static/images/signJuan.png" />
</view>
<view class="activeSighTitle">
2021中国(成都)首店经济发展大会参会回执
</view>
<view class="active_Info">
<view class="active_InTitle">
<text>*</text>
基础信息
</view>
<view class="activeMainDiv">
<view class="activeSignName">单位/企业/机构名称</view>
<input class="activeSign_Input" v-model="signMsg.CompanyName" />
<input class="activeSign_Input" placeholder="请输入对应名称" v-model="signMsg.CompanyName" />
</view>
<view class="activeMainDiv">
<view class="activeMainDiv" style="border-bottom:1px solid #F5F6F7">
<view class="activeSignName" style="margin-bottom:30rpx;">性质(单选)</view>
<view class="active_Nature">
<text v-for="(item,index) in natureList" @click="getckedId(item,index)" :class="{'checkedNature':commonIndex==index}" :key="index">{{item.Name}}</text>
<text v-for="(item,index) in natureList" @click="getckedId(item,index)"
:class="{'checkedNature':commonIndex==index}" :key="index">{{item.Name}}</text>
</view>
</view>
<template v-if="signMsg.FirstShopLinkManList.length>0">
<view class="active_InTitle">
<text>*</text>
联系人<text style="font-size:26rpx">{{signMsg.FirstShopLinkManList.length}}</text>
</view>
<view class="active_ContractContrent" v-for="(item,index) in signMsg.FirstShopLinkManList" :key="index">
<view class="active_Conleft">
<view class="AContra_Name">{{item.LinkMan}}</view>
<view>
<image mode="heightFit" @click="editSignPerson(item,index)" style="width:32rpx;height:32rpx"
src="@/static/images/aedit.png">
<image mode="heightFit" @click="removeSignPerson(index)" style="width:33rpx;height:33rpx;margin-left:40rpx;"
src="@/static/images/adel.png">
</view>
</view>
<view class="activeSignAdd">
<u-icon class="u-icon" name="add-o" size="80" :color="mc"></u-icon>
<view class="active_ConRight" style="padding-left:10px;">
<view>
<text class="ac_Leftname">公司职务:</text>
<text class="ac_Rightname">{{item.Post}}</text>
</view>
<view>
<text class="ac_Leftname">所属区域:</text>
<text class="ac_Rightname">{{item.CountryInfo}}</text>
</view>
<view>
<text class="ac_Leftname">联系电话:</text>
<text class="ac_Rightname">{{item.LinkTel}}</text>
</view>
</view>
</view>
</template>
<view v-if="isShowAdd">
<view class="activeMainDiv">
<view class="activeSignName">姓名</view>
<input class="activeSign_Input" />
<input class="activeSign_Input" v-model="pMsg.LinkMan" placeholder="请输入您的姓名" />
</view>
<view class="activeMainDiv">
<view class="activeSignName">职务</view>
<input class="activeSign_Input" />
<view class="activeSignName">公司职务</view>
<input class="activeSign_Input" v-model="pMsg.Post" placeholder="请输入您在公司的职务" />
</view>
<view class="activeMainDiv">
<view class="activeSignName">所属国籍/省/市</view>
<input class="activeSign_Input" />
<input class="activeSign_Input" v-model="pMsg.CountryInfo" placeholder="所属国籍/省/市" />
</view>
<view class="activeMainDiv">
<view class="activeSignName">手机号</view>
<input class="activeSign_Input" />
<input class="activeSign_Input" v-model="pMsg.LinkTel" placeholder="请输入您的11位手机号码" />
</view>
</view>
<template v-if="signMsg.FirstShopLinkManList.length==0">
<view>
<u-button size="80" :ripple="true" shape="circle" :custom-style="{
backgroundColor: mc,
height: '80rpx',
color: '#FFF',
fontSize: '14px',
margin: '0 3vw',
width: '40vw',
}" @click="goSignUp()">立即报名</u-button>
<view class="ac_upBtn" style="width:300rpx;margin:auto;" @click="addPerson()">提交联系人信息</view>
</view>
</template>
<template v-if="signMsg.FirstShopLinkManList.length>0">
<view style="display: flex;justify-content: space-between;" v-if="isShowAdd">
<view class="ac_upBtn" @click="addPerson()">提交联系人信息</view>
<view class="ac_CancelBtn">取消</view>
</view>
<view v-if="!isShowAdd">
<view class="ac_CancelBtn" style="width:300rpx;margin:auto;color:#F70027;border-color:#F70027"
@click="goOnAdd()">继续添加联系人</view>
</view>
</template>
</view>
<view>
<view class="ac_upBtn" style="width:90%;margin:25rpx auto" @click="goSignUp()">提交</view>
</view>
</view>
</view>
......@@ -127,21 +230,25 @@
data() {
return {
mc: "",
value:1,
value: 1,
natureList: [], //性质数组
commonIndex:-1,
signMsg:{
ActivityIds:'7,8,9',
CompanyName:'成都微途科技',
Nature:'1',
Remark:'',
FirstShopLinkManList:[{
LinkMan:'张三',
LinkTel:'12345678',
Post:'总经理',
CountryInfo:'中国四川省成都市'
}]
}
commonIndex: -1,
signMsg: {
ActivityIds: '',
CompanyName: '',
Nature: '',
Remark: '',
FirstShopLinkManList: []
},
pMsg:{
LinkMan: '',
LinkTel: '',
Post: '',
CountryInfo: ''
},
isShowAdd:true,
isEdit:false,
EditIndex:-1
}
},
created() {},
......@@ -150,7 +257,11 @@
this.getNatureList();
},
onLoad(options) {
console.log(options,'optionssss');
console.log(options, 'optionssss');
if (options && options.Id) {
this.signMsg.ActivityIds = options.Id;
}
this.signMsg.ActivityIds =
uni.setNavigationBarTitle({
title: "活动报名",
});
......@@ -172,26 +283,101 @@
},
(res) => {
if (res.resultCode == 1) {
console.log(res,'数据');
console.log(res, '数据');
this.natureList = res.data;
}
}
);
},
//点击性质
getckedId(item,index){
getckedId(item, index) {
this.commonIndex = index;
this.signMsg.Nature = item.Id;
},
//提交联系人信息
addPerson() {
if(!this.isEdit){
if(this.pMsg.LinkMan==''){
uni.showToast({
title: '请输入姓名',
icon: 'none'
})
return
}
if(this.pMsg.LinkTel==''){
uni.showToast({
title: '请输入联系手机号',
icon: 'none'
})
return
}
this.signMsg.FirstShopLinkManList.push(JSON.parse(JSON.stringify(this.pMsg)));
this.isShowAdd=false;
}else{
this.signMsg.FirstShopLinkManList[this.EditIndex]=JSON.parse(JSON.stringify(this.pMsg));
this.isShowAdd=false;
}
},
//继续添加联系人
goOnAdd(){
this.isShowAdd=true;
this.isEdit=false;
this.clearInput();
},
//清空方法
clearInput(){
this.pMsg.LinkMan='';
this.pMsg.LinkTel='';
this.pMsg.Post='';
this.pMsg.CountryInfo='';
},
//删除联系人
removeSignPerson(index){
this.signMsg.FirstShopLinkManList.splice(index,1);
this.clearInput();
this.isShowAdd=true;
},
//编辑联系人
editSignPerson(item,index){
this.isShowAdd=true;
this.isEdit=true;
this.EditIndex = index;
this.pMsg.LinkMan = item.LinkMan;
this.pMsg.LinkTel = item.LinkTel;
this.pMsg.Post = item.Post;
this.pMsg.CountryInfo = item.CountryInfo;
},
//立即报名
goSignUp(){
goSignUp() {
console.log(this.signMsg,'this.signMsg');
if(this.signMsg.CompanyName==''){
uni.showToast({
title: '请输入单位/企业/机构名称',
icon: 'none'
})
return
}
if(this.signMsg.Nature==''){
uni.showToast({
title: '请选择性质',
icon: 'none'
})
return
}
if(this.signMsg.FirstShopLinkManList.length==0){
uni.showToast({
title: '请至少提交1个联系人信息',
icon: 'none'
})
return
}
this.request2({
url: "/api/AppletTrade/SetFirstShopActivityEnroll",
data: this.signMsg,
},
(res) => {
if (res.resultCode == 1) {
console.log(res,'数据');
console.log(res, '数据');
}
}
);
......
......@@ -144,6 +144,31 @@
}
}
.cans_c{
width: 100%;
display: flex;
align-items: flex-start;
margin-bottom: 15px;
.cans_c_l{
width: 100px;
font-size: 12px;
color: #FFFFFF;
}
.cans_c_r{
width: 1px;
flex:1;
font-size: 13px;
color: #FFFFFF;
font-weight: bold;
}
}
.img{
width: 190rpx ;
height: 190rpx ;
margin-bottom: 10px;
margin: 0 5px;
}
}
}
.btn_bm{
......@@ -210,7 +235,7 @@
</view>
</view>
<view class="box_conent_basic" v-if="detailsData.ListState==3">
<view class="box_conent_basic" v-if="detailsData && detailsData.ListState==3">
<view class="box_conent_basic_img">
<view class="box_conent_basic_img_t">评比结果</view>
</view>
......@@ -242,10 +267,70 @@
</view>
</view>
</view>
<view v-if="detailsData && detailsData.ListState==1 &&type==2 && detailsData.EnrollList.length>0">
<view class="box_conent_basic" v-for="(x,y) in detailsData.EnrollList">
<view class="box_conent_basic_img">
<view class="box_conent_basic_img_t">参数内容</view>
</view>
<view class="box_conent_basic_c" style="padding: 0 5px;" >
<view class="cans_c">
<view class="cans_c_l">参与品牌:</view>
<view class="cans_c_r">{{x.ObjectName}}</view>
</view>
<view v-for="(item,index) in x.Content" :key='index' class="cans_c">
<!-- 图片 -->
<view v-if="item.CompKey=='ImageUploadComp' && item.CompData.FileList && item.CompData.FileList.length>0">
<view style="display: flex;flex-wrap: wrap;"
v-for="(src, sindex) in item.CompData.FileList"
:key="sindex"
>
<image
:src="src"
class="img"
mode="aspectFill"
@click="previewImage(sindex,item.CompData.FileList)"
style="border-radius: 10rpx"
></image>
</view>
</view>
<!-- 视频 -->
<view v-if="item.CompKey=='VideoUploadComp'&& item.CompData.FileList && item.CompData.FileList.length>0">
<view style="width:100%; height: 320rpx;position: relative;margin-bottom: 10px;" v-for="(x,y) in FileList" :key="y">
<video class="mmyVideo" :id="'myVideo'+y" :src="x" controls='true'
></video>
<!-- <view
style="width: 100%;height: 100%;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: center;"
@click="enlarge('myVideo'+y)">
<u-icon name="play-circle-o" :size="70" color="#FFF"></u-icon>
</view> -->
</view>
</view>
<view style="display: flex;align-items: flex-start;width: 100%;" v-if="(item.CompKey=='SingleLineText' || item.CompKey=='MultiLineText')&& item.CompData.TextValue && item.CompData.TextValue!=''">
<view class="cans_c_l">{{item.CompData.Name}}:</view>
<view class="cans_c_r">{{item.CompData.TextValue}}</view>
</view>
<view style="display: flex;align-items: flex-start;width: 100%;" v-if="(item.CompKey=='DorpDownList' )&& item.CompData.OptionValue && item.CompData.OptionValue!=''">
<view class="cans_c_l">{{item.CompData.Name}}:</view>
<view class="cans_c_r">{{getDorpDownData(item.CompData.OptionValue,item.CompData.OptionList)}}</view>
</view>
</view>
<view class="btn_bm" v-if="detailsData.ListState==1" @click="goeditsignUp(x)">编辑</view>
</view>
</view>
</view>
<view v-if='type==1 && detailsData'>
<view class="btn_bm" v-if="detailsData.ListState==1" @click="gosignUp">立即报名</view>
<view class="btn_bm" style="background: #CCCCCC;" v-if="detailsData.ListState!=1">报名已截止</view>
</view>
<view style="width: 100%;height: 20px;"></view>
</view>
......@@ -258,29 +343,8 @@
return{
Id:0,
detailsData:null,
RankList:[//放榜的模拟数据
{ObjectName:'第一啥子啥子',ObjectIcon:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
Reviews:'评语傻还是得',MedalImage:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
},
{ObjectName:'第一啥子啥子',ObjectIcon:'',
Reviews:'评语傻还是得',MedalImage:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
},
{ObjectName:'第一啥子啥子',ObjectIcon:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
Reviews:'评语傻还是得',MedalImage:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
},
{ObjectName:'第一啥子啥子',ObjectIcon:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
Reviews:'评语傻还是得',MedalImage:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
},
{ObjectName:'第一啥子啥子',ObjectIcon:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
Reviews:'评语傻还是得',MedalImage:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
},
{ObjectName:'第一啥子啥子',ObjectIcon:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
Reviews:'评语傻还是得',MedalImage:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
},
{ObjectName:'第一啥子啥子',ObjectIcon:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
Reviews:'评语傻还是得',MedalImage:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616569835000_708.png',
},
]
RankList:[],
type:1,//1位列表过来的 2 为自己报名列表过来的
}
},
onLoad(options) {
......@@ -299,6 +363,9 @@
this.Id = options.Id
this.getDetails()
}
if(options && options.type){
this.type = options.type
}
},
methods:{
getDetails(){
......@@ -315,6 +382,13 @@
uni.hideLoading()
if (res.resultCode == 1) {
this.detailsData = res.data
if(this.detailsData.EnrollList && this.detailsData.EnrollList.length>0){
this.detailsData.EnrollList.forEach(x=>{
x.Content = JSON.parse(x.Content)
})
console.log(this.detailsData.EnrollList)
}
}
})
},
......@@ -328,6 +402,51 @@
url: "/pages/kotra/billboard/listsignUp?formData="+encodeURIComponent(JSON.stringify(data)),
});
},
goeditsignUp(data){
data.template_message_list = this.detailsData.template_message_list;
data.ListId = this.detailsData.Id;
console.log(data)
uni.navigateTo({//编码
url: "/pages/kotra/billboard/listsignUp?formData="+encodeURIComponent(JSON.stringify(data)),
});
},
previewImage(i,list) {
console.log(i);
uni.previewImage({
urls: list,
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function (data) {},
fail: function (err) {
console.log(err.errMsg);
},
},
});
},
getDorpDownData(value,list){
let data = value.split(',')
console.log(data,list)
let text = ''
data.forEach((x,y)=>{
list.map(j=>{
if(j.Id==x){
if(y+1==data.length){
text =text+ j.Name
}else{
text = text+j.Name+'、'
}
return
}
})
})
console.log(text)
return text
}
}
}
......
......@@ -108,6 +108,7 @@
if(this.multiple == true){
this.value = []
}
console.log(this.list,'list')
},
methods: {
get_value(val){ // 将数组值转换为以,隔开的字符串
......@@ -228,10 +229,10 @@
background-color: #FFFFFF;
}
.text-blue{
color: #0081ff;
color: #606266;
}
.text-green{
color: #39b54a;
color: #2979ff;
}
.input {
display: flex;
......
<style >
.listsignUp{
<style>
.listsignUp {
width: 100%;
height: 100vh;
overflow-y: auto;
background:#F6F6F6 ;
background: #F6F6F6;
padding: 18px;
}
.listsignUp .single_Phone {
font-size: 28rpx;
color: #1F1F1F;
font-weight: bold;
margin-bottom:10rpx;
margin-bottom: 10rpx;
margin-top: 40rpx;
}
.listsignUp .single_Input{
border-bottom:1px solid #DADCE6;
padding:10rpx 0 20rpx 0;
.listsignUp .single_Input {
border-bottom: 1px solid #DADCE6;
padding: 10rpx 0 20rpx 0;
}
.listsignUp .single_Remark{
margin:10rpx 0 40rpx 0;
font-size:25rpx;
color:#808080;
.listsignUp .single_Remark {
margin: 10rpx 0 0 0;
font-size: 25rpx;
color: #808080;
}
.listsignUp .btn{
.listsignUp .btn {
width: 100%;
height: 44px;
border-radius: 10px;
......@@ -34,22 +40,42 @@
}
</style>
<template>
<view class="listsignUp">
<view class="listsignUp" v-if="!loading">
<view style="width: 100%;padding: 15px;border-radius: 15px;background: #FFF;">
<view>
<view class="single_Phone" style="margin-top: 0;">
<span style="color:red;margin-right:5rpx;" >*</span>参与品牌/载体
</view>
<view class="single_Input" @click="show=true" style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
<input style="width: 90%" v-model="ObjectName" placeholder="请选择" />
<u-icon name="arrow" color="#909399" size="36" ></u-icon>
</view>
<u-picker v-model="show" mode="selector" :range="CarrierList" range-key="Name" @confirm='confirm'></u-picker>
</view>
<template v-for="(item,index) in dataList">
<singleText v-if="item.CompKey=='SingleLineText'" :CompData="item.CompData" :index='index' @success="datasuccess()"></singleText>
<multipleText v-if="item.CompKey=='MultiLineText'" :CompData="item.CompData" :index='index' @success="datasuccess()"></multipleText>
<selectChoice v-if="item.CompKey=='DorpDownList'" :CompData="item.CompData" :index='index' @success="datasuccess()"></selectChoice>
<pictureUpload v-if="item.CompKey=='ImageUploadComp'" :CompData="item.CompData" :index='index' @success="datasuccess()"></pictureUpload>
<videoUpload v-if="item.CompKey=='VideoUploadComp'" :CompData="item.CompData" :index='index' @success="datasuccess()"></videoUpload>
<singleText v-if="item.CompKey=='SingleLineText'" :CompData="item.CompData" :index='index'
@success="datasuccess()"></singleText>
<multipleText v-if="item.CompKey=='MultiLineText'" :CompData="item.CompData" :index='index'
@success="datasuccess()"></multipleText>
<selectChoice v-if="item.CompKey=='DorpDownList'" :CompData="item.CompData" :index='index'
@success="datasuccess()"></selectChoice>
<pictureUpload v-if="item.CompKey=='ImageUploadComp'" :CompData="item.CompData" :index='index'
@success="datasuccess()"></pictureUpload>
<videoUpload v-if="item.CompKey=='VideoUploadComp'" :CompData="item.CompData" :index='index'
@success="datasuccess()"></videoUpload>
</template>
<view class="btn" @click="setapply()">
提交申请
</view>
</view>
<u-modal
v-model="rzshow"
content="还未进行认证,现在去认证"
:show-cancel-button="true"
@confirm="queren"
@cancel='cancel'
></u-modal>
</view>
</template>
......@@ -67,55 +93,260 @@
multipleText,
selectChoice,
pictureUpload,
videoUpload
videoUpload,
},
data() {
return {
pageTitle: '榜单报名',
msg: {
Id: 5,
loading:true,
rzshow:false,
addMsg: {
Id: 0,
ListId: 0,
ObjectType: 0, //面向群体类型 1品牌 2载体
ObjectId: 0, //品牌/载体id
Content: '', //表达
},
dataList: [],
pageCount: 1,
formData:null
formData: null,
CarrierList: [],
ObjectName:'',
show:false,
companyStatus:0,
}
},
created() {
uni.setNavigationBarTitle({
title: "榜单报名",
});
this.getComponyStatus()
},
mounted() {
},
onLoad(option) {
if(option && option.formData){//解码
if (option && option.formData) { //解码
this.formData = JSON.parse(decodeURIComponent(option.formData))
console.log(this.formData)
if(this.formData.ObjectId && this.formData.ObjectId>0){
this.addMsg.Id = this.formData.Id
this.addMsg.ListId = this.formData.ListId
this.addMsg.ObjectType = this.formData.ObjectType
this.addMsg.ObjectId = this.formData.ObjectId
this.ObjectName = this.formData.ObjectName
this.dataList = this.formData.Content
console.log(this.dataList)
this.dataList.forEach(x=>{
if(x.CompKey=="DorpDownList"){
x.CompData.OptionValue = x.CompData.OptionValue.split(',')
}
})
}else{
this.addMsg.ListId = this.formData.Id;
this.getCustomForm()
}
this.getMyBrandCarrierList()
}
},
methods: {
getCustomForm(){
// 获取公司认证信息
getComponyStatus(){
let that = this
let parms = {
url: "/api/AppletTrade/GetCommpanyStatus",
}
this.request2(parms, (res) => {
if (res.resultCode == 1&&res.data!=null) {
// 获取公司名字和认证状态
that.companyStatus=res.data.CompanyStatus
if(that.companyStatus!=5){
this.rzshow=true
}
}
})
},
queren(){//去认证
uni.reLaunch({
url: "/pages/kotra/identification",
});
},
cancel(){//返回上一页
uni.navigateBack()
},
getMyBrandCarrierList() {
this.loading = true
let parms = {
url: "/api/AppletTrade/GetAppletMyBrandCarrierList",
data: {
ListId: this.formData.Id,
EnrollId: 0
}
}
this.request2(parms, (res) => {
if (res.resultCode == 1) {
this.CarrierList = res.data
}
setTimeout(()=>{
this.loading = false
},100)
})
},
getCustomForm() {
let parms = {
url: "/api/AppletCustomForm/GetCustomForm",
data:{FormType:this.formData.ListType}
data: {
FormType: this.formData.ListType
}
}
this.request2(parms, (res) => {
if (res.resultCode == 1) {
this.dataList=res.data.FormData;
if (res.data.FormData && res.data.FormData.length > 0) {
this.dataList = res.data.FormData;
} else { //默认数据
this.dataList = [{
"CompKey": "ImageUploadComp",
"isCked": false,
"CompData": {
"Name": "图片上传",
"FileCount": 9,
"FileSizeLimit": 0,
"FileList": [],
"Remark": "最多9张图片"
}
},
{
"CompKey": "VideoUploadComp",
"isCked": false,
"CompData": {
"Name": "视频",
"FileCount": 1,
"FileSizeLimit": 0,
"FileList": [],
"Remark": "最多上传一个视频"
}
},
{
"CompKey": "MultiLineText",
"isCked": false,
"CompData": {
"Name": "参与说明",
"WordsLength": 0,
"IsRequire": true,
"TextValue": "",
"Remark": ""
}
},
{
"CompKey": "SingleLineText",
"isCked": false,
"CompData": {
"Name": "联系电话",
"WordsLength": 11,
"IsRequire": true,
"TextValue": "",
"Remark": "输入正确的电话号码"
}
},
]
}
}
})
},
datasuccess(data,index){
console.log(data,index)
confirm(e){
this.addMsg.ObjectId = this.CarrierList[e].Id;
this.ObjectName = this.CarrierList[e].Name;
this.addMsg.ObjectType = this.CarrierList[e].ObjectType;
},
datasuccess(data, index) {
console.log(data, index)
this.dataList[index].CompData = data
},
setapply() {
console.log('提交', this.dataList)
let show = false
//验证必填
if(this.addMsg.ObjectId==0 || this.addMsg.ObjectId==null || this.addMsg.ObjectId==''){
uni.showToast({
title: '请选择参加品牌/载体',
icon: 'none'
})
return
}
let dataList = JSON.parse((JSON.stringify(this.dataList)))
dataList.map(x => {
if (show == true) {
return
}
if(x.CompKey=='DorpDownList' && x.CompData.IsMultiple==true){
x.CompData.OptionValue = x.CompData.OptionValue.join(',')
}
if (x.CompData.IsRequire && x.CompData.IsRequire == true) {
if ((x.CompKey == 'SingleLineText' || x.CompKey == 'MultiLineText') && x.CompData
.TextValue == '') { //单行输入或者多行
uni.showToast({
title: x.CompData.Name + '不能为空',
icon: 'none'
})
show = true
return
}
if (x.CompKey == 'DorpDownList' && x.CompData.OptionValue == '') { //下啦
uni.showToast({
title: '请选择' + x.CompData.Name,
icon: 'none'
})
return
}
}
})
this.addMsg.Content = JSON.stringify(dataList)
let that = this
if(this.companyStatus==5){
uni.requestSubscribeMessage({
tmplIds: that.formData.template_message_list,
complete(res) {
that.request2({
url: '/api/AppletTrade/SetAppletFirstShopListInfo',
data: that.addMsg
},
setapply(){
console.log('提交',this.dataList)
(res) => {
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 前一个页面
uni.showToast({
title: '申请成功',
icon: 'none'
})
setTimeout(() => {
uni.navigateBack({
success: function() {
beforePage.$vm.getDetails(); // 执行前一个页面的方法
}
});
}, 1000)
}
);
}
})
}else{
}
}
}
}
</script>
......@@ -216,7 +216,7 @@
},
godetails(x){//跳转到详情
uni.navigateTo({
url: "/pages/kotra/billboard/billboarddetails?Id="+x.Id,
url: "/pages/kotra/billboard/billboarddetails?Id="+x.Id+"&type=2",
});
}
}
......
......@@ -11,6 +11,7 @@
:file-list="fileList"
@on-success="uploadSuccessHandler"
></u-upload>
<view style="width: 100%;height: 1px;background: #e2e2e2;"></view>
<view class="single_Remark" v-if="CompData.Remark">{{CompData.Remark}}</view>
</view>
</template>
......@@ -28,7 +29,17 @@
created() {
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo").MallBaseId : 1;
this.action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
if(this.CompData.FileList.length>0){
this.fileList=[]
this.CompData.FileList.forEach(x=>{
let obj={
url:x
}
this.fileList.push(obj)
})
}
},
methods:{
uploadSuccessHandler(data, index, lists) {
......
......@@ -24,7 +24,7 @@
<u-icon class="u-icon" name="cross" size="30" color="#ffffff"></u-icon>
</view>
</view>
<view>
<view style="border-bottom: 1px solid #e2e2e2;padding-bottom: 10px;">
<view slot="addBtn" class="slot-btn" @click="upvideo()" v-if="FileList.length<CompData.FileCount">
<image class="image"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1616573063000_398.png"
......
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