|
@@ -3,7 +3,7 @@ import Box from "@mui/material/Box";
|
|
|
import 'handsontable/dist/handsontable.full.min.css';
|
|
import 'handsontable/dist/handsontable.full.min.css';
|
|
|
//import 'handsontable/styles/ht-theme-main.min.css';
|
|
//import 'handsontable/styles/ht-theme-main.min.css';
|
|
|
import { HandsonTable } from 'handsontable/base';
|
|
import { HandsonTable } from 'handsontable/base';
|
|
|
-import { Table, ConfigProvider } from "antd";
|
|
|
|
|
|
|
+import { Table, ConfigProvider, Button as AButton } from "antd";
|
|
|
import {HotTable} from "@handsontable/react-wrapper";
|
|
import {HotTable} from "@handsontable/react-wrapper";
|
|
|
import { registerAllModules } from 'handsontable/registry';
|
|
import { registerAllModules } from 'handsontable/registry';
|
|
|
import {RichTreeView } from "@mui/x-tree-view/RichTreeView";
|
|
import {RichTreeView } from "@mui/x-tree-view/RichTreeView";
|
|
@@ -20,7 +20,7 @@ import { textRenderer, registerRenderer } from 'handsontable/renderers';
|
|
|
import Button from '@mui/material/Button';
|
|
import Button from '@mui/material/Button';
|
|
|
import ButtonGroup from '@mui/material/ButtonGroup';
|
|
import ButtonGroup from '@mui/material/ButtonGroup';
|
|
|
import {extractFuzhu} from './utils';
|
|
import {extractFuzhu} from './utils';
|
|
|
-import {shanchu, undo, redo, quanbushanchu, danxiangdinge, updateDercj, changguidinge, handleBeizhu, huan} from './editor';
|
|
|
|
|
|
|
+import {shanchu, undo, redo, quanbushanchu, danxiangdinge, updateDercj, changguidinge, handleBeizhu, huan, updateShuliang} from './editor';
|
|
|
import { ConfigValueTooSmallError, HyperFormula } from 'hyperformula';
|
|
import { ConfigValueTooSmallError, HyperFormula } from 'hyperformula';
|
|
|
import Backdrop from '@mui/material/Backdrop';
|
|
import Backdrop from '@mui/material/Backdrop';
|
|
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
@@ -29,6 +29,14 @@ import { useHotEditor } from "@handsontable/react-wrapper";
|
|
|
import Dialog from '@mui/material/Dialog';
|
|
import Dialog from '@mui/material/Dialog';
|
|
|
import DialogTitle from '@mui/material/DialogTitle';
|
|
import DialogTitle from '@mui/material/DialogTitle';
|
|
|
import DialogContent from '@mui/material/DialogContent';
|
|
import DialogContent from '@mui/material/DialogContent';
|
|
|
|
|
+import IconButton from '@mui/material/IconButton';
|
|
|
|
|
+import Typography from '@mui/material/Typography';
|
|
|
|
|
+import Editable from './Editable';
|
|
|
|
|
+import {
|
|
|
|
|
+
|
|
|
|
|
+ SettingFilled,
|
|
|
|
|
+
|
|
|
|
|
+ } from '@ant-design/icons';
|
|
|
registerAllModules();
|
|
registerAllModules();
|
|
|
|
|
|
|
|
|
|
|
|
@@ -43,9 +51,9 @@ registerAllModules();
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
-function copy(input) {
|
|
|
|
|
- return JSON.parse(JSON.stringify(input));
|
|
|
|
|
-}
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -619,7 +627,32 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
|
|
|
{ dataIndex: '项目特征' , title : '项目特征' , key : '项目特征' , width : 300 },
|
|
{ dataIndex: '项目特征' , title : '项目特征' , key : '项目特征' , width : 300 },
|
|
|
{ dataIndex: '计算规则' , title : '计算规则' , key : '计算规则' , width : 300 },
|
|
{ dataIndex: '计算规则' , title : '计算规则' , key : '计算规则' , width : 300 },
|
|
|
{ dataIndex: '单位' , title : '单位' , key : '单位' , width : 100 },
|
|
{ dataIndex: '单位' , title : '单位' , key : '单位' , width : 100 },
|
|
|
- { dataIndex: '数量' , title : '数量' , key : '数量' , width : 100 },
|
|
|
|
|
|
|
+ { dataIndex: '数量' , title : '数量' , key : '数量' , width : 100 ,
|
|
|
|
|
+
|
|
|
|
|
+ render: (text, record) => {
|
|
|
|
|
+ console.log("column render");
|
|
|
|
|
+ console.log("text".concat(text));
|
|
|
|
|
+ //console.log(record);
|
|
|
|
|
+ if(record['序号']) {
|
|
|
|
|
+ return ( <plaintext>{text}</plaintext> );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <Editable initialText={text} onChange={(value)=>{
|
|
|
|
|
+ let [success, data] = updateShuliang(value, selectedRowKeys[0]);
|
|
|
|
|
+ if (success) {
|
|
|
|
|
+ setDetail(data);
|
|
|
|
|
+ detailRef.current = data;
|
|
|
|
|
+ handleSelection(selectedRowKeys);
|
|
|
|
|
+ }
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
|
|
+ </Editable>
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ //console.log(text);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
{ dataIndex: '综合单价' , title : '综合单价' , key : '综合单价' , width : 100 },
|
|
{ dataIndex: '综合单价' , title : '综合单价' , key : '综合单价' , width : 100 },
|
|
|
{ dataIndex: '合价' , title : '合价' , key : '合价' , width : 100 },
|
|
{ dataIndex: '合价' , title : '合价' , key : '合价' , width : 100 },
|
|
|
{ dataIndex: '人工费' , title : '人工费' , key : '人工费' , width : 100 },
|
|
{ dataIndex: '人工费' , title : '人工费' , key : '人工费' , width : 100 },
|
|
@@ -633,6 +666,7 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
|
|
|
{ dataIndex: '暂估价' , title : '暂估价' , key : '暂估价' , width : 100 },
|
|
{ dataIndex: '暂估价' , title : '暂估价' , key : '暂估价' , width : 100 },
|
|
|
{ dataIndex: '综合人工工日', title : '综合人工工日', key : '综合人工工日', width : 100 },
|
|
{ dataIndex: '综合人工工日', title : '综合人工工日', key : '综合人工工日', width : 100 },
|
|
|
{ dataIndex: '备注' , title : '备注' , key : '备注' , width : 100 },
|
|
{ dataIndex: '备注' , title : '备注' , key : '备注' , width : 100 },
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|