|
@@ -547,7 +547,10 @@ export class HushijiandanComponent implements OnInit {
|
547
|
547
|
// 标本权限
|
548
|
548
|
that.getSpecimenWorkOrderMsg();
|
549
|
549
|
}
|
550
|
|
- if (that.deptTaskTypeRules.openStaticDistribution||that.deptTaskTypeRules.openDrugsBag) {
|
|
550
|
+ if (
|
|
551
|
+ that.deptTaskTypeRules.openStaticDistribution ||
|
|
552
|
+ that.deptTaskTypeRules.openDrugsBag
|
|
553
|
+ ) {
|
551
|
554
|
// 药品静配权限
|
552
|
555
|
that.getJpDrugsWKOMsg();
|
553
|
556
|
}
|
|
@@ -850,6 +853,8 @@ export class HushijiandanComponent implements OnInit {
|
850
|
853
|
if (getMinutes(this.yyTime) != 30) {
|
851
|
854
|
this.yyTime = setMinutes(this.yyTime, 0);
|
852
|
855
|
}
|
|
856
|
+ }else{
|
|
857
|
+ this.nextDay = false;
|
853
|
858
|
}
|
854
|
859
|
this.clickYYFlag = false;
|
855
|
860
|
}
|
|
@@ -858,6 +863,8 @@ export class HushijiandanComponent implements OnInit {
|
858
|
863
|
if (getMinutes(this.yyTimeZy) != 30) {
|
859
|
864
|
this.yyTimeZy = setMinutes(this.yyTimeZy, 0);
|
860
|
865
|
}
|
|
866
|
+ }else{
|
|
867
|
+ this.nextDayZy = false;
|
861
|
868
|
}
|
862
|
869
|
this.clickYYZyFlag = false;
|
863
|
870
|
}
|
|
@@ -869,19 +876,79 @@ export class HushijiandanComponent implements OnInit {
|
869
|
876
|
// 次日-陪检
|
870
|
877
|
nextDay = false;
|
871
|
878
|
nextDayChange(e) {
|
872
|
|
- if (e) {
|
873
|
|
- this.yyTime = addDays(this.yyTime, 1);
|
874
|
|
- } else {
|
875
|
|
- this.yyTime = addDays(this.yyTime, -1);
|
|
879
|
+ if (this.yyTime) {
|
|
880
|
+ if (e) {
|
|
881
|
+ this.yyTime = addDays(this.yyTime, 1);
|
|
882
|
+ this.disabledHours = () => [];
|
|
883
|
+ this.disabledMinutes = (hour) => [];
|
|
884
|
+ } else {
|
|
885
|
+ this.yyTime = addDays(this.yyTime, -1);
|
|
886
|
+ this.disabledHours = () => {
|
|
887
|
+ let now = new Date();
|
|
888
|
+ let nHour = now.getHours();
|
|
889
|
+ let nMinute = now.getMinutes();
|
|
890
|
+ if (nMinute > 30) {
|
|
891
|
+ return range(0, nHour + 1);
|
|
892
|
+ } else {
|
|
893
|
+ return range(0, nHour);
|
|
894
|
+ }
|
|
895
|
+ };
|
|
896
|
+ this.disabledMinutes = (hour) => {
|
|
897
|
+ let now = new Date();
|
|
898
|
+ let nHour = now.getHours();
|
|
899
|
+ let nMinute = now.getMinutes();
|
|
900
|
+ if (hour === nHour || hour === undefined) {
|
|
901
|
+ if (nMinute == 0) {
|
|
902
|
+ return [];
|
|
903
|
+ } else if (nMinute <= 30 && nMinute > 0) {
|
|
904
|
+ return [0];
|
|
905
|
+ } else {
|
|
906
|
+ return [0, 30];
|
|
907
|
+ }
|
|
908
|
+ } else {
|
|
909
|
+ return [];
|
|
910
|
+ }
|
|
911
|
+ };
|
|
912
|
+ }
|
876
|
913
|
}
|
877
|
914
|
}
|
878
|
915
|
// 次日-陪检
|
879
|
916
|
nextDayZy = false;
|
880
|
917
|
nextDayZyChange(e) {
|
881
|
|
- if (e) {
|
882
|
|
- this.yyTimeZy = addDays(this.yyTimeZy, 1);
|
883
|
|
- } else {
|
884
|
|
- this.yyTimeZy = addDays(this.yyTimeZy, -1);
|
|
918
|
+ if (this.yyTimeZy) {
|
|
919
|
+ if (e) {
|
|
920
|
+ this.yyTimeZy = addDays(this.yyTimeZy, 1);
|
|
921
|
+ this.disabledHours = () => [];
|
|
922
|
+ this.disabledMinutes = (hour) => [];
|
|
923
|
+ } else {
|
|
924
|
+ this.yyTimeZy = addDays(this.yyTimeZy, -1);
|
|
925
|
+ this.disabledHours = () => {
|
|
926
|
+ let now = new Date();
|
|
927
|
+ let nHour = now.getHours();
|
|
928
|
+ let nMinute = now.getMinutes();
|
|
929
|
+ if (nMinute > 30) {
|
|
930
|
+ return range(0, nHour + 1);
|
|
931
|
+ } else {
|
|
932
|
+ return range(0, nHour);
|
|
933
|
+ }
|
|
934
|
+ };
|
|
935
|
+ this.disabledMinutes = (hour) => {
|
|
936
|
+ let now = new Date();
|
|
937
|
+ let nHour = now.getHours();
|
|
938
|
+ let nMinute = now.getMinutes();
|
|
939
|
+ if (hour === nHour || hour === undefined) {
|
|
940
|
+ if (nMinute == 0) {
|
|
941
|
+ return [];
|
|
942
|
+ } else if (nMinute <= 30 && nMinute > 0) {
|
|
943
|
+ return [0];
|
|
944
|
+ } else {
|
|
945
|
+ return [0, 30];
|
|
946
|
+ }
|
|
947
|
+ } else {
|
|
948
|
+ return [];
|
|
949
|
+ }
|
|
950
|
+ };
|
|
951
|
+ }
|
885
|
952
|
}
|
886
|
953
|
}
|
887
|
954
|
// 预约建单
|
|
@@ -1318,7 +1385,6 @@ export class HushijiandanComponent implements OnInit {
|
1318
|
1385
|
let now = new Date();
|
1319
|
1386
|
let nHour = now.getHours();
|
1320
|
1387
|
let nMinute = now.getMinutes();
|
1321
|
|
- console.log(hour, nHour);
|
1322
|
1388
|
if (hour === nHour || hour === undefined) {
|
1323
|
1389
|
if (nMinute == 0) {
|
1324
|
1390
|
return [];
|