|
|
|
@ -153,7 +153,7 @@ |
|
|
|
<el-form> |
|
|
|
<div class="mb32 flex gap12"> |
|
|
|
<span class="littleTitle">线上收款</span> |
|
|
|
<GuipSwitch :value="onLinePay" ref="hasOnlinePayRef" :active-value="1" :inactive-value="0" :disabled="selectWxpay?.short_name" @change="onLineChange"></GuipSwitch> |
|
|
|
<GuipSwitch :value="onLinePay" ref="hasOnlinePayRef" :active-value="1" :inactive-value="0" :disabled="!wxpayList.length" @change="onLineChange"></GuipSwitch> |
|
|
|
<span v-if="!onLinePay" class="tipInfo">未绑定微信收款方式,无法开启线上收款</span> |
|
|
|
<span v-if="!onLinePay == 1"> {{ onLinePay == 1 ? '开启' : '' }}</span> |
|
|
|
</div> |
|
|
|
@ -196,8 +196,8 @@ |
|
|
|
<p>{{ item.appid }}</p> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<!-- <img v-if="selectWxpay && selectWxpay.payid == item.payid" |
|
|
|
src="@/assets/drop-selected.svg" alt=""> --> |
|
|
|
<img v-if="item.is_bind" |
|
|
|
src="@/assets/drop-selected.svg" alt=""> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -244,7 +244,7 @@ |
|
|
|
<p>{{ item.appid }}</p> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<img v-if="selectAlipay && selectAlipay.payid == item.payid" |
|
|
|
<img v-if="item.is_bind" |
|
|
|
src="@/assets/drop-selected.svg" alt=""> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -515,8 +515,6 @@ import GuipDialog from '@/components/GuipDialog.vue'; |
|
|
|
//import GuipSelectFilter from '@/components/GuipSelectFilter.vue'; |
|
|
|
import CustomDropdown from '@/components/CustomDropdown.vue'; |
|
|
|
import addPay from '@/components/addPay.vue'; |
|
|
|
|
|
|
|
|
|
|
|
import { mapState } from 'vuex'; |
|
|
|
import { Object } from 'core-js'; |
|
|
|
const PAY_TYPE_WEIXIN = 2; // 微信 |
|
|
|
@ -539,14 +537,9 @@ export default { |
|
|
|
GuipTextarea, |
|
|
|
GroupFormBtns, |
|
|
|
addPay, |
|
|
|
|
|
|
|
// GuipSelectFilter, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
checked1:false, |
|
|
|
checked2:false, |
|
|
|
doctorId: '', |
|
|
|
depart_id: false, |
|
|
|
doctor_id: false, |
|
|
|
dialogType: '1', |
|
|
|
@ -625,7 +618,6 @@ export default { |
|
|
|
], |
|
|
|
time1: '', |
|
|
|
time2: '', |
|
|
|
checkList: ['医生名片(基础功能不可取消)'], |
|
|
|
fileList: [ |
|
|
|
{ name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' } |
|
|
|
], |
|
|
|
@ -681,22 +673,11 @@ export default { |
|
|
|
domain_set: '', |
|
|
|
domain_source: '平台免费域名', |
|
|
|
}, |
|
|
|
siteForm2: { |
|
|
|
isApprove: '', |
|
|
|
phone: '' |
|
|
|
}, |
|
|
|
siteFormrules1: { |
|
|
|
domain_source: [ |
|
|
|
{ required: true, message: '请输入站点简称', trigger: 'blur' } |
|
|
|
] |
|
|
|
}, |
|
|
|
// hosipitalList:[] |
|
|
|
hosipitalList: [ |
|
|
|
{ label: '选项1', value: '1' }, |
|
|
|
{ label: '选项2', value: '2' }, |
|
|
|
{ label: '选项3', value: '3' }, |
|
|
|
// 更多选项... |
|
|
|
], |
|
|
|
wxpayList:[], |
|
|
|
alipayList:[], |
|
|
|
payTypeWeixin: PAY_TYPE_WEIXIN, |
|
|
|
@ -775,28 +756,31 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
async getBindpayList() { |
|
|
|
await this.$http('POST', '/api/admin/get_bind_pay_list', { |
|
|
|
await this.$http('POST', '/api/admin/get_pay_list', { |
|
|
|
doctor_id: this.doctor_id, |
|
|
|
depart_id: this.depart_id |
|
|
|
}).then(response => { |
|
|
|
// 1.获取2种收款列表 |
|
|
|
if ( |
|
|
|
response.data && |
|
|
|
response.data && |
|
|
|
response.data[this.payTypeWeixin] |
|
|
|
// &&response.data[this.payTypeWeixin].length > 0 |
|
|
|
&&response.data[this.payTypeWeixin].length > 0 |
|
|
|
) { |
|
|
|
this.wxpayList = Array(response.data[this.payTypeWeixin]) |
|
|
|
this.wxpayList =response.data[this.payTypeWeixin] |
|
|
|
this.selectWxpay = this.wxpayList.filter(item => item.is_bind)[0]; |
|
|
|
console.log(this.selectWxpay,'this.selectWxpay'); |
|
|
|
}else{ |
|
|
|
this.selectWxpay = null; |
|
|
|
} |
|
|
|
if ( |
|
|
|
response.data && |
|
|
|
response.data && |
|
|
|
response.data[this.payTypeAlipay] |
|
|
|
// &&response.data[this.payTypeAlipay].length > 0 |
|
|
|
&&response.data[this.payTypeAlipay].length > 0 |
|
|
|
) { |
|
|
|
this.alipayList = Array(response.data[this.payTypeAlipay]) |
|
|
|
this.alipayList = response.data[this.payTypeAlipay] |
|
|
|
this.selectAlipay = this.alipayList.filter(item => item.is_bind)[0]; |
|
|
|
}else{ |
|
|
|
this.selectAlipay = null; |
|
|
|
} |
|
|
|
console.log( this.wxpayList, this.alipayList,'==='); |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
@ -850,9 +834,9 @@ export default { |
|
|
|
// this.selectWxpay = null |
|
|
|
// return true |
|
|
|
// } |
|
|
|
|
|
|
|
// this.bindWxpayId = item.payid; |
|
|
|
this.selectWxpay = item; |
|
|
|
this.bindPayMethod(item.id) |
|
|
|
}, |
|
|
|
changeSelectAlipay(item) { |
|
|
|
// if(this.bindAlipayId === item.payid){ |
|
|
|
@ -862,6 +846,27 @@ export default { |
|
|
|
// } |
|
|
|
// this.bindAlipayId = item.payid; |
|
|
|
this.selectAlipay = item; |
|
|
|
this.bindPayMethod(item.id) |
|
|
|
}, |
|
|
|
|
|
|
|
async bindPayMethod(id){ |
|
|
|
await this.$http('POST', '/api/admin/bind_pay_method', { |
|
|
|
pay_id: id, |
|
|
|
doctor_id: this.doctor_id, |
|
|
|
depart_id: this.depart_id |
|
|
|
}).then(response => { |
|
|
|
const { code } = response; |
|
|
|
if(code == 0){ |
|
|
|
this.$Message.success(response.msg || '绑定成功'); |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.$Message.error(response.msg || '绑定失败'); |
|
|
|
} |
|
|
|
this.getBindpayList() |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
goBindPay(type) { |
|
|
|
this.addPayType = type; |
|
|
|
@ -1382,45 +1387,6 @@ export default { |
|
|
|
ChangeTime(type) { |
|
|
|
console.log(this.form.morning_worktime, type, '==='); |
|
|
|
}, |
|
|
|
btnClick() { |
|
|
|
}, |
|
|
|
handleClear(value) { |
|
|
|
// this.handleInput('') |
|
|
|
console.log(value, 'value===qinghcu'); |
|
|
|
}, |
|
|
|
handleRemove(file, fileList) { |
|
|
|
console.log(file, fileList); |
|
|
|
}, |
|
|
|
handlePreview(file) { |
|
|
|
console.log(file); |
|
|
|
}, |
|
|
|
// 上传图片 |
|
|
|
handleAvatarSuccess(res, file) { |
|
|
|
this.imageUrl1 = URL.createObjectURL(file.raw); |
|
|
|
}, |
|
|
|
beforeAvatarUpload(file) { |
|
|
|
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'; |
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2; |
|
|
|
|
|
|
|
if (!isJPG) { |
|
|
|
this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!'); |
|
|
|
} |
|
|
|
if (!isLt2M) { |
|
|
|
this.$message.error('上传头像图片大小不能超过 2MB!'); |
|
|
|
} |
|
|
|
return isJPG && isLt2M; |
|
|
|
}, |
|
|
|
changeNormalWeixin() { |
|
|
|
|
|
|
|
}, |
|
|
|
// changeSelectWeixin(item, flag) { |
|
|
|
// if (flag) { |
|
|
|
// this.select_placeholder_weixin = this.options_weixin_null.desc; |
|
|
|
// return |
|
|
|
// } |
|
|
|
// this.selectedItem = { ...item }; |
|
|
|
// console.log(this.selectedItem, 'this.selectedItem===='); |
|
|
|
// }, |
|
|
|
onSwitchChange(data) { |
|
|
|
this.form.is_fixed = data ? 1 : 0 |
|
|
|
this.departIsFixed = data |
|
|
|
|