diff --git a/config/routes.js b/config/routes.js
index 5e14a7a..c0a5b2d 100644
--- a/config/routes.js
+++ b/config/routes.js
@@ -118,7 +118,13 @@ export default [
component: './database/basic/batching',
access: 'k7',
},
-
+ {
+ name: '配方管理',
+ icon: 'smile',
+ path: '/database/bom',
+ component: './database/bom',
+ access: 'k7',
+ },
{
name: '商品管理',
icon: 'smile',
diff --git a/src/pages/company/account/components/CreateForm.jsx b/src/pages/company/account/components/CreateForm.jsx
index cf2acc4..a6c9c50 100644
--- a/src/pages/company/account/components/CreateForm.jsx
+++ b/src/pages/company/account/components/CreateForm.jsx
@@ -17,7 +17,7 @@ const CreateForm = (props) => {
>
-
+
+
{/*
*/}
-
-
+ */}
diff --git a/src/pages/company/account/index.jsx b/src/pages/company/account/index.jsx
index a426e42..2415dda 100644
--- a/src/pages/company/account/index.jsx
+++ b/src/pages/company/account/index.jsx
@@ -338,6 +338,7 @@ const companyManage = () => {
if (value.id) {
success = await handleUpdate(value);
} else {
+ value.phone=value.email;
success = await handleAdd(value);
}
if (success) {
diff --git a/src/pages/database/bom/index.css b/src/pages/database/bom/index.css
new file mode 100644
index 0000000..128076e
--- /dev/null
+++ b/src/pages/database/bom/index.css
@@ -0,0 +1,53 @@
+.form-list-item {
+ display: flex;
+ align-items: center;
+}
+
+.form-list-copy {
+ display: flex;
+ justify-content: flex-end;
+ margin-bottom: 10px;
+}
+
+.form-input-label {
+ width: 50px;
+ flex-shrink: 0;
+}
+
+.form-list-detail {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin: 10px 0;
+}
+
+.form-detail-card {
+ display: flex;
+ align-items: center;
+}
+
+.formmual-name input {
+ width: 200px;
+ margin-right: 10px;
+}
+.clickRowStyl{background-color:antiquewhite}
+.ant-tree-switcher{
+ width: 1px;
+}
+.ant-tree-switcher-noop{
+ display: none;
+}
+.ant-tree .ant-tree-treenode{
+ height: 40px;
+}
+.ant-tree .ant-tree-node-content-wrapper{
+ line-height: 40px;
+ height: 40px;
+}
+
+.ant-tree .ant-tree-treenode-draggable .ant-tree-draggable-icon{
+ line-height: 40px;
+}
+.ant-tree .ant-tree-treenode:focus{
+ background-color: #ffd8bf;
+}
\ No newline at end of file
diff --git a/src/pages/database/bom/index.jsx b/src/pages/database/bom/index.jsx
new file mode 100644
index 0000000..564af0a
--- /dev/null
+++ b/src/pages/database/bom/index.jsx
@@ -0,0 +1,135 @@
+import { PlusOutlined } from '@ant-design/icons';
+import { Button, message, Input, Drawer, Modal, Space, Tag,Popconfirm } from 'antd';
+import React, { useState, useRef, useEffect } from 'react';
+import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
+import ProTable from '@ant-design/pro-table';
+import {bomPage} from './services';
+
+const GoodsBomsManage = (props) => {
+ const actionRef = useRef();
+ const [modalVisible, setModalVisible] = useState(false);
+
+ useEffect(() => {
+
+ }, []);
+
+
+ const columns = [
+ {
+ title: '主键',
+ dataIndex: 'id',
+ key: 'id',
+ hideInTable: true,
+ hideInSearch: true,
+ tip: '规则名称是唯一的 key',
+ },
+ {
+ title: '配方名称',
+ key: 'name',
+ dataIndex: 'name',
+ valueType: 'textarea',
+ },
+ {
+ title: '配方类型',
+ dataIndex: 'isMain',
+ hideInForm: true,
+ valueEnum: {
+ false: {
+ text: '辅料',
+ status: 'Processing',
+ },
+ true: {
+ text: '主料',
+ status: 'Success',
+ },
+ },
+ },
+ {
+ title: '操作',
+ dataIndex: 'option',
+ valueType: 'option',
+ render: (_, record) => [
+ {
+ setUpdateBomVisible(true);
+ setBomId(record.bomId)
+ }}
+ >
+ 更新
+ ,
+ {
+ setBomBatchingVisible(true);
+ setBomId(record.bomId)
+ }}
+ >
+ 配方详情
+ ,
+ {
+
+ }}
+ onCancel={() => { }}
+ >
+ 删除
+ ,
+ ],
+ }
+ ]
+
+
+ return (
+
+ [
+ ,
+ ]}
+
+ request={async (params) => {
+ var total = 0;
+ var data=[];
+ const res = await bomPage(params);
+ if(res.statusCode==200){
+ data=res.data.data;
+ total=res.data.total;
+ }
+ return {
+ data: data,
+ success: true,
+ total: total,
+ };
+
+ }}
+ rowSelection={{
+ onChange: (_, selectedRows) => setSelectedRows(selectedRows),
+ }}
+ />
+
+
+ );
+};
+
+export default GoodsBomsManage;
diff --git a/src/pages/database/bom/services.js b/src/pages/database/bom/services.js
new file mode 100644
index 0000000..d6df3e0
--- /dev/null
+++ b/src/pages/database/bom/services.js
@@ -0,0 +1,11 @@
+import { request } from 'umi';
+import { getDataBaseUrl } from '@/global_data';
+
+export async function bomPage(data) {
+ return request(getDataBaseUrl()+'/api/bom/BomPage', {
+ method: 'POST',
+ data:data,
+ });
+ }
+
+
diff --git a/src/pages/database/goods/goodsInfo/index.jsx b/src/pages/database/goods/goodsInfo/index.jsx
index bfb2c31..3ddc746 100644
--- a/src/pages/database/goods/goodsInfo/index.jsx
+++ b/src/pages/database/goods/goodsInfo/index.jsx
@@ -148,7 +148,7 @@ const Advanced = (props) => {
initGoodsUnit();
initGoodsType();
initGetbomType();
- //intBatching();//默认原料
+ intBatching();//默认原料
//}
}, [tabStatus])
@@ -192,11 +192,11 @@ const Advanced = (props) => {
})
}
- // function intBatching(){
- // getproductpage().then((r) => {
- // setMatedata(r.data);
- // });
- // }
+ function intBatching(){
+ getproductpage().then((r) => {
+ setMatedata(r.data);
+ });
+ }
function initTypeList(){
initGetbomType();
}
diff --git a/src/pages/database/goods/goodstypemanage/index.jsx b/src/pages/database/goods/goodstypemanage/index.jsx
index 27f96ad..2db11fe 100644
--- a/src/pages/database/goods/goodstypemanage/index.jsx
+++ b/src/pages/database/goods/goodstypemanage/index.jsx
@@ -172,6 +172,9 @@ const handleAdd = async (fields) => {
{
+ if(record.pid=="0"){
+ record.pid=null;
+ }
handleModalVisible(true);
setCurrentRow(record);
}}
@@ -292,24 +295,24 @@ const handleAdd = async (fields) => {
)}
{
var success = false;
diff --git a/src/pages/org/orgamange/index.jsx b/src/pages/org/orgamange/index.jsx
index 95bed4a..f45dec2 100644
--- a/src/pages/org/orgamange/index.jsx
+++ b/src/pages/org/orgamange/index.jsx
@@ -145,6 +145,9 @@ const TableList = () => {
{
+ if(record.pid==0){
+ record.pid=null;
+ }
setStepFormValues(record);
handleModalVisible(true);
}}
@@ -310,24 +313,24 @@ const TableList = () => {
)}
{
createModalVisible && {
var success = false;
diff --git a/src/pages/org/users/components/CreateForm.jsx b/src/pages/org/users/components/CreateForm.jsx
index e379f01..c6715a1 100644
--- a/src/pages/org/users/components/CreateForm.jsx
+++ b/src/pages/org/users/components/CreateForm.jsx
@@ -1,5 +1,5 @@
import React,{useEffect,useState} from 'react';
-import { Modal, Form, Input, Button, Select } from 'antd';
+import { Modal, Form, Input, Button, Select,TreeSelect } from 'antd';
import api from './service'
const CreateForm = (props) => {
@@ -32,7 +32,7 @@ const CreateForm = (props) => {
preserve={false}
layout="horizontal"
labelCol={{
- span: 4,
+ span: 6,
}}
initialValues={props.values}
onFinish={props.onFinish}
@@ -40,21 +40,33 @@ const CreateForm = (props) => {
-
+
+ {/* */}
+
+
+
+
-
-
-
-
-
+ */}
+