Browse Source

订单详情

zhaoxiaohai 2 years ago
parent
commit
f4d806d096

+ 32 - 0
packageA/orderForm/detail.js

@@ -0,0 +1,32 @@
+const _Http = getApp().globalData.http;
+
+Page({
+    data: {
+        sa_orderid: null,
+    },
+    onLoad(options) {
+        console.log(options)
+        this.setData({
+            sa_orderid: options.id
+        });
+        this.getDetail();
+    },
+    getDetail() {
+        _Http.basic({
+            "id": 20221108151302,
+            "content": {
+                "sa_orderid": this.data.sa_orderid
+            }
+        }).then(res => {
+            console.log("订单详情", res)
+            if (res.msg != '成功') return wx.showToast({
+                title: res.msg,
+                icon: "none"
+            });
+            
+            this.setData({
+                detail: res.data
+            })
+        })
+    }
+})

+ 3 - 0
packageA/orderForm/detail.json

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

+ 133 - 0
packageA/orderForm/detail.scss

@@ -0,0 +1,133 @@
+.intr {
+    position: relative;
+    width: 100vw;
+    box-sizing: border-box;
+    background-color: #fff;
+    padding: 20rpx 30rpx;
+
+    .num {
+        height: 40rpx;
+        line-height: 40rpx;
+        font-size: 32rpx;
+        font-family: PingFang SC-Bold, PingFang SC;
+        font-weight: bold;
+        color: #333333;
+    }
+
+    .tags {
+        margin-bottom: 15rpx;
+
+        text {
+            display: inline-block;
+            height: 40rpx;
+            line-height: 40rpx;
+            background: #E7EEFF;
+            border-radius: 20rpx;
+            padding: 0 15rpx;
+            font-size: 20rpx;
+            color: #fff;
+            margin-right: 10rpx;
+        }
+    }
+
+    .exp {
+        height: 34rpx;
+        line-height: 34rpx;
+        font-size: 26rpx;
+        margin-bottom: 8rpx;
+        color: #666;
+    }
+
+    .copy {
+        position: absolute;
+        right: 30rpx;
+        top: 20rpx;
+        background-color: #FF9933;
+        border-radius: 12rpx;
+        padding: 0 10rpx;
+        color: #fff;
+        border: none;
+        height: 70rpx;
+    }
+
+}
+
+.box {
+    width: 100vw;
+    padding: 20rpx 30rpx;
+    box-sizing: border-box;
+    background-color: #fff;
+    margin-top: 10rpx;
+
+    .row {
+        display: flex;
+        justify-content: space-between;
+        height: 60rpx;
+        align-items: center;
+        font-size: 0;
+
+        .label {
+            font-size: 28rpx;
+        }
+
+        checkbox {
+            width: 36rpx;
+            height: 36rpx;
+            margin-right: 6rpx;
+        }
+
+        checkbox .wx-checkbox-input {
+            width: 36rpx;
+            height: 36rpx;
+        }
+    }
+}
+
+/* 地址 */
+.location {
+    display: flex;
+    align-items: center;
+
+    .icon {
+        color: #FF9933;
+        font-size: 62rpx;
+        flex-shrink: 0;
+        margin-right: 10rpx;
+    }
+
+    .content {
+        flex: 1;
+
+        .name {
+            font-size: 30rpx;
+            font-family: PingFang SC-Bold, PingFang SC;
+            font-weight: bold;
+
+            text {
+                font-size: 28rpx;
+                font-weight: 400;
+                margin-left: 20rpx;
+            }
+        }
+
+        .address {
+            font-size: 28rpx;
+            margin-top: 6rpx;
+            flex-shrink: 0;
+        }
+    }
+
+    .iconfont {
+        font-size: 40rpx;
+        margin-left: 20rpx;
+        color: #999;
+    }
+}
+
+.pay {
+    .title {
+        font-size: 30rpx;
+        font-family: PingFang SC-Bold, PingFang SC;
+        font-weight: bold;
+    }
+}

+ 57 - 0
packageA/orderForm/detail.wxml

@@ -0,0 +1,57 @@
+<view class="intr">
+    <view class="num">
+        {{detail.sonum}}
+    </view>
+    <view class="tags">
+        <text wx:if="{{detail.brandname}}" style="background-color: #0079FE;">{{detail.brandname}}</text>
+        <text wx:if="{{detail.tradefield}}" style="background-color: #4BD863;">{{detail.tradefield}}</text>
+    </view>
+    <view class="exp">订单类型:{{detail.type}}</view>
+    <view class="exp">订单状态:{{detail.status}}</view>
+    <view class="exp">单据日期:{{detail.submitdate}}</view>
+    <view class="exp">创建日期:{{detail.createdate}}</view>
+    <view class="exp">核销状态:{{detail.writeoffstatus}}</view>
+    <view class="exp">开票状态:{{detail.invoicestatus}}</view>
+    <van-button custom-class='copy'>一键复制订单</van-button>
+</view>
+
+<navigator url="#" class="box location">
+    <van-icon custom-class='icon' name="location" />
+    <view class="content">
+        <view class="name">
+            {{detail.contacts.name}}<text>{{detail.contacts.phonenumber}}</text>
+        </view>
+        <view class="address">
+            {{detail.contacts.address}}
+        </view>
+    </view>
+    <view class="iconfont icon-dibu-bianji" />
+</navigator>
+
+<navigator url="#" class="box location">
+    <view class="content">
+        <view class="name">
+            开票单位
+        </view>
+        <view class="address">
+            {{detail.finance.pay_enterprisename}}
+        </view>
+    </view>
+    <view class="iconfont icon-dibu-bianji" />
+</navigator>
+
+<navigator url="#" class="box pay">
+    <view class="title">
+        支付信息
+    </view>
+</navigator>
+
+<view class="box" style="padding: 10rpx 30rpx;">
+    <view class="row">
+        <view class="label">订单备注</view>
+    </view>
+    <navigator url="#" class="row">
+        <view class="label">是否需要回签单</view>
+        <checkbox checked="{{true}}" color='var(--assist)' />
+    </navigator>
+</view>

+ 1 - 1
packageA/orderForm/modules/list/index.wxml

@@ -1,4 +1,4 @@
-<navigator url="#" class="item" wx:for="{{list}}" wx:key="item.sonum">
+<navigator url="/packageA/orderForm/detail?id={{item.sa_orderid}}" class="item" wx:for="{{list}}" wx:key="item.sonum">
     <view class="top">
         <view class="tags">
             <text wx:if="{{item.type}}">{{item.type}}</text>