@bit-sun/business-component 2.0.5 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import axios from 'axios';
2
- import React, { createContext, useContext, useEffect, forwardRef, createElement, useState, useMemo, useRef } from 'react';
3
- import { message, Menu, Space, Dropdown, Tooltip, Button, Checkbox, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, InputNumber } from 'antd';
2
+ import 'antd/dist/antd.css';
3
+ import React, { createContext, useContext, useEffect, forwardRef, createElement, useState, useRef, useMemo } from 'react';
4
+ import { message, Menu, Space, Dropdown, Tooltip, Button, Checkbox, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, InputNumber, Popover } from 'antd';
4
5
  import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
5
6
  import classNames from 'classnames';
6
7
  import _ from 'loadsh';
@@ -2052,7 +2053,7 @@ var luckysheet; // const mapping = [
2052
2053
  // { "key": "price", "name": "单价", "rule": "price" }
2053
2054
  // ]
2054
2055
 
2055
- var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注']]); // for dnd
2056
+ var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注'], ['externalCode', 'JDE商品编码']]); // for dnd
2056
2057
 
2057
2058
 
2058
2059
  var reorder = function reorder(list, startIndex, endIndex) {
@@ -4395,7 +4396,7 @@ var SearchSelect = function SearchSelect(props) {
4395
4396
  }), " \u5168\u9009\u6240\u6709\u9875\u9762") : '')))));
4396
4397
  };
4397
4398
 
4398
- var css_248z$4 = ".add_select_show {\n display: flex;\n}\n.add_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.add_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.add_select_header {\n border-bottom: 1px solid #D9D9D9;\n height: 24px;\n height: 40px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 40px;\n margin-bottom: 10px;\n padding-left: 10px;\n}\n.add_select_header > span {\n margin-left: 20px;\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 40px;\n}\n.add_select_header > span > span {\n color: #ff0000;\n}\n.add_select_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_wrapper {\n position: relative;\n display: flex;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n margin: 5px 10px;\n}\n.add_select_wrapper .ant-table-pagination.ant-pagination {\n margin: 5px;\n padding-right: 5px;\n}\n.add_select_wrapper .ant-checkbox-wrapper {\n justify-content: center;\n}\n.add_select_wrapper .ant-form-item-label {\n padding: 0PX;\n line-height: 23px !important;\n}\n.add_select_wrapper .ant-form-item-label > label {\n font-size: 12px;\n}\n.add_select_wrapper .ant-table-thead th {\n height: 20px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper .row-class {\n height: 24px;\n}\n.add_select_wrapper .row-class td {\n font-size: 12px !important;\n height: 24px !important;\n padding: 0px 8px !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select_wrapper .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.add_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_left {\n flex-basis: 298px;\n width: 298px;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-right: 10px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.add_select_wrapper_right {\n width: 872px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_right1 {\n width: 100%;\n margin-left: 10px;\n}\n.add_select_wrapper_right,\n.add_select_wrapper_right1 {\n overflow-x: auto;\n}\n.add_select_wrapper .select_list_columns {\n height: 272px;\n overflow-y: auto;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.add_select_wrapper .select_list_columns_formItems {\n padding: 7px 10px;\n}\n.add_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px;\n justify-content: flex-end;\n}\n.add_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.add_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 5px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n.add_select_wrapper_select {\n margin-top: 4px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n margin: 5px 10px;\n}\n.add_select_wrapper_select .ant-table-pagination.ant-pagination {\n margin: 9px;\n padding-right: 5px;\n}\n.add_select_wrapper_select .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper_select .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper_select .ant-table-thead th {\n height: 23px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-modal-close-x {\n height: 30px;\n}\n.add_select_wrapper_select .row-class {\n height: 30px;\n}\n.add_select_wrapper_select .row-class td {\n font-size: 12px !important;\n height: 30px !important;\n padding: 4px 8px !important;\n}\n.add_select_wrapper_select .ant-table-body {\n height: 200px;\n overflow-y: auto !important;\n}\n.add_select_wrapper_select .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_select .ant-input-number-input {\n height: auto;\n}\n.add_select_wrapper_select .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 3px;\n border-bottom: 1px solid #D9D9D9;\n}\n";
4399
+ var css_248z$4 = ".add_select_show {\n display: flex;\n}\n.add_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.add_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.add_select_header {\n border-bottom: 1px solid #D9D9D9;\n height: 24px;\n height: 40px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 40px;\n margin-bottom: 10px;\n padding-left: 10px;\n}\n.add_select_header > span {\n margin-left: 20px;\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 40px;\n}\n.add_select_header > span > span {\n color: #ff0000;\n}\n.add_select_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_quick_header {\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.add_select_quick_header_title {\n display: flex;\n justify-content: space-between;\n}\n.add_select_quick_header > span {\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 20px;\n}\n.add_select_quick_header > span > span {\n color: #ff0000;\n}\n.add_select_quick_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_wrapper {\n position: relative;\n display: flex;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n margin: 5px 10px;\n}\n.add_select_wrapper .ant-table-pagination.ant-pagination {\n margin: 5px;\n padding-right: 5px;\n}\n.add_select_wrapper .ant-checkbox-wrapper {\n justify-content: center;\n}\n.add_select_wrapper .ant-form-item-label {\n padding: 0PX;\n line-height: 23px !important;\n}\n.add_select_wrapper .ant-form-item-label > label {\n font-size: 12px;\n}\n.add_select_wrapper .ant-table-thead th {\n height: 20px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper .row-class {\n height: 24px;\n}\n.add_select_wrapper .row-class td {\n font-size: 12px !important;\n height: 24px !important;\n padding: 0px 8px !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select_wrapper .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.add_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_left {\n flex-basis: 298px;\n width: 298px;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-right: 10px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.add_select_wrapper_right {\n width: 872px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_right1 {\n width: 100%;\n margin-left: 10px;\n}\n.add_select_wrapper_right,\n.add_select_wrapper_right1 {\n overflow-x: auto;\n}\n.add_select_wrapper .select_list_columns {\n height: 272px;\n overflow-y: auto;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.add_select_wrapper .select_list_columns_formItems {\n padding: 7px 10px;\n}\n.add_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px;\n justify-content: flex-end;\n}\n.add_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.add_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 5px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n.add_select_wrapper_select {\n margin-top: 4px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n margin: 5px 10px;\n}\n.add_select_wrapper_select .ant-table-pagination.ant-pagination {\n margin: 9px;\n padding-right: 5px;\n}\n.add_select_wrapper_select .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper_select .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper_select .ant-table-thead th {\n height: 23px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-modal-close-x {\n height: 30px;\n}\n.add_select_wrapper_select .row-class {\n height: 30px;\n}\n.add_select_wrapper_select .row-class td {\n font-size: 12px !important;\n height: 30px !important;\n padding: 4px 8px !important;\n}\n.add_select_wrapper_select .ant-table-body {\n height: 200px;\n overflow-y: auto !important;\n}\n.add_select_wrapper_select .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_select .ant-input-number-input,\n.add_select_wrapper_select .ant-input {\n height: auto;\n height: 22px;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select-selection-search-input {\n height: auto;\n height: 22px !important;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select .ant-select-arrow {\n top: 13px;\n}\n.add_select_wrapper_select .ant-select-selector {\n position: relative;\n top: 1px;\n height: 23px !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-select-selector .ant-select-selection-item,\n.add_select_wrapper_select .ant-select-selector ant-select-selection-search {\n height: 23px !important;\n line-height: 23px !important;\n font-size: 12px;\n}\n.add_select_wrapper_select .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 3px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper_select_quick {\n margin: 0;\n}\n";
4399
4400
  styleInject(css_248z$4);
4400
4401
 
4401
4402
  var loadSelectSource = function loadSelectSource(url, params) {
@@ -5435,6 +5436,744 @@ var AddSelect = function AddSelect(props) {
5435
5436
  })))));
5436
5437
  };
5437
5438
 
5439
+ var css_248z$5 = ".add_select_show {\n display: flex;\n}\n.add_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.add_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.add_select_header {\n border-bottom: 1px solid #D9D9D9;\n height: 24px;\n height: 40px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 40px;\n margin-bottom: 10px;\n padding-left: 10px;\n}\n.add_select_header > span {\n margin-left: 20px;\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 40px;\n}\n.add_select_header > span > span {\n color: #ff0000;\n}\n.add_select_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_quick_header {\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.add_select_quick_header_title {\n display: flex;\n justify-content: space-between;\n}\n.add_select_quick_header > span {\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 20px;\n}\n.add_select_quick_header > span > span {\n color: #ff0000;\n}\n.add_select_quick_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_wrapper {\n position: relative;\n display: flex;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n margin: 5px 10px;\n}\n.add_select_wrapper .ant-table-pagination.ant-pagination {\n margin: 5px;\n padding-right: 5px;\n}\n.add_select_wrapper .ant-checkbox-wrapper {\n justify-content: center;\n}\n.add_select_wrapper .ant-form-item-label {\n padding: 0PX;\n line-height: 23px !important;\n}\n.add_select_wrapper .ant-form-item-label > label {\n font-size: 12px;\n}\n.add_select_wrapper .ant-table-thead th {\n height: 20px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper .row-class {\n height: 24px;\n}\n.add_select_wrapper .row-class td {\n font-size: 12px !important;\n height: 24px !important;\n padding: 0px 8px !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select_wrapper .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.add_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_left {\n flex-basis: 298px;\n width: 298px;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-right: 10px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.add_select_wrapper_right {\n width: 872px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_right1 {\n width: 100%;\n margin-left: 10px;\n}\n.add_select_wrapper_right,\n.add_select_wrapper_right1 {\n overflow-x: auto;\n}\n.add_select_wrapper .select_list_columns {\n height: 272px;\n overflow-y: auto;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.add_select_wrapper .select_list_columns_formItems {\n padding: 7px 10px;\n}\n.add_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px;\n justify-content: flex-end;\n}\n.add_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.add_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 5px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n.add_select_wrapper_select {\n margin-top: 4px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n margin: 5px 10px;\n}\n.add_select_wrapper_select .ant-table-pagination.ant-pagination {\n margin: 9px;\n padding-right: 5px;\n}\n.add_select_wrapper_select .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper_select .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper_select .ant-table-thead th {\n height: 23px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-modal-close-x {\n height: 30px;\n}\n.add_select_wrapper_select .row-class {\n height: 30px;\n}\n.add_select_wrapper_select .row-class td {\n font-size: 12px !important;\n height: 30px !important;\n padding: 4px 8px !important;\n}\n.add_select_wrapper_select .ant-table-body {\n height: 200px;\n overflow-y: auto !important;\n}\n.add_select_wrapper_select .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_select .ant-input-number-input,\n.add_select_wrapper_select .ant-input {\n height: auto;\n height: 22px;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select-selection-search-input {\n height: auto;\n height: 22px !important;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select .ant-select-arrow {\n top: 13px;\n}\n.add_select_wrapper_select .ant-select-selector {\n position: relative;\n top: 1px;\n height: 23px !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-select-selector .ant-select-selection-item,\n.add_select_wrapper_select .ant-select-selector ant-select-selection-search {\n height: 23px !important;\n line-height: 23px !important;\n font-size: 12px;\n}\n.add_select_wrapper_select .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 3px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick {\n margin: 0;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .table_base {\n background: #fff;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .table_odd {\n background: #f7f8fb;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .ant-table-cell-fix-left,\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .ant-table-cell-fix-right {\n background: #FFFFFF !important;\n}\n";
5440
+ styleInject(css_248z$5);
5441
+
5442
+ var _this = undefined;
5443
+
5444
+ var InputElement = function InputElement(_ref) {
5445
+ var record = _ref.record,
5446
+ text = _ref.text,
5447
+ currentIndex = _ref.currentIndex,
5448
+ inputLength = _ref.inputLength,
5449
+ index = _ref.index,
5450
+ setData = _ref.setData,
5451
+ data = _ref.data,
5452
+ item = _ref.item,
5453
+ callSelectItem = _ref.callSelectItem;
5454
+
5455
+ var _useState = useState(false),
5456
+ _useState2 = _slicedToArray(_useState, 2),
5457
+ hoverVisibled = _useState2[0],
5458
+ updateHoverVisibled = _useState2[1];
5459
+
5460
+ var _useState3 = useState([]),
5461
+ _useState4 = _slicedToArray(_useState3, 2),
5462
+ searchData = _useState4[0],
5463
+ updateSearchData = _useState4[1];
5464
+
5465
+ var tableRef = useRef(null);
5466
+
5467
+ var _useState5 = useState(text),
5468
+ _useState6 = _slicedToArray(_useState5, 2),
5469
+ value = _useState6[0],
5470
+ setValue = _useState6[1];
5471
+
5472
+ var inputRef = useRef(false);
5473
+
5474
+ var onSerchdata = function onSerchdata(name) {
5475
+ axios.get("/items/sku/pager/v2?".concat(stringify({
5476
+ 'skuCodeAndSkuName': name,
5477
+ 'pageSize': 100
5478
+ }))).then(function (_ref2) {
5479
+ var data = _ref2.data,
5480
+ status = _ref2.status;
5481
+
5482
+ if (status === 200) {
5483
+ if (data.status === '0') {
5484
+ updateSearchData(data.data.items.map(function (item, index) {
5485
+ return _objectSpread2(_objectSpread2({}, item), {}, {
5486
+ index: index
5487
+ });
5488
+ }));
5489
+ } else {
5490
+ updateSearchData([]);
5491
+ }
5492
+ }
5493
+ });
5494
+ };
5495
+
5496
+ var onCallback = function onCallback(itemData) {
5497
+ updateHoverVisibled(false);
5498
+
5499
+ if (itemData) {
5500
+ callSelectItem(_objectSpread2(_objectSpread2({}, itemData), {}, {
5501
+ needFocus: true
5502
+ }));
5503
+ setValue(itemData[item.dataIndex]);
5504
+ } else {
5505
+ callSelectItem(null);
5506
+ }
5507
+ };
5508
+
5509
+ var SearchDataTable = function SearchDataTable(hoverVisibled) {
5510
+ var _useState7 = useState(0),
5511
+ _useState8 = _slicedToArray(_useState7, 2),
5512
+ selectIndex = _useState8[0],
5513
+ setSelectIndex = _useState8[1];
5514
+
5515
+ var inputRef = useRef(null);
5516
+ useEffect(function () {
5517
+ if (searchData.length && hoverVisibled) {
5518
+ var _tableRef$current;
5519
+
5520
+ var dom = tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[0];
5521
+
5522
+ if (dom) {
5523
+ dom.style.background = '#005CFF30';
5524
+ }
5525
+ }
5526
+ }, [hoverVisibled, tableRef === null || tableRef === void 0 ? void 0 : tableRef.current]);
5527
+ useEffect(function () {
5528
+ var inter = setInterval(function () {
5529
+ if (inputRef.current) {
5530
+ inputRef.current.focus();
5531
+ }
5532
+ }, 500);
5533
+ return function () {
5534
+ clearInterval(inter);
5535
+ };
5536
+ });
5537
+ if (!hoverVisibled) return /*#__PURE__*/React.createElement(React.Fragment, null);
5538
+ return /*#__PURE__*/React.createElement("div", {
5539
+ className: 'add_select_wrapper_select',
5540
+ style: {
5541
+ width: '800px',
5542
+ height: '400px',
5543
+ overflow: 'auto',
5544
+ position: 'relative'
5545
+ }
5546
+ }, /*#__PURE__*/React.createElement(Input, {
5547
+ placeholder: "\u8BF7\u8F93\u5165skucode\u6216\u8005sku\u540D\u79F0",
5548
+ ref: inputRef,
5549
+ style: {
5550
+ position: 'absolute',
5551
+ zIndex: '-100',
5552
+ height: '22px'
5553
+ },
5554
+ onKeyDown: function onKeyDown(e) {
5555
+ var currentIndex = selectIndex;
5556
+
5557
+ if (e.keyCode === 27) {
5558
+ e.stopPropagation();
5559
+ e.preventDefault();
5560
+ setSelectIndex(0);
5561
+ onCallback(null);
5562
+ }
5563
+
5564
+ if (e.keyCode === 13) {
5565
+ // enter
5566
+ onCallback(searchData[currentIndex]);
5567
+ setSelectIndex(0);
5568
+ }
5569
+
5570
+ if (e.keyCode === 40) {
5571
+ // 向下
5572
+ var dom = tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex + 1];
5573
+
5574
+ if (dom) {
5575
+ tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex].style.background = '';
5576
+ setSelectIndex(currentIndex + 1);
5577
+ dom.style.background = '#005CFF30';
5578
+ dom.scrollIntoViewIfNeeded(false);
5579
+ }
5580
+ } else if (e.keyCode === 38) {
5581
+ var _dom = tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex - 1];
5582
+
5583
+ if (_dom) {
5584
+ tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex].style.background = '';
5585
+ setSelectIndex(currentIndex - 1);
5586
+ _dom.style.background = '#005CFF30';
5587
+
5588
+ _dom.scrollIntoViewIfNeeded(false);
5589
+ }
5590
+ }
5591
+ }
5592
+ }), /*#__PURE__*/React.createElement(Table, {
5593
+ ref: tableRef,
5594
+ pagination: false,
5595
+ // components={
5596
+ // {
5597
+ // body: {
5598
+ // cell: ({index, record, ...props}) => {
5599
+ // debugger
5600
+ // return <td {...props} style={selectIndex === record?.index ? {background: '#005CFF30'} : {} } />
5601
+ // }
5602
+ // }
5603
+ // }
5604
+ // }
5605
+ onRow: function onRow(record, index) {
5606
+ return {
5607
+ onClick: function (record, index, event) {
5608
+ var dom = tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[index];
5609
+
5610
+ if (dom) {
5611
+ _toConsumableArray(tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')).map(function (item) {
5612
+ item.style.background = '';
5613
+ });
5614
+
5615
+ dom.style.background = '#005CFF30';
5616
+ dom.scrollIntoViewIfNeeded(false);
5617
+ }
5618
+
5619
+ setSelectIndex(index);
5620
+ }.bind(_this, record, index) // 点击行
5621
+
5622
+ };
5623
+ },
5624
+ rowClassName: 'row-class',
5625
+ columns: [{
5626
+ title: 'SKU编码',
5627
+ width: 150,
5628
+ dataIndex: 'skuCode'
5629
+ }, {
5630
+ title: 'SKU名称',
5631
+ width: 200,
5632
+ ellipsis: {
5633
+ showTitle: false
5634
+ },
5635
+ render: function render(text) {
5636
+ return /*#__PURE__*/React.createElement(Tooltip, {
5637
+ placement: "topLeft",
5638
+ title: text
5639
+ }, text);
5640
+ },
5641
+ dataIndex: 'name'
5642
+ }, {
5643
+ title: '国际条码',
5644
+ width: 100,
5645
+ ellipsis: {
5646
+ showTitle: false
5647
+ },
5648
+ dataIndex: 'barCode',
5649
+ render: function render(text) {
5650
+ return /*#__PURE__*/React.createElement(Tooltip, {
5651
+ placement: "topLeft",
5652
+ title: text
5653
+ }, text);
5654
+ }
5655
+ }, {
5656
+ title: '所属SPU名称',
5657
+ width: 100,
5658
+ ellipsis: {
5659
+ showTitle: false
5660
+ },
5661
+ dataIndex: 'itemName',
5662
+ render: function render(text) {
5663
+ return /*#__PURE__*/React.createElement(Tooltip, {
5664
+ placement: "topLeft",
5665
+ title: text
5666
+ }, text);
5667
+ }
5668
+ }, {
5669
+ title: '所属SPU编码',
5670
+ width: 100,
5671
+ ellipsis: {
5672
+ showTitle: false
5673
+ },
5674
+ dataIndex: 'itemCode',
5675
+ render: function render(text) {
5676
+ return /*#__PURE__*/React.createElement(Tooltip, {
5677
+ placement: "topLeft",
5678
+ title: text
5679
+ }, text);
5680
+ }
5681
+ }, {
5682
+ title: '外部编码',
5683
+ width: 100,
5684
+ ellipsis: {
5685
+ showTitle: false
5686
+ },
5687
+ render: function render(text) {
5688
+ return /*#__PURE__*/React.createElement(Tooltip, {
5689
+ placement: "topLeft",
5690
+ title: text
5691
+ }, text);
5692
+ },
5693
+ dataIndex: 'externalCode'
5694
+ }],
5695
+ dataSource: searchData
5696
+ }));
5697
+ };
5698
+
5699
+ return /*#__PURE__*/React.createElement(Popover, {
5700
+ placement: "bottomLeft",
5701
+ destroyTooltipOnHide: {
5702
+ keepParent: false
5703
+ },
5704
+ title: "",
5705
+ trigger: "",
5706
+ content: SearchDataTable(hoverVisibled),
5707
+ visible: hoverVisibled,
5708
+ onVisibleChange: function onVisibleChange(disabled) {
5709
+ updateHoverVisibled(disabled);
5710
+ }
5711
+ }, item.isPrimaryInput ? /*#__PURE__*/React.createElement(Input, {
5712
+ value: value,
5713
+ ref: inputRef,
5714
+ placeholder: "skucode / sku\u540D\u79F0",
5715
+ keyboard: false,
5716
+ autoFocus: record.autoFocus,
5717
+ onChange: function onChange(value) {
5718
+ record[item.dataIndex] = value.currentTarget.value;
5719
+ setValue(value.currentTarget.value); // setData(data);
5720
+ },
5721
+ // onFocus={(e)=> {
5722
+ // let dom1 = e.currentTarget;
5723
+ // dom1.setSelectionRange(100, 0);
5724
+ // dom1.select(text);
5725
+ // }}
5726
+ onKeyDown: function onKeyDown(e) {
5727
+ // if (e.keyCode === 13 && e.ctrlKey) {
5728
+ // handleOk(true)
5729
+ // document.getElementById("first-query")?.focus()
5730
+ // }
5731
+ if (e.keyCode === 8 && e.ctrlKey && index) {
5732
+ var _e$nativeEvent$path$;
5733
+
5734
+ message.success('删除当前行');
5735
+ e.stopPropagation();
5736
+ e.preventDefault();
5737
+ var dom = (_e$nativeEvent$path$ = e.nativeEvent.path[3].children[index]) === null || _e$nativeEvent$path$ === void 0 ? void 0 : _e$nativeEvent$path$.getElementsByTagName('input')[currentIndex];
5738
+
5739
+ if (dom) {
5740
+ dom.select();
5741
+ dom.focus();
5742
+ dom.scrollIntoViewIfNeeded(false);
5743
+ }
5744
+
5745
+ dom = null;
5746
+ setData(data.filter(function (item, innerIndex) {
5747
+ return innerIndex !== index;
5748
+ }));
5749
+ }
5750
+
5751
+ if (e.keyCode === 13) {
5752
+ // enter
5753
+ if (item.isPrimaryInput) {
5754
+ if (e.currentTarget.value.length < 2) {
5755
+ message.warning('至少输入两个字符');
5756
+ } else {
5757
+ updateHoverVisibled(true);
5758
+ onSerchdata(e.currentTarget.value);
5759
+ }
5760
+ }
5761
+ }
5762
+
5763
+ if (e.keyCode === 37 && e.shiftKey) {
5764
+ var _e$nativeEvent$path$2;
5765
+
5766
+ // 左滑动
5767
+ e.stopPropagation();
5768
+ e.preventDefault();
5769
+
5770
+ var _dom2 = (_e$nativeEvent$path$2 = e.nativeEvent.path[3].children[index + 1]) === null || _e$nativeEvent$path$2 === void 0 ? void 0 : _e$nativeEvent$path$2.getElementsByTagName('input')[currentIndex - 1];
5771
+
5772
+ if (_dom2) {
5773
+ _dom2.select();
5774
+
5775
+ _dom2.focus();
5776
+
5777
+ _dom2.scrollIntoViewIfNeeded(false);
5778
+ }
5779
+
5780
+ _dom2 = null;
5781
+ }
5782
+
5783
+ if (e.keyCode === 39 && e.shiftKey) {
5784
+ var _e$nativeEvent$path$3;
5785
+
5786
+ // 右滑
5787
+ e.stopPropagation();
5788
+ e.preventDefault();
5789
+
5790
+ var _dom3 = (_e$nativeEvent$path$3 = e.nativeEvent.path[3].children[index + 1]) === null || _e$nativeEvent$path$3 === void 0 ? void 0 : _e$nativeEvent$path$3.getElementsByTagName('input')[currentIndex + 1];
5791
+
5792
+ if (_dom3) {
5793
+ _dom3.select();
5794
+
5795
+ _dom3.focus();
5796
+
5797
+ _dom3.scrollIntoViewIfNeeded(false);
5798
+ }
5799
+
5800
+ _dom3 = null;
5801
+ }
5802
+
5803
+ if (e.keyCode === 40) {
5804
+ var _e$nativeEvent$path$4;
5805
+
5806
+ // 向下
5807
+ debugger;
5808
+ e.stopPropagation();
5809
+ e.preventDefault();
5810
+
5811
+ var _dom4 = (_e$nativeEvent$path$4 = e.nativeEvent.path[3].children[index + 2]) === null || _e$nativeEvent$path$4 === void 0 ? void 0 : _e$nativeEvent$path$4.getElementsByTagName('input')[currentIndex];
5812
+
5813
+ if (_dom4) {
5814
+ _dom4.select();
5815
+
5816
+ _dom4.focus();
5817
+
5818
+ _dom4.scrollIntoViewIfNeeded(false);
5819
+ }
5820
+
5821
+ _dom4 = null;
5822
+ } else if (e.keyCode === 38) {
5823
+ var _e$nativeEvent$path$5;
5824
+
5825
+ e.stopPropagation();
5826
+ e.preventDefault();
5827
+ var dom1 = (_e$nativeEvent$path$5 = e.nativeEvent.path[3].children[index]) === null || _e$nativeEvent$path$5 === void 0 ? void 0 : _e$nativeEvent$path$5.getElementsByTagName('input')[currentIndex];
5828
+
5829
+ if (dom1) {
5830
+ // dom1.value=""
5831
+ // dom1.setSelectionRange(100, 0);
5832
+ dom1.select();
5833
+ dom1.focus();
5834
+ dom1.scrollIntoViewIfNeeded(false); // dom1.value=record['count']
5835
+ }
5836
+
5837
+ dom1 = null;
5838
+ } else if (e.keyCode === 9 && currentIndex === inputLength - 1 && index === data.length - 1) {
5839
+ setData([].concat(_toConsumableArray(data), [{}]));
5840
+ }
5841
+ }
5842
+ }) : /*#__PURE__*/React.createElement(InputNumber // onBlur={() => {updateHoverVisibled(false)}}
5843
+ , {
5844
+ // onBlur={() => {updateHoverVisibled(false)}}
5845
+ defaultValue: text || 0,
5846
+ min: 0,
5847
+ keyboard: false,
5848
+ onChange: function onChange(value) {
5849
+ record[item.dataIndex] = value;
5850
+ },
5851
+ onKeyDown: function onKeyDown(e) {
5852
+ // if (e.keyCode === 13 && e.ctrlKey) {
5853
+ // handleOk(true)
5854
+ // document.getElementById("first-query")?.focus()
5855
+ // }
5856
+ if (e.keyCode === 8 && e.ctrlKey && index) {
5857
+ var _e$nativeEvent$path$6;
5858
+
5859
+ message.success('删除当前行');
5860
+ e.stopPropagation();
5861
+ e.preventDefault();
5862
+ var dom = (_e$nativeEvent$path$6 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$6 === void 0 ? void 0 : _e$nativeEvent$path$6.getElementsByTagName('input')[currentIndex];
5863
+
5864
+ if (dom) {
5865
+ dom.select();
5866
+ dom.focus();
5867
+ dom.scrollIntoViewIfNeeded(false);
5868
+ }
5869
+
5870
+ dom = null;
5871
+ setData(data.filter(function (item, innerIndex) {
5872
+ return innerIndex !== index;
5873
+ }));
5874
+ }
5875
+
5876
+ if (e.keyCode === 37 && e.shiftKey) {
5877
+ var _e$nativeEvent$path$7;
5878
+
5879
+ // 左滑动
5880
+ e.stopPropagation();
5881
+ e.preventDefault();
5882
+
5883
+ var _dom5 = (_e$nativeEvent$path$7 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$7 === void 0 ? void 0 : _e$nativeEvent$path$7.getElementsByTagName('input')[currentIndex - 1];
5884
+
5885
+ if (_dom5) {
5886
+ _dom5.select();
5887
+
5888
+ _dom5.focus();
5889
+
5890
+ _dom5.scrollIntoViewIfNeeded(false);
5891
+ }
5892
+
5893
+ _dom5 = null;
5894
+ }
5895
+
5896
+ if (e.keyCode === 39 && e.shiftKey) {
5897
+ var _e$nativeEvent$path$8;
5898
+
5899
+ // 右滑
5900
+ e.stopPropagation();
5901
+ e.preventDefault();
5902
+
5903
+ var _dom6 = (_e$nativeEvent$path$8 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$8 === void 0 ? void 0 : _e$nativeEvent$path$8.getElementsByTagName('input')[currentIndex + 1];
5904
+
5905
+ if (_dom6) {
5906
+ _dom6.select();
5907
+
5908
+ _dom6.focus();
5909
+
5910
+ _dom6.scrollIntoViewIfNeeded(false);
5911
+ }
5912
+
5913
+ _dom6 = null;
5914
+ }
5915
+
5916
+ if (e.keyCode === 40) {
5917
+ var _e$nativeEvent$path$9;
5918
+
5919
+ // 向下
5920
+ e.stopPropagation();
5921
+ e.preventDefault();
5922
+
5923
+ var _dom7 = (_e$nativeEvent$path$9 = e.nativeEvent.path[5].children[index + 2]) === null || _e$nativeEvent$path$9 === void 0 ? void 0 : _e$nativeEvent$path$9.getElementsByTagName('input')[currentIndex];
5924
+
5925
+ if (_dom7) {
5926
+ _dom7.select();
5927
+
5928
+ _dom7.focus();
5929
+
5930
+ _dom7.scrollIntoViewIfNeeded(false);
5931
+ }
5932
+
5933
+ _dom7 = null;
5934
+ } else if (e.keyCode === 38) {
5935
+ var _e$nativeEvent$path$10;
5936
+
5937
+ e.stopPropagation();
5938
+ e.preventDefault();
5939
+ var dom1 = (_e$nativeEvent$path$10 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$10 === void 0 ? void 0 : _e$nativeEvent$path$10.getElementsByTagName('input')[currentIndex];
5940
+
5941
+ if (dom1) {
5942
+ // dom1.value=""
5943
+ // dom1.setSelectionRange(100, 0);
5944
+ dom1.select();
5945
+ dom1.focus();
5946
+ dom1.scrollIntoViewIfNeeded(false); // dom1.value=record['count']
5947
+ }
5948
+
5949
+ dom1 = null;
5950
+ } else if (e.keyCode === 9 && currentIndex === inputLength - 1 && index === data.length - 1) {
5951
+ e.stopPropagation();
5952
+ e.preventDefault();
5953
+ } else if (e.keyCode === 13 && currentIndex === inputLength - 1 && index === data.length - 1 && record['skuCode']) {
5954
+ setData([].concat(_toConsumableArray(data), [{
5955
+ autoFocus: true
5956
+ }]));
5957
+ }
5958
+ }
5959
+ }));
5960
+ };
5961
+
5962
+ var BillEntry = function BillEntry(_ref3) {
5963
+ var onSaveCallback = _ref3.onSaveCallback;
5964
+ var columns = [{
5965
+ title: 'SKU编码',
5966
+ width: 150,
5967
+ dataIndex: 'skuCode',
5968
+ isInputItem: true,
5969
+ isPrimaryInput: true
5970
+ }, {
5971
+ title: 'SKU名称',
5972
+ width: 200,
5973
+ ellipsis: {
5974
+ showTitle: false
5975
+ },
5976
+ render: function render(text) {
5977
+ return /*#__PURE__*/React.createElement(Tooltip, {
5978
+ placement: "topLeft",
5979
+ title: text
5980
+ }, text);
5981
+ },
5982
+ dataIndex: 'name'
5983
+ }, {
5984
+ title: '单位',
5985
+ dataIndex: 'selectUnitCode',
5986
+ width: 100,
5987
+ isSelectItem: true,
5988
+ render: function render(text, record) {
5989
+ var baseUnitCode = '';
5990
+
5991
+ if (record === null || record === void 0 ? void 0 : record.packingUnitList) {
5992
+ var base = record.packingUnitList.filter(function (item) {
5993
+ return item.unitCode;
5994
+ });
5995
+
5996
+ if (base.length) {
5997
+ var _base$;
5998
+
5999
+ baseUnitCode = base[0].unitCode;
6000
+ record.selectUnitCode = base[0].unitCode;
6001
+ record.selectedScale = ((_base$ = base[0]) === null || _base$ === void 0 ? void 0 : _base$.baseUnitScale) || 1;
6002
+ }
6003
+ }
6004
+
6005
+ if (baseUnitCode) {
6006
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
6007
+ defaultValue: baseUnitCode,
6008
+ onChange: function onChange(value) {
6009
+ var _record$packingUnitLi, _record$packingUnitLi2;
6010
+
6011
+ record.selectUnitCode = value;
6012
+ record.selectedScale = (record === null || record === void 0 ? void 0 : (_record$packingUnitLi = record.packingUnitList) === null || _record$packingUnitLi === void 0 ? void 0 : (_record$packingUnitLi2 = _record$packingUnitLi.find(function (item) {
6013
+ return item.unitCode === value;
6014
+ })) === null || _record$packingUnitLi2 === void 0 ? void 0 : _record$packingUnitLi2.baseUnitScale) || 1;
6015
+ },
6016
+ style: {
6017
+ width: '60px'
6018
+ }
6019
+ }, record.packingUnitList && record.packingUnitList.map(function (item) {
6020
+ return /*#__PURE__*/React.createElement(Select.Option, {
6021
+ value: item.unitCode
6022
+ }, item.name);
6023
+ })));
6024
+ }
6025
+
6026
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
6027
+ }
6028
+ }, {
6029
+ title: '数量',
6030
+ width: 100,
6031
+ isInputItem: true,
6032
+ dataIndex: 'count'
6033
+ }, {
6034
+ title: '所属SPU编码',
6035
+ width: 100,
6036
+ ellipsis: {
6037
+ showTitle: false
6038
+ },
6039
+ dataIndex: 'itemCode',
6040
+ render: function render(text) {
6041
+ return /*#__PURE__*/React.createElement(Tooltip, {
6042
+ placement: "topLeft",
6043
+ title: text
6044
+ }, text);
6045
+ }
6046
+ }, {
6047
+ title: '规格',
6048
+ width: 200,
6049
+ ellipsis: {
6050
+ showTitle: false
6051
+ },
6052
+ render: function render(text) {
6053
+ return /*#__PURE__*/React.createElement(Tooltip, {
6054
+ placement: "topLeft",
6055
+ title: text
6056
+ }, text);
6057
+ },
6058
+ dataIndex: 'propertyNameAndValue'
6059
+ }];
6060
+
6061
+ var _useState9 = useState(false),
6062
+ _useState10 = _slicedToArray(_useState9, 2),
6063
+ isModalVisible = _useState10[0],
6064
+ setIsModalVisible = _useState10[1];
6065
+
6066
+ var _useState11 = useState([{
6067
+ hovered: false
6068
+ }]),
6069
+ _useState12 = _slicedToArray(_useState11, 2),
6070
+ data = _useState12[0],
6071
+ setData = _useState12[1];
6072
+
6073
+ var tableRef = useRef(null);
6074
+
6075
+ var callSelectItem = function callSelectItem(index, item) {
6076
+ var _tableRef$current2;
6077
+
6078
+ if (item) {
6079
+ var newData = [].concat(data);
6080
+ newData[index] = _objectSpread2(_objectSpread2({}, data[index]), item);
6081
+ setData(newData);
6082
+ }
6083
+
6084
+ var dom = tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : _tableRef$current2.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[index + 1];
6085
+
6086
+ if (dom) {
6087
+ setTimeout(function () {
6088
+ var _dom$getElementsByTag, _dom$getElementsByTag2;
6089
+
6090
+ (_dom$getElementsByTag = dom.getElementsByTagName('input')[item ? 1 : 0]) === null || _dom$getElementsByTag === void 0 ? void 0 : _dom$getElementsByTag.select();
6091
+ (_dom$getElementsByTag2 = dom.getElementsByTagName('input')[item ? 1 : 0]) === null || _dom$getElementsByTag2 === void 0 ? void 0 : _dom$getElementsByTag2.focus();
6092
+ }, 200);
6093
+ }
6094
+ };
6095
+
6096
+ var deleteRecord = function deleteRecord(record) {
6097
+ setData(data.filter(function (item) {
6098
+ return item.skuCode !== record.skuCode;
6099
+ }));
6100
+ };
6101
+
6102
+ var inputIndex = 0;
6103
+ var selectColumns = [].concat(_toConsumableArray(columns.map(function (item) {
6104
+ var inputLength = columns.filter(function (item) {
6105
+ return item.isInputItem || item.isSelectItem;
6106
+ }).length;
6107
+ var currentIndex = inputIndex;
6108
+
6109
+ if (item.isInputItem) {
6110
+ inputIndex++;
6111
+ return _objectSpread2(_objectSpread2({}, item), {}, {
6112
+ render: function render(text, record, index) {
6113
+ return /*#__PURE__*/React.createElement(InputElement, {
6114
+ setData: setData,
6115
+ callSelectItem: callSelectItem.bind(_this, index),
6116
+ item: item,
6117
+ isPrimaryInput: item.isPrimaryInput,
6118
+ record: record,
6119
+ text: text,
6120
+ data: data,
6121
+ index: index,
6122
+ inputLength: inputLength,
6123
+ currentIndex: currentIndex
6124
+ });
6125
+ }
6126
+ });
6127
+ } else if (item.isSelectItem) {
6128
+ inputIndex++;
6129
+ }
6130
+
6131
+ return item;
6132
+ })), [{
6133
+ title: '操作',
6134
+ width: 50,
6135
+ render: function render(text, record, index) {
6136
+ if (index !== 0) {
6137
+ return /*#__PURE__*/React.createElement("span", {
6138
+ style: {
6139
+ cursor: 'pointer',
6140
+ color: '#005CFF'
6141
+ },
6142
+ onClick: function onClick() {
6143
+ deleteRecord(record);
6144
+ }
6145
+ }, "\u5220\u9664");
6146
+ }
6147
+ }
6148
+ }]);
6149
+ return /*#__PURE__*/React.createElement("div", {
6150
+ className: 'add_select'
6151
+ }, /*#__PURE__*/React.createElement("div", {
6152
+ className: 'add_select_quick_header'
6153
+ }, /*#__PURE__*/React.createElement("div", {
6154
+ className: 'add_select_quick_header_title'
6155
+ }, /*#__PURE__*/React.createElement("div", null, "\u5FEB\u901F\u5F55\u5165"), /*#__PURE__*/React.createElement(Button, {
6156
+ type: "primary",
6157
+ onClick: function onClick() {
6158
+ onSaveCallback(data);
6159
+ }
6160
+ }, "\u63D0\u4EA4")), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", null, "*"), " \xA0\u5FEB\u6377\u952E\uFF1A\u3010Tab\u3011-\u8DF3\u683C\u5207\u6362\uFF1B\u3010Shift+\u2190\u3001\u2192\u3011-\u5F53\u524D\u884C\u5DE6\u3001\u53F3\u79FB\u52A8\uFF1B\u3010 \u2191\u3001\u2193\u3011-\u5F53\u524D\u5217\u4E0A\u3001\u4E0B\u79FB\u52A8\uFF1B\u3010ctrl+Delete\u3011-\u5220\u9664\u5F53\u524D\u884C\uFF1B")), /*#__PURE__*/React.createElement("div", {
6161
+ className: 'add_select_wrapper_select add_select_wrapper_select_quick'
6162
+ }, /*#__PURE__*/React.createElement(Table, _defineProperty({
6163
+ size: 'small',
6164
+ scroll: {
6165
+ y: 240
6166
+ },
6167
+ ref: tableRef,
6168
+ dataSource: data,
6169
+ columns: selectColumns,
6170
+ pagination: false,
6171
+ rowClassName: 'row-class'
6172
+ }, "rowClassName", function rowClassName(record, index) {
6173
+ return index % 2 === 0 ? 'table_base row-class' : 'table_odd row-class';
6174
+ }))));
6175
+ };
6176
+
5438
6177
  var shopFileType = [{
5439
6178
  text: "线上",
5440
6179
  value: 'online'
@@ -7708,7 +8447,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
7708
8447
  style = _props$style === void 0 ? {
7709
8448
  width: '100%'
7710
8449
  } : _props$style,
7711
- getTreeData = props.getTreeData;
8450
+ getTreeData = props.getTreeData,
8451
+ disabled = props.disabled;
7712
8452
  var url = remoteSource.url,
7713
8453
  _remoteSource$paramsK = remoteSource.paramsKey,
7714
8454
  paramsKey = _remoteSource$paramsK === void 0 ? 'qp-name-like' : _remoteSource$paramsK,
@@ -7880,7 +8620,7 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
7880
8620
  multiple: multiple,
7881
8621
  maxTagPlaceholder: maxTagPlaceholder,
7882
8622
  onChange: handleChange,
7883
- disabled: mode === 'view' || (ctx === null || ctx === void 0 ? void 0 : ctx.mode) === 'view',
8623
+ disabled: disabled || mode === 'view' || (ctx === null || ctx === void 0 ? void 0 : ctx.mode) === 'view',
7884
8624
  getPopupContainer: function getPopupContainer() {
7885
8625
  return _getPopupContainer && _getPopupContainer() || document.body;
7886
8626
  }
@@ -7992,7 +8732,6 @@ var index$1 = /*#__PURE__*/React.memo(BusinessTreeSearchSelect, function (props,
7992
8732
  * @LastEditTime: 2022-01-14 16:10:27
7993
8733
  * @LastEditors: rodchen
7994
8734
  */
7995
-
7996
8735
  var resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
7997
8736
  axios.defaults.headers.common['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
7998
8737
  axios.defaults.headers.common['x-tenant-id'] = (resposne === null || resposne === void 0 ? void 0 : resposne.tenantId) || '1';
@@ -8002,4 +8741,4 @@ if (localStorage.getItem('x-user-auth-context')) {
8002
8741
  axios.defaults.headers.common['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
8003
8742
  }
8004
8743
 
8005
- export { AddSelect, AddSkuSelect, BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, CommodityEntry, DataImport, DataValidation, QueryMutipleInput, SearchSelect, TreeSearchSelect };
8744
+ export { AddSelect, AddSkuSelect, BillEntry, BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, CommodityEntry, DataImport, DataValidation, QueryMutipleInput, SearchSelect, TreeSearchSelect };