UNPKG

@fle-ui/plus-goods-detail-drawer

Version:

@fle-ui/plus-goods-detail-drawer

671 lines (670 loc) 65 kB
"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 _antd = require("antd"); var _dayjs = _interopRequireDefault(require("dayjs")); var _DescriptionsItem = require("../DescriptionsItem"); var _SkuTable = _interopRequireDefault(require("../SkuTable")); var _SectionTable = _interopRequireDefault(require("../SectionTable")); var _DateDiffText = _interopRequireDefault(require("../DateDiffText")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } // 常量定义 var DEFAULT_UNIT = '个'; var SAMPLE_LIMIT_TYPES = { UNLIMITED: 1, TOTAL_LIMIT: 2, SPEC_LIMIT: 3 }; var SAMPLE_LIMIT_RULES = { BY_ENTERPRISE: 1, BY_PERSON: 2 }; var PRICING_TYPES = { STAIR: 1, SPEC: 2 }; var SalesInfoSection = function SalesInfoSection(_ref) { var _salesInfo$sampleSale2, _changeContent$onceIn, _salesInfo$onceInfo, _changeContent$onceIn2, _beforeContent$onceIn5, _salesInfo$onceInfo2, _changeContent$onceIn3, _beforeContent$onceIn6, _salesInfo$onceInfo3, _changeContent$onceIn4, _beforeContent$onceIn7, _salesInfo$onceInfo4, _changeContent$purcha, _changeContent$purcha2, _changeContent$purcha3, _beforeContent$purcha11, _salesInfo$purchaseIn2, _changeContent$purcha4, _beforeContent$purcha12, _salesInfo$purchaseIn3, _salesInfo$purchaseIn4, _beforeContent$purcha13, _beforeContent$purcha14, _salesInfo$purchaseIn5, _beforeContent$purcha15, _beforeContent$purcha16, _salesInfo$purchaseIn6, _salesInfo$purchaseIn7, _salesInfo$purchaseIn8, _salesInfo$purchaseIn9, _beforeContent$purcha17, _beforeContent$purcha18, _salesInfo$purchaseIn10, _beforeContent$purcha19, _salesInfo$purchaseIn11, _changeContent$sample, _salesInfo$sampleSale4, _salesInfo$sampleSale5, _changeContent$sample2, _beforeContent$sample3, _salesInfo$sampleSale6, _changeContent$sample3, _salesInfo$sampleSale7, _salesInfo$sampleSale8, _beforeContent$sample4, _beforeContent$sample5, _beforeContent$sample6, _salesInfo$sampleSale9, _salesInfo$sampleSale10, _changeContent$sample4, _beforeContent$sample7, _beforeContent$sample8, _salesInfo$sampleSale11, _salesInfo$sampleSale12, _salesInfo$sampleSale13, _changeContent$sample5, _salesInfo$sampleSale14, _changeContent$stockI, _changeContent$stockI2, _salesInfo$stockInfo2, _salesInfo$stockInfo3, _salesInfo$stockInfo4, _salesInfo$stockInfo5, _changeContent$stockI3, _changeContent$stockI4, _beforeContent$stockI, _beforeContent$stockI2, _salesInfo$stockInfo6, _salesInfo$stockInfo7, _changeContent$stockI5, _beforeContent$stockI3, _beforeContent$stockI4, _salesInfo$stockInfo8, _salesInfo$stockInfo9, _salesInfo$stockInfo10, _changeContent$stockI6, _beforeContent$stockI5, _salesInfo$stockInfo11, _salesInfo$stockInfo12, _changeContent$stockI7, _beforeContent$stockI6, _salesInfo$stockInfo13, _salesInfo$stockInfo14, _salesInfo$stockInfo15, _changeContent$stockI8, _beforeContent$skuLis2, _salesInfo$stockInfo16, _beforeContent$stockI7, _beforeContent$stockI8, _beforeContent$stockI9, _changeContent$stockI9, _beforeContent$stockI10, _beforeContent$stockI11, _changeContent$weight, _beforeContent$weight, _salesInfo$weightVolu, _changeContent$weight2, _beforeContent$weight2, _salesInfo$weightVolu2, _changeContent$afterS, _beforeContent$afterS, _salesInfo$afterSales, _beforeContent$orderI; var isSelf = _ref.isSelf, salesType = _ref.salesType, salesInfo = _ref.salesInfo, basicInfo = _ref.basicInfo, beforeContent = _ref.beforeContent, changeContent = _ref.changeContent, isAudit = _ref.isAudit, hideFields = _ref.hideFields; // 早期返回 if (hideFields === null || hideFields === void 0 ? void 0 : hideFields.includes('salesInfo')) { return null; } // 缓存计算结果 var _useMemo = (0, _react.useMemo)(function () { var _salesInfo$purchaseIn, _beforeContent$purcha; var skuList = basicInfo.skuList, unit = basicInfo.unit; var hasMultiSku = basicInfo.isExistSpec && skuList && skuList.length > 0; var measureUnit = ((_salesInfo$purchaseIn = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn === void 0 ? void 0 : _salesInfo$purchaseIn.measureUnit) || unit || DEFAULT_UNIT; var recordUnit = (beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.unit) || unit || DEFAULT_UNIT; var recordMeasureUnit = (beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha = beforeContent.purchaseInfo) === null || _beforeContent$purcha === void 0 ? void 0 : _beforeContent$purcha.measureUnit) || measureUnit; var hasRecordMultiSku = (beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.isExistSpec) && (beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.skuList) && (beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.skuList.length) > 0; return { skuList: skuList, unit: unit || DEFAULT_UNIT, hasMultiSku: hasMultiSku, measureUnit: measureUnit, recordUnit: recordUnit, recordMeasureUnit: recordMeasureUnit, hasRecordMultiSku: hasRecordMultiSku }; }, [basicInfo, salesInfo, beforeContent]), skuList = _useMemo.skuList, unit = _useMemo.unit, hasMultiSku = _useMemo.hasMultiSku, measureUnit = _useMemo.measureUnit, recordUnit = _useMemo.recordUnit, recordMeasureUnit = _useMemo.recordMeasureUnit, hasRecordMultiSku = _useMemo.hasRecordMultiSku; // 缓存表格头部配置 var getSkuThead = (0, _react.useCallback)(function () { var unit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_UNIT; return [{ name: "\u6210\u672C\u4EF7\uFF08\u5143/".concat(unit, "\uFF09"), key: 'purchasePrice' }].concat(_toConsumableArray(!isSelf ? [{ name: "\u9500\u552E\u4EF7\uFF08\u5143/".concat(unit, "\uFF09"), key: 'salePrice' }] : []), [{ name: "\u5E02\u573A\u4EF7\uFF08\u5143/".concat(unit, "\uFF09"), key: 'marketPrice' }, { name: '规格货号', key: 'goodsNo' }, { name: '69码', key: 'upc' }]); }, [isSelf]); var getSampleSkuThead = (0, _react.useCallback)(function (isSelf) { var _salesInfo$sampleSale; var measureUnit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_UNIT; var stockThead = (salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale === void 0 ? void 0 : _salesInfo$sampleSale.sampleLimitType) === SAMPLE_LIMIT_TYPES.SPEC_LIMIT ? [{ name: "\u6837\u54C1\u9650\u8D2D\u6570\u91CF\uFF08".concat(measureUnit, "\uFF09"), key: 'sampleLimitNum' }] : []; return isSelf ? [{ name: '样品价格(元)', key: 'supplierSamplePrice' }].concat(stockThead) : [{ name: '样品价格(元)', key: 'samplePrice' }].concat(stockThead); }, [salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale2 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale2 === void 0 ? void 0 : _salesInfo$sampleSale2.sampleLimitType]); // 缓存内容生成函数 var getPriceEffectiveContent = (0, _react.useCallback)(function (priceEffective) { return priceEffective ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _dayjs.default)(priceEffective).format('YYYY-MM-DD'), "\uFF08", /*#__PURE__*/_react.default.createElement(_DateDiffText.default, { date: priceEffective }), "\uFF09") : '-'; }, []); var getSkuPriceTable = (0, _react.useCallback)(function (skuList, skuPriceList, unit) { var thead = getSkuThead(unit || DEFAULT_UNIT); return /*#__PURE__*/_react.default.createElement(_SkuTable.default, { skuList: skuList || [], skuPriceList: skuPriceList, thead: thead }); }, [getSkuThead]); var getPurchaseSectionTable = (0, _react.useCallback)(function (stairList, measureUnit) { return /*#__PURE__*/_react.default.createElement(_SectionTable.default, { data: stairList, previewText: "\u9884\u89C8\uFF08\u6839\u636E\u4E70\u5BB6\u91C7\u8D2D\u7684\u4E0D\u540C\u6570\u91CF\u5BF9\u5E94\u4E0D\u540C\u4EF7\u683C\uFF09", thead: [{ name: "\u8D2D\u4E70\u6570\u91CF\uFF08".concat(measureUnit, "\uFF09"), key: 'minNum', unit: measureUnit }, { name: "\u9500\u552E\u5355\u4EF7\uFF08\u5143/".concat(measureUnit, "\uFF09"), key: 'salePrice', unit: "\u5143/".concat(measureUnit) }] }); }, []); var getStockSupportText = (0, _react.useCallback)(function (isSupportSpot, isSupportContract) { return /*#__PURE__*/_react.default.createElement(_antd.Space, null, isSupportSpot && /*#__PURE__*/_react.default.createElement("span", null, "\u73B0\u8D27"), isSupportContract && /*#__PURE__*/_react.default.createElement("span", null, "\u8BA2\u8D27")); }, []); var getContractRangeContent = (0, _react.useCallback)(function (contractMax, reserveList, unit) { return reserveList && reserveList.length > 0 ? /*#__PURE__*/_react.default.createElement(_SectionTable.default, { previewMaxNumber: contractMax, data: reserveList, thead: [{ unit: unit, name: "\u8BA2\u8D27\u6570\u91CF\uFF08".concat(unit, "\uFF09"), key: 'number' }, { name: '预计出货时间(天)', key: 'shipmentDay', unit: '天' }] }) : '-'; }, []); var getOrderInfoContent = (0, _react.useCallback)(function (orderInfoList) { return (orderInfoList === null || orderInfoList === void 0 ? void 0 : orderInfoList.length) > 0 ? /*#__PURE__*/_react.default.createElement(_SectionTable.default, { showPreview: false, data: orderInfoList, thead: [{ name: '下单信息', key: 'label' }, { name: '下单提示', key: 'placeholder' }, { name: '是否必填', key: 'isMust' }] }) : '-'; }, []); var getSampleLimitText = (0, _react.useCallback)(function (sampleLimitType, sampleLimitTotal) { var measureUnit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_UNIT; if (sampleLimitType === SAMPLE_LIMIT_TYPES.UNLIMITED) { return '不限(按库存售卖)'; } if (sampleLimitType === SAMPLE_LIMIT_TYPES.TOTAL_LIMIT) { return "".concat(sampleLimitTotal).concat(measureUnit); } return '-'; }, []); var getSampleLimitRulesText = (0, _react.useCallback)(function (sampleLimitRules, sampleLimitRulesNum) { var measureUnit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_UNIT; if (!sampleLimitRulesNum) { return '-'; } if (sampleLimitRules === SAMPLE_LIMIT_RULES.BY_ENTERPRISE) { return "\u6309\u4F01\u4E1A\u9650\u552E\uFF0C\u6BCF\u4E2A\u4F01\u4E1A\u9650\u552E".concat(sampleLimitRulesNum).concat(measureUnit); } if (sampleLimitRules === SAMPLE_LIMIT_RULES.BY_PERSON) { return "\u6309\u4EBA\u9650\u552E\uFF0C\u6BCF\u4EBA\u9650\u552E".concat(sampleLimitRulesNum).concat(measureUnit); } return '-'; }, []); // 缓存复杂计算结果 var recordOnceInfoContent = (0, _react.useMemo)(function () { var _beforeContent$skuLis, _beforeContent$onceIn2, _beforeContent$onceIn3, _beforeContent$onceIn4; var hasMultiSkuForType = (beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$skuLis = beforeContent.skuList) === null || _beforeContent$skuLis === void 0 ? void 0 : _beforeContent$skuLis.length) || 0 > 0; if (hasMultiSkuForType) { var _beforeContent$onceIn; return getSkuPriceTable(beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.skuList, beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$onceIn = beforeContent.onceInfo) === null || _beforeContent$onceIn === void 0 ? void 0 : _beforeContent$onceIn.skuPriceList, recordUnit); } return /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { bordered: true, size: "small", style: { paddingLeft: 0 }, labelStyle: { width: 100 }, items: [{ label: '成本价', children: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$onceIn2 = beforeContent.onceInfo) === null || _beforeContent$onceIn2 === void 0 ? void 0 : _beforeContent$onceIn2.purchasePriceMin }, !isSelf && { label: '销售价', children: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$onceIn3 = beforeContent.onceInfo) === null || _beforeContent$onceIn3 === void 0 ? void 0 : _beforeContent$onceIn3.salePriceMin }, { label: '市场价', children: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$onceIn4 = beforeContent.onceInfo) === null || _beforeContent$onceIn4 === void 0 ? void 0 : _beforeContent$onceIn4.marketPriceMin }].filter(Boolean) }); }, [beforeContent, isSelf, recordUnit, getSkuPriceTable]); var recordPurchasePriceSection = (0, _react.useMemo)(function () { var _ref2 = (beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.purchaseInfo) || {}, pricingType = _ref2.pricingType, stairList = _ref2.stairList; var _ref3 = beforeContent || {}, skuList = _ref3.skuList, unit = _ref3.unit; if (pricingType === PRICING_TYPES.STAIR) { return getPurchaseSectionTable(stairList || [], recordMeasureUnit); } if (hasRecordMultiSku) { var _beforeContent$purcha2; return getSkuPriceTable(skuList, beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha2 = beforeContent.purchaseInfo) === null || _beforeContent$purcha2 === void 0 ? void 0 : _beforeContent$purcha2.skuPriceList, unit || unit); } return '-'; }, [beforeContent, hasRecordMultiSku, recordMeasureUnit, getPurchaseSectionTable, getSkuPriceTable]); var recordPurchaseContent = (0, _react.useMemo)(function () { var _beforeContent$purcha3, _beforeContent$purcha4, _beforeContent$purcha5, _beforeContent$purcha6, _beforeContent$purcha7, _beforeContent$purcha8, _beforeContent$purcha9, _beforeContent$purcha10; if (!beforeContent.isPurchase) return '-'; var basicContent = /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { bordered: true, size: "small", labelStyle: { width: 100 }, items: [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.measureUnit', label: '计量单位', children: "\u6309".concat(recordMeasureUnit, "\u9500\u552E") }), (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.isContainsTax', label: '是否含税', children: (beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha3 = beforeContent.purchaseInfo) === null || _beforeContent$purcha3 === void 0 ? void 0 : _beforeContent$purcha3.isContainsTax) ? '是' : '否' }), (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.pricingType', label: '定价方式', children: (beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha4 = beforeContent.purchaseInfo) === null || _beforeContent$purcha4 === void 0 ? void 0 : _beforeContent$purcha4.pricingType) === PRICING_TYPES.STAIR ? '按阶梯定价' : '按规格定价' })].concat(_toConsumableArray((beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha5 = beforeContent.purchaseInfo) === null || _beforeContent$purcha5 === void 0 ? void 0 : _beforeContent$purcha5.pricingType) === PRICING_TYPES.STAIR ? [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.purchasePrice', label: '成本价', children: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha6 = beforeContent.purchaseInfo) === null || _beforeContent$purcha6 === void 0 ? void 0 : _beforeContent$purcha6.purchasePriceMin }), (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.marketPrice', label: '市场价', children: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha7 = beforeContent.purchaseInfo) === null || _beforeContent$purcha7 === void 0 ? void 0 : _beforeContent$purcha7.marketPriceMin })] : [])).filter(Boolean) }); var pricingContent = /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { column: 1, colon: false, size: "small", layout: "vertical", items: [(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha8 = beforeContent.purchaseInfo) === null || _beforeContent$purcha8 === void 0 ? void 0 : _beforeContent$purcha8.pricingType) === PRICING_TYPES.STAIR ? ((_beforeContent$purcha9 = beforeContent.purchaseInfo) === null || _beforeContent$purcha9 === void 0 ? void 0 : _beforeContent$purcha9.stairList) && ((_beforeContent$purcha10 = beforeContent.purchaseInfo) === null || _beforeContent$purcha10 === void 0 ? void 0 : _beforeContent$purcha10.stairList.length) > 0 && (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.stairList', label: '阶梯定价明细', children: recordPurchasePriceSection }) : hasRecordMultiSku && (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.price', label: '规格定价明细', children: recordPurchasePriceSection })].filter(Boolean) }); return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, basicContent, pricingContent); }, [beforeContent, hasRecordMultiSku, recordMeasureUnit, recordPurchasePriceSection, hideFields]); var recordSamplePriceContent = (0, _react.useMemo)(function () { var _beforeContent$sample, _beforeContent$sample2; return hasRecordMultiSku ? /*#__PURE__*/_react.default.createElement(_SkuTable.default, { skuList: (beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.skuList) || [], skuPriceList: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample = beforeContent.sampleSalesInfo) === null || _beforeContent$sample === void 0 ? void 0 : _beforeContent$sample.skuPriceList, thead: getSampleSkuThead(isSelf, recordMeasureUnit) }) : beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample2 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample2 === void 0 ? void 0 : _beforeContent$sample2.samplePrice; }, [beforeContent, hasRecordMultiSku, isSelf, recordMeasureUnit, getSampleSkuThead]); var recordSampleContent = (0, _react.useMemo)(function () { var _salesInfo$sampleSale3; var _ref4 = beforeContent || {}, sampleSalesInfo = _ref4.sampleSalesInfo, skuList = _ref4.skuList; if (!(sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.isSupportSample)) return '-'; var basicContent = /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { bordered: true, colon: false, size: "small", labelStyle: { width: 100 }, column: { sm: 1, md: 2, xxl: 3 }, contentStyle: { maxWidth: 0 }, items: [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '支持拿样', key: 'salesInfo.sampleSalesInfo.supportSample', children: (sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.isSupportSample) ? '是' : '否' })].concat(_toConsumableArray(hasRecordMultiSku ? [] : [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '样品价格', key: 'salesInfo.sampleSalesInfo.price', children: recordSamplePriceContent })]), _toConsumableArray((salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale3 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale3 === void 0 ? void 0 : _salesInfo$sampleSale3.sampleLimitType) !== SAMPLE_LIMIT_TYPES.SPEC_LIMIT ? [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.limitTotal', label: '样品限售总数', children: getSampleLimitText(sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.sampleLimitType, sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.sampleLimitTotal) })] : []), [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '样品限售规则', key: 'salesInfo.sampleSalesInfo.rules', children: getSampleLimitRulesText(sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.sampleLimitRules, sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.sampleLimitRulesNum, measureUnit || unit) })]).filter(Boolean) }); var pricingContent = hasRecordMultiSku ? /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { layout: "vertical", colon: false, items: [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '样品价格', key: 'salesInfo.sampleSalesInfo.price', children: /*#__PURE__*/_react.default.createElement(_SkuTable.default, { skuList: skuList, skuPriceList: sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.skuPriceList, thead: getSampleSkuThead(isSelf, recordMeasureUnit) }) })].filter(Boolean) }) : null; return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, basicContent, pricingContent); }, [beforeContent, hasRecordMultiSku, salesInfo, measureUnit, unit, recordSamplePriceContent, getSampleLimitText, getSampleLimitRulesText, getSampleSkuThead, isSelf, recordMeasureUnit, hideFields]); var stockInfoContent = (0, _react.useMemo)(function () { var _salesInfo$stockInfo; var _ref5 = beforeContent || {}, isOnce = _ref5.isOnce, isPurchase = _ref5.isPurchase, stockInfo = _ref5.stockInfo, skuList = _ref5.skuList; if (!isOnce && !isPurchase) return '-'; var basicContent = /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { bordered: true, size: "small", colon: false, labelStyle: { width: 100 }, column: { sm: 1, md: 2, xl: 3 }, contentStyle: { maxWidth: 0 }, items: [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '货品类型', key: 'salesInfo.stockInfo.supplyMode', children: getStockSupportText(stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.isSupportSpot, stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.isSupportContract) }), (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '箱规', key: 'salesInfo.stockInfo.boxNumber', children: (stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.boxNumber) ? "".concat(stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.boxNumber).concat(unit, "/\u7BB1") : '-' })].concat(_toConsumableArray((salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$stockInfo = salesInfo.stockInfo) === null || _salesInfo$stockInfo === void 0 ? void 0 : _salesInfo$stockInfo.isSupportSpot) ? [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '现货出货时间', key: 'salesInfo.stockInfo.shipmentDay', children: (stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.shipmentDay) ? "".concat(stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.shipmentDay, "\u5929") : '-' }), (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '现货库存总数', key: 'salesInfo.stockInfo.stock', children: (stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.stock) ? "".concat(stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.stock).concat(unit) : '-' })] : [])).filter(Boolean) }); var spotContent = hasRecordMultiSku && (stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.isSupportSpot) ? /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { size: "small", layout: "vertical", colon: false, items: [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '现货库存明细', key: 'salesInfo.stockInfo.stock', children: /*#__PURE__*/_react.default.createElement(_SkuTable.default, { skuList: skuList, thead: [{ name: "\u5E93\u5B58\u6570\uFF08".concat(unit, "\uFF09"), key: 'stock' }] }) })].filter(Boolean) }) : null; var contractContent = (stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.isSupportContract) ? /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { size: "small", layout: "vertical", colon: false, items: [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, label: '订货范围', key: 'salesInfo.stockInfo.reserveList', children: getContractRangeContent(stockInfo.contractMax || 0, stockInfo.reserveList || [], recordMeasureUnit) })].filter(Boolean) }) : null; return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, basicContent, spotContent, contractContent); }, [beforeContent, salesInfo, unit, hasRecordMultiSku, recordMeasureUnit, getStockSupportText, getContractRangeContent, hideFields]); return /*#__PURE__*/_react.default.createElement("div", { id: "sales-info", className: "goods-detail-drawer-section" }, /*#__PURE__*/_react.default.createElement("div", { className: "goods-detail-drawer-section-title" }, "\u9500\u552E\u4FE1\u606F"), !isSelf && !(hideFields === null || hideFields === void 0 ? void 0 : hideFields.includes('salesInfo.priceEffective')) && /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { column: 1, colon: false, layout: "vertical", items: [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.priceEffective', label: '价格有效期', labelStyle: { fontWeight: '500', color: '#1d2531' }, isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : changeContent.priceEffective), beforeContent: getPriceEffectiveContent(beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.priceEffective), children: getPriceEffectiveContent(salesInfo.priceEffective) })].filter(Boolean) }), !(hideFields === null || hideFields === void 0 ? void 0 : hideFields.includes('salesInfo.onceInfo')) && /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { colon: false, size: "small", title: (0, _DescriptionsItem.getLabelDom)({ label: '一件代发交易信息', dynamicWidth: hasRecordMultiSku, tooltipPlacement: 'right', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$onceIn = changeContent.onceInfo) === null || _changeContent$onceIn === void 0 ? void 0 : _changeContent$onceIn.skuPriceList) && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : changeContent.skuList), beforeContent: recordOnceInfoContent }), column: { sm: 1, md: 2, lg: 3 }, labelStyle: { width: 100 }, bordered: salesType.isOnce && !hasMultiSku, items: salesType.isOnce ? hasMultiSku ? [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.onceInfo', children: getSkuPriceTable(skuList, (_salesInfo$onceInfo = salesInfo.onceInfo) === null || _salesInfo$onceInfo === void 0 ? void 0 : _salesInfo$onceInfo.skuPriceList, unit) })].filter(Boolean) : [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.onceInfo.purchasePrice', label: '成本价', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$onceIn2 = changeContent.onceInfo) === null || _changeContent$onceIn2 === void 0 ? void 0 : _changeContent$onceIn2.purchasePriceMin), beforeContent: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$onceIn5 = beforeContent.onceInfo) === null || _beforeContent$onceIn5 === void 0 ? void 0 : _beforeContent$onceIn5.purchasePriceMin, children: (_salesInfo$onceInfo2 = salesInfo.onceInfo) === null || _salesInfo$onceInfo2 === void 0 ? void 0 : _salesInfo$onceInfo2.purchasePriceMin }), !isSelf && (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.onceInfo.salePrice', label: '销售价', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$onceIn3 = changeContent.onceInfo) === null || _changeContent$onceIn3 === void 0 ? void 0 : _changeContent$onceIn3.salePriceMin), beforeContent: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$onceIn6 = beforeContent.onceInfo) === null || _beforeContent$onceIn6 === void 0 ? void 0 : _beforeContent$onceIn6.salePriceMin, children: (_salesInfo$onceInfo3 = salesInfo.onceInfo) === null || _salesInfo$onceInfo3 === void 0 ? void 0 : _salesInfo$onceInfo3.salePriceMin }), (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.onceInfo.marketPrice', label: '市场价', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$onceIn4 = changeContent.onceInfo) === null || _changeContent$onceIn4 === void 0 ? void 0 : _changeContent$onceIn4.marketPriceMin), beforeContent: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$onceIn7 = beforeContent.onceInfo) === null || _beforeContent$onceIn7 === void 0 ? void 0 : _beforeContent$onceIn7.marketPriceMin, children: (_salesInfo$onceInfo4 = salesInfo.onceInfo) === null || _salesInfo$onceInfo4 === void 0 ? void 0 : _salesInfo$onceInfo4.marketPriceMin })].filter(Boolean) : [{ children: '-' }] }), !(hideFields === null || hideFields === void 0 ? void 0 : hideFields.includes('salesInfo.purchaseInfo')) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { size: "small", title: (0, _DescriptionsItem.getLabelDom)({ label: '集采批发交易信息', dynamicWidth: true, tooltipPlacement: 'right', isChangeRecord: isAudit && ((0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : changeContent.isPurchase) || (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha = changeContent.purchaseInfo) === null || _changeContent$purcha === void 0 ? void 0 : _changeContent$purcha.skuPriceList)), beforeContent: recordPurchaseContent }), bordered: !!salesType.isPurchase, labelStyle: { width: 100 }, column: { sm: 1, md: 2, lg: 3 }, contentStyle: { maxWidth: 0 }, items: salesType.isPurchase ? [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.measureUnit', label: '计量单位', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha2 = changeContent.purchaseInfo) === null || _changeContent$purcha2 === void 0 ? void 0 : _changeContent$purcha2.measureUnit), beforeContent: "\u6309".concat(recordMeasureUnit, "\u9500\u552E"), children: "\u6309".concat(measureUnit, "\u9500\u552E") }), (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.isContainsTax', label: '是否含税', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha3 = changeContent.purchaseInfo) === null || _changeContent$purcha3 === void 0 ? void 0 : _changeContent$purcha3.isContainsTax), beforeContent: (beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha11 = beforeContent.purchaseInfo) === null || _beforeContent$purcha11 === void 0 ? void 0 : _beforeContent$purcha11.isContainsTax) ? '是' : '否', children: (salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$purchaseIn2 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn2 === void 0 ? void 0 : _salesInfo$purchaseIn2.isContainsTax) ? '是' : '否' }), (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.pricingType', label: '定价方式', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha4 = changeContent.purchaseInfo) === null || _changeContent$purcha4 === void 0 ? void 0 : _changeContent$purcha4.pricingType), beforeContent: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha12 = beforeContent.purchaseInfo) === null || _beforeContent$purcha12 === void 0 ? void 0 : _beforeContent$purcha12.pricingType, children: (salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$purchaseIn3 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn3 === void 0 ? void 0 : _salesInfo$purchaseIn3.pricingType) === PRICING_TYPES.STAIR ? '按阶梯定价' : '按规格定价' })].concat(_toConsumableArray((salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$purchaseIn4 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn4 === void 0 ? void 0 : _salesInfo$purchaseIn4.pricingType) === PRICING_TYPES.STAIR ? [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.purchasePrice', label: '成本价', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha13 = beforeContent.purchaseInfo) === null || _beforeContent$purcha13 === void 0 ? void 0 : _beforeContent$purcha13.purchasePriceMin), beforeContent: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha14 = beforeContent.purchaseInfo) === null || _beforeContent$purcha14 === void 0 ? void 0 : _beforeContent$purcha14.purchasePriceMin, children: salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$purchaseIn5 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn5 === void 0 ? void 0 : _salesInfo$purchaseIn5.purchasePriceMin }), (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.marketPrice', label: '市场价', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha15 = beforeContent.purchaseInfo) === null || _beforeContent$purcha15 === void 0 ? void 0 : _beforeContent$purcha15.marketPriceMin), beforeContent: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha16 = beforeContent.purchaseInfo) === null || _beforeContent$purcha16 === void 0 ? void 0 : _beforeContent$purcha16.marketPriceMin, children: salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$purchaseIn6 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn6 === void 0 ? void 0 : _salesInfo$purchaseIn6.marketPriceMin })] : [])).filter(Boolean) : [{ children: '-' }] }), salesType.isPurchase && /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { column: 1, colon: false, size: "small", layout: "vertical", items: [(salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$purchaseIn7 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn7 === void 0 ? void 0 : _salesInfo$purchaseIn7.pricingType) === PRICING_TYPES.STAIR ? ((_salesInfo$purchaseIn8 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn8 === void 0 ? void 0 : _salesInfo$purchaseIn8.stairList) && ((_salesInfo$purchaseIn9 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn9 === void 0 ? void 0 : _salesInfo$purchaseIn9.stairList.length) > 0 && (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.stairList', label: '阶梯定价明细', dynamicWidth: !!(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha17 = beforeContent.purchaseInfo) === null || _beforeContent$purcha17 === void 0 ? void 0 : _beforeContent$purcha17.stairList), isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha18 = beforeContent.purchaseInfo) === null || _beforeContent$purcha18 === void 0 ? void 0 : _beforeContent$purcha18.stairList), beforeContent: recordPurchasePriceSection, children: getPurchaseSectionTable((salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$purchaseIn10 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn10 === void 0 ? void 0 : _salesInfo$purchaseIn10.stairList) || [], measureUnit) }) : hasMultiSku && (0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.price', label: '规格定价明细', dynamicWidth: hasRecordMultiSku, isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha19 = beforeContent.purchaseInfo) === null || _beforeContent$purcha19 === void 0 ? void 0 : _beforeContent$purcha19.skuPriceList), beforeContent: recordPurchasePriceSection, children: getSkuPriceTable(skuList, salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$purchaseIn11 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn11 === void 0 ? void 0 : _salesInfo$purchaseIn11.skuPriceList, measureUnit) })].filter(Boolean) })), !(hideFields === null || hideFields === void 0 ? void 0 : hideFields.includes('salesInfo.sampleSalesInfo')) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { title: (0, _DescriptionsItem.getLabelDom)({ label: '样品信息', dynamicWidth: true, tooltipPlacement: 'right', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$sample = changeContent.sampleSalesInfo) === null || _changeContent$sample === void 0 ? void 0 : _changeContent$sample.isSupportSample), beforeContent: recordSampleContent }), colon: false, size: "small", labelStyle: { width: 100 }, column: { sm: 1, md: 2, lg: 3 }, contentStyle: { maxWidth: 0 }, bordered: salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale4 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale4 === void 0 ? void 0 : _salesInfo$sampleSale4.isSupportSample, items: (salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale5 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale5 === void 0 ? void 0 : _salesInfo$sampleSale5.isSupportSample) ? [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.supportSample', label: '支持拿样', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$sample2 = changeContent.sampleSalesInfo) === null || _changeContent$sample2 === void 0 ? void 0 : _changeContent$sample2.isSupportSample), beforeContent: (beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample3 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample3 === void 0 ? void 0 : _beforeContent$sample3.isSupportSample) ? '是' : '否', children: (salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale6 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale6 === void 0 ? void 0 : _salesInfo$sampleSale6.isSupportSample) ? '是' : '否' })].concat(_toConsumableArray(hasMultiSku ? [] : [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.price', label: '样品价格', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$sample3 = changeContent.sampleSalesInfo) === null || _changeContent$sample3 === void 0 ? void 0 : _changeContent$sample3.samplePrice), beforeContent: recordSamplePriceContent, children: salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale7 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale7 === void 0 ? void 0 : _salesInfo$sampleSale7.samplePrice })]), _toConsumableArray((salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale8 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale8 === void 0 ? void 0 : _salesInfo$sampleSale8.sampleLimitType) !== SAMPLE_LIMIT_TYPES.SPEC_LIMIT ? [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.limitTotal', label: '样品限售总数', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample4 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample4 === void 0 ? void 0 : _beforeContent$sample4.sampleLimitTotal), beforeContent: getSampleLimitText(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample5 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample5 === void 0 ? void 0 : _beforeContent$sample5.sampleLimitType, beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample6 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample6 === void 0 ? void 0 : _beforeContent$sample6.sampleLimitTotal), children: getSampleLimitText(salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale9 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale9 === void 0 ? void 0 : _salesInfo$sampleSale9.sampleLimitType, salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale10 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale10 === void 0 ? void 0 : _salesInfo$sampleSale10.sampleLimitTotal) })] : []), [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.rules', label: '样品限售规则', isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$sample4 = changeContent.sampleSalesInfo) === null || _changeContent$sample4 === void 0 ? void 0 : _changeContent$sample4.sampleLimitRules), beforeContent: getSampleLimitRulesText(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample7 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample7 === void 0 ? void 0 : _beforeContent$sample7.sampleLimitRules, beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample8 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample8 === void 0 ? void 0 : _beforeContent$sample8.sampleLimitRulesNum, recordMeasureUnit), children: getSampleLimitRulesText(salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale11 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale11 === void 0 ? void 0 : _salesInfo$sampleSale11.sampleLimitRules, salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale12 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale12 === void 0 ? void 0 : _salesInfo$sampleSale12.sampleLimitRulesNum, measureUnit || unit) })]).filter(Boolean) : [{ children: '-' }] }), hasMultiSku && (salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale13 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale13 === void 0 ? void 0 : _salesInfo$sampleSale13.isSupportSample) && /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { layout: "vertical", colon: false, items: [(0, _DescriptionsItem.formatDescriptionsItem)({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.price', label: '样品价格', dynamicWidth: hasRecordMultiSku, isChangeRecord: isAudit && (0, _DescriptionsItem.formatValueToBoolean)(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$sample5 = changeContent.sampleSalesInfo) === null || _changeContent$sample5 === void 0 ? void 0 : _changeContent$sample5.skuPriceList), beforeContent: recordSamplePriceContent, children: /*#__PURE__*/_react.default.createElement(_SkuTable.default, { skuList: skuList || [], skuPriceList: salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$sampleSale14 = salesInfo.sampleSalesInfo) === null || _salesInfo$sampleSale14 === void 0 ? void 0 : _salesInfo$sampleSale14.skuPriceList, thead: getSampleSkuThead(isSelf, measureUnit || unit) }) })].filter(Boolean) })), !(hideFields === null || hideFields === void 0 ? void 0 : hideFields.includes('salesInfo.stockInfo')) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Descriptions, { size: "small", title: (0, _DescriptionsItem.getLabelDom)({ label: '库存信息', dynamicWidth: true, tooltipPlacement: 'right', isChangeRecord: isAudit && (changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$stockI = changeContent.stockInfo) === null || _changeContent$stockI === void 0 ? void 0 : _changeContent$stockI.isSupportSpot) && (changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$stockI2 = changeContent.stockInfo) === null || _changeContent$stockI2 === void 0 ? void 0 : _changeContent$stockI2.isSupportContract), beforeContent: stockInfoContent }), colon: false, bordered: (salesInfo === null || salesI