Browse Source

商品工艺调整

master
zhaoy 8 months ago
parent
commit
962b28a9a9
7 changed files with 27 additions and 17 deletions
  1. +3
    -3
      src/pages/database/goods/goodstechnology/components/EditFrom.jsx
  2. +7
    -0
      src/pages/database/goods/goodstechnology/components/From.jsx
  3. +3
    -3
      src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx
  4. +2
    -1
      src/pages/database/goods/newgoods/index.jsx
  5. +7
    -3
      src/pages/device/technology/components/CreateAction.jsx
  6. +2
    -4
      src/pages/device/technology/components/technologylist.jsx
  7. +3
    -3
      src/pages/device/technology/index.jsx

+ 3
- 3
src/pages/database/goods/goodstechnology/components/EditFrom.jsx View File

@@ -130,9 +130,9 @@ const EditFrom = (props) => {
</div>
<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>



+ 7
- 0
src/pages/database/goods/goodstechnology/components/From.jsx View File

@@ -114,6 +114,13 @@ const From = (props) => {
var op = va.map((p, index) => {
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 <>
<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>


+ 3
- 3
src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx View File

@@ -189,14 +189,14 @@ const goodstechnologymaken = (props) => {
actionType: x.actionType,
actionValue: x.actionValue,
goodstechnologyId: x.technologyId,
isBatch: x.isBatch,
technologyType: x.technologyType,
sort: x.sort,
goddteid: item.id
}
propsdatanew.push(sd)
})
obj.propsdata = propsdatanew;
obj.isBatch = item.isBatch;
obj.technologyType = item.technologyType;
obj.typeName = item.stepName;

attr.push(obj)
@@ -312,7 +312,7 @@ const goodstechnologymaken = (props) => {
item.id = x.id
item.stepName = x.stepName;
item.chnologyId = x.chnologyId;
item.isBatch = x.isBatch;
item.technologyType = x.technologyType;
if (UpdataStatus != "add") {
item.sort = x.sort;
}


+ 2
- 1
src/pages/database/goods/newgoods/index.jsx View File

@@ -249,7 +249,8 @@ const GoodsManage = () => {
}
if (info.file.status === 'done') {
setLoading(false);
message.success(`${info.file.name} file uploaded successfully`);
message.success(`${info.file.name}导入成功`);
actionRef.current.reload();
} else if (info.file.status === 'error') {
setLoading(false);
message.error(`${info.file.name}:${info.file.response} `);


+ 7
- 3
src/pages/device/technology/components/CreateAction.jsx View File

@@ -29,9 +29,13 @@ const CreateAction = (props) => {
if(props.values.actionType=="select"){
setLayoutType('ModalForm');
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);
}else{


+ 2
- 4
src/pages/device/technology/components/technologylist.jsx View File

@@ -48,7 +48,7 @@ const bomtechnology = (props) => {
dataIndex: 'name',
valueType: 'textarea',
ellipsis: true,
search: true,
search: false,
},
{
@@ -125,9 +125,7 @@ const bomtechnology = (props) => {
headerTitle="工艺"
actionRef={actionRef}
rowKey="id"
search={{
labelWidth: 120,
}}
search={false}
columns={columns}
toolBarRender={false}
dataSource={props.dataSource}


+ 3
- 3
src/pages/device/technology/index.jsx View File

@@ -287,11 +287,11 @@ const GoodsTypeManage = () => {
</FooterToolbar>
)}
<Modal title="上传工艺模版" open={isModalOpen} footer={null} maskClosable={false}
destroyOnClose onCancel={() => { setIsModalOpen(false) }}>
destroyOnClose onCancel={() => { setDeviceVesionData();setIsModalOpen(false) }}>
<div style={{marginBottom:10}}>
<span style={{marginRight:10}}>选择产品</span>
<Select style={{width: '60%'}} onChange={handleChange}>
{DictData.map((item, index) => {
{DictData?.map((item, index) => {
return (
<Select.Option index={index} value={item.id} key={item.id}>
{item.label}
@@ -303,7 +303,7 @@ const GoodsTypeManage = () => {
<div style={{marginBottom:10}}>
<span style={{marginRight:10}}>选择版本</span>
<Select style={{width: '60%'}} onChange={handleVisChange}>
{DeviceVesionData.map((item, index) => {
{DeviceVesionData?.map((item, index) => {
return (
<Select.Option index={index} value={item.id} key={item.id}>
{item.label}


Loading…
Cancel
Save