Browse Source

no message

feature/v1.6
xpz2018 4 years ago
parent
commit
6c2f054102
6 changed files with 48 additions and 24 deletions
  1. 2
      pages/login/index.js
  2. 15
      pages/process/order-check/index.js
  3. 2
      pages/process/order-check/index.json
  4. 44
      pages/process/order-check/index.wxml
  5. 3
      pages/process/order-check/index.wxss
  6. 6
      pages/process/outside-item/index.wxml

2
pages/login/index.js

@ -180,7 +180,7 @@ Page({
if(applicationStatus == -1){
this.setData({ loging: false})
Dialog.alert({ title: '温馨提示', message: '还没有您所属的打包站信息,请联系相关客服人员' }).then(() => {
wx.redirectTo({ url: '/pages/agent/appointment/index' })
wx.redirectTo({ url: '/pages/process/order-check/index' })
})
return
}

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

@ -13,7 +13,7 @@ Scene({
data: {
safeBottom: app.globalData.safeBottom,
paperList: null,
form: null,
form: {},
columns: [],
focus: 0,
visible: false,
@ -77,29 +77,26 @@ Scene({
this.setData({ ['form.sign']: e.currentTarget.dataset.type, focus: e.currentTarget.dataset.type })
},
bindInput: function (e) {
this.data.form[e.target.id] = e.detail.value
this.data.form[e.target.id] = e.detail
if(e.target.id == 'deductPercent'){
if(util.isEmpty(e.detail.value) || Number(e.detail.value) <= 0){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
this.data.form.deductWeight = null
this.data.form.deductPercent = null
} else {
this.data.form.deductWeight = math.divide(math.times(this.data.form.totalWeight, Number(e.detail.value)), 100).toFixed(2)
this.data.form.deductWeight = math.divide(math.times(this.data.form.totalWeight, Number(e.detail)), 100).toFixed(2)
// this.setData({ ['form.deductWeight']: math.divide(math.times(this.data.form.totalWeight, Number(e.detail.value)), 100).toFixed(3) })
}
} else if(e.target.id == 'deductWeight'){
if(util.isEmpty(e.detail.value) || Number(e.detail.value) <= 0){
if(util.isEmpty(e.detail) || Number(e.detail) <= 0){
this.data.form.deductWeight = null
this.data.form.deductPercent = null
} else {
this.data.form.deductPercent = math.times(math.divide(Number(e.detail.value), this.data.form.totalWeight), 100).toFixed(2)
this.data.form.deductPercent = math.times(math.divide(Number(e.detail), this.data.form.totalWeight), 100).toFixed(2)
// this.setData({ ['form.deductPercent']: math.times(math.divide(Number(e.detail.value), this.data.form.totalWeight), 100).toFixed(2) })
}
}
this.statAmount()
},
onChange: function(e) {
this.data.form.inspectionRemark = e.detail
},
statAmount: function(){
this.data.form.settleWeight = this.data.form.netWeight
if(!util.isEmpty(this.data.form.deductWeight)){

2
pages/process/order-check/index.json

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

44
pages/process/order-check/index.wxml

@ -4,14 +4,17 @@
</cu-custom>
<view wx:if="{{form}}">
<van-index-anchor index="订单信息" />
<view class="flex flex-center bg-white margin-top" 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>
<view slot="title" class="flex flex-justify">
<view class="text-black">客户姓名</view>
<view class="text-black">{{form.factoryCustomerName}}</view>
</view>
</van-cell>
<van-cell clickable center is-link bind:click="showPlate">
<van-cell clickable center is-link arrow-direction="down" bind:click="showPlate">
<view slot="title" class="flex flex-justify">
<view class="text-black">车牌号码</view>
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view>
@ -29,8 +32,11 @@
<view class="text-gray">{{form.emptyWeight || '- -'}}</view>
</view>
</van-cell>
<van-index-anchor index="定价信息" />
<van-cell clickable center is-link bind:click="showCategory">
<view class="flex flex-center bg-white margin-top" 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 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>
@ -39,7 +45,7 @@
<view class="{{form.productName ? 'text-black' : 'text-gray'}}">{{form.productName || '请选择废纸品类'}}</view>
</view>
</van-cell>
<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>
@ -48,8 +54,14 @@
<input id="unitPrice" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入单价" value="{{form.unitPrice || ''}}" bindinput="bindInput" />
</view>
</van-cell>
<van-cell>
</van-cell> -->
<van-field id="unitPrice" value="{{ form.unitPrice || '' }}" 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>
<!-- <van-cell>
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black" data-type="1" bindtap="changeDeductType">
<van-checkbox value="{{ form.sign == 1 }}" icon-size="32rpx"></van-checkbox>
@ -59,8 +71,14 @@
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量"
value="{{form.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" />
</view>
</van-cell>
<van-cell>
</van-cell> -->
<van-field id="deductWeight" value="{{ form.deductWeight || '' }}" data-type="1" type="digit" placeholder="请输入扣重重量" clearable disabled="{{form.sign == 2}}" input-align="right" bind:change="bindInput" bind:click-input="changeDeductType">
<view slot="label" class="flex flex-center text-black" style="justify-content: flex-start" data-type="1" bindtap="changeDeductType">
<van-checkbox value="{{ form.sign == 1 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣重(公斤)</text>
</view>
</van-field>
<!-- <van-cell>
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black" data-type="2" bindtap="changeDeductType">
<van-checkbox value="{{ form.sign == 2 }}" icon-size="32rpx"></van-checkbox>
@ -70,7 +88,13 @@
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例"
value="{{form.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" />
</view>
</van-cell>
</van-cell> -->
<van-field id="deductPercent" value="{{ form.deductPercent || '' }}" type="digit" placeholder="请输入扣点比例" clearable disabled="{{form.sign == 2}}" input-align="right" bind:change="bindInput" data-type="2" maxlength="10" bind:click-input="changeDeductType">
<view slot="label" class="flex flex-center text-black" style="justify-content: flex-start" data-type="2" bindtap="changeDeductType">
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣点(%)</text>
</view>
</van-field>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算重量(公斤)</view>

3
pages/process/order-check/index.wxss

@ -2,6 +2,9 @@
.page-icon {
margin-right: 24rpx;
}
.margin-top{
margin-top: 16rpx;
}
.big-icon{
margin-top: 24rpx;

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

@ -95,8 +95,8 @@
</view>
</van-cell> -->
<van-field id="deductWeight" value="{{ item.deductWeight || '' }}" data-type="1" type="digit" placeholder="请输入扣重重量" clearable disabled="{{item.sign == 2}}" input-align="right" bind:change="bindInput" bind:click-input="changeDeductType" wx:if="{{status == 1}}">
<view slot="label" class="flex flex-center text-black" data-type="2" bindtap="changeDeductType">
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox>
<view slot="label" class="flex flex-center text-black" style="justify-content: flex-start" data-type="1" bindtap="changeDeductType">
<van-checkbox value="{{ item.sign == 1 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣重(公斤)</text>
</view>
</van-field>
@ -112,7 +112,7 @@
</view>
</van-cell> -->
<van-field id="deductPercent" value="{{ item.deductPercent || '' }}" type="digit" placeholder="请输入扣点比例" clearable disabled="{{item.sign == 2}}" input-align="right" bind:change="bindInput" data-type="2" maxlength="10" bind:click-input="changeDeductType" wx:if="{{status == 1}}">
<view slot="label" class="flex flex-center text-black" data-type="2" bindtap="changeDeductType">
<view slot="label" class="flex flex-center text-black" style="justify-content: flex-start" data-type="2" bindtap="changeDeductType">
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣点(%)</text>
</view>

Loading…
Cancel
Save