Browse Source

no message

feature/v1.6
xpz2018 4 years ago
parent
commit
1f35913bc2
5 changed files with 33 additions and 27 deletions
  1. 2
      pages/home/customer-info/index.wxml
  2. 2
      pages/home/employee-info/index.wxml
  3. 8
      pages/settlement/bank-add/index.js
  4. 2
      pages/settlement/bank-add/index.json
  5. 46
      pages/settlement/bank-add/index.wxml

2
pages/home/customer-info/index.wxml

@ -8,7 +8,7 @@
<van-field id="mobile" value="{{ form.mobile }}" type="number" label="手机号码:" placeholder="请输入手机号码" <van-field id="mobile" value="{{ form.mobile }}" type="number" label="手机号码:" placeholder="请输入手机号码"
bind:input="bindInput" /> bind:input="bindInput" />
<van-field value="{{ form.defaultPaymentMethod == 1 ? '现金支付' : (form.defaultPaymentMethod == 2 ? '银行卡转账' : '' )}}" readonly <van-field value="{{ form.defaultPaymentMethod == 1 ? '现金支付' : (form.defaultPaymentMethod == 2 ? '银行卡转账' : '' )}}" readonly
label="付款方式:" is-link bindtap="chooseMethod" placeholder="请选择付款方式" />
label="付款方式:" is-link arrow-direction="down" bindtap="chooseMethod" placeholder="请选择付款方式" />
<van-field id="bankName" value="{{ form.bankName }}" label="银行名称:" readonly is-link placeholder="请选择银行" <van-field id="bankName" value="{{ form.bankName }}" label="银行名称:" readonly is-link placeholder="请选择银行"
bind:input="bindInput" wx:if="{{form.defaultPaymentMethod == 2}}" bindtap="chooseMethod" /> bind:input="bindInput" wx:if="{{form.defaultPaymentMethod == 2}}" bindtap="chooseMethod" />
<van-field id="bankBranchName" value="{{ form.bankBranchName }}" label="开户行:" placeholder="请输入开户行" <van-field id="bankBranchName" value="{{ form.bankBranchName }}" label="开户行:" placeholder="请输入开户行"

2
pages/home/employee-info/index.wxml

@ -7,7 +7,7 @@
<van-field value="{{ form.cardNo }}" label="卡号:" disabled wx:if="{{ cardNo }}"/> <van-field value="{{ form.cardNo }}" label="卡号:" disabled wx:if="{{ cardNo }}"/>
<van-field value="{{ form.enterpriseMemberName || form.applicantName }}" label="员工姓名:" disabled placeholder="请输入员工姓名" bind:input="bindInput" /> <van-field value="{{ form.enterpriseMemberName || form.applicantName }}" label="员工姓名:" disabled placeholder="请输入员工姓名" bind:input="bindInput" />
<van-field value="{{ form.mobile || form.applicationMobile }}" type="number" label="手机号码:" disabled placeholder="请输入手机号码" /> <van-field value="{{ form.mobile || form.applicationMobile }}" type="number" label="手机号码:" disabled placeholder="请输入手机号码" />
<van-field value="{{ form.enterpriseRoleNames }}" placeholder="请选择角色" label="员工角色:" clickable readonly disabled="{{ !form.enterpriseMemberId }}" is-link bindtap="chooseMethod" />
<van-field value="{{ form.enterpriseRoleNames }}" placeholder="请选择角色" label="员工角色:" clickable readonly arrow-direction="down" disabled="{{ !form.enterpriseMemberId }}" is-link bindtap="chooseMethod" />
<van-cell wx:if="{{form.enterpriseMemberId}}"> <van-cell wx:if="{{form.enterpriseMemberId}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">员工状态:</view> <view class="text-black">员工状态:</view>

8
pages/settlement/bank-add/index.js

@ -37,8 +37,8 @@ Scene({
this.setData({ ['form.name']: app.userInfo.realName }) this.setData({ ['form.name']: app.userInfo.realName })
}, },
bindForm: function (e) { bindForm: function (e) {
this.data.form[e.target.id] = e.detail.value
if (e.target.id == 'cardNo') {
this.data.form[e.currentTarget.id] = e.detail
if (e.currentTarget.id == 'cardNo') {
this.setData({ this.setData({
['form.cardName']: null, ['form.cardName']: null,
bankName: null, bankName: null,
@ -46,8 +46,8 @@ Scene({
['form.type']: 2, ['form.type']: 2,
cardType: null cardType: null
}) })
} else if (e.target.id == 'phone') {
this.setData({ codeEnable: util.isEmpty(e.detail.value) })
} else if (e.currentTarget.id == 'phone') {
this.setData({ codeEnable: util.isEmpty(e.detail) })
} }
}, },
checkCardNo: function(cardNo){ checkCardNo: function(cardNo){

2
pages/settlement/bank-add/index.json

@ -1,5 +1,7 @@
{ {
"usingComponents": { "usingComponents": {
"van-field": "/components/field/index",
"van-cell": "/components/cell/index",
"van-button": "/components/button/index", "van-button": "/components/button/index",
"van-count-down": "/components/count-down/index", "van-count-down": "/components/count-down/index",
"notification": "/pages/message/notification/index" "notification": "/pages/message/notification/index"

46
pages/settlement/bank-add/index.wxml

@ -7,27 +7,31 @@
<text class="text-xxl">安全绑卡,快捷支付</text> <text class="text-xxl">安全绑卡,快捷支付</text>
</view> </view>
<view class="cu-form-group margin-top">
<view class="title">持卡人姓名:</view>
<input id="name" maxlength="16" style="width:65%" value="{{form.name}}" placeholder="请输入持卡人姓名" bindinput="bindForm"></input>
</view>
<view class="cu-form-group">
<view class="title">身份证号码:</view>
<input id="idno" maxlength="20" style="width:65%" value="{{form.idno}}" placeholder="请输入身份证号码" bindinput="bindForm"></input>
</view>
<view class="cu-form-group">
<view class="title">银行卡卡号:</view>
<input id="cardNo" maxlength="24" style="width:65%; flex:1" type="number" value="{{form.cardNo}}" bindinput="bindForm"
placeholder="请输入银行卡卡号" bindinput="bindForm"></input>
<text class="cuIcon-scan text-blue" style="font-size:48rpx" bindtap="scanCard"/>
</view>
<view class="cu-form-group" wx:if="{{form.cardName}}">
<image class="cu-avatar sm round" src="{{'https://medou.oss-cn-shenzhen.aliyuncs.com/bank/' + form.cardName + '.png'}}"></image>
<view style="margin-left:24rpx;flex:1">{{bankName}}</view>
<view class="text-gray" style="margin-left:24rpx">{{cardType}}</view>
</view>
<van-field id="name" maxlength="16" value="{{form.name}}" label="持卡人姓名:" placeholder="请输入持卡人姓名" bind:change="bindForm"/>
<van-field id="idno" maxlength="20" label="身份证号码:" placeholder="请输入身份证号码" bind:change="bindForm"/>
<van-field id="cardNo" maxlength="20" type="number" label="银行卡卡号:" placeholder="请输入银行卡卡号" bind:change="bindForm">
<text slot="button" class="cuIcon-scan text-blue" style="font-size:48rpx" bindtap="scanCard"/>
</van-field>
<van-cell wx:if="{{form.cardName}}">
<view slot="title" class="flex">
<image class="cu-avatar sm round" src="{{'https://medou.oss-cn-shenzhen.aliyuncs.com/bank/' + form.cardName + '.png'}}"></image>
<view style="margin-left:24rpx;flex:1">{{bankName}}</view>
<view class="text-gray" style="margin-left:24rpx">{{cardType}}</view>
</view>
</van-cell>
<view class="cu-form-group margin-top" wx:if="{{form.type == 4}}">
<view style="height:24rpx"></view>
<van-field id="phone" maxlength="11" label="手机号:" type="number" placeholder="请输入银行预留手机号码" wx:if="{{form.type == 4}}" bind:change="bindForm"/>
<van-field id="verificationCode" maxlength="20" type="number" label="验证码:" placeholder="请输入验证码" wx:if="{{form.type == 4}}" bind:change="bindForm">
<van-button slot="button" size="small" round plain type="info" custom-style="width:220rpx" disabled="{{codeEnable}}" bind:click="fetchCaptcha">
<van-count-down class="count-down" time="{{ 60000 }}" use-slot auto-start="{{false}}" bind:change="onCountChange" bind:finish="onFinished">
<text class="text-sm">{{second}}</text>
</van-count-down>
</van-button>
</van-field>
<!-- <view class="cu-form-group margin-top" wx:if="{{form.type == 4}}">
<view class="title">手机号:</view> <view class="title">手机号:</view>
<input id="phone" maxlength="11" type="number" placeholder="请输入银行预留手机号码" bindinput="bindForm"></input> <input id="phone" maxlength="11" type="number" placeholder="请输入银行预留手机号码" bindinput="bindForm"></input>
</view> </view>
@ -41,7 +45,7 @@
<text class="text-sm">{{second}}</text> <text class="text-sm">{{second}}</text>
</van-count-down> </van-count-down>
</van-button> </van-button>
</view>
</view> -->
<view style="margin-top:20rpx;padding:80rpx 32rpx"> <view style="margin-top:20rpx;padding:80rpx 32rpx">
<van-button block type="info" bind:click="submitForm">{{form.type == 4 ? '提交' : '下一步'}}</van-button> <van-button block type="info" bind:click="submitForm">{{form.type == 4 ? '提交' : '下一步'}}</van-button>

Loading…
Cancel
Save