@@ -130,9 +130,9 @@ const EditFrom = (props) => { | |||||
</div> | </div> | ||||
<div style={{ float: 'left',width: '360px'}}> | <div style={{ float: 'left',width: '360px'}}> | ||||
{ | { | ||||
x.isBatch ? | |||||
<From propsdata={x.propsdata} fromdata={fromdata} onSaveClick={onSaveClick} optiondata={x.optiondata} index={x.index} /> | |||||
: <FromBatch batchingdata={props.batchingdata} typeName={x.typeName} modalVisible={true} optiondata={x.optiondata} onSaveClick={onSaveClick} index={x.index} fromdata={fromdata}/> | |||||
// x.isBatch ? | |||||
<From propsdata={x.propsdata} fromdata={fromdata} batchingdata={props.batchingdata} onSaveClick={onSaveClick} optiondata={x.optiondata} index={x.index} /> | |||||
//: <FromBatch batchingdata={props.batchingdata} typeName={x.typeName} modalVisible={true} optiondata={x.optiondata} onSaveClick={onSaveClick} index={x.index} fromdata={fromdata}/> | |||||
} | } | ||||
</div> | </div> | ||||
@@ -114,6 +114,13 @@ const From = (props) => { | |||||
var op = va.map((p, index) => { | var op = va.map((p, index) => { | ||||
return { value: index, label: p.actionValueName } | return { value: index, label: p.actionValueName } | ||||
}) | }) | ||||
//判断是否物料 | |||||
if(x.technologyType==1){ | |||||
var sd= props.batchingdata.map(p=>{ | |||||
return { value: p.id, label: p.name } | |||||
}) | |||||
op=sd | |||||
} | |||||
return <> | return <> | ||||
<div className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</div> | <div className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</div> | ||||
<div style={{ display: 'block', float: 'left',marginBottom:5 }}><Select key={x.id} defaultValue={value} labelInValue options={op} style={{ width: 240 }} onChange={(value) => { handleselectChange(value, x.id, x.goddteid) }} /></div> | <div style={{ display: 'block', float: 'left',marginBottom:5 }}><Select key={x.id} defaultValue={value} labelInValue options={op} style={{ width: 240 }} onChange={(value) => { handleselectChange(value, x.id, x.goddteid) }} /></div> | ||||
@@ -189,14 +189,14 @@ const goodstechnologymaken = (props) => { | |||||
actionType: x.actionType, | actionType: x.actionType, | ||||
actionValue: x.actionValue, | actionValue: x.actionValue, | ||||
goodstechnologyId: x.technologyId, | goodstechnologyId: x.technologyId, | ||||
isBatch: x.isBatch, | |||||
technologyType: x.technologyType, | |||||
sort: x.sort, | sort: x.sort, | ||||
goddteid: item.id | goddteid: item.id | ||||
} | } | ||||
propsdatanew.push(sd) | propsdatanew.push(sd) | ||||
}) | }) | ||||
obj.propsdata = propsdatanew; | obj.propsdata = propsdatanew; | ||||
obj.isBatch = item.isBatch; | |||||
obj.technologyType = item.technologyType; | |||||
obj.typeName = item.stepName; | obj.typeName = item.stepName; | ||||
attr.push(obj) | attr.push(obj) | ||||
@@ -312,7 +312,7 @@ const goodstechnologymaken = (props) => { | |||||
item.id = x.id | item.id = x.id | ||||
item.stepName = x.stepName; | item.stepName = x.stepName; | ||||
item.chnologyId = x.chnologyId; | item.chnologyId = x.chnologyId; | ||||
item.isBatch = x.isBatch; | |||||
item.technologyType = x.technologyType; | |||||
if (UpdataStatus != "add") { | if (UpdataStatus != "add") { | ||||
item.sort = x.sort; | item.sort = x.sort; | ||||
} | } | ||||
@@ -249,7 +249,8 @@ const GoodsManage = () => { | |||||
} | } | ||||
if (info.file.status === 'done') { | if (info.file.status === 'done') { | ||||
setLoading(false); | setLoading(false); | ||||
message.success(`${info.file.name} file uploaded successfully`); | |||||
message.success(`${info.file.name}导入成功`); | |||||
actionRef.current.reload(); | |||||
} else if (info.file.status === 'error') { | } else if (info.file.status === 'error') { | ||||
setLoading(false); | setLoading(false); | ||||
message.error(`${info.file.name}:${info.file.response} `); | message.error(`${info.file.name}:${info.file.response} `); | ||||
@@ -29,9 +29,13 @@ const CreateAction = (props) => { | |||||
if(props.values.actionType=="select"){ | if(props.values.actionType=="select"){ | ||||
setLayoutType('ModalForm'); | setLayoutType('ModalForm'); | ||||
let ary=[]; | let ary=[]; | ||||
let op=JSON.parse(props.values.actionValue) | |||||
for (let t = 0; t < op.length; t++) { | |||||
ary.push({actionValueName:op[t].actionValueName}) | |||||
if(props.values.technologyType==0){ | |||||
let op=JSON.parse(props.values.actionValue) | |||||
for (let t = 0; t < op.length; t++) { | |||||
ary.push({actionValueName:op[t].actionValueName}) | |||||
} | |||||
} | } | ||||
setoptionitem(ary); | setoptionitem(ary); | ||||
}else{ | }else{ | ||||
@@ -48,7 +48,7 @@ const bomtechnology = (props) => { | |||||
dataIndex: 'name', | dataIndex: 'name', | ||||
valueType: 'textarea', | valueType: 'textarea', | ||||
ellipsis: true, | ellipsis: true, | ||||
search: true, | |||||
search: false, | |||||
}, | }, | ||||
{ | { | ||||
@@ -125,9 +125,7 @@ const bomtechnology = (props) => { | |||||
headerTitle="工艺" | headerTitle="工艺" | ||||
actionRef={actionRef} | actionRef={actionRef} | ||||
rowKey="id" | rowKey="id" | ||||
search={{ | |||||
labelWidth: 120, | |||||
}} | |||||
search={false} | |||||
columns={columns} | columns={columns} | ||||
toolBarRender={false} | toolBarRender={false} | ||||
dataSource={props.dataSource} | dataSource={props.dataSource} | ||||
@@ -287,11 +287,11 @@ const GoodsTypeManage = () => { | |||||
</FooterToolbar> | </FooterToolbar> | ||||
)} | )} | ||||
<Modal title="上传工艺模版" open={isModalOpen} footer={null} maskClosable={false} | <Modal title="上传工艺模版" open={isModalOpen} footer={null} maskClosable={false} | ||||
destroyOnClose onCancel={() => { setIsModalOpen(false) }}> | |||||
destroyOnClose onCancel={() => { setDeviceVesionData();setIsModalOpen(false) }}> | |||||
<div style={{marginBottom:10}}> | <div style={{marginBottom:10}}> | ||||
<span style={{marginRight:10}}>选择产品</span> | <span style={{marginRight:10}}>选择产品</span> | ||||
<Select style={{width: '60%'}} onChange={handleChange}> | <Select style={{width: '60%'}} onChange={handleChange}> | ||||
{DictData.map((item, index) => { | |||||
{DictData?.map((item, index) => { | |||||
return ( | return ( | ||||
<Select.Option index={index} value={item.id} key={item.id}> | <Select.Option index={index} value={item.id} key={item.id}> | ||||
{item.label} | {item.label} | ||||
@@ -303,7 +303,7 @@ const GoodsTypeManage = () => { | |||||
<div style={{marginBottom:10}}> | <div style={{marginBottom:10}}> | ||||
<span style={{marginRight:10}}>选择版本</span> | <span style={{marginRight:10}}>选择版本</span> | ||||
<Select style={{width: '60%'}} onChange={handleVisChange}> | <Select style={{width: '60%'}} onChange={handleVisChange}> | ||||
{DeviceVesionData.map((item, index) => { | |||||
{DeviceVesionData?.map((item, index) => { | |||||
return ( | return ( | ||||
<Select.Option index={index} value={item.id} key={item.id}> | <Select.Option index={index} value={item.id} key={item.id}> | ||||
{item.label} | {item.label} | ||||