Commit 0a7345f7 by 前端

Merge branch 'SAAS+V5.6.2' into 'master'

上线合并

See merge request !15
2 parents 8ecdc964 728c2c17
...@@ -42,7 +42,20 @@ Page({ ...@@ -42,7 +42,20 @@ Page({
}, { }, {
label: '提单时间', label: '提单时间',
key: 'applyDate' key: 'applyDate'
}], }, {
label: '备注',
key: 'orderRemark',
flexStart: true
}, {
label: '交易流水号',
key: 'outTradeNo',
flexStart: true
}, {
label: '凭证',
key: 'payVoucherList',
image: true,
flexStart: true
}],
}, },
/** /**
...@@ -88,6 +101,17 @@ Page({ ...@@ -88,6 +101,17 @@ Page({
}) })
} }
return dto return dto
},
previewImage(e) {
let { url, index } = e.currentTarget.dataset
let urlList = url.map(v => {
return v.payVoucher
})
wx.previewImage({
urls: urlList,
current: urlList[index]
})
}, },
/** /**
...@@ -104,7 +128,7 @@ Page({ ...@@ -104,7 +128,7 @@ Page({
const processedData = this.processOrderData(res.data || {}) const processedData = this.processOrderData(res.data || {})
this.setData({ this.setData({
orderInfo: processedData, orderInfo: processedData,
'orderInfo.applyDate': res.data.applyDate ? dayjs(res.data.applyDate).format('YYYY-MM-DD HH:mm:ss') : '-' 'orderInfo.applyDate': res.data.applyDate ? dayjs(res.data.applyDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}) })
if (res.data?.oldGoodsOrderDTO) { if (res.data?.oldGoodsOrderDTO) {
this.setData({ this.setData({
......
...@@ -46,7 +46,10 @@ page { ...@@ -46,7 +46,10 @@ page {
align-items: center; align-items: center;
font-size: 26rpx; font-size: 26rpx;
color: #222222; color: #222222;
margin-bottom: 12rpx; margin-bottom: 12rpx;
&.flex-start {
align-items: flex-start;
}
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -56,7 +59,8 @@ page { ...@@ -56,7 +59,8 @@ page {
color: #999999; color: #999999;
flex-shrink: 0; flex-shrink: 0;
} }
.info-item { .info-value {
word-break: break-all;
.text-hide { .text-hide {
max-width: 280rpx; max-width: 280rpx;
overflow: hidden; overflow: hidden;
...@@ -70,7 +74,19 @@ page { ...@@ -70,7 +74,19 @@ page {
margin: 0 8rpx; margin: 0 8rpx;
} }
} }
} }
.image-value {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 16rpx;
.image-item {
width: 112rpx;
height: 112rpx;
border-radius: 16rpx;
overflow: hidden;
}
}
} }
} }
.empty-box { .empty-box {
......
...@@ -14,16 +14,24 @@ ...@@ -14,16 +14,24 @@
<!-- 订单信息 --> <!-- 订单信息 -->
<view class="section"> <view class="section">
<view class="section-title">订单信息</view> <view class="section-title">订单信息</view>
<view class="info-item" wx:for="{{orderForm}}" wx:key="index"> <view class="info-item {{item.flexStart ? 'flex-start': ''}}" wx:for="{{orderForm}}" wx:key="index">
<text class="info-label">{{item.label}}</text> <text class="info-label">{{item.label}}</text>
<block wx:if="{{item.format}}"> <block wx:if="{{item.format}}">
<view class="info-item">{{djOrderTypeMap[orderInfo[item.key]]}}</view> <view class="info-value">{{djOrderTypeMap[orderInfo[item.key]]}}</view>
</block> </block>
<block wx:elif="{{item.arr}}"> <block wx:elif="{{item.arr}}">
<view class="info-item"><text class="name text-hide">{{orderInfo[item.key[0]]}}</text><text class="split">|</text><text class="text-hide">{{orderInfo[item.key[1]]}}</text></view> <view class="info-value"><text class="name text-hide">{{orderInfo[item.key[0]]}}</text><text class="split">|</text><text class="text-hide">{{orderInfo[item.key[1]]}}</text></view>
</block> </block>
<block wx:elif="{{item.image}}">
<view class="image-value" wx:if="{{orderInfo[item.key].length}}">
<view class="image-item" bindtap="previewImage" data-index="{{ subIndex }}" data-url="{{ orderInfo[item.key] }}" wx:for="{{orderInfo[item.key]}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex">
<image src="{{subItem.payVoucher}}" mode=""/>
</view>
</view>
<view wx:else>-</view>
</block>
<block wx:else> <block wx:else>
<text class="info-value"><text style="margin-right: 8rpx;" wx:if="{{item.unit}}">{{item.unit}}</text>{{ orderInfo[item.key] }}</text> <text class="info-value"><text style="margin-right: 8rpx;" wx:if="{{item.unit}}">{{item.unit}}</text>{{ orderInfo[item.key] || '-' }}</text>
</block> </block>
</view> </view>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!