diff --git a/pages/process/outside-info/index.js b/pages/process/outside-info/index.js index 9f3900b..fae6f2e 100644 --- a/pages/process/outside-info/index.js +++ b/pages/process/outside-info/index.js @@ -114,6 +114,18 @@ Scene({ } 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(){ event.remove('OrderMessage', this) } diff --git a/pages/process/outside-info/index.json b/pages/process/outside-info/index.json index e4b7cc2..d78a333 100644 --- a/pages/process/outside-info/index.json +++ b/pages/process/outside-info/index.json @@ -3,6 +3,7 @@ "van-cell": "/components/cell/index", "van-icon": "/components/icon/index", "van-button": "/components/button/index", + "van-image": "/components/image/index", "van-dialog": "/components/dialog/index", "van-uploader": "/components/uploader/index", "submit-layout": "/components/submit-layout/index", diff --git a/pages/process/outside-info/index.wxml b/pages/process/outside-info/index.wxml index 9a331f2..cd52633 100644 --- a/pages/process/outside-info/index.wxml +++ b/pages/process/outside-info/index.wxml @@ -107,6 +107,19 @@ {{form.onsideAndOffsiteDifferences || '- -'}} + + + 厂内毛重凭证 + + + + + + + + + 订单凭证 diff --git a/pages/process/outside-price/index.js b/pages/process/outside-price/index.js index 4f54b54..b6169ce 100644 --- a/pages/process/outside-price/index.js +++ b/pages/process/outside-price/index.js @@ -46,13 +46,13 @@ Scene({ 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 => { wx.hideLoading() util.showToast(err) @@ -235,6 +235,18 @@ Scene({ 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(){ } diff --git a/pages/process/outside-price/index.wxml b/pages/process/outside-price/index.wxml index bba53a4..235a9ed 100644 --- a/pages/process/outside-price/index.wxml +++ b/pages/process/outside-price/index.wxml @@ -70,12 +70,19 @@ {{form.onsideAndOffsiteDifferences || '- -'}} - - - 厂内毛重 + + + 厂内毛重凭证 + + + + + + + - - +