Commit 55902baf authored by 左玲玲's avatar 左玲玲 😬

1807

parent b704f1d6
...@@ -308,19 +308,19 @@ export default [ ...@@ -308,19 +308,19 @@ export default [
icon: 'laptop', icon: 'laptop',
routes: [ routes: [
{ {
name: '租赁客户', name: '租户管理',
path: '/lease/custom', path: '/lease/custom',
icon: '', icon: '',
component: './lease/custom', component: './lease/custom',
}, },
{ {
name: '租赁台账', name: '设备台账',
path: '/lease/ledger', path: '/lease/ledger',
icon: '', icon: '',
component: './lease/ledger', component: './lease/ledger',
}, },
{ {
name: '设备供应商', name: '供应商管理',
path: '/lease/supplier', path: '/lease/supplier',
icon: '', icon: '',
component: './lease/supplier', component: './lease/supplier',
...@@ -338,13 +338,13 @@ export default [ ...@@ -338,13 +338,13 @@ export default [
component: './lease/contract', component: './lease/contract',
}, },
{ {
name: '费用分析', name: '租赁营收',
path: '/lease/costanalysis', path: '/lease/costanalysis',
icon: '', icon: '',
component: './lease/costanalysis', component: './lease/costanalysis',
}, },
{ {
name: '租赁设备', name: '设备OEE',
path: '/lease/leasedevice', path: '/lease/leasedevice',
icon: '', icon: '',
component: './lease/leasedevice', component: './lease/leasedevice',
......
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
dev: { dev: {
[defaultSetting.proxypath]: { [defaultSetting.proxypath]: {
// 要代理的地址 // 要代理的地址
target: 'http://192.168.40.111:8000', //jf哥 target: 'http://192.168.40.203:8000', //jf哥
// target: 'http://192.168.40.248:8080', //jf哥 // target: 'http://192.168.40.248:8080', //jf哥
// target: 'http://192.168.40.64:28000', //gc哥 // target: 'http://192.168.40.64:28000', //gc哥
// target: 'http://192.168.40.203:8000', //dj哥 // target: 'http://192.168.40.203:8000', //dj哥
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
}, },
'/token': { '/token': {
// 要代理的地址 // 要代理的地址
target: 'http://192.168.40.111:8000', target: 'http://192.168.40.203:8000',
changeOrigin: true, changeOrigin: true,
}, },
'/staticfile/': { '/staticfile/': {
......
...@@ -410,6 +410,10 @@ ol { ...@@ -410,6 +410,10 @@ ol {
width: 100%; width: 100%;
} }
.ant-popover {
z-index: 9999;
}
.ant-drawer-wrapper-body { .ant-drawer-wrapper-body {
.diycard { .diycard {
height: unset; height: unset;
...@@ -425,7 +429,8 @@ ol { ...@@ -425,7 +429,8 @@ ol {
.runtime-keep-alive-layout, .runtime-keep-alive-layout,
.ant-table-content, .ant-table-content,
.ant-drawer-body, .ant-drawer-body,
.boxcontianbox { .boxcontianbox,
.ant-table-body {
&::-webkit-scrollbar { &::-webkit-scrollbar {
/*滚动条整体样式*/ /*滚动条整体样式*/
......
...@@ -149,7 +149,7 @@ const fields = [ ...@@ -149,7 +149,7 @@ const fields = [
} }
}, },
{ {
title: '发用单文件', title: '发运单上传',
dataIndex: 'hairuseFileList', dataIndex: 'hairuseFileList',
key: 'hairuseFileList', key: 'hairuseFileList',
render: (_, row) => { render: (_, row) => {
...@@ -157,7 +157,7 @@ const fields = [ ...@@ -157,7 +157,7 @@ const fields = [
} }
}, },
{ {
title: '租赁物交付确认单文件', title: '租赁物交付确认单上传',
dataIndex: 'leaseDeliverFileList', dataIndex: 'leaseDeliverFileList',
key: 'leaseDeliverFileList', key: 'leaseDeliverFileList',
render: (_, row) => { render: (_, row) => {
...@@ -225,7 +225,7 @@ const Details = ({ drawer }) => { ...@@ -225,7 +225,7 @@ const Details = ({ drawer }) => {
key: 'equipmentName', key: 'equipmentName',
}, },
{ {
title: '智能单元', title: '莫格云眼',
dataIndex: 'intelligentUnitNo', dataIndex: 'intelligentUnitNo',
key: 'intelligentUnitNo', key: 'intelligentUnitNo',
}, },
...@@ -270,7 +270,7 @@ const Details = ({ drawer }) => { ...@@ -270,7 +270,7 @@ const Details = ({ drawer }) => {
return [ return [
{ {
key: '1', key: '1',
label: '基信息', label: '基信息',
children: <DetailPro children: <DetailPro
fields={fields} fields={fields}
detailpath="/lease/umContract/queryDetail" detailpath="/lease/umContract/queryDetail"
...@@ -279,7 +279,7 @@ const Details = ({ drawer }) => { ...@@ -279,7 +279,7 @@ const Details = ({ drawer }) => {
}, },
{ {
key: '2', key: '2',
label: '租赁设备', label: '合同详情',
children: <AutoTable children: <AutoTable
columns={columns} columns={columns}
path={'/lease/umContractEquipment/queryByContractId'} path={'/lease/umContractEquipment/queryByContractId'}
......
...@@ -19,7 +19,7 @@ function getcolumns(setdrawer, valtype, itemId) { ...@@ -19,7 +19,7 @@ function getcolumns(setdrawer, valtype, itemId) {
open: true, open: true,
item: row, item: row,
val: 'only', val: 'only',
title: '合同详情', title: <span style={{ fontWeight: 'bold' }}>{`租赁合同 ${row.contractNo}`}</span>,
type: 'detail' type: 'detail'
})); }));
}} }}
......
...@@ -235,7 +235,7 @@ function Contract(props) { ...@@ -235,7 +235,7 @@ function Contract(props) {
editable: false editable: false
}, },
{ {
title: '关联智能单元', title: '莫格云眼',
dataIndex: 'ledgerEquipmentId', dataIndex: 'ledgerEquipmentId',
key: 'ledgerEquipmentId', key: 'ledgerEquipmentId',
valueType: 'select', valueType: 'select',
...@@ -279,7 +279,7 @@ function Contract(props) { ...@@ -279,7 +279,7 @@ function Contract(props) {
colProps: { span: 24 }, colProps: { span: 24 },
}, },
{ {
title: '发用单文件', title: '发运单上传',
dataIndex: 'hairuseFileList', dataIndex: 'hairuseFileList',
key: 'hairuseFileList', key: 'hairuseFileList',
valueType: 'uploadBtn', valueType: 'uploadBtn',
...@@ -289,7 +289,7 @@ function Contract(props) { ...@@ -289,7 +289,7 @@ function Contract(props) {
colProps: { span: 24 }, colProps: { span: 24 },
}, },
{ {
title: '租赁物交付确认单文件', title: '租赁物交付确认单上传',
dataIndex: 'leaseDeliverFileList', dataIndex: 'leaseDeliverFileList',
key: 'leaseDeliverFileList', key: 'leaseDeliverFileList',
valueType: 'uploadBtn', valueType: 'uploadBtn',
......
...@@ -222,7 +222,7 @@ const Costanalysis = () => { ...@@ -222,7 +222,7 @@ const Costanalysis = () => {
return ( return (
<div ref={boxRef}> <div ref={boxRef}>
<AutoTable <AutoTable
pagetitle={<h3 className="page-title">费用分析</h3>} pagetitle={<h3 className="page-title">租赁营收</h3>}
columns={columns} columns={columns}
extraparams={extraparams} extraparams={extraparams}
path={ path={
......
...@@ -7,7 +7,6 @@ function getcolumns(setdrawer) { ...@@ -7,7 +7,6 @@ function getcolumns(setdrawer) {
title: '客户编号', title: '客户编号',
dataIndex: 'customerNo', dataIndex: 'customerNo',
key: 'customerNo', key: 'customerNo',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 }, colProps: { span: 8 },
}, },
{ {
...@@ -106,7 +105,6 @@ function getcolumns(setdrawer) { ...@@ -106,7 +105,6 @@ function getcolumns(setdrawer) {
fieldProps: { fieldProps: {
mode: 'multiple' mode: 'multiple'
}, },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
options: { path: '/lease/umLeaseCustomer/getAllShopSelection', params: {} }, options: { path: '/lease/umLeaseCustomer/getAllShopSelection', params: {} },
hideInSearch: true, hideInSearch: true,
}, },
......
...@@ -91,7 +91,7 @@ const Custom = () => { ...@@ -91,7 +91,7 @@ const Custom = () => {
}, []); }, []);
return <div> return <div>
<AutoTable <AutoTable
pagetitle={<h3 className="page-title">户管理</h3>} pagetitle={<h3 className="page-title">户管理</h3>}
columns={columns} columns={columns}
path={pathconfig?.list} path={pathconfig?.list}
actionRef={actionRef} actionRef={actionRef}
......
...@@ -24,7 +24,6 @@ import { ...@@ -24,7 +24,6 @@ import {
Tabs, Tabs,
Tooltip, Tooltip,
} from 'antd'; } from 'antd';
import TreeRender from '@/components/TreeRender';
import { ProDescriptions } from '@ant-design/pro-components'; import { ProDescriptions } from '@ant-design/pro-components';
import InitForm from '@/components/InitForm'; import InitForm from '@/components/InitForm';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
...@@ -2039,6 +2038,7 @@ function Account({ boxRef, extraparams }) { ...@@ -2039,6 +2038,7 @@ function Account({ boxRef, extraparams }) {
actionRef={actionRef} actionRef={actionRef}
resizeable={false} resizeable={false}
x={1500} x={1500}
y={`calc(100vh - 410px)`}
extraparams={extraparams} extraparams={extraparams}
bordered={false} bordered={false}
/> />
......
...@@ -19,16 +19,9 @@ function getcolumns(setdrawer, activeKey) { ...@@ -19,16 +19,9 @@ function getcolumns(setdrawer, activeKey) {
key: 'equipmentNo', key: 'equipmentNo',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 }, colProps: { span: 8 },
},
{
title: '设备名称',
dataIndex: 'equipmentName',
key: 'equipmentName',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 },
render: (_, row) => { render: (_, row) => {
return ( return (
<Tooltip title={row.equipmentName}> <Tooltip title={row.equipmentNo}>
<a <a
className="table-cell" className="table-cell"
onClick={() => { onClick={() => {
...@@ -41,12 +34,19 @@ function getcolumns(setdrawer, activeKey) { ...@@ -41,12 +34,19 @@ function getcolumns(setdrawer, activeKey) {
})); }));
}} }}
> >
{row.equipmentName} {row.equipmentNo}
</a> </a>
</Tooltip> </Tooltip>
); );
} }
}, },
{
title: '设备名称',
dataIndex: 'equipmentName',
key: 'equipmentName',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 }
},
{ {
title: '资产编号', title: '资产编号',
dataIndex: 'assetNumber', dataIndex: 'assetNumber',
...@@ -56,7 +56,7 @@ function getcolumns(setdrawer, activeKey) { ...@@ -56,7 +56,7 @@ function getcolumns(setdrawer, activeKey) {
hideInSearch: true hideInSearch: true
}, },
{ {
title: '关联设备', title: '莫格云眼',
dataIndex: 'ledgerEquipment', dataIndex: 'ledgerEquipment',
key: 'ledgerEquipment', key: 'ledgerEquipment',
hideInForm: true, hideInForm: true,
......
...@@ -7,11 +7,12 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -7,11 +7,12 @@ import { doFetch } from '@/utils/doFetch';
import { useRequest } from "ahooks"; import { useRequest } from "ahooks";
import styles from "./index.less"; import styles from "./index.less";
import TreeRender from '@/components/TreeRender'; import TreeRender from '@/components/TreeRender';
import { Divider, Tabs, ProDescriptions } from "antd"; import { Divider, Tabs, ProDescriptions, Tooltip } from "antd";
import Account from "./Account"; import Account from "./Account";
import Basemsg from "./Basemsg"; import Basemsg from "./Basemsg";
import { useModel } from "@umijs/max"; import { useModel } from "@umijs/max";
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons';
const Devicedata = () => { const Devicedata = () => {
let actionRef = useRef(), formRef = useRef(), boxRef = useRef(); let actionRef = useRef(), formRef = useRef(), boxRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
...@@ -20,8 +21,8 @@ const Devicedata = () => { ...@@ -20,8 +21,8 @@ const Devicedata = () => {
[extraparams, setextraparams] = useState({}), [extraparams, setextraparams] = useState({}),
[activeKey, catk] = useState('item-1'), [activeKey, catk] = useState('item-1'),
[item2extraparams, citp] = useState({}), [item2extraparams, citp] = useState({}),
[searchParams, csp] = useState({}); [searchParams, csp] = useState({}),
// [leaseList, clea] = useState([]); [flag, setFlag] = useState(false);
const { allWebsocket: { commonWebsocket, commonWebmsg } } = useModel('useGlobal'); const { allWebsocket: { commonWebsocket, commonWebmsg } } = useModel('useGlobal');
const { run, loading, runAsync } = useRequest(doFetch, { const { run, loading, runAsync } = useRequest(doFetch, {
manual: true, manual: true,
...@@ -35,42 +36,6 @@ const Devicedata = () => { ...@@ -35,42 +36,6 @@ const Devicedata = () => {
} }
}, },
}); });
// tableData = useRequest(() => doFetch({ url: '/lease/umLeaseLedger/queryLeaseList', params: { ...searchParams, ...extraparams } }), {
// refreshDeps: [extraparams, searchParams],
// onSuccess: (res, params) => {
// if (res.code == '0000') {
// clea(res?.data?.dataList ?? [])
// }
// }
// });
// useEffect(() => {
// const msg = commonWebmsg?.msg;
// if (commonWebmsg?.wsMsgModel == 'LEASE') {
// let newList = JSON.parse(JSON.stringify(leaseList));
// newList = newList?.map(it => {
// if (it.id == msg.id) {
// it.collectStatusName = msg.collectStatusName;
// it.collectStatus = msg.collectStatus;
// }
// return it
// });
// clea(newList);
// }
// }, [commonWebmsg]);
// useEffect(() => {
// try {
// commonWebsocket && commonWebsocket.emit("sendMessage", {
// "wsMsgModel": "LEASE",
// "subId": dayjs().valueOf(),
// param: '',
// unsubscribe: false,
// });
// } catch (error) {
// }
// }, []);
const columns = useMemo(() => { const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer, activeKey)?.columns ?? []; let defcolumn = getcolumns(setdrawer, activeKey)?.columns ?? [];
return defcolumn; return defcolumn;
...@@ -89,18 +54,9 @@ const Devicedata = () => { ...@@ -89,18 +54,9 @@ const Devicedata = () => {
resizeable={false} resizeable={false}
bordered={false} bordered={false}
x={1500} x={1500}
y={`calc(100vh - 410px)`}
formRef={formRef} formRef={formRef}
// dataSourceFieldsChange={(val) => {
// csp({ ...val })
// }}
extraparams={extraparams} extraparams={extraparams}
// pagination={false}
// toolBarRender={true}
// options={{
// reload: () => {
// tableData.run()
// }
// }}
/> />
}, },
{ {
...@@ -159,8 +115,20 @@ const Devicedata = () => { ...@@ -159,8 +115,20 @@ const Devicedata = () => {
</div> </div>
</div> </div>
<div className={styles.ledgercontent}> <div className={styles.ledgercontent}>
<div className={`${styles.ledgerleft} boxcontianbox`}> <div style={{ '--flagw': flag ? '300px' : '48px' }} className={`${styles.ledgerleft} boxcontianbox`}>
<TreeRender url="/auth/sysFactory/getFactoryTree" onselected={onselecteTree} noaction={true} maxWidth={215} /> <div style={{ cursor: 'pointer', marginTop: 16 }} onClick={() => {
setFlag(!flag);
}}>
{
flag ? <Tooltip title='收起'>
<MenuFoldOutlined style={{ fontSize: 22 }} />
</Tooltip> :
<Tooltip title='展开'>
<MenuUnfoldOutlined style={{ fontSize: 22 }} />
</Tooltip>
}
</div>
<TreeRender url="/auth/sysFactory/getFactoryTree" onselected={onselecteTree} noaction={true} maxWidth={215} style={{ display: flag ? 'block' : 'none' }} />
</div> </div>
<div className={`${styles.ledgerright} ledgerf boxcontianbox`}> <div className={`${styles.ledgerright} ledgerf boxcontianbox`}>
<Tabs destroyInactiveTabPane activeKey={activeKey} onChange={(key) => { <Tabs destroyInactiveTabPane activeKey={activeKey} onChange={(key) => {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
justify-content: space-between; justify-content: space-between;
.ledgerleft { .ledgerleft {
width: 300px; width: var(--flagw);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
......
...@@ -3,6 +3,8 @@ import AutoTable from '@/components/AutoTable/mtable'; ...@@ -3,6 +3,8 @@ import AutoTable from '@/components/AutoTable/mtable';
import { useRequest } from 'ahooks'; import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
import styles from "./index.less"; import styles from "./index.less";
import { Tooltip } from "antd";
import { MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons';
const columnsa = [ const columnsa = [
{ {
title: '客户名称', title: '客户名称',
...@@ -115,10 +117,10 @@ const columnsa = [ ...@@ -115,10 +117,10 @@ const columnsa = [
}, },
]; ];
const Leasedevice = () => { const LeftTable = ({ onChange }) => {
const [clickrow, cr] = useState({}), const [searchParams, csp] = useState({}),
[searchParams, csp] = useState({}), [clickrow, cr] = useState({}),
formRef = useRef(); [flag, setFlag] = useState(false);
const ledgerCustomer = useRequest(async () => { const ledgerCustomer = useRequest(async () => {
let res = await doFetch({ url: "/lease/umLeaseLedger/ledgerCustomerEquipmentUseRate", params: { ...searchParams } }); let res = await doFetch({ url: "/lease/umLeaseLedger/ledgerCustomerEquipmentUseRate", params: { ...searchParams } });
cr(res?.data?.dataList?.[0]); cr(res?.data?.dataList?.[0]);
...@@ -126,52 +128,74 @@ const Leasedevice = () => { ...@@ -126,52 +128,74 @@ const Leasedevice = () => {
}, { }, {
refreshDeps: [searchParams] refreshDeps: [searchParams]
}); });
useEffect(() => {
onChange(clickrow?.ledgerCustomerId)
}, [clickrow?.ledgerCustomerId])
return <div style={{ flex: flag ? 1 : 0 }}>
<div style={{ cursor: 'pointer' }} onClick={() => {
setFlag(!flag);
}}>
{
flag ? <Tooltip title='收起'>
<MenuFoldOutlined style={{ fontSize: 22 }} />
</Tooltip> :
<Tooltip title='展开'>
<MenuUnfoldOutlined style={{ fontSize: 22 }} />
</Tooltip>
}
</div>
<AutoTable
columns={columnsa}
dataSource={ledgerCustomer?.data ?? []}
resizeable={false}
pageextra="none"
onRow={(record) => {
return {
onClick: (event) => {
cr(record);
}
};
}}
pagination={'false'}
dataSourceFieldsChange={(val) => {
csp({ ...val })
}}
toolBarRender={true}
options={{
reload: () => {
ledgerCustomer.run()
}
}}
rowKey='ledgerCustomerId'
rowClassName={(record, index) => {
return record.ledgerCustomerId == clickrow?.ledgerCustomerId ? styles.rowClass : ''
}}
style={{ display: flag ? 'block' : 'none' }}
/>
</div>
}
const Leasedevice = () => {
const [extraparamsId, setExtraparamsId] = useState('');
return <div style={{ background: '#fff' }}> return <div style={{ background: '#fff' }}>
<div className="ant-card-head" style={{ backgroundColor: 'white' }}> <div className="ant-card-head" style={{ backgroundColor: 'white' }}>
<div className="ant-card-head-wrapper"> <div className="ant-card-head-wrapper">
<div className="ant-card-head-title"> <div className="ant-card-head-title">
<h3 className="page-title">租赁设备</h3> <h3 className="page-title">设备OEE</h3>
</div> </div>
</div> </div>
</div> </div>
<div style={{ display: "flex", gap: 20, padding: 15 }}> <div style={{ display: "flex", gap: 20, padding: 15 }}>
<div style={{ flex: 1 }}> <LeftTable onChange={(val) => {
<AutoTable setExtraparamsId(val);
columns={columnsa} }} />
dataSource={ledgerCustomer?.data ?? []} <div style={{ flex: 2, marginTop: 26, borderLeft: '1px solid #f0f0f0', paddingLeft: 15 }}>
resizeable={false}
pageextra="none"
onRow={(record) => {
return {
onClick: (event) => {
cr(record);
}
};
}}
pagination={'false'}
formRef={formRef}
dataSourceFieldsChange={(val) => {
csp({ ...val })
}}
toolBarRender={true}
options={{
reload: () => {
ledgerCustomer.run()
}
}}
rowKey='ledgerCustomerId'
rowClassName={(record, index) => {
return record.ledgerCustomerId == clickrow?.ledgerCustomerId ? styles.rowClass : ''
}}
/>
</div>
<div style={{ flex: 2 }}>
<AutoTable <AutoTable
columns={columnsb} columns={columnsb}
path={clickrow?.ledgerCustomerId ? '/lease/umLeaseLedger/ledgerCustomerEquipmentUseDetail' : ''} path={extraparamsId ? '/lease/umLeaseLedger/ledgerCustomerEquipmentUseDetail' : ''}
resizeable={false} resizeable={false}
pageextra="none" pageextra="none"
extraparams={{ ledgerCustomerId: clickrow?.ledgerCustomerId }} extraparams={{ ledgerCustomerId: extraparamsId }}
/> />
</div> </div>
</div> </div>
......
...@@ -12,16 +12,9 @@ function getcolumns(setdrawer) { ...@@ -12,16 +12,9 @@ function getcolumns(setdrawer) {
key: 'equipmentNo', key: 'equipmentNo',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 }, colProps: { span: 8 },
},
{
title: '设备名称',
dataIndex: 'equipmentName',
key: 'equipmentName',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 },
render: (_, row) => { render: (_, row) => {
return ( return (
<Tooltip title={row.equipmentName}> <Tooltip title={row.equipmentNo}>
<a <a
className="table-cell" className="table-cell"
onClick={() => { onClick={() => {
...@@ -35,12 +28,19 @@ function getcolumns(setdrawer) { ...@@ -35,12 +28,19 @@ function getcolumns(setdrawer) {
})); }));
}} }}
> >
{row.equipmentName} {row.equipmentNo}
</a> </a>
</Tooltip> </Tooltip>
); );
} }
}, },
{
title: '设备名称',
dataIndex: 'equipmentName',
key: 'equipmentName',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 }
},
{ {
title: '资产编号', title: '资产编号',
dataIndex: 'assetNumber', dataIndex: 'assetNumber',
...@@ -102,7 +102,7 @@ function getcolumns(setdrawer) { ...@@ -102,7 +102,7 @@ function getcolumns(setdrawer) {
{ label: '未绑定', value: '6' }, { label: '未绑定', value: '6' },
{ label: '绑定', value: '7' }, { label: '绑定', value: '7' },
], ],
fixed: 'right', fixed: 'left',
width: 80 width: 80
}, },
{ {
...@@ -166,7 +166,6 @@ function getcolumns(setdrawer) { ...@@ -166,7 +166,6 @@ function getcolumns(setdrawer) {
hideInTable: true, hideInTable: true,
valueType: 'select', valueType: 'select',
options: { path: '/auth/sysShop/getShopSelectBox', linkParams: { factoryId: '' } }, options: { path: '/auth/sysShop/getShopSelectBox', linkParams: { factoryId: '' } },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 }, colProps: { span: 8 },
fieldProps: { fieldProps: {
placeholder: '请选择', placeholder: '请选择',
......
...@@ -7,13 +7,14 @@ import { doFetch, exportFetch } from '@/utils/doFetch'; ...@@ -7,13 +7,14 @@ import { doFetch, exportFetch } from '@/utils/doFetch';
import { useRequest, useAsyncEffect } from "ahooks"; import { useRequest, useAsyncEffect } from "ahooks";
import styles from "./index.less"; import styles from "./index.less";
import TreeRender from '@/components/TreeRender'; import TreeRender from '@/components/TreeRender';
import { Divider, Tabs, message } from "antd"; import { Divider, Tabs, message, Tooltip } from "antd";
import Leaseresume from "./Leaseresume"; import Leaseresume from "./Leaseresume";
import Operatinghistory from "./Operatinghistory"; import Operatinghistory from "./Operatinghistory";
import Resume from "./Resume"; import Resume from "./Resume";
import Basemsg from "./Basemsg"; import Basemsg from "./Basemsg";
import Devicestatus from "./Devicestatus"; import Devicestatus from "./Devicestatus";
import setAllCanvas from "@/utils/drawimage"//导出二维码 import setAllCanvas from "@/utils/drawimage"//导出二维码
import { MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons';
const Ledger = () => { const Ledger = () => {
let actionRef = useRef(); let actionRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
...@@ -24,7 +25,8 @@ const Ledger = () => { ...@@ -24,7 +25,8 @@ const Ledger = () => {
factory: {} factory: {}
}), }),
[extraparams, setextraparams] = useState({}), [extraparams, setextraparams] = useState({}),
[searchParams, csp] = useState({}); [searchParams, csp] = useState({}),
[flag, setFlag] = useState(false);
const { run, loading, runAsync } = useRequest(doFetch, { const { run, loading, runAsync } = useRequest(doFetch, {
manual: true, manual: true,
onSuccess: (res, params) => { onSuccess: (res, params) => {
...@@ -335,14 +337,26 @@ const Ledger = () => { ...@@ -335,14 +337,26 @@ const Ledger = () => {
<div className="ant-card-head" style={{ backgroundColor: 'white' }}> <div className="ant-card-head" style={{ backgroundColor: 'white' }}>
<div className="ant-card-head-wrapper"> <div className="ant-card-head-wrapper">
<div className="ant-card-head-title"> <div className="ant-card-head-title">
<h3 className="page-title">租赁台账</h3> <h3 className="page-title">设备台账</h3>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div className={styles.ledgercontent}> <div className={styles.ledgercontent}>
<div className={`${styles.ledgerleft} boxcontianbox`}> <div style={{ '--flagw': flag ? '300px' : '48px' }} className={`${styles.ledgerleft} boxcontianbox`}>
<TreeRender url="/auth/sysFactory/getFactoryTree" onselected={onselecteTree} noaction={true} maxWidth={215} /> <div style={{ cursor: 'pointer', marginTop: 16 }} onClick={() => {
setFlag(!flag);
}}>
{
flag ? <Tooltip title='收起'>
<MenuFoldOutlined style={{ fontSize: 22 }} />
</Tooltip> :
<Tooltip title='展开'>
<MenuUnfoldOutlined style={{ fontSize: 22 }} />
</Tooltip>
}
</div>
<TreeRender url="/auth/sysFactory/getFactoryTree" onselected={onselecteTree} noaction={true} maxWidth={215} style={{ display: flag ? 'block' : 'none' }} />
</div> </div>
<div className={`${styles.ledgerright} boxcontianbox`}> <div className={`${styles.ledgerright} boxcontianbox`}>
<AutoTable <AutoTable
...@@ -354,6 +368,7 @@ const Ledger = () => { ...@@ -354,6 +368,7 @@ const Ledger = () => {
pageextra={rightExtra} pageextra={rightExtra}
bordered={false} bordered={false}
x={2200} x={2200}
y={`calc(100vh - 480px)`}
extraparams={extraparams} extraparams={extraparams}
dataSourceFieldsChange={(val) => { dataSourceFieldsChange={(val) => {
csp(val) csp(val)
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
justify-content: space-between; justify-content: space-between;
.ledgerleft { .ledgerleft {
width: 300px; width: var(--flagw);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
......
...@@ -382,7 +382,7 @@ function Supplier(props) { ...@@ -382,7 +382,7 @@ function Supplier(props) {
return ( return (
<div> <div>
<AutoTable <AutoTable
pagetitle={<h3 className="page-title">设备供应商</h3>} pagetitle={<h3 className="page-title">供应商管理</h3>}
columns={columns} columns={columns}
path={urlParams.list} path={urlParams.list}
actionRef={actionRef} actionRef={actionRef}
......
...@@ -13,7 +13,6 @@ import PremButton from '@/components/PremButton'; ...@@ -13,7 +13,6 @@ import PremButton from '@/components/PremButton';
import getcolumns from './columns'; import getcolumns from './columns';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
import { message, Dropdown, Menu, Layout, Button, Image, Space, Divider, Tabs } from 'antd'; import { message, Dropdown, Menu, Layout, Button, Image, Space, Divider, Tabs } from 'antd';
import TreeRender from '@/components/TreeRender';
import { ProDescriptions } from '@ant-design/pro-components'; import { ProDescriptions } from '@ant-design/pro-components';
import InitForm from '@/components/InitForm'; import InitForm from '@/components/InitForm';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment