From 3f0d6aebb65f4faea8733bb3e928341d52dbe64a Mon Sep 17 00:00:00 2001 From: gwbvipvip Date: Sun, 18 Feb 2024 15:14:05 +0800 Subject: [PATCH 1/6] =?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) => { /> - From a717802a6f63d0b21d3f812c838292f53862594e Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Mon, 19 Feb 2024 11:14:13 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.js | 7 + .../goods/goodsbom/components/BomBatching.jsx | 148 +++++++++ .../goods/goodsbom/components/CreateBom.jsx | 302 ++++++++++++++++++ src/pages/database/goods/goodsbom/index.jsx | 296 +++++++++++++++++ src/pages/database/goods/goodsbom/service.js | 47 +++ src/pages/database/goods/newgoods/index.jsx | 2 +- 6 files changed, 801 insertions(+), 1 deletion(-) create mode 100644 src/pages/database/goods/goodsbom/components/BomBatching.jsx create mode 100644 src/pages/database/goods/goodsbom/components/CreateBom.jsx create mode 100644 src/pages/database/goods/goodsbom/index.jsx create mode 100644 src/pages/database/goods/goodsbom/service.js diff --git a/config/routes.js b/config/routes.js index 557381e..f9d4629 100644 --- a/config/routes.js +++ b/config/routes.js @@ -158,6 +158,13 @@ export default [ component: './database/goods/goodsInfo', access: 'k7', }, + { + name: '商品配方', + icon: 'smile', + path: '/database/goods/goodsbom', + component: './database/goods/goodsbom', + access: 'k7', + }, ] }, ], diff --git a/src/pages/database/goods/goodsbom/components/BomBatching.jsx b/src/pages/database/goods/goodsbom/components/BomBatching.jsx new file mode 100644 index 0000000..4435a14 --- /dev/null +++ b/src/pages/database/goods/goodsbom/components/BomBatching.jsx @@ -0,0 +1,148 @@ +import React, { useState,useRef,useEffect } from 'react'; +import { PlusOutlined} from '@ant-design/icons'; +import { Modal, Form, Input, Button, Select,Radio,message,Tag,Divider,Space } from 'antd'; +import { GetByidBomList } from '../service'; +import { + EditableProTable, + ProTable +} from '@ant-design/pro-table'; +const GoodsbomFrom = (props) => { + const { Option, OptGroup } = Select; + const [dataSource, setDataSource] = useState([]); + const [editableKeys, setEditableRowKeys] = useState([]); + const [form] = Form.useForm(); + + useEffect(() => { + let soredata=[]; + if(props.BomId){ + GetByidBomList(props.BomId).then((t)=>{ + var data=t.data + if(data.bomEntry.length>0){ + data.bomEntry.map(x=>{ + var item={ + id:x.id, + bomId:x.bomId, + batchingId:x.batchingId, + dosage:x.bomQty + } + console.log("item",item) + soredata.push(item) + }) + } + console.log("soredata",soredata) + if(soredata.length>0){ + setEditableRowKeys(soredata.map((item) => item.id)) + setDataSource(soredata); + } + }) + } + + + },[props]) + const columns=[ + { + title: '主键', + dataIndex: 'id', + key: 'id', + hideInTable: true, + hideInSearch: true, + tip: '规则名称是唯一的 key', + }, + { + title: '配方', + dataIndex: 'bomId', + hideInTable: true, + hideInSearch: true, + }, + { + title: '物料名称', + dataIndex: 'batchingId', + formItemProps: (form, { rowIndex }) => { + return { + rules: + rowIndex > 1 ? [{ required: true, message: '此项为必填项' }] : [], + }; + }, + valueType: 'select', + fieldProps: { + showSearch:true, + options: props.matedata.map((item, index) => {return {label:item.name,value:item.id}}) + }, + width: '25%', + }, + { + title: '用量', + dataIndex: 'dosage', + valueType:'digit', + width: '15%', + }, + { + title: '操作', + valueType: 'option', + width: '15%', + render: () => { + return null; + }, + }, +] + const headleOk=()=>{ + if(dataSource.length==0){ + check=false; + message.error("请选择物料") + }else{ + props.onBomBatchingFinish(dataSource); + setDataSource([]) + } + + + } + return ( + { + props.onBomBatchingCancel(); + }} + destroyOnClose + > + ({ + id: Date.now(), + bomId:props.BomId + }), + }} + + editable={{ + type: 'multiple', + editableKeys, + actionRender: (row, config, defaultDoms) => { + return [defaultDoms.delete,defaultDoms.Button]; + }, + onValuesChange: (record, recordList) => { + setDataSource(recordList); + }, + onDelete:async (key, row) =>{ + console.log(key) + console.log(row) + + }, + onChange: setEditableRowKeys, + }}/> + + + //vessels + ); +}; + +export default GoodsbomFrom; diff --git a/src/pages/database/goods/goodsbom/components/CreateBom.jsx b/src/pages/database/goods/goodsbom/components/CreateBom.jsx new file mode 100644 index 0000000..6600c04 --- /dev/null +++ b/src/pages/database/goods/goodsbom/components/CreateBom.jsx @@ -0,0 +1,302 @@ +import React, { useState,useRef,useEffect } from 'react'; +import { PlusOutlined} from '@ant-design/icons'; +import { Modal, Form, Input, Button, Select,Radio,message,Tag,Divider,Space } from 'antd'; +import { AddBomType,getproductpage } from '../service'; +import { + EditableProTable, + ProTable +} from '@ant-design/pro-table'; +const GoodsbomFrom = (props) => { + const { Option, OptGroup } = Select; + const [checkvalue, setCheckvalue] = useState([]); + const [dataSource, setDataSource] = useState([]); + const [editableKeys, setEditableRowKeys] = useState([]); + const [form] = Form.useForm(); + const [typename, settypename] = useState(''); + const inputRef = useRef(null); + const onNameChange=(event)=>{ + settypename(event.target.value); + } + const addItem=(e)=>{ + e.preventDefault(); + + if(typename.length==0){ + message.error("请输入名称"); + }else{ + var parm={name:typename} + AddBomType(parm).then((r)=>{ + if(r.succeeded){ + message.success('添加成功'); + props.initTypeList(); + settypename(''); + }else{ + message.error(r.errors); + } + }) + } + + } + useEffect(() => { + console.log("111111111") + console.log(props.defaultmatedata) + form.setFieldsValue({ + bomName: props.goodsname, + // bomType:1 + }); + if(props.defaultmatedata){ + let soredata=[]; + props.defaultmatedata.forEach((item,index)=>{ + var data={ + id:index, + batchingId:item, + dosage:0 + } + + soredata.push(data) + }) + + setEditableRowKeys(soredata.map((item) => item.id)) + setDataSource(soredata); + } + },[props]) + const columns=[ + { + title: '物料名称', + dataIndex: 'batchingId', + formItemProps: (form, { rowIndex }) => { + return { + rules: + rowIndex > 1 ? [{ required: true, message: '此项为必填项' }] : [], + }; + }, + valueType: 'select', + fieldProps: { + showSearch:true, + options: props.matedata.map((item, index) => {return {label:item.name,value:item.id}}) + }, + width: '25%', + }, + { + title: '用量', + dataIndex: 'dosage', + valueType:'digit', + width: '15%', + }, + { + title: '操作', + valueType: 'option', + width: '15%', + render: () => { + return null; + }, + }, +] + const headleOk=()=>{ + form + .validateFields() + .then((values) => { + var check=true; + var data=values; + console.log(dataSource) + if(checkvalue.length==0){ + check=false; + message.error("请选择商品属性") + }else{ + data.shuxing=checkvalue; + } + if(dataSource.length==0){ + check=false; + message.error("请选择物料") + }else{ + data.mate=dataSource.map(x=>{return {batchingId:x.batchingId,dosage:x.dosage}}); + } + if(check){ + form.resetFields(); + props.onFinish(data); + setDataSource([]) + } + + }) + .catch((info) => { + message.error("请填写必填信息") + }); + } + const onChangevalue=(data)=>{ + const { name, value } = data.target; + let names=""; + let updatedValues = [...checkvalue]; + for (let index = 0; index < props.goodsAttriburteData.length; index++) { + if (name === 'radiogroup'+index) { + // 将第一组的值累加到数组中 + updatedValues[index] = value; + + } + } + props.goodsAttriburteData.forEach(item=>{ + for (let index = 0; index < updatedValues.length; index++) { + var bs=item.goodsAttributeValueList.find(x=>x.goodsAttributeValuId==updatedValues[index])?.attributeValue + if(bs){ + names=names+bs; + if(index< updatedValues.length-1){ + names=names+"-" + } + } + + } + }) + + + form.setFieldsValue({ + bomName: props.goodsname+"("+names+")" + }); + setCheckvalue(updatedValues) + } + + return ( + { + props.onCancel(); + }} + maskClosable={false} + destroyOnClose + > + + + + + + e.stopPropagation()} + /> + + + + )} + /> + + + + + + *商品属性 + { + props.goodsAttriburteData == undefined ? '' :( + props.goodsAttriburteData.map((item, index) => { + return ( +
+
+ {item.attributeName} + + + { + item.goodsAttributeValueList.map((item, index)=>{ + return ( + {item.attributeValue} + ) + }) + } + + +
+
+ ); + }) + ) + } + *配方详情} + columns={columns} + rowKey="id" + value={dataSource} + onChange={setDataSource} + recordCreatorProps={{ + newRecordType: 'dataSource', + record: () => ({ + id: Date.now(), + }), + }} + + editable={{ + type: 'multiple', + editableKeys, + actionRender: (row, config, defaultDoms) => { + return [defaultDoms.delete,defaultDoms.Button]; + }, + onValuesChange: (record, recordList) => { + setDataSource(recordList); + }, + onDelete:async (key, row) =>{ + console.log(key) + console.log(row) + + }, + onChange: setEditableRowKeys, + }}/> + {/* { + let Data = []; + var total = 0; + await getproductpage(params).then((r) => { + Data = r.data.data; + total = r.data.total; + }); + return { + data: Data, + success: true, + total: total, + }; + }} + columns={columns} + rowSelection={{ + onChange: (_, selectedRows) => { + setSelectedRows(selectedRows); + }, + }}/> */} +
+ //vessels + ); +}; + +export default GoodsbomFrom; diff --git a/src/pages/database/goods/goodsbom/index.jsx b/src/pages/database/goods/goodsbom/index.jsx new file mode 100644 index 0000000..ac365b5 --- /dev/null +++ b/src/pages/database/goods/goodsbom/index.jsx @@ -0,0 +1,296 @@ +import { PlusOutlined, UploadOutlined,ArrowLeftOutlined } from '@ant-design/icons'; +import { Button, Card, message, Steps, Empty, Form, Input, Upload, Select, InputNumber, Switch,TreeSelect,Divider,Space,Popconfirm } from 'antd'; +import { GridContent, PageContainer, RouteContext } from '@ant-design/pro-layout'; +import React, { Fragment, useRef, useState, useEffect } from 'react'; +import ProTable from '@ant-design/pro-table'; +import CreateBom from './components/CreateBom'; +// import UpdateBom from './components/UpdateBom' +// import BomBatching from './components/BomBatching' +import { addGoods} from '../newgoods/service'; +import { GetGoodsBom, DelGoodsBom,getbygoodsidattribute,addgoodsbomattribute,GetbomTypelist,getproductpage,getbomlist } from './service' +import axios from 'axios'; +import { history } from 'umi'; +const { Step } = Steps; +const { Option, OptGroup } = Select; +const { TextArea } = Input; +const Advanced = (props) => { + const [form] = Form.useForm(); + const [goodsTypes, setGoodsTypes] = useState([]); + const [goodsUnit, setGoodsUnit] = useState([]); + const [goodsBigTypes, setGoodsBigTypes] = useState([]); + const [goodsTaste, setGoodsTaste] = useState([]); + const [setGoodsBomModalVisible, handleGoodsBomModalVisible] = useState(); + const [handleCreateoodsBomModalVisible,setHandleCreateoodsBomModalVisible] = useState(false); + const [selectedRowsState, setSelectedRows] = useState([]); + const actionRef = useRef(); + const [currTabKey, SetCurrTabKey] = useState("basis") + const [url, setUrl] = useState(props.location.query.values ? props.location.query.values.imgUrl : null); + const [currentGoodsProp, setCurrentGoodsProp] = useState(0); + const [goodsAttriburteData, setGoodsAttriburteData] = useState([]); + const [bomtype, setBomtype] = useState([]); + const [matedata, setMatedata] = useState([]); + const [treeData, setTreeData] = useState(); + const [unitname, setunitname] = useState(''); + const [bomTypeData,setbomTypeData]= useState([]); + const inputRef = useRef(null); + const [Bomdata, setBomdata] = useState([]); + const [BomIds, setBomIds] = useState([]); + const [BomId, setBomId] = useState(); + const [UpdateBomVisible, setUpdateBomVisible] = useState(false); + const [BomBatchingVisible,setBomBatchingVisible]= useState(false); + const [goodsTypeIdvalue, setgoodsTypeIdvalue] = useState(); + //设置 + const [tabStatus, seTabStatus] = useState({ + operationKey: props.location.query.tabStatus ? props.location.query.tabStatus : 'basis', + tabActiveKey: props.location.query.tabStatus ? props.location.query.tabStatus : 'basis', + }); + useEffect(() => { + // if(!props.location?.query?.values){ + // history.push({ + // pathname: '/database/goods/newgoods', + // }); + // }else{ + SetCurrTabKey(tabStatus.tabActiveKey); + initGetbomType(); + intBatching();//默认原料 + //} + + }, [tabStatus]) + const onTabChange = (key) => { + if (currentGoodsProp === 1) { + message.info('套餐不能设置配方'); + return; + } + seTabStatus({ operationKey: key, tabActiveKey: key }); + + //initGoodsType() + }; + + function initGetbomType(){ + GetbomTypelist().then((r)=>{ + var list = []; + if (r.data.length > 0) { + r.data.forEach((item) => { + list.push({ text: item.name, value: item.id, label: item.name }); + }); + } + setbomTypeData(list) + }) + + } + function intBatching(){ + getproductpage().then((r) => { + setMatedata(r.data); + }); + } + function initTypeList(){ + initGetbomType(); + } + + const operationTabList = [ + { + key: 'goodsbom', + tab: '商品配方', + }, + + ]; + const bomcolumns = + [ + { + 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) + }} + > + 配方详情 + , + { + const hide = message.loading('正在删除'); + try { + DelGoodsBom(record.id); + hide(); + message.success('删除成功,即将刷新'); + actionRef.current.reload(); + return true; + } catch (error) { + hide(); + message.error('删除失败,请重试'); + actionRef.current.reload(); + return false; + } + }} + onCancel={() => {}} + > + 删除 + , + ], + } + ] + const contentList = { + goodsbom: ( + + [ + , + ]} + request={async (params) => { + if (props.location.query.values.id == undefined || props.location.query.values.id == null) { + + } else { + params.GoodsId = props.location.query.values.id; + var total = 0; + const msg = await GetGoodsBom(params); + if(msg.data.data.length>0){ + var nom=msg.data.data.map(x=>{ + return x.bomId; + }) + setBomIds(nom) + } + + return { + data: msg.data.data, + success: true, + total: total, + }; + } + + }} + rowSelection={{ + onChange: (_, selectedRows) => setSelectedRows(selectedRows), + }} + + /> + { + value.goodsId=props.location.query.values.id; + console.log(value) + await addgoodsbomattribute(value).then((r)=>{ + console.log(r) + if(r.data){ + message.success("添加成功") + setHandleCreateoodsBomModalVisible(false); + }else{ + message.error("添加失败") + } + actionRef.current.reload(); + }) + }} + goodsid={props.location.query.values?.id} + goodsname={props.location.query.values?.name} + goodsAttriburteData={goodsAttriburteData} + matedata={matedata} + bomtype={bomtype} + defaultmatedata={props.location.query.values?.defaultMate} + onCancel={() => { + setHandleCreateoodsBomModalVisible(false); + }} + /> + {/* + */} + + + ), + }; + return ( + { + history.push({ + pathname: '/database/goods/newgoods', + }); + }}>返回], + breadcrumb: {}, + }} + title={props.location.query.isAdd ? '商品新增' : '详情'} + tabActiveKey={currTabKey} + onTabChange={onTabChange} + tabList={operationTabList} + > + + {contentList[tabStatus.operationKey]} + + ); +}; + +export default Advanced; diff --git a/src/pages/database/goods/goodsbom/service.js b/src/pages/database/goods/goodsbom/service.js new file mode 100644 index 0000000..51157d7 --- /dev/null +++ b/src/pages/database/goods/goodsbom/service.js @@ -0,0 +1,47 @@ +import { request } from 'umi'; +import { getDataBaseUrl } from '@/global_data'; +export async function GetbomTypelist (data) { + return request(getDataBaseUrl()+`/api/bom/getbomtypelist`, { + method: 'Get', + // params: { ...params }, + // ...(options || {}), + }); + } + export async function getproductpage(params) { + return request(getDataBaseUrl()+'/api/batching/getbatchingselectlist', { + method: 'Get', + }); + } + export async function addgoodsbomattribute(data) { + return request(getDataBaseUrl()+`/api/goods/addgoodsbomattribute`, { + method: 'Post', + data: data, + }); + } + export async function getbygoodsidattribute (data) { + return request(getDataBaseUrl()+`/api/goodsattribute/getbygoodsidattribute?id=`+data, { + method: 'Get', + // params: { ...params }, + // ...(options || {}), + }); +} +export async function GetGoodsBom(data) { + return request(getDataBaseUrl()+`/api/goods/getgoodsbompage`, { + method: 'Post', + data: data, + }); + } + export async function DelGoodsBom (data) { + return request(getDataBaseUrl()+`/api/goods/delgoodsbom?Ids=${data}`, { + method: 'GET', + //data: data, + }); + } + export async function AddBomType (data) { + return request(getDataBaseUrl()+`/api/bom/addbomtype`, { + method: 'Post', + data: data, + // params: { ...params }, + // ...(options || {}), + }); + } diff --git a/src/pages/database/goods/newgoods/index.jsx b/src/pages/database/goods/newgoods/index.jsx index 7f2e840..3b74a1e 100644 --- a/src/pages/database/goods/newgoods/index.jsx +++ b/src/pages/database/goods/newgoods/index.jsx @@ -235,7 +235,7 @@ const GoodsManage = () => { type="primary" onClick={() => { history.push({ - pathname: '/database/goods/goodsInfo', + pathname: '/database/goods/goodsbom', query: { isAdd: false, values: record, From 20bd25b20d362318aed5f3a72a19cfb2b688e418 Mon Sep 17 00:00:00 2001 From: gwbvipvip Date: Mon, 19 Feb 2024 14:14:45 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../database/bom/components/CreateBom.jsx | 145 ++++++++++++++++++ src/pages/database/bom/index.jsx | 118 +++++++++----- src/pages/database/bom/services.js | 22 +++ .../goods/goodsInfo/components/CreateBom.jsx | 2 + 4 files changed, 250 insertions(+), 37 deletions(-) create mode 100644 src/pages/database/bom/components/CreateBom.jsx diff --git a/src/pages/database/bom/components/CreateBom.jsx b/src/pages/database/bom/components/CreateBom.jsx new file mode 100644 index 0000000..0e88c7f --- /dev/null +++ b/src/pages/database/bom/components/CreateBom.jsx @@ -0,0 +1,145 @@ +import React, { useState, useRef } from 'react'; +import { Button, Modal, Form, Input, Select, Divider, Space, message } from 'antd'; +import { PlusOutlined } from '@ant-design/icons'; +import { EditableProTable } from '@ant-design/pro-table'; +import { AddBomType } from '../services'; + +const App = (props) => { + + const [form] = Form.useForm(); + const inputRef = useRef(null); + const [typename, settypename] = useState(''); + const [dataSource, setDataSource] = useState([]); + const [editableKeys, setEditableRowKeys] = useState([]); + + const onNameChange = (event) => { + settypename(event.target.value); + } + + const columns = [ + { + title: '物料名称', + dataIndex: 'batchingId', + formItemProps: (form, { rowIndex }) => { + return { + rules: + rowIndex > 1 ? [{ required: true, message: '此项为必填项' }] : [], + }; + }, + valueType: 'select', + fieldProps: { + showSearch: true, + options: props.matedata.map((item, index) => { return { label: item.name, value: item.id } }) + }, + width: '25%', + }, + { + title: '用量', + dataIndex: 'dosage', + valueType: 'digit', + width: '15%', + }, + { + title: '操作', + valueType: 'option', + width: '15%', + render: () => { + return null; + }, + }, + ] + + + const addItem = (e) => { + e.preventDefault(); + if (typename.length == 0) { + message.error("请输入名称"); + } else { + var parm = { name: typename } + AddBomType(parm).then((r) => { + if (r.succeeded) { + message.success('添加成功'); + props.initTypeList(); + settypename(''); + } else { + message.error(r.errors); + } + }) + } + + } + + return ( + <> + + +
+ + + + + + + e.stopPropagation()} + /> + + + + )} + /> + +
+ *配方详情} + columns={columns} + rowKey="id" + value={dataSource} + onChange={setDataSource} + recordCreatorProps={{ + newRecordType: 'dataSource', + record: () => ({ + id: Date.now(), + }), + }} + + editable={{ + type: 'multiple', + editableKeys, + actionRender: (row, config, defaultDoms) => { + return [defaultDoms.delete, defaultDoms.Button]; + }, + onValuesChange: (record, recordList) => { + setDataSource(recordList); + }, + onDelete: async (key, row) => { + console.log(key) + console.log(row) + + }, + onChange: setEditableRowKeys, + }} /> + +
+ + ); +}; +export default App; \ No newline at end of file diff --git a/src/pages/database/bom/index.jsx b/src/pages/database/bom/index.jsx index 564af0a..3da88cb 100644 --- a/src/pages/database/bom/index.jsx +++ b/src/pages/database/bom/index.jsx @@ -1,18 +1,54 @@ import { PlusOutlined } from '@ant-design/icons'; -import { Button, message, Input, Drawer, Modal, Space, Tag,Popconfirm } from 'antd'; +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'; +import { bomPage, getproductpage,GetbomTypelist } from './services'; +import CreateBom from './components/CreateBom'; const GoodsBomsManage = (props) => { const actionRef = useRef(); const [modalVisible, setModalVisible] = useState(false); + const [matedata, setMatedata] = useState([]); + const [bomTypeData,setbomTypeData]= useState([]); useEffect(() => { + intBatching();//默认原料 }, []); + function intBatching() { + getproductpage().then((r) => { + setMatedata(r.data); + }); + } + function initTypeList() { + initGetbomType(); + } + function initGetbomType() { + GetbomTypelist().then((r) => { + var list = []; + if (r.data.length > 0) { + r.data.forEach((item) => { + list.push({ text: item.name, value: item.id, label: item.name }); + }); + } + setbomTypeData(list) + }) + + } + function initGetbomType(){ + GetbomTypelist().then((r)=>{ + var list = []; + if (r.data.length > 0) { + r.data.forEach((item) => { + list.push({ text: item.name, value: item.id, label: item.name }); + }); + } + setbomTypeData(list) + }) + + } const columns = [ { @@ -76,7 +112,7 @@ const GoodsBomsManage = (props) => { okText="是" cancelText="否" onConfirm={async () => { - + }} onCancel={() => { }} > @@ -92,42 +128,50 @@ const GoodsBomsManage = (props) => { title: '', breadcrumb: {}, }}> - [ - , - ]} + [ + , + ]} + + 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), + }} + /> + + {/* 新增菜谱 */} + { setModalVisible(false); }} + /> - 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), - }} - /> - ); }; diff --git a/src/pages/database/bom/services.js b/src/pages/database/bom/services.js index d6df3e0..2120a38 100644 --- a/src/pages/database/bom/services.js +++ b/src/pages/database/bom/services.js @@ -8,4 +8,26 @@ export async function bomPage(data) { }); } + export async function AddBomType (data) { + return request(getDataBaseUrl()+`/api/bom/addbomtype`, { + method: 'Post', + data: data, + // params: { ...params }, + // ...(options || {}), + }); + } + + export async function getproductpage(params) { + return request(getDataBaseUrl()+'/api/batching/getbatchingselectlist', { + method: 'Get', + }); + } + + export async function GetbomTypelist (data) { + return request(getDataBaseUrl()+`/api/bom/getbomtypelist`, { + method: 'Get', + // params: { ...params }, + // ...(options || {}), + }); + } diff --git a/src/pages/database/goods/goodsInfo/components/CreateBom.jsx b/src/pages/database/goods/goodsInfo/components/CreateBom.jsx index 6600c04..d1a973d 100644 --- a/src/pages/database/goods/goodsInfo/components/CreateBom.jsx +++ b/src/pages/database/goods/goodsInfo/components/CreateBom.jsx @@ -214,6 +214,8 @@ const GoodsbomFrom = (props) => { + + *商品属性 { props.goodsAttriburteData == undefined ? '' :( From 5a38f7c7674baee30e488f096621eb0183d4bf6f Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Mon, 19 Feb 2024 14:42:06 +0800 Subject: [PATCH 5/6] z --- config/proxy.js | 4 +- src/global_data.js | 2 +- .../goods/goodsbom/components/CreateBom.jsx | 133 +++++++++++------ src/pages/database/goods/goodsbom/index.jsx | 135 +++++++----------- src/pages/database/goods/goodsbom/service.js | 5 + src/pages/database/goods/newgoods/index.jsx | 2 +- 6 files changed, 153 insertions(+), 128 deletions(-) diff --git a/config/proxy.js b/config/proxy.js index 055fd51..90de5e5 100644 --- a/config/proxy.js +++ b/config/proxy.js @@ -8,12 +8,12 @@ */ export default { dev: { - '/saasbase/': { + '/kitchbase/': { target: 'http://localhost:5006/', changeOrigin: true, secure: false, //关闭证书验证 pathRewrite: { - '/saasbase/': '', + '/kitchbase/': '', }, }, // Nginx发布的时候需要配置 diff --git a/src/global_data.js b/src/global_data.js index b5b7104..1769b44 100644 --- a/src/global_data.js +++ b/src/global_data.js @@ -6,5 +6,5 @@ export function getApiUrl() { } } export function getDataBaseUrl() { - return '/saasbase'; + return '/kitchbase'; } diff --git a/src/pages/database/goods/goodsbom/components/CreateBom.jsx b/src/pages/database/goods/goodsbom/components/CreateBom.jsx index 6600c04..7dab94e 100644 --- a/src/pages/database/goods/goodsbom/components/CreateBom.jsx +++ b/src/pages/database/goods/goodsbom/components/CreateBom.jsx @@ -1,5 +1,5 @@ import React, { useState,useRef,useEffect } from 'react'; -import { PlusOutlined} from '@ant-design/icons'; +import { PlusOutlined,CheckOutlined} from '@ant-design/icons'; import { Modal, Form, Input, Button, Select,Radio,message,Tag,Divider,Space } from 'antd'; import { AddBomType,getproductpage } from '../service'; import { @@ -14,6 +14,8 @@ const GoodsbomFrom = (props) => { const [form] = Form.useForm(); const [typename, settypename] = useState(''); const inputRef = useRef(null); + const [disaenumbled, setdisaenumbled] = useState('block'); + const [disnewd, setdisnewd] = useState('none'); const onNameChange=(event)=>{ settypename(event.target.value); } @@ -37,8 +39,8 @@ const GoodsbomFrom = (props) => { } useEffect(() => { - console.log("111111111") - console.log(props.defaultmatedata) + console.log("props.Bomdata",props.Bomdata) + console.log(props.goodsname) form.setFieldsValue({ bomName: props.goodsname, // bomType:1 @@ -97,21 +99,30 @@ const GoodsbomFrom = (props) => { .then((values) => { var check=true; var data=values; - console.log(dataSource) + console.log("values",values) if(checkvalue.length==0){ check=false; message.error("请选择商品属性") }else{ data.shuxing=checkvalue; } - if(dataSource.length==0){ - check=false; - message.error("请选择物料") - }else{ - data.mate=dataSource.map(x=>{return {batchingId:x.batchingId,dosage:x.dosage}}); + if(disnewd=="block"){ + if(dataSource.length==0){ + check=false; + message.error("请选择物料") + }else{ + data.mate=dataSource.map(x=>{return {batchingId:x.batchingId,dosage:x.dosage}}); + } } + if(check){ form.resetFields(); + if(disaenumbled=="block"){ + data.Type="check" + }else{ + data.Type="add" + } + data.bomType=1; props.onFinish(data); setDataSource([]) } @@ -151,7 +162,13 @@ const GoodsbomFrom = (props) => { }); setCheckvalue(updatedValues) } - + const handleChange = (value) => { + console.log(`selected ${value}`); + form.setFieldsValue({ + bomId: value, + // bomType:1 + }); + }; return ( { maskClosable={false} destroyOnClose > -
- - + *商品属性 + { + props.goodsAttriburteData == undefined ? '' :( + props.goodsAttriburteData.map((item, index) => { + return ( +
+
+ {item.attributeName} + + + { + item.goodsAttributeValueList.map((item, index)=>{ + return ( + {item.attributeValue} + ) + }) + } + + +
+
+ ); + }) + ) + } + + + + + + + + - + { @@ -212,34 +283,10 @@ const GoodsbomFrom = (props) => { 辅料配方 - + */} - *商品属性 - { - props.goodsAttriburteData == undefined ? '' :( - props.goodsAttriburteData.map((item, index) => { - return ( -
-
- {item.attributeName} - - - { - item.goodsAttributeValueList.map((item, index)=>{ - return ( - {item.attributeValue} - ) - }) - } - - -
-
- ); - }) - ) - } - *配方详情} columns={columns} rowKey="id" diff --git a/src/pages/database/goods/goodsbom/index.jsx b/src/pages/database/goods/goodsbom/index.jsx index ac365b5..46fbe55 100644 --- a/src/pages/database/goods/goodsbom/index.jsx +++ b/src/pages/database/goods/goodsbom/index.jsx @@ -39,33 +39,19 @@ const Advanced = (props) => { const [UpdateBomVisible, setUpdateBomVisible] = useState(false); const [BomBatchingVisible,setBomBatchingVisible]= useState(false); const [goodsTypeIdvalue, setgoodsTypeIdvalue] = useState(); - //设置 - const [tabStatus, seTabStatus] = useState({ - operationKey: props.location.query.tabStatus ? props.location.query.tabStatus : 'basis', - tabActiveKey: props.location.query.tabStatus ? props.location.query.tabStatus : 'basis', - }); + useEffect(() => { // if(!props.location?.query?.values){ // history.push({ // pathname: '/database/goods/newgoods', // }); // }else{ - SetCurrTabKey(tabStatus.tabActiveKey); + initGetbomType(); intBatching();//默认原料 //} - }, [tabStatus]) - const onTabChange = (key) => { - if (currentGoodsProp === 1) { - message.info('套餐不能设置配方'); - return; - } - seTabStatus({ operationKey: key, tabActiveKey: key }); - - //initGoodsType() - }; - + }, []) function initGetbomType(){ GetbomTypelist().then((r)=>{ var list = []; @@ -86,14 +72,6 @@ const Advanced = (props) => { function initTypeList(){ initGetbomType(); } - - const operationTabList = [ - { - key: 'goodsbom', - tab: '商品配方', - }, - - ]; const bomcolumns = [ { @@ -130,26 +108,26 @@ const Advanced = (props) => { dataIndex: 'option', valueType: 'option', render: (_, record) => [ - { - setUpdateBomVisible(true); - setBomId(record.bomId) - }} - > - 更新 - , - { - setBomBatchingVisible(true); - setBomId(record.bomId) - }} - > - 配方详情 - , + // { + // setUpdateBomVisible(true); + // setBomId(record.bomId) + // }} + // > + // 更新 + // , + // { + // setBomBatchingVisible(true); + // setBomId(record.bomId) + // }} + // > + // 配方详情 + // , { ], } ] - const contentList = { - goodsbom: ( - - { + history.push({ + pathname: '/database/goods/newgoods', + }); + }}>返回], + breadcrumb: {}, + }} + > + + { // }} > - 选择配方 + 关联配方 , ]} request={async (params) => { @@ -224,7 +207,20 @@ const Advanced = (props) => { }) setBomIds(nom) } - + getbomlist().then((r)=>{ + console.log("nom",nom) + if(nom.length>0){ + var da=[] + r.data.map(x=>{ + var dif=nom.find(p=>p==x.id); + if(!dif){ + da.push(x) + } + }) + } + console.log("da",da) + setBomdata(da) + }) return { data: msg.data.data, success: true, @@ -240,6 +236,7 @@ const Advanced = (props) => { /> { value.goodsId=props.location.query.values.id; @@ -265,30 +262,6 @@ const Advanced = (props) => { setHandleCreateoodsBomModalVisible(false); }} /> - {/* - */} - - - ), - }; - return ( - { - history.push({ - pathname: '/database/goods/newgoods', - }); - }}>返回], - breadcrumb: {}, - }} - title={props.location.query.isAdd ? '商品新增' : '详情'} - tabActiveKey={currTabKey} - onTabChange={onTabChange} - tabList={operationTabList} - > - - {contentList[tabStatus.operationKey]} ); }; diff --git a/src/pages/database/goods/goodsbom/service.js b/src/pages/database/goods/goodsbom/service.js index 51157d7..648ec6c 100644 --- a/src/pages/database/goods/goodsbom/service.js +++ b/src/pages/database/goods/goodsbom/service.js @@ -45,3 +45,8 @@ export async function GetGoodsBom(data) { // ...(options || {}), }); } + export async function getbomlist() { + return request(getDataBaseUrl()+'/api/bom/getbomlist', { + method: 'Get', + }); + } diff --git a/src/pages/database/goods/newgoods/index.jsx b/src/pages/database/goods/newgoods/index.jsx index 3b74a1e..5527c14 100644 --- a/src/pages/database/goods/newgoods/index.jsx +++ b/src/pages/database/goods/newgoods/index.jsx @@ -217,7 +217,7 @@ const GoodsManage = () => { type="primary" onClick={() => { history.push({ - pathname: '/database/goods/goodsInfo', + pathname: '/database/goods/goodsbom', query: { isAdd: false, values: record, From ecc73c9c5811cca228ceabcf86ffa48c1995eb28 Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Mon, 19 Feb 2024 17:44:22 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=95=86=E5=93=81=E9=85=8D=E6=96=B9?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.js | 7 + src/pages/database/goods/goodsInfo/index.jsx | 158 +----------------- .../goods/goodsbom/components/CreateBom.jsx | 108 ++++++++---- src/pages/database/goods/goodsbom/index.jsx | 78 +++++---- src/pages/database/goods/goodsbom/service.js | 5 + .../components/EditFrom.jsx | 4 +- .../components/From.jsx | 0 .../components/FromBatch.jsx | 0 .../components/goodstechnologymaken.jsx | 4 +- .../database/goods/goodstechnology/index.jsx | 50 ++++++ .../database/goods/goodstechnology/service.js | 0 .../database/goods/goodstechnology/style.less | 87 ++++++++++ src/pages/database/goods/newgoods/index.jsx | 2 +- 13 files changed, 280 insertions(+), 223 deletions(-) rename src/pages/database/goods/{goodsInfo => goodstechnology}/components/EditFrom.jsx (98%) rename src/pages/database/goods/{goodsInfo => goodstechnology}/components/From.jsx (100%) rename src/pages/database/goods/{goodsInfo => goodstechnology}/components/FromBatch.jsx (100%) rename src/pages/database/goods/{goodsInfo => goodstechnology}/components/goodstechnologymaken.jsx (99%) create mode 100644 src/pages/database/goods/goodstechnology/index.jsx create mode 100644 src/pages/database/goods/goodstechnology/service.js create mode 100644 src/pages/database/goods/goodstechnology/style.less diff --git a/config/routes.js b/config/routes.js index f9d4629..81023dc 100644 --- a/config/routes.js +++ b/config/routes.js @@ -165,6 +165,13 @@ export default [ component: './database/goods/goodsbom', access: 'k7', }, + { + name: '商品工艺', + icon: 'smile', + path: '/database/goods/goodstechnology', + component: './database/goods/goodstechnology', + access: 'k7', + }, ] }, ], diff --git a/src/pages/database/goods/goodsInfo/index.jsx b/src/pages/database/goods/goodsInfo/index.jsx index 3ddc746..e3a51f6 100644 --- a/src/pages/database/goods/goodsInfo/index.jsx +++ b/src/pages/database/goods/goodsInfo/index.jsx @@ -6,7 +6,7 @@ import classNames from 'classnames'; import ProTable from '@ant-design/pro-table'; import GoodsbomFrom from './components/GoodsbomFrom'; import CreateBom from './components/CreateBom'; -import GoodsTechnologyMaken from './components/goodstechnologymaken' +// import GoodsTechnologyMaken from '../goodstechnology/components/goodstechnologymaken' import UpdateBom from './components/UpdateBom' import BomBatching from './components/BomBatching' import { addGoods} from '../newgoods/service'; @@ -226,14 +226,14 @@ const Advanced = (props) => { key: 'basis', tab: '商品基础信息', }, - { - key: 'goodsbom', - tab: '商品配方', - }, - { - key: 'goodstechnologymaken', - tab: '商品工艺', - }, + // { + // key: 'goodsbom', + // tab: '商品配方', + // }, + // { + // key: 'goodstechnologymaken', + // tab: '商品工艺', + // }, ]; const onUpdateBomCancel=()=>{ setUpdateBomVisible(false); @@ -468,146 +468,6 @@ const Advanced = (props) => { ), - goodsbom: ( - - [ - , - , - ]} - request={async (params) => { - if (props.location.query.values.id == undefined || props.location.query.values.id == null) { - - } else { - params.GoodsId = props.location.query.values.id; - var total = 0; - const msg = await GetGoodsBom(params); - if(msg.data.data.length>0){ - var nom=msg.data.data.map(x=>{ - return x.bomId; - }) - setBomIds(nom) - } - - return { - data: msg.data.data, - success: true, - total: total, - }; - } - - }} - rowSelection={{ - onChange: (_, selectedRows) => setSelectedRows(selectedRows), - }} - - /> - { - console.log("value", value); - value['GoodsId'] = props.location.query.values.id; - var success = false; - success = await addgoodsbom(value); - if (success) { - handleGoodsBomModalVisible(false); - } - actionRef.current.reload(); - }} - onCancel={() => { - handleGoodsBomModalVisible(false); - }} - createModalVisible={setGoodsBomModalVisible} - /> - { - value.goodsId=props.location.query.values.id; - console.log(value) - await addgoodsbomattribute(value).then((r)=>{ - console.log(r) - if(r.data){ - message.success("添加成功") - setHandleCreateoodsBomModalVisible(false); - }else{ - message.error("添加失败") - } - actionRef.current.reload(); - }) - }} - goodsid={props.location.query.values?.id} - goodsname={props.location.query.values?.name} - goodsAttriburteData={goodsAttriburteData} - matedata={matedata} - bomtype={bomtype} - defaultmatedata={props.location.query.values?.defaultMate} - onCancel={() => { - setHandleCreateoodsBomModalVisible(false); - }} - /> - - - - - ), - goodstechnologymaken:( - - - - ), }; return ( { const inputRef = useRef(null); const [disaenumbled, setdisaenumbled] = useState('block'); const [disnewd, setdisnewd] = useState('none'); + const [arttue,setarttue]=useState(1); + const [arttuename,setarttuename]=useState(""); + const [arttuename11,setarttuename1]=useState(""); + const [recordCreatorProps,setrecordCreatorProps]=useState(false) const onNameChange=(event)=>{ settypename(event.target.value); } @@ -41,10 +45,12 @@ const GoodsbomFrom = (props) => { useEffect(() => { console.log("props.Bomdata",props.Bomdata) console.log(props.goodsname) - form.setFieldsValue({ - bomName: props.goodsname, - // bomType:1 - }); + setdisaenumbled('block') + setdisnewd("none") + // form.setFieldsValue({ + // bomName: props.goodsname, + // // bomType:1 + // }); if(props.defaultmatedata){ let soredata=[]; props.defaultmatedata.forEach((item,index)=>{ @@ -122,9 +128,13 @@ const GoodsbomFrom = (props) => { }else{ data.Type="add" } + data.goodsAttributeValue=arttuename data.bomType=1; + data.bomName=values.bomName+"("+arttuename11+")" props.onFinish(data); setDataSource([]) + setCheckvalue([]) + setarttuename("") } }) @@ -135,6 +145,7 @@ const GoodsbomFrom = (props) => { const onChangevalue=(data)=>{ const { name, value } = data.target; let names=""; + let names1=""; let updatedValues = [...checkvalue]; for (let index = 0; index < props.goodsAttriburteData.length; index++) { if (name === 'radiogroup'+index) { @@ -148,18 +159,20 @@ const GoodsbomFrom = (props) => { var bs=item.goodsAttributeValueList.find(x=>x.goodsAttributeValuId==updatedValues[index])?.attributeValue if(bs){ names=names+bs; + names1=names1+bs if(index< updatedValues.length-1){ names=names+"-" + names1=names1+"-" } } } }) - - - form.setFieldsValue({ - bomName: props.goodsname+"("+names+")" - }); + setarttuename1(names) + setarttuename(names1) + // form.setFieldsValue({ + // bomName: props.goodsname+"("+names+")" + // }); setCheckvalue(updatedValues) } const handleChange = (value) => { @@ -168,10 +181,44 @@ const GoodsbomFrom = (props) => { bomId: value, // bomType:1 }); + getbyidbomlist(value).then((r)=>{ + let soredata=[]; + r.data?.bomEntry?.forEach((item,index)=>{ + var data={ + id:index, + batchingId:item.batchingId, + dosage:item.bomQty + } + soredata.push(data) + }) + + //setEditableRowKeys(soredata.map((item) => item.id)) + setDataSource(soredata); + }) }; + const onchagetype= (e) => { + console.log(form) + setarttue(e.target.value) + setCheckvalue([]) + setDataSource([]) + if(e.target.value==1){//选择配方 + setrecordCreatorProps(false); + setdisaenumbled("block") + setdisnewd("none") + + }else{ + setrecordCreatorProps({ + newRecordType: 'dataSource', + record: () => ({ + id: Date.now(), + })}) + setdisaenumbled("none") + setdisnewd("block") + } + } return ( { props.goodsAttriburteData == undefined ? '' :( props.goodsAttriburteData.map((item, index) => { return ( -
+
{item.attributeName} @@ -210,10 +257,16 @@ const GoodsbomFrom = (props) => { ) }
- + + + 选择配方 + 新建配方 + + + + - + - + - + - +