@@ -50,7 +50,6 @@ const goodstechnologymaken = (props) => { | |||||
interdata() | interdata() | ||||
}, []) | }, []) | ||||
const interdata = () => { | const interdata = () => { | ||||
console.log("props.goodsid",props.goodsid) | |||||
if(props.goodsid!=undefined){ | if(props.goodsid!=undefined){ | ||||
getbyidgoods(props.goodsid).then((res) => { | getbyidgoods(props.goodsid).then((res) => { | ||||
if (res.succeeded) { | if (res.succeeded) { | ||||
@@ -125,8 +124,6 @@ const goodstechnologymaken = (props) => { | |||||
}) | }) | ||||
} | } | ||||
const onChangevalue = (e) => { | const onChangevalue = (e) => { | ||||
console.log(checkvalue) | |||||
const { name, value } = e.target; | const { name, value } = e.target; | ||||
let names = ""; | let names = ""; | ||||
let updatedValues = [...checkvalue]; | let updatedValues = [...checkvalue]; | ||||
@@ -169,21 +166,27 @@ const goodstechnologymaken = (props) => { | |||||
setdefaultValue(item.deviceId) | setdefaultValue(item.deviceId) | ||||
setddevideId(item.deviceId) | setddevideId(item.deviceId) | ||||
GetGoodsTechnologyvalue(item.deviceId,"edit",item) | GetGoodsTechnologyvalue(item.deviceId,"edit",item) | ||||
var atrid=[] | |||||
var gg=goodsinfo.goodsAttributeList.map(x => { | var gg=goodsinfo.goodsAttributeList.map(x => { | ||||
x.goodsAttributeValueList.forEach(t=>{ | x.goodsAttributeValueList.forEach(t=>{ | ||||
var da=item.goodsAttributeId.split(',') | var da=item.goodsAttributeId.split(',') | ||||
var df=da.find(g=>g==t.goodsAttributeValuId) | var df=da.find(g=>g==t.goodsAttributeValuId) | ||||
if(df){ | if(df){ | ||||
t.check=true; | t.check=true; | ||||
x.defalutvalue=t.goodsAttributeValuId | x.defalutvalue=t.goodsAttributeValuId | ||||
atrid.push(t.goodsAttributeValuId) | |||||
} | } | ||||
}) | }) | ||||
return x | return x | ||||
}) | }) | ||||
const nextItems = {...goodsinfo,goodsAttributeList:gg}; | const nextItems = {...goodsinfo,goodsAttributeList:gg}; | ||||
var goodsinfos=nextItems | var goodsinfos=nextItems | ||||
console.log("goods",goodsinfos) | |||||
setCheckvalue(atrid) | |||||
console.log("checkvalue",atrid) | |||||
setCheckvalue(atrid) | |||||
setGoodsinfo(goodsinfos) | setGoodsinfo(goodsinfos) | ||||
//console.log("attr", attr) | //console.log("attr", attr) | ||||
@@ -229,20 +232,11 @@ const goodstechnologymaken = (props) => { | |||||
} | } | ||||
const GetGoodsTechnologyvalue=(value,va,item)=>{ | const GetGoodsTechnologyvalue=(value,va,item)=>{ | ||||
let godata=[] | let godata=[] | ||||
console.log("va",va) | |||||
console.log("value",value) | |||||
console.log("item",item) | |||||
console.log("goodsinfo.goodsAttributeList",goodsinfo.goodsAttributeList) | |||||
if(item){ | if(item){ | ||||
GetwarehousetemplateData(item.deviceId) | GetwarehousetemplateData(item.deviceId) | ||||
setWarehousrTemplateId(item.warehousrTemplateId) | setWarehousrTemplateId(item.warehousrTemplateId) | ||||
setdefaulttemplateValue(item.warehousrTemplateId) | setdefaulttemplateValue(item.warehousrTemplateId) | ||||
} | } | ||||
GetGoodsTechnology(value).then((r)=>{ | GetGoodsTechnology(value).then((r)=>{ | ||||
if (r.data.length > 0) { | if (r.data.length > 0) { | ||||
var Technologyacton=[]; | var Technologyacton=[]; | ||||
@@ -255,7 +249,6 @@ const goodstechnologymaken = (props) => { | |||||
} | } | ||||
return { value: x.id, label: x.name } | return { value: x.id, label: x.name } | ||||
}) | }) | ||||
console.log("godata",godata) | |||||
setTechnologyattralldata(Technologyacton) | setTechnologyattralldata(Technologyacton) | ||||
setgoodstechnologydata(godata) | setgoodstechnologydata(godata) | ||||
}else{ | }else{ | ||||
@@ -274,8 +267,6 @@ const goodstechnologymaken = (props) => { | |||||
DeleteGoodsTechnologyAction(item.id).then((res) => { | DeleteGoodsTechnologyAction(item.id).then((res) => { | ||||
if (res.data) { | if (res.data) { | ||||
message.success("删除成功") | message.success("删除成功") | ||||
console.log(fromdata) | |||||
//formRef?.current?.resetFields(...props.technologyattrdata) | |||||
updadata() | updadata() | ||||
} else { | } else { | ||||
message.error("删除失败") | message.error("删除失败") | ||||
@@ -283,12 +274,37 @@ const goodstechnologymaken = (props) => { | |||||
}) | }) | ||||
} | } | ||||
//删除设备工艺 | //删除设备工艺 | ||||
const onClickDevicedele = (e, devideId, action) => { | |||||
deletebydevidegoodstechnologyaction({ devideId: devideId, goodsId: props.goodsid }).then((res) => { | |||||
const onClickDevicedele = (e, devideId,goodsAttributeId, action) => { | |||||
if(goodstechnologydata.length>0){ | |||||
setgoodstechnologydata([]) | |||||
} | |||||
if(fromdata.length>0){ | |||||
setfromdata([]) | |||||
} | |||||
if(defaultValue==devideId){ | |||||
setdefaultValue('') | |||||
setcwdis("none") | |||||
setdefaulttemplateValue() | |||||
} | |||||
if(checkvalue.find(x=>goodsAttributeId.includes(x))){ | |||||
var gg=goodsinfo.goodsAttributeList.map(x => { | |||||
x.goodsAttributeValueList.forEach(t=>{ | |||||
t.check=false; | |||||
x.defalutvalue="" | |||||
setCheckvalue([]) | |||||
}) | |||||
return x | |||||
}) | |||||
const nextItems = {...goodsinfo,goodsAttributeList:gg}; | |||||
var goodsinfos=nextItems | |||||
setGoodsinfo(goodsinfos) | |||||
setCheckvalue([]) | |||||
} | |||||
//console.log(goodstechnologydata) | |||||
deletebydevidegoodstechnologyaction({ devideId: devideId, goodsId: props.goodsid,goodsAttributeId:goodsAttributeId }).then((res) => { | |||||
if (res.data) { | if (res.data) { | ||||
message.success("删除成功") | message.success("删除成功") | ||||
setgoodstechnolog([]) | setgoodstechnolog([]) | ||||
//formRef?.current?.resetFields(...props.technologyattrdata) | |||||
updadata() | updadata() | ||||
} else { | } else { | ||||
message.error("删除失败") | message.error("删除失败") | ||||
@@ -316,14 +332,10 @@ const goodstechnologymaken = (props) => { | |||||
const GetwarehousetemplateData=(deviceId)=>{ | const GetwarehousetemplateData=(deviceId)=>{ | ||||
setcwdis('block') | setcwdis('block') | ||||
GetwarehousetemplateList(deviceId).then((r)=>{ | GetwarehousetemplateList(deviceId).then((r)=>{ | ||||
// var data= r.data.map(x=>{ | |||||
// return {id:x.id,label:x.templateName} | |||||
// }) | |||||
setwarehousetemplatedata(r.data) | setwarehousetemplatedata(r.data) | ||||
}) | }) | ||||
} | } | ||||
const handleChange = (value) => { | const handleChange = (value) => { | ||||
console.log("进来了", value) | |||||
setdefaulttemplateValue("") | setdefaulttemplateValue("") | ||||
if(value){ | if(value){ | ||||
setdefaultValue(value) | setdefaultValue(value) | ||||
@@ -335,30 +347,14 @@ const goodstechnologymaken = (props) => { | |||||
setdefaultValue("") | setdefaultValue("") | ||||
setddevideId('') | setddevideId('') | ||||
} | } | ||||
// let sd = DeviceTechnologydata.find(x => x.id == value); | |||||
// if (sd) { | |||||
// if (sd.goodsTechnologyInfo.length > 0) { | |||||
// godata = sd.goodsTechnologyInfo.map(x => { | |||||
// return { value: x.deviceTechnologyId, label: x.name } | |||||
// }) | |||||
// setgoodstechnologydata(godata) | |||||
// } | |||||
// setfromdata([]) | |||||
// } | |||||
// console.log("godata", godata) | |||||
// setgoodstechnologydata(godata) | |||||
} | } | ||||
const onUpdataStatus = (val) => { | const onUpdataStatus = (val) => { | ||||
setUpdataStatus(val) | setUpdataStatus(val) | ||||
} | } | ||||
const onSaveClick = (val) => { | const onSaveClick = (val) => { | ||||
console.log("222",val) | |||||
setfromdata(val) | setfromdata(val) | ||||
} | } | ||||
const onSubmitSaveClick = () => { | const onSubmitSaveClick = () => { | ||||
console.log("保存的数据", fromdata) | |||||
let check = true; | let check = true; | ||||
var data = [] | var data = [] | ||||
var msg="没有要保存的数据或数据格式不正确"; | var msg="没有要保存的数据或数据格式不正确"; | ||||
@@ -393,22 +389,22 @@ const goodstechnologymaken = (props) => { | |||||
} | } | ||||
}) | }) | ||||
// var vacheck=x.optiondata.find(x=>x.actionValue=='') | |||||
item.goodsId = props.goodsid | item.goodsId = props.goodsid | ||||
item.warehousrTemplateId=WarehousrTemplateId; | item.warehousrTemplateId=WarehousrTemplateId; | ||||
item.goodsAttributeId = checkvalue.join(',') | item.goodsAttributeId = checkvalue.join(',') | ||||
if (x.chnologyId == "") { | if (x.chnologyId == "") { | ||||
check = false; | check = false; | ||||
} | } | ||||
if(item.warehousrTemplateId==undefined || item.warehousrTemplateId==""){ | |||||
check = false; | |||||
msg="请选择仓位模板" | |||||
} | |||||
if(item.goodsAttributeId==undefined || item.goodsAttributeId==""){ | |||||
check = false; | |||||
msg="请选择商品属性" | |||||
} | |||||
data.push(item) | data.push(item) | ||||
}) | }) | ||||
if(WarehousrTemplateId==""){ | |||||
check = false; | |||||
msg="请选择仓位模板" | |||||
} | |||||
if (data.length > 0 && check) { | if (data.length > 0 && check) { | ||||
if (UpdataStatus == "add") { | if (UpdataStatus == "add") { | ||||
AddGoodsTechnologyAction(data).then((res) => { | AddGoodsTechnologyAction(data).then((res) => { | ||||
@@ -433,6 +429,17 @@ const goodstechnologymaken = (props) => { | |||||
}) | }) | ||||
} | } | ||||
var gg=goodsinfo.goodsAttributeList.map(x => { | |||||
x.goodsAttributeValueList.forEach(t=>{ | |||||
t.check=false; | |||||
x.defalutvalue="" | |||||
}) | |||||
return x | |||||
}) | |||||
const nextItems = {...goodsinfo,goodsAttributeList:gg}; | |||||
var goodsinfos=nextItems | |||||
setGoodsinfo(goodsinfos) | |||||
setCheckvalue([]) | |||||
setUpdataStatus("view") | setUpdataStatus("view") | ||||
setdisabled(false) | setdisabled(false) | ||||
setopreaction("add") | setopreaction("add") | ||||
@@ -557,7 +564,7 @@ const goodstechnologymaken = (props) => { | |||||
<Popconfirm | <Popconfirm | ||||
title="确认删除吗?" | title="确认删除吗?" | ||||
description="确认删除吗" | description="确认删除吗" | ||||
onConfirm={(e) => { onClickDevicedele(e, x.deviceId) }} | |||||
onConfirm={(e) => { onClickDevicedele(e, x.deviceId,x.goodsAttributeId) }} | |||||
onCancel={cancel} | onCancel={cancel} | ||||
okText="确定" | okText="确定" | ||||
cancelText="取消" | cancelText="取消" | ||||
@@ -203,14 +203,16 @@ const handleRemove = async (selectedRows) => { | |||||
setCurrentRow(record); | setCurrentRow(record); | ||||
const tempUploadImage = JSON.parse(JSON.stringify([ | const tempUploadImage = JSON.parse(JSON.stringify([ | ||||
{ | { | ||||
uid: '-1', | |||||
name: 'image.png', | |||||
status: 'done', | |||||
url: '', | url: '', | ||||
}, | }, | ||||
])); | ])); | ||||
tempUploadImage[0].url=record.productUrl; | |||||
setFileList(tempUploadImage); | |||||
if(record.productUrl){ | |||||
tempUploadImage[0].url=record.productUrl; | |||||
setFileList(tempUploadImage); | |||||
}else{ | |||||
setFileList([]) | |||||
} | |||||
// form.setFielsValue(record) | // form.setFielsValue(record) | ||||
}} > 更新</a>, | }} > 更新</a>, | ||||
<Popconfirm | <Popconfirm | ||||
@@ -1,7 +1,8 @@ | |||||
import React, { useState,useEffect } from 'react'; | import React, { useState,useEffect } from 'react'; | ||||
import { CloseOutlined} from '@ant-design/icons'; | |||||
import { Modal, Form, Input, Button, Select,Radio,InputNumber, message,Space } from 'antd'; | |||||
import { CloseOutlined,QuestionCircleOutlined} from '@ant-design/icons'; | |||||
import { Modal, Form, Input, Button, Select,Radio,InputNumber, message,Space,Tooltip } from 'antd'; | |||||
import unitoption from '../unit' | import unitoption from '../unit' | ||||
import useFetchData from '@ant-design/pro-descriptions/lib/useFetchData'; | |||||
const CreateForm = (props) => { | const CreateForm = (props) => { | ||||
const { Option, OptGroup } = Select; | const { Option, OptGroup } = Select; | ||||
@@ -14,6 +15,7 @@ const CreateForm = (props) => { | |||||
const [displaylength,setdisplaylength]=useState('none'); | const [displaylength,setdisplaylength]=useState('none'); | ||||
const [displaytxtjson,setdisplaytxtjson]=useState('none'); | const [displaytxtjson,setdisplaytxtjson]=useState('none'); | ||||
const [disabledname,setdisabledname]=useState('false'); | const [disabledname,setdisabledname]=useState('false'); | ||||
const [displayleventType,setdisplayleventType]=useState('none'); | |||||
const [minnumber, setminnumber] = useState(0); | const [minnumber, setminnumber] = useState(0); | ||||
const [maxnumber, setmaxnumber] = useState(1); | const [maxnumber, setmaxnumber] = useState(1); | ||||
const [ReadWrite, setReadWrite] = useState(0); | const [ReadWrite, setReadWrite] = useState(0); | ||||
@@ -106,7 +108,6 @@ const CreateForm = (props) => { | |||||
} | } | ||||
},[props?.values]) | },[props?.values]) | ||||
const onchagetype=(e)=>{ | const onchagetype=(e)=>{ | ||||
console.log(e) | |||||
setarttue(e.target.value) | setarttue(e.target.value) | ||||
form.setFieldsValue({ | form.setFieldsValue({ | ||||
type: e.target.value | type: e.target.value | ||||
@@ -117,12 +118,23 @@ const onchagetype=(e)=>{ | |||||
setdisplaybool('none') | setdisplaybool('none') | ||||
setdisaenumbled('none') | setdisaenumbled('none') | ||||
setdisanumbled('none') | setdisanumbled('none') | ||||
setdisplayleventType("none") | |||||
}else if(e.target.value==0){ | }else if(e.target.value==0){ | ||||
setdisplay("block") | setdisplay("block") | ||||
setdisplayleventType("none") | |||||
form.setFieldsValue({ | form.setFieldsValue({ | ||||
dataType: "digit" | dataType: "digit" | ||||
}); | }); | ||||
setdisanumbled("block") | setdisanumbled("block") | ||||
}else if(e.target.value==2){ | |||||
setdisplayleventType("block") | |||||
setdisplay("none") | |||||
setdisanumbled('none') | |||||
setdisplaylength('none') | |||||
setdisplaybool('none') | |||||
form.setFieldsValue({ | |||||
eventType: 0 | |||||
}); | |||||
} | } | ||||
} | } | ||||
const onChangemix=(value)=>{ | const onChangemix=(value)=>{ | ||||
@@ -187,6 +199,11 @@ const onChangeboolLabel0=(e)=>{ | |||||
const onChangeboolLabel1=(e)=>{ | const onChangeboolLabel1=(e)=>{ | ||||
setboolLabel1(e.target.value) | setboolLabel1(e.target.value) | ||||
} | |||||
const onChangeeventType=(e)=>{ | |||||
form.setFieldsValue({ | |||||
eventType: e.target.value | |||||
}); | |||||
} | } | ||||
return ( | return ( | ||||
<Modal | <Modal | ||||
@@ -212,8 +229,7 @@ const onChangeboolLabel1=(e)=>{ | |||||
boolLabel: boolLabel0+":"+boolLabel1 | boolLabel: boolLabel0+":"+boolLabel1 | ||||
}); | }); | ||||
} | } | ||||
console.log(form.getFieldsValue()) | |||||
console.log("form.getFieldsValue()",form.getFieldsValue()) | |||||
props?.onFinish(form.getFieldsValue()) | props?.onFinish(form.getFieldsValue()) | ||||
}} | }} | ||||
> | > | ||||
@@ -235,6 +251,7 @@ const onChangeboolLabel1=(e)=>{ | |||||
<Radio.Group name="type" defaultValue={0} value={arttue} onChange={onchagetype} disabled={disabled}> | <Radio.Group name="type" defaultValue={0} value={arttue} onChange={onchagetype} disabled={disabled}> | ||||
<Radio.Button value={0}>属性</Radio.Button> | <Radio.Button value={0}>属性</Radio.Button> | ||||
<Radio.Button value={1}>服务</Radio.Button> | <Radio.Button value={1}>服务</Radio.Button> | ||||
<Radio.Button value={2}>事件</Radio.Button> | |||||
</Radio.Group> | </Radio.Group> | ||||
</Form.Item> | </Form.Item> | ||||
@@ -303,6 +320,13 @@ const onChangeboolLabel1=(e)=>{ | |||||
<Input placeholder="10240" defaultValue="10240" addonAfter="字节" /> | <Input placeholder="10240" defaultValue="10240" addonAfter="字节" /> | ||||
</Form.Item> | </Form.Item> | ||||
<Form.Item style={{display:displayleventType}} name="eventType" label={<span>事件类型<Tooltip placement="top" title="“信息”是设备上报的一般性通知,如完成某项任务等。“告警”和“故障”是设备运行过程中主动上报的突发或异常情况,优先级高。不同的事件类型将用于统计分析。"><QuestionCircleOutlined /></Tooltip></span>} rules={[{ required: false }]}> | |||||
<Radio.Group defaultValue={0} onChange={onChangeeventType} value={0}> | |||||
<Radio value={0}>信息</Radio> | |||||
<Radio value={1}>告警</Radio> | |||||
<Radio value={2}>故障</Radio> | |||||
</Radio.Group> | |||||
</Form.Item> | |||||
<Form.Item style={{display:displaytxtjson}} name="dataJson" label="数组字符串" rules={[{ required: false }]}> | <Form.Item style={{display:displaytxtjson}} name="dataJson" label="数组字符串" rules={[{ required: false }]}> | ||||
<TextArea | <TextArea | ||||
placeholder="数据格式:[data1:{value1:'1'},{value2:'2'},data2:{value1:'1'},{value2:'2'}]" | placeholder="数据格式:[data1:{value1:'1'},{value2:'2'},data2:{value1:'1'},{value2:'2'}]" | ||||
@@ -118,7 +118,7 @@ const bomtechnology = (props) => { | |||||
}, [tabStatus]) | }, [tabStatus]) | ||||
const Btn = (record) => { | const Btn = (record) => { | ||||
var arr = []; | var arr = []; | ||||
if (record.type == 1) { | |||||
if (record.type == 1 || record.type == 2) { | |||||
arr.push(<a | arr.push(<a | ||||
key="config" | key="config" | ||||
onClick={() => { | onClick={() => { | ||||
@@ -136,7 +136,6 @@ const bomtechnology = (props) => { | |||||
onClick={() => { | onClick={() => { | ||||
handleModalVisible(true); | handleModalVisible(true); | ||||
setCurrentRow(record); | setCurrentRow(record); | ||||
actionRef.current?.reloadAndRest?.(); | |||||
}} | }} | ||||
> | > | ||||
更新 | 更新 | ||||
@@ -152,7 +151,7 @@ const bomtechnology = (props) => { | |||||
cancelText="否" | cancelText="否" | ||||
onConfirm={() => { | onConfirm={() => { | ||||
handleRemove([record.id]); | handleRemove([record.id]); | ||||
actionRef.current?.reloadAndRest(); | |||||
}} | }} | ||||
onCancel={() => {}} | onCancel={() => {}} | ||||
> | > | ||||
@@ -201,8 +200,12 @@ const bomtechnology = (props) => { | |||||
1: { | 1: { | ||||
text: '服务', | text: '服务', | ||||
}, | }, | ||||
2: { | |||||
text: '事件', | |||||
}, | |||||
}, | }, | ||||
}, | }, | ||||
// { | // { | ||||
// title: '版本', | // title: '版本', | ||||
// dataIndex: 'vesion', | // dataIndex: 'vesion', | ||||
@@ -415,7 +418,7 @@ const handleAdd = async (fields) => { | |||||
await addgoodstechnology(JSON.stringify(fields)).then((r) => { | await addgoodstechnology(JSON.stringify(fields)).then((r) => { | ||||
if (r.data) { | if (r.data) { | ||||
message.success('添加成功'); | message.success('添加成功'); | ||||
var params={productId:props.location.query.values.productId,deviceTypeKey:props.location.query.values.productId,current:1,pageSize:10} | |||||
var params={productId:props.location.query.values.productId,productVesionId:props.location.query.values.productId,current:1,pageSize:10} | |||||
LoadfunData(params) | LoadfunData(params) | ||||
handleModalVisible(false); | handleModalVisible(false); | ||||
if (actionRef.current) { | if (actionRef.current) { | ||||
@@ -440,8 +443,10 @@ const handleRemove = async (ids) => { | |||||
deletegoodstechnology(ids).then((r) => { | deletegoodstechnology(ids).then((r) => { | ||||
if (r.data) { | if (r.data) { | ||||
message.success('删除成功'); | message.success('删除成功'); | ||||
var params={productId:props.location.query.values.productId,deviceTypeKey:props.location.query.values.productId,current:1,pageSize:10} | |||||
LoadfunData(params) | |||||
// var params={productId:props.location.query.values.productId,productVesionId:props.location.query.values.productId,current:1,pageSize:10} | |||||
// LoadfunData(params) | |||||
actionRef.current.reload(); | |||||
} else { | } else { | ||||
message.error(r.errors); | message.error(r.errors); | ||||
} | } | ||||
@@ -463,15 +468,18 @@ const handleRemove = async (ids) => { | |||||
} | } | ||||
} | } | ||||
if(check){ | if(check){ | ||||
console.log("actionRef.current",actionRef.current.current) | |||||
updategoodstechnology(fields).then((r) => { | updategoodstechnology(fields).then((r) => { | ||||
if (r.data) { | if (r.data) { | ||||
message.success('修改成功'); | message.success('修改成功'); | ||||
var params={productId:props.location.query.values.productId,deviceTypeKey:props.location.query.values.productId,current:1,pageSize:10} | |||||
LoadfunData(params) | |||||
handleModalVisible(false); | handleModalVisible(false); | ||||
if (actionRef.current) { | |||||
actionRef.current.reload(); | |||||
} | |||||
actionRef.current.reload(); | |||||
// var params={productId:props.location.query.values.productId,productVesionId:props.location.query.values.productId,current:actionRef.current.current,pageSize:10} | |||||
// LoadfunData(params) | |||||
// handleModalVisible(false); | |||||
// if (actionRef.current) { | |||||
// actionRef.current.reloadAndRest(); | |||||
// } | |||||
} else { | } else { | ||||
message.error(r.errors); | message.error(r.errors); | ||||
} | } | ||||
@@ -639,20 +647,6 @@ const handleRemove = async (ids) => { | |||||
> | > | ||||
<PlusOutlined /> 新建 | <PlusOutlined /> 新建 | ||||
</Button>, | </Button>, | ||||
// <Button | |||||
// key="primary" | |||||
// onClick={async () => { | |||||
// const link = document.createElement('a'); | |||||
// link.href = "https://hbl-test-1305371387.cos.ap-chengdu.myqcloud.com//Franchisee/gzaxn@163.com/goods/133458884696092845.xlsx"; | |||||
// link.click(); | |||||
// }} | |||||
// > | |||||
// <UploadOutlined /> 下载设备版本工艺模板 | |||||
// </Button>, | |||||
// <Upload {...props}> | |||||
// <Button icon={<UploadOutlined />}>导入工艺模版</Button> | |||||
// </Upload> | |||||
]} | ]} | ||||
dataSource={datafunctionSource} | dataSource={datafunctionSource} | ||||
//数据绑定 | //数据绑定 | ||||
@@ -62,14 +62,14 @@ const CreateForm = (props) => { | |||||
// valueType:'digit', | // valueType:'digit', | ||||
// width: '15%', | // width: '15%', | ||||
// }, | // }, | ||||
{ | |||||
title: '操作', | |||||
valueType: 'option', | |||||
width: '15%', | |||||
render: () => { | |||||
return null; | |||||
}, | |||||
}, | |||||
// { | |||||
// title: '操作', | |||||
// valueType: 'option', | |||||
// width: '15%', | |||||
// render: () => { | |||||
// return null; | |||||
// }, | |||||
// }, | |||||
] | ] | ||||
const handleChange=(value)=>{ | const handleChange=(value)=>{ | ||||
var device=props.devicedata.find(x=>x.id==value); | var device=props.devicedata.find(x=>x.id==value); | ||||
@@ -162,7 +162,7 @@ const CreateForm = (props) => { | |||||
type: 'multiple', | type: 'multiple', | ||||
editableKeys, | editableKeys, | ||||
actionRender: (row, config, defaultDoms) => { | actionRender: (row, config, defaultDoms) => { | ||||
return [defaultDoms.delete,defaultDoms.Button]; | |||||
return []; | |||||
}, | }, | ||||
onValuesChange: (record, recordList) => { | onValuesChange: (record, recordList) => { | ||||
setDataSource(recordList); | setDataSource(recordList); | ||||
@@ -79,7 +79,7 @@ const GoodsTypeManage = () => { | |||||
WarehousetemplateDel([record.id]).then((r) => { | WarehousetemplateDel([record.id]).then((r) => { | ||||
message.success('删除成功,即将刷新'); | message.success('删除成功,即将刷新'); | ||||
actionRef.current.reload(); | |||||
actionRef.current.reloadAndRest(); | |||||
}); | }); | ||||
}} | }} | ||||
onCancel={() => { }} | onCancel={() => { }} | ||||