Browse Source

no message

feature/v1.6
xpz2018 4 years ago
parent
commit
36039882d0
7 changed files with 83 additions and 101 deletions
  1. 10
      pages/storage/order-create/index.js
  2. 1
      pages/storage/order-create/index.json
  3. 52
      pages/storage/order-create/index.wxml
  4. 28
      pages/storage/order-info/index.wxml
  5. 6
      pages/storage/order-settlement/index.js
  6. 1
      pages/storage/order-settlement/index.json
  7. 86
      pages/storage/order-settlement/index.wxml

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

@ -133,13 +133,13 @@ Scene({
this.setData({ activeNames: detail })
},
bindInput: function (e) {
this.data.form[e.currentTarget.id] = e.detail.value
this.data.form[e.currentTarget.id] = e.detail
if(e.currentTarget.id == 'unitPrice'){
var amount = ''
if(!util.isEmpty(this.data.form.unitPrice) && Number(this.data.form.unitPrice) > 0){
amount = math.times(this.data.form.unitPrice, this.data.poundInfo.netWeight)
}
this.setData({ visible: false, ['form.productName']: detail.value, ['form.estimatedAmount']: amount })
if(!util.isEmpty(this.data.form.unitPrice) && Number(this.data.form.unitPrice) > 0){
amount = math.times(this.data.form.unitPrice, this.data.poundInfo.netWeight)
}
this.setData({ visible: false, ['form.estimatedAmount']: amount })
}
},
onInputChange: function(e){

1
pages/storage/order-create/index.json

@ -2,6 +2,7 @@
"usingComponents": {
"van-index-anchor": "/components/index-anchor/index",
"van-cell": "/components/cell/index",
"van-field": "/components/field/index",
"van-button": "/components/button/index",
"van-checkbox": "/components/checkbox/index",
"van-loading": "/components/loading/index",

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

@ -5,8 +5,9 @@
</cu-custom>
<view wx:if="{{form}}">
<view style="background-color:#f3f3f3;">
<text class="text-sg" style="line-height:64rpx;padding-left:32rpx">出货信息</text>
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<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>
<van-cell id="orderId" clickable center is-link bind:click="chooseList">
<view slot="title" class="flex flex-justify">
@ -25,7 +26,7 @@
<view class="{{form.consigneeName ? 'text-black' : 'text-gray'}}">{{form.consigneeName || '请选择收货方'}}</view>
</view>
</van-cell>
<van-cell clickable center is-link bind:click="showCategory">
<van-cell clickable center is-link arrow-direction="down" bind:click="showCategory">
<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">*</view>
@ -34,14 +35,8 @@
<view class="{{form.productName ? 'text-black' : 'text-gray'}}">{{form.productName || '请选择废纸品类'}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">纸品包数</view>
<input id="packageQuantity" type="number" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入纸品包数" value="{{form.packageQuantity || ''}}" bindinput="bindInput" />
</view>
</van-cell>
<van-cell clickable center bind:click="showPlate">
<van-field id="packageQuantity" label="纸品包数" value="{{ form.packageQuantity || '' }}" type="number" placeholder="请输入纸品包数" clearable input-align="right" bind:change="bindInput"></van-field>
<van-cell clickable is-link arrow-direction="down" center bind:click="showPlate">
<view class="flex flex-justify text-black">
<view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
@ -50,33 +45,20 @@
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">
<text>司机姓名</text>
</view>
<input id="driverName" placeholder-style="color:#aaa" style="text-align: right" maxlength="12"
placeholder="请输司机姓名" value="{{form.driverName || ''}}" bindinput="bindInput" />
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">出货单价(元/公斤)</view>
<input id="unitPrice" type="number" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入出货单价" value="{{form.unitPrice || ''}}" bindinput="bindInput" />
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">预估金额</view>
<input id="estimatedAmount" type="number" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入预估金额" value="{{form.estimatedAmount || ''}}" bindinput="bindInput" />
</view>
</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.driverName || '' }}" maxlength="8" type="digit" placeholder="请输入出货单价" clearable input-align="right" bind:change="bindInput"></van-field>
<van-field id="estimatedAmount" label="预估金额" value="{{ form.estimatedAmount || '' }}" maxlength="8" type="digit" placeholder="请输入预估金额" clearable input-align="right" bind:change="bindInput"></van-field>
</view>
<view class="margin-top"></view>
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{poundInfo}}">
<van-collapse-item title="过磅信息" content-class="collapse-item" name="1">
<van-collapse-item content-class="collapse-item" name="1">
<view slot="title" class="flex flex-center" style="justify-content: flex-start;">
<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>
<van-cell wx:if="{{poundInfo.firstWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view>

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

@ -7,7 +7,10 @@
<van-notice-bar color="#1989fa" background="#008AFF" left-icon="info-o" text="{{ statusOrder(orderInfo.status) }}" wx:if="{{orderInfo}}"/>
<view wx:if="{{orderInfo.status == 0 || orderInfo.status == 1 || orderInfo.status == 3}}">
<view wx:if="{{orderInfo}}">
<van-index-anchor index="出货信息" />
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<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>
<van-cell center>
<view slot="title" class="flex flex-justify">
<view class="text-black">收货方名称</view>
@ -58,7 +61,11 @@
</view>
<view class="margin-top"></view>
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{poundInfo}}">
<van-collapse-item title="过磅信息" content-class="collapse-item" name="1">
<van-collapse-item content-class="collapse-item" name="1">
<view slot="title" class="flex flex-center" style="justify-content: flex-start;">
<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>
<van-cell wx:if="{{poundInfo.firstWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view>
@ -104,7 +111,10 @@
</view>
<view wx:elif="{{orderInfo.status == 2}}">
<view wx:if="{{form}}">
<van-index-anchor index="结算信息" />
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<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>
<van-cell center>
<view slot="title" class="flex flex-justify">
<view class="text-black">纸品品类</view>
@ -156,7 +166,11 @@
</view>
<view class="margin-top"></view>
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{poundInfo}}">
<van-collapse-item title="出货信息" content-class="collapse-item" name="2">
<van-collapse-item content-class="collapse-item" name="2">
<view slot="title" class="flex flex-center" style="justify-content: flex-start;">
<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>
<van-cell center>
<view slot="title" class="flex flex-justify">
<view class="text-black">收货方名称</view>
@ -189,7 +203,11 @@
</van-cell>
<!-- <van-field label="备注" type="textarea" input-align="right" readonly autosize border="{{ false }}" /> -->
</van-collapse-item>
<van-collapse-item title="过磅信息" content-class="collapse-item" name="1">
<van-collapse-item content-class="collapse-item" name="1">
<view slot="title" class="flex flex-center" style="justify-content: flex-start;">
<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>
<van-cell wx:if="{{poundInfo.firstWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view>

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

@ -105,13 +105,13 @@ Scene({
this.setData({ visible: false, ['form.categoryName']: detail.value })
},
bindInput: function (e) {
this.data.form[e.target.id] = Number(e.detail.value)
this.data.form[e.target.id] = Number(e.detail)
if(e.target.id == 'netWeight'){
if(!util.isEmpty(this.data.form.deductPercent) && Number(this.data.form.deductPercent) > 0){
var deductWeight = math.divide(math.times(this.data.form.netWeight, this.data.form.deductPercent), 100)
this.setData({ ['form.settleWeight']: math.minus(this.data.form.netWeight, deductWeight) })
} else {
this.setData({ ['form.settleWeight']: e.detail.value })
this.setData({ ['form.settleWeight']: e.detail })
}
} else if(e.target.id == 'deductPercent'){
if(!util.isEmpty(this.data.form.netWeight) && Number(this.data.form.netWeight) > 0){
@ -131,7 +131,7 @@ Scene({
this.setData({ ['form.deductPercent']: '' })
}
} else {
this.setData({ ['form.netWeight']: e.detail.value })
this.setData({ ['form.netWeight']: e.detail })
}
}
this.statAmount()

1
pages/storage/order-settlement/index.json

@ -1,6 +1,7 @@
{
"usingComponents": {
"van-cell": "/components/cell/index",
"van-field": "/components/field/index",
"van-loading": "/components/loading/index",
"van-image": "/components/image/index",
"van-button": "/components/button/index",

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

@ -5,10 +5,11 @@
</cu-custom>
<view wx:if="{{orderInfo}}">
<view style="background-color:#f3f3f3;">
<text class="text-sg" style="line-height:64rpx;padding-left:32rpx">结算信息</text>
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<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>
<van-cell center clickable is-link bind:click="showCategory">
<van-cell center clickable is-link arrow-direction="down" bind:click="showCategory">
<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">*</view>
@ -17,57 +18,29 @@
<view class="{{form.categoryName ? 'text-black' : 'text-gray'}}">{{form.categoryName || '请选择废纸品类'}}</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">*</view>
<text>结算单价(元/吨)</text>
</view>
<input id="settleUnitPrice" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入结算单价" value="{{form.settleUnitPrice || ''}}" bindinput="bindInput" />
</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">*</view>
<text>净重(吨)</text>
</view>
<input id="netWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入净重" value="{{form.netWeight || ''}}" bindinput="bindInput" />
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">扣点(%)</view>
<input id="deductPercent" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="4"
placeholder="请输入扣点" value="{{form.deductPercent || ''}}" bindinput="bindInput" />
<van-field id="settleUnitPrice" value="{{ form.settleUnitPrice || '' }}" 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-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算重量(吨)</view>
<input id="settleWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入结算重量" value="{{form.settleWeight || ''}}" bindinput="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-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">其他费用(元)</view>
<input id="otherFee" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入其他费用" value="{{form.otherFee || ''}}" bindinput="bindInput" />
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算金额(元)</view>
<input id="settlePrice" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入结算金额" disabled value="{{form.settlePrice || ''}}" bindinput="bindInput" />
</view>
</van-cell>
</van-field>
<van-field id="deductPercent" value="{{ form.deductPercent || '' }}" label="扣点(%)" maxlength="4" type="digit" placeholder="请输入扣点" clearable input-align="right" bind:change="bindInput"></van-field>
<van-field id="settleWeight" value="{{ form.settleWeight || '' }}" label="结算重量(吨)" maxlength="8" type="digit" placeholder="请输入结算重量" clearable input-align="right" bind:change="bindInput"></van-field>
<van-field id="otherFee" value="{{ form.otherFee || '' }}" label="其他费用(吨)" maxlength="8" type="digit" placeholder="请输入其他费用" clearable input-align="right" bind:change="bindInput"></van-field>
<van-field id="settlePrice" value="{{ form.settlePrice || '' }}" label="结算金额(元)" maxlength="8" type="digit" placeholder="请输入结算金额" clearable input-align="right" bind:change="bindInput"></van-field>
<view class="bg-white" style="padding: 24rpx 32rpx 20rpx 32rpx">
<view class="flex flex-justify" style="padding-bottom: 24rpx">
<text class="text-black">纸厂磅单</text>
<view class="flex flex-center" style="justify-content: flex-start;">
<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>
<text class="text-gray">最多3张,每图片大小限制5M</text>
</view>
<van-uploader file-list="{{ fileList }}" multiple max-count="3" max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" />
@ -75,8 +48,11 @@
</view>
<view class="margin-top"></view>
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{orderInfo}}">
<van-collapse-item title="出货信息" name="2">
<!-- <view slot="title" class="text-gray">出货信息</view> -->
<van-collapse-item name="2">
<view slot="title" class="flex flex-center" style="justify-content: flex-start;">
<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>
<van-cell center>
<view slot="title" class="flex flex-justify">
<view class="text-black">收货方名称</view>
@ -122,7 +98,11 @@
<van-field label="备注" type="textarea" input-align="right" readonly autosize border="{{ false }}" />
</van-collapse-item>
<view class="margin-top"></view>
<van-collapse-item title="过磅信息" content-class="collapse-item" name="1">
<van-collapse-item content-class="collapse-item" name="1">
<view slot="title" class="flex flex-center" style="justify-content: flex-start;">
<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>
<van-cell wx:if="{{poundInfo.firstWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view>

Loading…
Cancel
Save