wangxinhui
昨天 a8756c3526832332db4ef5685348d9b188c2bf2b
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/stock/ProStockView.js
@@ -78,6 +78,29 @@
          }
        }
        if (column.field == 'proinventoryage') {
          const today = new Date()
          column.formatter = (row) => {
              if (row.details.length > 0) {
                  const closestDate = row.details
                      .map(x => {
                          const date = new Date(x.createDate);
                          const ageInDays = Math.ceil((today - date) / (1000 * 60 * 60 * 24));
                          return { date, ageInDays };
                      })
                      .reduce((closest, current) => (current.ageInDays < closest.ageInDays ? current : closest))
                      .date;
                  const inventoryAge = Math.ceil((today - closestDate) / (1000 * 60 * 60 * 24));
                  row.inventoryAge = inventoryAge;
                  return `${inventoryAge} å¤©`;
              }
              // å¦‚果没有明细,返回空或提示信息
              return '-';
          }
        }
        if (column.field == 'sumStock') {
          column.formatter = (row) => {
            if (row.details.length > 0) {