提交 773036e7 编写于 作者: 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
......@@ -58,7 +58,7 @@ export default {
getReservationPatients({
...payload
}).then(({data}) => {
context.commit('GET_REVERVATION_NUM', data.number)
context.commit('GET_REVERVATION_NUM', data)
})
},
// getConstantsData({commit}) {
......
......@@ -118,7 +118,14 @@ export const changePlan = (params) => {
description: '变更计划',
})
};
export const deletePlan = (planId) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/plans/${planId}`),
method: 'delete',
description: '删除计划',
})
};
/*预约管理*/
export const getReservationList = (data) => {
return fetch({
......@@ -150,7 +157,7 @@ export const getReservationPatients = (data) => {
export const changeReservationStatus = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/appoint/status/`),
url: getFollowUpSC(`/followup/appoint/status/`),
method: 'post',
data: data,
description: '手动变更预约状态',
......@@ -159,7 +166,7 @@ export const changeReservationStatus = (data) => {
export const sendReservation = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/appoint/`),
url: getFollowUpSC(`/followup/appoint/`),
method: 'post',
data: data,
description: '发送预约',
......
......@@ -4,14 +4,20 @@
<el-form-item label="本次随访时间" required>
<div style="display: flex;">
<el-form-item prop="timeNo">
<el-select v-model="timeForm.timeNo" placeholder="请选择">
<el-option
v-for="item in indexOptions"
:key="item.no"
:label="item.value"
:value="item.no">
</el-option>
</el-select>
<el-input
v-model="timeForm.timeNo"
type="number"
size="small"
placeholder="请输入天数"
clearable />
<!--<el-select v-model="timeForm.timeNo" placeholder="请选择">-->
<!--<el-option-->
<!--v-for="item in indexOptions"-->
<!--:key="item.no"-->
<!--:label="item.value"-->
<!--:value="item.no">-->
<!--</el-option>-->
<!--</el-select>-->
</el-form-item>
<el-form-item prop="timeUnit" class="ml20">
<el-select v-model="timeForm.timeUnit" placeholder="请选择" :disabled="timeForm.isDisabled">
......@@ -98,15 +104,15 @@
data() {
return {
isSelectCartoon: false,
indexOptions: [
{
no: 0,
value: 0
}, {
no: 1,
value: 1
}
],
// indexOptions: [
// {
// no: 0,
// value: 0
// }, {
// no: 1,
// value: 1
// }
// ],
formOptions: [
{
no: 0,
......
......@@ -183,20 +183,29 @@
checkValid(val){
this.valBegin = false
if (val) {
this.timeForm.remindDay.forEach((item)=>{
this.timeForm.remindList.push({
startDays: item
// console.log(this.timeForm)
if(this.timeForm.remindDay.length>0){
this.timeForm.remindDay.forEach((item)=>{
this.timeForm.remindList.push({
startDays: item
})
})
})
this.timeForm.pushContentList.push({
startDays: this.timeForm.pushDay,
resourceId: ''
})
this.timeForm.followResourceId.forEach((item)=>{
this.timeForm.followupList.push({
resourceId: item
}
if(this.timeForm.pushContentList.length>0){
this.timeForm.pushContentList.push({
startDays: this.timeForm.pushDay,
resourceId: ''
})
})
}
if(this.timeForm.followResourceId.length>0){
this.timeForm.followResourceId.forEach((item)=>{
this.timeForm.followupList.push({
resourceId: item
})
})
}
this.setTimeNodeList.push(this.timeForm);
this.timeForm = _.cloneDeep(timeFormInit);
......@@ -204,7 +213,7 @@
this.timeForm.isDisabled = true;
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
} else {
return;
return
}
},
addNewNode(formName) {
......
......@@ -194,10 +194,12 @@
// 关闭弹层,继续创建
}).catch(() => {
// 确定放弃,跳出当前编辑页面
this.getTimeNodeList([])
this.$router.push({path: '/followup/plan-manage/plan-list'})
});
},
nextClick(formName) {
this.getTimeNodeList([]);
//为方便调试,不做校验
// this.activeTab = 'second';
//用作校验
......
......@@ -68,6 +68,7 @@
<script>
import BreadCrumb from "@/components/breadcrumb";
import { mapState, mapActions} from 'vuex'
import {deletePlan} from '@/utils/followup/followapis'
export default {
components:{
BreadCrumb,
......@@ -146,17 +147,17 @@
pageNo: currentPage || this.paginationSet.pageNo,
pageSize: this.paginationSet.pageSize,
});
const {pageNum, pageSize, totalRow} = this.planList;
const {pageNo, pageSize, totalRow} = this.planList;
this.paginationSet.total = totalRow;
this.paginationSet = {
...this.paginationSet,
pageNo: pageNum,
pageNo: pageNo,
pageSize: pageSize,
}
},
reseat(){
this.searchData.name = '';
this.searchData.startYear = '0';
this.searchData.startYear = '';
this.search(1);
},
addNewPlan(){
......@@ -171,7 +172,12 @@
changeRow(row){
this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId:row.id}})
},
deleteRow(row){},
deleteRow(row){
deletePlan(row.id).then(({data}) => {
console.log('删除成功')
})
this.search(1);
},
handleSizeChangePre(pageSize){
this.paginationSet['pageSize'] = pageSize;
......
......@@ -18,19 +18,19 @@
</el-form-item>
<el-form-item label="预约状态" required prop="appointStatus">
<el-radio-group v-model="reservationForm.appointStatus">
<el-radio label="1">已接受</el-radio>
<el-radio label="2">已拒绝</el-radio>
<el-radio label="3">已接受</el-radio>
<el-radio label="4">已拒绝</el-radio>
</el-radio-group>
</el-form-item>
<!--appointStatus:1是已接受,2是已拒绝-->
<el-form-item v-if="reservationForm.appointStatus == 1" label="预约时间" required>
<!--appointStatus:3是已接受,4是已拒绝-->
<el-form-item v-if="reservationForm.appointStatus == 3" label="预约时间" required>
<div style="display: flex;">
<el-form-item prop="appointmentDate">
<el-date-picker
type="date"
v-model="reservationForm.appointmentDate"
placeholder="请选择预约日期"
value-format="timestamp"
value-format="yyyy-MM-dd"
value="yyyy-MM-dd"
:picker-options="pickerOptions"
@change="changeHandler">
......@@ -68,18 +68,6 @@
data(){
return{
reservationDialog: true,
// reservationForm: {
// nickName: row.nickName,
// appointmentDate: '',
// appointmentRange: '',
// planId: row.planId,
// patientId: row.patientId,
// planName: row.planName,
// patientsTimesId: row.patientsTimesId,
// typeStr: '',
// changeReason: '',
// appointStatus: null
// },
timeRangeOptions: [
{
value: 1,
......@@ -174,7 +162,6 @@
closeChangeReserve(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
console.log('保存的内容',this.reservationForm)
changeReservationStatus({
...this.reservationForm
}).then(({data}) => {
......@@ -188,7 +175,8 @@
});
},
changeHandler(val) {
this.getReservationPatients({time: val});
this.getReservationPatients({makeAnAppointDate: val});
console.log('日期',this.getRevervationNum)
},
}
}
......
......@@ -16,7 +16,9 @@
:label-position="'left'"
size="small">
<el-form-item label="已选居民">
<span>{{checkData.total}}</span><span>(微信发送{{checkData.weChatNum}}人;短信发送{{checkData.messageNum}}人)</span>
<!--<span>{{checkData.total}}</span>-->
<span>{{selectList.length}}</span>
<span>(微信发送{{checkData.weChatNum}}人;短信发送{{checkData.messageNum}}人)</span>
</el-form-item>
<el-form-item label="预约时间" required>
<div style="display: flex;">
......@@ -77,7 +79,7 @@
reservationForm: {
appointmentDate: '',
appointmentRange: '',
patientAppointList: [],
// patientAppointList: [],
},
timeRangeOptions: [
{
......@@ -164,7 +166,7 @@
methods: {
...mapActions('reservationManage', ['getReservationPatients']),
changeHandler(val) {
this.getReservationPatients({time: val});
this.getReservationPatients({makeAnAppointDate: val});
},
closeSendReserve1(){
if (this.$refs['reservationForm']) {
......
......@@ -242,8 +242,6 @@
this.$refs[formName].resetFields();
},
async goPatientDetail(row) { //预约详情页
// alert(1+patientId)
// this.$router.push('/followup/plan-manage/resident-detail')
await this.getEnteringInfo({patientId: row.patientId,fuPlanPatientTimesId: row.fuPlanPatientTimesId});
this.dialogDetailShow = true;
},
......@@ -274,17 +272,20 @@
async sendReservation() {
if(this.selectionData.length > 0){
this.selectList = this.selectionData;
await this.getCheckReservation({
patientIds: this.ids
})
const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
//判断短信余额是否不足
// if(this.hasSmsBalance){
if(parseInt(messageNum) <= parseInt(messageCount)){
this.isDialogShow = true;
}else {
this.isNoEnoughShow = true;
}
//发送预约校验接口
// await this.getCheckReservation({
// patientIds: this.ids
// })
// const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
// //判断短信余额是否不足
// // if(this.hasSmsBalance){
// if(parseInt(messageNum) <= parseInt(messageCount)){
// this.isDialogShow = true;
// }else {
// this.isNoEnoughShow = true;
// }
//暂时不校验
this.isDialogShow = true;
}else if(this.selectionData.length > 100){
this.$message.warning('每次最多选择100条单条随访进行预约!');
......@@ -296,31 +297,39 @@
},
async sendReservationRow(row){
let newList = [];
newList.push(row);
newList.push({
planId: row.fuPlanId,
patientId: row.patientId,
planName: row.name,
patientsTimesId: row.fuPlanPatientTimesId,
type: row.fuPlanType,
});
this.selectList = newList;
await this.getCheckReservation({
patientIds: row.nickId
})
const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
//判断短信余额是否不足
// if(this.hasSmsBalance){
if(parseInt(messageNum) <= parseInt(messageCount)){
this.isDialogShow = true;
}else {
this.isNoEnoughShow = true;
}
//发送预约校验
// await this.getCheckReservation({
// patientIds: row.patientId
// })
// const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
// //判断短信余额是否不足
// // if(this.hasSmsBalance){
// if(parseInt(messageNum) <= parseInt(messageCount)){
// this.isDialogShow = true;
// }else {
// this.isNoEnoughShow = true;
// }
//暂时不做校验
this.isDialogShow = true;
},
changeReserveClick(row){
// this.needPara = row;
this.needPara = {
nickname: row.nickname,
appointmentDate: '',
appointmentRange: '',
planId: row.planId,
planId: row.fuPlanId,
patientId: row.patientId,
planName: row.planName,
patientsTimesId: row.patientsTimesId,
typeStr: '',
planName: row.name,
patientsTimesId: row.fuPlanPatientTimesId,
type: row.fuPlanType,
changeReason: '',
appointStatus: null
};
......@@ -336,11 +345,28 @@
this.isChangeReservation = val;
},
handleSelectionChange(val){
for(let i in val){
for(let j in val[i]) {
if(j == 'fuPlanId') {
val[i]['planId'] = val[i][j];
// delete val[i]['fuPlanId'];
}
if(j == 'name') {
val[i]['planName'] = val[i][j];
}
if(j == 'fuPlanPatientTimesId') {
val[i]['patientsTimesId'] = val[i][j];
}
if(j == 'fuPlanType') {
val[i]['type'] = val[i][j];
}
}
}
this.selectionData = val;
let idsArray = [];
if (val.length > 0) {
for(let i=0; i<val.length; i++){
idsArray.push(val[i].nickId)
idsArray.push(val[i].patientId)
}
this.ids = idsArray.join(",")
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册