备份改首页
This commit is contained in:
@@ -12,6 +12,8 @@ Page( {
|
||||
orderpayHidden:true,
|
||||
orderseefHidden:true,
|
||||
orderseef0Hidden:true,
|
||||
hxddHidden:true,
|
||||
hxm:"",
|
||||
myorder:[],
|
||||
Start: 0,
|
||||
t:0,
|
||||
@@ -123,6 +125,7 @@ Page( {
|
||||
"content-type": "application/json" // 默认值
|
||||
},
|
||||
success (res) {
|
||||
console.log("myorder0 API返回数据:", res.data);
|
||||
if(res.data.status==1){
|
||||
|
||||
var tmpArr = null;
|
||||
@@ -149,6 +152,8 @@ Page( {
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log("myorder0 API返回状态错误:", res.data);
|
||||
}
|
||||
if(gp==1){
|
||||
//隐藏loading 提示框
|
||||
@@ -237,6 +242,13 @@ Page( {
|
||||
bhyy:e.detail.value
|
||||
})
|
||||
|
||||
},gethxmValue:function(e) {
|
||||
console.log("Input value:", e.detail.value);
|
||||
that.setData({
|
||||
hxm:e.detail.value
|
||||
})
|
||||
console.log("hxm value set to:", that.data.hxm);
|
||||
|
||||
},onshowseef0:function(e) {
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
@@ -554,6 +566,52 @@ Page( {
|
||||
wx.navigateTo({
|
||||
url: "../myorderinfo/index?id=" + id + "&t=" + that.data.t
|
||||
})
|
||||
},onhxdd:function(e) {
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
if(userId&&LoginId){
|
||||
var id = e.currentTarget.dataset.id
|
||||
that.setData({
|
||||
hxddHidden:false,
|
||||
orderid:id,
|
||||
hxm:""
|
||||
})
|
||||
}else{
|
||||
wx.navigateTo({
|
||||
url: "../login/index"
|
||||
})
|
||||
}
|
||||
},closehxdd:function(e) {
|
||||
that.setData({
|
||||
hxddHidden:true
|
||||
})
|
||||
},inhxdd:function(e) {
|
||||
|
||||
},qxhxdd:function() {
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
console.log("hxm value:", that.data.hxm);
|
||||
console.log("Full URL:", "../hxorderinfo/index?id=" + that.data.orderid + "&t=" + that.data.t + "&hxm=" + that.data.hxm);
|
||||
if(userId&&LoginId){
|
||||
if(that.data.hxm!=""){
|
||||
wx.navigateTo({
|
||||
url: "../hxorderinfo/index?id=" + that.data.orderid + "&t=" + that.data.t + "&hxm=" + encodeURIComponent(that.data.hxm)
|
||||
})
|
||||
that.setData({
|
||||
hxddHidden:true
|
||||
})
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: "核销码不能为空",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}else{
|
||||
wx.navigateTo({
|
||||
url: "../login/index"
|
||||
})
|
||||
}
|
||||
},ondetail:function(e) {
|
||||
var id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<view class="container">
|
||||
<view class="myorder-menu">
|
||||
<view class='{{nav==0?"hover":""}}' bindtap="onnav" data-id="0">全部</view>
|
||||
<view class='{{nav==1?"hover":""}}' bindtap="onnav" data-id="1">待发货</view>
|
||||
<view class='{{nav==2?"hover":""}}' bindtap="onnav" data-id="2">待收货</view>
|
||||
<view class='{{nav==1?"hover":""}}' bindtap="onnav" data-id="1">待核销</view>
|
||||
<!-- <view class='{{nav==2?"hover":""}}' bindtap="onnav" data-id="2">待收货</view> -->
|
||||
<view class='{{nav==3?"hover":""}}' bindtap="onnav" data-id="3">已完成</view>
|
||||
</view>
|
||||
<view class="myorder-box" wx:for="{{myorder}}" wx:for-index="index" hidden="{{orderHidden}}">
|
||||
@@ -20,8 +20,9 @@
|
||||
<text>状态:</text>{{item.status0}}
|
||||
</view>
|
||||
<view class="cz_box">
|
||||
|
||||
<view wx:if="{{t==0&&(item.Payed=='2'||item.Payed=='8')}}" bindtap="onqysh" data-id="{{item.O_Id}}">确认收货</view> <view wx:if="{{(item.Payed=='2'||item.Payed=='3')}}" bindtap="onckwl" data-id="{{item.kdgs}}|{{item.kdgsmc}}|{{item.ydh}}">查看物流</view> <view bindtap="onorderdetail" data-id="{{item.O_Id}}">查看详情</view>
|
||||
<view wx:if="{{t==3&&(item.Payed=='1')}}" bindtap="onhxdd" data-id="{{item.O_Id}}">核销订单</view>
|
||||
<!-- <view wx:if="{{t==0&&(item.Payed=='2'||item.Payed=='8')}}" bindtap="onqysh" data-id="{{item.O_Id}}">确认收货</view> <view wx:if="{{(item.Payed=='2'||item.Payed=='3')}}" bindtap="onckwl" data-id="{{item.kdgs}}|{{item.kdgsmc}}|{{item.ydh}}">查看物流</view> -->
|
||||
<view bindtap="onorderdetail" data-id="{{item.O_Id}}">查看详情</view>
|
||||
</view>
|
||||
<view class="products" wx:for="{{item.pics}}" wx:for-item="pitem">
|
||||
<view bindtap="ondetail" data-id="{{pitem.prodid}}">
|
||||
@@ -92,4 +93,20 @@
|
||||
</view>
|
||||
<loading hidden="{{loadingHidden}}">
|
||||
加载中...
|
||||
</loading>
|
||||
</loading>
|
||||
<view class="Hidden_box" hidden="{{hxddHidden}}" bindtap="closehxdd">
|
||||
<view class="Hidden_box_to" catchtap="inhxdd">
|
||||
<view class="Hidden_box_title">
|
||||
<text>输入核销码</text>
|
||||
<view class="close" bindtap="closehxdd"><image src="../../images/close.png" /></view>
|
||||
</view>
|
||||
<view class="frombody">
|
||||
<view>
|
||||
<text>核销码:</text><input name="hxm" type="text" value="{{hxm}}" placeholder="请输入核销码" bindinput='gethxmValue' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="button">
|
||||
<button bindtap="qxhxdd">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1 +1,303 @@
|
||||
page{
|
||||
background: linear-gradient(to bottom, #E8F4FC, #F5FAFF);
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
padding-bottom: 2em;
|
||||
}
|
||||
|
||||
.myorder-menu {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
height: 3em;
|
||||
line-height: 3em;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.myorder-menu view {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
font-size: 0.9em;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.myorder-menu view.hover {
|
||||
color: #6BA3F0;
|
||||
font-weight: 900;
|
||||
border-bottom: 3px solid #6BA3F0;
|
||||
}
|
||||
|
||||
.myorder-box {
|
||||
width: 100%;
|
||||
padding: 0.8em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.myorder-item {
|
||||
background-color: #fff;
|
||||
border-radius: 0.5em;
|
||||
padding: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid #f1f1f1;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.myorder-item > view {
|
||||
margin-bottom: 0.5em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.myorder-item > view:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.Total {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding: 0.3em 0;
|
||||
border-top: 1px solid #f8f8f8;
|
||||
border-bottom: 1px solid #f8f8f8;
|
||||
}
|
||||
|
||||
.Totalprice {
|
||||
margin-left: 1em;
|
||||
color: #6BA3F0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cz_box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
margin-top: 0.8em;
|
||||
padding-top: 0.8em;
|
||||
border-top: 1px solid #f8f8f8;
|
||||
}
|
||||
|
||||
.cz_box view {
|
||||
margin-left: 0.8em;
|
||||
padding: 0.3em 0.8em;
|
||||
background-color: #6BA3F0;
|
||||
color: #fff;
|
||||
border-radius: 0.3em;
|
||||
font-size: 0.85em;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.cz_box view:active {
|
||||
background-color: #5A93E0;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.products {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.8em;
|
||||
padding-top: 0.8em;
|
||||
border-top: 1px solid #f8f8f8;
|
||||
}
|
||||
|
||||
.products view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 33.333%;
|
||||
margin-bottom: 0.8em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.products view image {
|
||||
width: 5em;
|
||||
height: 5em;
|
||||
border-radius: 0.3em;
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
|
||||
.products view text {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 0.85em;
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.nodata {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 3em 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nodata image {
|
||||
width: 6em;
|
||||
height: 6em;
|
||||
margin-bottom: 1em;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.nodata view {
|
||||
color: #939393;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.Hidden_box {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.Hidden_box_to {
|
||||
background-color: #fff;
|
||||
border-radius: 0.5em;
|
||||
width: 85%;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.Hidden_box_title {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.8em;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.Hidden_box_title .close {
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
padding: 0.2em;
|
||||
border-radius: 50%;
|
||||
background-color: #f8f8f8;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.Hidden_box_title .close image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.frombody {
|
||||
padding: 0.8em;
|
||||
}
|
||||
|
||||
.pay_box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.pay_type {
|
||||
margin-bottom: 0.5em;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.pay_box view {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 0.8em;
|
||||
margin-bottom: 0.5em;
|
||||
border: 1px solid #f1f1f1;
|
||||
border-radius: 0.3em;
|
||||
background-color: #f8f8f8;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.pay_box view.hover {
|
||||
border-color: #6BA3F0;
|
||||
background-color: #E8F4FC;
|
||||
}
|
||||
|
||||
.pay_box view image {
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.button {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
padding: 0.8em;
|
||||
border-top: 1px solid #f1f1f1;
|
||||
}
|
||||
|
||||
.button button {
|
||||
width: 100%;
|
||||
height: 2.5em;
|
||||
line-height: 2.5em;
|
||||
background: linear-gradient(to right, #6BA3F0, #8BBDF5);
|
||||
color: #fff;
|
||||
border-radius: 0.5em;
|
||||
font-size: 0.9em;
|
||||
border: none;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.button button:active {
|
||||
background: linear-gradient(to right, #5A93E0, #7AADF0);
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.frombody image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 15em;
|
||||
margin-bottom: 0.5em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.frombody input {
|
||||
width: 100%;
|
||||
height: 2.5em;
|
||||
padding: 0 0.5em;
|
||||
border: 1px solid #f1f1f1;
|
||||
border-radius: 0.3em;
|
||||
background-color: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
|
||||
.frombody input:focus {
|
||||
border-color: #6BA3F0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2em 0;
|
||||
color: #939393;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
Reference in New Issue
Block a user