Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
179d6471b2
5 changed files with 57 additions and 12 deletions
  1. 12
      pages/process/outside-info/index.js
  2. 1
      pages/process/outside-info/index.json
  3. 13
      pages/process/outside-info/index.wxml
  4. 26
      pages/process/outside-price/index.js
  5. 17
      pages/process/outside-price/index.wxml

12
pages/process/outside-info/index.js

@ -114,6 +114,18 @@ Scene({
} }
wx.navigateTo({ url: `/pages/process/payment/index?id=${this.data.form.scrapPaperReceiptId}` }) wx.navigateTo({ url: `/pages/process/payment/index?id=${this.data.form.scrapPaperReceiptId}` })
}, },
viewImage: function (e) {
var imgList = []
for (let index = 0; index < this.data.form.onsideGrossWeightImageList.length; index++) {
var url = this.data.form.onsideGrossWeightImageList[index].url
if(!util.isEmpty(url) && 'error' != url){
imgList.push(url)
}
}
if(imgList.length){
wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url })
}
},
onUnload: function(){ onUnload: function(){
event.remove('OrderMessage', this) event.remove('OrderMessage', this)
} }

1
pages/process/outside-info/index.json

@ -3,6 +3,7 @@
"van-cell": "/components/cell/index", "van-cell": "/components/cell/index",
"van-icon": "/components/icon/index", "van-icon": "/components/icon/index",
"van-button": "/components/button/index", "van-button": "/components/button/index",
"van-image": "/components/image/index",
"van-dialog": "/components/dialog/index", "van-dialog": "/components/dialog/index",
"van-uploader": "/components/uploader/index", "van-uploader": "/components/uploader/index",
"submit-layout": "/components/submit-layout/index", "submit-layout": "/components/submit-layout/index",

13
pages/process/outside-info/index.wxml

@ -107,6 +107,19 @@
<view class="text-gray">{{form.onsideAndOffsiteDifferences || '- -'}}</view> <view class="text-gray">{{form.onsideAndOffsiteDifferences || '- -'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell wx:if="{{form.onsideGrossWeightImageList && form.onsideGrossWeightImageList.length}}">
<view slot="title">
<view class="text-black">厂内毛重凭证</view>
<view class="flex" style="margin-top:18rpx">
<van-image wx:for="{{form.onsideGrossWeightImageList}}" wx:key="index" use-loading-slot width="330rpx" height="240rpx"
custom-class="page-icon" data-url="{{item.url}}" fit="cover" src="{{item.url}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
</view>
</van-cell>
<view class="bg-white" style="padding: 24rpx 32rpx 20rpx 32rpx" wx:if="{{imageList.length}}"> <view class="bg-white" style="padding: 24rpx 32rpx 20rpx 32rpx" wx:if="{{imageList.length}}">
<view class="flex flex-justify" style="padding-bottom: 24rpx"> <view class="flex flex-justify" style="padding-bottom: 24rpx">
<view class="flex flex-center text-black">订单凭证</view> <view class="flex flex-center text-black">订单凭证</view>

26
pages/process/outside-price/index.js

@ -46,13 +46,13 @@ Scene({
imageList.push({url: result.data.orderImageList[index]}) imageList.push({url: result.data.orderImageList[index]})
} }
} }
var grossList = []
if(result.data.onsideGrossWeightImageList && result.data.onsideGrossWeightImageList.length){
for (let index = 0; index < result.data.onsideGrossWeightImageList.length; index++) {
grossList.push({url: result.data.onsideGrossWeightImageList[index]})
}
}
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0, height, imageList, grossList })
// var grossList = []
// if(result.data.onsideGrossWeightImageList && result.data.onsideGrossWeightImageList.length){
// for (let index = 0; index < result.data.onsideGrossWeightImageList.length; index++) {
// grossList.push({url: result.data.onsideGrossWeightImageList[index]})
// }
// }
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0, height, imageList })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
@ -235,6 +235,18 @@ Scene({
util.showToast(err) util.showToast(err)
}) })
}, },
viewImage: function (e) {
var imgList = []
for (let index = 0; index < this.data.form.onsideGrossWeightImageList.length; index++) {
var url = this.data.form.onsideGrossWeightImageList[index].url
if(!util.isEmpty(url) && 'error' != url){
imgList.push(url)
}
}
if(imgList.length){
wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url })
}
},
checkForm: function(){ checkForm: function(){
} }

17
pages/process/outside-price/index.wxml

@ -70,12 +70,19 @@
<view class="text-gray">{{form.onsideAndOffsiteDifferences || '- -'}}</view> <view class="text-gray">{{form.onsideAndOffsiteDifferences || '- -'}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="bg-white" style="padding: 24rpx 32rpx 20rpx 32rpx" wx:if="{{grossList.length}}">
<view class="flex flex-justify" style="padding-bottom: 24rpx">
<view class="flex flex-center text-black">厂内毛重</view>
<van-cell wx:if="{{form.onsideGrossWeightImageList && form.onsideGrossWeightImageList.length}}">
<view slot="title">
<view class="text-black">厂内毛重凭证</view>
<view class="flex" style="margin-top:18rpx">
<van-image wx:for="{{form.onsideGrossWeightImageList}}" wx:key="index" use-loading-slot width="330rpx" height="240rpx"
custom-class="page-icon" data-url="{{item.url}}" fit="cover" src="{{item.url}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
</view> </view>
<van-uploader file-list="{{ grossList }}" deletable="{{false}}" show-upload="{{false}}" />
</view>
</van-cell>
<view style="height:16rpx"></view> <view style="height:16rpx"></view>
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3"> <view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:30rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view> <view style="height:30rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>

Loading…
Cancel
Save