From dee4ddcd6a6e1f4884101ec86b68d262f405c548 Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Thu, 30 Oct 2025 15:38:19 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=B6=E6=AC=BE?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/addPay.vue | 15 +++- src/router/index.js | 17 ++-- src/views/HomeView.vue | 21 ++++- src/views/HosInformation.vue | 43 +++------ src/views/paymentMethod.vue | 209 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 260 insertions(+), 45 deletions(-) create mode 100644 src/views/paymentMethod.vue diff --git a/src/components/addPay.vue b/src/components/addPay.vue index d04ea1b..105df28 100644 --- a/src/components/addPay.vue +++ b/src/components/addPay.vue @@ -145,7 +145,7 @@ export default { // 拼多多授权url pddAuthUrl: { type: String, - default: '' + default: '' }, // 京东授权url jdAuthUrl: { @@ -165,6 +165,9 @@ export default { type: String, default: '' }, + checkAliPay:{ + type: Object, + } }, components: { @@ -234,7 +237,6 @@ export default { { required: true, message: '请输入支付宝账号', trigger: 'blur' } ], } - // localSiteInfo: { ...this.siteInfo } } }, @@ -399,7 +401,8 @@ export default { }) } }, - },watch: { + }, + watch: { visible(newVal) { this.addPayDialogVisible = newVal; }, @@ -408,6 +411,12 @@ export default { this.updateDialogByPayType(); this.resetForm(); // 切换支付方式时重置表单 }, + checkAliPay(newVal){ + if(newVal){ + this.alipayInfo = {...newVal} + console.log(this.alipayInfo,'newVal=====newVal'); + } + } } } diff --git a/src/router/index.js b/src/router/index.js index e6161f5..09bd999 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -78,16 +78,13 @@ const routes = [ } }, { - path: '/super/ranking', - component: () => import( /* webpackChunkName: "Ranking" */ '../views/super/Ranking/Ranking.vue'), - children: [ - { - path: 'checkProfit', - name: '产品毛利润排行', - component: () => import( /* webpackChunkName: "Ranking" */ '../views/super/Ranking/RankBatchList.vue'), - props: {pageTitle:'产品 - 毛利润排行', rank_type: 1, type: 'check_type'} - }, - ] + path: '/paymentMethod', + component: () => import( /* webpackChunkName: "paymentMethod" */ '../views/paymentMethod.vue'), + name: '收款方式', + meta: { + title: '收款管理', + hideBreadcrumb: true // 首页不显示面包屑 + } }, ] diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 8d9eebe..bfb231a 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -88,6 +88,9 @@ + + + @@ -102,6 +105,7 @@ import GuipButton from '@/components/GuipButton.vue'; import GuipSwitch from '@/components/GuipSwitch.vue'; import GuipInput from '@/components/GuipInput.vue'; import { mapState } from 'vuex'; +import PaymentMethod from '@/views/paymentMethod.vue'; export default { data() { @@ -138,7 +142,8 @@ export default { isIndeterminate: false, doctorList: false, allChecked: false, - pageShow:false + pageShow:false, + payList:[] } }, components: { @@ -148,6 +153,8 @@ export default { GuipButton, GuipSwitch, GuipTable, + PaymentMethod + // CustomDropdown }, created() { @@ -163,6 +170,7 @@ export default { store.commit('SET_CUSTOMIZE', false); store.commit('SET_SLIDER_MENU', 'menuData'); this.getInitData() + this.getBindpayList() }, computed: { ...mapState(['menuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 @@ -189,6 +197,17 @@ export default { console.error(error, 'error') }) }, + async getBindpayList() { + await this.$http('POST', '/api/admin/get_pay_list', { + doctor_id: 3, + depart_id: 4 + }).then(response => { + this.payList.push(...response.data[2],...response.data[3]) + console.log(this.payList,response,'this.payList====00000'); + }).catch(error => { + console.error(error, 'error') + }) + }, inputBlur(val) { console.log(val, ''); this.getInitData() diff --git a/src/views/HosInformation.vue b/src/views/HosInformation.vue index c3c639a..4ecafd5 100644 --- a/src/views/HosInformation.vue +++ b/src/views/HosInformation.vue @@ -184,8 +184,8 @@

需在微信商户平台-产品中心开通Native支付

- - 前往绑定 + + 前往添加
@@ -231,8 +231,8 @@

需在支付宝商户平台-产品中心开通Native支付

- - 前往绑定 + + 前往添加
@@ -496,8 +496,7 @@ - + + \ No newline at end of file From dfa306604badabe3ada1cfa7b8fa246a691b00ce Mon Sep 17 00:00:00 2001 From: longchao <588888888@qq.com> Date: Mon, 10 Nov 2025 15:26:03 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=94=AF=E4=BB=98=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/HomeView.vue | 48 ++++++++++++++++++++++++++++++++++----------- src/views/paymentMethod.vue | 16 +++++++-------- 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index bfb231a..7fc98b0 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -88,8 +88,7 @@ - - + @@ -143,6 +142,7 @@ export default { doctorList: false, allChecked: false, pageShow:false, + doctorIds:[], payList:[] } }, @@ -170,15 +170,14 @@ export default { store.commit('SET_CUSTOMIZE', false); store.commit('SET_SLIDER_MENU', 'menuData'); this.getInitData() - this.getBindpayList() }, computed: { ...mapState(['menuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 }, methods: { // 初始化请求 - getInitData() { - this.$http('POST', '/api/admin/doctor_depart_list', { + async getInitData() { + await this.$http('POST', '/api/admin/doctor_depart_list', { name: this.doctorName }).then(response => { if (response.code == 0) { @@ -190,6 +189,14 @@ export default { } }) this.doctorList = list + var doctorIds = [] + for (let index = 0; index < list.length; index++) { + var element = list[index]; + doctorIds.push(element.id); + } + this.doctorIds = doctorIds; + this.getBindpayList(doctorIds) + this.calculateTotalNum() this.pageShow = true } @@ -197,13 +204,13 @@ export default { console.error(error, 'error') }) }, - async getBindpayList() { - await this.$http('POST', '/api/admin/get_pay_list', { - doctor_id: 3, - depart_id: 4 + async getBindpayList(doctorIds) { + var payList = new Object(); + await this.$http('POST', '/api/admin/get_doctors_pay_list', { + doctor_ids: JSON.stringify(doctorIds) }).then(response => { - this.payList.push(...response.data[2],...response.data[3]) - console.log(this.payList,response,'this.payList====00000'); + payList = response.data; + this.payList = payList }).catch(error => { console.error(error, 'error') }) @@ -359,6 +366,25 @@ export default { this.$message.error('操作失败'); }) }, + onSwitchPaymethods(item, index) { + item.status = item.status == 0 ? 1 : 0; + console.log(index, item, '===='); + this.$set(this.doctorList, item) + + this.$http('POST', '/api/admin/set_doctor_status', { + doctor_id:item.id, + status:item.status + }).then(response => { + if (response.code == 0) { + this.$message.success(response.msg); + }else{ + this.$message.error(response.msg); + } + }).catch(error => { + console.error(error, 'error') + this.$message.error('操作失败'); + }) + }, addDoctor() { this.$router.push({ name: '医生信息', diff --git a/src/views/paymentMethod.vue b/src/views/paymentMethod.vue index 8b5769f..ef333e8 100644 --- a/src/views/paymentMethod.vue +++ b/src/views/paymentMethod.vue @@ -22,10 +22,10 @@ - + @@ -104,12 +104,12 @@ export default { }, watch:{ - + list: { deep: true, handler(newVal) { console.log(newVal,'newVal====='); - this.payList = [...newVal]; + this.payList = [...newVal]; this.tableLoading = false; } @@ -122,9 +122,9 @@ export default { this.doctorId =doctor_id; } console.log(this.doctor_id,'=doctor_id==='); - + }, - mounted() { + mounted() { if(this.doctor_id){ this.getBindpayList() } @@ -192,7 +192,7 @@ export default { }, }, - + }; \ No newline at end of file diff --git a/src/views/weChatPayment.vue b/src/views/weChatPayment.vue index 7c92312..4df96ce 100644 --- a/src/views/weChatPayment.vue +++ b/src/views/weChatPayment.vue @@ -157,10 +157,10 @@ export default { ], mch_id: [ { required: true, message: '请输入微信支付商户号', trigger: 'blur' }, - { - pattern: /^\d+$/, - message: '商户号必须为纯数字', - trigger: 'blur' + { + pattern: /^\d+$/, + message: '商户号必须为纯数字', + trigger: 'blur' } ], pkey: [ @@ -188,6 +188,7 @@ export default { // 初始化 this.formData.set('doctor_id', this.$route.query.doctor_id) this.formData.set('depart_id', this.$route.query.depart_id) + this.formData.set('pay_id', this.$route.query.pay_id) console.log('apiclient_cert' in this.payInfo,'apiclient_key'); }, methods: { @@ -215,7 +216,7 @@ export default { this.payInfo.apiclient_key = fileObj; this.formData.set('apiclient_key', fileObj) }, - + saveConfirm() { // 测试-查看有多少参数 // for (let [key, value] of this.formData.entries()) { @@ -242,7 +243,7 @@ export default { }) return false; } - + this.$refs.wxform.validate((valid) => { console.log(valid, 'valid'); if (valid) { @@ -251,7 +252,7 @@ export default { } this.formData.set('doctor_id', this.$route.query.doctor_id) this.formData.set('depart_id', this.$route.query.depart_id) - this.formData.set('type',this.payTypeWeixin)//这个参数 待定 2 微信支付 \ 3 支付宝 + this.formData.set('type',this.payTypeWeixin)//这个参数 待定 2 微信支付 \ 3 支付宝 const that = this; this.$http('POST', '/api/admin/set_pay_method', this.formData).then(response => { if(response.code == 0){ From 1cc7c94fd85ef742eccf7e84fc4d8cf3ef67e26e Mon Sep 17 00:00:00 2001 From: longchao <588888888@qq.com> Date: Mon, 10 Nov 2025 18:29:09 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=94=AF=E4=BB=98=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SetAliPay.vue | 497 +++++++++++++++++++++++++++++++++++++++++++ src/components/addPay.vue | 30 +-- src/views/HosInformation.vue | 30 ++- src/views/paymentMethod.vue | 8 +- 4 files changed, 541 insertions(+), 24 deletions(-) create mode 100644 src/components/SetAliPay.vue diff --git a/src/components/SetAliPay.vue b/src/components/SetAliPay.vue new file mode 100644 index 0000000..58bb022 --- /dev/null +++ b/src/components/SetAliPay.vue @@ -0,0 +1,497 @@ + + + \ No newline at end of file diff --git a/src/components/addPay.vue b/src/components/addPay.vue index 105df28..58bb022 100644 --- a/src/components/addPay.vue +++ b/src/components/addPay.vue @@ -16,7 +16,7 @@

如未购买"快乐帮手"服务或已过期,会跳转到购买服务页面

- + @@ -145,7 +145,7 @@ export default { // 拼多多授权url pddAuthUrl: { type: String, - default: '' + default: '' }, // 京东授权url jdAuthUrl: { @@ -183,7 +183,7 @@ export default { payTypeAlipay: PAY_TYPE_ALIPAY, payTypeJingdong: PAY_TYPE_JINGDONG, payTypePdd: PAY_TYPE_PDD, - + paytypeDesc: { payTypeTaoBao: '淘宝/天猫店铺', payTypeWeixin: '微信收款', @@ -198,15 +198,15 @@ export default { // 添加收款方式弹框 addPayDialogVisible: false, // 控制是否显示取消按钮 - showCancelButton: true, + showCancelButton: true, // 控制是否显示关闭按钮 - showCloseButton: true, + showCloseButton: true, // 添加收款方式弹框标题 addPayTitle: '', - + // 添加收款方式确认按钮文本 addPayconfirmText: '确定', - + // 公司简称 company_short_name: '', // 商户号 @@ -292,7 +292,7 @@ export default { addPayment() { if (this.addPayType == PAY_TYPE_TAOBAO) { window.open(this.taobaoAuthUrl, '_blank'); - + } else if (this.addPayType == PAY_TYPE_WEIXIN) { this.$http('POST', '/agentnew/ajax_add_weixinpay', { company_short_name: this.company_short_name, @@ -304,7 +304,7 @@ export default { if (response.status) { this.init(response.data); this.$Message.success(response.info); - + } else { this.$Message.error(response.info); } @@ -332,7 +332,7 @@ export default { if (response.code == 0) { if (!response.data.auth_url) { this.$Message.success(response.msg); - } else { + } else { window.open(response.data.auth_url, '_blank'); } } else { @@ -346,8 +346,8 @@ export default { } }); if (!falseFlag) return; - - } else if (this.addPayType == PAY_TYPE_PDD) { + + } else if (this.addPayType == PAY_TYPE_PDD) { this.$http('POST', '/agentnew/ajax_add_pddpay', { shop_name: this.pdd_shop_name, }).then(response => { @@ -362,7 +362,7 @@ export default { }).catch(error => { console.error(error, 'error') }) - } else if (this.addPayType == PAY_TYPE_JINGDONG) { + } else if (this.addPayType == PAY_TYPE_JINGDONG) { window.open(this.jdAuthUrl, '_blank'); } console.log('addPayment===走到这里了'); @@ -403,8 +403,8 @@ export default { }, }, watch: { - visible(newVal) { - this.addPayDialogVisible = newVal; + visible(newVal) { + this.addPayDialogVisible = newVal; }, payType(newVal) { this.addPayType = newVal; diff --git a/src/views/HosInformation.vue b/src/views/HosInformation.vue index 0f29366..dfb4c44 100644 --- a/src/views/HosInformation.vue +++ b/src/views/HosInformation.vue @@ -184,7 +184,7 @@

需在微信商户平台-产品中心开通Native支付

- + 前往添加
@@ -496,7 +496,8 @@ - +