index.js 43.9 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127
/* eslint-disable */
import React, { useRef, useState, useEffect } from "react";
import { Select, Button, message, Input, Spin } from "antd-v4";
import { CompressOutlined, ExpandOutlined } from "@ant-design/icons";
import * as commonUtils from "@/utils/utils";
import * as commonFunc from "@/components/Common/commonFunc";
import * as commonBusiness from "@/components/Common/commonBusiness";
import * as commonServices from "@/services/services";
import CommonBase from "@/components/Common/CommonBase";
import AntdDraggableModal from "@/components/Common/AntdDraggableModal";
import CommonViewTable from "@/components/Common/CommonViewTable";
import StaticEditTable from "@/components/Common/CommonTable";
import jsPreviewPdf from "@js-preview/pdf";
import commonConfig from "@/utils/config";
import SvgBox from "./svg";
import styles from "./index.less";
const BoxDesignEvent = props => {
  const addState = {};
  const { formData = [], selectData = [], masterData, makeUpPDFRecord = {} } = props;
  const [tableData, setTableData] = useState({});
  const [options, setOptions] = useState([]);
  const [loading, setLoading] = useState(false); // 加载状态

  addState.getSqlOptions = async type => {
    setLoading(true);
    const { app, token, makeConfig } = props;
    // const quickQuoteConfig = config.gdsconfigformslave.find(item => item.sControlName === "BtnQuickQuote") || {};
    const { sId } = makeConfig;
    if (!sId) return;
    const url = `${commonConfig.server_host}business/getSelectLimit/${sId}?sModelsId=${sId}`;
    const body = {
      pageNum: 1,
      pageSize: 20,
      sKeyUpFilterName: "",
      sSqlCondition: {
        sType: type,
      },
    };
    const data = await commonServices.postValueService(token, body, url);
    if (data) {
      const option = data.data.dataset.rows;
      option.sort((a, b) => {
        if (a.sCode === "") {
          return -1; // 将 id 为 1 的元素排在前面
        }
        if (b.sCode === "") {
          return 1;
        }
        return 0; // 其他元素保持原顺序
      });
      setOptions(data.data.dataset.rows);
    }
    setLoading(false);
  };

  useEffect(() => {
    if (!formData.length) return;

    const data = formData[0].gdsconfigformslave.filter(Item => Item.bVisible);
    setTableData(data);
    props.onSaveState(pre => ({ ...pre, data }));
  }, [formData.length]);

  return {
    ...props,
    tableData,
    ...addState,
    options,
    loading,
  };
};
const BoxDesignCompontent = baseProps => {
  const props = BoxDesignEvent(baseProps);
  const { onCancel, onOk, title, loading, masterConfig, bFullScreen, tableData, options = [] } = props;
  const { slaveData = {}, masterData = {} } = props.state;
  const { boxVisible } = baseProps;
  const [boxList, setBoxList] = useState([]);
  const [tableColum, setTableColum] = useState([]); // 盒身类型
  const [tableDataList, setTableDataList] = useState([]); // 盒长
  const [tableDataLists, setTableDataLists] = useState([]); // 盒长
  const [boxBodyList, setBoxBodyList] = useState([]); // 盒身信息
  const [isDefaultValue, setIsDefaultValue] = useState(true); // 是否默认值
  const [topBoxList, setTopBoxList] = useState([]); // 盒身信息
  const [leftBoxList, setLeftBoxList] = useState([]); // 左边
  const [rightBoxList, setRightBoxList] = useState([]);
  const [boxKey, setBoxKey] = useState(new Date().getTime());
  const [doubleLayerList,setDoubleLayerList] = useState([])
  if (!boxVisible) return "";
// 1️⃣ 只负责 tableColum
useEffect(() => {
  if (!tableData?.length) return;

  const newTableColum = tableData
    .filter(item => item.bVisible) // 先过滤可见
    .map(item => ({
      ...item,
      isEditable: true,
      isSelect: false,
      selectImage: null,
      value: '',
    }))
    .filter(
      item =>
        !(
          item.showName.includes('盒长') ||
          item.showName.includes('盒高') ||
          item.showName.includes('盒宽') ||
          item.showName.includes('盒身')
        )
    )
    .map(item =>
      item.showName === '盒型类别'
        ? { ...item, showName: '盒型名称' }
        : item
    );

  setTableColum(newTableColum);
}, [tableData]);

// 2️⃣ 只负责 boxBodyList
useEffect(() => {
  if (!tableData?.length) return;

  const bodyList = tableData
    .filter(item => item.bVisible)
    .map(item => ({
      ...item,
      isEditable: true,
      isSelect: false,
      selectImage: null,
      value: '',
    }))
    .filter(item => item.showName.includes('盒身'));

  setBoxBodyList(bodyList);
}, [tableData]);

// 3️⃣ 只负责 tableDataList 和 tableDataLists
useEffect(() => {
  if (!tableData?.length) return;

  const newList = tableData
    .filter(item => item.bVisible)
    .map(item => ({
      ...item,
      isEditable: true,
      isSelect: false,
      selectImage: null,
      value: '',
    }))
    .filter(
      item =>
        item.showName.includes('盒长') ||
        item.showName.includes('盒高') ||
        item.showName.includes('盒宽')
    )
    .map(item => {
      let name = '';
      if (item.showName === '盒长') name = '盒长(L)';
      if (item.showName === '盒宽') name = '盒宽(W)';
      if (item.showName === '盒高') name = '盒高(D)';
      return { ...item, sName: name };
    });

  setTableDataList(newList);
  setTableDataLists(newList);
}, [tableData]);
  const titleList = [
    "上方盒舌",
    "盒底组件",
    "下方盒舌",
    "左(上)插位组件",
    "左贴边位",
    "左(下)插位组件",
    "右(上)插位组件",
    "右贴边位",
    "右(下)插位组件",
  ];
  const titleList1 = [
    { name: "上方盒舌", value: "dSFHS" },
    { name: "盒底组件", value: "dHDC" },
    { name: "下方盒舌", value: "dXFHS" },
    { name: "左(上)插位组件", value: "dZSCW" },
    { name: "左贴边位", value: "dZTBW" },
    { name: "左(下)插位组件", value: "dZXCW" },
    { name: "右(上)插位组件", value: "dYSCW" },
    { name: "右贴边位", value: "dYTBW" },
    { name: "右(下)插位组件", value: "dYXCW" },
  ];
  const newBoxList = [];

  // const boxs = titleList.length + tableData.length;
  tableColum.forEach(item => {
    titleList.push(item.showName);
  });
  boxBodyList.forEach(item => {
    titleList.push(item.showName);
  });
  tableDataList.forEach(item => {
    titleList.push(item.showName);
  });
  // 这里处理双盒的初始数据
  titleList.push(...["首盒长", "首盒宽", "次盒长", "次盒宽"])
  // 盒身信息
  titleList.forEach((item, index) => {
    newBoxList.push({
      value: "",
      sName: item,
      isEditable: true,
      isSelect: false,
      selectValue: null,
      selectLabel: "",
      selectImage: null,
      type: null,
      show: true,
      showName: item, // 参数名称
      sAssignFormula: null,
    });
  });
  // 部件信息
  if (slaveData && slaveData.length) {
    slaveData.forEach((item, index) => {
      const i = titleList1.findIndex(i => {
        return i.value === item.sCode;
      });
      if (i !== -1) {
        const x = newBoxList.findIndex(z => z.sName === titleList1[i].name);
        newBoxList[x].value = item.iValue;
        newBoxList[x].type = item.sTypes;
        newBoxList[x].showName = item.sName;
        newBoxList[x].selectImage = item.sMakeUpPath;
        newBoxList[x].sName = titleList1[i].name;
        newBoxList[x].sAssignFormula = item.sAssignFormula;
        newBoxList[x].bVisible = item.bVisible;
      }
    });
  }
  // 盒身信息
  if (masterData) {
    newBoxList.forEach((item, index) => {
      if (item.sName === "盒身") {
        newBoxList[index].value = masterData.sBoxBody;
        newBoxList[index].selectImage = masterData.sMakeUpPath;
        newBoxList[index].type = masterData.sTypes;
      } else if (item.sName === "盒长") {
        newBoxList[index].value = masterData.dBoxLength;
      } else if (item.sName === "盒宽") {
        newBoxList[index].value = masterData.dBoxWidth;
      } else if (item.sName === "盒高") {
        newBoxList[index].value = masterData.dBoxHeight;
      } else if (item.sName === "盒型名称") {
        newBoxList[index].value = masterData.sName;
      }
    });
  }
  // 有数据的时候 盒型设计需要赋值
  useEffect(() => {
    if (newBoxList.length > 0 && !arraysAreEqual(boxList, newBoxList)) {
      setBoxList(newBoxList);
    }
  }, [newBoxList]);


  const arraysAreEqual = (arr1, arr2) => {
    if (arr1.length !== arr2.length) return false;
    return arr1.every((item, index) => item.sName === arr2[index].sName);
  };
  useEffect(() => {
    const type = boxList.find(item => item.sName === "盒身")?.type;
    const updateLists = () => {
      const topBoxFilter = item => item.sName === "上方盒舌" || item.sName === "盒底组件" || item.sName === "下方盒舌";

      const leftBoxFilter = item => item.sName === "左(上)插位组件" || item.sName === "左贴边位" || item.sName === "左(下)插位组件";

      const rightBoxFilter = item => item.sName === "右(上)插位组件" || item.sName === "右贴边位" || item.sName === "右(下)插位组件";

      if (type === "2" || type === 2 || type === "4" || type === 4 || type === 3 || type === "3" || type === 5 || type === "5") {
        const box = [...boxList];
        box.forEach(x => {
          x.show = true;
        });
        if (type === "2" || type === 2) {
          box.forEach(x => x.sName === "盒底组件" && (x.show = false));
        } else if (type === "4" || type === 4) {
          const title = ["盒底组件", "左贴边位", "右贴边位"];
          box.forEach(x => title.includes(x.sName) && (x.show = false));
        } else if (type === "3" || type === 3) {
          const title = ["左(上)插位组件", "右(下)插位组件", "盒底组件"];
          box.forEach(x => title.includes(x.sName) && (x.show = false));
        } else if (type === "5" || type === 5) {
          const title = ["盒底组件"];
          box.forEach(x => title.includes(x.sName) && (x.show = false));
        }
        setTopBoxList(box.filter(topBoxFilter));
        setLeftBoxList(box.filter(leftBoxFilter));
        if (type === 3 || type === "3") {
          setRightBoxList(box.filter(rightBoxFilter).reverse());
        } else {
          setRightBoxList(box.filter(rightBoxFilter));
        }
      } else if (type === "7" || type === 7) {
        const box = [...boxList];
        box.forEach(x => {
          x.show = true;
        });
        const title = ["盒底组件", "左贴边位", "右贴边位", "上方盒舌", "下方盒舌"];
        box.forEach(x => title.includes(x.sName) && (x.show = false));
        setTopBoxList(box.filter(topBoxFilter));
        setLeftBoxList(box.filter(leftBoxFilter));
        setRightBoxList(box.filter(rightBoxFilter));
      } else {
        const box = [...boxList];
        box.forEach(x => {
          x.show = true;
        });
        setTopBoxList(box.filter(topBoxFilter));
        setLeftBoxList(box.filter(leftBoxFilter));
        setRightBoxList(box.filter(rightBoxFilter));
      }
    };

    updateLists();
  }, [boxList]);
  const boxType = boxList.find(item => item.sName === "盒身")?.type;
  // 监听盒身类型
  useEffect(() => {
    if (!boxType) return;
    if (boxType === "8") {
      const doubleList = ["首盒长", "首盒宽", "次盒长", "次盒宽"];
      let box = [];
      doubleList.forEach(item => {
        box.push({
          value: "",
          sName: item,
          isEditable: true,
          isSelect: false,
          selectValue: null,
          selectLabel: "",
          selectImage: null,
          type: null,
          show: true,
          showName: item, // 参数名称
          sAssignFormula: null,
        });
      });
      // boxList.push()
      setDoubleLayerList(box)
    } else {
    }
    console.log(boxList,'boxList');
    
  }, [boxType]);
  const handleFocus = (e, index) => {
    if (boxList && boxList.length) {
      const updatedBoxList = [...boxList];
      updatedBoxList[index].isEditable = true;
      setBoxList(updatedBoxList);
    }
  };

  const handleBlur = (e, index) => {
    if (boxList && boxList.length) {
      const updatedBoxList = [...boxList];
      updatedBoxList[index].isEditable = false;
      setBoxList(updatedBoxList);
    }
  };

  const handleChange = (e, index) => {
    const updatedBoxList = [...boxList];
    updatedBoxList[index].value = e.target.value;
    setBoxList(updatedBoxList);
  };

  const handleChangeName = (e, index) => {
    const updatedBoxList = [...boxList];
    updatedBoxList[index].showName = e.target.value;
    setBoxList(updatedBoxList);
  };

  const handleSelect = (name, selectConfig, index, type) => {
    let updatedBoxList = [...boxList];
    updatedBoxList[index].type = name;
    updatedBoxList[index].selectImage = selectConfig.image;
    // 选择盒身数据全部清空

    const typeList = [1, 2, 3, 4];
    if (typeList.includes(type)) {
      const table1 = tableColum.map(x => x.showName);
      const table2 = boxBodyList.map(x => x.showName);
      const table3 = tableDataList.map(x => x.showName);
      const tableTitle = table1.concat(table2, table3);
      updatedBoxList.forEach((x, i) => {
        if (i !== index && !tableTitle.includes(x.sName)) {
          x.value = "";
          x.type = null;
          x.selectValue = null;
          x.selectImage = null;
          // x.showName =
        }
      });
      setIsDefaultValue(false);
      updatedBoxList[index].value = selectConfig.label;
    }
    setBoxList(updatedBoxList);
  };
  const getImage = fileName => {
    // const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&sModelsId=100&token=${props.token}`;
    const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&scale=0.1&sModelsId=100&token=${props.token}`;
    return imageUrl;
  };
  console.log(boxList, "boxList");

  // 下来框
  const renderOptionWithImage = option => {
    return (
      <Select.Option key={option.sId} value={option.sCode} label={option.sName} image={getImage(option.sMakeUpPath)}>
        <div style={{ display: "flex", alignItems: "center" }}>
          {option.sMakeUpPath ? <img src={getImage(option.sMakeUpPath)} style={{ width: 24, height: 24, marginRight: 8 }} /> : ""}
          <span>{option.sName}</span>
        </div>
      </Select.Option>
    );
  };
  const svgBoxProps = {
    ...props,
    boxList,
    showNew: 0,
  };
  const dobuleProps = {
    ...props,
    renderOptionWithImage,
  };
  // 计算展长展宽
  // 创建盒型
  const submit = () => {
    const newSlaveData = [];
    // 判断是新增还是修改

    // 存储子表数据
    boxList.forEach((item, index) => {
      const i = titleList1.findIndex(i => i.name === item.sName);
      const slave = slaveData.find(z => z.sCode === titleList1[i]?.value);
      if (i !== -1) {
        const data = {
          ...slaveData[0],
          handleType: slave ? "update" : "add",
          sName: item.showName,
          sCode: titleList1[i].value,
          iValue: item.value,
          iOrder: index + 1,
          iRowNum: index + 1,
          sId: slave ? slave.sId : commonUtils.createSid(),
          sMakeUpPath: item.selectImage,
          sTypes: item.type,
          bVisible: item.value ? true : false,
          sParentId: masterData.sId,
          sAssignFormula: item.sAssignFormula,
        };
        // if (item.value !== "") {
        newSlaveData.push(data);
        // }
      }
    });
    const submitSlaveData = [];
    slaveData.forEach(item => {
      const i = newSlaveData.findIndex(x => x.scode === item.code);
      if (i === -1) {
        submitSlaveData.push({ ...item, handleType: "del" });
      }
    });
    submitSlaveData.concat(newSlaveData);

    // 处理计算公式
    // 计算展长公式 sLengthFormula
    let sLengthFormula = "";
    let sWidthFormula = "";
    const boxType = boxList.find(item => item.sName === "盒身")?.type;
    const boxLength = Number(boxList.find(item => item.sName === "盒长")?.value);
    const boxWidth = Number(boxList.find(item => item.sName === "盒宽")?.value);
    const boxHeight = Number(boxList.find(item => item.sName === "盒高")?.value);
    const zxcw = boxList.find(x => x.sName === "左(下)插位组件");
    const zscw = boxList.find(x => x.sName === "左(上)插位组件");
    const yscw = boxList.find(x => x.sName === "右(上)插位组件");
    const yxcw = boxList.find(x => x.sName === "右(下)插位组件");
    const hdzj = boxList.find(x => x.sName === "盒底组件");
    const zxcwType = zxcw?.type;
    const zxcwValue = zxcw?.value;
    const zscwType = zscw?.type;
    const zscwValue = zscw?.value;
    const yscwType = yscw?.type;
    const yscwValue = yscw?.value;
    const yxcwType = yxcw?.type;
    const yxcwValue = yxcw?.value;
    let leftTopValue = 0;
    let leftTop = "";
    let rightTopValue = 0;
    let rightTop = "";
    let leftBottomValue = 0;
    let leftBottom = "";
    let rightBottomValue = 0;
    let rightBottom = "";
    if (boxType && boxType === "1") {
      // 四面盒
      const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value;
      const ytbw = boxList.find(x => x.sName === "右贴边位")?.type && boxList.find(x => x.sName === "右贴边位")?.value;
      sLengthFormula = (ztbw ? "dZTBW+ " : "") + "L * 2 + W * 2" + (ytbw ? " +dYTBW" : "");

      if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") {
        leftBottomValue = Number(zxcwValue) + boxHeight;
        leftBottom = " + dZXCW + W";
      } else if (zxcwType === "4002" || zxcwType === "4003") {
        leftBottomValue = Number(zxcwValue);
        leftBottom = " + dZXCW";
      } else if (zxcwType === "4004") {
        leftBottomValue = Number(zxcwValue) + boxHeight * 2;
        leftBottom = " + dZXCW + W * 2";
      } else if (zxcwType === "4005") {
        leftBottomValue = boxHeight * 2;
        leftBottom = "+ W * 2";
      }
      if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") {
        rightTopValue = Number(yscwValue) + boxHeight;
        rightTop = "dYSCW + W + ";
      } else if (yscwType === "6002" || yscwType === "6003") {
        rightTopValue = Number(yscwValue);
        rightTop = "dYSCW +  ";
      } else if (yscwType === "6004") {
        rightTopValue = Number(yscwValue) + boxHeight * 2;
        rightTop = "dYSCW + W * 2+ ";
      } else if (yscwType === "6005") {
        rightTopValue = boxHeight * 2;
        rightTop = "W * 2+ ";
      }
      if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") {
        leftTopValue = Number(zscwValue) + boxHeight;
        leftTop = "dZSCW + W +";
      } else if (zscwType === "3002" || zscwType === "3003") {
        leftTopValue = Number(zscwValue);
        leftTop = "dZSCW +";
      } else if (zscwType === "3004") {
        leftTopValue = Number(zscwValue) + boxHeight * 2;
        leftTop = "dZSCW + W * 2 +";
      } else if (zscwType === "3005") {
        leftTopValue = boxHeight * 2;
        leftTop = "W * 2 +";
      }
      if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") {
        rightBottomValue = Number(yxcwValue) + boxHeight;
        rightBottom = "+ dYXCW + W";
      } else if (yxcwType === "7002" || yxcwType === "7003") {
        rightBottomValue = Number(yxcwValue);
        rightBottom = "+ dYXCW ";
      } else if (yxcwType === "7004") {
        rightBottomValue = Number(yxcwValue) + boxHeight * 2;
        rightBottom = "+ dYXCW + W * 2";
      } else if (yxcwType === "7005") {
        rightBottomValue = boxHeight * 2;
        rightBottom = "+ W * 2";
      }
      sWidthFormula =
        (leftTopValue > rightTopValue ? leftTop : rightTop) +
        "D" +
        (hdzj ? " + dHDC" : leftBottomValue > rightBottomValue ? leftBottom : rightBottom);
    } else if (boxType && boxType === "2") {
      // 单折
      const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value;
      const ytbw = boxList.find(x => x.sName === "右贴边位")?.type && boxList.find(x => x.sName === "右贴边位")?.value;
      sLengthFormula = (ztbw ? "dZTBW+ " : "") + "L * 2 + W" + (ytbw ? " +dYTBW" : "");
      if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") {
        leftBottomValue = Number(zxcwValue) + boxHeight;
        leftBottom = " + dZXCW + W";
      } else if (zxcwType === "4002" || zxcwType === "4003") {
        leftBottomValue = Number(zxcwValue);
        leftBottom = " + dZXCW";
      } else if (zxcwType === "4004") {
        leftBottomValue = Number(zxcwValue) + boxHeight * 2;
        leftBottom = " + dZXCW + W * 2";
      } else if (zxcwType === "4005") {
        leftBottomValue = boxHeight * 2;
        leftBottom = "+ W * 2";
      }
      if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") {
        rightTopValue = Number(yscwValue) + boxHeight;
        rightTop = "dYSCW + W + ";
      } else if (yscwType === "6002" || yscwType === "6003") {
        rightTopValue = Number(yscwValue);
        rightTop = "dYSCW +  ";
      } else if (yscwType === "6004") {
        rightTopValue = Number(yscwValue) + boxHeight * 2;
        rightTop = "dYSCW + W * 2+ ";
      } else if (yscwType === "6005") {
        rightTopValue = boxHeight * 2;
        rightTop = "W * 2+ ";
      }
      if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") {
        leftTopValue = Number(zscwValue) + boxHeight;
        leftTop = "dZSCW + W +";
      } else if (zscwType === "3002" || zscwType === "3003") {
        leftTopValue = Number(zscwValue);
        leftTop = "dZSCW +";
      } else if (zscwType === "3004") {
        leftTopValue = Number(zscwValue) + boxHeight * 2;
        leftTop = "dZSCW + W * 2 +";
      } else if (zscwType === "3005") {
        leftTopValue = boxHeight * 2;
        leftTop = "W * 2 +";
      }
      if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") {
        rightBottomValue = Number(yxcwValue) + boxHeight;
        rightBottom = "+ dYXCW + W";
      } else if (yxcwType === "7002" || yxcwType === "7003") {
        rightBottomValue = Number(yxcwValue);
        rightBottom = "+ dYXCW ";
      } else if (yxcwType === "7004") {
        rightBottomValue = Number(yxcwValue) + boxHeight * 2;
        rightBottom = "+ dYXCW + W * 2";
      } else if (yxcwType === "7005") {
        rightBottomValue = boxHeight * 2;
        rightBottom = "+ W * 2";
      }
      sWidthFormula = (leftTopValue > rightTopValue ? leftTop : rightTop) + "D" + (leftBottomValue > rightBottomValue ? leftBottom : rightBottom);
    } else if (boxType && boxType === "3") {
      const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value;
      const ytbw = boxList.find(x => x.sName === "右贴边位")?.type && boxList.find(x => x.sName === "右贴边位")?.value;
      sLengthFormula = (ztbw ? "dZTBW+ " : "") + "L + W * 2" + (ytbw ? " +dYTBW" : "");
      if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") {
        leftBottomValue = Number(zxcwValue) + boxHeight;
        leftBottom = " + dZXCW + W";
      } else if (zxcwType === "4002" || zxcwType === "4003") {
        leftBottomValue = Number(zxcwValue);
        leftBottom = " + dZXCW";
      } else if (zxcwType === "4004") {
        leftBottomValue = Number(zxcwValue) + boxHeight * 2;
        leftBottom = " + dZXCW + W * 2";
      } else if (zxcwType === "4005") {
        leftBottomValue = boxHeight * 2;
        leftBottom = "+ W * 2";
      }
      if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") {
        rightTopValue = Number(yscwValue) + boxHeight;
        rightTop = "dYSCW + W + ";
      } else if (yscwType === "6002" || yscwType === "6003") {
        rightTopValue = Number(yscwValue);
        rightTop = "dYSCW +  ";
      } else if (yscwType === "6004") {
        rightTopValue = Number(yscwValue) + boxHeight * 2;
        rightTop = "dYSCW + W * 2+ ";
      } else if (yscwType === "6005") {
        rightTopValue = boxHeight * 2;
        rightTop = "W * 2+ ";
      }
      if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") {
        leftTopValue = Number(zscwValue) + boxHeight;
        leftTop = "dZSCW + W +";
      } else if (zscwType === "3002" || zscwType === "3003") {
        leftTopValue = Number(zscwValue);
        leftTop = "dZSCW +";
      } else if (zscwType === "3004") {
        leftTopValue = Number(zscwValue) + boxHeight * 2;
        leftTop = "dZSCW + W * 2 +";
      } else if (zscwType === "3005") {
        leftTopValue = boxHeight * 2;
        leftTop = "W * 2 +";
      }
      if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") {
        rightBottomValue = Number(yxcwValue) + boxHeight;
        rightBottom = "+ dYXCW + W";
      } else if (yxcwType === "7002" || yxcwType === "7003") {
        rightBottomValue = Number(yxcwValue);
        rightBottom = "+ dYXCW ";
      } else if (yxcwType === "7004") {
        rightBottomValue = Number(yxcwValue) + boxHeight * 2;
        rightBottom = "+ dYXCW + W * 2";
      } else if (yxcwType === "7005") {
        rightBottomValue = boxHeight * 2;
        rightBottom = "+ W * 2";
      }
      sWidthFormula = (leftTopValue > rightTopValue ? leftTop : rightTop) + "D" + (leftBottomValue > rightBottomValue ? leftBottom : rightBottom);
    } else if (boxType && boxType === "4") {
      // 天地盒
      const zxcw = boxList.find(x => x.sName === "左(下)插位组件");
      const zscw = boxList.find(x => x.sName === "左(上)插位组件");
      const yscw = boxList.find(x => x.sName === "右(上)插位组件");
      const yxcw = boxList.find(x => x.sName === "右(下)插位组件");
      const zxcwType = zxcw?.type;
      const zxcwValue = zxcw?.value;
      const zscwType = zscw?.type;
      const zscwValue = zscw?.value;
      const yscwType = yscw?.type;
      const yscwValue = yscw?.value;
      const yxcwType = yxcw?.type;
      const yxcwValue = yxcw?.value;
      let leftValue = "";
      let rightValue = "";
      let topValue = "";
      let bottomValue = "";
      if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") {
        // leftValue = leftValue + Number(zxcwValue) + boxHeight * 2;
        leftValue = "dZXCW + D * 2 +";
      } else if (zxcwType === "4002" || zxcwType === "4003") {
        leftValue = "dZXCW + D +";
      } else if (zxcwType === "4004") {
        leftValue = "dZXCW + D * 3 +";
      } else if (zxcwType === "4005") {
        leftValue = "D * 3 +";
      }
      if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") {
        rightValue = "+ dYSCW + D * 2";
      } else if (yscwType === "6002" || yscwType === "6003") {
        rightValue = "+ dYSCW + D";
      } else if (yscwType === "6004") {
        rightValue = "+ dYSCW + D * 3";
      } else if (yscwType === "6005") {
        rightValue = " + D * 3";
      }
      if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") {
        topValue = "dZSCW + D * 2 +";
      } else if (zscwType === "3002" || zscwType === "3003") {
        topValue = "dZSCW + D +";
      } else if (zscwType === "3004") {
        topValue = "dZSCW + D * 3 +";
      } else if (zscwType === "3005") {
        topValue = "D * 3+";
      }
      if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") {
        bottomValue = "+ dYXCW + D * 2";
      } else if (yxcwType === "7002" || yxcwType === "7003") {
        bottomValue = "+ dYXCW + D ";
      } else if (yxcwType === "7004") {
        bottomValue = "+ dYXCW + D * 3";
      } else if (yxcwType === "7005") {
        bottomValue = "+ D * 3";
      }
      // viewBoxWidth = Number(boxLength) + leftValue + rightValue;
      // viewBoxHeight = Number(boxWidth) + topValue + bottomValue;
      sLengthFormula = leftValue + "L" + rightValue;
      sWidthFormula = topValue + "W" + bottomValue;
    } else if (boxType && boxType === "5") {
      // 飞机盒
      const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value;
      const ytbw = boxList.find(x => x.sName === "右贴边位")?.type && boxList.find(x => x.sName === "右贴边位")?.value;
      sLengthFormula = (ztbw ? "dZTBW+ " : "") + "D * 2 + W * 2" + (ytbw ? " +dYTBW" : "");
      if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") {
        leftBottomValue = Number(zxcwValue) + boxHeight;
        leftBottom = " + dZXCW + D";
      } else if (zxcwType === "4002" || zxcwType === "4003") {
        leftBottomValue = Number(zxcwValue);
        leftBottom = " + dZXCW";
      } else if (zxcwType === "4004") {
        leftBottomValue = Number(zxcwValue) + boxHeight * 2;
        leftBottom = " + dZXCW + D * 2";
      } else if (zxcwType === "4005") {
        leftBottomValue = boxHeight * 2;
        leftBottom = "+ D * 2";
      }
      if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") {
        rightTopValue = Number(yscwValue) + boxHeight;
        rightTop = "dYSCW + D + ";
      } else if (yscwType === "6002" || yscwType === "6003") {
        rightTopValue = Number(yscwValue);
        rightTop = "dYSCW +  ";
      } else if (yscwType === "6004") {
        rightTopValue = Number(yscwValue) + boxHeight * 2;
        rightTop = "dYSCW + D * 2+ ";
      } else if (yscwType === "6005") {
        rightTopValue = boxHeight * 2;
        rightTop = "D * 2+ ";
      }
      if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") {
        leftTopValue = Number(zscwValue) + boxHeight;
        leftTop = "dZSCW + D +";
      } else if (zscwType === "3002" || zscwType === "3003") {
        leftTopValue = Number(zscwValue);
        leftTop = "dZSCW +";
      } else if (zscwType === "3004") {
        leftTopValue = Number(zscwValue) + boxHeight * 2;
        leftTop = "dZSCW + D * 2 +";
      } else if (zscwType === "3005") {
        leftTopValue = boxHeight * 2;
        leftTop = "D * 2 +";
      }
      if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") {
        rightBottomValue = Number(yxcwValue) + boxHeight;
        rightBottom = "+ dYXCW + D";
      } else if (yxcwType === "7002" || yxcwType === "7003") {
        rightBottomValue = Number(yxcwValue);
        rightBottom = "+ dYXCW ";
      } else if (yxcwType === "7004") {
        rightBottomValue = Number(yxcwValue) + boxHeight * 2;
        rightBottom = "+ dYXCW + D * 2";
      } else if (yxcwType === "7005") {
        rightBottomValue = boxHeight * 2;
        rightBottom = "+ D * 2";
      }
      sWidthFormula = (leftTopValue > rightTopValue ? leftTop : rightTop) + "L" + (leftBottomValue > rightBottomValue ? leftBottom : rightBottom);
    }

    // 存储盒身数据 主表
    const newMasterData = {
      ...masterData,
      sBoxBody: boxList.find(item => item.sName === "盒身")?.value || "",
      dBoxLength: boxList.find(item => item.sName === "盒长")?.value || "",
      dBoxWidth: boxList.find(item => item.sName === "盒宽")?.value || "",
      dBoxHeight: boxList.find(item => item.sName === "盒高")?.value || "",
      sName: boxList.find(item => item.sName === "盒型名称")?.value || "",
      sMakeUpPath: boxList.find(item => item.sName === "盒身")?.selectImage || "",
      sTypes: boxList.find(item => item.sName === "盒身")?.type || "",
      sLengthFormula: masterData.sLengthFormula || sLengthFormula,
      sWidthFormula: masterData.sWidthFormula || sWidthFormula,
    };

    onOk({ slaveData: newSlaveData, masterData: newMasterData }); // 提交数据
  };
  const findIndexBySname = name => {
    const i = boxList.findIndex(x => x.sName === name);
    return i || 0;
  };

  // 单独处理双层盒型
  if (boxType === "8") {
    console.log(newBoxList, boxList, "topBoxList");
  }
  return (
    <AntdDraggableModal
      width="1000px"
      height="calc(100vh - 50px)"
      title={title}
      visible={boxVisible}
      onCancel={onCancel}
      okText="创建"
      onOk={submit}
      bodyStyle={{
        height: "calc(95vh - 105px)",
        overflowY: "auto",
        display: "flex",
        flexDirection: "column",
      }}
      style={{
        top: 50,
      }}
    >
      {/* 盒身信息 */}

      <div className={styles.boxBody} key={boxKey}>
        <div className={styles.boxTop}>
          {topBoxList.map((topItem, index) => (
            <div key={index} className={styles.boxFlex} style={{ display: topItem.show ? "block" : "none" }}>
              <div className={styles.boxTitle}>{topItem.sName}</div>
              {topItem?.selectImage ? (
                <img
                  src={topItem?.selectImage}
                  alt={topItem.value}
                  style={{ width: 40, height: 30, marginRight: 8, position: "absolute", left: 20, top: 24, zIndex: 10 }}
                />
              ) : (
                ""
              )}

              <Select
                optionLabelProp="label"
                className="mySelects"
                style={{ width: 180 }}
                defaultValue={options.length ? options[0].value : ""}
                onSelect={(value, option) => handleSelect(value, option, index, 0)}
                onDropdownVisibleChange={async open => {
                  if (open) {
                    props.getSqlOptions(index + 1); // 在下拉菜单打开时调用 getSqlOptions
                  }
                }}
              >
                {!loading ? options.map(option => renderOptionWithImage(option)) : ""}
              </Select>
              <div className={styles.boxInput}>
                {/* <div className={styles.text}>参数:</div> */}
                <Input
                  value={topItem?.showName}
                  onChange={e => handleChangeName(e, index)}
                  onFocus={e => handleFocus(e, index)}
                  onBlur={e => handleBlur(e, index)}
                  readOnly={!topItem?.isEditable}
                  className={styles.text}
                />
                <Input
                  value={topItem?.value}
                  onChange={e => handleChange(e, index)}
                  onFocus={e => handleFocus(e, index)}
                  onBlur={e => handleBlur(e, index)}
                  readOnly={!topItem?.isEditable}
                  style={{ width: " 80%" }}
                />
              </div>
            </div>
          ))}
        </div>
        <div className={styles.boxLeft}>
          {leftBoxList.map((item, index) => (
            <div key={index + 3} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}>
              <div className={styles.boxTitle}>{titleList[index + 3]}</div>

              <Select
                optionLabelProp="label"
                className="mySelects"
                style={{ width: 180 }}
                defaultValue={options.length ? options[0].value : ""}
                onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)}
                onDropdownVisibleChange={async open => {
                  if (open) {
                    props.getSqlOptions(findIndexBySname(item.sName) + 1); // 在下拉菜单打开时调用 getSqlOptions
                  }
                }}
              >
                {!loading ? options.map(option => renderOptionWithImage(option)) : ""}
              </Select>
              <div className={styles.boxInput}>
                {item?.selectImage ? (
                  <img
                    src={item?.selectImage}
                    alt={item.value}
                    style={{
                      width: 40,
                      height: 30,
                      marginRight: 8,
                      position: "absolute",
                      left: 20,
                      top: -35,
                      zIndex: 10,
                    }}
                  />
                ) : (
                  ""
                )}
                <Input
                  value={item?.showName}
                  onChange={e => handleChangeName(e, findIndexBySname(item.sName))}
                  onFocus={e => handleFocus(e, findIndexBySname(item.sName))}
                  onBlur={e => handleBlur(e, findIndexBySname(item.sName))}
                  readOnly={!item?.isEditable}
                  className={styles.text}
                />
                <Input
                  value={item?.value}
                  onChange={e => handleChange(e, findIndexBySname(item.sName))}
                  onFocus={e => handleFocus(e, findIndexBySname(item.sName))}
                  onBlur={e => handleBlur(e, findIndexBySname(item.sName))}
                  readOnly={!item?.isEditable}
                  style={{ width: " 80%" }}
                />
              </div>
            </div>
          ))}
        </div>
        <div className={styles.boxRight}>
          {rightBoxList.map((item, index) => (
            <div key={findIndexBySname(item.sName)} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}>
              <div className={styles.boxTitle}>{titleList[findIndexBySname(item.sName)]}</div>

              <Select
                optionLabelProp="label"
                className="mySelects"
                style={{ width: 180 }}
                defaultValue={options.length ? options[0].value : ""}
                onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)}
                onDropdownVisibleChange={async open => {
                  if (open) {
                    props.getSqlOptions(findIndexBySname(item.sName) + 1); // 在下拉菜单打开时调用 getSqlOptions
                  }
                }}
              >
                {!loading ? options.map(option => renderOptionWithImage(option)) : ""}
              </Select>
              <div className={styles.boxInput}>
                {item?.selectImage ? (
                  <img
                    src={item?.selectImage}
                    alt={item.value}
                    style={{
                      width: 40,
                      height: 30,
                      marginRight: 8,
                      position: "absolute",
                      left: 20,
                      top: -35,
                      zIndex: 10,
                    }}
                  />
                ) : (
                  ""
                )}

                <Input
                  value={item?.showName}
                  onChange={e => handleChangeName(e, findIndexBySname(item.sName))}
                  onFocus={e => handleFocus(e, findIndexBySname(item.sName))}
                  onBlur={e => handleBlur(e, findIndexBySname(item.sName))}
                  readOnly={!item?.isEditable}
                  className={styles.text}
                />
                <Input
                  value={item?.value}
                  onChange={e => handleChange(e, findIndexBySname(item.sName))}
                  onFocus={e => handleFocus(e, findIndexBySname(item.sName))}
                  onBlur={e => handleBlur(e, findIndexBySname(item.sName))}
                  readOnly={!item?.isEditable}
                  style={{ width: " 80%" }}
                />
              </div>
            </div>
          ))}
        </div>
        <div className={styles.boxBottom}>
          <div className={styles.svgBox}>
            <SvgBox {...svgBoxProps} />
          </div>
          <div className={styles.content}>
            {tableColum && tableColum.length
              ? tableColum.map((item, index) => {
                  const uniqueIndex = index + 9;
                  return (
                    <div key={uniqueIndex} className={styles.boxFlex}>
                      <div className={styles.boxInput}>
                        <div className={styles.text} style={{ width: "120px" }}>
                          {item.showName}
                        </div>
                        <Input
                          value={boxList[uniqueIndex]?.value}
                          onChange={e => handleChange(e, uniqueIndex)}
                          onFocus={e => handleFocus(e, uniqueIndex)}
                          onBlur={e => handleBlur(e, uniqueIndex)}
                          readOnly={!boxList[uniqueIndex]?.isEditable}
                          style={{ width: " 80%" }}
                        />
                      </div>
                    </div>
                  );
                })
              : ""}
            {boxBodyList && boxBodyList.length
              ? boxBodyList.map((item, index) => {
                  const uniqueIndex = index + 9 + tableColum.length;

                  return (
                    <div key={uniqueIndex} className={styles.boxFlex}>
                      <div className={styles.boxInput}>
                        <div className={styles.text} style={{ width: "120px" }}>
                          {item.showName}
                        </div>
                        {boxList[uniqueIndex]?.selectImage ? (
                          <img
                            src={boxList[uniqueIndex]?.selectImage}
                            alt={boxList[uniqueIndex].value}
                            style={{ width: 40, height: 30, marginRight: 8, position: "absolute", left: 120, top: 6, zIndex: 10 }}
                          />
                        ) : (
                          ""
                        )}
                        {isDefaultValue ? <div className={styles.defaultValue}>{boxList[uniqueIndex]?.value}</div> : ""}
                        <Select
                          optionLabelProp="label"
                          className="mySelects"
                          style={{ width: "80%" }}
                          defaultValue={boxList[uniqueIndex]?.value}
                          onSelect={(value, option) => handleSelect(value, option, uniqueIndex, 1)}
                          onDropdownVisibleChange={async open => {
                            if (open) {
                              props.getSqlOptions(10); // 盒身
                            }
                          }}
                        >
                          {!loading ? options.map(option => renderOptionWithImage(option)) : ""}
                        </Select>
                      </div>
                    </div>
                  );
                })
              : ""}
            <div className={styles.boxFlexs}>
              {tableDataList && tableDataList.length && boxType !== '8'
                ? tableDataList.map((item, index) => {
                    const uniqueIndex = index + 9 + tableColum.length + boxBodyList.length;

                    return (
                      <div key={uniqueIndex} className={styles.boxInputs}>
                        <div className={styles.text}>{item.sName}</div>
                        <Input
                          value={boxList[uniqueIndex]?.value}
                          onChange={e => handleChange(e, uniqueIndex)}
                          onFocus={e => handleFocus(e, uniqueIndex)}
                          onBlur={e => handleBlur(e, uniqueIndex)}
                          readOnly={!boxList[uniqueIndex]?.isEditable}
                          style={{ width: " 60%" }}
                        />
                      </div>
                    );
                  })
                : ""}
            </div>
            
             <div className={styles.boxFlexs}>
              {doubleLayerList && doubleLayerList.length && boxType === '8'
                ? doubleLayerList.map((item, index) => {
                    const uniqueIndex = index + 9 + tableColum.length + boxBodyList.length + tableDataList.length;

                    return (
                      <div key={uniqueIndex} className={styles.boxInputs}>
                        <div className={styles.text}>{item.sName}</div>
                        <Input
                          value={boxList[uniqueIndex]?.value}
                          onChange={e => handleChange(e, uniqueIndex)}
                          onFocus={e => handleFocus(e, uniqueIndex)}
                          onBlur={e => handleBlur(e, uniqueIndex)}
                          readOnly={!boxList[uniqueIndex]?.isEditable}
                          style={{ width: " 60%" }}
                        />
                      </div>
                    );
                  })
                : ""}
            </div>
          </div>
        </div>
      </div>
    </AntdDraggableModal>
  );
};

export default CommonBase(BoxDesignCompontent);