"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = CZZ;
var _react = _interopRequireDefault(require("react"));
require("./index.less");
var _api = require("../../api");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function CZZ(_ref) {
  var id = _ref.id;
  var _a, _b, _c, _d;
  var _BaseService$useCzzxx = _api.BaseService.useCzzxx(id),
    czzxxData = _BaseService$useCzzxx.czzxxData;
  var columns_left = [{
    name: '总数',
    key: 'hsxslc',
    num: (_a = czzxxData === null || czzxxData === void 0 ? void 0 : czzxxData.totalCzzCount) !== null && _a !== void 0 ? _a : 0,
    unit: '单'
  }, {
    name: '已运输量',
    key: 'zysc',
    num: (_b = czzxxData === null || czzxxData === void 0 ? void 0 : czzxxData.yysWeight) !== null && _b !== void 0 ? _b : 0,
    unit: '吨'
  }];
  var columns_right = [{
    name: '备案量',
    key: 'lxpy',
    num: (_c = czzxxData === null || czzxxData === void 0 ? void 0 : czzxxData.baWeight) !== null && _c !== void 0 ? _c : 0,
    unit: '吨'
  }, {
    name: '剩余量',
    key: 'tccs',
    num: (_d = czzxxData === null || czzxxData === void 0 ? void 0 : czzxxData.syWeight) !== null && _d !== void 0 ? _d : 0,
    unit: '吨'
  }];
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
    className: "jzlj-card-title"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "jzlj-card-title-text"
  }, "\u5904\u7F6E\u8BC1\u4FE1\u606F")), /*#__PURE__*/_react["default"].createElement("div", {
    className: "jzlj-card-content"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "czz"
  }, [columns_left, columns_right].map(function (column, index) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "czz-item",
      key: index
    }, column.map(function (item) {
      return /*#__PURE__*/_react["default"].createElement("div", {
        style: {
          textAlign: 'center'
        },
        key: item.key
      }, /*#__PURE__*/_react["default"].createElement("div", {
        className: "name"
      }, item.name), /*#__PURE__*/_react["default"].createElement("div", {
        className: "num"
      }, /*#__PURE__*/_react["default"].createElement("span", null, item.num), /*#__PURE__*/_react["default"].createElement("span", {
        className: "unit"
      }, item.unit)));
    }));
  }))));
}
//# sourceMappingURL=CZZ.js.map
