ソースを参照

修改 截取页面字符串问题

阿伏兔 4 年 前
コミット
933b896978

+ 12 - 12
src/views/track/cabinet/index.vue

@@ -700,18 +700,18 @@ export default {
           if (e.orderStatus == 80) {
             e.orderStatus="回单"
           }
-        });
-        response.rows.map((e) => {
-          e.acceptDate = e.acceptDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.loadDate = e.loadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.mdLoadDate = e.mdLoadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.unLoadDate = e.unLoadDate.substring(0, 10);
+           if (e.loadDate) {
+             this.$set(e, 'loadDate', e.loadDate.substring(0, 10))
+           }
+           if (e.acceptDate) {
+             this.$set(e, 'acceptDate', e.acceptDate.substring(0, 10))
+           }
+           if (e.mdLoadDate) {
+             this.$set(e, 'mdLoadDate', e.mdLoadDate.substring(0, 10))
+           }
+           if (e.unLoadDate) {
+             this.$set(e, 'unLoadDate', e.unLoadDate.substring(0, 10))
+           }
         });
         this.ftmsorderbillscarsList = response.rows;
         this.total = response.total;

+ 13 - 13
src/views/track/goods/index.vue

@@ -700,19 +700,19 @@ export default {
           if (e.orderStatus == 80) {
             e.orderStatus="回单"
           }
-        });
-        response.rows.map((e) => {
-          e.acceptDate = e.acceptDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.loadDate = e.loadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.mdLoadDate = e.mdLoadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.unLoadDate = e.unLoadDate.substring(0, 10);
-        });
+           if (e.loadDate) {
+             this.$set(e, 'loadDate', e.loadDate.substring(0, 10))
+           }
+           if (e.acceptDate) {
+             this.$set(e, 'acceptDate', e.acceptDate.substring(0, 10))
+           }
+           if (e.mdLoadDate) {
+             this.$set(e, 'mdLoadDate', e.mdLoadDate.substring(0, 10))
+           }
+           if (e.unLoadDate) {
+             this.$set(e, 'unLoadDate', e.unLoadDate.substring(0, 10))
+           }
+         });
         this.ftmsorderbillscarsList = response.rows;
         this.total = response.total;
         this.loading = false;

+ 17 - 17
src/views/track/meetSingle/index.vue

@@ -695,24 +695,24 @@ export default {
             e.orderStatus="还卸柜"
           }
           if (e.orderStatus == 70) {
-            e.orderStatus="费用确认"
+            e.orderStatus = "费用确认"
           }
-          if (e.orderStatus == 80) {
-            e.orderStatus="回单"
-          }
-        });
-        response.rows.map((e) => {
-          e.acceptDate = e.acceptDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.loadDate = e.loadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.mdLoadDate = e.mdLoadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.unLoadDate = e.unLoadDate.substring(0, 10);
-        });
+           if (e.orderStatus == 80) {
+             e.orderStatus = "回单"
+           }
+           if (e.loadDate) {
+             this.$set(e, 'loadDate', e.loadDate.substring(0, 10))
+           }
+           if (e.acceptDate) {
+             this.$set(e, 'acceptDate', e.acceptDate.substring(0, 10))
+           }
+           if (e.mdLoadDate) {
+             this.$set(e, 'mdLoadDate', e.mdLoadDate.substring(0, 10))
+           }
+           if (e.unLoadDate) {
+             this.$set(e, 'unLoadDate', e.unLoadDate.substring(0, 10))
+           }
+         });
         this.ftmsorderbillscarsList = response.rows;
         this.total = response.total;
         this.loading = false;

+ 12 - 12
src/views/track/receipt/index.vue

@@ -700,18 +700,18 @@ export default {
           if (e.orderStatus == 80) {
             e.orderStatus="回单"
           }
-        });
-        response.rows.map((e) => {
-          e.acceptDate = e.acceptDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.loadDate = e.loadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.mdLoadDate = e.mdLoadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.unLoadDate = e.unLoadDate.substring(0, 10);
+           if (e.loadDate) {
+             this.$set(e, 'loadDate', e.loadDate.substring(0, 10))
+           }
+           if (e.acceptDate) {
+             this.$set(e, 'acceptDate', e.acceptDate.substring(0, 10))
+           }
+           if (e.mdLoadDate) {
+             this.$set(e, 'mdLoadDate', e.mdLoadDate.substring(0, 10))
+           }
+           if (e.unLoadDate) {
+             this.$set(e, 'unLoadDate', e.unLoadDate.substring(0, 10))
+           }
         });
         this.ftmsorderbillscarsList = response.rows;
         this.total = response.total;

+ 12 - 12
src/views/track/suitcase/index.vue

@@ -700,18 +700,18 @@ export default {
           if (e.orderStatus == 80) {
             e.orderStatus="回单"
           }
-        });
-        response.rows.map((e) => {
-          e.acceptDate = e.acceptDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.loadDate = e.loadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.mdLoadDate = e.mdLoadDate.substring(0, 10);
-        });
-        response.rows.map((e) => {
-          e.unLoadDate = e.unLoadDate.substring(0, 10);
+          if (e.loadDate) {
+            this.$set(e, 'loadDate', e.loadDate.substring(0, 10))
+          }
+          if (e.acceptDate) {
+            this.$set(e, 'acceptDate', e.acceptDate.substring(0, 10))
+          }
+          if (e.mdLoadDate) {
+            this.$set(e, 'mdLoadDate', e.mdLoadDate.substring(0, 10))
+          }
+          if (e.unLoadDate) {
+            this.$set(e, 'unLoadDate', e.unLoadDate.substring(0, 10))
+          }
         });
         this.ftmsorderbillscarsList = response.rows;
         this.total = response.total;