From b7414c02f48f5e3daa64da7fb09479c0e4476fe0 Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Wed, 24 Jan 2024 15:36:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=95=B0=E6=8D=AE=E4=B8=8B?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.js | 28 ++ src/pages/push/batchingpush/index.jsx | 0 src/pages/push/bompush/index.jsx | 0 .../push/goodspush/components/PushFrom.jsx | 132 +++++++++ src/pages/push/goodspush/index.jsx | 254 ++++++++++++++++++ src/pages/push/goodspush/services.js | 46 ++++ 6 files changed, 460 insertions(+) create mode 100644 src/pages/push/batchingpush/index.jsx create mode 100644 src/pages/push/bompush/index.jsx create mode 100644 src/pages/push/goodspush/components/PushFrom.jsx create mode 100644 src/pages/push/goodspush/index.jsx create mode 100644 src/pages/push/goodspush/services.js diff --git a/config/routes.js b/config/routes.js index d2ceac2..eea84bc 100644 --- a/config/routes.js +++ b/config/routes.js @@ -234,6 +234,34 @@ export default [ }, ], }, + { + name: '设备数据下发', + icon: 'BankFilled', + path: '/push', + routes: [ + { + name: '商品数据下发', + icon: 'smile', + path: '/push/goodspush', + component: './push/goodspush', + access: 'k12', + }, + { + name: '物料数据下发', + icon: 'smile', + path: '/push/batchingpush', + component: './push/batchingpush', + access: 'k14', + }, + { + name: '配方数据下发', + icon: 'smile', + path: '/push/bompush', + component: './push/bompush', + access: 'k14', + }, + ], + }, { name: '订单管理', icon: 'BankFilled', diff --git a/src/pages/push/batchingpush/index.jsx b/src/pages/push/batchingpush/index.jsx new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/push/bompush/index.jsx b/src/pages/push/bompush/index.jsx new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/push/goodspush/components/PushFrom.jsx b/src/pages/push/goodspush/components/PushFrom.jsx new file mode 100644 index 0000000..3065322 --- /dev/null +++ b/src/pages/push/goodspush/components/PushFrom.jsx @@ -0,0 +1,132 @@ +import React, { useState, useEffect,useRef } from 'react'; +import { Modal, Row, Col, Checkbox, Select} from 'antd'; +import ProTable from '@ant-design/pro-table'; +import { + GetDeviceList, + GetGoodsPage, + GetGoodsTypeTree +} from '../services'; +const PushFrom = (props) => { + const [deviceData, setdeviceData] = useState([]); + const [selectedRowsState, setSelectedRows] = useState([]); + const [dataSource,setdataSource]= useState([]); + const [treeData, setTreeData] = useState(); + const [DeviceIds, setDeviceIds] = useState([]); + const actionRef = useRef(); + useEffect(() => { + console.log(props.values) + GetDeviceList().then((r)=>{ + var data=r.data.map(x=>{ + return {value:x.id,label:x.name} + }) + setdeviceData(data) + }) + GetGoodsTypeTree().then((r) => { + setTreeData(r.data); + }); + var params={current:1,pageSize:10} + GetGoodsPage(params).then((r) => { + setdataSource(r.data.data); + //console.log(goodsData) + //total = r.data.total; + }); + },[props.values]) + const handleChange=(value)=>{ + setDeviceIds(value) + } + const columns=[ + { + title: '编码', + dataIndex: 'code', + valueType: 'textarea', + hideInTable: true, + hideInSearch: true, + }, + { + title: '名称', + dataIndex: 'name', + valueType: 'textarea', + }, + { + title: '商品类型', + dataIndex: 'goodsTypeName', + valueType: 'treeSelect', + fieldProps: { + showSearch:true, + allowClear:true, + options: treeData + }, + }, + ] + return ( + { + console.log(selectedRowsState) + console.log(DeviceIds) + }} + onCancel={() => { + props.onCancel(); + }} + destroyOnClose + > + + + 选择设备: +