更新优化页面,优化页面样式,开启下拉刷新

This commit is contained in:
weipengfei 2023-08-10 11:48:01 +08:00
parent a23219c863
commit 5fe5efabc5
11 changed files with 141 additions and 93 deletions

View File

@ -11,14 +11,14 @@
<view class="text">
<view class="name">{{company.company_name}}</view>
<view class="right">{{company.company_type_name||company.company_type}}</view>
<view class="code">社会代码{{company.organization_code}}</view>
<view class="code">社会代码<text @click="copyPhone(company.master_email, '社会代码')">{{company.organization_code}}</text></view>
</view>
</view>
</view>
<view class="bottom">
<view class="left">
<uni-icons type="location" color="#666666" size="14"></uni-icons>
<view class="location">区域:</view>
<view class="location">区域</view>
</view>
<view style="flex: 1;">{{company.address}}</view>
</view>
@ -69,7 +69,7 @@
<view class="card">
<view class="one">
<view class="linkman">
<view style="height: 30rpx;width: 6rpx;background-color: #3175f9;border-radius: 3rpx;margin-right: 8rpx;">
<view style="height: 30rpx;width: 6rpx;background-color: #3175f9;border-radius: 8rpx;margin-right: 8rpx;">
</view>
主要联系人
</view>
@ -80,12 +80,10 @@
<view class="info_item" @click="copyPhone(company.master_email, '邮箱')">邮箱{{company.master_email}}</view>
</view>
</view>
<view style="height: 32rpx;"></view>
<view class="one" v-for="(other, index) in company.other_contacts" :key="index">
<block v-if="other.name!=''">
<view class="one" v-for="(other, index) in company.other_contacts" v-if="other.name!=''" :key="index">
<view class="linkman">
<view
style="height: 30rpx;width: 6rpx;background-color: #3175f9;border-radius: 3rpx;margin-right: 8rpx;">
style="height: 30rpx;width: 6rpx;background-color: #3175f9;border-radius: 8rpx;margin-right: 8rpx;">
</view>
其他联系人
</view>
@ -95,7 +93,6 @@
<view class="info_item" @click="copyPhone(other.phone)">联系电话{{other.phone}}</view>
<view class="info_item" @click="copyPhone(other.email, '邮箱')">邮箱{{other.email}}</view>
</view>
</block>
</view>
</view>
</block>
@ -252,7 +249,11 @@
<style lang="scss" scoped>
.item {
padding: 31.5rpx 28rpx;
padding: 32rpx 28rpx;
padding-top: 0;
&:nth-child(1){
padding-top: 32rpx;
}
.title {
margin-bottom: 21rpx;
@ -279,8 +280,10 @@
.left {
display: flex;
align-items: center;
image {
flex-shrink: 0;
width: 142rpx;
height: 142rpx;
margin-right: 28rpx;
@ -335,6 +338,10 @@
}
.one {
margin-top: 32rpx;
&:nth-child(1){
margin-top: 0;
}
.linkman {
// height: 44rpx;
font-size: 32rpx;

View File

@ -35,6 +35,7 @@
</template>
<script>
import { Toast } from '../../libs/uniApi';
export default {
name: "task",
props: {

View File

@ -51,6 +51,7 @@
"path": "pages/oaTask/oaTask",
"style": {
"navigationBarTitleText": "今日任务",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
@ -227,7 +228,7 @@
"path": "contract/contract",
"style": {
"navigationBarTitleText": "合同管理",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}
@ -407,7 +408,7 @@
"path": "captain/captain",
"style": {
"navigationBarTitleText": "队长列表",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#3175f9",
"navigationBarTextStyle": "white"
}

View File

@ -47,11 +47,10 @@
}
},
onPullDownRefresh() {
this.close()
uni.stopPullDownRefresh()
this.loadList();
this.$u.sleep(500).then(()=>{uni.stopPullDownRefresh()});
},
onReachBottom() {
},
}
</script>

View File

@ -115,6 +115,7 @@
this.loadConfig.status = "loadmore";
this.list = [];
this.loadList();
uni.stopPullDownRefresh();
},
async loadList() {
if (this.loadConfig.status == "nomore") return;
@ -135,7 +136,7 @@
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
this.initLoad();
}
}
</script>

View File

@ -21,10 +21,16 @@
<view class="bottom">
<image src="../../static/img/contract/company.png"></image>
<view class="text">
<view>主要联系人{{item.master_name}}</view>
<view @click="copyPhone(item.master_phone)">联系方式{{item.master_phone}}</view>
<view style="display: flex;">
<view class="">区县乡镇</view>
<view class="text_item">
<view class="left_text">主要联系人</view>
<view>{{item.master_name}}</view>
</view>
<view class="text_item" @click="copyPhone(item.master_phone)">
<view class="left_text">联系方式</view>
<view>{{item.master_phone}}</view>
</view>
<view class="text_item">
<view class="left_text">区县乡镇</view>
<view>{{item.city_name+'/'+item.area_name+'/'+item.street_name}}</view>
</view>
<!-- <view>片区经理</view> -->
@ -96,7 +102,6 @@
this.loadConfig.status = "loadmore";
this.companyList = [];
await this.loadCompanyList();
uni.stopPullDownRefresh()
},
//
async loadCompanyList() {
@ -139,7 +144,9 @@
}
},
onPullDownRefresh() {
this.initLoad()
if(this.current==1) this.initLoad();
this.$u.sleep(500).then(()=>{uni.stopPullDownRefresh()})
}
}
</script>
@ -281,6 +288,12 @@
display: flex;
flex-direction: column;
justify-content: space-between;
.text_item{
display: flex;
.left_text{
flex-shrink: 0;
}
}
}
}
}

View File

@ -21,10 +21,18 @@
</view>
<view class="date">
<!-- <text class="time">2023-04-27 2024-04-28 </text> -->
<view class="number">合同编号:{{item.contract_no}}</view>
<view class="number">合同类型:{{item.company.contract_type_name}}</view>
<text class="time">修改时间:{{item.update_time}}</text>
<view class="number">
<view class="num_left">合同编号:</view>
<text>{{item.contract_no}}</text>
</view>
<view class="number">
<view class="num_left">合同类型:</view>
<view>{{item.company.contract_type_name}}</view>
</view>
<view class="time">
<view class="num_left">修改时间:</view>
<view>{{item.update_time}}</view>
</view>
</view>
</view>
</view>
@ -36,8 +44,10 @@
</view>
</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="暂无合同" icon="/static/img/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText" :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="暂无合同"
icon="/static/img/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
@ -60,8 +70,7 @@
},
onLoad() {},
onShow() {
this.initLoadConfig()
this.initContractList()
this.initLoadConfig();
},
onReady() {
uni.setNavigationBarColor({
@ -80,6 +89,8 @@
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
this.initContractList();
uni.stopPullDownRefresh();
},
async initContractList() {
try {
@ -103,7 +114,7 @@
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
this.initLoadConfig();
}
}
</script>
@ -144,7 +155,6 @@
font-weight: 400;
color: #999999;
line-height: 0rpx;
-webkit-background-clip: text;
}
}
@ -168,7 +178,8 @@
.top {
display: flex;
margin-bottom: 10rpx;
margin-bottom: 28rpx;
image {
width: 87.6rpx;
height: 87.6rpx;
@ -177,33 +188,33 @@
}
.text {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
display: flex;
justify-content: space-between;
align-items: flex-end;
.title {
font-size: 32rpx;
font-weight: 400;
color: #333333;
margin-right: 17.5rpx;
}
.number {
font-size: 25rpx;
font-weight: 400;
color: #3274F9;
}
}
.date {
font-size: 25rpx;
font-weight: 400;
color: #F9AA32;
line-height: 36rpx;
.number, .time{
display: flex;
justify-content: left;
flex-wrap: wrap;
.num_left{
margin-right: 18rpx;
}
}
.time {
color: #CCCCCCFF;
@ -217,7 +228,8 @@
.bottom {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
margin-top: 28rpx;
.left {
font-size: 28rpx;
font-weight: 400;
@ -230,14 +242,15 @@
.right {
width: 158rpx;
height: 53rpx;
display: flex;
justify-content: center;
align-items: center;
// height: 53rpx;
// border-radius: 26rpx 26rpx 26rpx 26rpx;
// border: 2rpx solid #3274F9;
// display: flex;
// justify-content: center;
// align-items: center;
text-align: right;
background: #FFFFFF;
border-radius: 26rpx 26rpx 26rpx 26rpx;
opacity: 1;
border: 2rpx solid #3274F9;
font-size: 28rpx;
font-weight: 400;
color: #3274F9;

View File

@ -330,8 +330,18 @@
},
//
async initCategoryBusinessList() {
try{
uni.showLoading({
title:'加载中',
mask:true
})
let res = await categoryBusinessList();
this.demandList = res.data;
}catch(e){
console.log(e);
}finally{
uni.hideLoading()
}
},
initBrigadeList(){
try{

View File

@ -228,6 +228,7 @@
title: "添加成功",
success: () => {
setTimeout(() => {
uni.$emit('initPersonnel');
uni.navigateBack()
}, 1000)
}

View File

@ -79,7 +79,8 @@
}
},
onLoad() {
this.loadUserList()
this.loadUserList();
uni.$on('initPersonnel', this.initLoad);
},
methods: {
navTo(url) {

View File

@ -37,7 +37,7 @@
</view>
</view>
<view class="bottom">
负责区域:<text>{{userInfo.street_name+(userInfo.village_name||'')}}</text>
负责区域:<text>{{(userInfo.street_name||'')+(userInfo.village_name||'')}}</text>
<text v-for="(item, index) in userInfo.brigade_name">{{item.brigade_name}}</text>
</view>
<u-popup :show="show" :round="10" mode="center">
@ -78,18 +78,6 @@
</image>
</view>
</view>
<view class="c_item">
<uni-section style="background-color: transparent;" title="驾驶证" titleFontSize="32rpx" type="line">
</uni-section>
<view class="card_box">
<image :src="userInfo.qualification&&userInfo.qualification.car_card"
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 0)">
</image>
<image :src="userInfo.qualification&&userInfo.qualification.car_card_b"
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 1)">
</image>
</view>
</view>
<view class="c_item">
<uni-section style="background-color: transparent;" title="银行卡照片" titleFontSize="32rpx" type="line">
</uni-section>
@ -102,6 +90,19 @@
</image>
</view>
</view>
<view class="c_item">
<uni-section style="background-color: transparent;" title="驾驶证" titleFontSize="32rpx" type="line">
</uni-section>
<view class="card_box">
<image :src="userInfo.qualification&&userInfo.qualification.car_card"
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 0)">
</image>
<image :src="userInfo.qualification&&userInfo.qualification.car_card_b"
@click="previewImg([userInfo.qualification&&userInfo.qualification.car_card,userInfo.qualification&&userInfo.qualification.car_card_b], 1)">
</image>
</view>
</view>
</block>
</view>
<view class="contract">