From 0a72ad847aad17cf7dbffc239dec0d62c34a10d1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 08 九月 2022 18:22:10 +0800 Subject: [PATCH] 2022-09-08 --- public/options.json | 10 +- src/menu/components/table/edit-table/columns/index.scss | 28 +++++++++ src/menu/components/table/normal-table/columns/index.scss | 28 +++++++++ src/tabviews/zshare/mutilform/mkNumberInput/index.jsx | 13 ++++ src/menu/components/table/normal-table/columns/index.jsx | 7 +- src/views/design/sidemenu/thdmenuplus/index.jsx | 3 src/views/design/sidemenu/thdmenuplus/index.scss | 12 ++++ src/menu/components/table/edit-table/columns/index.jsx | 7 +- src/tabviews/zshare/actionList/printbutton/index.jsx | 27 +++++--- 9 files changed, 110 insertions(+), 25 deletions(-) diff --git a/public/options.json b/public/options.json index fbdb8bf..523da64 100644 --- a/public/options.json +++ b/public/options.json @@ -1,12 +1,12 @@ { - "appId": "202108312122504607B107A83F55B40C98CCF", - "appkey": "20210831212235413F287EC3BF489424496C8", + "appId": "201912040924165801464FF1788654BC5AC73", + "appkey": "20191106103859640976D6E924E464D029CF0", "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", "systemType": "", "externalDatabase": "false", "lineColor": "", "filter": "false", - "defaultApp": "mkindustry", + "defaultApp": "mk", "defaultLang": "zh-CN", "WXAppID": "", "WXminiAppID": "", @@ -15,6 +15,6 @@ "probation": "", "keepPassword": "true", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], - "host": "http://demo.mk9h.cn", - "service": "erp_new/" + "host": "http://qingqiumarket.cn", + "service": "MKWMS/" } \ No newline at end of file diff --git a/src/menu/components/table/edit-table/columns/index.jsx b/src/menu/components/table/edit-table/columns/index.jsx index 870e23a..50c3486 100644 --- a/src/menu/components/table/edit-table/columns/index.jsx +++ b/src/menu/components/table/edit-table/columns/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { DndProvider, DragSource, DropTarget } from 'react-dnd' -import { Table, Popover, Modal, message, Button } from 'antd' +import { Table, Popover, Modal, message, Button, Typography } from 'antd' import { PlusOutlined, FileSyncOutlined, EditOutlined, CopyOutlined, DeleteOutlined, FontColorsOutlined, CloseCircleOutlined, AntDesignOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' @@ -14,6 +14,7 @@ import './index.scss' const { confirm } = Modal +const { Paragraph } = Typography const EditColumn = asyncComponent(() => import('./editColumn')) const TableVerify = asyncComponent(() => import('./tableIn')) const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent')) @@ -157,9 +158,9 @@ } return ( <td style={{...style, minWidth: column.Width || 100}} className={className}> - {val} - {column.Hide === 'true' ? <CloseCircleOutlined style={{marginLeft: '5px', color: 'orange', fontSize: '12px'}}/> : null} + {column.field ? <Paragraph className="col-copy" copyable={{ text: column.field }}>{val}</Paragraph> : val} {column.marks && column.marks.length ? <AntDesignOutlined className="profile"/> : null} + {column.Hide === 'true' ? <CloseCircleOutlined className="close-col"/> : null} </td> ) } else { diff --git a/src/menu/components/table/edit-table/columns/index.scss b/src/menu/components/table/edit-table/columns/index.scss index de150a6..6ca33c7 100644 --- a/src/menu/components/table/edit-table/columns/index.scss +++ b/src/menu/components/table/edit-table/columns/index.scss @@ -24,6 +24,24 @@ tr { td { background: #ffffff; + .col-copy { + margin-bottom: 0; + display: inline-block; + .ant-typography-copy { + position: absolute; + left: 2px; + top: 0px; + margin-left: 0px; + font-size: 12px; + opacity: 0; + transition: opacity 0.2s; + } + } + } + td:hover .col-copy { + .ant-typography-copy { + opacity: 1; + } } td:not(.ant-table-selection-column) { position: relative; @@ -35,6 +53,16 @@ color: purple; font-size: 12px; } + >.close-col { + position: absolute; + top: 2px; + right: 2px; + color: orange; + font-size: 12px; + } + >.profile + .close-col { + right: 20px; + } } } .action-column { diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx index e4c9a64..4240b49 100644 --- a/src/menu/components/table/normal-table/columns/index.jsx +++ b/src/menu/components/table/normal-table/columns/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { DndProvider, DragSource, DropTarget } from 'react-dnd' -import { Table, Popover, Modal, message } from 'antd' +import { Table, Popover, Modal, message, Typography } from 'antd' import { PlusOutlined, FileSyncOutlined, EditOutlined, CopyOutlined, DeleteOutlined, FontColorsOutlined, CloseCircleOutlined, AntDesignOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' @@ -14,6 +14,7 @@ import './index.scss' const { confirm } = Modal +const { Paragraph } = Typography const EditColumn = asyncIconComponent(() => import('./editColumn')) const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent')) const CardCellComponent = asyncComponent(() => import('@/menu/components/card/cardcellcomponent')) @@ -173,9 +174,9 @@ } return ( <td style={{...style, minWidth: column.Width || 100}} className={className}> - {val} - {column.Hide === 'true' ? <CloseCircleOutlined style={{marginLeft: '5px', color: 'orange', fontSize: '12px'}}/> : null} + {column.field ? <Paragraph className="col-copy" copyable={{ text: column.field }}>{val}</Paragraph> : val} {column.marks && column.marks.length ? <AntDesignOutlined className="profile"/> : null} + {column.Hide === 'true' ? <CloseCircleOutlined className="close-col"/> : null} </td> ) } else { diff --git a/src/menu/components/table/normal-table/columns/index.scss b/src/menu/components/table/normal-table/columns/index.scss index 3d4835c..db07412 100644 --- a/src/menu/components/table/normal-table/columns/index.scss +++ b/src/menu/components/table/normal-table/columns/index.scss @@ -15,6 +15,24 @@ tr { td { background: #ffffff; + .col-copy { + margin-bottom: 0; + display: inline-block; + .ant-typography-copy { + position: absolute; + left: 2px; + top: 0px; + margin-left: 0px; + font-size: 12px; + opacity: 0; + transition: opacity 0.2s; + } + } + } + td:hover .col-copy { + .ant-typography-copy { + opacity: 1; + } } td:not(.ant-table-selection-column) { position: relative; @@ -26,6 +44,16 @@ color: purple; font-size: 12px; } + >.close-col { + position: absolute; + top: 2px; + right: 2px; + color: orange; + font-size: 12px; + } + >.profile + .close-col { + right: 20px; + } } } .action-column { diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index d2bfa95..ba05bff 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -38,6 +38,7 @@ formdata: null, selines: null, btnconfig: null, + confirmLoading: false, loading: false, disabled: false, hidden: false, @@ -1347,7 +1348,7 @@ */ execSuccess = (res) => { const { btn } = this.props - const { autoMatic } = this.state + const { autoMatic, btnconfig } = this.state if ((res.ErrCode === 'S' || !res.ErrCode) || autoMatic) { // 鎵ц鎴愬姛 notification.success({ @@ -1363,8 +1364,15 @@ } + if (autoMatic || !btnconfig || btnconfig.setting.finish !== 'unclose') { + this.setState({ + visible: false + }) + } + this.setState({ - loading: false + loading: false, + confirmLoading: false }) if (autoMatic) { @@ -1409,7 +1417,8 @@ } this.setState({ - loading: false + loading: false, + confirmLoading: false }) if (autoMatic) { @@ -1529,16 +1538,10 @@ * @description 妯℃�佹锛堣〃鍗曪級锛岀‘璁� */ handleOk = () => { - const { btnconfig, autoMatic } = this.state - if (!this.formRef) return this.formRef.handleConfirm().then(res => { - if (btnconfig.setting.finish !== 'unclose' || autoMatic) { - this.setState({ - visible: false - }) - } + this.setState({ confirmLoading: true }) this.triggerPrint(this.state.selines, res) }) } @@ -1549,7 +1552,8 @@ handleCancel = () => { this.setState({ loading: false, - visible: false + visible: false, + confirmLoading: false }) } @@ -1679,6 +1683,7 @@ getContainer={container} wrapClassName='action-modal' visible={this.state.visible} + confirmLoading={this.state.confirmLoading} width={width} onOk={this.handleOk} onCancel={this.handleCancel} diff --git a/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx b/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx index 68e1a62..47a1840 100644 --- a/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx +++ b/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx @@ -49,7 +49,18 @@ handleChange = (val) => { this.setState({value: val}) - this.props.onChange(val) + + let _val = val + + if (typeof(_val) !== 'number') { + _val = parseFloat(_val) + + if (isNaN(_val)) { + _val = '' + } + } + + this.props.onChange(_val) } handleSubmit = () => { diff --git a/src/views/design/sidemenu/thdmenuplus/index.jsx b/src/views/design/sidemenu/thdmenuplus/index.jsx index 8d3ab63..b468df7 100644 --- a/src/views/design/sidemenu/thdmenuplus/index.jsx +++ b/src/views/design/sidemenu/thdmenuplus/index.jsx @@ -320,8 +320,7 @@ return ( <Col key={template.type + index} className={template.disabled ? 'disabled' : ''} title={template.disTitle || ''} span={6}> - <Card - title={template.title}> + <Card title={<div className="title-wrap"><div>{template.title}</div><div>{template.MenuNo}</div></div>}> <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/> <div className="card-operation"> <Button type="primary" onClick={() => {this.useTemplate(template, 'user')}}>浣跨敤妯℃澘</Button> diff --git a/src/views/design/sidemenu/thdmenuplus/index.scss b/src/views/design/sidemenu/thdmenuplus/index.scss index 86c37fa..dfd88e6 100644 --- a/src/views/design/sidemenu/thdmenuplus/index.scss +++ b/src/views/design/sidemenu/thdmenuplus/index.scss @@ -70,6 +70,9 @@ .ant-col { padding: 10px; } + .ant-card-head { + padding: 0 10px; + } .ant-col.disabled { cursor: not-allowed; .ant-card-head-title { @@ -84,6 +87,15 @@ } .ant-card-head-title { text-align: center; + .title-wrap { + position: relative; + top: -8px; + height: 30px; + div { + overflow: hidden; + text-overflow: ellipsis; + } + } } .ant-card-body { padding: 2px; -- Gitblit v1.8.0