@@ -165,6 +165,13 @@ export default [ | |||||
component: './database/goods/goodsbom', | component: './database/goods/goodsbom', | ||||
access: 'k7', | access: 'k7', | ||||
}, | }, | ||||
{ | |||||
name: '商品工艺', | |||||
icon: 'smile', | |||||
path: '/database/goods/goodstechnology', | |||||
component: './database/goods/goodstechnology', | |||||
access: 'k7', | |||||
}, | |||||
] | ] | ||||
}, | }, | ||||
], | ], | ||||
@@ -6,7 +6,7 @@ import classNames from 'classnames'; | |||||
import ProTable from '@ant-design/pro-table'; | import ProTable from '@ant-design/pro-table'; | ||||
import GoodsbomFrom from './components/GoodsbomFrom'; | import GoodsbomFrom from './components/GoodsbomFrom'; | ||||
import CreateBom from './components/CreateBom'; | import CreateBom from './components/CreateBom'; | ||||
import GoodsTechnologyMaken from './components/goodstechnologymaken' | |||||
// import GoodsTechnologyMaken from '../goodstechnology/components/goodstechnologymaken' | |||||
import UpdateBom from './components/UpdateBom' | import UpdateBom from './components/UpdateBom' | ||||
import BomBatching from './components/BomBatching' | import BomBatching from './components/BomBatching' | ||||
import { addGoods} from '../newgoods/service'; | import { addGoods} from '../newgoods/service'; | ||||
@@ -226,14 +226,14 @@ const Advanced = (props) => { | |||||
key: 'basis', | key: 'basis', | ||||
tab: '商品基础信息', | tab: '商品基础信息', | ||||
}, | }, | ||||
{ | |||||
key: 'goodsbom', | |||||
tab: '商品配方', | |||||
}, | |||||
{ | |||||
key: 'goodstechnologymaken', | |||||
tab: '商品工艺', | |||||
}, | |||||
// { | |||||
// key: 'goodsbom', | |||||
// tab: '商品配方', | |||||
// }, | |||||
// { | |||||
// key: 'goodstechnologymaken', | |||||
// tab: '商品工艺', | |||||
// }, | |||||
]; | ]; | ||||
const onUpdateBomCancel=()=>{ | const onUpdateBomCancel=()=>{ | ||||
setUpdateBomVisible(false); | setUpdateBomVisible(false); | ||||
@@ -468,146 +468,6 @@ const Advanced = (props) => { | |||||
</Form> | </Form> | ||||
</Card> | </Card> | ||||
), | ), | ||||
goodsbom: ( | |||||
<Card | |||||
title="商品配方" | |||||
style={{ | |||||
marginBottom: 24, | |||||
}} | |||||
bordered={false} | |||||
> | |||||
<ProTable | |||||
columns={bomcolumns} | |||||
actionRef={actionRef} | |||||
rowKey="id" | |||||
search={false} | |||||
toolBarRender={() => [ | |||||
<Button | |||||
type="primary" | |||||
key="primary" | |||||
onClick={() => { | |||||
if (props.location.query.values?.id == undefined || props.location.query.values?.id == null) { | |||||
message.info('请先添加商品基础信息!'); | |||||
} else { | |||||
getbomlist().then((r)=>{ | |||||
if(BomIds.length>0){ | |||||
var da=[] | |||||
r.data.map(x=>{ | |||||
var sd={} | |||||
var dif=BomIds.find(p=>p==x.id); | |||||
if(!dif){ | |||||
da.push(x) | |||||
} | |||||
}) | |||||
} | |||||
console.log("da",da) | |||||
setBomdata(da) | |||||
}) | |||||
handleGoodsBomModalVisible(true); | |||||
} | |||||
}} | |||||
> | |||||
<PlusOutlined /> 选择配方 | |||||
</Button>, | |||||
<Button | |||||
type="primary" | |||||
key="primary" | |||||
onClick={ async() => { | |||||
if (props.location.query.values?.id == undefined || props.location.query.values?.id == null) { | |||||
message.info('请先添加商品基础信息!'); | |||||
} else { | |||||
await getbygoodsidattribute(props.location.query.values.id).then((r)=>{ | |||||
setGoodsAttriburteData(r.data); | |||||
}) | |||||
setHandleCreateoodsBomModalVisible(true); | |||||
} | |||||
// | |||||
}} | |||||
> | |||||
<PlusOutlined /> 新建配方 | |||||
</Button>, | |||||
]} | |||||
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), | |||||
}} | |||||
/> | |||||
<GoodsbomFrom | |||||
Bomdata={Bomdata} | |||||
onFinish={async (value) => { | |||||
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} | |||||
/> | |||||
<CreateBom handleCreateoodsBomModalVisible={handleCreateoodsBomModalVisible} | |||||
bomTypeData={bomTypeData} | |||||
initTypeList={initTypeList} | |||||
onFinish={async (value) => { | |||||
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); | |||||
}} | |||||
/> | |||||
<UpdateBom onUpdateBomCancel={onUpdateBomCancel} bomtype={bomtype} BomId={BomId} UpdateBomVisible={UpdateBomVisible} bomTypeData={bomTypeData} onUpdateBomSave={onUpdateBomSave}/> | |||||
<BomBatching matedata={matedata} onBomBatchingCancel={onBomBatchingCancel} BomId={BomId} BomBatchingVisible={BomBatchingVisible} onBomBatchingFinish={onBomBatchingFinish}/> | |||||
</Card> | |||||
), | |||||
goodstechnologymaken:( | |||||
<Card title="商品工艺" style={{ marginBottom: 24}} bordered={false}> | |||||
<GoodsTechnologyMaken goodsid={props.location.query.values?.id}></GoodsTechnologyMaken> | |||||
</Card> | |||||
), | |||||
}; | }; | ||||
return ( | return ( | ||||
<PageContainer | <PageContainer | ||||
@@ -1,7 +1,7 @@ | |||||
import React, { useState,useRef,useEffect } from 'react'; | import React, { useState,useRef,useEffect } from 'react'; | ||||
import { PlusOutlined,CheckOutlined} 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 { Modal, Form, Input, Button, Select,Radio,message,Tag,Divider,Space } from 'antd'; | ||||
import { AddBomType,getproductpage } from '../service'; | |||||
import { AddBomType,getbyidbomlist } from '../service'; | |||||
import { | import { | ||||
EditableProTable, | EditableProTable, | ||||
ProTable | ProTable | ||||
@@ -16,6 +16,10 @@ const GoodsbomFrom = (props) => { | |||||
const inputRef = useRef(null); | const inputRef = useRef(null); | ||||
const [disaenumbled, setdisaenumbled] = useState('block'); | const [disaenumbled, setdisaenumbled] = useState('block'); | ||||
const [disnewd, setdisnewd] = useState('none'); | 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)=>{ | const onNameChange=(event)=>{ | ||||
settypename(event.target.value); | settypename(event.target.value); | ||||
} | } | ||||
@@ -41,10 +45,12 @@ const GoodsbomFrom = (props) => { | |||||
useEffect(() => { | useEffect(() => { | ||||
console.log("props.Bomdata",props.Bomdata) | console.log("props.Bomdata",props.Bomdata) | ||||
console.log(props.goodsname) | 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){ | if(props.defaultmatedata){ | ||||
let soredata=[]; | let soredata=[]; | ||||
props.defaultmatedata.forEach((item,index)=>{ | props.defaultmatedata.forEach((item,index)=>{ | ||||
@@ -122,9 +128,13 @@ const GoodsbomFrom = (props) => { | |||||
}else{ | }else{ | ||||
data.Type="add" | data.Type="add" | ||||
} | } | ||||
data.goodsAttributeValue=arttuename | |||||
data.bomType=1; | data.bomType=1; | ||||
data.bomName=values.bomName+"("+arttuename11+")" | |||||
props.onFinish(data); | props.onFinish(data); | ||||
setDataSource([]) | setDataSource([]) | ||||
setCheckvalue([]) | |||||
setarttuename("") | |||||
} | } | ||||
}) | }) | ||||
@@ -135,6 +145,7 @@ const GoodsbomFrom = (props) => { | |||||
const onChangevalue=(data)=>{ | const onChangevalue=(data)=>{ | ||||
const { name, value } = data.target; | const { name, value } = data.target; | ||||
let names=""; | let names=""; | ||||
let names1=""; | |||||
let updatedValues = [...checkvalue]; | let updatedValues = [...checkvalue]; | ||||
for (let index = 0; index < props.goodsAttriburteData.length; index++) { | for (let index = 0; index < props.goodsAttriburteData.length; index++) { | ||||
if (name === 'radiogroup'+index) { | if (name === 'radiogroup'+index) { | ||||
@@ -148,18 +159,20 @@ const GoodsbomFrom = (props) => { | |||||
var bs=item.goodsAttributeValueList.find(x=>x.goodsAttributeValuId==updatedValues[index])?.attributeValue | var bs=item.goodsAttributeValueList.find(x=>x.goodsAttributeValuId==updatedValues[index])?.attributeValue | ||||
if(bs){ | if(bs){ | ||||
names=names+bs; | names=names+bs; | ||||
names1=names1+bs | |||||
if(index< updatedValues.length-1){ | if(index< updatedValues.length-1){ | ||||
names=names+"-" | names=names+"-" | ||||
names1=names1+"-" | |||||
} | } | ||||
} | } | ||||
} | } | ||||
}) | }) | ||||
form.setFieldsValue({ | |||||
bomName: props.goodsname+"("+names+")" | |||||
}); | |||||
setarttuename1(names) | |||||
setarttuename(names1) | |||||
// form.setFieldsValue({ | |||||
// bomName: props.goodsname+"("+names+")" | |||||
// }); | |||||
setCheckvalue(updatedValues) | setCheckvalue(updatedValues) | ||||
} | } | ||||
const handleChange = (value) => { | const handleChange = (value) => { | ||||
@@ -168,10 +181,44 @@ const GoodsbomFrom = (props) => { | |||||
bomId: value, | bomId: value, | ||||
// bomType:1 | // 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 ( | return ( | ||||
<Modal | <Modal | ||||
title={'新建配方'} | |||||
title={'关联配方'} | |||||
width={1040} | width={1040} | ||||
visible={props.handleCreateoodsBomModalVisible} | visible={props.handleCreateoodsBomModalVisible} | ||||
bodyStyle={{ padding: '32px 40px 1px 48px' }} | bodyStyle={{ padding: '32px 40px 1px 48px' }} | ||||
@@ -189,7 +236,7 @@ const GoodsbomFrom = (props) => { | |||||
props.goodsAttriburteData == undefined ? '' :( | props.goodsAttriburteData == undefined ? '' :( | ||||
props.goodsAttriburteData.map((item, index) => { | props.goodsAttriburteData.map((item, index) => { | ||||
return ( | return ( | ||||
<div style={{marginLeft: 80}}> | |||||
<div style={{marginLeft: 80,marginBottom:10}}> | |||||
<div> | <div> | ||||
<span style={{marginRight: 10}}> <Tag color="blue">{item.attributeName}</Tag>:</span> | <span style={{marginRight: 10}}> <Tag color="blue">{item.attributeName}</Tag>:</span> | ||||
<span> | <span> | ||||
@@ -210,10 +257,16 @@ const GoodsbomFrom = (props) => { | |||||
) | ) | ||||
} | } | ||||
<Form layout="horizontal" preserve={false} form={form}> | <Form layout="horizontal" preserve={false} form={form}> | ||||
<Form.Item style={{display:disaenumbled}} name="bomId" label="选择配方" rules={[{ required: false, message: '配方信息' }]}> | |||||
<Form.Item name="type" label="功能类型"> | |||||
<Radio.Group name="type" defaultValue={1} value={arttue} onChange={onchagetype}> | |||||
<Radio.Button value={1}>选择配方</Radio.Button> | |||||
<Radio.Button value={0}>新建配方</Radio.Button> | |||||
</Radio.Group> | |||||
</Form.Item> | |||||
<Form.Item shouldUpdate style={{display:disaenumbled}} name="bomId" label="选择配方" rules={[{ required: false, message: '配方信息' }]}> | |||||
<Select | <Select | ||||
showSearch | showSearch | ||||
mode="multiple" | |||||
style={{width:'90%'}} | style={{width:'90%'}} | ||||
optionFilterProp="children" | optionFilterProp="children" | ||||
onChange={handleChange} | onChange={handleChange} | ||||
@@ -227,23 +280,13 @@ const GoodsbomFrom = (props) => { | |||||
); | ); | ||||
})} | })} | ||||
</Select> | </Select> | ||||
<Button | |||||
type="primary" | |||||
key="primary" onClick={ async() => { | |||||
setdisaenumbled("none") | |||||
setdisnewd("block") | |||||
}}><PlusOutlined />新建</Button> | |||||
</Form.Item> | </Form.Item> | ||||
<Form.Item style={{display:disnewd}} name="bomName" label="配方名称" rules={[{ required: false, message: '配方名称' }]}> | |||||
<Form.Item shouldUpdate style={{display:disnewd}} name="bomName" label="配方名称" rules={[{ required: false, message: '配方名称' }]}> | |||||
<Input style={{width:'87%'}} placeholder="请输入配方名称"/> | <Input style={{width:'87%'}} placeholder="请输入配方名称"/> | ||||
<Button | |||||
type="primary" | |||||
key="primary" onClick={ async() => { | |||||
setdisaenumbled("block") | |||||
setdisnewd("none") | |||||
}}><CheckOutlined />选择配方</Button> | |||||
</Form.Item> | </Form.Item> | ||||
<Form.Item style={{display:disnewd}} name="bomTypeList" rules={[{ required: false, message: '配方分类' }]} label="配方分类" > | |||||
<Form.Item shouldUpdate style={{display:disnewd}} name="bomTypeList" rules={[{ required: false, message: '配方分类' }]} label="配方分类" > | |||||
<Select | <Select | ||||
style={{width: '100%'}} | style={{width: '100%'}} | ||||
mode="tags" | mode="tags" | ||||
@@ -286,18 +329,13 @@ const GoodsbomFrom = (props) => { | |||||
</Form.Item> */} | </Form.Item> */} | ||||
</Form> | </Form> | ||||
<EditableProTable style={{display:disnewd}} | |||||
<EditableProTable | |||||
headerTitle={ <span><span style={{color:'red',marginRight: 3}}>*</span>配方详情</span>} | headerTitle={ <span><span style={{color:'red',marginRight: 3}}>*</span>配方详情</span>} | ||||
columns={columns} | columns={columns} | ||||
rowKey="id" | rowKey="id" | ||||
value={dataSource} | value={dataSource} | ||||
onChange={setDataSource} | onChange={setDataSource} | ||||
recordCreatorProps={{ | |||||
newRecordType: 'dataSource', | |||||
record: () => ({ | |||||
id: Date.now(), | |||||
}), | |||||
}} | |||||
recordCreatorProps={recordCreatorProps} | |||||
editable={{ | editable={{ | ||||
type: 'multiple', | type: 'multiple', | ||||
@@ -89,20 +89,29 @@ const Advanced = (props) => { | |||||
valueType: 'textarea', | valueType: 'textarea', | ||||
}, | }, | ||||
{ | { | ||||
title: '配方类型', | |||||
dataIndex: 'isMain', | |||||
hideInForm: true, | |||||
valueEnum: { | |||||
false: { | |||||
text: '辅料', | |||||
status: 'Processing', | |||||
}, | |||||
true: { | |||||
text: '主料', | |||||
status: 'Success', | |||||
}, | |||||
}, | |||||
title: '商品属性', | |||||
key: 'goodsAttributeValue', | |||||
dataIndex: 'goodsAttributeValue', | |||||
valueType: 'textarea', | |||||
fieldProps:{ | |||||
placeholder:'请输入属性,属性格式为:xx-xx' | |||||
} | |||||
}, | }, | ||||
// { | |||||
// title: '配方类型', | |||||
// dataIndex: 'isMain', | |||||
// hideInForm: true, | |||||
// valueEnum: { | |||||
// false: { | |||||
// text: '辅料', | |||||
// status: 'Processing', | |||||
// }, | |||||
// true: { | |||||
// text: '主料', | |||||
// status: 'Success', | |||||
// }, | |||||
// }, | |||||
// }, | |||||
{ | { | ||||
title: '操作', | title: '操作', | ||||
dataIndex: 'option', | dataIndex: 'option', | ||||
@@ -135,17 +144,18 @@ const Advanced = (props) => { | |||||
okText="是" | okText="是" | ||||
cancelText="否" | cancelText="否" | ||||
onConfirm={async () => { | onConfirm={async () => { | ||||
const hide = message.loading('正在删除'); | |||||
try { | try { | ||||
DelGoodsBom(record.id); | |||||
hide(); | |||||
message.success('删除成功,即将刷新'); | |||||
actionRef.current.reload(); | |||||
DelGoodsBom(record.id).then((r)=>{ | |||||
if(r.data){ | |||||
message.success('删除成功,即将刷新'); | |||||
actionRef.current.reload(); | |||||
}else{ | |||||
message.error('删除失败,请重试'); | |||||
actionRef.current.reload(); | |||||
} | |||||
}); | |||||
return true; | return true; | ||||
} catch (error) { | } catch (error) { | ||||
hide(); | |||||
message.error('删除失败,请重试'); | |||||
actionRef.current.reload(); | |||||
return false; | return false; | ||||
} | } | ||||
}} | }} | ||||
@@ -174,7 +184,7 @@ const Advanced = (props) => { | |||||
columns={bomcolumns} | columns={bomcolumns} | ||||
actionRef={actionRef} | actionRef={actionRef} | ||||
rowKey="id" | rowKey="id" | ||||
search={false} | |||||
search | |||||
toolBarRender={() => [ | toolBarRender={() => [ | ||||
<Button | <Button | ||||
type="primary" | type="primary" | ||||
@@ -209,17 +219,17 @@ const Advanced = (props) => { | |||||
} | } | ||||
getbomlist().then((r)=>{ | getbomlist().then((r)=>{ | ||||
console.log("nom",nom) | 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) | |||||
// 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(r.data) | |||||
}) | }) | ||||
return { | return { | ||||
data: msg.data.data, | data: msg.data.data, | ||||
@@ -247,7 +257,7 @@ const Advanced = (props) => { | |||||
message.success("添加成功") | message.success("添加成功") | ||||
setHandleCreateoodsBomModalVisible(false); | setHandleCreateoodsBomModalVisible(false); | ||||
}else{ | }else{ | ||||
message.error("添加失败") | |||||
message.error(r.errors) | |||||
} | } | ||||
actionRef.current.reload(); | actionRef.current.reload(); | ||||
}) | }) | ||||
@@ -50,3 +50,8 @@ export async function GetGoodsBom(data) { | |||||
method: 'Get', | method: 'Get', | ||||
}); | }); | ||||
} | } | ||||
export async function getbyidbomlist(bomId) { | |||||
return request(getDataBaseUrl()+'/api/bom/getbyidbomlist?bomId='+bomId, { | |||||
method: 'Get', | |||||
}); | |||||
} |
@@ -2,8 +2,8 @@ import React, { useState, useRef, useEffect } from 'react'; | |||||
import { Card, Select, Button, message, Checkbox, Modal } from 'antd'; | import { Card, Select, Button, message, Checkbox, Modal } from 'antd'; | ||||
import { ProCard } from '@ant-design/pro-Card'; | import { ProCard } from '@ant-design/pro-Card'; | ||||
import { DeleteOutlined, CloseOutlined } from '@ant-design/icons'; | import { DeleteOutlined, CloseOutlined } from '@ant-design/icons'; | ||||
import From from './From' | |||||
import FromBatch from './FromBatch' | |||||
import From from '../components/From' | |||||
import FromBatch from '../components/FromBatch' | |||||
import { useFetchData } from '@ant-design/pro-utils'; | import { useFetchData } from '@ant-design/pro-utils'; | ||||
const EditFrom = (props) => { | const EditFrom = (props) => { | ||||
const [fromdata, setfromdata] = useState([]) | const [fromdata, setfromdata] = useState([]) |
@@ -15,9 +15,9 @@ import { | |||||
AddGoodsTechnologyAction, | AddGoodsTechnologyAction, | ||||
UpdateGoodsTechnologyAction, | UpdateGoodsTechnologyAction, | ||||
deletebydevidegoodstechnologyaction | deletebydevidegoodstechnologyaction | ||||
} from '../service'; | |||||
} from '../../goodsInfo/service'; | |||||
import style from '../style.less' | import style from '../style.less' | ||||
import EditFrom from './EditFrom' | |||||
import EditFrom from '../components/EditFrom' | |||||
import useFetchData from '@ant-design/pro-descriptions/lib/useFetchData'; | import useFetchData from '@ant-design/pro-descriptions/lib/useFetchData'; | ||||
const goodstechnologymaken = (props) => { | const goodstechnologymaken = (props) => { | ||||
const [attrvalue, setAttrvalue] = useState(''); | const [attrvalue, setAttrvalue] = useState(''); |
@@ -0,0 +1,50 @@ | |||||
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 GoodsTechnologyMaken from './components/goodstechnologymaken' | |||||
import axios from 'axios'; | |||||
import { history } from 'umi'; | |||||
const { Step } = Steps; | |||||
const { Option, OptGroup } = Select; | |||||
const { TextArea } = Input; | |||||
const Advanced = (props) => { | |||||
//设置 | |||||
useEffect(() => { | |||||
// if(!props.location?.query?.values){ | |||||
// history.push({ | |||||
// pathname: '/database/goods/newgoods', | |||||
// }); | |||||
// }else{ | |||||
//SetCurrTabKey(tabStatus.tabActiveKey); | |||||
//initGoodsUnit(); | |||||
//initGoodsType(); | |||||
//initGetbomType(); | |||||
//intBatching();//默认原料 | |||||
//} | |||||
}, []) | |||||
return ( | |||||
<PageContainer | |||||
host header={{ | |||||
title: [<a key="back" | |||||
onClick={() => { | |||||
history.push({ | |||||
pathname: '/database/goods/newgoods', | |||||
}); | |||||
}}><ArrowLeftOutlined />返回</a>], | |||||
breadcrumb: {}, | |||||
}} | |||||
title={'商品工艺'} | |||||
> | |||||
<GoodsTechnologyMaken goodsid={props.location.query.values?.id}></GoodsTechnologyMaken> | |||||
</PageContainer> | |||||
); | |||||
}; | |||||
export default Advanced; |
@@ -0,0 +1,87 @@ | |||||
@import '~antd/es/style/themes/default.less'; | |||||
.main { | |||||
:global { | |||||
.ant-descriptions-row > td { | |||||
padding-bottom: 8px; | |||||
} | |||||
.ant-page-header-heading-extra { | |||||
flex-direction: column; | |||||
} | |||||
} | |||||
} | |||||
.headerList { | |||||
margin-bottom: 4px; | |||||
:global { | |||||
.ant-descriptions-row > td { | |||||
padding-bottom: 8px; | |||||
} | |||||
} | |||||
.stepDescription { | |||||
position: relative; | |||||
left: 38px; | |||||
padding-top: 8px; | |||||
font-size: 14px; | |||||
text-align: left; | |||||
> div { | |||||
margin-top: 8px; | |||||
margin-bottom: 4px; | |||||
} | |||||
} | |||||
} | |||||
.pageHeader { | |||||
:global { | |||||
.ant-page-header-heading-extra > * + * { | |||||
margin-left: 8px; | |||||
} | |||||
} | |||||
.moreInfo { | |||||
display: flex; | |||||
justify-content: space-between; | |||||
width: 200px; | |||||
} | |||||
} | |||||
@media screen and (max-width: @screen-sm) { | |||||
.stepDescription { | |||||
left: 8px; | |||||
} | |||||
.pageHeader { | |||||
:global { | |||||
.ant-pro-page-header-wrap-row { | |||||
flex-direction: column; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
.formlable{ | |||||
color: #3a3a3a; | |||||
border: 1px solid #bfbbbb; | |||||
width: 91px; | |||||
height: 32px; | |||||
text-align: center; | |||||
line-height: 30px; | |||||
margin-left: 15px; | |||||
} | |||||
.formlabletxt{ | |||||
color: #3a3a3a; | |||||
border: 1px solid #ebe1e1; | |||||
width: 170px; | |||||
height: 32px; | |||||
text-align: center; | |||||
line-height: 30px; | |||||
margin-left: 15px; | |||||
} | |||||
::-webkit-scrollbar{ | |||||
width:6px; | |||||
background-color: #fff; | |||||
} | |||||
::-webkit-scrollbar-thumb{ | |||||
background-color: #ddd; | |||||
border-radius: 3px; | |||||
width:6px; | |||||
} |
@@ -235,7 +235,7 @@ const GoodsManage = () => { | |||||
type="primary" | type="primary" | ||||
onClick={() => { | onClick={() => { | ||||
history.push({ | history.push({ | ||||
pathname: '/database/goods/goodsbom', | |||||
pathname: '/database/goods/goodstechnology', | |||||
query: { | query: { | ||||
isAdd: false, | isAdd: false, | ||||
values: record, | values: record, | ||||