Commit b6320375 authored by 黄奎's avatar 黄奎

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

parents b2a220f1 d2da39e3
This diff is collapsed.
<style>
.compInformation {
background-color: #fff;
margin-bottom:80px;
}
.compInfoList {
width: 100%;
display: flex;
height: 60px;
align-items: center;
padding: 0 20px;
border-bottom: 1px solid #F2F3F6;
}
.comInforName {
width: 25%;
color: #000;
}
.comInforName text {
color: red;
}
.comInfoInput {
width: 75%;
margin-top: 2px;
font-size: 13px;
color:#808080;
}
.comInBtn{
position: fixed;
bottom:0;
width:100%;
height:50px;
color:#fff;
z-index:99;
font-size: 16px;
text-align: center;
line-height: 50px;
background-color: #0b0052;
}
</style>
<template>
<view class="compInformation">
<view class="compInfoList">
<view class="comInforName">
中文名称<text>*</text>
</view>
<input class="uni-input comInfoInput" v-model="msg.CompanyName" placeholder="请输入公司中文名称" />
</view>
<view class="compInfoList">
<view class="comInforName">
英文名称
</view>
<input class="uni-input comInfoInput" v-model="msg.CompanyEnName" placeholder="请输入公司英文名称" />
</view>
<view class="compInfoList">
<view class="comInforName">
联系人<text>*</text>
</view>
<input class="uni-input comInfoInput" v-model="msg.Principal" placeholder="请输入公司联系人" />
</view>
<view class="compInfoList">
<view class="comInforName">
联系电话<text>*</text>
</view>
<input class="uni-input comInfoInput" v-model="msg.Mobile" placeholder="请输入公司联系电话" />
</view>
<view class="compInfoList">
<view class="comInforName">
公司邮箱<text>*</text>
</view>
<input class="uni-input comInfoInput" v-model="msg.EMail" placeholder="请输入公司邮箱" />
</view>
<view class="compInfoList">
<view class="comInforName">
法人
</view>
<input class="uni-input comInfoInput" v-model="msg.LegalPerson" placeholder="请输入法人" />
</view>
<view class="compInfoList">
<view class="comInforName">
公司微信
</view>
<input class="uni-input comInfoInput" v-model="msg.WechatNo" placeholder="请输入公司微信" />
</view>
<view class="compInfoList">
<view class="comInforName">
公司介绍
</view>
<input class="uni-input comInfoInput" v-model="msg.CompanyIntro" placeholder="公司介绍" />
</view>
<view class="compInfoList">
<view class="comInforName">
公司官网
</view>
<input class="uni-input comInfoInput" v-model="msg.DomainUrl" placeholder="请输入公司官网" />
</view>
<view class="compInfoList">
<view class="comInforName">
成立时间
</view>
<view @click="showStart=true" style="width:75%;color:#808080;">{{msg.FoundingTime}}</view>
</view>
<view class="compInfoList">
<view class="comInforName">
员工数量
</view>
<input class="uni-input comInfoInput" v-model="msg.EmployeeNum" placeholder="请输入员工数量" />
</view>
<view class="compInfoList">
<view class="comInforName">
<view>年销售额</view>
<view>(万元)</view>
</view>
<input class="uni-input comInfoInput" v-model="msg.AnnualSales" placeholder="请输入年销售额" />
</view>
<view class="compInfoList">
<view class="comInforName">
<view>年进口额</view>
<view>(万元)</view>
</view>
<input class="uni-input comInfoInput" v-model="msg.AnnualImport" placeholder="请输入年进口额" />
</view>
<view class="compInfoList">
<view class="comInforName">
中文地址
</view>
<input class="uni-input comInfoInput" v-model="msg.Address" placeholder="请输入公司中文地址" />
</view>
<view class="compInfoList">
<view class="comInforName">
英文地址
</view>
<input class="uni-input comInfoInput" v-model="msg.EnAddress" placeholder="请输入公司英文地址" />
</view>
<view class="compInfoList">
<view class="comInforName">
行业
</view>
<input class="uni-input comInfoInput" v-model="msg.Industry" placeholder="请输入行业" />
</view>
<view class="compInfoList">
<view class="comInforName">
出口国
</view>
<input class="uni-input comInfoInput" v-model="msg.ExportCountry" placeholder="请输入主要出口国" />
</view>
<view class="compInfoList">
<view class="comInforName">
进口国
</view>
<input class="uni-input comInfoInput" v-model="msg.ImportCountry" placeholder="请输入主要进口国" />
</view>
<view class="compInfoList">
<view class="comInforName">
进口品目
</view>
<input class="uni-input comInfoInput" v-model="msg.ImportCategory" placeholder="请输入主要进口品目" />
</view>
<view class="compInfoList">
<view class="comInforName">
其他
</view>
<input class="uni-input comInfoInput" v-model="msg.OtherInfo" placeholder="请输入其他" />
</view>
<view class="comInBtn" @click="saveInfo()">提交</view>
<u-picker v-model="showStart" mode="time" :params="params" @confirm='btnStart' :default-time='defaultTime'></u-picker>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "公司资料",
dataList: [],
showStart: false,
defaultTime: '',
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
msg: {
CompanyId: 0, //编号
CompanyName: "", //公司名称
CompanyEnName: "", //公司英文名称
Principal: "", //联系人
Mobile: "", //联系电话
EMail: "", //邮箱
LegalPerson: "", //法人
WechatNo: "", //公司微信
CompanyIntro: "", //公司介绍
DomainUrl: "", //官网
FoundingTime: "", //成立时间
EmployeeNum: "", //员工人数
AnnualSales: "", //年销售(万元)
AnnualImport: "", //年进口额
Address: "", //详细地址
EnAddress: "", //详细地址(英文)
Industry: "", //行业
ExportCountry: "", //主要出口国
ImportCountry: "", //主要进口国家
ImportCategory: "", //主要进口类目
OtherInfo: "" //其他内容
}
};
},
mounted() {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
var currTime = new Date();
var year = currTime.getFullYear();
var month = currTime.getMonth() + 1;
var day = currTime.getDate();
if(month<10){
month='0'+month;
}
if(day<10){
day='0'+day;
}
this.msg.FoundingTime =year+'-'+ month+'-'+day;
},
onLoad(options) {
},
created() {
this.getList();
},
onShow() {
},
methods: {
//获取数据
getList() {
uni.showLoading({
title: '加载中'
});
this.request2({
url: "/api/AppletTrade/GetUserCompany",
data: {},
},
(res) => {
uni.hideLoading();
if (res.resultCode == 1) {
console.log(res,'数据类了');
this.msg=res.data;
this.msg.FoundingTime = res.data.FoundingTimeStr;
}
}
);
},
//保存数据
saveInfo(){
if(this.msg.CompanyName==''){
uni.showToast({
title: "请输入公司中文名称",
icon:'none'
});
return;
}
if(this.msg.Principal==''){
uni.showToast({
title: "请输入联系人",
icon:'none'
});
return;
}
if(this.msg.Mobile==''){
uni.showToast({
title: "请输入联系电话",
icon:'none'
});
return;
}
if(this.msg.EMail==''){
uni.showToast({
title: "请输入公司邮箱",
icon:'none'
});
return;
}
this.request2({
url: "/api/AppletTrade/SetCompany",
data: this.msg,
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "保存成功",
});
this.getList();
}
}
);
},
btnStart(val) {
this.msg.FoundingTime = val.year+'-'+val.month+'-'+val.day;
console.log(val);
},
},
}
</script>
<style>
</style>
<style>
.contactTop{
width:100%;
height:250px;
border-bottom:1px solid #d1d1d1;
}
.contanctInfo{
font-size:15px;
margin:20px;
}
.contancTel{
color:#dd524d;
margin:10px 0;
}
.contanctJob{
font-size:13px;
color:#999ca1;
}
</style>
<template>
<view class="contanctDetail" style="height:100vh;">
<view class="contactTop">
<img :src="dataList.BgImg" style="width:100%;height:100%;" alt=""/>
</view>
<view class="contanctInfo">
<view>姓名:{{dataList.Name}}</view>
<view class="contancTel">电话:{{dataList.Tel}}</view>
<view class="contanctJob">职位:{{dataList.Position}}</view>
</view>
<u-divider>简单介绍</u-divider>
<view style="margin:20px;">
{{dataList.Intro}}
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "联系人详情",
msg:{
Id:0
},
dataList:{}
};
},
mounted() {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(options) {
this.msg.Id = options.Id;
this.getList();
},
created() {},
onShow() {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
//获取数据
getList() {
this.request2({
url: "/api/Trade/GetContract",
data: this.msg,
},
(res) => {
uni.hideLoading();
if (res.resultCode == 1) {
console.log(res,'数据来也');
this.dataList = res.data;
}
}
);
},
},
}
</script>
\ No newline at end of file
<style>
.contanctMain {
background-color: #F3F5F7;
}
.contanctIn {
display: flex;
padding: 20px;
}
.contancList {
width: 118px;
height: 180px;
background-color: #fff;
margin-right: 10px;
text-align: center;
border-radius: 3px;
overflow: hidden;
}
.contancList:nth-child(3) {
margin-right: 0;
}
.contanctImg {
width: 100%;
height: 131px;
}
.contanctImg img {
width: 100%;
height: 100%;
}
.contancName {
color: #404040;
font-size: 13px;
margin:5px 0;
}
.contactNum {
color: #999898;
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
}
</style>
<template>
<view class="contanctMain" style="height:100vh;">
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty>
<scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;" :enable-back-to-top="true" :enable-flex="true"
@scrolltolower="lower" :style="{ 'height': `calc(100%)`}">
<view class="contanctIn">
<view class="contancList" v-for="(item,index) in dataList" @click="goDetail(item.Id)" :key="index">
<view class="contanctImg">
<img :src="item.HeadIcon" alt="" />
</view>
<view>
<view class="contancName">{{item.Name}}</view>
<view class="contactNum">
<image style="width:20px;height:20px;" src="../../static/images/call.png"></image>{{item.Tel}}
</view>
</view>
</view>
</view>
<view style="padding:10px 0;">
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="0" :margin-bottom="0" bg-color="#f0f4f7" />
</view>
</scroll-view>
<tabbar></tabbar>
</view>
</template>
<script>
import tabbar from "@/components/tabbar/index";
export default {
data() {
return {
pageTitle: "联系我们",
msg:{
pageIndex:1,
pageSize:15
},
pageCount: 1,
dataList: [],
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
};
},
components: {
tabbar
},
mounted() {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(options) {
this.getList(1);
},
created() {},
onShow() {
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
//获取数据
getList(num) {
if (num == 1) {
this.dataList = [];
}
uni.showLoading({
title: '加载中'
});
this.request2({
url: "/api/Trade/GetContractPageList",
data: this.msg,
},
(res) => {
uni.hideLoading();
if (res.resultCode == 1) {
console.log(res,'数据来也');
this.dataList = this.dataList.concat(res.data.pageData);
this.pageCount = res.data.pageCount;
}
}
);
},
//滚动加载
lower(e) {
if (this.msg.pageIndex < this.pageCount) {
this.msg.pageIndex++;
this.status = "loading";
this.getList();
} else {
this.status = "nomore";
}
},
//跳转
goDetail(Id) {
uni.navigateTo({
url: '/pages/kotra/contanctDetail?Id='+Id
})
},
},
}
</script>
<style>
</style>
<template>
<view>12</view>
</template>
<script>
</script>
<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