Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
479af29b5f
3 changed files with 19 additions and 36 deletions
  1. 5
      pages/process/outside-item/index.js
  2. 38
      pages/process/outside-item/index.wxml
  3. 12
      pages/process/outside-price/index.js

5
pages/process/outside-item/index.js

@ -76,7 +76,10 @@ Component({
this.statAmount()
} else if(e.currentTarget.id == 'settleUnitPrice'){
this.statAmount()
}
} else if(e.currentTarget.id == 'netWeight'){
var estimatedAmount = math.times(this.data.item.netWeight, this.data.item.unitPrice).toFixed(2)
this.setData({['item.estimatedAmount']: estimatedAmount})
}
wx.nextTick(() => {
this.triggerEvent('change', {index: this.data.index, item: this.data.item});
})

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

@ -12,44 +12,24 @@
<view class="{{item.unitPrice ? 'text-black' : 'text-gray'}}">{{item.unitPrice || '请输入单价'}}</view>
</view>
</van-cell>
<!-- <van-cell>
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{status == 0}}">*</view>
<text>毛重(公斤)</text>
</view>
<input id="grossWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right"
maxlength="8" placeholder="请输入毛重" disabled="{{status != 0}}" value="{{item.grossWeight || ''}}" bindinput="bindInput" />
</view>
</van-cell> -->
<van-field id="grossWeight" value="{{ item.grossWeight || '' }}" type="digit" placeholder="请输入毛重" clearable disabled="{{status != 0}}" input-align="right" bind:change="bindInput">
<!-- <van-field id="grossWeight" value="{{ item.grossWeight || '' }}" type="digit" placeholder="请输入毛重" clearable disabled="{{status != 0}}" input-align="right" bind:change="bindInput">
<view slot="label" class="flex text-black" style="width:200rpx">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px" wx:if="{{status == 0}}">*</view>
<text>毛重(公斤)</text>
</view>
</van-field>
<!-- <van-cell>
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px" wx:if="{{status == 0}}">*</view>
<text>皮重(公斤)</text>
</view>
<input id="tareWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right"
maxlength="8" placeholder="请输入皮重" disabled="{{status != 0}}" value="{{item.tareWeight || ''}}" bindinput="bindInput" />
</view>
</van-cell> -->
<van-field id="tareWeight" value="{{ item.tareWeight || '' }}" type="digit" placeholder="请输入皮重" clearable disabled="{{status != 0}}" input-align="right" bind:change="bindInput">
</van-field> -->
<!-- <van-field id="tareWeight" value="{{ item.tareWeight || '' }}" type="digit" placeholder="请输入皮重" clearable disabled="{{status != 0}}" input-align="right" bind:change="bindInput">
<view slot="label" class="flex text-black" style="width:200rpx">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px" wx:if="{{status == 0}}">*</view>
<text>皮重(公斤)</text>
</view>
</van-field>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view>
<view class="{{item.netWeight ? 'text-black' : 'text-gray'}}">{{item.netWeight || ''}}</view>
</van-field> -->
<van-field id="netWeight" value="{{ item.netWeight || '' }}" type="digit" placeholder="请输入净重" clearable disabled="{{status != 0}}" input-align="right" bind:change="bindInput">
<view slot="label" class="flex text-black" style="width:200rpx">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 12px" wx:if="{{status == 0}}">*</view>
<text>净重(公斤)</text>
</view>
</van-cell>
</van-field>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">预估金额(元)</view>

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

@ -115,14 +115,14 @@ Scene({
var weightNoteList = []
for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) {
const element = this.data.form.productCategoryInfos[index]
if(util.isEmpty(element.grossWeight) || Number(element.grossWeight) <= 0){
util.showToast('请输入第' + (index + 1) + '项废纸品类毛重')
return
}
if(util.isEmpty(element.tareWeight) || Number(element.tareWeight) <= 0){
util.showToast('请输入第' + (index + 1) + '项废纸品类皮重')
if(util.isEmpty(element.netWeight) || Number(element.netWeight) <= 0){
util.showToast('请输入第' + (index + 1) + '项废纸品类净重')
return
}
// if(util.isEmpty(element.tareWeight) || Number(element.tareWeight) < 0){
// util.showToast('请输入第' + (index + 1) + '项废纸品类皮重')
// return
// }
if(util.isEmpty(element.weightNoteImages)){
util.showToast('请上传第' + (index + 1) + '项废纸品类过磅凭证')
return

Loading…
Cancel
Save