提交 457aeeea 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of http://192.168.110.53/com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
此差异已折叠。
......@@ -8,12 +8,16 @@ export default {
pageSize: 10, //每页数据大小
total: null, //总数
},
checkRevervationData: { //发送预约校验
},
},
mutations: {
GET_RESERVATION_LIST(state, payload) {
state.reservationList = payload
},
GET_CHECK_RESERVATION(state, payload) {
state.checkRevervationData = payload
},
},
actions: {
getReservationList(context, payload) {
......@@ -25,6 +29,13 @@ export default {
}).then(({data}) => {
context.commit('GET_RESERVATION_LIST', data);
});
}
},
getCheckReservation(context, payload) {
followApi.getCheckReservation({
...payload
}).then(({data}) => {
context.commit('GET_CHECK_RESERVATION', data)
})
},
},
}
......@@ -46,6 +46,13 @@ const reservationManageApi = [
name: 'getReservationList',
description: '获取预约列表',
},
{
url: '/followup/appointmentPatient/check/',
method: 'get',
params: 'params',
name: 'getCheckReservation',
description: '发送预约校验',
},
]
......
......@@ -95,20 +95,17 @@
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
v-if="residentList.fPlanPatientInfoDtoList"
@size-change="handleSizeChangePre"
@current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper"
:current-page="residentList.pageNum"
:page-sizes="[10, 20, 50, 100]"
:page-size="residentList.pageSize"
:total="residentList.total">
</el-pagination>
</div>
<el-pagination
background
v-if="residentList.fPlanPatientInfoDtoList"
@size-change="handleSizeChangePre"
@current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper"
:current-page="residentList.pageNum"
:page-sizes="[10, 20, 50, 100]"
:page-size="residentList.pageSize"
:total="residentList.total">
</el-pagination>
</div>
</div>
<change-plan :showThisPage="showChangePlan" @closeChangePlan="closeChangePlan"></change-plan>
......
......@@ -47,7 +47,7 @@
</div>
<p class="warn-tips" v-if="reservationForm.reservationDate">该日期已经成功预约{{reservationForm.hasReservedNumber}}人,请确保能在此时间段完成预约的随访任务</p>
</el-form-item>
<el-form-item label="变更原因">
<el-form-item label="变更原因" prop="reason">
<el-input type="textarea" v-model="reservationForm.reason" placeholder="请输入变更原因" maxlength="30" rows="3" style="width:60%;"></el-input>
</el-form-item>
</el-form>
......
......@@ -59,7 +59,8 @@
<el-table
:data="reservationList.fPlanAppointmentDtoList"
center
style="width: 100%;margin-top: 20px;">
style="width: 100%;margin-top: 20px;"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
align="center">
......@@ -102,19 +103,17 @@
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
v-if="reservationList.fPlanAppointmentDtoList"
@size-change="handleSizeChangePre"
@current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper"
:current-page="reservationList.pageNum"
:page-sizes="[10, 20, 50, 100]"
:page-size="reservationList.pageSize"
:total="reservationList.total">
</el-pagination>
</div>
<el-pagination
background
v-if="reservationList.fPlanAppointmentDtoList"
@size-change="handleSizeChangePre"
@current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper"
:current-page="reservationList.pageNum"
:page-sizes="[10, 20, 50, 100]"
:page-size="reservationList.pageSize"
:total="reservationList.total">
</el-pagination>
</div>
</div>
<send-reservation :isDialogShow="isDialogShow" @closeSendReserve="closeSendReserve"></send-reservation>
......@@ -129,16 +128,16 @@
//面包屑
import BreadCrumb from '@/components/breadcrumb';
import sendReservation from './dialog/send-reservation';
import noEnough from './dialog/no-enough';
import SendReservation from './dialog/send-reservation';
import NoEnough from './dialog/no-enough';
import ChangeReservation from "./dialog/change-reservation";
export default {
name: "reservation-list",
components: {
ChangeReservation,
BreadCrumb,
sendReservation,
noEnough
SendReservation,
NoEnough
},
data() {
return {
......@@ -167,6 +166,8 @@
isDialogShow: false, //发送预约dialog展示
isNoEnoughShow: false, //余额不足dialog展示
isChangeReservation: false, //变更预约状态dialog展示
selectionData: [],
ids: '',
}
},
created() {
......@@ -178,10 +179,11 @@
computed: {
...mapState('reservationManage',{
reservationList: state => state.reservationList,
checkRevervationData: state => state.checkRevervationData,
})
},
methods: {
...mapActions('reservationManage', ['getReservationList']),
...mapActions('reservationManage', ['getReservationList','getCheckReservation']),
handleSizeChangePre(pageSize) {
this.getReservationList({
pageSize,
......@@ -205,7 +207,9 @@
resetSearchData(formName) {
this.$refs[formName].resetFields();
},
goReservationDetail() { //预约详情页
goPatientDetail(patientId) { //预约详情页
alert(1+patientId)
this.$router.push('/followup/plan-manage/resident-detail')
},
setSearchData() {
......@@ -233,11 +237,24 @@
return para;
},
sendReservation() {
//判断短信余额是否不足
if(this.hasSmsBalance){
this.isDialogShow = true;
}else {
this.isNoEnoughShow = true;
if(this.selectionData.length > 0){
this.getCheckReservation({
patientIds: this.ids
});
const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
//判断短信余额是否不足
// if(this.hasSmsBalance){
if(messageNum <= messageCount){
this.isDialogShow = true;
}else {
this.isNoEnoughShow = true;
}
}else if(this.selectionData.length > 100){
this.$message.warning('每次最多选择100条单条随访进行预约!');
return false;
} else {
this.$message.warning('请选择要发送预约的居民!');
return false;
}
},
changeReserveClick(){
......@@ -251,7 +268,20 @@
},
closeChangeReserve(val){
this.isChangeReservation = val;
}
},
handleSelectionChange(val){
this.selectionData = val;
let idsArray = [];
if (val.length > 0) {
// this.disabledDelete = false
for(let i=0; i<val.length; i++){
idsArray.push(val[i].nickId)
}
this.ids = idsArray.join(",")
} else {
// this.disabledDelete = true
}
},
},
watch: {
status(val) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册