diff --git a/src/router/index.js b/src/router/index.js index 09bd999..cf728e4 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -86,6 +86,15 @@ const routes = [ hideBreadcrumb: true // 首页不显示面包屑 } }, + { + path: '/setPaymentForm', + name: '收款设置', + component: () => import('../views/setPaymentForm.vue'), + meta: { + title: '收款设置', + breadcrumbParent: '编辑医院' // 手动指定父级 + } + }, ] const router = new VueRouter({ diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 7fc98b0..021f2d3 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -83,12 +83,12 @@ - + @@ -366,14 +366,11 @@ 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 + 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); @@ -389,16 +386,6 @@ export default { 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 4ecafd5..0f29366 100644 --- a/src/views/HosInformation.vue +++ b/src/views/HosInformation.vue @@ -496,7 +496,7 @@ - + + + \ 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){