|
@@ -299,12 +299,15 @@ export default {
|
|
|
console.log(this.bookservantInfo.workers);
|
|
|
let validWorker = [];
|
|
|
let failworker = '';
|
|
|
- let ss=0;
|
|
|
+ let ss=this.bookservantInfo.workers.filter(e=>{
|
|
|
+ return e.bookDate!=null||e.bookDate!=''||e.bookStartTime!=null||e.bookStartTime!='';
|
|
|
+ })
|
|
|
+ if(ss==null||ss.length==0){
|
|
|
+ failworker = "至少选择一个预约日期;";
|
|
|
+ return [];
|
|
|
+ }
|
|
|
this.bookservantInfo.workers.forEach(e => {
|
|
|
- ss++;
|
|
|
- if(e.bookDate==null||e.bookDate==''||e.bookStartTime==null||e.bookStartTime==''){
|
|
|
- failworker=failworker+'第'+ss+'个服务人员,没选服务时间;';
|
|
|
- }
|
|
|
+
|
|
|
if (e.workerId != null && e.workerId != '' && e.workerName != null && e.workerName != '' &&
|
|
|
(e.type == null || e.workerSkillId == null || e.workerSkillId == '' || e.workerName == null || e.workerName == ''
|
|
|
)
|
|
@@ -315,11 +318,11 @@ export default {
|
|
|
if (e.type != null && e.workerSkillId != null && e.workerSkillId != ''
|
|
|
&& e.workerId != null && e.workerId != '' && e.workerName != null && e.workerName != ''
|
|
|
) {
|
|
|
- if (e.type == 0 && e.scheduleId != null && e.scheduleId != '') {
|
|
|
- validWorker.push(e);
|
|
|
- } else {
|
|
|
- validWorker.push(e);
|
|
|
- }
|
|
|
+ validWorker.push(e);
|
|
|
+ // if (e.type == 0 && e.scheduleId != null && e.scheduleId != '') {
|
|
|
+ // } else {
|
|
|
+ // validWorker.push(e);
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
this.failworker = failworker;
|