Browse Source

no message

feature/v1.3
xpz2018 5 years ago
parent
commit
131dea7dea
15 changed files with 88 additions and 44 deletions
  1. 16
      components/submit-layout/index.js
  2. 4
      components/submit-layout/index.json
  3. 3
      components/submit-layout/index.wxml
  4. 4
      components/submit-layout/index.wxss
  5. 20
      pages/storage/order-create/index.js
  6. 1
      pages/storage/order-create/index.json
  7. 4
      pages/storage/order-create/index.wxml
  8. 32
      pages/storage/order-info/index.js
  9. 16
      pages/storage/order-settlement/index.js
  10. 1
      pages/storage/order-settlement/index.json
  11. 4
      pages/storage/order-settlement/index.wxml
  12. 18
      pages/storage/pound-info/index.js
  13. 1
      pages/storage/pound-info/index.json
  14. 6
      pages/storage/pound-info/index.wxml
  15. 2
      pages/storage/pound-list/index.js

16
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 })
}
},
})

4
components/submit-layout/index.json

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": { }
}

3
components/submit-layout/index.wxml

@ -0,0 +1,3 @@
<view class="cu-bar bg-white foot justify-end" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;">
<slot />
</view>

4
components/submit-layout/index.wxss

@ -0,0 +1,4 @@
.view-load {
margin-right: 12rpx;
margin-bottom: 12rpx
}

20
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])
}

1
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"
}
}

4
pages/storage/order-create/index.wxml

@ -97,9 +97,9 @@
</van-collapse>
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{poundInfo}}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{poundInfo}}">
<submit-layout wx:if="{{poundInfo}}">
<van-button type="info" custom-style="height:88rpx;width:680rpx" bind:click="submitForm">提交</van-button>
</view>
</submit-layout>
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" bind:change="onPlatenumber"></vehicle-keyboard>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />

32
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 })
}
})

16
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({

1
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"
}
}

4
pages/storage/order-settlement/index.wxml

@ -151,10 +151,10 @@
</van-collapse>
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{orderInfo && orderInfo.status == 1 }}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{orderInfo && orderInfo.status == 1}}">
<submit-layout wx:if="{{orderInfo && orderInfo.status == 1}}">
<van-button type="danger" custom-style="height:88rpx;width:254rpx" bind:click="closeForm">关闭订单</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="settlementForm">确认收款</van-button>
</view>
</submit-layout>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />

18
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])
}

1
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"
}
}

6
pages/storage/pound-info/index.wxml

@ -50,10 +50,10 @@
</van-cell>
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{ form }}"></view>
<view class="cu-bar bg-white foot justify-end" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{form}}">
<van-button type="danger" custom-style="height:88rpx;width:254rpx" bind:click="deleteForm">删除</van-button>
<submit-layout wx:if="{{form.status == 0 || form.status == 1}}">
<van-button type="danger" custom-style="height:88rpx;width:254rpx" bind:click="deleteForm" wx:if="{{form.status == 0 || form.status == 1}}">删除</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm" wx:if="{{form.status == 1}}">关联出货单</van-button>
</view>
</submit-layout>
<van-dialog id="van-dialog" />
<notification id="qn-notification" />

2
pages/storage/pound-list/index.js

@ -17,7 +17,7 @@ Scene({
top: 0,
orderList: [],
form: {
funcType: 0,
// status: 0,
pageNum: 1,
pageSize: 10
},

Loading…
Cancel
Save