UNPKG

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

Version:

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

703 lines 64.9 kB
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); } import "antd/es/descriptions/style"; import _Descriptions from "antd/es/descriptions"; import "antd/es/space/style"; import _Space from "antd/es/space"; function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 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; } import React, { useMemo, useCallback } from 'react'; import dayjs from 'dayjs'; import { getLabelDom, formatDescriptionsItem, formatValueToBoolean } from '../DescriptionsItem'; import GoodsSkuTable from '../SkuTable'; import GoodsSectionTable from '../SectionTable'; import DateDiffText from '../DateDiffText'; // 常量定义 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, _beforeContent$purcha11, _salesInfo$purchaseIn2, _changeContent$purcha3, _beforeContent$purcha12, _salesInfo$purchaseIn3, _salesInfo$purchaseIn4, _changeContent$purcha4, _beforeContent$purcha13, _salesInfo$purchaseIn5, _changeContent$purcha5, _beforeContent$purcha14, _salesInfo$purchaseIn6, _salesInfo$purchaseIn7, _salesInfo$purchaseIn8, _salesInfo$purchaseIn9, _beforeContent$purcha15, _changeContent$purcha6, _salesInfo$purchaseIn10, _changeContent$purcha7, _salesInfo$purchaseIn11, _changeContent$sample, _salesInfo$sampleSale4, _salesInfo$sampleSale5, _changeContent$sample2, _beforeContent$sample2, _salesInfo$sampleSale6, _changeContent$sample3, _salesInfo$sampleSale7, _salesInfo$sampleSale8, _changeContent$sample4, _beforeContent$sample3, _beforeContent$sample4, _salesInfo$sampleSale9, _salesInfo$sampleSale10, _changeContent$sample5, _beforeContent$sample5, _beforeContent$sample6, _salesInfo$sampleSale11, _salesInfo$sampleSale12, _salesInfo$sampleSale13, _changeContent$sample6, _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, _beforeContent$stockI7, _salesInfo$stockInfo16, _salesInfo$stockInfo17, _beforeContent$stockI8, _beforeContent$stockI9, _beforeContent$stockI10, _changeContent$stockI9, _beforeContent$stockI11, _beforeContent$stockI12, _changeContent$weight, _beforeContent$weight, _salesInfo$weightVolu, _changeContent$weight2, _beforeContent$weight2, _salesInfo$weightVolu2, _changeContent$afterS, _beforeContent$afterS, _salesInfo$afterSales, _beforeContent$orderI; var isSubSupplier = _ref.isSubSupplier, 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 = 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 = 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(!isSubSupplier ? [{ 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' }]); }, [isSubSupplier]); var getSampleSkuThead = useCallback(function (isSubSupplier) { 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 [{ name: '样品价格(元)', key: isSubSupplier ? 'supplierSamplePrice' : '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 getSampleDataList = useCallback(function (sampleSalesInfo) { if ((sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.sampleLimitType) === SAMPLE_LIMIT_TYPES.SPEC_LIMIT) { var _sampleSalesInfo$skuP; return (sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : (_sampleSalesInfo$skuP = sampleSalesInfo.skuPriceList) === null || _sampleSalesInfo$skuP === void 0 ? void 0 : _sampleSalesInfo$skuP.map(function (sku) { var _sampleSalesInfo$skuS, _sampleSalesInfo$skuS2; return _objectSpread(_objectSpread({}, sku), {}, { stock: sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : (_sampleSalesInfo$skuS = sampleSalesInfo.skuStockList) === null || _sampleSalesInfo$skuS === void 0 ? void 0 : (_sampleSalesInfo$skuS2 = _sampleSalesInfo$skuS.find(function (stock) { return stock.skuPropertyOrder === sku.skuPropertyOrder; })) === null || _sampleSalesInfo$skuS2 === void 0 ? void 0 : _sampleSalesInfo$skuS2.stock }); })) || []; } return sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.skuPriceList; }, [salesInfo === null || salesInfo === void 0 ? void 0 : salesInfo.sampleSalesInfo]); // 缓存内容生成函数 var getPriceEffectiveContent = useCallback(function (priceEffective) { return priceEffective ? /*#__PURE__*/React.createElement(React.Fragment, null, dayjs(priceEffective).format('YYYY-MM-DD'), "\uFF08", /*#__PURE__*/React.createElement(DateDiffText, { date: priceEffective }), "\uFF09") : '-'; }, []); var getSkuPriceTable = useCallback(function (skuList, skuPriceList, unit) { var thead = getSkuThead(unit || DEFAULT_UNIT); return /*#__PURE__*/React.createElement(GoodsSkuTable, { skuList: skuList || [], skuDataList: skuPriceList, thead: thead }); }, [getSkuThead]); var getPurchaseSectionTable = useCallback(function (stairList, measureUnit) { return /*#__PURE__*/React.createElement(GoodsSectionTable, { 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 = useCallback(function (isSupportSpot, isSupportContract) { return /*#__PURE__*/React.createElement(_Space, null, isSupportSpot && /*#__PURE__*/React.createElement("span", null, "\u73B0\u8D27"), isSupportContract && /*#__PURE__*/React.createElement("span", null, "\u8BA2\u8D27")); }, []); var getContractRangeContent = useCallback(function (contractMax, reserveList, unit) { return reserveList && reserveList.length > 0 ? /*#__PURE__*/React.createElement(GoodsSectionTable, { previewMaxNumber: contractMax, data: reserveList, thead: [{ unit: unit, name: "\u8BA2\u8D27\u6570\u91CF\uFF08".concat(unit, "\uFF09"), key: 'number' }, { name: '预计出货时间(天)', key: 'shipmentDay', unit: '天' }] }) : '-'; }, []); var getOrderInfoContent = useCallback(function (orderInfoList) { return (orderInfoList === null || orderInfoList === void 0 ? void 0 : orderInfoList.length) > 0 ? /*#__PURE__*/React.createElement(GoodsSectionTable, { showPreview: false, data: orderInfoList, thead: [{ name: '下单信息', key: 'label' }, { name: '下单提示', key: 'placeholder' }, { name: '是否必填', key: 'isMust' }] }) : '-'; }, []); var getSampleLimitText = 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 = 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 = 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.createElement(_Descriptions, { bordered: true, size: "small", style: { paddingLeft: 0 }, styles: { label: { width: 100 } }, items: [{ label: "\u6210\u672C\u4EF7\uFF08\u5143/".concat(recordUnit, "\uFF09"), children: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$onceIn2 = beforeContent.onceInfo) === null || _beforeContent$onceIn2 === void 0 ? void 0 : _beforeContent$onceIn2.purchasePriceMin }, !isSubSupplier && { label: "\u9500\u552E\u4EF7\uFF08\u5143/".concat(recordUnit, "\uFF09"), children: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$onceIn3 = beforeContent.onceInfo) === null || _beforeContent$onceIn3 === void 0 ? void 0 : _beforeContent$onceIn3.salePriceMin }, { label: "\u5E02\u573A\u4EF7\uFF08\u5143/".concat(recordUnit, "\uFF09"), 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, isSubSupplier, recordUnit, getSkuPriceTable]); var recordPurchasePriceSection = 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 = 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.createElement(_Descriptions, { bordered: true, size: "small", styles: { label: { width: 100 } }, items: [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.measureUnit', label: '计量单位', children: "\u6309".concat(recordMeasureUnit, "\u9500\u552E") }), 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) ? '是' : '否' }), 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 ? [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.purchasePrice', label: "\u6210\u672C\u4EF7\uFF08\u5143/".concat(recordMeasureUnit, "\uFF09"), children: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha6 = beforeContent.purchaseInfo) === null || _beforeContent$purcha6 === void 0 ? void 0 : _beforeContent$purcha6.purchasePriceMin }), formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.marketPrice', label: "\u5E02\u573A\u4EF7\uFF08\u5143/".concat(recordMeasureUnit, "\uFF09"), 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.createElement(_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 && formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.stairList', label: '阶梯定价明细', children: recordPurchasePriceSection }) : hasRecordMultiSku && formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.price', label: '规格定价明细', children: recordPurchasePriceSection })].filter(Boolean) }); return /*#__PURE__*/React.createElement(React.Fragment, null, basicContent, pricingContent); }, [beforeContent, hasRecordMultiSku, recordMeasureUnit, recordPurchasePriceSection, hideFields]); var recordSamplePriceContent = useMemo(function () { var _beforeContent$sample; return hasRecordMultiSku ? /*#__PURE__*/React.createElement(GoodsSkuTable, { skuList: (beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.skuList) || [], skuDataList: getSampleDataList(beforeContent === null || beforeContent === void 0 ? void 0 : beforeContent.sampleSalesInfo), thead: getSampleSkuThead(isSubSupplier, recordMeasureUnit) }) : beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample = beforeContent.sampleSalesInfo) === null || _beforeContent$sample === void 0 ? void 0 : _beforeContent$sample.samplePrice; }, [beforeContent, hasRecordMultiSku, isSubSupplier, recordMeasureUnit, getSampleSkuThead]); var recordSampleContent = 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.createElement(_Descriptions, { bordered: true, colon: false, size: "small", column: { sm: 1, md: 2, xxl: 3 }, styles: { content: { maxWidth: 0 }, label: { width: 100 } }, items: [formatDescriptionsItem({ hideFields: hideFields, label: '支持拿样', key: 'salesInfo.sampleSalesInfo.supportSample', children: (sampleSalesInfo === null || sampleSalesInfo === void 0 ? void 0 : sampleSalesInfo.isSupportSample) ? '是' : '否' })].concat(_toConsumableArray(hasRecordMultiSku ? [] : [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 ? [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) })] : []), [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.createElement(_Descriptions, { layout: "vertical", colon: false, styles: { label: { width: 100 } }, items: [formatDescriptionsItem({ hideFields: hideFields, label: '样品价格', key: 'salesInfo.sampleSalesInfo.price', children: /*#__PURE__*/React.createElement(GoodsSkuTable, { skuList: skuList, skuDataList: getSampleDataList(sampleSalesInfo), thead: getSampleSkuThead(isSubSupplier, recordMeasureUnit) }) })].filter(Boolean) }) : null; return /*#__PURE__*/React.createElement(React.Fragment, null, basicContent, pricingContent); }, [beforeContent, hasRecordMultiSku, salesInfo, measureUnit, unit, recordSamplePriceContent, getSampleLimitText, getSampleLimitRulesText, getSampleSkuThead, isSubSupplier, recordMeasureUnit, hideFields]); var stockInfoContent = 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.createElement(_Descriptions, { bordered: true, size: "small", colon: false, column: { sm: 1, md: 2, xl: 3 }, styles: { content: { maxWidth: 0 }, label: { width: 100 } }, items: [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) }), 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) ? [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") : '-' }), 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.createElement(_Descriptions, { size: "small", layout: "vertical", colon: false, items: [formatDescriptionsItem({ hideFields: hideFields, label: '现货库存明细', key: 'salesInfo.stockInfo.stock', children: /*#__PURE__*/React.createElement(GoodsSkuTable, { skuList: skuList, skuDataList: stockInfo === null || stockInfo === void 0 ? void 0 : stockInfo.skuStockList, 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.createElement(_Descriptions, { size: "small", layout: "vertical", colon: false, items: [formatDescriptionsItem({ hideFields: hideFields, label: '订货范围', key: 'salesInfo.stockInfo.reserveList', children: getContractRangeContent(stockInfo.contractMax || 0, stockInfo.reserveList || [], recordMeasureUnit) })].filter(Boolean) }) : null; return /*#__PURE__*/React.createElement(React.Fragment, null, basicContent, spotContent, contractContent); }, [beforeContent, salesInfo, unit, hasRecordMultiSku, recordMeasureUnit, getStockSupportText, getContractRangeContent, hideFields]); return /*#__PURE__*/React.createElement("div", { id: "sales-info", className: "goods-detail-drawer-section" }, /*#__PURE__*/React.createElement("div", { className: "goods-detail-drawer-section-title" }, "\u9500\u552E\u4FE1\u606F"), !isSubSupplier && !(hideFields === null || hideFields === void 0 ? void 0 : hideFields.includes('salesInfo.priceEffective')) && /*#__PURE__*/React.createElement(_Descriptions, { column: 1, colon: false, layout: "vertical", items: [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.priceEffective', label: '价格有效期', styles: { label: { fontWeight: '500', color: '#1d2531' } }, isChangeRecord: isAudit && 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.createElement(_Descriptions, { colon: false, size: "small", title: getLabelDom({ label: '一件代发交易信息', dynamicWidth: hasRecordMultiSku, tooltipPlacement: 'right', isChangeRecord: isAudit && (formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : changeContent.isOnce) || formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$onceIn = changeContent.onceInfo) === null || _changeContent$onceIn === void 0 ? void 0 : _changeContent$onceIn.skuPriceList)), beforeContent: recordOnceInfoContent }), column: { sm: 1, md: 2, lg: 3 }, styles: { label: { width: 100 } }, bordered: salesType.isOnce && !hasMultiSku, items: salesType.isOnce ? hasMultiSku ? [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) : [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.onceInfo.purchasePrice', label: "\u6210\u672C\u4EF7\uFF08\u5143/".concat(recordMeasureUnit, "\uFF09"), isChangeRecord: isAudit && 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 }), !isSubSupplier && formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.onceInfo.salePrice', label: "\u9500\u552E\u4EF7\uFF08\u5143/".concat(unit, "\uFF09"), isChangeRecord: isAudit && 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 }), formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.onceInfo.marketPrice', label: "\u5E02\u573A\u4EF7\uFF08\u5143/".concat(unit, "\uFF09"), isChangeRecord: isAudit && 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.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Descriptions, { size: "small", title: getLabelDom({ label: '集采批发交易信息', dynamicWidth: true, tooltipPlacement: 'right', isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : changeContent.isPurchase), beforeContent: recordPurchaseContent }), bordered: !!salesType.isPurchase, column: { sm: 1, md: 2, lg: 3 }, styles: { content: { maxWidth: 0 }, label: { width: 100 } }, items: salesType.isPurchase ? [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.measureUnit', label: '计量单位', isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha = changeContent.purchaseInfo) === null || _changeContent$purcha === void 0 ? void 0 : _changeContent$purcha.measureUnit), beforeContent: "\u6309".concat(recordMeasureUnit, "\u9500\u552E"), children: "\u6309".concat(measureUnit, "\u9500\u552E") }), formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.isContainsTax', label: '是否含税', isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha2 = changeContent.purchaseInfo) === null || _changeContent$purcha2 === void 0 ? void 0 : _changeContent$purcha2.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) ? '是' : '否' }), formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.pricingType', label: '定价方式', isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha3 = changeContent.purchaseInfo) === null || _changeContent$purcha3 === void 0 ? void 0 : _changeContent$purcha3.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 ? [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.purchasePrice', label: "\u6210\u672C\u4EF7\uFF08\u5143/".concat(measureUnit, "\uFF09"), isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha4 = changeContent.purchaseInfo) === null || _changeContent$purcha4 === void 0 ? void 0 : _changeContent$purcha4.purchasePriceMin), beforeContent: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha13 = beforeContent.purchaseInfo) === null || _beforeContent$purcha13 === void 0 ? void 0 : _beforeContent$purcha13.purchasePriceMin, children: salesInfo === null || salesInfo === void 0 ? void 0 : (_salesInfo$purchaseIn5 = salesInfo.purchaseInfo) === null || _salesInfo$purchaseIn5 === void 0 ? void 0 : _salesInfo$purchaseIn5.purchasePriceMin }), formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.marketPrice', label: "\u5E02\u573A\u4EF7\uFF08\u5143/".concat(measureUnit, "\uFF09"), isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha5 = changeContent.purchaseInfo) === null || _changeContent$purcha5 === void 0 ? void 0 : _changeContent$purcha5.marketPriceMin), beforeContent: beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha14 = beforeContent.purchaseInfo) === null || _beforeContent$purcha14 === void 0 ? void 0 : _beforeContent$purcha14.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.createElement(_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 && formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.stairList', label: '阶梯定价明细', dynamicWidth: !!(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$purcha15 = beforeContent.purchaseInfo) === null || _beforeContent$purcha15 === void 0 ? void 0 : _beforeContent$purcha15.stairList), isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha6 = changeContent.purchaseInfo) === null || _changeContent$purcha6 === void 0 ? void 0 : _changeContent$purcha6.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 && formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.purchaseInfo.price', label: '规格定价明细', dynamicWidth: hasRecordMultiSku, isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$purcha7 = changeContent.purchaseInfo) === null || _changeContent$purcha7 === void 0 ? void 0 : _changeContent$purcha7.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.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Descriptions, { title: getLabelDom({ label: '样品信息', dynamicWidth: true, tooltipPlacement: 'right', isChangeRecord: isAudit && 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", column: { sm: 1, md: 2, lg: 3 }, styles: { content: { maxWidth: 0 }, label: { width: 100 } }, 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) ? [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.supportSample', label: '支持拿样', isChangeRecord: isAudit && 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$sample2 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample2 === void 0 ? void 0 : _beforeContent$sample2.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 ? [] : [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.price', label: '样品价格', isChangeRecord: isAudit && 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 ? [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.limitTotal', label: '样品限售总数', isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$sample4 = changeContent.sampleSalesInfo) === null || _changeContent$sample4 === void 0 ? void 0 : _changeContent$sample4.sampleLimitTotal), beforeContent: getSampleLimitText(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample3 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample3 === void 0 ? void 0 : _beforeContent$sample3.sampleLimitType, beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample4 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample4 === void 0 ? void 0 : _beforeContent$sample4.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) })] : []), [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.rules', label: '样品限售规则', isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$sample5 = changeContent.sampleSalesInfo) === null || _changeContent$sample5 === void 0 ? void 0 : _changeContent$sample5.sampleLimitRules), beforeContent: getSampleLimitRulesText(beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample5 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample5 === void 0 ? void 0 : _beforeContent$sample5.sampleLimitRules, beforeContent === null || beforeContent === void 0 ? void 0 : (_beforeContent$sample6 = beforeContent.sampleSalesInfo) === null || _beforeContent$sample6 === void 0 ? void 0 : _beforeContent$sample6.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.createElement(_Descriptions, { layout: "vertical", colon: false, items: [formatDescriptionsItem({ hideFields: hideFields, key: 'salesInfo.sampleSalesInfo.price', label: '样品价格', dynamicWidth: hasRecordMultiSku, isChangeRecord: isAudit && formatValueToBoolean(changeContent === null || changeContent === void 0 ? void 0 : (_changeContent$sample6 = changeContent.sampleSalesInfo) === null || _changeContent$sample6 === void 0 ? void 0 : _changeContent$sample6.skuPriceList), beforeContent: recordSamplePriceContent, children: /*#__PURE__*/React.createElement(GoodsSkuTable, { skuList: skuList || [], skuDataList: getSampleDataList(salesInfo === null || salesInfo === void 0 ? void 0 : salesInfo.sampleSalesInfo), thead: getSampleSkuThead(isSubSupplier, measureUnit || unit) }) })].filter(Boolean) })), !(hideFields === null || hideFields === void 0 ? void 0 : hideFields.includes('salesInfo.stockInfo')) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Descriptions, { size: "small", title: 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