Browse Source

管理员后台挂号费缴费相关

master
longchao 4 weeks ago
parent
commit
ba06684c5d
  1. 7
      src/components/GuipSwitch.vue
  2. 2
      src/components/paymentMethod.vue
  3. 6
      src/views/HomeView.vue
  4. 146
      src/views/HosInformation.vue
  5. 2
      src/views/Register.vue
  6. 2
      src/views/elementGroups.vue

7
src/components/GuipSwitch.vue

@ -3,8 +3,7 @@
<div class="switchWrap"> <div class="switchWrap">
<span :class="['switchDesc', { 'fl': float == 'left' }, { 'fr': float == 'right' }]" <span :class="['switchDesc', { 'fl': float == 'left' }, { 'fr': float == 'right' }]"
v-if="activeText || inactiveText"> v-if="activeText || inactiveText">
{{ internalValue === activeValue ? activeText : inactiveText {{ internalValue === activeValue ? activeText : inactiveText}}</span>
}}</span>
<el-switch v-model="internalValue" :active-color="activeColor" :inactive-color="inactiveColor" <el-switch v-model="internalValue" :active-color="activeColor" :inactive-color="inactiveColor"
v-bind="$attrs" :disabled="disabled" :active-value="activeValue" :inactive-value="inactiveValue" v-bind="$attrs" :disabled="disabled" :active-value="activeValue" :inactive-value="inactiveValue"
@ -16,13 +15,14 @@
<template #inactive-icon> <template #inactive-icon>
</template> </template>
</el-switch> </el-switch>
</div> </div>
</el-form-item> </el-form-item>
</template> </template>
<script> <script>
export default { export default {
name: 'GuipSwitchå', name: 'GuipSwitch',
inheritAttrs: false, inheritAttrs: false,
props: { props: {
// modelValue: { type: [Boolean, String, Number], default: undefined }, // modelValue: { type: [Boolean, String, Number], default: undefined },
@ -85,6 +85,7 @@ export default {
watch: { watch: {
value(newVal) { value(newVal) {
this.internalValue = newVal this.internalValue = newVal
console.log(this.internalValue, 88888)
}, },
// modelValue(newVal) { // modelValue(newVal) {
// this.internalValue = newVal // this.internalValue = newVal

2
src/components/paymentMethod.vue

@ -14,7 +14,7 @@
<p>{{ item.num }}</p> <p>{{ item.num }}</p>
</dd> </dd>
</dl> </dl>
<GuipSwitch :modelValue="item.flag" activeText="开启" inactiveText="关闭" @change="onSwitchChange"> <GuipSwitch :value="item.flag" activeText="开启" inactiveText="关闭" @change="onSwitchChange">
</GuipSwitch> </GuipSwitch>
</div> </div>
</div> </div>

6
src/views/HomeView.vue

@ -31,8 +31,8 @@
<el-avatar :src="item.avator" v-if="item.avator"></el-avatar> <el-avatar :src="item.avator" v-if="item.avator"></el-avatar>
<span class="name">{{ item.name }}</span> <span class="name">{{ item.name }}</span>
<span>{{ item.phone }}</span> <span>{{ item.phone }}</span>
<GuipSwitch :modelValue="Boolean(Number(item.status))" @change="onSwitchChange(item, index)"> <GuipSwitch :value="Boolean(Number(item.status))" @change="onSwitchChange(item, index)" :active-value="true" :inactive-value="false"></GuipSwitch>
</GuipSwitch>
<GuipButton type="text" @click="editDoctor(item, index)">编辑</GuipButton> <GuipButton type="text" @click="editDoctor(item, index)">编辑</GuipButton>
</div> </div>
<div class="right"> <div class="right">
@ -77,7 +77,7 @@
<el-table-column prop="create" label="时间" min-width="250"> </el-table-column> <el-table-column prop="create" label="时间" min-width="250"> </el-table-column>
<el-table-column prop="stock" fixed="right" min-width="110"> <el-table-column prop="stock" fixed="right" min-width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.status" active-value="1" inactive-value="0" @change="onSwitchChange1(scope.row)"></GuipSwitch> <GuipSwitch :value="scope.row.status" active-value="1" inactive-value="0" @change="onSwitchChange1(scope.row)"></GuipSwitch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" min-width="120px"> <el-table-column label="操作" fixed="right" min-width="120px">

146
src/views/HosInformation.vue

@ -55,7 +55,7 @@
<GuipFormItem column="column" class="mb24" v-if="departIsFixed != -1"> <GuipFormItem column="column" class="mb24" v-if="departIsFixed != -1">
<div slot="formLeft" class="form-top-icon">医保定点</div> <div slot="formLeft" class="form-top-icon">医保定点</div>
<div class="flex" slot="formDom" style="padding: 9px 0px;"> <div class="flex" slot="formDom" style="padding: 9px 0px;">
<GuipSwitch :model-value="departIsFixed" @change="onSwitchChange" activeText="医保定点" <GuipSwitch :value="departIsFixed" @change="onSwitchChange" activeText="医保定点"
inactiveText="非医保定点" :active-value="true" :inactive-value="false"> inactiveText="非医保定点" :active-value="true" :inactive-value="false">
</GuipSwitch> </GuipSwitch>
</div> </div>
@ -153,8 +153,7 @@
<el-form> <el-form>
<div class="mb32 flex gap12"> <div class="mb32 flex gap12">
<span class="littleTitle">线上收款</span> <span class="littleTitle">线上收款</span>
<GuipSwitch v-model="onLinePay" :active-value="1" :inactive-value="0" @change="onLineChange"> <GuipSwitch :value="onLinePay" :active-value="1" :inactive-value="0" @change="onLineChange"></GuipSwitch>
</GuipSwitch>
<span v-if="!onLinePay" class="tipInfo">未绑定微信收款方式无法开启线上收款</span> <span v-if="!onLinePay" class="tipInfo">未绑定微信收款方式无法开启线上收款</span>
<span v-if="!onLinePay == 1"> {{ onLinePay == 1 ? '开启' : '' }}</span> <span v-if="!onLinePay == 1"> {{ onLinePay == 1 ? '开启' : '' }}</span>
</div> </div>
@ -260,10 +259,8 @@
<el-form> <el-form>
<div class="mb32 flex gap12"> <div class="mb32 flex gap12">
<span class="littleTitle">收挂号费</span> <span class="littleTitle">收挂号费</span>
<GuipSwitch v-model="onRegister" :active-value="1" :inactive-value="2" @change="onLineChange"> <GuipSwitch :value="hasVisitFee" :active-value="1" :inactive-value="0" @change="onVisitFeeChange"></GuipSwitch>
</GuipSwitch> <span class="desc">患者在小程序预约时{{hasVisitFee == 1?'':'不'}}需缴纳挂号费</span>
<span> {{ onRegister == 1 ? '' : '关闭' }}</span>
<span v-if="onRegister == 1" class="desc">开启患者在小程序预约时需缴纳挂号费</span>
</div> </div>
<div class="bidwrap-item"> <div class="bidwrap-item">
<div class="biditemMast mb12 flex-between"> <div class="biditemMast mb12 flex-between">
@ -273,7 +270,7 @@
<p class="desc" v-if="registerMoney">{{registerMoney}}/</p> <p class="desc" v-if="registerMoney">{{registerMoney}}/</p>
</div> </div>
</div> </div>
<div class="flex" v-if="payinfo.apiv3"> <div class="flex" v-if="registerMoney">
<span :class="'yesSet'">已设置</span> <span :class="'yesSet'">已设置</span>
<GuipButton type="system" :btnstyle="{ width: '126px', height: '38px' }" <GuipButton type="system" :btnstyle="{ width: '126px', height: '38px' }"
@click="showDialog('register')">修改</GuipButton> @click="showDialog('register')">修改</GuipButton>
@ -289,10 +286,10 @@
<div class="bidwrap-item-top flex"> <div class="bidwrap-item-top flex">
<div class="top-right column"> <div class="top-right column">
<p>免挂号费规则</p> <p>免挂号费规则</p>
<p class="desc">患者5天内再次就诊患者有剩余治疗项目免收挂号费</p> <p class="desc" v-if="againVisitFreeDays && hasAgainVisitFreeDays">患者{{againVisitFreeDays}}天内再次就诊患者有剩余治疗项目免收挂号费</p>
</div> </div>
</div> </div>
<div class="flex" v-if="payinfo.apiv3"> <div class="flex" v-if="hasFreeRegisterRule">
<span :class="'yesSet'">已设置</span> <span :class="'yesSet'">已设置</span>
<GuipButton type="system" :btnstyle="{ width: '126px', height: '38px' }" <GuipButton type="system" :btnstyle="{ width: '126px', height: '38px' }"
@click="showDialog('registerRule')">修改</GuipButton> @click="showDialog('registerRule')">修改</GuipButton>
@ -377,7 +374,7 @@
<el-table-column prop="need_countdown" label="倒计时弹窗开关" min-width="125"> <el-table-column prop="need_countdown" label="倒计时弹窗开关" min-width="125">
<template slot-scope="scope"> <template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.need_countdown" active-value="1" inactive-value="0" <GuipSwitch :value="scope.row.need_countdown" active-value="1" inactive-value="0"
@change="onSwitchChange3(scope.row)"> @change="onSwitchChange3(scope.row)">
</GuipSwitch> </GuipSwitch>
</template> </template>
@ -385,7 +382,7 @@
<el-table-column prop="status" label="状态" min-width="125"> <el-table-column prop="status" label="状态" min-width="125">
<template slot-scope="scope"> <template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.status" active-value="1" inactive-value="0" <GuipSwitch :value="scope.row.status" active-value="1" inactive-value="0"
@change="onSwitchChange1(scope.row)"> @change="onSwitchChange1(scope.row)">
</GuipSwitch> </GuipSwitch>
</template> </template>
@ -440,7 +437,7 @@
<el-table-column prop="create_time" label="添加时间" min-width="225"></el-table-column> <el-table-column prop="create_time" label="添加时间" min-width="225"></el-table-column>
<el-table-column prop="status" label="状态" min-width="125"> <el-table-column prop="status" label="状态" min-width="125">
<template slot-scope="scope"> <template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.status" active-value="1" inactive-value="0" <GuipSwitch :value="scope.row.status" active-value="1" inactive-value="0"
@change="onSwitchChange2(scope.row)"> @change="onSwitchChange2(scope.row)">
</GuipSwitch> </GuipSwitch>
</template> </template>
@ -461,30 +458,28 @@
</div> </div>
<GuipDialog :dialogVisible="registrationVisible" title="设置挂号费金额" :show-close-button="false" width="599px" <GuipDialog :dialogVisible="registrationVisible" title="设置挂号费金额" :show-close-button="false" width="599px"
:show-cancel-button="true" @confirm="handleRegisterConfirm('registerMoney')" @cancel="handleregisterCancel" > :show-cancel-button="true" @confirm="handleRegisterConfirm('registerMoney')" @cancel="handleregisterCancel" ref="visitFee">
<el-form> <el-form>
<GuipInput v-model="registerMoney" type="number" <GuipInput v-model="registerMoney" placeholder="请输入" unit="元/人"></GuipInput>
placeholder="请输入" unit="元/人"></GuipInput>
</el-form> </el-form>
</GuipDialog> </GuipDialog>
<!-- freeRegVisible -->
<GuipDialog :dialogVisible="freeRegVisible" title="免挂号费规则" :show-close-button="false" width="599px" <GuipDialog :dialogVisible="freeRegVisible" title="免挂号费规则" :show-close-button="false" width="599px"
:show-cancel-button="true" @confirm="handleRegisterConfirm('freeRegVisible')" @cancel="handleregisterCancel" > :show-cancel-button="true" @confirm="handleRegisterConfirm('freeRegVisible')" @cancel="handleregisterCancel" >
<p class="freeDesc">若勾选多个规则满足其一即免挂号费</p> <p class="freeDesc">若勾选多个规则满足其一即免挂号费</p>
<el-form class="freeWrap"> <el-form class="freeWrap">
<div class="flex gap8 mb24 mt24"> <div class="flex gap8 mb24 mt24">
<el-checkbox v-model="checked1"></el-checkbox> <el-checkbox v-model="hasAgainVisitFreeDays" :true-label="1" :false-label="0"></el-checkbox>
患者 患者{{hasAgainVisitFreeDays}}
<GuipInput v-model="registerDays" type="number" width="92px" <GuipInput v-model="againVisitFreeDays" type="number" width="92px" placeholder="请输入"></GuipInput>天内再次就诊免挂号费
placeholder="请输入"></GuipInput>天内再次就诊免挂号费
</div> </div>
<p class="flex gap8"> <p class="flex gap8">
<el-checkbox v-model="checked2"></el-checkbox> <el-checkbox v-model="hasRemainVisitFree" :true-label="1" :false-label="0"></el-checkbox>
患者有剩余治疗项目免挂号费 患者有剩余治疗项目免挂号费
</p> </p>
</el-form> </el-form>
</GuipDialog> </GuipDialog>
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762" <GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762"
:show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" @close="handleClose" :show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" @close="handleClose"
@dialogVisibleChange="dialogVisibleChange"> @dialogVisibleChange="dialogVisibleChange">
@ -709,16 +704,20 @@ export default {
selectWxpay:null, selectWxpay:null,
selectAlipay: null, selectAlipay: null,
onLinePay:null, onLinePay:null,
onRegister:1,
addPayType: -1, addPayType: -1,
isShowAddPay: false, isShowAddPay: false,
isExistSelfSupplys: false, isExistSelfSupplys: false,
payinfo: [], payinfo: [],
registerMoney:'',// registerMoney:'',//
registerDays:5, registerDays:5,
freeRegVisible:true, freeRegVisible:false,
registrationVisible:false, registrationVisible:false,
hasVisitFee:null,
paySwitch:null,
hasFreeRegisterRule:false,
hasAgainVisitFreeDays:0,
againVisitFreeDays:0,
hasRemainVisitFree:0,
} }
}, },
created() { created() {
@ -774,15 +773,39 @@ export default {
this.freeRegVisible = true; this.freeRegVisible = true;
} }
}, },
onLineChange() { async onVisitFeeChange(e) {
if(this.selectWxpay){ this.hasVisitFee = e
await this.$http('POST', '/api/admin/set_has_visit_fee', {
has_visit_fee: this.hasVisitFee,
doctor_id: this.doctor_id,
depart_id: this.depart_id
}).then(response => {
const { code } = response
const msg = this.hasVisitFee === 1 ? '已开启' : '已关闭'
const type = code === 0 ? 'success' : 'error';
this.$positionMessage({
type: type,
message: msg+'收挂号费',
target: this.$refs['wxPayRef'],
position: 'bottom'
})
}).catch(error => {
console.error(error, 'error')
})
},
onLineChange(e) {
this.onLinePay
this.onLinePay = e
if(!this.selectWxpay){
this.$positionMessage({ this.$positionMessage({
type: 'error', type: 'error',
message: '未绑定', message: '请先绑定微信支付',
target: this.$refs['wxPayRef'], // DOM target: this.$refs['wxPayRef'],
position: 'bottom' position: 'bottom'
}) })
} }
console.log(this.onLinePay, '====-0000'); console.log(this.onLinePay, '====-0000');
}, },
// //
@ -859,30 +882,61 @@ export default {
this.registrationVisible = false; this.registrationVisible = false;
}, },
handleRegisterConfirm(type){ handleRegisterConfirm(type){
// freeRegVisible var params = {}
const params = { params.doctor_id = this.doctor_id
uid: this.$route.query.uid, params.depart_id = this.depart_id
}
if(type == 'freeRegVisible'){ if(type == 'freeRegVisible'){
params.registerMoney = this.registerMoney.trim() params.has_again_visit_free_days = parseInt(this.hasAgainVisitFreeDays) ? 1 : 0
this.$http('POST', '/agentnew/ajax_get_pay_list', { params.again_visit_free_days = parseInt(this.againVisitFreeDays)
if(params.again_visit_free_days < 0){
this.$positionMessage({
type: 'error',
message: '请输入正确的天数',
target: '#siteMessage7',
})
return;
}
params.has_remain_visit_free = parseInt(this.hasRemainVisitFree) ? 1 : 0
this.$http('POST', '/api/admin/set_visit_free_rules', {
...params ...params
}).then(response => { }).then(response => {
this.$nextTick(() => { this.$nextTick(() => {
console.log(response); console.log(response);
this.registrationVisible = false; this.freeRegVisible = false;
}) })
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })
}else{ }else{
// params.checked1 = 1; params.price = parseInt(this.registerMoney)
// params.checked1 = 1; if(!params.price || params.price <= 0) {
this.$http('POST', '/agentnew/ajax_get_pay_list', { this.$positionMessage({
type: 'error',
message: '请输入正确的金额',
target: '#siteMessage7',
position: 'top',
})
return;
}
this.$http('POST', '/api/admin/set_visit_price', {
...params ...params
}).then(response => { }).then(response => {
this.$nextTick(() => { this.$nextTick(() => {
console.log(response); if(response.code !== 0) {
this.$positionMessage({
type: 'error',
message: response.msg,
target: '#siteMessage7',
})
}else{
this.$positionMessage({
type: 'success',
message: '设置成功',
target: '#siteMessage7',
})
}
this.registrationVisible = false; this.registrationVisible = false;
}) })
}).catch(error => { }).catch(error => {
@ -982,6 +1036,15 @@ export default {
} }
this.departType = (response.data.type || response.data.type === 0 || response.data.type === "0") ? [Number(response.data.type)] : [] this.departType = (response.data.type || response.data.type === 0 || response.data.type === "0") ? [Number(response.data.type)] : []
this.departIsFixed = response.data.is_fixed == "1" ? true : false this.departIsFixed = response.data.is_fixed == "1" ? true : false
this.paySwitch = response.data.pay_switch
this.hasVisitFee = response.data.has_visit_fee
this.registerMoney = response.data.visit_price
this.hasAgainVisitFreeDays = response.data.has_again_visit_free_days
this.againVisitFreeDays = response.data.again_visit_free_days
this.hasRemainVisitFree = response.data.has_remain_visit_free
if((this.hasAgainVisitFreeDays && this.againVisitFreeDays) || this.hasRemainVisitFree) this.hasFreeRegisterRule = true
this.getAreaData(this.form.province) this.getAreaData(this.form.province)
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
@ -1320,7 +1383,6 @@ export default {
}) })
}, },
ChangeTime(type) { ChangeTime(type) {
console.log(this.form.morning_worktime, type, '==='); console.log(this.form.morning_worktime, type, '===');
}, },
btnClick() { btnClick() {

2
src/views/Register.vue

@ -456,7 +456,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="stock" fixed="right" label="上首页" min-width="160"> <el-table-column prop="stock" fixed="right" label="上首页" min-width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.homeFlag" @change="onSwitchChange(scope.row)"> <GuipSwitch :value="scope.row.homeFlag" @change="onSwitchChange(scope.row)">
</GuipSwitch> </GuipSwitch>
</template> </template>
</el-table-column> </el-table-column>

2
src/views/elementGroups.vue

@ -269,7 +269,7 @@
<div class="ele-item"> <div class="ele-item">
<label for="">开关L</label> <label for="">开关L</label>
<GuipSwitch :modelValue="switchValue" activeText="开启" inactiveText="关闭" @change="onSwitchChange"> <GuipSwitch :value="switchValue" activeText="开启" inactiveText="关闭" @change="onSwitchChange">
</GuipSwitch> </GuipSwitch>
</div> </div>
<el-button type="primary" @click="submitForm">Submit</el-button> <el-button type="primary" @click="submitForm">Submit</el-button>

Loading…
Cancel
Save