This commit is contained in:
weipengfei 2023-08-30 11:19:26 +08:00
parent 03e0addbff
commit f1d1f2a76c
7 changed files with 146 additions and 21 deletions

View File

@ -21,6 +21,7 @@
<block
v-else-if="datas.extend&&datas.extend.transaction&&datas.extend.transaction.arr">
{{(datas.extend.transaction.arr.total_price?datas.extend.transaction.arr.total_price:0)+'元/'+(datas.extend.transaction.arr.day_money?datas.extend.transaction.arr.day_money:0)+'元'}}
<text style="color: #488F00;margin-left: 26rpx;">{{(datas.extend.transaction.transaction_pool?datas.extend.transaction.transaction_pool:0)+'元'}}</text>
</block>
<block v-else-if="datas.extend&&datas.extend.update">
<text v-if="datas.extend.update.transfer&&datas.extend.update.transfer.lnglat[0]||datas.status==3" style="color: #488f00;">抵达终点</text>

View File

@ -250,6 +250,7 @@ export default {
label_name: "",
},
ApproveList: [],
showOaHomeData: false, //
};
},
onLoad () {
@ -266,7 +267,6 @@ export default {
}
});
// #endif
},
onShow () {
// this.getUserIndex()
@ -276,6 +276,12 @@ export default {
this.showToask();
// this.initOaHomeDada();
this.getOrderList();
// console.log(this.oaHomeData, this.oaHomeData.length==0);
if(this.oaHomeData.length==0){
this.$nextTick(()=>{
this.$store.dispatch('initConfig');
})
}
},
computed: {
oaHomeData(){
@ -299,7 +305,6 @@ export default {
this.$refs.globalPopup.showPopu();
},
async getOrderList () {
console.log("列表")
let id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
let res = await getList({
user_id: id,
@ -448,6 +453,7 @@ export default {
},
onPullDownRefresh () {
this.getOrderList();
this.$store.dispatch('initConfig');
// this.getIndexList()
uni.stopPullDownRefresh();
},

View File

@ -1,12 +1,17 @@
<template>
<view class="all_box">
<u-empty v-if="list.length==0" icon="/static/img/empty/data.png" text="没有任务"></u-empty>
<view v-else class="task_list">
<!-- <taskCard class="task_card" v-for="item in 10" :key="item"></taskCard> -->
<view v-for="item in list" :key="item.id">
<task-item :datas="item"></task-item>
<block v-if="skeleton">
<u-skeleton :loading="skeleton" :animate="true" title rows="2" rows-width="100%"
rowsHeight="40" v-for="i in 3" :key="i" style="padding: 28rpx;">
</u-skeleton>
</block>
<block v-else>
<u-empty v-if="list.length==0" icon="/static/img/empty/data.png" text="没有任务"></u-empty>
<view v-else class="task_list">
<!-- <taskCard class="task_card" v-for="item in 10" :key="item"></taskCard> -->
<task-item :datas="item" v-for="item in list" :key="item.id"></task-item>
</view>
</view>
</block>
<!-- <u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> -->
</view>
@ -23,6 +28,7 @@
},
data() {
return {
skeleton: false,
loadConfig:{
page: 1,
limit: 15,
@ -44,8 +50,10 @@
},
methods: {
async loadList(){
this.skeleton = true;
let res = await taskLists({limit: 15, page: 1});
this.list = res.data;
this.$u.sleep(500).then(()=>{this.skeleton = false})
}
},
onPullDownRefresh() {
@ -61,4 +69,8 @@
.task_list{
padding-top: 28rpx;
}
.loading{
padding: 28rpx;
margin-top: 28rpx;
}
</style>

View File

@ -4,7 +4,7 @@ import { getConfig } from "@/api/config.js";
const state = {
eyeType: Cache.get('eyeType') || true, // 小眼睛
request: Cache.get('request') || true, // 网络请求
config: Cache.get('config') || {}
config: JSON.parse(Cache.get('config')||'{}')
};
const mutations = {
@ -18,7 +18,7 @@ const mutations = {
},
SET_CONFIG(state, data){
state.config = {...data};
Cache.set('config', state.config);
Cache.set('config', JSON.stringify(state.config));
}
};

View File

@ -2,17 +2,21 @@
<view class="">
<view class="card">
<view class="item">
<view>当日完成金额()</view>
<view>当日完成金额</view>
<!-- <view class="price" v-if="company.deposit">{{cCount(company.deposit)}}</view>
<view class="price" v-else>0.00</view> -->
<view class="price">{{c_money(card.total_price)}}</view>
</view>
<view class="item">
<view>目标完成金额()</view>
<view>目标完成金额</view>
<!-- <view class="price" v-if="company.company_money">{{cCount(company.company_money)}}</view>
<view class="price" v-else>0.00</view> -->
<view class="price">{{c_money(card.day_money)}}</view>
</view>
<view class="item">
<view>交易金额剩余池</view>
<view class="price">{{c_money(card.transaction_pool)}}</view>
</view>
</view>
@ -72,7 +76,8 @@
card: {
total_price: "0.00",
status: 1,
day_money: "0.00"
day_money: "0.00",
transaction_pool: "0.00"
},
list: [],
task_id: '',
@ -129,6 +134,7 @@
Object.keys(this.card).forEach((key)=>{
if(extend?.transaction?.arr[key]!=null&&extend?.transaction?.arr[key]!=undefined)this.card[key] = extend?.transaction?.arr[key];
})
this.card.transaction_pool = extend?.transaction.transaction_pool;
this.list = [...this.list, ...res.data?.list]
} catch (e) {
this.loadConfig.status = "nomore"
@ -142,7 +148,7 @@
}catch(e){
str = '0.00'
}
return str;
return '¥'+str;
}
},
onPullDownRefresh() {
@ -161,7 +167,7 @@
background: #0122c7;
border-radius: 18rpx 18rpx 18rpx 18rpx;
opacity: 1;
padding: 28rpx;
padding: 28rpx 12rpx;
display: flex;
justify-content: space-around;
color: #fff;
@ -173,13 +179,14 @@
justify-content: space-between;
font-size: 28rpx;
flex: 1;
border-right: 1px solid #fff;
&:nth-child(1) {
border-right: 1px solid #fff;
&:last-child {
border-right: none;
}
.price {
font-size: 49rpx;
font-size: 42rpx;
font-weight: 500;
}
}

View File

@ -234,7 +234,7 @@
.cards {
margin: 28rpx 0;
margin-top: 28rpx;
width: 694rpx;
background: #ffffff;
border-radius: 30rpx;
@ -363,7 +363,7 @@
}
.company_list {
padding-bottom: 32rpx;
padding-bottom: 160rpx;
// margin-top: 190rpx;
display: flex;
flex-direction: column;

View File

@ -5,6 +5,32 @@
<view><text class="money">30000.00</text></view>
</view>
<view class="card">
<view class="contract">
<view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
<view class="text">
<view class="name">入股合同</view>
<view>
<text>{{'2023-03-03'}}</text>
</view>
</view>
</view>
<view class="right" @click="navToContract('')">
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view>
</view>
</view>
</view>
<view class="card">
<view class="c_title">账单记录</view>
<u-line></u-line>
<u-steps style="padding: 28rpx;" :current="-1" direction="column" activeColor="#0122c7" dot inactiveColor="#0122c7">
<u-steps-item v-for="(item, index) in 2" title="开始" desc="结算">
</u-steps-item>
</u-steps>
</view>
<!-- <view class="card">
<view class="c_title">账单记录</view>
<u-line></u-line>
<view class="c_body" v-for="i in 3" :key="i">
@ -22,7 +48,7 @@
<view class="b_time">完成时间2023-06-15 18:00</view>
</view>
</view>
</view>
</view> -->
<view class="button">
<view class="retreat" @click="retreat">退股</view>
<view class="hand" @click="hand">上交</view>
@ -39,6 +65,19 @@ import { Toast } from '../../libs/uniApi';
};
},
methods:{
navToContract(contract_no) {
if(!contract_no) return Toast('暂无合同')
download_file({
applyNo: contract_no
}).then(res => {
if (res.code != 1) {
Toast(res.msg)
}
uni.navigateTo({
url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
})
})
},
retreat(){
Toast('开发中')
},
@ -152,4 +191,64 @@ import { Toast } from '../../libs/uniApi';
font-size: 32rpx;
}
}
.contract {
display: flex;
justify-content: space-between;
padding: 28rpx;
.left {
display: flex;
.contract_img {
width: 102rpx;
height: 102rpx;
background: #f5f5f5;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx;
}
.text {
display: flex;
flex-direction: column;
justify-content: space-around;
.name {
font-size: 32rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
line-height: 35rpx;
}
.nickname {
margin-right: 35rpx;
}
text {
height: 39rpx;
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 35rpx;
}
}
}
.right {
font-size: 28rpx;
font-weight: 500;
color: $theme-oa-color;
line-height: 35rpx;
display: flex;
justify-content: center;
align-items: center;
.icon {
width: 35rpx;
height: 39rpx;
background-color: $theme-oa-color;
opacity: 1;
margin-right: 10rpx;
}
}
}
</style>