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