Browse Source

纸品单价处理

feature/v2.1
xpz2018 4 years ago
parent
commit
30c18475c8
5 changed files with 15 additions and 21 deletions
  1. 8
      pages/process/order-check/index.js
  2. 8
      pages/process/order-price/index.js
  3. 8
      pages/process/outside-add/index.js
  4. 5
      pages/process/outside-check/index.js
  5. 7
      pages/setting/paper-list/index.wxml

8
pages/process/order-check/index.js

@ -117,10 +117,10 @@ Scene({
util.showToast('输入单价过高,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/公斤-'+ this.data.nowItem.highestUnitPrice + '元/公斤')
return
}
if(this.data.nowItem.lowestUnitPrice && Number(this.data.form.unitPrice) < Number(this.data.nowItem.lowestUnitPrice)){
util.showToast('输入单价过低,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/公斤-'+ this.data.nowItem.highestUnitPrice + '元/公斤')
return
}
// if(this.data.nowItem.lowestUnitPrice && Number(this.data.form.unitPrice) < Number(this.data.nowItem.lowestUnitPrice)){
// util.showToast('输入单价过低,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/公斤-'+ this.data.nowItem.highestUnitPrice + '元/公斤')
// return
// }
}
if(!util.isEmpty(this.data.form.deductWeight) && Number(this.data.form.deductWeight) >= Number(this.data.form.totalWeight)){
util.showToast('扣重不得超过皮重')

8
pages/process/order-price/index.js

@ -146,10 +146,10 @@ Scene({
util.showToast('输入单价过高,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/公斤-'+ this.data.nowItem.highestUnitPrice + '元/公斤')
return
}
if(this.data.nowItem.lowestUnitPrice && Number(this.data.form.unitPrice) < Number(this.data.nowItem.lowestUnitPrice)){
util.showToast('输入单价过低,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/公斤-'+ this.data.nowItem.highestUnitPrice + '元/公斤')
return
}
// if(this.data.nowItem.lowestUnitPrice && Number(this.data.form.unitPrice) < Number(this.data.nowItem.lowestUnitPrice)){
// util.showToast('输入单价过低,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/公斤-'+ this.data.nowItem.highestUnitPrice + '元/公斤')
// return
// }
}
if(!util.isEmpty(this.data.form.deductWeight) && Number(this.data.form.deductWeight) >= Number(this.data.form.totalWeight)){
util.showToast('扣重不得超过皮重')

8
pages/process/outside-add/index.js

@ -180,6 +180,10 @@ Scene({
util.showToast('请选择第' + (index + 1) + '项品类')
return
}
if(util.isEmpty(element.unitPrice) || Number(element.unitPrice) <= 0){
util.showToast('请输入第' + (index + 1) + '项品类价格')
return
}
if(!util.isEmpty(this.data.form.scrapPaperReceiptId)){
var cate = this.findCateById(element.productId)
if(cate){
@ -191,10 +195,6 @@ Scene({
util.showToast('第' + (index + 1) + '项品类单价不得高于:' + element.highestUnitPrice + '元/公斤')
return
}
if(element.lowestUnitPrice && Number(element.unitPrice) < Number(element.lowestUnitPrice)){
util.showToast('第' + (index + 1) + '项品类单价不得低于:' + element.lowestUnitPrice + '元/公斤')
return
}
}
wx.showLoading({ title: '处理中', mask: true })
if(this.data.form.scrapPaperReceiptId){

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

@ -97,11 +97,6 @@ Scene({
this.setData({ intoview: 'item' + index })
return
}
if(element.lowestUnitPrice && Number(element.settleUnitPrice) < Number(element.lowestUnitPrice)){
util.showToast('第' + (index + 1) + '项废纸品类单价不得低于:' + element.lowestUnitPrice + '元/公斤')
this.setData({ intoview: 'item' + index })
return
}
var item = { productId: element.productId, scrapPaperPurchaseOrderId: element.scrapPaperPurchaseOrderId }
item.deductWeight = element.deductWeight
item.deductPercent = element.deductPercent

7
pages/setting/paper-list/index.wxml

@ -4,7 +4,6 @@
</cu-custom>
<refresh-view id="refresh" height="{{height}}" bind:refresh="onRefreshList" bind:loadmore="fetchOrderList">
<!-- <refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchOrderList"> -->
<view class="list-empty" style="height:{{height}}rpx" wx:if="{{!orderList.length}}">
<view style="margin-bottom:24px" wx:if="{{loading}}">
<van-loading type="spinner" size="32" />
@ -16,10 +15,10 @@
<van-cell center clickable is-link wx:for="{{pageItem}}" wx:key="index">
<view slot="title" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem">
<view class="text-sg text-bold">{{item.productName || item.categoryName}}</view>
<view class="text-sm text-gray" style="line-height: 28rpx" wx:if="{{item.highestUnitPrice}}">
<text>单价范围(元/公斤):{{item.defaultUnitPrice}} - {{item.highestUnitPrice}}</text>
<view class="text-sm text-gray" style="line-height: 28rpx">
<text>纸品单价(元/公斤):{{item.defaultUnitPrice}}</text>
<text wx:if="{{item.highestUnitPrice}}" style="margin-left: 32rpx">最高单价(元/公斤):{{item.highestUnitPrice}}</text>
</view>
<view class="text-sm text-gray" style="line-height: 28rpx" wx:else>纸品单价(元/公斤):{{item.defaultUnitPrice}}</view>
</view>
</van-cell>
</view>

Loading…
Cancel
Save