From 7d378bcce63c18cb82178039f12c652c2ae2e5e1 Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Sun, 4 Feb 2024 12:54:15 +0800 Subject: [PATCH 1/3] z --- src/pages/database/goods/goodsInfo/index.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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(); } From 3f0d6aebb65f4faea8733bb3e928341d52dbe64a Mon Sep 17 00:00:00 2001 From: gwbvipvip Date: Sun, 18 Feb 2024 15:14:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../company/account/components/CreateForm.jsx | 12 +++--- src/pages/company/account/index.jsx | 1 + .../database/goods/goodstypemanage/index.jsx | 39 ++++++++++--------- src/pages/org/orgamange/index.jsx | 39 ++++++++++--------- src/pages/org/users/components/CreateForm.jsx | 30 +++++++++----- src/pages/org/users/index.jsx | 17 +++++++- src/pages/org/users/service.js | 12 +++++- 7 files changed, 96 insertions(+), 54 deletions(-) diff --git a/src/pages/company/account/components/CreateForm.jsx b/src/pages/company/account/components/CreateForm.jsx index cf2acc4..1fb047b 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/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..af8dbaf 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,31 @@ const CreateForm = (props) => { - + + {/* */} + + + + - - - - - + */} + , + ]} + + 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/org/users/components/CreateForm.jsx b/src/pages/org/users/components/CreateForm.jsx index af8dbaf..c6715a1 100644 --- a/src/pages/org/users/components/CreateForm.jsx +++ b/src/pages/org/users/components/CreateForm.jsx @@ -53,7 +53,9 @@ const CreateForm = (props) => { /> -