提交 4e58f14b 编写于 作者: 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
......@@ -11,6 +11,7 @@
"build": "node build/build.js",
"build:dev": "cross-env BUILD_ENV=dev node build/build.js",
"build:test": "cross-env BUILD_ENV=test node build/build.js",
"build:test2": "cross-env BUILD_ENV=test node build/build.js",
"build:uat": "cross-env BUILD_ENV=uat node build/build.js",
"build:pro": "cross-env BUILD_ENV=pro node build/build.js"
},
......
......@@ -42,6 +42,17 @@ export const envConfig = {
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://test1.yunqueyi.com/',
},
test2: {
baseUrl: 'https://test1-sc.yunqueyi.com/',
qiniuFileUrl: "https://test1-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://test1.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
followUpSC: 'https://test2-work.yunqueyi.com/sc',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://test1.yunqueyi.com/',
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/',
qiniuFileUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1",
......
......@@ -37,11 +37,10 @@
</el-select>
</div>
<div class="scroll-section">
<el-radio-group v-model="sendObj.hasSelected" size="small">
<el-radio-group v-model="sendObj" size="small">
<el-radio
v-for="(item, index) in cartoonList"
:key="index"
@change="changeComent(item)"
:label="item" class="radio-item">{{item.header_name}}</el-radio>
</el-radio-group>
</div>
......@@ -60,10 +59,7 @@
components: {},
data() {
return {
sendObj: {
hasSelected: '',
closeStatus: false,
},
sendObj: {},
saasDisease: '', // 高血压标识
showSecond: false,//是否显示分类
showCartoonDialog: true,
......@@ -158,15 +154,11 @@
return array[id]
},
clickClose() {
this.$emit('closeSelectCartoon', this.sendObj)
this.$emit('closeSelectCartoon')
},
sureSelect() {
console.log(this.sendObj)
this.$emit('closeSelectCartoon', this.sendObj);
this.$emit('confirmSelectComent', this.sendObj);
},
changeComent(item){
this.$emit('pushConmentMsg',item)
}
},
}
</script>
......
......@@ -101,11 +101,11 @@
</el-option>
</el-select>
<el-button plain class="ml20" @click="goSelectCartoon" v-if="itemTimeForm.change && !itemTimeForm.hasSelected && !isStandedTemplate && planId">选择健康漫画</el-button>
<el-button plain class="ml20" @click="goSelectCartoon" v-if="showChoseComtent(itemTimeForm)">选择健康漫画</el-button>
<div class="selected-div ml20" v-if="itemTimeForm.hasSelected">
<span>{{itemTimeForm.comentMsg.header_name}}</span>
<el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate">重选</el-button>
<el-button type="text" @click="deleteClick" v-if="!isStandedTemplate">删除</el-button>
<el-button type="text" @click="goSelectCartoon" v-if="showRechoseDelete(itemTimeForm)">重选</el-button>
<el-button type="text" @click="deleteClick" v-if="showRechoseDelete(itemTimeForm)">删除</el-button>
</div>
</div>
</el-form-item>
......@@ -130,11 +130,6 @@
</el-select>
</el-form-item>
<select-cartoon
:isSelectCartoon="isSelectCartoon"
@closeSelectCartoon="closeSelectCartoon"
@pushConmentMsg="pushConmentMsg"
/>
</el-form>
</div>
</div>
......@@ -235,15 +230,14 @@
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
</div>
<select-cartoon
:isSelectCartoon="isSelectCartoon"
@closeSelectCartoon="closeSelectCartoon"
@pushConmentMsg="pushConmentMsg"
@confirmSelectComent="confirmSelectComent"
/>
</el-form>
</div>
</div>
<!--<select-cartoon :isSelectCartoon="isSelectCartoon" @closeSelectCartoon="closeSelectCartoon"></select-cartoon>-->
</div>
......@@ -251,7 +245,7 @@
<script>
import _ from 'lodash';
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
import SetTimeForm from '@/views/followup/plan-manage/dialog/set-time-form';
// import SetTimeForm from '@/views/followup/plan-manage/dialog/set-time-form';
import {getFormOptions, getPatientNumber, getBasicData} from '@/utils/followup/followapis'
import { mapState,mapActions } from 'vuex'
......@@ -260,13 +254,16 @@
export default {
components: {
SelectCartoon,
SetTimeForm
// SetTimeForm
},
data() {
const checkDay = (rule, value, callback)=>{
const num = parseFloat(value)
if(num < 1 || num>99){
return callback(new Error('日期不能大于99天或小于0天'));
return callback(new Error('数字范围0-99'));
}
if(!Number.isInteger(num)){
return callback(new Error('数字必须为整数'));
}
callback();
}
......@@ -311,48 +308,47 @@
planId: String,
},
computed: {
...mapState('planManage',{
}),
// setTimeNodeList1(){
// return this.sortKey(this.setTimeNodeList,'timeNo')
// },
// item() {
// if(this.setTimeNodeList.length == 0) {
// return;
// }else {
// return this.setTimeNodeList1[0].timeUnit;
// }
// },
},
created() {
this.setTimeNodeList = this.standedTimeNodeList
this.initNewForm();
this.getConstData();
// 如果是固定模板
// console.log(this.planId)
if(this.isStandedTemplate || this.planId){
this.activeTab = 0;
if(!this.isStandedTemplate && !this.planId){//新建计划并且是自定义模板
this.initNewForm();
}
},
watch: {
standedTimeNodeList(val){
this.setTimeNodeList = val
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
if(this.planId){//这一步,是处理新建计划选择固定模板,或者修改计划(无论固定还是自定义模板)监听传递进来的list
this.activeTab = 0;
this.timeForm = this.setTimeNodeList[this.activeTab]
this.timeForm.formRef = 'form' + this.activeTab;
}
this.$forceUpdate();
},
isStandedTemplate(val){
this.isStandedTemplate = val
console.log(this.isStandedTemplate)
console.log('是否固定模板',this.isStandedTemplate)
if(this.isStandedTemplate){
this.setTimeNodeList = this.standedTimeNodeList
this.activeTab = 0;
}
},
setTimeNodeList(val){
this.setTimeNodeList = val
// console.log(this.setTimeNodeList)
if(this.setTimeNodeList.length>0) {
this.timeUnit = this.setTimeNodeList[0].timeUnit
this.markOptions.forEach((ob)=>{
if(this.timeUnit==ob.no){
this.timeUnitStr = ob.value
}
})
// 这里操作时间节点的数据
this.setTimeNodeList.forEach(item=>{
item.isDisabled = true;
item.timeUnit = this.setTimeNodeList[0].timeUnit
// item.timeUnit = this.setTimeNodeList[0].timeUnit
if(item.remindList && item.remindList.length > 0){// remindDay 提醒医生预约提前天数
item.remindDay = []
item.remindList.forEach((kkk)=>{
......@@ -383,9 +379,8 @@
})
}
});
console.log(this.setTimeNodeList)
});
if(!this.isStandedTemplate){
this.setTimeNodeList[0].isDisabled = false;
......@@ -393,7 +388,7 @@
}
},
patientIdList(val){
if(this.planId){//如果是修改计划,发送人数共享给各个时间节点
// if(this.planId){//如果是修改计划,发送人数共享给各个时间节点
// 获取微信和短信用户数量
getPatientNumber({
patientIdList: val
......@@ -410,21 +405,20 @@
});
}
})
}
// }
},
checkForm(val){
if(val){// 触发了
// console.log('触发 保存按钮的 校验',val)
// 触发 保存 校验
// this.saveValiedBegin = val
if(val){// 触发了
console.log('是否固定模板',this.isStandedTemplate)
console.log('是否修改计划',this.planId)
console.log('是否显示设置时间按钮',this.showSetBtn)
console.log('当前的检验是否通过了',this.isValied)
console.log('表单数据',this.timeForm)
console.log('activeTab',this.activeTab)
// console.log('是否固定模板',this.isStandedTemplate)
// console.log('是否修改计划',this.planId)
// console.log('是否显示设置时间按钮',this.showSetBtn)
// console.log('当前的检验是否通过了',this.isValied)
// console.log('表单数据',this.timeForm)
// console.log('activeTab',this.activeTab)
if(this.planId){//修改计划
......@@ -436,10 +430,35 @@
})
}else{ //自定义模板
// 如果直接点击保存,需要进行对当前填写的表单进行校验
console.log(this.timeForm)
const isValied = this.checkCurrentForm(this.timeForm.formRef);
this.isValied = isValied
if(isValied){
if(this.setTimeNodeList.length>0 && this.timeForm.timeNo==this.setTimeNodeList[0].timeNo){
}else{
this.checkTimeIsRepeat(()=>{
this.activeTab = this.setTimeNodeList.length;
this.timeForm.formRef = 'form' + this.activeTab;
this.setTimeNodeList.push(this.timeForm)
})
}
// 新增成功之后
this.setTimeNodeList = this.sortKey(this.setTimeNodeList,'timeNo')
this.$emit('addListenSave',{
status: true,
setTimeNodeList: this.setTimeNodeList
})
}else{
this.$emit('addListenSave',{
status: false,
setTimeNodeList: this.setTimeNodeList
})
}
}
} else{//新增计划
......@@ -464,14 +483,13 @@
this.setTimeNodeList.push(this.timeForm)
})
}
// 新增成功之后
//
// // 新增成功之后
this.setTimeNodeList = this.sortKey(this.setTimeNodeList,'timeNo')
}
if(this.isValied){
// console.log(this.setTimeNodeList)
this.$emit('addListenSave',{
status: true,
setTimeNodeList: this.setTimeNodeList
......@@ -487,30 +505,13 @@
}
}
},
timeForm(val) {
if(this.setTimeNodeList.length>0) {
this.timeForm.isDisabled = true;
this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
}
// this.timeForm = val
console.log('表单父组件的数据',this.timeForm)
},
// setTimeNodeList1(val) {
// if(val.length > 0){
// this.setTimeNodeList1.map(item=>{
// item.isDisabled = true;
// item.timeUnit = this.setTimeNodeList1[0].timeUnit
// this.markOptions.forEach((ob)=>{
// if(item.timeUnit==ob.no){
// item.timeUnitStr = ob.value
// }
// })
// });
// this.setTimeNodeList1[0].isDisabled = false;
// }
// },
},
},
methods: {
// 一次性获取常量接口数据
......@@ -541,12 +542,12 @@
let validback;
if(this.$refs[form].validate){
this.$refs[form].validate((valid) => {
console.log('新的new校验结果' + valid)
// console.log('新的new校验结果' + valid)
validback = valid
});
}else{
this.$refs[form][0].validate((valid) => {
console.log('新的new校验结果' + valid)
// console.log('新的new校验结果' + valid)
validback = valid
});
}
......@@ -555,14 +556,11 @@
changeTabNew(index){
console.log('点击了下标',index)
this.activeTab= index
console.log(this.setTimeNodeList)
this.timeForm = this.setTimeNodeList[index]
},
// 验证是否重复
checkTimeIsRepeat(callback){
this.timeIsRepeat = false;
console.log('=666666666666666!',this.setTimeNodeList)
console.log(this.timeForm)
if(this.setTimeNodeList.length > 0){
this.setTimeNodeList.forEach((item,index)=>{
if(item.timeNo == this.timeForm.timeNo){
......@@ -605,6 +603,7 @@
this.setTimeNodeList.push(this.timeForm)
// 新增成功之后
this.setTimeNodeList = this.sortKey(this.setTimeNodeList,'timeNo')
this.$forceUpdate();
//设置单位
this.markOptions.forEach((ob)=>{
if(this.setTimeNodeList[0].timeUnit==ob.no){
......@@ -618,7 +617,42 @@
})
}
},
// 是否显示选择添加漫画按钮
showChoseComtent(timeObj){
let flag;
if(this.isStandedTemplate){
flag = false
}else{
if(this.planId){
flag = (timeObj.change && !timeObj.id) ? true : false
}else{
flag = (!timeObj.id) ? true : false
}
}
return flag
},
// 是否显示删除重选漫画按钮
showRechoseDelete(timeObj){
let flag;
if(this.isStandedTemplate){
flag = false
}else{
if(this.planId){
if(timeObj.change){
if(timeObj.id){
flag = true
}else{
flag = false
}
}else{
flag = false
}
}else{
flag = (!timeObj.id) ? true : false
}
}
return flag
},
// 初始化新的表单
initNewForm(){
const timeFormInit = {
......@@ -629,7 +663,7 @@
remindList: [],//提醒医生预约提前天数
pushContentList: [],//推送患教提前天数 漫画id
followupList: [],//随访量表id
hasSelected: '',
hasSelected: false,
isDisabled: false,
remindDay: [],
pushDay: '',
......@@ -648,44 +682,61 @@
this.isSelectCartoon = true;
},
//关闭漫画
closeSelectCartoon(val) {
this.isSelectCartoon = val.closeStatus;
this.timeForm.hasSelected = val.hasSelected;
// this.timeForm.comentMsg = val.hasSelected;
console.log('当前的tab是',this.activeTab)
this.pushConmentMsg(val.hasSelected)
},
// 接收漫画选择信息
pushConmentMsg(val){
this.timeForm.comentMsg = val
console.log('选择的漫画信息',this.timeForm.comentMsg)
closeSelectCartoon() {
this.isSelectCartoon = false;
},
// 确认选择漫画
confirmSelectComent(val){
this.isSelectCartoon = false;
// console.log('拿到的漫画选择组件的信息',val)
// console.log('当前的tab是',this.activeTab)
// console.log('当前表单信息',this.timeForm)
// console.log('当前是否固定模板',this.isStandedTemplate)
// console.log('当前的时间list',this.setTimeNodeList)
// console.log('选择的漫画信息',val)
if(this.planId){//修改
this.setTimeNodeList[this.activeTab].hasSelected = true;
this.setTimeNodeList[this.activeTab].comentMsg = val;
const comdata = this.setTimeNodeList[this.activeTab];
const obj = {
startDays: comdata.pushDay,
resourceId: comdata.comentMsg.id,
sendContent: comdata.comentMsg.header_name
}
this.setTimeNodeList[this.activeTab].pushContentList[0] = obj
}else{//新增
this.timeForm.hasSelected = true;
this.timeForm.comentMsg = val;
const comdata = this.timeForm;
let obj = {
startDays: this.timeForm.pushDay,
resourceId: this.timeForm.comentMsg.id,
sendContent: this.timeForm.comentMsg.header_name
startDays: comdata.pushDay,
resourceId: comdata.comentMsg.id,
sendContent: comdata.comentMsg.header_name
}
this.timeForm.pushContentList[0] = obj
// activeTab
// getPatientNumber({
// patientIdList: this.patientIdList
// }).then(res=>{
// if(res.code=='000000'){
// this.timeForm.wechatPatientNum = res.data.wechatPatientNum;
// this.timeForm.messagePatientNum = res.data.messagePatientNum;
// this.timeForm.totalNumber = this.timeForm.wechatPatientNum + this.timeForm.messagePatientNum
// }else{
// this.$notify.success({
// title: '提交失败',
// message: res.message,
// showClose: false
// });
// }
// })
this.timeForm.pushContentList[0] = obj;
}
},
deleteClick() {
this.timeForm.hasSelected = '';
if(this.planId){
this.setTimeNodeList[this.activeTab].hasSelected = false;
this.setTimeNodeList[this.activeTab].comentMsg = {};
this.setTimeNodeList[this.activeTab].pushContentList.splice(0,1);
}else{
this.timeForm.hasSelected = false;
this.timeForm.comentMsg = {};
this.timeForm.pushContentList.splice(0,1);
}
this.$forceUpdate();
},
deleteTimeNode(item, index) {
this.$confirm('是否删除该时间节点?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.setTimeNodeList.splice(index, 1)
// this.activeTab = 0;
// this.timeForm = this.setTimeNodeList[0];
......@@ -695,25 +746,26 @@
this.showSetBtn = true;
this.initNewForm();
}
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
this.$forceUpdate();
})
},
deleteAddNode() {
this.showSetBtn = false;
this.isValied = true;
this.activeTab = 0;
this.timeForm = this.setTimeNodeList[0];
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
this.$forceUpdate();
},
changeRemindDay(val){
console.log(val)
this.timeForm.remindList = []
val.forEach((item)=>{
this.timeForm.remindList.push({
startDays: item
})
})
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
this.$forceUpdate();
},
changePushDay(val){
console.log(val)
......@@ -723,19 +775,33 @@
sendContent: this.timeForm.comentMsg.header_name
}
this.timeForm.pushContentList[0] = obj
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
this.$forceUpdate();
},
changeFollowId(val){
console.log(val)
this.timeForm.followupList = []
val.forEach((item)=>{
this.formOptions.forEach((item2)=>{
if(item2.scaleNo==item){
this.timeForm.followupList.push({
resourceId: item
resourceId: item,
sendContent: item2.name
})
}
})
})
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
this.$forceUpdate();
},
sortKey(array,key) {
let newList = array.sort((a,b)=>{
const x = parseFloat(a[key]);
const y = parseFloat(b[key]);
return ((x<y) ? -1 : (x>y) ? 1 : 0)
})
return newList
},
getNowTime() {
const date = new Date();
const year = date.getFullYear();
......@@ -747,14 +813,6 @@
let formName = `form${year}${month}${day}${hour}${minute}${second}`;
return formName;
},
sortKey(array,key) {
return array.sort(function(a,b){
var x = a[key];
var y = b[key];
return ((x<y) ? -1 : (x>y) ? 1 : 0)
})
},
},
}
......
......@@ -60,7 +60,6 @@
clearable
style="width:380px;">
</el-date-picker>
</el-form-item>
<el-form-item label="备注">
<el-select
......@@ -78,12 +77,11 @@
</el-form>
</div>
<div class="edit-plan-content" v-if="activeTab === 'second'">
<div class="edit-plan-content" v-show="activeTab === 'second'">
<set-time-node
ref="getTimeNodeList"
:standedTimeNodeList="standedTimeNodeList"
:isStandedTemplate="isStandedTemplate"
@setTimeNodeListOnCom="setTimeNodeListOnCom"
:patientIdList="baseInfo.patientIdList"
:checkForm="checkForm"
@addListenSave="addListenSave"
......@@ -134,6 +132,7 @@
curmbThird: '新建随访计划',
jumPathThird: '/followUp/plan-manage',
activeTab: 'first',
resourceId: '',//当前选择的随访模板id
noName: false,
noResourceId: false,
noTime: false,
......@@ -175,7 +174,6 @@
},
computed: {
...mapState('planManage',{
// setTimeNodeList: state => state.setTimeNodeList,
remarkOption: state => state.remarkOption,
templateOptions: state => state.templateOptions,
})
......@@ -219,9 +217,6 @@
})
}
},
setTimeNodeListOnCom(val){
this.getTimeNodeList(val)
},
selectPatientHandler() {
this.isShowSelectPatient = true;
},
......@@ -276,6 +271,8 @@
}
if (valid) {
console.log('当前选择的随访模板id为',this.baseInfo.resourceId)
this.resourceId = this.baseInfo.resourceId
console.log( this.baseInfo.resourceId)
if(this.baseInfo.resourceId){
this.isStandedTemplate = true
getFollowupTableTemplate(this.baseInfo.resourceId).then(res=>{
......@@ -284,6 +281,7 @@
})
}else{
this.isStandedTemplate = false
this.standedTimeNodeList = [];
this.activeTab = 'second';
}
......
......@@ -31,14 +31,33 @@
<div class="content-group-btn"><el-button type="primary" size="small" @click="addNewPlan">新建随访计划</el-button></div>
<div>
<el-table :data="planList.fPlanDtoList" style="width: 100%;margin-top: 20px;">
<el-table-column prop="name" label="随访计划名称" min-width="100" align="center" :show-overflow-tooltip="true">
<el-table-column
prop="name"
label="随访计划名称"
min-width="180"
align="left"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<el-button class="btn-right-class" type="text" @click="visitDetail(scope.row)">{{scope.row.name}}</el-button>
</template>
</el-table-column>
<el-table-column prop="startYear" label="开始年份" min-width="100" align="center"></el-table-column>
<el-table-column prop="num" label="总人数" min-width="150" align="center"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="240">
<el-table-column
prop="startYear"
label="开始年份"
width="150"
align="center">
</el-table-column>
<el-table-column
prop="num"
label="总人数"
width="150"
align="center">
</el-table-column>
<el-table-column
label="操作"
fixed="right"
align="center"
width="250">
<template slot-scope="scope">
<el-button class="btn-right-class" type="text" @click="visitRow(scope.row)">查看居民</el-button>|
<el-button class="btn-right-class" type="text" @click="changeRow(scope.row)"> 修改</el-button>|
......@@ -203,7 +222,7 @@
this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId:row.id}})
},
deleteRow(row){
this.$confirm('此操作将删除该条计划, 是否继续?', '提示', {
this.$confirm(`是否确定删除${row.name}, 删除后计划将无法恢复!`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(() => {
......@@ -215,10 +234,10 @@
message: '删除成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
// this.$message({
// type: 'info',
// message: '已取消删除'
// });
});
},
......
<template>
<div class="plan-modify">
<div class="bread-crumb">
<el-breadcrumb separator-class="el-icon-arrow-right" >
<el-breadcrumb separator="/" >
<el-breadcrumb-item v-for="item in planModifyCrumb">
<a v-if="item.href" :href="item.href">{{item.name}}</a>
<span v-else >{{item.name}}</span>
......@@ -54,7 +54,6 @@
:isStandedTemplate="isStandedTemplate"
:standedTimeNodeList="setTimeNodeList"
:patientIdList="planDetailData.patientIdList"
@setTimeNodeListOnCom="setTimeNodeListOnCom"
:checkForm="checkForm"
:planId="planId"
@addListenSave="addListenSave"
......@@ -289,9 +288,6 @@
closeFollowTime(isShow) {
this.showFollowTime = isShow
},
setTimeNodeListOnCom(val){
this.getTimeNodeList(val)
},
closeAddPatientTime(isShow) {
this.showAddPatientTime = isShow
},
......
<template>
<div class="resident-detail">
<div class="bread-crumb">
<el-breadcrumb separator-class="el-icon-arrow-right" >
<el-breadcrumb separator="/">
<el-breadcrumb-item v-for="item in residentCrumb">
<a v-if="item.href" :href="item.href">{{item.name}}</a>
<span v-else >{{item.name}}</span>
......
<template>
<div class="resident-list">
<div class="bread-crumb">
<el-breadcrumb separator-class="el-icon-arrow-right" >
<el-breadcrumb separator="/" >
<el-breadcrumb-item v-for="item in residentCrumb">
<a v-if="item.href" :href="item.href">{{item.name}}</a>
<span v-else >{{item.name}}</span>
......
......@@ -192,23 +192,28 @@
//校验额度是否不够
getCheckReservation({
content: '',
validContents: this.validContents
validContents: _self.validContents
}).then(({data}) => {
const sendFlagLast = data.sendFlag;
const inServiceTimeFlag = data.inServiceTimeFlag;
if(sendFlagLast){ //额度还可用
sendReservation({
...this.reservationForm,
patientAppointList: this.selectList
patientAppointList: _self.selectList
}).then(({data}) => {
this.$refs['reservationForm'].resetFields();
this.$emit('closeSendReserve',false);
_self.$refs['reservationForm'].resetFields();
_self.$emit('closeSendReserve',false);
})
}else {
console.log('余额不足')
if(!inServiceTimeFlag) {
_self.$message.warning('已超过发送时间范围!');
return;
}else {
// 额度不足
this.isNoEnoughShow = true;
_self.isNoEnoughShow = true;
return;
}
}
})
} else {
return false;
......
......@@ -61,10 +61,13 @@
:data="reservationList.enteringDtos"
center
style="width: 100%;margin-top: 20px;"
@selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"
:row-key="getRowKeys"
ref="multipleReservation">
<el-table-column
type="selection"
align="center">
align="center"
:reserve-selection="true">
</el-table-column>
<el-table-column
prop="nickname"
......@@ -190,6 +193,9 @@
needPara: {},
dialogDetailShow: false,
validContents: [],
getRowKeys(row) {
return row.fuPlanPatientTimesId;
},
}
},
created() {
......@@ -281,25 +287,31 @@
content: '',
validContents:this.validContents
})
const { sendFlag } = this.checkRevervationData
const { sendFlag, inServiceTimeFlag } = this.checkRevervationData
//判断短信余额是否不足
if(sendFlag){
this.isDialogShow = true;
}else {
if(!inServiceTimeFlag) {
this.$message.warning('已超过发送时间范围!');
return;
}else {
this.isNoEnoughShow = true;
}
}
},
sendReservation() {
if(this.selectionData.length > 0){
// console.log('选择人员长度',this.selectionData.length)
if(this.selectionData.length > 100) {
this.$message.warning('每次最多选择100条单条随访进行预约!');
return;
}else if(this.selectionData.length <= 0){
this.$message.warning('请选择要发送预约的居民!');
return;
}else{
this.selectList = this.selectionData;
// 发送预约校验
this.initCheck();
}else if(this.selectionData.length > 100){
this.$message.warning('每次最多选择100条单条随访进行预约!');
return false;
} else {
this.$message.warning('请选择要发送预约的居民!');
return false;
}
},
sendReservationRow(row){
......@@ -340,6 +352,7 @@
...this.setSearchData(),
status: this.status,
})
this.$refs.multipleReservation.clearSelection();
},
closeTipsDialog(val){
this.isNoEnoughShow = val;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册