Răsfoiți Sursa

清洗报告

ycm 2 ani în urmă
părinte
comite
9cd55df2fd

+ 4 - 11
pages/order/cleanReport/cleanReport.js

@@ -6,15 +6,8 @@ Page({
      * 页面的初始数据
      */
     data: {
-        imgArr:[
-            'http://bpic.588ku.com/element_origin_min_pic/16/10/30/528aa13209e86d5d9839890967a6b9c1.jpg',
-            'http://bpic.588ku.com/element_origin_min_pic/16/10/30/54fcef525fa8f6037d180f3c26f3be65.jpg',
-            'http://bpic.588ku.com/element_origin_min_pic/16/10/30/62e3ca3a02dddb002eff00482078d194.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',
-            'http://bpic.588ku.com/element_origin_min_pic/16/10/31/c7167fcfb4ebcd12621c05b0c852e98e.jpg',
-           ],
-        id: ''
+        id: '',
+        info: ''
     },
 
     /**
@@ -41,6 +34,7 @@ Page({
                     })
                 }, 2000);
             } else {
+                that.setData({info:res.message.data})
                 console.log(res.message.data);
             }
 
@@ -49,11 +43,10 @@ Page({
         })
     },
     previewImg(e){
-        console.log(e.currentTarget.dataset.src);
         let that = this;
         wx.previewImage({
          current:e.currentTarget.dataset.src,   //当前图片地址
-         urls: that.data.imgArr,        //所有要预览的图片的地址集合 数组形式
+         urls: e.currentTarget.dataset.list,        //所有要预览的图片的地址集合 数组形式
         })
        }
 })

+ 34 - 15
pages/order/cleanReport/cleanReport.wxml

@@ -1,36 +1,55 @@
 <!--pages/my/cleanReport/cleanReport.wxml-->
 
 <view class="list">
-    <view class="itemBox" wx:for="{{2}}" wx:key="index">
+    <view class="itemBox" wx:if="{{info.cleaning_no_count>0}}">
         <view class="tips orage">
-            未做清洗 (2)
+            未做清洗 ({{info.cleaning_no_count}})
         </view>
-        <view class="item b-bottom" wx:for="{{2}}">
+        <view class="bot_text" wx:if="{{info.cleaning_no.length<=0}}">暂无</view>
+        <view class="item b-bottom" wx:for="{{info.cleaning_no}}" wx:key="index">
             <view class="topBox flex">
-                <image src="/image/icon/shangyi.png" class="icon"></image>
-
+                <image src="" class="icon"></image>
                 <view class="message">
-                    <view class="tit">上衣-亚麻上衣</view>
-                    <view class="col">颜色:花色</view>
+                    <view class="tit">{{item.cat_title}}-{{item.good_title}}</view>
+                    <view class="col">颜色:{{item.color}}</view>
                 </view>
             </view>
-
-
             <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="{{ite}}" class="icon" wx:for="{{item.images}}" wx:for-index="ind" wx:for-item="ite" wx:key="ind" data-src='{{ite}}' data-list="{{item.images}}" bindtap='previewImg'></image>
                 </scroll-view>
             </view>
-
             <view class="reason">
                 <view class="tit">未做清洗原因</view>
+                <view class="cont">{{item.remark || '无'}}</view>
+            </view>
+        </view>
+    </view>
 
-                <view class="cont">
-                    1、您的衣物属于《海星不能提供清洗服务衣物类别》,不予清洗
+    <view class="itemBox" wx:if="{{info.cleaning_count>0}}">
+        <view class="tips orage">
+            正常清洗 ({{info.cleaning_count}})
+        </view>
+        <view class="bot_text" wx:if="{{info.cleaning.length<=0}}">暂无</view>
+        <view class="item b-bottom" wx:for="{{info.cleaning}}">
+            <view class="topBox flex">
+                <image src="" class="icon"></image>
+                <view class="message">
+                    <view class="tit">{{item.cat_title}}-{{item.good_title}}</view>
+                    <view class="col">颜色:{{item.color}}</view>
                 </view>
-                <view class="cont">
-                    2、您的衣物经高级洗护技师评估认定洗涤风险过大,为保证衣物安全,不予清洗
+            </view>
+            <view class="scroll">
+                <scroll-view scroll-x>
+                    <image src="{{ite}}" class="icon" wx:for="{{item.images}}" wx:for-index="ind" wx:for-item="ite" wx:key="ind" data-src='{{ite}}' data-list="{{item.images}}" bindtap='previewImg'></image>
+                </scroll-view>
+            </view>
+            <view class="reason">
+                <view class="tit">签收衣物原貌</view>
+                <view class="cont" wx:for="{{item.flaw}}" wx:for-index="ind" wx:for-item="ite" wx:key="ind">
+                    {{ind+1}}、{{ite.name}}
                 </view>
+                <view class="bot_text" wx:if="{{item.flaw.length<=0}}">暂无</view>
             </view>
         </view>
     </view>

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

@@ -93,4 +93,9 @@ page {
 
 .itemBox>.b-bottom:nth-last-child(1){
     border-bottom: 0rpx solid #ededed !important;
+}
+.bot_text{
+    margin: 20rpx 0 0;
+    font-size: 26rpx;
+    color: #555;
 }