集成,总结MES功能
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

2 lines
29 KiB

  1. "use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[460],{16940:function(J,F,u){var D=u(97857),l=u.n(D),c=u(56002);F.Z={Add:function(r){return(0,c.request)("/api/deviceproductfunction/add",{method:"POST",data:l()({},r)})},Del:function(r){return(0,c.request)("/api/deviceproductfunction/del",{method:"POST",data:l()({},r)})},Update:function(r){return(0,c.request)("/api/deviceproductfunction/update",{method:"POST",data:l()({},r)})},Detail:function(r){return(0,c.request)("/api/deviceproductfunction/detail?id=".concat(r),{method:"GET"})},List:function(r){return(0,c.request)("/api/deviceproductfunction/list",{method:"POST",data:l()({},r)})},PagedList:function(r){return(0,c.request)("/api/deviceproductfunction/pagedlist",{method:"POST",data:l()({},r)})}}},55492:function(J,F,u){var D=u(97857),l=u.n(D),c=u(56002);F.Z={Add:function(r){return(0,c.request)("/api/finalsinfo/add",{method:"POST",data:l()({},r)})},Del:function(r){return(0,c.request)("/api/finalsinfo/del",{method:"POST",data:l()({},r)})},Update:function(r){return(0,c.request)("/api/finalsinfo/update",{method:"POST",data:l()({},r)})},Detail:function(r){return(0,c.request)("/api/finalsinfo/detail/".concat(r),{method:"GET"})},List:function(){return(0,c.request)("/api/finalsinfo/list",{method:"POST"})},SelectList:function(){return(0,c.request)("/api/finalsinfo/selectlist",{method:"GET"})},LineList:function(r){return(0,c.request)("/api/finalsinfo/linelist/".concat(r),{method:"GET"})},UnBindList:function(){return(0,c.request)("/api/finalsinfo/UnBindList",{method:"GET"})},PagedList:function(r){return(0,c.request)("/api/finalsinfo/pagedlist",{method:"POST",data:l()({},r)})},BatchUpdate:function(r){return(0,c.request)("/api/finalsinfo/batchupdate",{method:"POST",data:r})},BindLine:function(o){function r(m){return o.apply(this,arguments)}return r.toString=function(){return o.toString()},r}(function(o){return(0,c.request)("/api/finalsinfo/bindline",{method:"POST",data:o})}),RecipeList:function(r){return(0,c.request)(" api/finalsinfo/list",{method:"POST",data:{deviceId:r}})},Saveconfigstatus:function(o){function r(m){return o.apply(this,arguments)}return r.toString=function(){return o.toString()},r}(function(o){return(0,c.request)(" /api/finalsinfo/saveconfigstatus",{method:"POST",data:o})})}},48223:function(J,F,u){var D=u(97857),l=u.n(D),c=u(56002);F.Z={Add:function(r){return(0,c.request)("/api/materialsinfo/add",{method:"POST",data:l()({},r)})},Del:function(r){return(0,c.request)("/api/materialsinfo/del",{method:"POST",data:l()({},r)})},Update:function(r){return(0,c.request)("/api/materialsinfo/update",{method:"POST",data:l()({},r)})},List:function(){return(0,c.request)("/api/materialsinfo/list",{method:"GET"})},selectlist:function(){return(0,c.request)("/api/materialsinfo/selectlist",{method:"GET"})},PagedList:function(r){return(0,c.request)("/api/materialsinfo/pagedlist",{method:"POST",data:l()({},r)})}}},93132:function(J,F,u){var D=u(97857),l=u.n(D),c=u(56002);F.Z={Add:function(r){return(0,c.request)("/api/productline/add",{method:"POST",data:l()({},r)})},Del:function(r){return(0,c.request)("/api/productline/del",{method:"POST",data:l()({},r)})},Update:function(r){return(0,c.request)("/api/productline/update",{method:"POST",data:l()({},r)})},Detail:function(r){return(0,c.request)("/api/productline/detail?id=".concat(r),{method:"GET"})},List:function(){return(0,c.request)("/api/productline/list",{method:"POST"})},selectlist:function(){return(0,c.request)("/api/productline/selectlist",{method:"GET"})},PagedList:function(r){return(0,c.request)("/api/productline/pagedlist",{method:"POST",data:l()({},r)})},Batchdevice:function(r){return(0,c.request)("/api/productline/addbatchdevice",{method:"POST",data:l()({},r)})},devicelist:function(r){return(0,c.request)("/api/productline/devicelist",{method:"POST",data:l()({},r)})}}},93561:function(J,F,u){var D=u(97857),l=u.n(D),c=u(56002);F.Z={Add:function(r){return(0,c.request)("/api/productlinesteps/add",{method:"POST",data:l()({},r)})},Del:function(r){return(0,c.request)("/api/productlinesteps/del",{method:"POST",data:l()({},r)})},Update:function(r){return(0,c.request)("/api/productlinesteps/update",{method:"POST",data:l()({},r)})},Detail:function(r){return(0,c.request)("/api/productlinesteps/detail?id=".concat(r),{method:"GET"})},List:function(r){return(0,c.request)("/api/productlinesteps/list",{method:"POST",data:l()({},r)})},PagedList:function(r){return(0,c.request)("/api/productlinesteps/pagedlist",{method:"POST",data:l()({},r)})},BatchUpdateStep:function(r){return(0,c.request)("/api/productlinesteps/batchupdate",{method:"POST",data:r})},Devicelist:function(r){return(0,c.request)("/api/productline/devicelist",{method:"POST",data:l()({},r)})}}},9699:function(J,F,u){u.r(F),u.d(F,{default:function(){return Ct}});var D=u(15009),l=u.n(D),c=u(99289),o=u.n(c),r=u(5574),m=u.n(r),dt=u(83145),_e=u(97321),lt=u(62763),ct=u(93410),ft=u(88280),pt=u(8256),Se=u(34994),x=u(8232),P=u(14726),se=u(86738),S=u(45360),z=u(4393),ge=u(96074),Pe=u(40411),U=u(42075),mt=u(86250),vt=u(32983),B=u(85576),Y=u(66309),L=u(34041),b=u(49978),je=u(74330),v=u(67294),A=u(55492),ht=u(97857),Z=u.n(ht),C=u(56002),ue={Add:function(h){return(0,C.request)("/api/finalmaterial/add",{method:"POST",data:Z()({},h)})},Del:function(h){return(0,C.request)("/api/finalmaterial/del",{method:"POST",data:Z()({},h)})},Update:function(h){return(0,C.request)("/api/finalmaterial/update",{method:"POST",data:Z()({},h)})},Detail:function(h){return(0,C.request)("/api/finalmaterial/detail?id=".concat(h),{method:"GET"})},List:function(h){return(0,C.request)("/api/finalmaterial/list",{method:"POST",data:Z()({},h)})},PagedList:function(h){return(0,C.request)("/api/finalmaterial/pagedlist",{method:"POST",data:Z()({},h)})},BatchAdd:function(h){return(0,C.request)("/api/finalmaterial/batchadd",{method:"POST",data:h})}},xe=u(93132),_t=u(93561),R={Add:function(h){return(0,C.request)("/api/finalcraftsteps/add",{method:"POST",data:Z()({},h)})},Del:function(h){return(0,C.request)("/api/finalcraftsteps/del",{method:"POST",data:Z()({},h)})},Update:function(h){return(0,C.request)("/api/finalcraftsteps/update",{method:"POST",data:Z()({},h)})},Detail:function(h){return(0,C.request)("/api/finalcraftsteps/detail?id=".concat(h),{method:"GET"})},List:function(h){return(0,C.request)("/api/finalcraftsteps/list",{method:"POST",data:Z()({},h)})},PagedList:function(h){return(0,C.request)("/api/finalcraftsteps/pagedlist",{method:"POST",data:Z()({},h)})},BatchUpdate:function(h){return(0,C.request)("/api/finalcraftsteps/batchupdate",{method:"POST",data:h})},Copyfinalcraftsteps:function(h){return(0,C.request)("/api/finalcraftsteps/copyfinalcraftsteps",{method:"POST",data:h})}},St=u(57632),gt=u(16940),Pt=u(48223),jt=u(26346),O={tag:"tag___VXJuq",tag_device:"tag_device___W_ZX6",tag_item:"tag_item___PSkFw",tag_item_active:"tag_item_active___T4sW7",tag_item_activeItem:"tag_item_activeItem___l1ogu",tag_item_editicon:"tag_item_editicon___c9Zjn",gongyi_tag:"gongyi_tag___CnXhD",gongyi_tag_box:"gongyi_tag_box___CcbF9",gongyi_tag_item:"gongyi_tag_item___EQ4gA",gongyi_tag_item_active:"gongyi_tag_item_active___uXVmO",gongyi_tag_item_activeItem:"gongyi_tag_item_activeItem___SQcJo",gongyi_tag_item_editicon:"gongyi_tag_item_editicon___SvWpc"},e=u(85893),xt=function(){var h=x.Z.useForm(),Et=m()(h,1),W=Et[0],Ft=x.Z.useForm(),Dt=m()(Ft,1),oe=Dt[0],It=(0,v.useState)(!1),Ce=m()(It,2),Ee=Ce[0],K=Ce[1],Zt=(0,v.useState)(!1),Fe=m()(Zt,2),Ot=Fe[0],de=Fe[1],yt=(0,v.useRef)(),De=(0,v.useRef)(),Tt=(0,v.useState)([]),Ie=m()(Tt,2),w=Ie[0],H=Ie[1],Lt=(0,v.useState)([]),Ze=m()(Lt,2),Bt=Ze[0],bt=Ze[1],At=(0,v.useState)(),Oe=m()(At,2),g=Oe[0],le=Oe[1],Mt=x.Z.useForm(),Nt=m()(Mt,1),k=Nt[0],Ut=(0,v.useState)(!1),ye=m()(Ut,2),Rt=ye[0],q=ye[1],G=(0,v.useRef)(),kt=(0,v.useState)(),Te=m()(kt,2),qt=Te[0],Le=Te[1],Jt=(0,v.useState)(),Be=m()(Jt,2),zt=Be[0],ee=Be[1],Wt=(0,v.useState)(),be=m()(Wt,2),Kt=be[0],te=be[1],wt=(0,v.useState)(),Ae=m()(wt,2),Gt=Ae[0],ce=Ae[1],$t=(0,v.useState)([]),Me=m()($t,2),Vt=Me[0],Xt=Me[1],Qt=(0,v.useState)([]),Ne=m()(Qt,2),Yt=Ne[0],Ht=Ne[1],ea=(0,v.useState)(),Ue=m()(ea,2),ae=Ue[0],ta=Ue[1],aa=(0,v.useState)(),Re=m()(aa,2),y=Re[0],na=Re[1],ia=(0,v.useState)(),ke=m()(ia,2),ne=ke[0],ra=ke[1],sa=(0,v.useState)([]),qe=m()(sa,2),Je=qe[0],ua=qe[1],oa=(0,v.useState)(),ze=m()(oa,2),We=ze[0],da=ze[1],la=(0,v.useState)(),Ke=m()(la,2),we=Ke[0],ca=Ke[1],fa=(0,v.useState)([]),Ge=m()(fa,2),Ra=Ge[0],ka=Ge[1],pa=(0,v.useState)(0),$e=m()(pa,2),Ve=$e[0],qa=$e[1],ma=(0,v.useState)(!1),Xe=m()(ma,2),va=Xe[0],fe=Xe[1],ha=(0,v.useState)([]),Qe=m()(ha,2),pe=Qe[0],_a=Qe[1],Sa=(0,v.useState)(!1),Ye=m()(Sa,2),ga=Ye[0],me=Ye[1],Pa=(0,v.useState)(!1),He=m()(Pa,2),ja=He[0],ve=He[1],xa=(0,v.useState)([]),et=m()(xa,2),Ca=et[0],$=et[1],V=(0,v.useRef)(),Ea=(0,v.useState)("\u6B65\u9AA4\u5217\u8868"),tt=m()(Ea,2),Fa=tt[0],Da=tt[1],Ia=(0,v.useState)(),at=m()(Ia,2),Za=at[0],nt=at[1],Oa=(0,v.useState)([]),it=m()(Oa,2),rt=it[0],ya=it[1],Ta=x.Z.useForm(),La=m()(Ta,1),ie=La[0],Ba=(0,v.useState)(),st=m()(Ba,2),re=st[0],ba=st[1],Ja=x.Z.useWatch("processId",k),Aa=[{title:"id",dataIndex:"id",hideInSearch:!0,hideInTable:!0},{title:"\u6210\u54C1\u7F16\u53F7",dataIndex:"code",hideInSearch:!1},{title:"\u6210\u54C1\u540D\u79F0",dataIndex:"name",hideInSearch:!1},{title:"\u5DF2\u7ED1\u5B9A\u4EA7\u7EBF",dataIndex:"lineId",hideInSearch:!0,valueType:"select",request:function(){var i=o()(l()().mark(function t(){var n,d;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,xe.Z.selectlist();case 2:return n=a.sent,d=n.data,d.map(function(p){return p.label=p.value,p.value=p.key}),a.abrupt("return",d);case 6:case"end":return a.stop()}},t)}));function s(){return i.apply(this,arguments)}return s}()},{title:"\u57FA\u7840\u64CD\u4F5C",valueType:"option",fixed:"right",key:"option",render:function(s,t){return[(0,e.jsx)(P.ZP,{type:"primary",size:"small",onClick:o()(l()().mark(function n(){var d;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:K(!0),d={finalId:t.id},le(t),ue.List(d).then(function(p){p.statusCode===200&&(H(p.data),ee(!0)),K(!1)}).catch(function(){ee(!1),K(!1)});case 4:case"end":return a.stop()}},n)})),children:"\u914D\u65B9\u8BBE\u7F6E"},"peifang"),(0,e.jsx)(P.ZP,{type:"primary",size:"small",onClick:o()(l()().mark(function n(){var d;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:q(!0),Le("\u6210\u54C1\u7F16\u8F91"),d=JSON.parse(JSON.stringify(t)),d.state=d.state==="0",k.setFieldsValue(d);case 5:case"end":return a.stop()}},n)})),children:"\u7F16\u8F91"},"edit"),(0,e.jsx)(se.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){var d={id:t.id};A.Z.Del(d).then(function(f){if(f.statusCode===200){var a;S.ZP.success(f.statusCode===200?"\u5220\u9664\u6210\u529F":f.message),(a=G.current)===null||a===void 0||a.reload()}})},onCancel:function(){S.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,e.jsx)(P.ZP,{type:"primary",danger:!0,size:"small",children:"\u5220\u9664"})},"del")]}},{title:"\u8BBE\u8BA1\u64CD\u4F5C",valueType:"option",fixed:"right",key:"option",render:function(s,t){var n;return[(0,e.jsx)(P.ZP,{type:"primary",size:"small",onClick:o()(l()().mark(function d(){var f;return l()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:le(t),te(!0),f=JSON.parse(JSON.stringify(t)),oe.setFieldsValue(f);case 4:case"end":return p.stop()}},d)})),children:"\u7ED1\u5B9A\u4EA7\u7EBF"},"chanxian"),(0,e.jsx)(P.ZP,{disabled:((n=t.lineId)===null||n===void 0?void 0:n.length)==0,type:"primary",size:"small",onClick:o()(l()().mark(function d(){var f;return l()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:ce(!0),le(t),A.Z.LineList(t.id).then(function(_){_.statusCode===200&&(console.log(_.data),Ht(_.data))}),f=JSON.parse(JSON.stringify(t)),oe.setFieldsValue(f),ue.List({finalId:t.id}).then(function(_){_.statusCode===200&&(_.data.map(function(j){return j.value=j.id,j.label=j.materialName}),console.log(_.data),ba(_.data))});case 6:case"end":return p.stop()}},d)})),children:"\u8BBE\u7F6E\u5DE5\u827A"},"chanxian")]}}],Ma=function(){var i=o()(l()().mark(function s(t){var n,d,f,a;return l()().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(!t.id){_.next=7;break}return _.next=3,A.Z.Update(t);case 3:n=_.sent,n.statusCode===200?(S.ZP.success("\u4FEE\u6539\u6210\u529F"),(d=G.current)===null||d===void 0||d.reload(),q(!1)):S.ZP.error(JSON.stringify(n.errors)||"\u4FEE\u6539\u5931\u8D25"),_.next=11;break;case 7:return _.next=9,A.Z.Add(t);case 9:f=_.sent,f.statusCode===200?(S.ZP.success("\u6DFB\u52A0\u6210\u529F"),(a=G.current)===null||a===void 0||a.reload(),q(!1)):S.ZP.error(JSON.stringify(f.errors)||"\u6DFB\u52A0\u5931\u8D25");case 11:case"end":return _.stop()}},s)}));return function(t){return i.apply(this,arguments)}}();(0,v.useEffect)(function(){xe.Z.selectlist().then(function(i){i.statusCode===200&&Xt(i.data)})},[]);var Na=(0,v.useState)([]),ut=m()(Na,2),za=ut[0],Wa=ut[1],Ua=(0,v.useState)([]),ot=m()(Ua,2),Ka=ot[0],wa=ot[1];return(0,e.jsxs)(e.Fragment,{children:[Gt?(0,e.jsxs)(z.Z,{size:"default",title:"\u5F53\u524D\u914D\u7F6E\u6210\u54C1\u5DE5\u827A: "+(g==null?void 0:g.name),styles:{header:{textAlign:"center",margin:"auto",fontSize:"22px"}},extra:(0,e.jsx)(P.ZP,{style:{position:"absolute",top:"20px",right:"20px"},icon:(0,e.jsx)(jt.Z,{}),type:"primary",size:"small",onClick:function(){ce(!1)},children:"\u8FD4\u56DE"}),children:[(0,e.jsx)(ge.Z,{}),(0,e.jsx)(z.Z,{title:"\u9009\u62E9\u4EA7\u7EBF",children:(0,e.jsx)("div",{className:O.tag,children:Yt.map(function(i,s){return(0,e.jsx)(Pe.Z.Ribbon,{text:i.status=="0"?"\u672A\u914D\u7F6E":"\u5DF2\u914D\u7F6E",color:i.status=="0"?"":"pink",children:(0,e.jsxs)("div",{onClick:function(){console.log(i),ta(i),da(s),ca(-1),_t.Z.List({lineId:i.key,finalId:g.id}).then(function(n){n.statusCode===200&&ua(n.data)})},className:"".concat(O.tag_item," ").concat(s===We?O.tag_item_activeItem:""),children:[(0,e.jsx)(U.Z,{size:"small",children:(0,e.jsx)("div",{children:i.value})}),(0,e.jsx)("div",{className:s===We?O.tag_item_active:""})]},s)})})})}),Je.length>0?(0,e.jsx)(z.Z,{title:"\u4EA7\u7EBF\u5DE5\u5E8F\u8DEF\u7EBF",extra:(0,e.jsx)(U.Z,{direction:"horizontal",children:(0,e.jsx)(se.Z,{title:"\u786E\u5B9A\u8981\u4FDD\u5B58\u914D\u7F6E?\u4FDD\u5B58\u6210\u529F\u540E\u5C06\u8FD4\u56DE\u6210\u54C1\u5217\u8868\u3002",onConfirm:function(){A.Z.Saveconfigstatus({LineId:ae.key,finalId:g.id}).then(function(s){s.statusCode===200?(S.ZP.success("\u4FDD\u5B58\u6210\u529F!"),setTimeout(function(){ce(!1)},1e3)):S.ZP.error(s.errors||s.message)})},children:(0,e.jsx)(P.ZP,{size:"small",type:"primary",danger:!0,children:"\u4FDD\u5B58\u914D\u7F6E"})},"save")}),children:(0,e.jsx)(_e.Z.Group,{onChange:function(){},children:(0,e.jsx)("div",{className:O.gongyi_tag,children:(0,e.jsx)(mt.Z,{wrap:!0,gap:"small",children:Je.map(function(i,s){return(0,e.jsxs)("div",{className:O.gongyi_tag_box,children:[(0,e.jsxs)("div",{className:"".concat(O.gongyi_tag_item," ").concat(s===we?O.gongyi_tag_item_activeItem:""),children:[(0,e.jsx)(U.Z,{size:"middle",children:(0,e.jsxs)("div",{color:"#2db7f5",style:{fontSize:"22px"},children:[" 0",s+1,"-",i.processName]})}),(0,e.jsx)("div",{className:s===we?O.gongyi_tag_item_active:""})]}),(0,e.jsx)(z.Z,{title:"\u6240\u5C5E\u8BBE\u5907",size:"small",bordered:!1,style:{height:"200px",overflowY:"auto",overflowX:"hidden"},className:O.gongyi_tag_device,children:(0,e.jsx)(U.Z,{title:"\u8BBE\u5907",direction:"vertical",children:i.devicesInfo.map(function(t,n){return(0,e.jsx)(Pe.Z.Ribbon,{text:t.status=="0"?"\u672A\u914D\u7F6E":"\u5DF2\u914D\u7F6E",color:t.status=="0"?"":"pink",children:(0,e.jsx)(_e.Z,{onClick:function(f){na(i),ra(t.code),Da(i.processName+"-"+t.name+"["+t.code+"]"),de(!0);var a={lineId:ae.key,deviceId:t.code,finalId:g.id,productLineStepsId:i.id};nt(a)},size:"small",title:t.name,value:t.id})})})})}),(0,e.jsx)(ge.Z,{})]},s)})})})})}):(0,e.jsx)(vt.Z,{})]}):(0,e.jsx)(dt.Z,{columns:Aa,actionRef:G,cardBordered:!0,bordered:!0,scroll:{x:!0},rowClassName:function(s,t,n){return t%2===0?"":"even-row-background"},request:o()(l()().mark(function i(){var s,t,n,d=arguments;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=d.length>0&&d[0]!==void 0?d[0]:{},t={pageIndex:s.current||1,pageSize:s.pageSize||10,name:s.name||"",code:s.code||""},a.next=4,A.Z.PagedList(t);case 4:if(n=a.sent,n.statusCode!==200){a.next=9;break}return a.abrupt("return",{data:n.data.items,success:!0,total:n.data.total});case 9:return a.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return a.stop()}},i)})),rowKey:"id",pagination:{pageSize:10,showSizeChanger:!1},dateFormatter:"string",headerTitle:"\u6210\u54C1\u5217\u8868",toolBarRender:function(){return[(0,e.jsx)(P.ZP,{type:"primary",onClick:function(){k.resetFields(),q(!0),Le("\u65B0\u589E\u6210\u54C1")},children:"\u65B0\u589E\u6210\u54C1"},"button")]}},"myTable"),(0,e.jsx)(B.Z,{maskClosable:!1,open:Ot,width:1e3,onCancel:function(){return de(!1)},onOk:function(){return de(!1)},footer:!1,children:(0,e.jsx)(lt.Z,{tableStyle:{overflowY:"auto",overflowX:"hidden",maxHeight:"500px"},toolBarRender:function(){return[(0,e.jsx)(P.ZP,{type:"primary",disabled:Ve<0,onClick:function(){k.resetFields(),me(!0)},children:"\u81EA\u5B9A\u4E49\u6B65\u9AA4"}),(0,e.jsx)(P.ZP,{type:"primary",danger:!0,disabled:Ve<0,onClick:function(){console.log("sss",y==null?void 0:y.devicesInfo);var t=JSON.stringify(y==null?void 0:y.devicesInfo),n=JSON.parse(t),d=n.filter(function(f){return f.code!=ne});_a(d),fe(!0)},children:"\u4F7F\u7528\u540C\u7C7B\u578B\u8BBE\u5907\u914D\u7F6E"})]},actionRef:V,headerTitle:Fa,columns:[{title:"\u6B65\u9AA4\u5E8F\u53F7",dataIndex:"step",tooltip:"\u9F20\u6807\u653E\u5728\u5E8F\u53F7\u524D\u53D8\u6210\u624B\u5F62,\u4E0A\u4E0B\u62D6\u62FD\u8C03\u6574\u987A\u5E8F",hideInSearch:!0,render:function(s,t,n){return(0,e.jsx)("span",{className:"customRender",children:"".concat(n+1)})}},{title:"\u6B65\u9AA4\u5907\u6CE8",dataIndex:"description",hideInSearch:!0},{title:"\u529F\u80FD",dataIndex:"deviceProductFunctionName",hideInSearch:!0},{title:"\u8BBE\u5907\u53C2\u6570\u9884\u89C8",width:100,hideInSearch:!0,render:function(s,t,n,d,f){var a=JSON.parse(t==null?void 0:t.deviceFunParams);if(t!=null&&t.deviceStepParms){var p=JSON.parse(t==null?void 0:t.deviceStepParms),_=[];return p&&(a==null||a.map(function(j,X){Object.keys(p).forEach(function(I,he){if(j.paramCode==I)if(j.paramType==1){var M,N="";(M=p[I])===null||M===void 0||M.map(function(T){N==""?N=re.find(function(Q){return Q.value==T}).label:N=N+","+re.find(function(Q){return Q.value==T}).label}),_.push({name:j.paramName+":"+N})}else _.push({name:j.paramName+":"+p[I]+j.paramUnit})})})),(0,e.jsx)(U.Z,{size:"small",direction:"vertical",align:"start",children:_.map(function(j){return(0,e.jsx)(Y.Z,{children:j.name})})})}}},{title:"\u64CD\u4F5C",align:"center",valueType:"option",fixed:"right",key:"option",render:function(s,t,n,d){return[(0,e.jsxs)(U.Z,{size:"middle",children:[(0,e.jsx)(P.ZP,{type:"primary",ghost:!0,onClick:o()(l()().mark(function f(){var a,p;return l()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:ve(!0),$([]),K(!0),a=JSON.parse(JSON.stringify(t)),W.setFieldsValue(a),console.log("record",t),p={deviceProductId:g==null?void 0:g.deviceProductId},gt.Z.List(p).then(function(X){X.succeeded&&(ya(X.data),setTimeout(function(){var I=X.data.find(function(T){return T.id===t.deviceProductFunctionId});if(I!=null&&I.params){var he=JSON.parse(I==null?void 0:I.params);console.log(he);var M=[];he.map(function(T){var Q={title:T.paramName,dataIndex:T.paramCode,width:"md",renderFormItem:function($a,Va,Xa){return T.paramType===1?(0,e.jsx)(L.Z,{mode:"multiple",options:re}):(0,e.jsx)(b.Z,{addonAfter:T.paramUnit})},colProps:{xs:24,md:12}};M.push(Q)}),console.log(M),$(M)}if(ie&&t.params){var N=JSON.parse(t.params);ie.setFieldsValue(N)}K(!1)},200))});case 8:case"end":return j.stop()}},f)})),children:"\u914D\u7F6E\u8BBE\u5907\u53C2\u6570"}),(0,e.jsx)(se.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){var a={id:t.id,step:0,craftId:"",deviceProductId:""};R.Del(a).then(function(p){p.statusCode===200&&(S.ZP.success(p.statusCode===200?"\u5220\u9664\u6210\u529F":p.message),d==null||d.reload())})},onCancel:function(){S.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,e.jsx)(P.ZP,{type:"primary",danger:!0,ghost:!0,children:"\u5220\u9664"})},(0,St.Z)())]})]}}],rowKey:"step",search:!1,pagination:!1,params:Za,request:o()(l()().mark(function i(){var s,t,n,d=arguments;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(s=d.length>0&&d[0]!==void 0?d[0]:{},s.deviceId){a.next=4;break}return console.log("\u6211\u6765\u4E86"),a.abrupt("return",{data:[],success:!0});case 4:return t={lineId:s.lineId,finalId:s.finalId,deviceId:s.deviceId,productLineStepsId:s.productLineStepsId},a.next=7,R.List(t);case 7:if(n=a.sent,n.statusCode!==200){a.next=12;break}return a.abrupt("return",{data:n.data,success:!0,total:n.data});case 12:return a.abrupt("return",{data:[],success:!1});case 13:case"end":return a.stop()}},i)})),dragSortKey:"step",onDragSortEnd:function(s,t,n){console.log("newDataSource",n),n.map(function(d,f){d.step=f+1}),console.log("\u6392\u5E8F\u540E\u7684\u6570\u636E",n),R.BatchUpdate(n).then(function(d){if(d.data){var f;(f=V.current)===null||f===void 0||f.reload(),S.ZP.success("\u4FEE\u6539\u5217\u8868\u6392\u5E8F\u6210\u529F")}})}})}),(0,e.jsx)(B.Z,{maskClosable:!1,width:800,title:(0,e.jsx)(Y.Z,{color:"#cd201f",children:qt}),open:Rt,onCancel:function(){q(!1)},footer:[(0,e.jsx)(P.ZP,{onClick:function(){q(!1)},children:"\u8FD4\u56DE"},"back"),(0,e.jsx)(P.ZP,{form:"finalForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,e.jsxs)(x.Z,{form:k,name:"basic",id:"finalForm",onFinish:Ma,autoComplete:"off",children:[(0,e.jsx)(x.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,e.jsx)(b.Z,{})}),(0,e.jsx)(x.Z.Item,{label:"\u6210\u54C1\u7F16\u7801",name:"code",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,e.jsx)(b.Z,{})}),(0,e.jsx)(x.Z.Item,{name:"name",label:"\u6210\u54C1\u540D\u79F0",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}],children:(0,e.jsx)(b.Z,{})})]})},"01"),(0,e.jsx)(B.Z,{maskClosable:!1,width:1200,title:"\u914D\u7F6E\u7269\u6599",open:zt,destroyOnClose:!0,onCancel:function(){ee(!1),H([])},onOk:function(){var s=JSON.parse(JSON.stringify(w));s.map(function(t){t.finalId=g.id}),console.log("list",s),ue.BatchAdd(s).then(function(t){t.statusCode===200?(S.ZP.success("\u4FDD\u5B58\u6210\u529F!"),ee(!1)):S.ZP.error("\u4FDD\u5B58\u5931\u8D25!")})},children:(0,e.jsx)(je.Z,{spinning:Ee,children:(0,e.jsx)(ct.Z,{children:(0,e.jsx)("div",{style:{maxWidth:1200,margin:"auto"},children:(0,e.jsx)(ft.Z,{rowKey:"id",controlled:!0,editableFormRef:yt,actionRef:De,columns:[{title:"\u7269\u6599\u540D\u79F0",dataIndex:"materialId",valueType:"select",ellipsis:!0,request:function(){var i=o()(l()().mark(function t(){var n,d;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Pt.Z.List();case 2:return n=a.sent,d=[],n.statusCode===200&&(bt(n.data),n.data.map(function(p){return d.push({label:"".concat(p.name,"[").concat(p.unit,"]"),value:p.id})})),a.abrupt("return",d);case 6:case"end":return a.stop()}},t)}));function s(){return i.apply(this,arguments)}return s}(),formItemProps:function(){return{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}}},{title:"\u914D\u6599\u65B9\u5F0F",dataIndex:"mode",valueType:"select",ellipsis:!0,valueEnum:{0:{text:"\u8BBE\u5907"},1:{text:"\u5176\u4ED6"}}},{title:"\u91CD\u91CF",dataIndex:"weight",valueType:"text",ellipsis:!0,formItemProps:function(){return{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}}},{title:"\u91CD\u91CF\u8BEF\u5DEE(\xB1)",dataIndex:"errorWeight",valueType:"text",ellipsis:!0,formItemProps:function(){return{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}}},{title:"\u64CD\u4F5C",valueType:"option",render:function(s,t){return[(0,e.jsx)(P.ZP,{type:"primary",ghost:!0,onClick:function(){var d;console.log(t),(d=De.current)===null||d===void 0||d.startEditable(t.id)},children:"\u7F16\u8F91\u539F\u6599"},"edit")]}}],value:w,recordCreatorProps:{record:function(){return{id:Date.now().toString(),materialId:"",finalId:"",weight:"",mode:""}}},editable:{form:W,type:"single",onValuesChange:function(s,t){console.log(Bt),t?H(t):(w.push(s),H(w)),console.log("materiallist",w)},actionRender:function(s,t,n){return[n.delete,n.save,n.cancel]}}})})})})},"02"),(0,e.jsx)(B.Z,{maskClosable:!1,width:500,title:"\u7ED1\u5B9A\u4EA7\u7EBF",open:Kt,destroyOnClose:!0,onCancel:function(){te(!1)},footer:[(0,e.jsx)(P.ZP,{onClick:function(){te(!1)},children:"\u8FD4\u56DE"},"back"),(0,e.jsx)(P.ZP,{form:"bindlineForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,e.jsx)(x.Z,{id:"bindlineForm",form:oe,onFinish:function(s){A.Z.BindLine({finalId:g.id,LineId:s.lineId}).then(function(t){if(t.statusCode===200){var n;S.ZP.info("\u64CD\u4F5C\u6210\u529F!"),te(!1),(n=G.current)===null||n===void 0||n.reload()}else S.ZP.error("\u64CD\u4F5C\u5931\u8D25!")})},children:(0,e.jsx)(x.Z.Item,{label:"\u8BF7\u9009\u62E9\u4EA7\u7EBF",name:"lineId",children:(0,e.jsx)(L.Z,{placeholder:"\u8BF7\u9009\u62E9\u4EA7\u7EBF",mode:"multiple",children:Vt.map(function(i){return(0,e.jsx)(L.Z.Option,{value:i.key,children:(0,e.jsx)("span",{children:i.value})},i.key)})})})})},"03"),(0,e.jsx)(B.Z,{maskClosable:!1,destroyOnClose:!0,width:800,title:(0,e.jsx)(Y.Z,{color:"#cd201f",children:" \u914D\u7F6E\u8BBE\u5907\u53C2\u6570\u4FE1\u606F"}),open:ja,onCancel:function(){ve(!1),ie.resetFields(),$([])},footer:!1,children:(0,e.jsxs)(je.Z,{spinning:Ee,children:[(0,e.jsxs)(x.Z,{form:W,name:"basic1",id:"myForm1111",labelCol:{span:4},wrapperCol:{span:12},autoComplete:"off",children:[(0,e.jsx)(x.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,e.jsx)(b.Z,{})}),(0,e.jsx)(x.Z.Item,{label:"\u8BBE\u5907\u529F\u80FD\u4FE1\u606F",name:"deviceProductFunctionId",rules:[{required:!0,message:"\u6B64\u9879\u5FC5\u586B\uFF01"}],children:(0,e.jsx)(L.Z,{placeholder:"\u8BF7\u9009\u62E9\u529F\u80FD",onChange:function(s,t){var n=rt.find(function(a){return a.id===s});if(n!=null&&n.params){var d=JSON.parse(n==null?void 0:n.params);console.log(d);var f=[];d.map(function(a){var p={title:a.paramName,dataIndex:a.paramCode,width:"md",renderFormItem:function(j,X,I){return a.paramType===1?(0,e.jsx)(L.Z,{mode:"multiple",options:re}):(0,e.jsx)(b.Z,{placeholder:"\u8BF7\u8F93\u5165",addonAfter:a.paramUnit})},colProps:{xs:24,md:12}};f.push(p)}),$(f)}else $([])},children:rt.map(function(i){return(0,e.jsx)(L.Z.Option,{value:i.id,children:(0,e.jsx)("span",{children:i.name})},i.id)})})})]}),(0,e.jsx)(z.Z,{children:(0,e.jsx)(pt.Z,{trigger:(0,e.jsx)("a",{children:"\u70B9\u51FB\u6211"}),rowProps:{gutter:[16,16]},colProps:{span:12},grid:!0,onFinish:function(){var i=o()(l()().mark(function s(t){var n,d;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(console.log(W.getFieldsValue()),n=W.getFieldsValue(),n.deviceProductFunctionId){a.next=5;break}return S.ZP.error("\u8BF7\u9009\u62E9\u8BBE\u5907\u4EA7\u54C1\u529F\u80FD"),a.abrupt("return");case 5:console.log("froms",n),d={id:n.id,deviceProductFunctionId:n.deviceProductFunctionId,params:JSON.stringify(t),deviceId:""},R.Update(d).then(function(p){if(p.data){var _;(_=V.current)===null||_===void 0||_.reload(),S.ZP.success("\u6210\u529F\uFF01"),ve(!1)}});case 8:case"end":return a.stop()}},s)}));return function(s){return i.apply(this,arguments)}}(),columns:Ca,form:ie})})]})}),(0,e.jsx)(B.Z,{maskClosable:!1,destroyOnClose:!0,width:800,open:ga,onCancel:function(){me(!1)},footer:!1,title:(0,e.jsx)(Y.Z,{color:"#cd201f",children:" \u6DFB\u52A0\u6B65\u9AA4 "}),children:(0,e.jsx)(Se.A,{form:k,onFinish:function(){var i=o()(l()().mark(function s(t){var n;return l()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:n={productLineStepsId:y.id,description:t.description,deviceId:ne,finalId:g.id,deviceProductFunctionId:"",params:""},console.log("11111111",n),R.Add(n).then(function(a){if(a.statusCode===200){var p;S.ZP.info("\u6DFB\u52A0\u6210\u529F"),me(!1),(p=V.current)===null||p===void 0||p.reload()}else S.ZP.error(a.errors)});case 3:case"end":return f.stop()}},s)}));return function(s){return i.apply(this,arguments)}}(),children:(0,e.jsx)(x.Z.Item,{label:"\u6B65\u9AA4\u5907\u6CE8",name:"description",children:(0,e.jsx)(b.Z,{})})})}),(0,e.jsx)(B.Z,{maskClosable:!1,destroyOnClose:!0,width:800,open:va,onCancel:function(){fe(!1)},footer:!1,children:(0,e.jsx)(Se.A,{onFinish:function(s){R.Copyfinalcraftsteps({finalId:g==null?void 0:g.id,lineId:ae.key,copyDeviceId:s.deviceId,productLineStepsId:y.id,toDeviceId:ne}).then(function(t){t.statusCode===200&&(S.ZP.success("\u540C\u6B65\u6210\u529F!"),fe(!1),setTimeout(function(){var n,d={lineId:ae.key,deviceId:ne,finalId:g==null?void 0:g.id,productLineStepsId:y.id};nt(d),(n=V.current)===null||n===void 0||n.reload()},2e3))})},children:(0,e.jsx)(x.Z.Item,{label:"\u8BBE\u5907",name:"deviceId",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,e.jsx)(L.Z,{onChange:function(s){},placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",style:{width:375},children:pe==null?void 0:pe.map(function(i){return(0,e.jsx)(L.Z.Option,{value:i.code,children:(0,e.jsx)("span",{children:i.name+"["+i.code+"]"})},i.code)})})})})})]})},Ct=xt}}]);