| @@ -63,6 +63,7 @@ Page({ | |||
| */ | |||
| onLoad(options) { | |||
| this.setData({itemId:options.id}); | |||
| console.log(options) | |||
| //this.getApprovalItemList(); | |||
| this.groupList(); | |||
| this.townList(); | |||
| @@ -41,17 +41,17 @@ | |||
| <van-checkbox-group value="{{ result }}" bind:change="onChange"> | |||
| <van-row> | |||
| <van-col span="24" > | |||
| <van-checkbox wx:for="{{groups}}" wx:for-item="item" name="{{item.userId}}" shape="square" checked-color="#2C8E68">{{item.roles[0].roleName}}:{{item.nickName}}</van-checkbox> | |||
| <van-checkbox wx:for="{{groups}}" wx:for-item="item" wx:key="index" name="{{item.userId}}" shape="square" checked-color="#2C8E68">{{item.roles[0].roleName}}:{{item.nickName}}</van-checkbox> | |||
| </van-col> | |||
| </van-row> | |||
| <van-row> | |||
| <van-col span="24" > | |||
| <van-checkbox wx:for="{{villages}}" wx:for-item="item" name="{{item.userId}}" shape="square" checked-color="#2C8E68">{{item.roles[0].roleName}}:{{item.nickName}}</van-checkbox> | |||
| <van-checkbox wx:for="{{villages}}" wx:for-item="item" wx:key="index" name="{{item.userId}}" shape="square" checked-color="#2C8E68">{{item.roles[0].roleName}}:{{item.nickName}}</van-checkbox> | |||
| </van-col> | |||
| </van-row> | |||
| <van-row> | |||
| <van-col span="24"> | |||
| <van-checkbox wx:for="{{towns}}" wx:for-item="item" name="{{item.userId}}" shape="square" checked-color="#2C8E68">{{item.roles[0].roleName}}:{{item.nickName}}</van-checkbox> | |||
| <van-checkbox wx:for="{{towns}}" wx:for-item="item" wx:key="index" name="{{item.userId}}" shape="square" checked-color="#2C8E68">{{item.roles[0].roleName}}:{{item.nickName}}</van-checkbox> | |||
| </van-col> | |||
| </van-row> | |||
| </van-checkbox-group> | |||
| @@ -80,7 +80,7 @@ | |||
| <image src="/image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;"></image> | |||
| </view> | |||
| </van-swipe-cell> --> | |||
| <van-swipe-cell right-width="{{ 65 }}" wx:for="{{templateList}}" wx:for-item="item" > | |||
| <van-swipe-cell right-width="{{ 65 }}" wx:for="{{templateList}}" wx:key="index" wx:for-item="item" > | |||
| <van-cell title="{{item.name}}" bindtap='chooseTemplate' data-id="{{item.id}}"> | |||
| <van-icon slot="icon" name="https://636c-cloud1-8gya17a31667774d-1310628902.tcb.qcloud.la/icon_mb.png?sign=2a8bbe2cb4d4e0f28a99fddbe042d26c&t=1648620032" class="custom-icon" size="40" style="margin-right: 10px;" /> | |||
| </van-cell> | |||
| @@ -602,6 +602,10 @@ Page({ | |||
| }, | |||
| goPayeeList(event){ | |||
| console.log(event); | |||
| if(event.currentTarget.dataset.payer == null || event.currentTarget.dataset.payer == ''){ | |||
| UTIL.showToastNoneIcon('请先选择付款方!'); | |||
| return; | |||
| } | |||
| if(event.currentTarget.dataset.accounttype == null ){ | |||
| event.currentTarget.dataset.accounttype = '' | |||
| } | |||
| @@ -685,9 +689,9 @@ Page({ | |||
| formData:element, | |||
| success (response){ | |||
| console.log(res); | |||
| if((j+1) == that.data.form.transfers[j].length && (i+1) == that.data.form.transfers[j].fileForm[i].length && e.currentTarget.dataset.type == 0){ | |||
| if((j+1) == that.data.form.transfers.length && (i+1) == that.data.form.transfers[j].fileForm.length && e.currentTarget.dataset.type == 0){ | |||
| wx.navigateTo({ | |||
| url: '/pages/apply/approval/approval?id='+res.data.id, | |||
| url: '/pages/apply/approval/approval?id='+res.data.approvalItemTemplate.id, | |||
| }) | |||
| } | |||
| }, | |||
| @@ -709,6 +713,7 @@ Page({ | |||
| SJtakephoto(e){ | |||
| var that = this; | |||
| let fileForm = that.data.form.transfers[e.currentTarget.dataset.index].fileForm?that.data.form.transfers[e.currentTarget.dataset.index].fileForm:[]; | |||
| wx.chooseMedia({ | |||
| count: 9, | |||
| mediaType: ['image','video'], | |||
| @@ -729,7 +734,7 @@ Page({ | |||
| console.log(fileForm); | |||
| that.setData({ | |||
| ["form.transfers["+e.currentTarget.dataset.index+"].SJimage"]:res.tempFiles, | |||
| ["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm | |||
| ["form.transfers["+e.currentTarget.dataset.index+"].fileForm"]:fileForm, | |||
| }) | |||
| } | |||
| }) | |||
| @@ -186,7 +186,7 @@ | |||
| </view> | |||
| <view class="main-box table-box" wx:for="{{form.transfers[index].payeeList}}" wx:for-index="childrenIndex" wx:key="payeeId"> | |||
| <van-field readonly value="{{ form.transfers[index].payeeList[childrenIndex].payee }}" placeholder="请输入姓名" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="goPayeeList" data-index="{{index}}" data-isPeers="{{ form.transfers[index].isPeers }}" data-bankType="{{ form.transfers[index].bankType }}" data-accountType="{{ form.transfers[index].bankAccountType }}" data-transferType="{{ form.transfers[index].transferType }}"> | |||
| <van-field readonly value="{{ form.transfers[index].payeeList[childrenIndex].payee }}" placeholder="请输入姓名" border="{{ false }}" bind:change="onChange" input-align="right" is-link arrow-direction ="down" bindtap="goPayeeList" data-payer="{{form.transfers[index].payer}}" data-index="{{index}}" data-isPeers="{{ form.transfers[index].isPeers }}" data-bankType="{{ form.transfers[index].bankType }}" data-accountType="{{ form.transfers[index].bankAccountType }}" data-transferType="{{ form.transfers[index].transferType }}"> | |||
| <view slot="label"> | |||
| 姓名<van-tag plain type="danger" color="#5CAE77" round style="margin-left:10px;">收款方</van-tag> | |||
| </view> | |||
| @@ -208,7 +208,7 @@ | |||
| <view class="van-cell-text">附件<van-tag type="danger" style="margin-left: 10px;">可拍照</van-tag></view> | |||
| </view> | |||
| <view> | |||
| <view class="van-cell-text">总数<van-tag round color="#5CAE77" plain style="margin-left: 10px;"> {{form.transfers[index].imgcount}}张 </van-tag></view> | |||
| <view class="van-cell-text">总数<van-tag round color="#5CAE77" plain style="margin-left: 10px;"> {{form.transfers[index].fileNum?form.transfers[index].fileNum:0}}张 </van-tag></view> | |||
| </view> | |||
| </van-cell> | |||
| <view class="fj-box"> | |||
| @@ -72,7 +72,7 @@ Page({ | |||
| console.log(res); | |||
| if((j+1) == that.data.form.transfers.length && (i+1) == that.data.form.transfers[j].fileForm.length && e.currentTarget.dataset.type == 0){ | |||
| wx.navigateTo({ | |||
| url: '/pages/apply/approval/approval?id='+res.data.id, | |||
| url: '/pages/apply/approval/approval?id='+res.data.approvalItemTemplate.id, | |||
| }) | |||
| } | |||
| if((j+1) == that.data.form.transfers.length && (i+1) == that.data.form.transfers[j].fileForm.length && e.currentTarget.dataset.type != 0){ | |||
| @@ -109,6 +109,7 @@ Page({ | |||
| let array = res.rows ; | |||
| for (let i = 0; i < array.length; i++) { | |||
| array[i].payeeAccountText = array[i].payeeAccount.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1****\$2"); | |||
| console.log(that.data.bankTypeOptions.filter(function (e) { return e.dictValue == array[i].bankType; })); | |||
| array[i].bankTypeText = (that.data.bankTypeOptions.filter(function (e) { return e.dictValue == array[i].bankType; }))[0].dictLabel; | |||
| } | |||
| that.setData({ | |||