This commit is contained in:
weipengfei 2023-09-13 16:45:07 +08:00
commit 33205f116c
5 changed files with 1105 additions and 1032 deletions

View File

@ -371,7 +371,7 @@
} }
this.doneGood() this.doneGood()
this.showPop = false this.showPop = false
this.showMore() // this.showMore()
}, },
// //
@ -380,8 +380,15 @@
take_code: this.take_code, take_code: this.take_code,
logistics_id: this.goodsInfo.id logistics_id: this.goodsInfo.id
}).then(res => { }).then(res => {
console.log(res)
this.$emit('showTost') this.$emit('showTost')
this.$emit('getlist') this.$emit('getlist')
}).catch(err => {
console.log(err.msg)
uni.showToast({
title: err.msg,
icon: "none"
})
}) })
}, },

View File

@ -1,50 +1,117 @@
<template> <template>
<view class="c_task_item" @click="clickTask"> <view class="c_task_item" @click="clickTask">
<view class="personnel_list"> <view class="personnel_list">
<view class="cards"> <view class="cards">
<view class="cards_head"> <view class="cards_head">
<text style="font-size: 32rpx">任务名称: {{datas.title}}</text> <text style="font-size: 32rpx">任务名称: {{ datas.title }}</text>
<text>点击查看</text> <text>点击查看</text>
</view> </view>
<view class="cards_content"> <view class="cards_content">
<view class="right" style="width: 100%;"> <view class="right" style="width: 100%">
<view class="" style="display: flex;"> <view class="" style="display: flex">
<view>任务状态 :</view> <view>任务状态 :</view>
<view class="text" style="color: #ff7c32;"> <view class="text" style="color: #ff7c32">
<text v-if="datas.status==3" style="color: #488F00;">已完成</text> <text v-if="datas.status == 3" style="color: #488f00"
<text v-else-if="datas.status==5" style="color: #ccc;">已关闭</text> >已完成</text
<block v-else-if="(datas.type==31||datas.type==32||datas.type==33||datas.type==34||datas.type==35)"> >
<block v-if="datas.extend&&datas.extend.informationg"> <text v-else-if="datas.status == 5" style="color: #ccc"
{{(datas.extend.informationg.update?datas.extend.informationg.update:0)+'/'+(datas.extend.informationg.count?datas.extend.informationg.count:0)}} >已关闭</text
>
<block
v-else-if="
datas.type == 31 ||
datas.type == 32 ||
datas.type == 33 ||
datas.type == 34 ||
datas.type == 35
"
>
<block v-if="datas.extend && datas.extend.informationg">
{{
(datas.extend.informationg.update
? datas.extend.informationg.update
: 0) +
"/" +
(datas.extend.informationg.count
? datas.extend.informationg.count
: 0)
}}
</block> </block>
<block <block
v-else-if="datas.extend&&datas.extend.transaction&&datas.extend.transaction.arr"> v-else-if="
{{total_price+'元/'+(datas.extend.transaction.arr.day_money?datas.extend.transaction.arr.day_money:0)+'元'}} datas.extend &&
<!-- <text style="color: #488F00;margin-left: 26rpx;">{{(datas.extend.transaction.arr.transaction_pool?datas.extend.transaction.arr.transaction_pool:0)+'元'}}</text> --> datas.extend.transaction &&
datas.extend.transaction.arr
"
>
{{
(datas.extend.transaction.arr.transaction_pool
? datas.extend.transaction.arr.transaction_pool
: 0) +
"元/" +
(datas.extend.transaction.arr.day_money
? datas.extend.transaction.arr.day_money
: 0) +
"元"
}}
<!-- <text style="color: #488F00;margin-left: 26rpx;">{{(datas.extend.transaction.arr.transaction_pool?datas.extend.transaction.arr.transaction_pool:1)+'元'}}</text> -->
</block> </block>
<block v-else-if="datas.extend&&datas.extend.update"> <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> <text
<text v-else-if="datas.extend.update.terminus&&datas.extend.update.terminus.lnglat[0]">抵达中转点</text> v-if="
(datas.extend.update.transfer &&
datas.extend.update.transfer.lnglat[0]) ||
datas.status == 3
"
style="color: #488f00"
>抵达终点</text
>
<text
v-else-if="
datas.extend.update.terminus &&
datas.extend.update.terminus.lnglat[0]
"
>抵达中转点</text
>
<text v-else>进行中</text> <text v-else>进行中</text>
</block> </block>
<block v-else>进行中</block> <block v-else>进行中</block>
</block> </block>
</view> </view>
</view> </view>
<view style="display: flex;justify-content: space-between;align-items: center;"> <view
style="
display: flex;
justify-content: space-between;
align-items: center;
"
>
<view> <view>
<text>完成时间 :</text> <text>完成时间 :</text>
<text>{{datas.end_time}}</text> <text>{{ datas.end_time }}</text>
</view> </view>
<text v-if="datas.status==2||datas.status==1" style="background-color: #ff7c32;" <text
class="status">进行中</text> v-if="datas.status == 2 || datas.status == 1"
<text v-if="datas.status==3" style="background-color: #488F00;" class="status">已完成</text> style="background-color: #ff7c32"
<text v-if="datas.status==5" style="background-color: #ccc;" class="status">已关闭</text> class="status"
>进行中</text
>
<text
v-if="datas.status == 3"
style="background-color: #488f00"
class="status"
>已完成</text
>
<text
v-if="datas.status == 5"
style="background-color: #ccc"
class="status"
>已关闭</text
>
</view> </view>
<view class=""> <view class="">
<text>任务金额 :</text> <text>任务金额 :</text>
<text> {{datas.money+'元'||'0.00'}} </text> <text> {{ datas.money + "元" || "0.00" }} </text>
</view> </view>
</view> </view>
</view> </view>
@ -98,83 +165,82 @@
</view> </view>
</view> </view>
--> -->
</view> </view>
</template> </template>
<script> <script>
import { import {
Toast Toast
} from '../../libs/uniApi'; } from '../../libs/uniApi';
export default { export default {
name: "task", name: "task",
props: { props: {
datas: { datas: {
type: Object, type: Object,
default: function() { default: function () {
return {} return {}
} }
} }
}, },
data() { data () {
return { return {
}; };
}, },
created() { created () {
try{ try {
}catch(e){ } catch (e) {
//TODO handle the exception //TODO handle the exception
} }
}, },
computed:{ computed: {
total_price(){ total_price () {
return this.datas?.extend?.transaction?.arr?.transaction_pool?this.datas.extend.transaction.arr.total_price += +this.datas.extend.transaction.arr.transaction_pool: this.datas.extend.transaction.arr.total_price return this.datas?.extend?.transaction?.arr?.transaction_pool ? this.datas.extend.transaction.arr.total_price += +this.datas.extend.transaction.arr.transaction_pool : this.datas.extend.transaction.arr.total_price
} }
}, },
methods: { methods: {
navTo(url) { navTo (url) {
if(url){ if (url) {
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
mask: true mask: true
}); });
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
success() { success () {
uni.hideLoading() uni.hideLoading()
} }
}) })
}else Toast('暂未开放') } else Toast('暂未开放')
}, },
clickTask() { clickTask () {
// console.log('', this.$props.datas); // console.log('', this.$props.datas);
// if ((this.$props.datas.type != 31) && this.$props.datas.status !== 2 && this.$props.datas.status !== 1) { // if ((this.$props.datas.type != 31) && this.$props.datas.status !== 2 && this.$props.datas.status !== 1) {
// return this.$props.datas.status == 3 ? Toast('!') : Toast('!'); // return this.$props.datas.status == 3 ? Toast('!') : Toast('!');
// } // }
if (this.$props.datas.type == 31) { if (this.$props.datas.type == 31) {
// this.navTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr)) // this.navTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr))
if(this.$store.state.app.userInfo.admin_id)this.navTo(`/subpkg/captain/captain?task_id=${this.$props.datas?.id}`); if (this.$store.state.app.userInfo.admin_id) this.navTo(`/subpkg/captain/captain?task_id=${this.$props.datas?.id}`);
else this.navTo(`/subpkg/archives/archives?task_id=${this.$props.datas?.id}`); else this.navTo(`/subpkg/archives/archives?task_id=${this.$props.datas?.id}`);
} else if (this.$props.datas.type == 32) { } else if (this.$props.datas.type == 32) {
// this.navTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr)) // this.navTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr))
this.navTo(`/subpkg/property/vehicle?task_id=${this.$props.datas?.id}`) this.navTo(`/subpkg/property/vehicle?task_id=${this.$props.datas?.id}`)
} else if(this.$props.datas.type == 33){ } else if (this.$props.datas.type == 33) {
this.navTo(`/subpkg/blockTransaction/blockTransaction?task_id=${this.$props.datas?.id}`) this.navTo(`/subpkg/blockTransaction/blockTransaction?task_id=${this.$props.datas?.id}`)
}else if(this.$props.datas.type == 34){ } else if (this.$props.datas.type == 34) {
this.navTo(`/subpkg/otherTask/otherTask?task_id=${this.$props.datas?.id}`) this.navTo(`/subpkg/otherTask/otherTask?task_id=${this.$props.datas?.id}`)
}else if(this.$props.datas.type == 35){ } else if (this.$props.datas.type == 35) {
this.navTo(`/subpkg/buyShare/buyShare?task_id=${this.$props.datas?.id}`) this.navTo(`/subpkg/buyShare/buyShare?task_id=${this.$props.datas?.id}`)
} }
else this.navTo(''); else this.navTo('');
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.c_task_item { .c_task_item {
margin: 0 auto; margin: 0 auto;
// margin-bottom: 28rpx; // margin-bottom: 28rpx;
width: 694rpx; width: 694rpx;
@ -198,7 +264,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 28rpx; padding: 28rpx;
border-bottom: 1rpx solid #F5F5F5FF; border-bottom: 1rpx solid #f5f5f5ff;
.left { .left {
display: flex; display: flex;
@ -246,7 +312,7 @@
.right { .right {
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 400;
color: #3274F9; color: #3274f9;
line-height: 39rpx; line-height: 39rpx;
.price { .price {
@ -256,14 +322,12 @@
} }
} }
} }
}
} .personnel_list {
.personnel_list {
// padding: 28rpx 0; // padding: 28rpx 0;
padding-bottom: 28rpx; padding-bottom: 28rpx;
.cards { .cards {
margin: 0 auto; margin: 0 auto;
// margin-bottom: 28rpx; // margin-bottom: 28rpx;
@ -314,7 +378,6 @@
justify-content: space-between; justify-content: space-between;
view { view {
text:nth-child(2) { text:nth-child(2) {
margin-left: 20rpx; margin-left: 20rpx;
} }
@ -326,7 +389,6 @@
text-align: center; text-align: center;
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
border-radius: 30rpx; border-radius: 30rpx;
} }
} }
} }
@ -340,5 +402,5 @@
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
} }
} }
</style> </style>

View File

@ -6,7 +6,7 @@ let httpApiTwo; // 物流系统域名
const env = 'prod'; // 生产 const env = 'prod'; // 生产
// const env = 'prew'; // 预上线 // const env = 'prew'; // 预上线
switch(env){ switch (env) {
case 'prod': case 'prod':
httpApi = 'https://worker-task.lihaink.cn' //正式 httpApi = 'https://worker-task.lihaink.cn' //正式
httpApiTwo = 'https://logistics.lihaink.cn' //正式环境 httpApiTwo = 'https://logistics.lihaink.cn' //正式环境

View File

@ -558,7 +558,7 @@
"path": "property/index", "path": "property/index",
"style": { "style": {
"navigationBarTitleText": "资产管理", "navigationBarTitleText": "资产管理",
"enablePullDownRefresh": false, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }

View File

@ -1,22 +1,24 @@
<template> <template>
<view class=""> <view class="">
<view class="card"> <view class="card">
<!-- <view class="item"> <view class="item" v-if="card.is_show == true">
<view class="price">{{c_money(card.total_price)}}</view>
</view> -->
<view class="item">
<view>交易金额剩余池</view> <view>交易金额剩余池</view>
<view class="price">{{c_money(card.transaction_pool)}}</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.transaction_pool) }}</view>
</view> </view>
<view class="item"> <view class="item">
<view>目标完成金额</view> <view>目标完成金额</view>
<!-- <view class="price" v-if="company.company_money">{{cCount(company.company_money)}}</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" v-else>0.00</view> -->
<view class="price">{{c_money(card.day_money)}}</view> <view class="price">{{ c_money(card.day_money) }}</view>
</view> </view>
<!-- <view class="item">
<view>交易金额剩余池</view>
<view class="price">{{c_money(card.transaction_pool)}}</view>
</view> -->
</view> </view>
<!-- <view class="nav"> <!-- <view class="nav">
<view class="title">账单流水</view> <view class="title">账单流水</view>
<view class="right"> <view class="right">
@ -26,7 +28,6 @@
</view> </view>
</view> --> </view> -->
<view class="list"> <view class="list">
<!-- <view class="item" v-for="(item, index) in 10" :key="index"> <!-- <view class="item" v-for="(item, index) in 10" :key="index">
<view class="top"> <view class="top">
@ -50,31 +51,34 @@
</view> </view>
</view> --> </view> -->
<view class="item" v-for="(item, index) in list" :key="item.id"> <view class="item" v-for="(item, index) in list" :key="item.id">
<view class="top"> <view class="top"> 账单日期{{ item.create_time }} </view>
账单日期{{item.create_time}}
</view>
<view class="t_bottom"> <view class="t_bottom">
<view class="order">订单编号{{item.order_sn}}</view> <view class="order">订单编号{{ item.order_sn }}</view>
<view class="price">交易额: {{item.total_price}}</view> <view class="price">交易额: {{ item.total_price }}</view>
</view> </view>
</view> </view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText" <u-loadmore
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> :status="loadConfig.status"
:loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText"
:nomore-text="loadConfig.nomoreText"
/>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { Toast } from '../../libs/uniApi' import { Toast } from '../../libs/uniApi'
import { taskOrderDetail } from "@/api/task.js" import { taskOrderDetail } from "@/api/task.js"
export default { export default {
data() { data () {
return { return {
card: { card: {
total_price: "0.00", total_price: "0.00",
status: 1, status: 1,
day_money: "0.00", day_money: "0.00",
transaction_pool: "0.00" transaction_pool: "0.00",
is_show: true
}, },
list: [], list: [],
task_id: '', task_id: '',
@ -89,28 +93,28 @@
}, },
} }
}, },
onLoad(options) { onLoad (options) {
options.task_id ? this.task_id = options.task_id : null; options.task_id ? this.task_id = options.task_id : null;
this.initLoad(); this.initLoad();
}, },
onShow() {}, onShow () { },
onReachBottom() { onReachBottom () {
this.loadList(); this.loadList();
}, },
methods: { methods: {
navTo(url) { navTo (url) {
url ? url ?
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
}) : Toast('暂未开放') }) : Toast('暂未开放')
}, },
async initLoad() { async initLoad () {
this.loadConfig.page = 1; this.loadConfig.page = 1;
this.loadConfig.status = "loadmore"; this.loadConfig.status = "loadmore";
this.list = []; this.list = [];
await this.loadList(); await this.loadList();
}, },
async loadList() { async loadList () {
try { try {
let that = this; let that = this;
if (this.loadConfig.status == "nomore") return; if (this.loadConfig.status == "nomore") return;
@ -128,8 +132,8 @@
this.loadConfig.page++; this.loadConfig.page++;
} }
let extend = res.data?.extend; let extend = res.data?.extend;
Object.keys(this.card).forEach((key)=>{ Object.keys(this.card).forEach((key) => {
if(extend?.transaction?.arr[key]!=null&&extend?.transaction?.arr[key]!=undefined)this.card[key] = extend?.transaction?.arr[key]; if (extend?.transaction?.arr[key] != null && extend?.transaction?.arr[key] != undefined) this.card[key] = extend?.transaction?.arr[key];
}) })
this.card.transaction_pool += this.card.total_price; this.card.transaction_pool += this.card.total_price;
this.list = [...this.list, ...res.data?.list] this.list = [...this.list, ...res.data?.list]
@ -137,27 +141,27 @@
this.loadConfig.status = "nomore" this.loadConfig.status = "nomore"
} }
}, },
c_money(str){ c_money (str) {
try{ try {
if(!isNaN(str)){ if (!isNaN(str)) {
typeof str != 'string' ? str = str.toFixed(2) : str = parseFloat(str).toFixed(2); typeof str != 'string' ? str = str.toFixed(2) : str = parseFloat(str).toFixed(2);
}else str = '0.00' } else str = '0.00'
}catch(e){ } catch (e) {
str = '0.00' str = '0.00'
} }
return '¥'+str; return '¥' + str;
} }
}, },
onPullDownRefresh() { onPullDownRefresh () {
this.initLoad().then(()=>{ this.initLoad().then(() => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}) })
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.card { .card {
margin: 28rpx auto; margin: 28rpx auto;
width: 694rpx; width: 694rpx;
height: 158rpx; height: 158rpx;
@ -187,9 +191,9 @@
font-weight: 500; font-weight: 500;
} }
} }
} }
.nav { .nav {
margin: 28rpx; margin: 28rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -224,15 +228,15 @@
color: #0122c7; color: #0122c7;
} }
} }
} }
.list { .list {
.item { .item {
margin: 0 auto; margin: 0 auto;
margin-bottom: 28rpx; margin-bottom: 28rpx;
width: 694rpx; width: 694rpx;
// height: 238rpx; // height: 238rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1; opacity: 1;
padding: 28rpx; padding: 28rpx;
@ -246,12 +250,12 @@
&:before { &:before {
display: inline-block; display: inline-block;
content: '交易明细'; content: "交易明细";
width: 137rpx; width: 137rpx;
height: 49rpx; height: 49rpx;
line-height: 49rpx; line-height: 49rpx;
text-align: center; text-align: center;
background: #FF7C32; background: #ff7c32;
border-radius: 26rpx 26rpx 26rpx 26rpx; border-radius: 26rpx 26rpx 26rpx 26rpx;
color: #fff; color: #fff;
margin-right: 28rpx; margin-right: 28rpx;
@ -288,7 +292,7 @@
align-items: center; align-items: center;
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #F02828; color: #f02828;
} }
} }
@ -302,10 +306,10 @@
flex-wrap: wrap; flex-wrap: wrap;
.price { .price {
color: #FF7C32; color: #ff7c32;
flex-shrink: 0; flex-shrink: 0;
} }
} }
} }
} }
</style> </style>