Browse Source

bug input

feature/v2.1
xpz2018 4 years ago
parent
commit
afd9fa412f
7 changed files with 29 additions and 50 deletions
  1. 24
      pages/process/order-check/index.wxml
  2. 2
      pages/process/order-list/index.wxml
  3. 4
      pages/process/order-price/index.wxml
  4. 1
      pages/process/outside-check-item/index.js
  5. 20
      pages/process/outside-check-item/index.wxml
  6. 4
      pages/process/outside-item/index.js
  7. 24
      pages/process/outside-item/index.wxml

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

@ -61,40 +61,28 @@
<text>单价(元/公斤)</text>
</view>
</van-field>
<!-- <van-cell>
<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>
<text style="margin-left:8rpx">扣重(公斤)</text>
</view>
<input id="deductWeight" type="digit" disabled="{{form.sign == 2}}" focus="{{focus == 1}}"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量"
placeholder-style="color:#aaa" style="text-align: right;flex:1" maxlength="10" placeholder="请输入扣重重量(选填)"
value="{{form.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" />
</view>
</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>
</van-cell>
<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>
<text style="margin-left:8rpx">扣点(%)</text>
</view>
<input id="deductPercent" type="digit" disabled="{{form.sign == 1}}" focus="{{focus == 2}}"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例"
placeholder-style="color:#aaa" style="text-align: right;flex:1" maxlength="10" placeholder="请输入扣点比例(选填)"
value="{{form.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" />
</view>
</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>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算重量(公斤)</view>

2
pages/process/order-list/index.wxml

@ -74,6 +74,8 @@
bind:click="checkOrder" wx:if="{{item.status == 3}}">审核</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:160rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="paymentItem" wx:if="{{item.status == 4 && admin}}">去支付</van-button>
<van-button round type="info" custom-style="margin-left:24rpx;height:64rpx;width:160rpx" data-page="{{pageIndex}}" data-index="{{index}}"
bind:click="paymentItem" wx:if="{{item.status == 6 && admin}}">去结算</van-button>
</view>
</view>
</view>

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

@ -77,7 +77,7 @@
<text style="margin-left:8rpx">扣重(公斤)</text>
</view>
<input id="deductWeight" type="digit" disabled="{{form.sign == 2}}" focus="{{focus == 1}}"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量(选填)"
placeholder-style="color:#aaa" style="text-align: right;flex:1" maxlength="10" placeholder="请输入扣重重量(选填)"
value="{{form.deductWeight}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" />
</view>
</van-cell>
@ -88,7 +88,7 @@
<text style="margin-left:8rpx">扣点(%)</text>
</view>
<input id="deductPercent" type="digit" disabled="{{form.sign == 1}}" focus="{{focus == 2}}"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例(选填)"
placeholder-style="color:#aaa" style="text-align: right;flex:1" maxlength="10" placeholder="请输入扣点比例(选填)"
value="{{form.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" />
</view>
</van-cell>

1
pages/process/outside-check-item/index.js

@ -83,7 +83,6 @@ Component({
this.setData({ item: this.data.item, visible: false, cIndex: this.data.cIndex })
},
changeDeductType: function(e){
console.log('changeDeductType')
this.setData({ ['item.sign']: e.currentTarget.dataset.type, focus: e.currentTarget.dataset.type })
}
}

20
pages/process/outside-check-item/index.wxml

@ -31,40 +31,40 @@
<view class="{{item.netWeight ? 'text-black' : 'text-gray'}}">{{item.netWeight || ''}}</view>
</view>
</van-cell>
<!-- <van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black" data-type="1" bindtap="changeDeductType">
<van-checkbox value="{{ !item.sign || item.sign == 1 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣重(公斤)</text>
</view>
<input id="deductWeight" type="digit" disabled="{{item.sign == 2}}" focus="{{focus == 1}}"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量"
placeholder-style="color:#aaa" style="text-align: right;flex:1" maxlength="10" placeholder="请输入扣重重量(选填)"
value="{{item.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" />
</view>
</van-cell> -->
<van-field id="deductWeight" value="{{ item.deductWeight || '' }}" data-type="1" type="digit" placeholder="请输入扣重重量(选填)" clearable disabled="{{form.sign == 1}}" input-align="right" bind:change="bindInput" bind:focus="changeDeductType">
</van-cell>
<!-- <van-field id="deductWeight" value="{{ item.deductWeight || '' }}" data-type="1" type="digit" placeholder="请输入扣重重量(选填)" clearable disabled="{{item.sign == 1}}" 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="{{ !item.sign || item.sign == 1 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣重(公斤)</text>
</view>
</van-field>
<!-- <van-cell>
</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="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣点(%)</text>
</view>
<input id="deductPercent" type="digit" disabled="{{form.sign == 1}}" focus="{{focus == 2}}"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例"
placeholder-style="color:#aaa" style="text-align: right;flex:1" maxlength="10" placeholder="请输入扣点比例(选填)"
value="{{item.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" />
</view>
</van-cell> -->
<van-field id="deductPercent" value="{{ item.deductPercent || '' }}" type="digit" placeholder="请输入扣点比例(选填)" clearable disabled="{{form.sign == 1}}" input-align="right" bind:change="bindInput" data-type="2" maxlength="10" bind:focus="changeDeductType">
</van-cell>
<!-- <van-field id="deductPercent" value="{{ item.deductPercent || '' }}" type="digit" placeholder="请输入扣点比例(选填)" clearable disabled="{{item.sign == 1}}" 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-field> -->
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算重量(公斤)</view>

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

@ -100,7 +100,9 @@ Component({
this.setData({ item: this.data.item })
},
changeDeductType: function(e){
this.setData({ ['item.sign']: e.currentTarget.dataset.type, focus: e.currentTarget.dataset.type })
var type = Number(e.currentTarget.dataset.type)
this.setData({ ['item.sign']: type, focus: type })
console.log(this.data.item)
},
fileChange: function({detail}){
this.data.fileList = detail.fileList

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

@ -62,40 +62,28 @@
<text>结算单价(元/公斤)</text>
</view>
</van-field>
<!-- <van-cell wx:if="{{status == 1}}">
<van-cell wx:if="{{status == 1}}">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black" data-type="1" bindtap="changeDeductType">
<van-checkbox value="{{ !item.sign || item.sign == 1 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣重(公斤)</text>
</view>
<input id="deductWeight" type="digit" disabled="{{item.sign == 2}}" focus="{{focus == 1}}"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量"
placeholder-style="color:#aaa" style="text-align: right;flex:1" maxlength="10" placeholder="请输入扣重重量(选填)"
value="{{item.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" />
</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" 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>
<!-- <van-cell wx:if="{{status == 1}}">
</van-cell>
<van-cell wx:if="{{status == 1}}">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black" data-type="2" bindtap="changeDeductType">
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣点(%)</text>
</view>
<input id="deductPercent" type="digit" disabled="{{form.sign == 1}}" focus="{{focus == 2}}"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例"
placeholder-style="color:#aaa" style="text-align: right;flex:1" maxlength="10" placeholder="请输入扣点比例(选填)"
value="{{item.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" />
</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" 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>
<van-cell wx:if="{{status == 1}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">结算重量(公斤)</view>

Loading…
Cancel
Save