Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
24cc493a24
4 changed files with 21 additions and 16 deletions
  1. 2
      pages/process/outside-item/index.wxml
  2. 29
      pages/process/outside-price/index.js
  3. 4
      pages/process/outside-price/index.wxml
  4. 2
      pages/storage/order-settlement/index.wxml

2
pages/process/outside-item/index.wxml

@ -62,7 +62,7 @@
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{status == 0}}">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{status == 0}}">*</view>
<text>过磅凭证</text> <text>过磅凭证</text>
</view> </view>
<text class="text-gray">3-6张,每图片大小限制5M</text>
<text class="text-gray">3-6张,每图片大小限制5M</text>
</view> </view>
<van-uploader file-list="{{ fileList }}" multiple max-count="6" deletable="{{status == 0}}" show-upload="{{status == 0}}" <van-uploader file-list="{{ fileList }}" multiple max-count="6" deletable="{{status == 0}}" show-upload="{{status == 0}}"
max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" /> max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" />

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

@ -12,13 +12,15 @@ Scene({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
height: app.globalData.fragmentHeight,
id: null, id: null,
form: null, form: null,
param: { param: {
scrapPaperReceiptId: null, scrapPaperReceiptId: null,
offsiteGrossWeight: null, offsiteGrossWeight: null,
offsiteTareWeight: null, offsiteTareWeight: null,
}
},
intoview: ''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -35,7 +37,8 @@ Scene({
wx.hideLoading() wx.hideLoading()
this.data.param.offsiteGrossWeight = result.data.offsiteGrossWeight this.data.param.offsiteGrossWeight = result.data.offsiteGrossWeight
this.data.param.offsiteTareWeight = result.data.offsiteTareWeight this.data.param.offsiteTareWeight = result.data.offsiteTareWeight
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0 })
var height = app.globalData.fragmentHeight - app.globalData.safeBottom - 120
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0, height })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
@ -109,22 +112,14 @@ Scene({
}) })
}, },
submitForm: function(){ submitForm: function(){
if(util.isEmpty(this.data.param.offsiteGrossWeight)){
util.showToast('请输入厂外毛重')
return
}
if(util.isEmpty(this.data.param.offsiteTareWeight)){
util.showToast('请输入厂外皮重')
return
}
var weightNoteList = [] var weightNoteList = []
for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) { for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) {
const element = this.data.form.productCategoryInfos[index] const element = this.data.form.productCategoryInfos[index]
if(util.isEmpty(element.grossWeight)){
if(util.isEmpty(element.grossWeight) || Number(element.grossWeight) <= 0){
util.showToast('请输入第' + (index + 1) + '项废纸品类毛重') util.showToast('请输入第' + (index + 1) + '项废纸品类毛重')
return return
} }
if(util.isEmpty(element.tareWeight)){
if(util.isEmpty(element.tareWeight) || Number(element.tareWeight) <= 0){
util.showToast('请输入第' + (index + 1) + '项废纸品类皮重') util.showToast('请输入第' + (index + 1) + '项废纸品类皮重')
return return
} }
@ -140,6 +135,16 @@ Scene({
item.scrapPaperPurchaseOrderId = element.scrapPaperPurchaseOrderId item.scrapPaperPurchaseOrderId = element.scrapPaperPurchaseOrderId
weightNoteList.push(item) weightNoteList.push(item)
} }
if(util.isEmpty(this.data.param.offsiteTareWeight)){
this.setData({ intoview: 'offsiteTareWeight' })
util.showToast('请输入厂外皮重')
return
}
if(util.isEmpty(this.data.param.offsiteGrossWeight)){
this.setData({ intoview: 'offsiteGrossWeight' })
util.showToast('请输入厂外毛重')
return
}
this.data.param.scrapPaperReceiptId = this.data.form.scrapPaperReceiptId this.data.param.scrapPaperReceiptId = this.data.form.scrapPaperReceiptId
this.data.param.weightNoteList = weightNoteList this.data.param.weightNoteList = weightNoteList
wx.showLoading({ title: '处理中', mask: true }) wx.showLoading({ title: '处理中', mask: true })

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

@ -3,7 +3,7 @@
<view slot="content">厂外收货</view> <view slot="content">厂外收货</view>
</cu-custom> </cu-custom>
<view wx:if="{{form}}">
<scroll-view scroll-y="true" style="height:{{height}}rpx" wx:if="{{form}}" scroll-into-view="{{intoview}}">
<view class="flex flex-justify info_status" wx:if="{{form.orderStatus == 0}}"> <view class="flex flex-justify info_status" wx:if="{{form.orderStatus == 0}}">
<view class="flex"> <view class="flex">
<image style="height:42rpx;width:42rpx" src="/assets/image/icon_uncheck.png"></image> <image style="height:42rpx;width:42rpx" src="/assets/image/icon_uncheck.png"></image>
@ -130,7 +130,7 @@
<text>厂外毛重(公斤)</text> <text>厂外毛重(公斤)</text>
</view> </view>
</van-field> </van-field>
</view>
</scroll-view>
<submit-layout wx:if="{{admin && form && form.orderStatus == 0}}"> <submit-layout wx:if="{{admin && form && form.orderStatus == 0}}">
<van-button plain type="default" custom-style="height:88rpx;width:186rpx" bind:click="cancelForm">取消订单</van-button> <van-button plain type="default" custom-style="height:88rpx;width:186rpx" bind:click="cancelForm">取消订单</van-button>

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

@ -41,7 +41,7 @@
<view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view> <view style="height:24rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">纸厂磅单</view> <view class="text-black text-sg text-bold" style="margin-left: 12rpx">纸厂磅单</view>
</view> </view>
<text class="text-gray">最多3张,每图片大小限制5M</text>
<text class="text-gray">最多3张,每图片大小限制5M</text>
</view> </view>
<van-uploader file-list="{{ fileList }}" multiple max-count="3" max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" /> <van-uploader file-list="{{ fileList }}" multiple max-count="3" max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" />
</view> </view>

Loading…
Cancel
Save