first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1 @@
b8798211-bba6-4ffb-91bc-52627ab94469

View File

@@ -0,0 +1,183 @@
// view/logistics/logistics/logistics.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "物流中心", //头部标题
isBack: true,//显示返回
isLoading: true,//加载显示关闭
topTab: false,//物流状态
orderList: [//物流状态列表数据
{
type: 0,
img: "/static/img/wl-djd.png",
name: "待接单",
num: 0,
status: 1
}, {
type: 1,
img: "/static/img/wl-yjd.png",
name: "已接单",
num: 0,
status: 3
}, {
type: 2,
img: "/static/img/wl-sh.png",
name: "待送回",
num: 0,
status: 7
}, {
type: 2,
img: "/static/img/wl-ysd.png",
name: "已送达",
num: 0,
status: 10
}, {
type: 3,
img: "/static/img/wl-wc.png",
name: "已完成",
num: 0,
status: 8
}
],
logPerInfo: {},//物流个人信息
tabStatus: "",//物流人员当日的状态
},
// 显示和关闭
_topTab() {
this.setData({
topTab: !this.data.topTab
})
},
// 跳转到订单列表
goOrderList(e) {
let item = e.currentTarget.dataset.item
if (!!item) {
wx.navigateTo({
url: "/view/logistics/orderList/orderList?stateId=" + JSON.stringify(item)
})
} else {
wx.navigateTo({
url: "/view/logistics/orderList/orderList"
})
}
},
// 获取物流人员的信息
async logisticsOrderTong() {
let orderList = this.data.orderList
let res = await http.http.request2({ url: `${http.api.logisticsOrderTong}`, method: "POST" })
let rel = res.data.data
orderList.map((v, i) => {
switch (i) {
case 0:
orderList[i].num = rel.count.onready
break;
case 1:
orderList[i].num = rel.count.ready
break;
case 2:
orderList[i].num = rel.count.onreturn
break;
case 3:
orderList[i].num = rel.count.over
break;
case 4:
orderList[i].num = rel.count.allover
break;
default:
break;
}
})
this.setData({
logPerInfo: rel,
orderList: orderList
})
},
// 物流人员状态查询和更改
async logisticsStatus(status = "") {
let data = {}
if (status != "") {
data.status = status
}
let res = await http.http.request2({ url: `${http.api.logisticsStatus}`, method: "POST", data: data })
let upData = {
isLoading: false
}
if (!!res.data.data.status) {
upData.tabStatus = res.data.data.status
}
this.setData(upData)
},
// 切换状态
tabStatus(e) {
let type = e.currentTarget.dataset.type
this.logisticsStatus(type)
this._topTab()
this.setData({
tabStatus: type
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.logisticsStatus()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.logisticsOrderTong()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,62 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}" />
<!-- view/logistics/logistics/logistics.wxml -->
<view class="logCentre">
<view class="logCentre_top flex-con3">
<view class="top1">
<view class="mon_text">我的钱包(元)</view>
<view class="mon_p mt40">{{logPerInfo.money}}</view>
</view>
<view class="top_state dis-flex">
<view class="flex1 dis-flex top_a">
<view class="flex1 flex-con3" bind:tap="_topTab">
<image class="yes_icon" src="{{tabStatus==1?'/static/img/icon/wxPay2.png':'/static/img/icon/cancellation_icon.png'}}" />
<view wx:if="{{tabStatus==1}}" class="ml10 mr15">今日上班</view>
<view wx:if="{{tabStatus==2}}" class="ml10 mr15">今日休息</view>
<image class="Inverted_icon" src="/static/img/icon/Inverted_icon.png" />
</view>
<view wx:if="{{ topTab }}" class="top_tab">
<view class="top_tab_row dis-flex" data-type="1" bind:tap="tabStatus">
<view class="flex1 flex-con3">
<image class="yes_icon" src="/static/img/icon/wxPay2.png" />
<view class="ml10 mr15">今日上班</view>
</view>
</view>
<view class="top_tab_row dis-flex" data-type="2" bind:tap="tabStatus">
<view class="flex1 flex-con3">
<image class="yes_icon" src="/static/img/icon/cancellation_icon.png" />
<view class="ml10 mr15">今日休息</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="order_state pd30">
<view class="sur_tit dis-flex mt50">
<view class="flex1 tit_text">全部订单</view>
<view class="sur_tit_r flex-con3" bind:tap="goOrderList">
<span class="flex1 mr10">全部订单</span>
<image src="/static/img/icon/right-r.png" />
</view>
</view>
<view class="order_row">
<view wx:for="{{orderList}}" wx:key class="row_list mt30 flex-con3" data-item="{{item}}" bind:tap="goOrderList">
<view class="flex1 flex-con2">
<view class="order_img">
<image src="{{item.img}}" />
</view>
<view class="order_p1 ml40">{{item.name}}</view>
<view class="order_p2 ml30 {{item.type == 3 ?'order_p3':''}}">
{{item.num}}
</view>
</view>
<image class="right" src="/static/img/icon/rthyrthertherth.png" />
</view>
</view>
</view>
</view>
<!-- 加载动画 -->
<loading-prog isLoading="{{isLoading}}"></loading-prog>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,105 @@
/* view/logistics/logistics/logistics.wxss */
.logCentre_top{
/* display: block; */
height: 310rpx;
background-color: #36c164;
position: relative;
}
.top1{
text-align: center;
}
.mon_text{
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #ffffff;
}
.mon_p{
font-family: PingFang-SC-Bold;
font-size: 80rpx;
color: #ffffff;
font-weight: 700;
}
.top_state{
position: absolute;
right: 0;
top: 30rpx;
width: 200rpx;
height: 50rpx;
background-color: #ffffff;
border-radius: 25rpx 0px 0px 25rpx;
}
.yes_icon{
width: 26rpx;
height: 26rpx;
}
.Inverted_icon{
width: 13rpx;
height: 8rpx;
}
.top_a{
position: relative;
}
.top_tab{
position: absolute;
top: 70rpx;
right: 20rpx;
width: 198rpx;
background-color: #ffffff;
box-shadow: 0px 0px 15rpx 0px rgba(0, 0, 0, 0.15);
border-radius: 10rpx 10rpx 5rpx 10rpx;
}
.top_tab_row{
height: 80rpx;
border-bottom: 2rpx solid #f4f4f4;
}
.top_tab_row:last-child{
border: 0;
}
/* 表头 */
.sur_tit_r{
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #999999;
}
.sur_tit_r image{
width: 11rpx;
height: 22rpx;
}
.tit_text{
font-family: PingFang-SC-Bold;
font-size: 36rpx;
color: #333333;
font-weight: 600;
}
/* 订单列表 */
.row_list{
height: 120rpx;
background-color: #ffffff;
border-radius: 10rpx;
padding: 0 30rpx 0 24rpx;
}
.right{
width: 15rpx;
height: 33rpx;
}
.order_img image{
width: 80rpx;
height: 80rpx;
border-radius: 10rpx;
}
.order_p1{
font-family: PingFang-SC-Medium;
font-size: 36rpx;
color: #333333;
font-weight: 500;
}
.order_p2{
font-family: PingFang-SC-Bold;
font-size: 36rpx;
color: #ff4026;
font-weight: 600;
}
.order_p3{
color: #1dbf53;
}