新增物流订单

This commit is contained in:
zmj 2024-01-21 18:15:55 +08:00
parent b42cb5a8ce
commit 3c01f56304
10 changed files with 1493 additions and 184 deletions

View File

@ -3,4 +3,8 @@ import oahttp from "@/utils/oahttp.js";
/**
* 公告列表
*/
export const getTradeTaskInfo = (data) => oahttp.get('/user/getTradeTaskInfo', data)
export const getTradeTaskInfo = (data) => oahttp.get('/user/getTradeTaskInfo', data)
// 收单消费金额详情
export const getFirstOrderLog = (data) => oahttp.get('/user/getFirstOrderLog', data)
// 收益明细
export const account_log = (data) => oahttp.get('/account_log/lists', data)

View File

@ -1,13 +1,39 @@
<template>
<view class="card">
<view class="tit" @click.stop="goDetil(goodsInfo.id)">
<view v-if="goodsInfo.status==0">取货点:&nbsp;&nbsp;{{goodsInfo.shop_name}}</view>
<view class="card" @click.stop="goDetil(goodsInfo.id)">
<view class="title">
<!-- <view v-if="goodsInfo.status==0">取货点:&nbsp;&nbsp;{{goodsInfo.shop_name}}</view>
<view v-else>收货人:&nbsp;&nbsp;{{ fuzzyName(goodsInfo.receiver_name) }}</view>
<view style="float: right;">
<u-icon name="arrow-right" color="black" size="20"></u-icon>
</view> -->
<view>订单编号:&nbsp;&nbsp;{{goodsInfo.order_sn}}</view>
<view class='status' :style="{color:goodsInfo.status==0?'#2B63E3':'#FF8056'}">
{{goodsInfo.status==0?"待取货":"待配送"}}
</view>
</view>
<view class="content" @click.stop="goDetil(goodsInfo.id)">
<view class="content">
<view class="">
<text class="logo"></text> <text class='shop-address'>{{goodsInfo.shop_name}}</text>
</view>
<view class="detail-address">
{{goodsInfo.shop_address}}
</view>
<view class="" style="margin-top: 20rpx;">
<text class="logo" style="background-color: #FF8056;"></text> <text
class='shop-address'>{{ fuzzyName(goodsInfo.receiver_name) }} {{goodsInfo.receiver_phone}} </text>
</view>
<view class="detail-address">
{{goodsInfo.receiver_address}}
</view>
</view>
<view class="foot">
<!-- <text>商品数量: 共计 <text :style="{color:goodsInfo.status==0?'#FF8056':'#2B63E3'}">6</text></text> -->
<text></text>
<view class="detail-btn">
查看详情
</view>
</view>
<!--<view class="content" @click.stop="goDetil(goodsInfo.id)">
<view v-if="goodsInfo.status==0">
<view class="address">店主姓名:&nbsp;&nbsp;{{goodsInfo.shop_user}}</view>
<view @click.stop="callFn(goodsInfo.shop_phone)" class="address">
@ -37,7 +63,7 @@
<u-button type="primary" style="background-color: #FF7C32; border: 0;"><u-icon v-if="!is_captain"
name="car-fill" color="white" size="25" style="margin-right: 10rpx;"></u-icon> <text
v-if="!is_captain">待配送/</text>点击查看</u-button>
</view>
</view> -->
</view>
</template>
<script>
@ -82,25 +108,59 @@
<style lang="scss" scoped>
.card {
width: 92vw;
height: AUTO;
width: 690rpx;
box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1);
// height: AUTO;
// padding: 20rpx;
margin-top: 20rpx;
background-color: #fff;
overflow: hidden;
border-radius: 2vw;
border-radius: 20rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
.tit {
border-bottom: 3px solid #F5F5F5;
.title {
border-bottom: 2rpx solid #F5F5F5;
font-size: 30rpx;
font-weight: bold;
padding: 20rpx 15rpx;
display: flex;
justify-content: space-between
justify-content: space-between;
font-size: 24rpx;
padding: 30rpx;
.status {
float: right;
font-size: 28rpx;
color: #2B63E3;
font-weight: 700;
}
}
.content {
padding: 20rpx 15rpx;
padding: 20rpx 30rpx;
border-bottom: 2rpx solid #F5F5F5;
.logo {
display: inline-block;
padding: 0 2rpx;
background-color: #2B63E3;
color: white;
border-radius: 10rpx;
font-size: 22rpx;
}
.shop-address {
display: inline-block;
margin-left: 20rpx;
font-weight: bold;
font-size: 26rpx;
}
.detail-address {
color: #7A7A7A;
font-size: 24rpx;
padding-left: 42rpx;
}
.address {
margin: 10rpx 0;
@ -113,5 +173,26 @@
}
}
.foot {
border-bottom: 2rpx solid #F5F5F5;
font-size: 24rpx;
display: flex;
justify-content: space-between;
padding: 30rpx;
color: #1A1A1A;
.detail-btn {
color: #2B63E3;
font-size: 24rpx;
width: 144rpx;
height: 44rpx;
text-align: center;
line-height: 40rpx;
border: 1px solid #2B63E3;
border-radius: 22rpx 22rpx 22rpx 22rpx;
}
}
}
</style>

View File

@ -2,8 +2,8 @@ let httpApiThree;
let httpApi; // 总域名
let httpApiTwo; // 物流系统域名
// const env = 'dev'; // 开发
const env = 'prod'; // 生产
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
// const env = 'local'; // 本地
@ -19,14 +19,14 @@ switch (env) {
httpApiTwo = 'https://preview-logistics.lihaink.cn' //预上线
break;
case 'local':
httpApi = 'http://192.168.1.24:8083' //预上线
httpApiThree = 'http://192.168.1.24:8083' //预上线
httpApiTwo = 'http://192.168.1.24:8083' //预上线
httpApi = 'http://192.168.1.25:8083' //预上线
httpApiThree = 'http://192.168.1.25:8083' //预上线
httpApiTwo = 'https://ceshi-logistics.lihaink.cn' //测试环境
break;
default:
httpApi = 'https://ceshi-new-wokr.lihaink.cn/' //测试
httpApiThree = 'https://ceshi-new-wokr.lihaink.cn/' //测试
httpApiTwo = 'https://ceshi-new-wokr.lihaink.cn/' //测试环境
httpApiTwo = 'https://ceshi-logistics.lihaink.cn' //测试环境
//测试环境
}

View File

@ -21,6 +21,24 @@
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/oaHome/FirstOrderLog",
"style": {
"navigationBarTitleText": "首笔消费金额",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/oaHome/accountLog",
"style": {
"navigationBarTitleText": "收益明细",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/oaLogin/oaLogin",
"style": {

View File

@ -177,12 +177,21 @@
let that = this
//#ifdef APP
uni.getLocation({
type: 'gcj02',
type: 'wgs84',
geocode: true,
isHighAccuracy: true,
success: function async (res) {
that.nowAddress = res.address.city + res.address.district + res.address.street + res
.address.streetNum + res.address.poiName
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
uni.request({
url: `https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=${res.longitude},${res.latitude}&key=976a447183ed0d384e1c5b6448b8a75d&radius=1000&extensions=all`, //
success: (res) => {
// that.address = res.data.regeocode.formatted_address
that.nowAddress = res.data.regeocode.formatted_address
// console.log();
}
});
that.markers[1].latitude = res.latitude
that.markers[1].longitude = res.longitude
@ -289,9 +298,7 @@
getDriverLine() {
const that = this;
const key = "997c9a3d88154fa78f4d28bebc1dd84f";
const origin = `${this.markers[1].longitude},${this.markers[1].latitude}`;
const destination = `${this.markers[0].longitude},${this.markers[0].latitude}`;
uni.request({
// url: `https://restapi.amap.com/v3/direction/walking?key=${key}&origin=105.43639400000002,28.908854&destination=105.439304,28.908447`,
@ -340,7 +347,6 @@
// uni.navigateBack()
// return
let that = this
console.log(6666)
uni.scanCode({
onlyFromCamera: true,
success: function(res) {

View File

@ -0,0 +1,79 @@
<template>
<view class="card">
<view class="li" v-for="item,index in orderList.lists" :key='index'>
<view class="">
订单编号: {{item.order_no}}
</view>
<view class="">
订单金额: <text style="color: #FF4141;">{{item.order_money}}</text>
</view>
</view>
</view>
</template>
<script>
import {
getFirstOrderLog,
} from "@/api/newTask.js"
export default {
data() {
return {
orderList: [],
flag: false,
status: "",
page_no: 0,
page_size: 20
}
},
methods: {
async getFirstOrderLogList() {
let res = await getFirstOrderLog()
console.log(res)
this.orderList = res.data
}
},
mounted() {
this.getFirstOrderLogList()
},
// onReachBottom() {
// if (this.flag) return
// let {
// page_no,
// page_size
// } = this
// let that = this
// this.status = "loading"
// page_no += 1
// this.flag = true
// getFirstOrderLog({
// page_no,
// page_size
// }).then(res => {
// that.orderList = that.orderList.concat(res.data)
// this.flag = false
// if (!res.data.data.length) {
// this.status = "nomore"
// this.flag = true
// }
// })
// },
}
</script>
<style lang="scss" scoped>
.card {
width: 690rpx;
margin: 30rpx auto;
background-color: #fff;
padding: 20rpx;
border-radius: 29rpx;
.li {
margin: 20rpx;
font-size: 28rpx;
}
}
</style>

View File

@ -0,0 +1,73 @@
<template>
<view class="card">
<u-tag :text="item.remark" type="success" plain v-for="item,index in orderList" :key='index' class="li"></u-tag>
<u-loadmore :status="status" />
</view>
</template>
<script>
import {
account_log,
} from "@/api/newTask.js"
export default {
data() {
return {
orderList: [],
flag: false,
status: "loadmore",
page_no: 2,
page_size: 20,
}
},
methods: {
async getFirstOrderLogList() {
let res = await account_log({
page_no: 1,
page_size: 20
})
this.orderList = res.data.lists
}
},
mounted() {
this.getFirstOrderLogList()
},
onReachBottom() {
if (this.flag) return
let {
page_no,
page_size
} = this
let that = this
this.status = "loading"
this.page_no += 1
this.flag = true
account_log({
page_no,
page_size
}).then(res => {
that.orderList = that.orderList.concat(res.data.lists)
this.flag = false
if (!res.data.lists.length) {
this.status = "nomore"
this.flag = true
}
})
},
}
</script>
<style lang="scss" scoped>
.card {
width: 690rpx;
margin: 30rpx auto;
background-color: #fff;
padding: 20rpx;
border-radius: 29rpx;
.li {
margin: 20rpx;
font-size: 28rpx;
}
}
</style>

View File

@ -10,18 +10,10 @@
</view>
<view class="content">
{{taskDetail.content }}
<view class="time">
完成时间: {{taskDetail.end_time}}
</view>
</view>
</view>

1001
pages/oaHome/new_file.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,10 @@
<template>
<view class="box">
<!-- <view class=""
style="background-color: red;height: var(--status-bar-height);position: fixed;top: 0;z-index: 9999;" /> -->
<view class="" style="background-color: #2B63E3;height: var(--status-bar-height);" />
<view class="head">
<view class="" style="float: right;margin-top: 20rpx;">
<Myindex url='/pages/oaHome/oaHome' />
@ -19,92 +23,41 @@
</view>
</view>
<view class="deposit">
<view class="deposit-l">
<u--image :showLoading="true" width="81rpx" height="78rpx" :src="'../../static/newWork/index/YJ.png'"
shape="circle"></u--image>
<view class="deposit" v-if="myOaInfo.group_id !=20">
<view class="deposit-l" v-for="(item,index) in depositLIst" :key='index' @click='item.event'>
<u--image :showLoading="true" width="81rpx" height="78rpx"
:src="`../../static/newWork/index/${item.icon}.png`"></u--image>
<view class="" style="margin-left:20rpx ;">
<view class="">
押金
<view class="" style="font-size: 28rpx;">
{{item.title}}
</view>
<view class="deposit-value">
{{myOaInfo.deposit}}
{{item.unit||''}}{{myOaInfo[item.value]}}
</view>
</view>
</view>
<view class="deposit-l">
<u--image :showLoading="true" width="81rpx" height="78rpx" :src="'../../static/newWork/index/GLHS.png'"
shape="circle"></u--image>
</view>
<view class="deposit" v-else>
<view class="deposit-l" v-for="(item,index) in depositCouriersLIst" :key='index' @click='item.event'>
<u--image :showLoading="true" width="81rpx" height="78rpx"
:src="`../../static/newWork/index/${item.icon}.png`"></u--image>
<view class="" style="margin-left:20rpx ;">
<view class="">
管理户数
<view class="" style="font-size: 28rpx;">
{{item.title}}
</view>
<view class="deposit-value">
{{myOaInfo.user_information_count}}
</view>
</view>
</view>
<!-- 工程 -->
<!-- <view class="">
<uqrcode ref="uqrcode" canvas-id="qrcode" value="https://uqrcode.cn/doc" :options="{ margin: 10 }">
</uqrcode>
</view> -->
<!-- <view class="deposit-l">
<u--image :showLoading="true" width="81rpx" height="78rpx" :src="'../../static/newWork/index/ZCYHS.png'"
shape="circle"></u--image>
<view class="" style="margin-left:20rpx ;">
<view class="">
注册用户数
</view>
<view class="deposit-value">
{{myOaInfo.register_num}}
</view>
</view>
</view> -->
<!-- <view class="deposit-l">
<u--image :showLoading="true" width="81rpx" height="78rpx" :src="'../../static/newWork/index/RZSHS.png'"
shape="circle"></u--image>
<view class="" style="margin-left:20rpx ;">
<view class="">
入驻商户数
</view>
<view class="deposit-value">
{{myOaInfo.merchant_num }}
</view>
</view>
</view> -->
<!-- <view class="deposit-l">
<u--image :showLoading="true" width="81rpx" height="78rpx" :src="'../../static/newWork/index/JYJE.png'"
shape="circle"></u--image>
<view class="" style="margin-left:20rpx ;">
<view class="">
交易金额
</view>
<view class="deposit-value">
{{myOaInfo.trade_amount }}
</view>
</view>
</view> -->
<view class="deposit-l" @click="showCode=true">
<u--image :showLoading="true" width="81rpx" height="78rpx" :src="'../../static/newWork/index/YQM.png'"
shape="circle"></u--image>
<view class="" style="margin-left:20rpx ;">
<view class="">
邀请码
</view>
<view class="deposit-value">
{{myOaInfo.invite_code}}
{{item.unit||''}}{{myOaInfo[item.value]}}
</view>
</view>
</view>
</view>
<!--追加功能 -->
<view class="" v-if='taskList.length==0'>
<view class="" v-if='taskList.length==0&& myOaInfo.group_id!=20 '>
<u-empty icon="/static/newWork/index/empty.png" iconSize='200' width='300' height="300" marginTop='50'
textColor='#BFD7FF' text="等待任务下发"></u-empty>
</view>
<view class="task" v-else>
<view class="tit">
<view class="tit" style="margin-bottom: 20rpx;" v-if="myOaInfo.group_id!=20">
我的任务
</view>
@ -126,7 +79,29 @@
</view>
</view>
</view>
<view class="logisti task" v-if="myOaInfo.group_id==20">
<view class="logisti-head">
<view class="tit">
配送信息
</view>
<view class="" style="display: flex;">
<u--input placeholder="搜索" class='serch' prefixIcon="search"
prefixIconStyle="font-size: 22px;color: #909399" @blur='serchWidth=170' @focus='serchWidth=400'
:style="`width:${serchWidth}rpx`" v-model='keywords'></u--input>
<u-button
style="width: 100rpx;height: 60rpx;background-color: #2B63E3;color: white;border-radius: 20rpx;"
text="搜索" @click="getOrderList"></u-button>
</view>
</view>
<logistiBriefCard v-for="(item, index) in orderList" :key="index" :goodsInfo="item">
</logistiBriefCard>
<u-loadmore :status="status" />
</view>
<u-overlay :show="showCode" @click="showCode=false" :opacity="0.1">
<view class="code" id='code'>
<view class="code-img">
<view class="" style="margin: 0 auto;width: 440rpx;">
@ -244,9 +219,9 @@
<script>
import Myindex from '@/components/return/index.vue';
// import {
// getList
// } from "@/api/logistics.js";
import {
getList
} from "@/api/logistics.js";
import {
Toast
} from "@/libs/uniApi.js";
@ -263,7 +238,7 @@
taskListApi
} from "@/api/task.js"
import {
getTradeTaskInfo
getTradeTaskInfo,
} from "@/api/newTask.js"
// import tabbar from '../components/tabbar'
import {
@ -277,6 +252,7 @@
mapState
} from 'vuex';
import bj from "@/static/animation/home.json"
import logistiBriefCard from "@/components/logistiComptent/logistiCard/logistiBriefCard.vue";
import {
userInfo
} from "@/api/oaUser.js"
@ -285,17 +261,109 @@
// #endif
export default {
components: {
Myindex
Myindex,
logistiBriefCard
},
data() {
return {
depositLIst: [{
icon: "YJ",
title: "押金",
value: "deposit",
event: () => {
return
}
},
{
icon: "GLHS",
title: "管理户数",
value: "user_information_count"
},
{
icon: "ZCYHS",
title: "成功邀请人数",
value: "register_num"
},
// {
// icon: "RZSHS",
// title: "",
// value: "merchant_num"
// },
// {
// icon: "JYJE",
// title: "",
// value: "trade_amount",
// unit: ""
// },
// {
// icon: "RZSHS",
// title: "",
// value: "merchant_num"
// },
{
icon: "RZSHS",
title: "总计首单金额",
value: "trade_amount",
unit: "¥",
event: () => {
uni.navigateTo({
url: '/pages/oaHome/FirstOrderLog'
})
}
},
{
icon: "RZSHS",
title: "收益",
value: "user_money",
unit: "¥",
event: () => {
uni.navigateTo({
url: '/pages/oaHome/accountLog'
})
}
},
{
icon: "YQM",
title: "邀请码",
value: "invite_code",
event: () => {
this.showCode = true
},
},
],
keywords: "",
depositCouriersLIst: [{
icon: "RZSHS",
title: "收益",
value: "user_money",
unit: "¥",
event: () => {
uni.navigateTo({
url: '/pages/oaHome/accountLog'
})
}
},
{
icon: "YQM",
title: "邀请码",
value: "invite_code",
event: () => {
this.showCode = true
},
},
],
showCode: false,
showCode1: false,
brange: 0,
serchWidth: 150,
status: "loadmore",
options: {
data: '',
},
status: "loadmore",
page_num: 1,
flag: false,
uniMP: false,
@ -303,32 +371,13 @@
id: "",
is_captain: 0,
notArr: [],
orderList: [],
orderList: [1],
oaHomeData: [],
taskList: [],
src: "https://cdn.uviewui.com/uview/album/1.jpg",
assessData: [{
num: "0",
name: "任务",
},
{
num: "0",
name: "已完成",
},
{
num: "0",
name: "未完成",
},
{
num: "0%",
name: "完成率",
},
],
// src: "https://cdn.uviewui.com/uview/album/1.jpg",
project: {},
task: {},
page: 1,
myTaskList: [],
flowState: "#47B347", //
priority: "", //
myOaInfo: {
avatar: "",
@ -338,34 +387,6 @@
label_name: "",
},
ApproveList: [],
showOaHomeData: false, //
chartData: {},
progress: 0,
// config-ucharts.js ['arcbar'] opts opts
opts: {
title: {
fontSize: 16,
color: "#2fc25b"
},
subtitle: {
name: "",
fontSize: 12,
color: "#666666"
},
extra: {
arcbar: {
type: "circle",
width: 12,
backgroundColor: "#E9E9E9",
startAngle: 1.5,
endAngle: 0.25,
gap: 2
}
}
}
};
},
@ -373,14 +394,13 @@
// console.log('asdashg')
if (uni.getStorageSync('USER_INFO')) {
let userData = JSON.parse(uni.getStorageSync('USER_INFO'))
this.initUserInfo(userData);
// console.log(545)
}
await this.$onLaunched;
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO") || '{}')?.is_captain
this.options.data = bj;
// this.initTask()
this.getOrderList()
},
async onShow() {
this.initTask()
@ -400,9 +420,6 @@
})
}
},
computed: {
// oaHomeData() {
// const route = '/pages/oaHome/oaHome';
@ -457,6 +474,12 @@
}
},
methods: {
serchOrder() {
},
copyCode() {
let that = this
uni.setClipboardData({
@ -557,39 +580,56 @@
} else Toast('暂未开放')
},
navTwo(url, key) {
// let role_id = this.$store.state.app?.userInfo?.admin?.role_id || null;
// var arr = [3, 6];
// if (role_id && role_id[0] == 9) {
// if (arr.indexOf(key) == -1) {
// Toast("");
// return false;
// }
// }
this.navTo(url);
},
//
clickNotice(e) {
uni.navigateTo({
url: `/pages/oaNews/oaNews?id=${e}`,
async getOrderList() {
console.log("getorder")
this.id = this.myOaInfo.id;
let res = await getList({
user_id: this.id,
user_type: this.is_captain,
keywords: this.keywords
});
this.orderList = res.data.data;
},
async getUserIndex() {
const res = await getUserIndexAPI();
console.log(res, "res")
this.myOaInfo = res;
},
goOrderList() {
uni.navigateTo({
url: "/pages/logistics/index",
});
},
},
async onPullDownRefresh() {
this.initTask()
await this.$store.dispatch('initConfig');
uni.stopPullDownRefresh();
},
onReachBottom() {
if (this.flag) return
let that = this
this.status = "loading"
this.page_num += 1
this.flag = true
getList({
status: this.curNow,
user_id: this.id,
keywords: this.keywords,
user_type: this.is_captain,
page_num: this.page_num
}).then(res => {
that.orderList = that.orderList.concat(res.data.data)
this.flag = false
if (!res.data.data.length) {
this.status = "nomore"
this.flag = true
}
})
},
};
</script>
@ -688,7 +728,7 @@
position: relative;
padding-left: 20rpx;
font-size: 30rpx;
margin-bottom: 20rpx;
// margin-bottom: 20rpx;
color: #1A1A1A;
}
@ -808,6 +848,21 @@
}
}
.logisti {
.logisti-head {
display: flex;
justify-content: space-between;
align-items: center;
.serch {
background-color: #EDF0F6;
height: 60rpx;
border-radius: 29rpx 29rpx 29rpx 29rpx;
transition: 500ms;
}
}
}
// .oa_home {
// padding-bottom: 100rpx;
// }