|
@@ -1089,16 +1089,19 @@
|
1089
|
1089
|
// this.$message.error('该处方已经结算或者退费,无法继续添加处方')
|
1090
|
1090
|
// return
|
1091
|
1091
|
// }
|
1092
|
|
- if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
|
1093
|
|
- this.$message.error('当前处方无数据,新增数据后才能新增处方')
|
1094
|
|
- return
|
|
1092
|
+ // if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
|
|
1093
|
+ // this.$message.error('当前处方无数据,新增数据后才能新增处方')
|
|
1094
|
+ // return
|
|
1095
|
+ // }
|
|
1096
|
+ if (this.prescriptions.length == 0){
|
|
1097
|
+ this.tabIndex = 1
|
|
1098
|
+ }else{
|
|
1099
|
+ var str = this.prescriptions[this.prescriptions.length - 1].name
|
|
1100
|
+ var reg =/[\u4e00-\u9fa5]/g;
|
|
1101
|
+ this.tabIndex = parseInt(str.replace(reg, ""))
|
|
1102
|
+ ++this.tabIndex
|
1095
|
1103
|
}
|
1096
|
|
-
|
1097
|
|
- this.tabIndex = this.prescriptions.length
|
1098
|
|
-
|
1099
|
|
- ++this.tabIndex
|
1100
|
1104
|
let newTabName = '处方' + this.tabIndex
|
1101
|
|
-
|
1102
|
1105
|
var nowDate = new Date()
|
1103
|
1106
|
var nowYear = nowDate.getFullYear()
|
1104
|
1107
|
var nowMonth = nowDate.getMonth() + 1
|
|
@@ -1122,7 +1125,7 @@
|
1122
|
1125
|
advices: [],
|
1123
|
1126
|
project: [],
|
1124
|
1127
|
addition: [],
|
1125
|
|
- pre_time: this.prescriptions[0].pre_time
|
|
1128
|
+ pre_time: nowTime,
|
1126
|
1129
|
|
1127
|
1130
|
// pre_time: nowTime
|
1128
|
1131
|
|