123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- <template>
- <view class="content">
- <view class="content3 flex s-row">
- <view class="title">上传银行卡卡号页</view>
- <view @click="uploadImg" class="picture picture3">
- <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
- <view class="text">上传银行卡卡号页</view>
- </view>
- <!-- <u-button type="primary" @click="uploadImg(3,index)">上传银行卡号页</u-button> -->
- <!-- <image class="preview" :src="item.payeeAddressUrl" mode="aspectFit"
- style="width:710rpx:height:710rpx;margin: 20rpx;"> </image> -->
- <view class="flex row">
- <view class="left-text">银行卡卡号</view>
- <view class="flex">
- <u--input placeholder="输入银行卡号码" inputAlign='left' border="none" v-model="dataDetails.bankCard">
- </u--input>
- </view>
- </view>
- <view class="flex row">
- <view class="left-text">开户行</view>
- <u--input placeholder="输入开户行" inputAlign='left' border="none" v-model="dataDetails.bankDeposit">
- </u--input>
- </view>
- <view class="flex row">
- <view class="left-text khzh-styel">开户支行</view>
- <view class="flex align-center" v-if="isShowManualInput">
- <u--input class="select-bankzh" placeholder="输入开户支行" inputAlign='left' border="none"
- v-model="dataDetails.bankDepositBranch">
- </u--input>
- <view @click="manualInput" class="type">选择支行</view>
- </view>
- <view class="flex align-center" v-if="!isShowManualInput">
- <!-- <u--input @click="selectZhbank" placeholder="选择开户支行" inputAlign='left' border="none" disabled>
- </u--input> -->
- <view class="select-bankzh" @click="selectZhbank">选择开户支行</view>
- <view @click="manualInput" class="type">手动输入</view>
- </view>
- </view>
- <view class="flex row noborder">
- <view class="left-text">收款人</view>
- <view class="flex">
- <u--input placeholder="输入收款人姓名" inputAlign='left' border="none" v-model="dataDetails.payeeName">
- </u--input>
- </view>
- </view>
- <u-picker :show="isShowBank" :columns="bankType[index]" :closeOnClickOverlay='true' @close='zhBankClose'
- @cancel='zhBankClose' @confirm='confirmBank'></u-picker>
- </u-picker>
- </view>
- <u-toast ref="uToast"></u-toast>
- <view class="submit-btn" @click="$u.throttle(submit, 1000)">提交</view>
- <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
- @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
- </u-action-sheet>
- </view>
- </template>
- <script>
- import upload from '@/components/upload.vue';
- import uploadImage from '@/components/ossutil/uploadFile.js';
- import permision from "@/js_sdk/wa-permission/permission.js"
- var _this;
- export default {
- components: {},
- data() {
- return {
- isShowimgType: false,
- dataDetails: {},
- imagesrc: '',
- bankType: [],
- isShowBank: false,
- isShowManualInput: false,
- index: ''
- };
- },
- onLoad() {
- _this = this;
- this.get_camera_permission()
- },
- methods: {
- async get_camera_permission() {
- var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
- if (photol == false) {
- uni.showModal({
- title: '提示',
- content: '您已经关闭相册权限,去设置',
- success: function(res) {
- if (res.confirm) {
- permision.gotoAppPermissionSetting()
- // plus.runtime.openURL("app-settings:");
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }
- },
- manualInput() {
- if (this.isShowManualInput) {
- if (uni.$u.test.isEmpty(this.bankType[this.index])) {
- this.$refs.uToast.show({
- type: 'error',
- message: "请先上传银行卡!",
- })
- return true
- }
- this.isShowBank = true
- } else {
- this.isShowBank = false
- }
- this.isShowManualInput = !this.isShowManualInput
- },
- //设置图片
- setImage(e) {
- console.log(e);
- //显示在页面
- //this.imagesrc = e.path;
- if (e.dotype == 'idphoto') {
- _this.zjzClipper(e.path);
- } else if (e.dotype == 'watermark') {
- _this.watermark(e.path);
- } else {
- _this.savePhoto(e.path);
- }
- },
- //保存图片到相册,方便核查
- savePhoto(path) {
- this.imagesrc = path;
- uploadImage(path, 'appData/',
- result => {
- // 上传成功
- console.log('图片地址', result)
- }
- )
- //保存到相册
- // uni.saveImageToPhotosAlbum({
- // filePath: path,
- // success: () => {
- // uni.showToast({
- // title: '已保存至相册',
- // duration: 2000
- // });
- // }
- // });
- },
- uploadImg() {
- this.isShowimgType = true
- },
- photograph() {
- console.log('拍照')
- let that = this;
- uni.chooseImage({
- count: 1,
- sizeType: ['compressed'],
- success: function(res) {
- console.log(JSON.stringify(res.tempFilePaths));
- uploadImage(res.tempFilePaths[0], 'appData/',
- result => {
- // 上传成功
- console.log('图片地址', result)
- }
- )
- }
- });
- },
- imgTypeSelect(val) {
- console.log(val)
- if (val.name == '相册') {
- uni.chooseImage({
- count: 1,
- sizeType: ['compressed'],
- success: function(res) {
- console.log(JSON.stringify(res.tempFilePaths));
- uploadImage(res.tempFilePaths[0], 'appData/',
- result => {
- // 上传成功
- console.log('图片地址', result)
- }
- )
- }
- });
- } else {
- }
- },
- //身份证正面
- getImgUrl1(src) {
- // console.log(src)
- // console.log('------------res-----------')
- // let that = this;
- // that.id[0] = src
- // that.id1 = src
- // that.certificates = false
- // that.personImgs.personImg = that.id[0]
- // that.$api.doRequest('get', '/driverViewInfo/personShibie', that
- // .personImgs).then(res => {
- // if (res.data.data.recPerson != null) {
- // if (res.data.data.recPerson != "") {
- // that.$set(that.DriverViewInfo, 'driverName', res
- // .data.data.recPerson)
- // }
- // }
- // if (res.data.data.recPersonNo != null) {
- // if (res.data.data.recPersonNo != "") {
- // that.$set(that.DriverViewInfo, 'numberCard', res
- // .data.data.recPersonNo)
- // }
- // }
- // }).catch(res => {
- // uni.showToast({
- // title: res.data.message,
- // icon: 'none',
- // duration: 2000
- // })
- // })
- },
- submit() {
- console.log(' tijia')
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .row4-img {
- width: 32rpx;
- height: 32rpx;
- }
- .content {
- padding: 20rpx;
- }
- .content3 {
- background: white;
- padding: 20rpx;
- box-sizing: border-box;
- .left-text {
- // background: red;
- width: 290rpx;
- color: #333333;
- display: flex;
- align-items: center;
- }
- .row {
- border-bottom: 1px solid #EEEEEE;
- padding-bottom: 28rpx;
- margin-top: 26rpx;
- .ch-style {}
- }
- .row-ch {
- padding-right: 180rpx;
- box-sizing: border-box;
- }
- }
- .title {
- color: #999999;
- margin: 20rpx 0;
- }
- .picture {
- margin-top: 20rpx;
- background: #F5F6FA;
- border-radius: 10rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #6A7282;
- }
- .picture {
- width: 100%;
- height: 440rpx;
- .text {
- margin-top: 20rpx;
- }
- }
- .xj-image {
- width: 100rpx;
- height: 100rpx;
- }
- .picture3 {
- background: url(../../../static/images/mine/yhkzm.png);
- background-size: 100% 100%;
- }
- .select-bankzh {
- width: 230rpx;
- // height: 48rpx;
- }
- .type {
- background: #F5BA3C;
- border-radius: 10rpx;
- color: white;
- box-sizing: border-box;
- padding: 4rpx 10rpx;
- font-size: 26rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 68rpx;
- }
- .submit-btn {
- position: fixed;
- bottom: 40rpx;
- width: 90%;
- background: #F5BA3C;
- color: white;
- text-align: center;
- margin-left: 5%;
- padding: 30rpx 0;
- border-radius: 50rpx;
- }
- </style>
|