wenhongquan пре 1 година
родитељ
комит
3d706e889b
1 измењених фајлова са 10 додато и 5 уклоњено
  1. 10 5
      src/views/car/work/schedule.vue

+ 10 - 5
src/views/car/work/schedule.vue

@@ -146,6 +146,7 @@ const initFormData: CarScheduleForm = {
 const selectDate = ref<Date>(null)
 const selectDate = ref<Date>(null)
 
 
 const stopWatch = watch(selectDate, (newVal, oldVal) => {
 const stopWatch = watch(selectDate, (newVal, oldVal) => {
+
   initList(newVal)
   initList(newVal)
 })
 })
 
 
@@ -206,11 +207,14 @@ const getcarInfoList = async () => {
 }
 }
 
 
 const getScheduleData = () => {
 const getScheduleData = () => {
+
+  // let current =selectDate.value==null?moment(): moment(selectDate.value);
+  // let startdate = current.add(-1 * current.date() + 1, "day").format('YYYY-MM-DD');
+  // let enddate = current.add(-1 * current.date() + 1, "day").add(1, "month").format('YYYY-MM-DD');
   // console.log(1111111111111111111111)
   // console.log(1111111111111111111111)
-  var year = new Date().getFullYear();
+  // var year = new Date().getFullYear();
   var obj = {
   var obj = {
-    starttime: year + "-01-01",
-    endtime: year + "-12-31"
+    getallday: "sds"
   }
   }
   listCarSchedule({ pageSize: 1000, params: obj }).then(res => {
   listCarSchedule({ pageSize: 1000, params: obj }).then(res => {
     scheduleList.value = res.rows
     scheduleList.value = res.rows
@@ -219,10 +223,10 @@ const getScheduleData = () => {
   })
   })
 }
 }
 
 
-const scheduleStatus = (data) => {
+const scheduleStatus = (datap) => {
   for (var index in scheduleList.value) {
   for (var index in scheduleList.value) {
     var date = moment(new Date(scheduleList.value[index].scheduleDate)).format('YYYY-MM-DD')
     var date = moment(new Date(scheduleList.value[index].scheduleDate)).format('YYYY-MM-DD')
-    if (data == date) {
+    if (datap == date) {
       return true
       return true
     }
     }
   }
   }
@@ -491,6 +495,7 @@ const initData = async () => {
 
 
 
 
 const initList = (val) => {
 const initList = (val) => {
+
   queryParams.value.params.scheduleDate = moment(val).format('YYYY-MM-DD');
   queryParams.value.params.scheduleDate = moment(val).format('YYYY-MM-DD');
   listCarSchedule(queryParams.value).then(res => {
   listCarSchedule(queryParams.value).then(res => {
     table.value.setDataList(res.rows);
     table.value.setDataList(res.rows);