"use strict";

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(require("react"));
var _vmTable = _interopRequireDefault(require("../../../vm-table"));
var _index = require("../../index");
var _api = require("../../api");
require("./index.less");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
var columns = [{
  title: '垃圾净重(kg)',
  dataIndex: 'netWeight',
  align: 'right',
  width: 120,
  sorter: function sorter(a, b) {
    return a.netWeight - b.netWeight;
  }
}, {
  title: '垃圾桶数',
  dataIndex: 'trashNum',
  align: 'right',
  width: 120,
  sorter: function sorter(a, b) {
    return a.trashNum - b.trashNum;
  }
}, {
  title: '收运时间',
  dataIndex: 'weighTime',
  ellipsis: true,
  width: 160,
  sorter: function sorter(a, b) {
    return a.weighTime > b.weighTime ? 1 : -1;
  }
}, {
  title: '收运车辆',
  ellipsis: true,
  width: 160,
  dataIndex: 'carCode'
}];
var DetailList = function DetailList(_ref) {
  var startTime = _ref.startTime,
    endTime = _ref.endTime;
  var _useContext = (0, _react.useContext)(_index.RestaurantContext),
    id = _useContext.id,
    garbageType = _useContext.garbageType;
  var rows = _api.BasicService.detailList({
    id: id,
    startTime: startTime,
    endTime: endTime,
    garbageType: garbageType
  });
  return /*#__PURE__*/_react["default"].createElement(_vmTable["default"], {
    columns: columns,
    dataSource: rows,
    size: "small",
    pagination: false,
    height: 200
  });
};
var _default = exports["default"] = DetailList;
//# sourceMappingURL=DetailList.js.map
