ycm пре 2 година
родитељ
комит
502036e926

+ 28 - 1
pages/order/cleanReport/cleanReport.js

@@ -1,4 +1,5 @@
 // pages/my/cleanReport/cleanReport.js
+var app = getApp()
 Page({
 
     /**
@@ -12,14 +13,40 @@ Page({
             'http://bpic.588ku.com/element_origin_min_pic/16/10/31/c7167fcfb4ebcd12621c05b0c852e98e.jpg',
             'http://bpic.588ku.com/element_origin_min_pic/16/10/31/c7167fcfb4ebcd12621c05b0c852e98e.jpg',
             'http://bpic.588ku.com/element_origin_min_pic/16/10/31/c7167fcfb4ebcd12621c05b0c852e98e.jpg',
-           ]
+           ],
+        id: ''
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        this.setData({id:options.id})
+    },
+    onShow(){
+        this.detail()
+    },
+    detail() {
+        var that = this;
+        app.api.useApi(app.globalData.baseAppUrl + "api/CleaningReport", {
+            order_id: that.data.id,
+        }, "get").then(function (res) {
+            if (res.code != 200) {
+                wx.showLoading({
+                    title: res.message.msg,
+                })
+                setTimeout(function () {
+                    wx.hideLoading({
+                        success: (res) => { },
+                    })
+                }, 2000);
+            } else {
+                console.log(res.message.data);
+            }
 
+        }).catch(function (err) {
+            console.log(222);
+        })
     },
     previewImg(e){
         console.log(e.currentTarget.dataset.src);

+ 2 - 2
pages/order/cleanReport/cleanReport.wxml

@@ -1,7 +1,7 @@
 <!--pages/my/cleanReport/cleanReport.wxml-->
 
 <view class="list">
-    <view class="itemBox" wx:for="{{2}}">
+    <view class="itemBox" wx:for="{{2}}" wx:key="index">
         <view class="tips orage">
             未做清洗 (2)
         </view>
@@ -18,7 +18,7 @@
 
             <view class="scroll">
                 <scroll-view scroll-x>
-                    <image src="{{item}}" class="icon" wx:for="{{imgArr}}" wx:key="{{index}}" data-src='{{item}}' bindtap='previewImg'></image>
+                    <image src="{{item}}" class="icon" wx:for="{{imgArr}}" wx:key="index" data-src='{{item}}' bindtap='previewImg'></image>
                 </scroll-view>
             </view>
 

+ 4 - 0
pages/order/cleanReport/cleanReport.wxss

@@ -89,4 +89,8 @@ page {
     font-size: 26rpx;
     line-height: 38rpx;
     color: #666666;
+}
+
+.itemBox>.b-bottom:nth-last-child(1){
+    border-bottom: 0rpx solid #ededed !important;
 }

+ 3 - 0
pages/order/deposit/deposit.js

@@ -257,6 +257,9 @@ Page({
                     that.setData({
                         show: !this.data.show
                     })
+                    setTimeout(() => {
+                        wx.navigateBack()
+                    }, 1000);
                 }
 
                 wx.hideLoading();

+ 5 - 0
pages/order/detail/detail.js

@@ -86,6 +86,11 @@ Page({
     onShow(){
         this.detail(this.data.order_no)
     },
+    goreport(){
+        wx.navigateTo({
+          url: '/pages/order/cleanReport/cleanReport?id='+this.data.orderinfo.id,
+        })
+    },
     backBtn() {
        wx.switchTab({
          url: '/pages/tabber/order/index',

+ 2 - 1
pages/order/detail/detail.wxml

@@ -52,7 +52,8 @@
                     </view>
                 </block>
                 <view class="statusBtn flex">
-                    <view class="btn btn-sky" bindtap="open" data-no="{{orderinfo.order_type}}" data-network_id="{{orderinfo.network_id}}" data-is_deposit="{{orderinfo.logistics_status==1?1:orderinfo.logistics_status==6?0:''}}">{{orderinfo.logistics_status==1 || orderinfo.logistics_status==6?"扫码开柜":orderinfo.status_name}}</view>
+                    <view wx:if="{{orderinfo.logistics_status==7}}" class="btn btn-sky" bindtap="goreport" >清洗报告</view>
+                    <view wx:else class="btn btn-sky" bindtap="open" data-no="{{orderinfo.order_type}}" data-network_id="{{orderinfo.network_id}}" data-is_deposit="{{orderinfo.logistics_status==1?1:orderinfo.logistics_status==6?0:''}}">{{orderinfo.logistics_status==1 || orderinfo.logistics_status==6?"扫码开柜":orderinfo.status_name}}</view>
                     <view class="btn btn-border" bindtap="closOrder" wx:if="{{orderinfo.logistics_status==1}}">取消订单</view>
                 </view>
             </view>

+ 1 - 1
pages/tabber/order/index.js

@@ -74,7 +74,7 @@ Page({
         //   title: `点击标签 ${event.detail.name}`,
         //   icon: 'none',
         // });
-
+        this.setData({status:event.detail.name})
         this.getorderList(event.detail.name);
     },
 

+ 6 - 6
project.private.config.json

@@ -237,16 +237,16 @@
                     "scene": null
                 },
                 {
-                    "name": "清洗报告",
-                    "pathName": "pages/order/cleanReport/cleanReport",
-                    "query": "",
+                    "name": "",
+                    "pathName": "pages/order/deposit/deposit",
+                    "query": "order_type=2&network_id=1&is_deposit=1&order_num=123123&device_id=123123",
                     "launchMode": "default",
                     "scene": null
                 },
                 {
-                    "name": "",
-                    "pathName": "pages/order/deposit/deposit",
-                    "query": "order_type=2&network_id=1&is_deposit=1&order_num=123123&device_id=123123",
+                    "name": "清洗报告",
+                    "pathName": "pages/order/cleanReport/cleanReport",
+                    "query": "id=5068",
                     "scene": null,
                     "launchMode": "default"
                 }