Browse Source

项目委外bug处理

ljb 10 months ago
parent
commit
16b294114f

+ 5 - 2
src/views/project-manage/components/outsourcing-doc.vue

@@ -295,7 +295,10 @@ export default {
   watch: {
   watch: {
     "params.xmId"() {
     "params.xmId"() {
       this.getListData();
       this.getListData();
-    }
+    },
+    "params.yearAndMonth"() {
+      this.getListData();
+    },
   },
   },
   mounted() {
   mounted() {
     this.params.xmId = this.projectId;
     this.params.xmId = this.projectId;
@@ -305,7 +308,7 @@ export default {
       this.selProject = data;
       this.selProject = data;
     },
     },
     getListData() {
     getListData() {
-      if (!this.params.xmId) {
+      if (!this.params.xmId || !this.params.yearAndMonth) {
         return;
         return;
       }
       }
       this.loading = true;
       this.loading = true;

+ 5 - 1
src/views/yf-cost-manage/basic-data-setting/working-hours-records.vue

@@ -183,9 +183,13 @@ export default window.$crudCommon({
         if (key.indexOf(this.params.yearAndMonth) > -1) {
         if (key.indexOf(this.params.yearAndMonth) > -1) {
           let oldObj = _oldMonthData.find(old => old.workDate == key) || {};
           let oldObj = _oldMonthData.find(old => old.workDate == key) || {};
           if (this.form[key] || oldObj.workHours) {
           if (this.form[key] || oldObj.workHours) {
+            let workHours = this.form[key];
+            if (workHours === undefined || workHours === null || workHours === '') {
+              workHours = null;
+            }
             dailyAttendances.push({
             dailyAttendances.push({
               workDate: key,
               workDate: key,
-              workHours: this.form[key] || ''
+              workHours
             });
             });
           }
           }
           delete newFormData[key];
           delete newFormData[key];