|
|
@ -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() { |
|
|
|