修改统计导出、放号数量判断

main
jinna 3 years ago
parent 75469a58e8
commit 1825ead8c8
  1. 16
      src/views/booknumber/index.vue
  2. 8
      src/views/statistics/index.vue

@ -622,12 +622,11 @@ export default {
this.count = 0;
this.tabArr.map(item => {
item.addForm.addData.map(item1 => {
item1.num = item1.num == undefined ? 0 : item1.num
this.count += parseInt(item1.num)
this.count += parseInt(item1.num == undefined ? 0 : item1.num)
})
item.addForm.addData1.map(item1 => {
item1.num = item1.num == undefined ? 0 : item1.num
this.count += parseInt(item1.num)})
this.count += parseInt(item1.num == undefined ? null : item1.num)
})
})
if (this.userInfo.role_name !== "hospital") {
if (this.deptName == '') {
@ -655,16 +654,17 @@ export default {
pmTimeValite = pmArr.find(item => item < '12:00')
if (tmp == undefined && tmp1 == undefined) {
this.$message.error('请至少添加一条数据');
done()
// done()
} else if (this.count == 0) {
this.$message.error('号源数量不可为0');
done()
console.log(this.tabArr)
// done()
} else if (amTimeValite) {
this.$message.error('预约上午时段不可选择下午时间');
done()
// done()
} else if (pmTimeValite) {
this.$message.error('预约下午时段不可选择上午时间');
done()
// done()
}
else {
if (this.isEdit) {

@ -204,6 +204,14 @@ export default {
methods: {
exportAll(){
console.log(this.query)
if(this.query.releaseTime){
this.query.startTime = this.query.releaseTime[0];
this.query.endTime = this.query.releaseTime[1]
}else{
this.query.startTime = '';
this.query.endTime = ''
}
exportList(this.query).then(res =>{
console.log(res)
if (!res || !res.data) {

Loading…
Cancel
Save