diff --git a/src/components/addPay.vue b/src/components/addPay.vue index ccfce4e..d04ea1b 100644 --- a/src/components/addPay.vue +++ b/src/components/addPay.vue @@ -67,7 +67,7 @@ 仅支持已签约 “当面付” 功能的公司支付宝 指南 - + @@ -157,6 +157,15 @@ export default { type: Boolean, default: false }, + depart_id:{ + type: String, + default: '' + }, + doctor_id:{ + type: String, + default: '' + }, + }, components: { GuipInput, @@ -204,7 +213,7 @@ export default { // 公众号APPID appid: '', // 支付宝账号 - alipay_account: '', + // alipay_account: '', // 代收款 收款账号 receive_payment_account: '', // 代收款 收款人姓名 @@ -215,14 +224,14 @@ export default { pdd_shop_name: '', alipayInfo:{ company_short_name: '', - alipay_account:'' + appid:'' }, alipayRules:{ company_short_name: [ { required: true, message: '请输入公司简称', trigger: 'blur' } ], - alipay_account: [ - { required: true, message: '请输入公众号APPID', trigger: 'blur' } + appid: [ + { required: true, message: '请输入支付宝账号', trigger: 'blur' } ], } @@ -262,7 +271,6 @@ export default { this.mch_id = ''; this.apiv2 = ''; this.appid = ''; - this.alipay_account = ''; this.receive_payment_account = ''; this.receive_payment_name = ''; this.pdd_shop_name = ''; @@ -305,29 +313,29 @@ export default { } else if (this.addPayType == PAY_TYPE_ALIPAY) { //支付宝 let falseFlag = false; + // console.log(this.doctor_id,this.depart_id,'depart_id'); this.$refs.alipayForm.validate((valid) => { console.log(valid,'valid==='); if (valid) { falseFlag = true; - this.$http('POST', '/agentnew/ajax_add_alipay', { - company_short_name: this.alipayRules.company_short_name, - alipay_account: this.alipayRules.alipay_account, - is_pay_public: this.isPayPublic, - // receive_payment_account: this.receive_payment_account, - // receive_payment_name: this.receive_payment_name + this.$http('POST', '/api/admin/set_pay_method', { + doctor_id:this.doctor_id, + depart_id:this.depart_id, + type:this.payTypeAlipay, + company_short_name: this.alipayInfo.company_short_name, + appid: this.alipayInfo.appid, + // pay_id:1 + // is_pay_public: this.isPayPublic, }).then(response => { - this.$nextTick(() => { - if (response.status) { - this.init(response.data.payid); - if (this.isPayPublic == 1) { - this.$Message.success(response.info); + if (response.code == 0) { + if (!response.data.auth_url) { + this.$Message.success(response.msg); } else { - // window.open(response.data.authurl, '_blank'); + window.open(response.data.auth_url, '_blank'); } } else { - this.$Message.error(response.info); + this.$Message.error(response.msg); } - }) }).catch(error => { console.error(error, 'error') }) diff --git a/src/views/HosInformation.vue b/src/views/HosInformation.vue index a555795..c3c639a 100644 --- a/src/views/HosInformation.vue +++ b/src/views/HosInformation.vue @@ -153,7 +153,7 @@ 线上收款 - + 未绑定微信收款方式,无法开启线上收款 {{ onLinePay == 1 ? '开启' : '' }} @@ -170,8 +170,8 @@ :options_null="!wxpayList.length" displayKey="name" valueKey="payid" @change="changeSelectWeixin"> - {{ - selectWxpay.short_name }} {{ selectWxpay.account }} + {{ + selectWxpay.company_short_name }} {{ selectWxpay.appid }} 暂无收款账号,稍后配置 未绑定微信收款 @@ -192,11 +192,11 @@ - {{ item.short_name }} - {{ item.account }} + {{ item.company_short_name }} + {{ item.appid }} - @@ -218,8 +218,8 @@ - {{ - selectAlipay.short_name }} {{ selectAlipay.account }} + {{ + selectAlipay.company_short_name }} {{ selectAlipay.appid }} 非必须绑定项 未绑定支付宝收款 @@ -240,11 +240,11 @@ - {{ item.short_name }} - {{ item.account }} + {{ item.company_short_name }} + {{ item.appid }} - @@ -497,7 +497,7 @@ + :isExistSelfSupplys="isExistSelfSupplys" :doctor_id="doctor_id" :depart_id="depart_id">
{{ item.short_name }}
{{ item.account }}
{{ item.company_short_name }}
{{ item.appid }}