| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641 |
- <?php
- use common\helpers\ComponentHelper;
- ?>
- <div id="app" v-cloak>
- <el-card v-loading="loading" style="border:0" shadow="never" body-style="background-color: #f3f3f3;padding: 0 0;">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="提现" name="withdrawal-edit">
- <?php ComponentHelper::loadComponentView('withdrawal-edit', __DIR__ . '/'); ?>
- </el-tab-pane>
- <el-tab-pane label="提现记录" name="withdrawal-log">
- <?php ComponentHelper::loadComponentView('withdrawal-log', __DIR__ . '/'); ?>
- </el-tab-pane>
- </el-tabs>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- activeName: 'withdrawal-edit',
- basicForm:{
- withdrawal_type:0,
- withdrawal_money:0,
- user:{},
- store:{},
- select_card_id:0,
- store_banks:{},
- select_bank:{},
- cash__type_name:{},
- },
- submitForm:{
- type:'',
- price:0,
- wechat_qrcode:'',
- content:'',
- bank_account:'',
- bank_account_type:'',
- bank_name:'',
- from:2,
- id_card:'',
- mobile:'',
- name:'',
- receive_bank_chanel_no:'',
- },
- basicFormRules:{},
- loading:false,
- listLoading:false,
- submitLoading:false,
- dialogFormVisible:false,
- dialogFormVisiblePay:false,
- dialogFormVisiblePaySms:false,
- store_bank_form:{},
- store_bank_form_pay:{},
- formLabelWidth: '120px',
- withdrawLogList:[],
- pageCount: 0,
- pagination: null,
- page:1,
- searchData: {
- withdraw_status: '',
- start: '',
- end: '',
- },
- datetime:'',
- is_show_join_pay:0,
- sms_code:'',
- card_id:'',
- };
- },
- mounted: function() {
- this.loadData();
- },
- methods: {
- loadData() {
- let self = this;
- request({
- params: {
- r: 'store/client/finance/withdrawal',
- },
- }).then(e => {
- self.loading = false;
- if (e.data.code === 0) {
- if (e.data.data.user) {
- self.basicForm.user = e.data.data.user;
- self.basicForm.store = e.data.data.store;
- self.basicForm.store_banks = e.data.data.store_banks;
- self.basicForm.cash__type_name = e.data.data.cash__type_name;
- self.basicForm.join_pay_banks = e.data.data.join_pay_banks;
- self.is_show_join_pay = e.data.data.is_show_join_pay;
- }
- } else {
- self.$message.error(e.data.msg);
- }
- }).catch(e => {
- self.$message.error('网络错误');
- });
- },
- submit(){
- request({
- params: {
- r: 'store/client/finance/withdrawal',
- },
- method: 'post',
- data: {
- form: this.submitForm
- }
- }).then(e => {
- this.loading = false;
- if (e.data.code === 0) {
- this.$message.success(e.data.msg);
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.$message.error('网络错误');
- });
- },
- handleClick(tab, event){
- if(tab.name=='withdrawal-log'){
- this.getWithdrawLog();
- }
- },
- getWithdrawLog(){
- request({
- params: {
- r: 'store/client/finance/withdrawal-log',
- page: this.page,
- withdraw_status: this.searchData.withdraw_status,
- start: this.searchData.start,
- end: this.searchData.end,
- },
- method: 'get',
- }).then(e => {
- this.loading = false;
- if (e.data.code === 0) {
- this.withdrawLogList = e.data.data.list;
- this.pagination = e.data.data.pagination;
- this.pageCount = e.data.data.page_count;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.$message.error('网络错误');
- });
- },
- addStoreBank(){
- this.dialogFormVisible = true;
- },
- postStoreBank(){
- request({
- params: {
- r: 'store/client/finance/edit-store-bank',
- id: getQuery('id')
- },
- method: 'post',
- data: {
- form: this.store_bank_form
- }
- }).then(e => {
- if (e.data.code == 0) {
- this.$message.success(e.data.msg);
- this.dialogFormVisible = false;
- this.loadData();
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.btnLoading = false;
- this.$message.error(e.data.msg);
- });
- },
- handleCurrentChange(val) {
- this.basicForm.select_bank = val;
- this.submitForm.bank_account = val.card_no;
- this.submitForm.bank_name = val.bank;
- this.submitForm.name = val.username;
- },
- handleCurrentChangePay(val) {
- this.basicForm.select_card_id = val.id;
- this.basicForm.select_bank = val;
- },
- deleteRow(index, rows){
- request({
- params: {
- r: 'store/client/finance/del-store-bank',
- id: rows.id
- },
- method: 'get',
- }).then(e => {
- if (e.data.code == 0) {
- this.$message.success(e.data.msg);
- this.loadData();
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.$message.error(e.data.msg);
- });
- },
- updateRow(index, rows){
- request({
- params: {
- r: 'store/client/finance/edit-store-bank',
- id: rows.id
- },
- method: 'get',
- }).then(e => {
- if (e.data.code == 0) {
- this.dialogFormVisible = true;
- this.store_bank_form = e.data.data.store_bank_info;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.$message.error(e.data.msg);
- });
- },
- pageChange(currentPage) {
- this.page = currentPage;
- this.getWithdrawLog();
- },
- search() {
- this.page = 1;
- if (this.date == null) {
- this.date = ''
- }
- this.getWithdrawLog();
- },
- changeTime(e) {
- this.searchData.start = e[0]
- this.searchData.end = e[1]
- },
- coverPic(e) { // 选择图片
- this.submitForm.wechat_qrcode = e[0].url
- },
- delPic(type, index) { // 删除图片
- switch (type) {
- case 'wechat_qrcode':
- this.submitForm.wechat_qrcode = ''
- break;
- default:
- break;
- }
- },
- //汇聚部分
- addStoreBankPay(){
- this.dialogFormVisiblePay = true;
- },
- postStoreBankPay(){
- request({
- params: {
- r: 'store/client/finance/edit-store-bank-pay',
- id: getQuery('id')
- },
- method: 'post',
- data: {
- form: this.store_bank_form_pay
- }
- }).then(e => {
- if (e.data.code == 0) {
- this.dialogFormVisiblePay = false;
- this.dialogFormVisiblePaySms = true;
- this.card_id = e.data.data.card_id;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.btnLoading = false;
- this.$message.error(e.data.msg);
- });
- },
- postStoreBankPaySms(){
- request({
- params: {
- r: 'store/client/finance/sign-contract',
- id: getQuery('id')
- },
- method: 'post',
- data: {
- card_id: this.card_id,
- sms_code: this.sms_code,
- }
- }).then(e => {
- if (e.data.code == 0) {
- this.$message.success(e.data.msg);
- this.dialogFormVisiblePaySms = false;
- this.loadData();
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.btnLoading = false;
- this.$message.error(e.data.msg);
- });
- },
- deleteRowPay(index, rows){
- request({
- params: {
- r: 'store/client/finance/contract-relieve',
- },
- data: {
- card_id: rows.card_id,
- },
- method: 'post',
- }).then(e => {
- if (e.data.code == 0) {
- this.$message.success(e.data.msg);
- this.loadData();
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.$message.error(e.data.msg);
- });
- },
- getSmsCode(index, rows){
- request({
- params: {
- r: 'store/client/finance/get-sms-code',
- },
- data: {
- card_id: rows.card_id,
- },
- method: 'post',
- }).then(e => {
- if (e.data.code == 0) {
- this.dialogFormVisiblePaySms = true;
- this.card_id = rows.card_id;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.$message.error(e.data.msg);
- });
- },
- },
- computed: {
- }
- });
- </script>
- <style>
- .el-tabs__header {
- padding: 0 20px;
- height: 56px;
- line-height: 56px;
- background-color: #fff;
- margin-bottom: 0;
- }
- .title {
- padding: 0px 8px;
- border-left: 5px solid #1479F0;
- background-color: #fff;
- font-size: 18px;
- position: relative;
- left: 32px;
- margin: 20px 0;
- }
- .form-body {
- background-color: #fff;
- padding: 20px 50% 20px 0;
- }
- .button-item {
- padding: 9px 25px;
- margin-bottom: 15px;
- }
- .form-body .item {
- width: 300px;
- margin-bottom: 50px;
- margin-right: 25px;
- }
- .item-img {
- height: 550px;
- padding: 25px 10px;
- border-radius: 30px;
- border: 1px solid #CCCCCC;
- background-color: #fff;
- }
- .item .el-form-item {
- width: 300px;
- margin: 20px auto;
- }
- .left-setting-menu {
- width: 260px;
- }
- .left-setting-menu .el-form-item {
- height: 60px;
- padding-left: 20px;
- display: flex;
- align-items: center;
- margin-bottom: 0;
- cursor: pointer;
- }
- .left-setting-menu .el-form-item .el-form-item__label {
- cursor: pointer;
- }
- .left-setting-menu .el-form-item.active {
- background-color: #F3F5F6;
- border-top-left-radius: 10px;
- width: 105%;
- border-bottom-left-radius: 10px;
- }
- .left-setting-menu .el-form-item .el-form-item__content {
- margin-left: 0 !important
- }
- .no-radius {
- border-top-left-radius: 0 !important;
- }
- .del-btn {
- position: absolute;
- right: -8px;
- top: -8px;
- padding: 4px 4px;
- }
- .reset {
- position: absolute;
- top: 3px;
- left: 90px;
- }
- .app-tip {
- position: absolute;
- right: 24px;
- top: 16px;
- height: 72px;
- line-height: 72px;
- max-width: calc(100% - 78px);
- }
- .app-tip:before {
- content: ' ';
- width: 0;
- height: 0;
- border-color: inherit;
- position: absolute;
- top: -32px;
- right: 100px;
- border-width: 16px;
- border-style: solid;
- }
- .tip-content {
- display: block;
- white-space: nowrap;
- width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- margin: 0 28px;
- font-size: 28px;
- }
- .btn-abs {
- position: absolute;
- top: 12px;
- right: 18px;
- }
- .form-body .app-share {
- padding-top: 12px;
- border-top: 1px solid #e2e2e2;
- margin-top: -20px;
- }
- .form-body .app-share .app-share-bg {
- position: relative;
- width: 310px;
- height: 360px;
- background-repeat: no-repeat;
- background-size: contain;
- background-position: center
- }
- .form-body .app-share .app-share-bg .title {
- width: 160px;
- height: 29px;
- line-height: 1;
- word-break: break-all;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- }
- .form-body .app-share .app-share-bg .pic-image {
- background-repeat: no-repeat;
- background-position: 0 0;
- background-size: cover;
- width: 160px;
- height: 130px;
- }
- .cashier-tabs .el-tabs__header {
- padding: 0;
- height: 45px;
- line-height: 45px;
- /* background-color: #F5F7FA; */
- margin-bottom: 0;
- }
- .cashier-tabs .el-tabs__item {
- height: 43px;
- line-height: 43px;
- }
- .cashier-tabs .el-tabs__content {
- margin-top: 20px;
- }
- .form-body {
- background-color: #fff;
- padding: 20px 50% 20px 0;
- }
- .button-item {
- margin-top: 12px;
- padding: 9px 25px;
- }
- .form-body .item {
- width: 300px;
- margin-bottom: 50px;
- margin-right: 25px;
- }
- .item-img {
- height: 550px;
- padding: 25px 10px;
- border-radius: 30px;
- border: 1px solid #CCCCCC;
- background-color: #fff;
- }
- .item .el-form-item {
- width: 300px;
- margin: 20px auto;
- }
- .left-setting-menu {
- width: 260px;
- }
- .left-setting-menu .el-form-item {
- height: 60px;
- padding-left: 20px;
- display: flex;
- align-items: center;
- margin-bottom: 0;
- cursor: pointer;
- }
- .left-setting-menu .el-form-item .el-form-item__label {
- cursor: pointer;
- }
- .left-setting-menu .el-form-item.active {
- background-color: #F3F5F6;
- border-top-left-radius: 10px;
- width: 105%;
- border-bottom-left-radius: 10px;
- }
- .left-setting-menu .el-form-item .el-form-item__content {
- margin-left: 0 !important
- }
- .no-radius {
- border-top-left-radius: 0 !important;
- }
- .del-btn {
- position: absolute;
- right: -8px;
- top: -8px;
- padding: 4px 4px;
- }
- .reset {
- position: absolute;
- top: 3px;
- left: 90px;
- }
- .app-tip {
- position: absolute;
- right: 24px;
- top: 16px;
- height: 72px;
- line-height: 72px;
- max-width: calc(100% - 78px);
- }
- .app-tip:before {
- content: ' ';
- width: 0;
- height: 0;
- border-color: inherit;
- position: absolute;
- top: -32px;
- right: 100px;
- border-width: 16px;
- border-style: solid;
- }
- .tip-content {
- display: block;
- white-space: nowrap;
- width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- margin: 0 28px;
- font-size: 28px;
- }
- </style>
|