|
|
|
@ -88,8 +88,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</GuipTable> |
|
|
|
|
|
|
|
<PaymentMethod :list="payList"/> |
|
|
|
<PaymentMethod :list="payList[item.id] ? payList[item.id] : []"/> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
@ -143,6 +142,7 @@ export default { |
|
|
|
doctorList: false, |
|
|
|
allChecked: false, |
|
|
|
pageShow:false, |
|
|
|
doctorIds:[], |
|
|
|
payList:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -170,15 +170,14 @@ export default { |
|
|
|
store.commit('SET_CUSTOMIZE', false); |
|
|
|
store.commit('SET_SLIDER_MENU', 'menuData'); |
|
|
|
this.getInitData() |
|
|
|
this.getBindpayList() |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(['menuData']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
|
}, |
|
|
|
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) { |
|
|
|
@ -190,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 |
|
|
|
} |
|
|
|
@ -197,13 +204,13 @@ export default { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
async getBindpayList() { |
|
|
|
await this.$http('POST', '/api/admin/get_pay_list', { |
|
|
|
doctor_id: 3, |
|
|
|
depart_id: 4 |
|
|
|
async getBindpayList(doctorIds) { |
|
|
|
var payList = new Object(); |
|
|
|
await this.$http('POST', '/api/admin/get_doctors_pay_list', { |
|
|
|
doctor_ids: JSON.stringify(doctorIds) |
|
|
|
}).then(response => { |
|
|
|
this.payList.push(...response.data[2],...response.data[3]) |
|
|
|
console.log(this.payList,response,'this.payList====00000'); |
|
|
|
payList = response.data; |
|
|
|
this.payList = payList |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
@ -359,6 +366,25 @@ 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 |
|
|
|
}).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: '医生信息', |
|
|
|
|