Browse Source

齐套率列表时间格式化

jbb 2 years ago
parent
commit
d0245dd736
1 changed files with 6 additions and 13 deletions
  1. 6 13
      src/views/reportForms/full-rate-table.vue

+ 6 - 13
src/views/reportForms/full-rate-table.vue

@@ -214,9 +214,6 @@ export default {
           dataIndex: 'deliveryDate',
           width: 120,
           className: 'replacecolor',
-          customRender: text => {
-            return moment(text).format('YYYY-MM-DD')
-          }
         },
         {
           title: '部门',
@@ -272,9 +269,6 @@ export default {
           width: 120,
           customRender: t => ellipsis(t),
           className: 'replacecolor',
-          customRender: text => {
-            return moment(text).format('YYYY-MM-DD')
-          }
         },
 
         {
@@ -282,18 +276,12 @@ export default {
           dataIndex: 'earliestIssueDate',
           width: 120,
           className: 'replacecolor',
-          customRender: text => {
-            return moment(text).format('YYYY-MM-DD')
-          }
         },
         {
           title: '最晚出库日期',
           dataIndex: 'latestIssueDate',
           width: 120,
           className: 'replacecolor',
-          customRender: text => {
-            return moment(text).format('YYYY-MM-DD')
-          }
           
         },
         {
@@ -357,11 +345,16 @@ export default {
     getfullrateData(){
       this.$nextTick(() => {
         this.loading = true
-        this.queryParam.pageSize =3
         fullRateList(this.queryParam).then(res => {
           this.loading = false
           if (res.success) {
             this.fullrateData = res.result.records;
+            this.fullrateData.map(item=>{
+              item.deliveryDate = (item.deliveryDate=='')?'':(moment(item.deliveryDate).format('YYYY-MM-DD'))
+              item.earliestIssueDate = (item.earliestIssueDate=='')?'':(moment(item.earliestIssueDate).format('YYYY-MM-DD'))
+              item.estimatedDeliveryDate = (item.estimatedDeliveryDate=='')?'':(moment(item.estimatedDeliveryDate).format('YYYY-MM-DD'))
+              item.latestIssueDate = (item.latestIssueDate=='')?'':(moment(item.latestIssueDate).format('YYYY-MM-DD'))
+            })
             this.pagination = {
               total: res.result.total,
               current: res.result.current,