更换版本

This commit is contained in:
2024-01-22 18:48:00 +08:00
parent 9f65ea8fd9
commit 00e6dcaec0
1158 changed files with 70609 additions and 51780 deletions

94
pages/part/order/index.js Normal file
View File

@@ -0,0 +1,94 @@
var t;
(t = getApp()),
Page({
data: {
table: {
1: "待报价",
2: "待付款",
3: "待发货",
4: "待收货",
5: "已完成",
},
activeIndex: 1,
orderList: [],
nav_width: "",
page: 1,
isLast: !1,
isLoad: !1,
},
onLoad: function (t) {
var a = t.status,
e = Object.keys(this.data.table).length;
this.setData({ nav_width: 100 / e, activeIndex: a > 0 ? a : 1 });
},
getList: function () {
var a = this;
if (a.data.isLast) return !1;
t.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
r: "part.order.order_list",
uid: t.getuid(),
page: a.data.page,
status: a.data.activeIndex,
},
success: function (t) {
if (a.data.page > 1)
if (t.data.data.length > 0) {
var e = a.data.orderList;
e.push.apply(
e,
(function (t) {
if (Array.isArray(t)) {
for (var a = 0, e = Array(t.length); a < t.length; a++)
e[a] = t[a];
return e;
}
return Array.from(t);
})(t.data.data)
),
a.setData({ orderList: e });
} else a.setData({ isLast: !0 });
else
a.setData({ orderList: t.data.data }),
t.data.data.length < 1 && a.setData({ isLast: !0 });
a.setData({ page: a.data.page + 1 });
},
});
},
ActiveClick: function (t) {
this.setData({
activeIndex: t.currentTarget.dataset.index,
page: 1,
isLast: !1,
}),
this.getList();
},
onReachBottom: function () {
this.getList();
},
goPay: function (a) {
var e = t.getAttr(a, "id");
wx.navigateTo({ url: "/pages/part/pay/index?id=" + e });
},
onShow: function () {
this.setData({ page: 1, isLast: !1 }), this.getList();
},
confirmOrder: function (a) {
var e = this,
i = t.getAttr(a, "id");
t.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
r: "part.order.confirm_order",
uid: t.getuid(),
id: i,
},
success: function (t) {
e.setData({ activeIndex: 5, page: 1, isLast: !1 }), e.getList();
},
});
},
});

View File

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

View File

@@ -0,0 +1,92 @@
<view class="modle_1_nav">
<view bindtap="ActiveClick" class="modle_1_nav_modle {{activeIndex==index?'modle_1_nav_active':''}}" data-index="{{index}}" style="width:{{nav_width}}%" wx:for="{{table}}">{{item}} <view class="modle_1_nav_modle_border" wx:if="{{activeIndex==index}}"></view>
</view>
</view>
<view class="nav"></view>
<view class="shop_border" wx:if="{{activeIndex==1}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia">待报价</text>
<view class="shop_modle_orderTime">订购时间:{{item.create_time}}</view>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="shop_border" wx:if="{{activeIndex==2}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia">待付款</text>
<view class="shop_modle_orderNumber">订单号:{{item.order_sn}}</view>
<view class="shop_modle_orderTime">报价: <text class="shop_modle_orderbaojia">¥{{item.part_price}}</text>
</view>
<button bindtap="goPay" class="shop_modle_btn" data-id="{{item.id}}">去付款</button>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="shop_border" wx:if="{{activeIndex==3}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia">待发货</text>
<view class="shop_modle_orderNumber">订单号:{{item.order_sn}}</view>
<view class="shop_modle_orderTime">报价: <text class="shop_modle_orderbaojia">¥{{item.part_price}}</text>
</view>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="shop_border" wx:if="{{activeIndex==4}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia">待发货</text>
<view class="shop_modle_orderNumber">运单号:{{item.express_name}} / {{item.waybill_sn}}</view>
<view class="shop_modle_orderTime">报价: <text class="shop_modle_orderbaojia">¥{{item.part_price}}</text>
</view>
<button bindtap="confirmOrder" class="shop_modle_btn" data-id="{{item.id}}">确认收货</button>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="shop_border" wx:if="{{activeIndex==5}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia shop_modle_wancheng">已完成</text>
<view class="shop_modle_orderNumber">订单号:{{item.express_name}} / {{item.waybill_sn}}</view>
<view class="shop_modle_orderTime">报价: <text class="shop_modle_orderbaojia">¥{{item.part_price}}</text>
</view>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="end_none" wx:if="{{orderList.length>0&&isLast}}">没有更多了...</view>
<block wx:if="{{orderList.length<=0}}">
<import src="/pages/data_null/index.wxml"></import>
<view>
<template is="title" data="{{title:'暂无查看数据'}}"></template>
</view>
</block>

136
pages/part/order/index.wxss Normal file
View File

@@ -0,0 +1,136 @@
page {
background: #f4f4f4;
}
.modle_1_nav {
background: #fff;
border-bottom: 1rpx solid #f4f4f4;
font-size: 0;
height: 80rpx;
line-height: 80rpx;
position: fixed;
top: 0rpx;
width: 100%;
z-index: 10;
}
.modle_1_nav_modle {
color: #333;
display: inline-block;
font-size: 28rpx;
overflow: hidden;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
word-break: keep-all;
}
.modle_1_nav_active {
color: #3d61f0;
line-height: 72rpx;
}
.modle_1_nav_modle_border {
background: #3d61f0;
height: 5rpx;
margin: 0 auto;
width: 30rpx;
}
.nav {
height: 80rpx;
width: 100%;
}
.shop_border {
background: #fff;
border-bottom: 20rpx solid #f4f4f4;
padding: 30rpx;
}
.shop_modle {
border-bottom: 1rpx solid #f4f4f4;
height: 180rpx;
}
.shop_modle_img {
border-radius: 10rpx;
height: 150rpx;
position: absolute;
width: 150rpx;
}
.shop_modle_name {
color: #333;
font-size: 32rpx;
margin-left: 170rpx;
overflow: hidden;
position: absolute;
text-overflow: ellipsis;
white-space: nowrap;
width: 400rpx;
word-break: keep-all;
}
.shop_modle_daibaojia {
color: #f75f5f;
font-size: 28rpx;
margin-left: 606rpx;
position: absolute;
}
.shop_modle_orderTime {
margin-top: 117rpx;
}
.shop_modle_orderNumber,
.shop_modle_orderTime {
color: #7a7a7a;
font-size: 24rpx;
margin-left: 170rpx;
position: absolute;
width: 400rpx;
}
.shop_modle_orderNumber {
margin-top: 60rpx;
}
.shop_modle_orderbaojia {
color: #f75f5f;
font-size: 28rpx;
}
.shop_modle_wancheng {
color: #7a7a7a;
}
.shop_modle_btn {
background: #fff;
border: 1rpx solid #f75f5f;
border-radius: 6rpx;
color: #f75f5f;
font-size: 24rpx;
height: 50rpx;
line-height: 48rpx;
margin-left: 560rpx;
margin-top: 100rpx;
padding: 0;
position: absolute;
text-align: center;
width: 130rpx;
}
button::after {
border: none;
}
.shop_modle_btmNav {
color: #333;
font-size: 24rpx;
margin-top: 15rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: keep-all;
}
.shop_modle_btmNav_img {
background: #3d61f0;
border-radius: 100%;
display: inline-block;
height: 6rpx;
margin-right: 15rpx;
margin-top: -5rpx;
vertical-align: middle;
width: 6rpx;
}
.end_none {
color: #8a8a8a;
font-size: 28rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
width: 100%;
}