diff --git a/package-lock.json b/package-lock.json index f11823a..7dadd7d 100755 --- a/package-lock.json +++ b/package-lock.json @@ -94,6 +94,7 @@ "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.26.10.tgz", "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", "dev": true, + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.2", @@ -2816,6 +2817,7 @@ "resolved": "https://registry.npmmirror.com/@vue/cli-service/-/cli-service-5.0.8.tgz", "integrity": "sha512-nV7tYQLe7YsTtzFrfOMIHc5N2hp5lHG2rpYr0aNja9rNljdgcPZLyQRb2YRivTHqTv7lI962UXFURcpStHgyFw==", "dev": true, + "peer": true, "dependencies": { "@babel/helper-compilation-targets": "^7.12.16", "@soda/friendly-errors-webpack-plugin": "^1.8.0", @@ -3313,6 +3315,7 @@ "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.1.tgz", "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -3355,6 +3358,7 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -3642,6 +3646,7 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -4032,6 +4037,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001688", "electron-to-chromium": "^1.5.73", @@ -4759,6 +4765,7 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -5597,6 +5604,7 @@ "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, + "peer": true, "dependencies": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.3", @@ -5784,6 +5792,7 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -7997,6 +8006,7 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -8728,6 +8738,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", @@ -10775,6 +10786,7 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -11144,6 +11156,7 @@ "resolved": "https://registry.npmmirror.com/vue/-/vue-2.7.16.tgz", "integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==", "deprecated": "Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.", + "peer": true, "dependencies": { "@vue/compiler-sfc": "2.7.16", "csstype": "^3.1.0" @@ -11379,6 +11392,7 @@ "resolved": "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz", "integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==", "dev": true, + "peer": true, "dependencies": { "de-indent": "^1.0.2", "he": "^1.2.0" @@ -11440,6 +11454,7 @@ "resolved": "https://registry.npmmirror.com/webpack/-/webpack-5.99.5.tgz", "integrity": "sha512-q+vHBa6H9qwBLUlHL4Y7L0L1/LlyBKZtS9FHNCQmtayxjI5RKC9yD8gpvLeqGv5lCQp1Re04yi0MF40pf30Pvg==", "dev": true, + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", @@ -11570,6 +11585,7 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -11682,6 +11698,7 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -11770,6 +11787,7 @@ "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true, + "peer": true, "engines": { "node": ">=10.13.0" } @@ -11785,6 +11803,7 @@ "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", diff --git a/src/components/SetAliPay.vue b/src/components/SetAliPay.vue new file mode 100644 index 0000000..1f21255 --- /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 d04ea1b..58bb022 100644 --- a/src/components/addPay.vue +++ b/src/components/addPay.vue @@ -16,7 +16,7 @@

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

- + @@ -165,6 +165,9 @@ export default { type: String, default: '' }, + checkAliPay:{ + type: Object, + } }, components: { @@ -180,7 +183,7 @@ export default { payTypeAlipay: PAY_TYPE_ALIPAY, payTypeJingdong: PAY_TYPE_JINGDONG, payTypePdd: PAY_TYPE_PDD, - + paytypeDesc: { payTypeTaoBao: '淘宝/天猫店铺', payTypeWeixin: '微信收款', @@ -195,15 +198,15 @@ export default { // 添加收款方式弹框 addPayDialogVisible: false, // 控制是否显示取消按钮 - showCancelButton: true, + showCancelButton: true, // 控制是否显示关闭按钮 - showCloseButton: true, + showCloseButton: true, // 添加收款方式弹框标题 addPayTitle: '', - + // 添加收款方式确认按钮文本 addPayconfirmText: '确定', - + // 公司简称 company_short_name: '', // 商户号 @@ -234,7 +237,6 @@ export default { { required: true, message: '请输入支付宝账号', trigger: 'blur' } ], } - // localSiteInfo: { ...this.siteInfo } } }, @@ -290,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, @@ -302,7 +304,7 @@ export default { if (response.status) { this.init(response.data); this.$Message.success(response.info); - + } else { this.$Message.error(response.info); } @@ -330,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 { @@ -344,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 => { @@ -360,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===走到这里了'); @@ -399,15 +401,22 @@ export default { }) } }, - },watch: { - visible(newVal) { - this.addPayDialogVisible = newVal; + }, + watch: { + visible(newVal) { + this.addPayDialogVisible = newVal; }, payType(newVal) { this.addPayType = newVal; 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..cf728e4 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -78,16 +78,22 @@ 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 // 首页不显示面包屑 + } + }, + { + path: '/setPaymentForm', + name: '收款设置', + component: () => import('../views/setPaymentForm.vue'), + meta: { + title: '收款设置', + breadcrumbParent: '编辑医院' // 手动指定父级 + } }, ] diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 8d9eebe..021f2d3 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -83,11 +83,13 @@ + + @@ -102,6 +104,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 +141,9 @@ export default { isIndeterminate: false, doctorList: false, allChecked: false, - pageShow:false + pageShow:false, + doctorIds:[], + payList:[] } }, components: { @@ -148,6 +153,8 @@ export default { GuipButton, GuipSwitch, GuipTable, + PaymentMethod + // CustomDropdown }, created() { @@ -169,8 +176,8 @@ export default { }, 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) { @@ -182,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 } @@ -189,6 +204,17 @@ export default { console.error(error, 'error') }) }, + async getBindpayList(doctorIds) { + var payList = new Object(); + await this.$http('POST', '/api/admin/get_doctors_pay_list', { + doctor_ids: JSON.stringify(doctorIds) + }).then(response => { + payList = response.data; + this.payList = payList + }).catch(error => { + console.error(error, 'error') + }) + }, inputBlur(val) { console.log(val, ''); this.getInitData() @@ -340,20 +366,26 @@ export default { this.$message.error('操作失败'); }) }, + updatePayStatus(item) { + this.$http('POST', '/api/admin/update_pay_method_status', { + doctor_id:item.doctor_id, + pay_id:item.id, + status:item.status == '1' ? 1 : 0 + }).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: '医生信息', }) - // this.$router.push({ - // name: '医生信息', - // // query: { - // // doctorId: 123, - // // from: 'home' - // // } - // }) - - // 生成的URL:/doctorInformation?doctorId=123&from=home - }, addHospital(item) { this.$router.push({ diff --git a/src/views/HosInformation.vue b/src/views/HosInformation.vue index 6272813..41c71bf 100644 --- a/src/views/HosInformation.vue +++ b/src/views/HosInformation.vue @@ -176,8 +176,8 @@

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

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

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

- - 前往绑定 + + 前往添加
@@ -735,9 +735,8 @@ - + + \ No newline at end of file diff --git a/src/views/setPaymentForm.vue b/src/views/setPaymentForm.vue new file mode 100644 index 0000000..b44c149 --- /dev/null +++ b/src/views/setPaymentForm.vue @@ -0,0 +1,439 @@ + + + + + \ 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){