diff --git a/components/submit-layout/index.js b/components/submit-layout/index.js new file mode 100644 index 0000000..c7b8755 --- /dev/null +++ b/components/submit-layout/index.js @@ -0,0 +1,16 @@ +const app = getApp() + +Component({ + options: { + addGlobalClass: true, + multipleSlots: true + }, + data: { + safeBottom: app.globalData.safeBottom, + }, + lifetimes: { + attached: function () { + this.setData({ safeBottom: app.globalData.safeBottom }) + } + }, +}) \ No newline at end of file diff --git a/components/submit-layout/index.json b/components/submit-layout/index.json new file mode 100644 index 0000000..5144c0f --- /dev/null +++ b/components/submit-layout/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": { } +} \ No newline at end of file diff --git a/components/submit-layout/index.wxml b/components/submit-layout/index.wxml new file mode 100644 index 0000000..a2dd113 --- /dev/null +++ b/components/submit-layout/index.wxml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/components/submit-layout/index.wxss b/components/submit-layout/index.wxss new file mode 100644 index 0000000..a12c39e --- /dev/null +++ b/components/submit-layout/index.wxss @@ -0,0 +1,4 @@ +.view-load { + margin-right: 12rpx; + margin-bottom: 12rpx +} \ No newline at end of file diff --git a/pages/storage/order-create/index.js b/pages/storage/order-create/index.js index bd50048..cc80a93 100644 --- a/pages/storage/order-create/index.js +++ b/pages/storage/order-create/index.js @@ -13,7 +13,7 @@ Scene({ safeBottom: app.globalData.safeBottom, form: {}, poundInfo: null, - activeNames: [], + activeNames: ['1'], columns: [], visible: false, }, @@ -38,18 +38,18 @@ Scene({ getPoundInfo(options.id).then(result => { wx.hideLoading() result.data.emptyWeighingPicture = [] - if(result.data.firstWeightImageUrls1){ - result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrls1) + if(result.data.firstWeightImageUrl1){ + result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrl1) } - if(result.data.firstWeightImageUrls2){ - result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrls2) + if(result.data.firstWeightImageUrl2){ + result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrl2) } result.data.totalWeighingPicture = [] - if(result.data.secondWeightImageUrls1){ - result.data.totalWeighingPicture.push(result.data.secondWeightImageUrls1) + if(result.data.secondWeightImageUrl1){ + result.data.totalWeighingPicture.push(result.data.secondWeightImageUrl1) } - if(result.data.secondWeightImageUrls2){ - result.data.totalWeighingPicture.push(result.data.secondWeightImageUrls2) + if(result.data.secondWeightImageUrl2){ + result.data.totalWeighingPicture.push(result.data.secondWeightImageUrl2) } this.setData({ poundInfo: result.data }) }).catch(err => { @@ -138,7 +138,7 @@ Scene({ }, viewImage: function (e) { var imgList = [] - if(e.currentTarget.dataset.type == 0){ + if(e.currentTarget.dataset.type == 1){ for (let index = 0; index < this.data.poundInfo.totalWeighingPicture.length; index++) { imgList.push(this.data.poundInfo.totalWeighingPicture[index]) } diff --git a/pages/storage/order-create/index.json b/pages/storage/order-create/index.json index 4266e3d..5ed4770 100644 --- a/pages/storage/order-create/index.json +++ b/pages/storage/order-create/index.json @@ -12,6 +12,7 @@ "vehicle-keyboard": "/components/vehicle-keyboard/index", "van-collapse": "/components/collapse/index", "van-collapse-item": "/components/collapse-item/index", + "submit-layout": "/components/submit-layout/index", "notification": "/pages/message/notification/index" } } \ No newline at end of file diff --git a/pages/storage/order-create/index.wxml b/pages/storage/order-create/index.wxml index 1208dcb..03b0ae2 100644 --- a/pages/storage/order-create/index.wxml +++ b/pages/storage/order-create/index.wxml @@ -97,9 +97,9 @@ - + 提交 - + diff --git a/pages/storage/order-info/index.js b/pages/storage/order-info/index.js index 7f37580..f3b34d1 100644 --- a/pages/storage/order-info/index.js +++ b/pages/storage/order-info/index.js @@ -27,18 +27,18 @@ Scene({ wx.showLoading({ title: '正在获取', mask: true }) getOutOrderInfo(options.id).then(result => { result.data.weightNote.emptyWeighingPicture = [] - if(result.data.weightNote.firstWeightImageUrls1){ - result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrls1) + if(result.data.weightNote.firstWeightImageUrl1){ + result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrl1) } - if(result.data.weightNote.firstWeightImageUrls2){ - result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrls2) + if(result.data.weightNote.firstWeightImageUrl2){ + result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrl2) } result.data.weightNote.totalWeighingPicture = [] - if(result.data.weightNote.secondWeightImageUrls1){ - result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrls1) + if(result.data.weightNote.secondWeightImageUrl1){ + result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrl1) } - if(result.data.weightNote.secondWeightImageUrls2){ - result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrls2) + if(result.data.weightNote.secondWeightImageUrl2){ + result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrl2) } if(result.data.outboundDeliveryOrderSettlementInfo.id){ this.data.fileList = [] @@ -63,7 +63,8 @@ Scene({ safeBottom: app.globalData.safeBottom, poundInfo: result.data.weightNote, orderInfo: result.data.outboundDeliveryOrder, - auditable: this.data.auditable + auditable: this.data.auditable, + activeNames: ['1'], }) } wx.hideLoading() @@ -103,5 +104,18 @@ Scene({ }, settleForm: function(){ wx.redirectTo({ url: `/pages/storage/order-settlement/index?id=${this.data.orderInfo.id}` }) + }, + viewImage: function (e) { + var imgList = [] + if(e.currentTarget.dataset.type == 1){ + for (let index = 0; index < this.data.poundInfo.totalWeighingPicture.length; index++) { + imgList.push(this.data.poundInfo.totalWeighingPicture[index]) + } + } else { + for (let index = 0; index < this.data.poundInfo.emptyWeighingPicture.length; index++) { + imgList.push(this.data.poundInfo.emptyWeighingPicture[index]) + } + } + wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url }) } }) \ No newline at end of file diff --git a/pages/storage/order-settlement/index.js b/pages/storage/order-settlement/index.js index 8d11c8a..1c2a8c1 100644 --- a/pages/storage/order-settlement/index.js +++ b/pages/storage/order-settlement/index.js @@ -41,18 +41,18 @@ Scene({ }) getOutOrderInfo(options.id).then(result => { result.data.weightNote.emptyWeighingPicture = [] - if(result.data.weightNote.firstWeightImageUrls1){ - result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrls1) + if(result.data.weightNote.firstWeightImageUrl1){ + result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrl1) } - if(result.data.weightNote.firstWeightImageUrls2){ - result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrls2) + if(result.data.weightNote.firstWeightImageUrl2){ + result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrl2) } result.data.weightNote.totalWeighingPicture = [] - if(result.data.weightNote.secondWeightImageUrls1){ - result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrls1) + if(result.data.weightNote.secondWeightImageUrl1){ + result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrl1) } - if(result.data.weightNote.secondWeightImageUrls2){ - result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrls2) + if(result.data.weightNote.secondWeightImageUrl2){ + result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrl2) } if(result.data.outboundDeliveryOrderSettlementInfo.id){ this.setData({ diff --git a/pages/storage/order-settlement/index.json b/pages/storage/order-settlement/index.json index 72aee6e..a360800 100644 --- a/pages/storage/order-settlement/index.json +++ b/pages/storage/order-settlement/index.json @@ -10,6 +10,7 @@ "van-picker": "/components/picker/index", "van-popup": "/components/popup/index", "van-dialog": "/components/dialog/index", + "submit-layout": "/components/submit-layout/index", "notification": "/pages/message/notification/index" } } \ No newline at end of file diff --git a/pages/storage/order-settlement/index.wxml b/pages/storage/order-settlement/index.wxml index 039c62a..bc17c35 100644 --- a/pages/storage/order-settlement/index.wxml +++ b/pages/storage/order-settlement/index.wxml @@ -151,10 +151,10 @@ - + 关闭订单 确认收款 - + diff --git a/pages/storage/pound-info/index.js b/pages/storage/pound-info/index.js index b5187a3..6246ac4 100644 --- a/pages/storage/pound-info/index.js +++ b/pages/storage/pound-info/index.js @@ -23,18 +23,18 @@ Scene({ getPoundInfo(options.id).then(result => { wx.hideLoading() result.data.emptyWeighingPicture = [] - if(result.data.firstWeightImageUrls1){ - result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrls1) + if(result.data.firstWeightImageUrl1){ + result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrl1) } - if(result.data.firstWeightImageUrls2){ - result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrls2) + if(result.data.firstWeightImageUrl2){ + result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrl2) } result.data.totalWeighingPicture = [] - if(result.data.secondWeightImageUrls1){ - result.data.totalWeighingPicture.push(result.data.secondWeightImageUrls1) + if(result.data.secondWeightImageUrl1){ + result.data.totalWeighingPicture.push(result.data.secondWeightImageUrl1) } - if(result.data.secondWeightImageUrls2){ - result.data.totalWeighingPicture.push(result.data.secondWeightImageUrls2) + if(result.data.secondWeightImageUrl2){ + result.data.totalWeighingPicture.push(result.data.secondWeightImageUrl2) } this.setData({ safeBottom: app.globalData.safeBottom, form: result.data }) }).catch(err => { @@ -74,7 +74,7 @@ Scene({ }, viewImage: function (e) { var imgList = [] - if(e.currentTarget.dataset.type == 0){ + if(e.currentTarget.dataset.type == 1){ for (let index = 0; index < this.data.form.totalWeighingPicture.length; index++) { imgList.push(this.data.form.totalWeighingPicture[index]) } diff --git a/pages/storage/pound-info/index.json b/pages/storage/pound-info/index.json index deb46c7..204655a 100644 --- a/pages/storage/pound-info/index.json +++ b/pages/storage/pound-info/index.json @@ -5,6 +5,7 @@ "van-image": "/components/image/index", "van-button": "/components/button/index", "van-dialog": "/components/dialog/index", + "submit-layout": "/components/submit-layout/index", "notification": "/pages/message/notification/index" } } \ No newline at end of file diff --git a/pages/storage/pound-info/index.wxml b/pages/storage/pound-info/index.wxml index fad33cd..0af137c 100644 --- a/pages/storage/pound-info/index.wxml +++ b/pages/storage/pound-info/index.wxml @@ -50,10 +50,10 @@ - - 删除 + + 删除 关联出货单 - + \ No newline at end of file diff --git a/pages/storage/pound-list/index.js b/pages/storage/pound-list/index.js index 83a36f3..855ba53 100644 --- a/pages/storage/pound-list/index.js +++ b/pages/storage/pound-list/index.js @@ -17,7 +17,7 @@ Scene({ top: 0, orderList: [], form: { - funcType: 0, + // status: 0, pageNum: 1, pageSize: 10 },