Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
fa946f6e54
7 changed files with 33 additions and 31 deletions
  1. 3
      pages/process/order-price/index.wxml
  2. 1
      pages/process/outside-price/index.wxml
  3. 4
      pages/storage/order-create/index.js
  4. 11
      pages/storage/order-create/index.wxml
  5. 11
      pages/storage/order-info/index.wxml
  6. 28
      pages/storage/order-settlement/index.js
  7. 6
      pages/storage/order-settlement/index.wxml

3
pages/process/order-price/index.wxml

@ -36,7 +36,8 @@
<view style="height:30rpx;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>
<view class="text-red text-cancel" style="padding:4rpx 0rpx 4rpx 4rpx" bindtap="cancelOrder">取消订单</view>
<van-button type="danger" round custom-style="width:120rpx" size="mini" bind:click="cancelOrder">取消订单</van-button>
<!-- <view class="text-red text-cancel" style="padding:4rpx 0rpx 4rpx 4rpx" bindtap="cancelOrder">取消订单</view> -->
</view>
<van-cell>
<view slot="title" class="flex flex-justify">

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

@ -17,6 +17,7 @@
<image style="height:42rpx;width:42rpx" src="/assets/image/icon_payfor.png"></image>
<view class="text-white text-sg" style="margin-left:12rpx">待定价</view>
</view>
<view class="text-white" style="padding: 12rpx 0rpx 12rpx 12rpx" bindtap="cancelForm">取消订单</view>
</view>
<view class="flex flex-justify info_status" wx:elif="{{form.orderStatus == 3}}" bindtap="orderLogger">

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

@ -183,6 +183,10 @@ Scene({
util.showToast('请输入车牌号码')
return
}
if(util.isEmpty(this.data.form.unitPrice) || Number(this.data.form.unitPrice) <= 0){
util.showToast('请输入出货单价')
return
}
if(util.isEmpty(this.data.form.netWeight) && !this.data.poundInfo){
util.showToast('请输入净重')
return

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

@ -47,7 +47,9 @@
</van-cell>
<van-field id="driverName" label="司机姓名" value="{{ form.driverName || '' }}" maxlength="12" placeholder="请输司机姓名" clearable input-align="right" bind:change="bindInput"></van-field>
<van-field id="unitPrice" label="出货单价(元/吨)" title-width="240rpx" value="{{ form.unitPrice || '' }}" maxlength="8" type="digit" placeholder="{{form.konePrice || '请输入出货单价'}}" clearable input-align="right" bind:change="bindInput"></van-field>
<van-field id="unitPrice" label="出货单价(元/吨)" title-width="240rpx" value="{{ form.unitPrice || '' }}" maxlength="8" type="digit" placeholder="{{form.konePrice || '请输入出货单价'}}" clearable input-align="right" bind:change="bindInput">
<view slot="left-icon" class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
</van-field>
<van-field id="estimatedAmount" label="预估金额" value="{{ form.estimatedAmount || '- -' }}" disabled input-align="right" bind:change="bindInput"></van-field>
@ -112,11 +114,8 @@
</van-field>
<van-field id="emptyWeight" label="皮重(公斤)" value="{{ form.emptyWeight || '' }}" type="digit" placeholder="请输入皮重" clearable input-align="right" bind:change="bindInput">
</van-field>
<van-field id="netWeight" value="{{ form.netWeight || '' }}" type="digit" placeholder="请输入净重" clearable 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">*</view>
<text>净重(公斤)</text>
</view>
<van-field id="netWeight" label="净重(公斤)" value="{{ form.netWeight || '' }}" type="digit" placeholder="请输入净重" clearable input-align="right" bind:change="bindInput">
<view slot="left-icon" class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
</van-field>
<view class="bg-white" style="padding: 24rpx 32rpx 20rpx 32rpx">
<view class="flex flex-justify" style="padding-bottom: 24rpx">

11
pages/storage/order-info/index.wxml

@ -75,7 +75,7 @@
<view class="text-gray">重量(公斤):{{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view>
</van-cell>
<view class="bg-white flex flex-justify" style="padding:0rpx 32rpx" wx:if="{{poundInfo.emptyWeighingPicture.length}}">
<view class="bg-white flex flex-justify" style="padding:{{poundInfo.firstWeight ? 0 : 24}}rpx 32rpx 0rpx 32rpx" wx:if="{{poundInfo.emptyWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="330rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="0" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading">
@ -90,7 +90,7 @@
<view class="text-gray">重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view>
</van-cell>
<view class="bg-white flex flex-justify" style="padding:0rpx 32rpx" wx:if="{{poundInfo.totalWeighingPicture.length}}">
<view class="bg-white flex flex-justify" style="padding:{{poundInfo.secondWeight ? 0 : 24}}rpx 32rpx 0rpx 32rpx" wx:if="{{poundInfo.totalWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.totalWeighingPicture}}" wx:key="index" use-loading-slot width="330rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="1" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading">
@ -243,13 +243,13 @@
<view style="height:30rpx;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>
<van-cell wx:if="{{poundInfo.firstWeight}}" border="{{false}}">
<van-cell border="{{false}}" wx:if="{{poundInfo.firstWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view>
<view class="text-gray">重量(公斤):{{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view>
</van-cell>
<view class="bg-white flex flex-justify" style="padding:0rpx 32rpx" wx:if="{{poundInfo.emptyWeighingPicture.length}}">
<view class="bg-white flex flex-justify" style="padding:{{poundInfo.firstWeight ? 0 : 24}}rpx 32rpx 0rpx 32rpx" wx:if="{{poundInfo.emptyWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="330rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="0" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading">
@ -257,14 +257,13 @@
</view>
</van-image>
</view>
<view class="van-hairline--top" style="height:1px;margin-top: 24rpx;margin-left: 24rpx" wx:if="{{poundInfo.secondWeight}}"></view>
<van-cell wx:if="{{poundInfo.secondWeight}}" border="{{false}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第二次过磅(毛重)</view>
<view class="text-gray">重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view>
</van-cell>
<view class="bg-white flex flex-justify" style="padding:0rpx 32rpx" wx:if="{{poundInfo.totalWeighingPicture.length}}">
<view class="bg-white flex flex-justify" style="padding: {{poundInfo.secondWeight ? 0 : 24}}rpx 32rpx 0rpx 32rpx" wx:if="{{poundInfo.totalWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.totalWeighingPicture}}" wx:key="index" use-loading-slot width="330rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="1" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading">

28
pages/storage/order-settlement/index.js

@ -51,12 +51,12 @@ Scene({
}
if(result.data.outboundDeliveryOrderSettlementInfo.id){
result.data.outboundDeliveryOrderSettlementInfo.netWeight = math.divide(result.data.outboundDeliveryOrderSettlementInfo.netWeight, 1000)
this.data.imageList = []
if(result.data.weightNote.weightNoteImageUrlsArr){
for (let index = 0; index < result.data.weightNote.weightNoteImageUrlsArr.length; index++) {
const element = result.data.weightNote.weightNoteImageUrlsArr[index]
this.data.fileList = []
if(result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr){
for (let index = 0; index < result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr.length; index++) {
const element = result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr[index]
if(!util.isEmpty(element)){
this.data.imageList.push({ url: element})
this.data.fileList.push({ url: element})
}
}
}
@ -74,7 +74,7 @@ Scene({
poundInfo: result.data.weightNote,
orderInfo: result.data.outboundDeliveryOrder,
form: result.data.outboundDeliveryOrderSettlementInfo,
imageList: this.data.imageList
fileList: this.data.fileList
})
this.statAmount()
} else {
@ -141,6 +141,7 @@ Scene({
this.data.form.deductWeight = 0
this.setData({ ['form.settleWeight']: e.detail })
}
this.statPrice()
} else if(e.target.id == 'deductPercent'){
if(!util.isEmpty(this.data.form.netWeight) && Number(this.data.form.netWeight) > 0){
if(Number(this.data.form.deductPercent) < 100){
@ -152,6 +153,7 @@ Scene({
this.setData({ ['form.settleWeight']: '' })
}
}
this.statPrice()
} else if(e.target.id == 'settleWeight'){
if(!util.isEmpty(this.data.form.netWeight) && Number(this.data.form.netWeight) > 0){
if(Number(this.data.form.netWeight) > Number(this.data.form.settleWeight)){
@ -165,20 +167,22 @@ Scene({
} else {
this.setData({ ['form.netWeight']: e.detail })
}
this.statPrice()
} else if(e.target.id == 'settleUnitPrice'){
this.statPrice()
}
this.statAmount()
},
statPrice: function(){
if(!util.isEmpty(this.data.form.settleUnitPrice) && !util.isEmpty(this.data.form.settleWeight)){
this.data.form.settlePrice = math.times(this.data.form.settleUnitPrice, this.data.form.settleWeight)
}
},
statAmount: function(){
var amout = this.data.form.settlePrice
if(util.isEmpty(amout) || Number(amout) <= 0){
if(!util.isEmpty(this.data.form.settleUnitPrice) && !util.isEmpty(this.data.form.settleWeight)){
var amout = math.times(this.data.form.settleUnitPrice, this.data.form.settleWeight)
}
}
if(util.isEmpty(amout) || Number(amout) <= 0){
return
}
this.data.form.settlePrice = amout
if(!util.isEmpty(this.data.form.freight)){
amout = math.minus(amout, this.data.form.freight)
}

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

@ -143,12 +143,6 @@
<view class="text-gray">{{poundInfo.operaterName}}</view>
</view>
</van-cell>
<view class="bg-white" style="padding: 20rpx 32rpx" wx:if="{{imageList && imageList.length}}">
<view class="flex flex-justify" style="padding-bottom: 20rpx">
<text class="text-black">出货凭证</text>
</view>
<van-uploader file-list="{{ imageList }}" deletable="{{false}}" show-upload="{{false}}" />
</view>
</van-collapse-item>
</van-collapse>

Loading…
Cancel
Save