集成,总结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.

p__final__index.9df8868b.async.js 38 KiB

2 months ago
1
  1. "use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[460],{16940:function(Ce,A,i){var M=i(97857),c=i.n(M),v=i(56002);A.Z={Add:function(s){return(0,v.request)("/api/deviceproductfunction/add",{method:"POST",data:c()({},s)})},Del:function(s){return(0,v.request)("/api/deviceproductfunction/del",{method:"POST",data:c()({},s)})},Update:function(s){return(0,v.request)("/api/deviceproductfunction/update",{method:"POST",data:c()({},s)})},Detail:function(s){return(0,v.request)("/api/deviceproductfunction/detail?id=".concat(s),{method:"GET"})},List:function(s){return(0,v.request)("/api/deviceproductfunction/list",{method:"POST",data:c()({},s)})},PagedList:function(s){return(0,v.request)("/api/deviceproductfunction/pagedlist",{method:"POST",data:c()({},s)})}}},55492:function(Ce,A,i){var M=i(97857),c=i.n(M),v=i(56002);A.Z={Add:function(s){return(0,v.request)("/api/finalsinfo/add",{method:"POST",data:c()({},s)})},Del:function(s){return(0,v.request)("/api/finalsinfo/del",{method:"POST",data:c()({},s)})},Update:function(s){return(0,v.request)("/api/finalsinfo/update",{method:"POST",data:c()({},s)})},Detail:function(s){return(0,v.request)("/api/finalsinfo/detail/".concat(s),{method:"GET"})},List:function(){return(0,v.request)("/api/finalsinfo/list",{method:"POST"})},SelectList:function(){return(0,v.request)("/api/finalsinfo/selectlist",{method:"GET"})},LineList:function(s){return(0,v.request)("/api/finalsinfo/linelist/".concat(s),{method:"GET"})},FinishLineList:function(s){return(0,v.request)("/api/finalsinfo/finishlinelist/".concat(s),{method:"GET"})},UnBindList:function(){return(0,v.request)("/api/finalsinfo/UnBindList",{method:"GET"})},PagedList:function(s){return(0,v.request)("/api/finalsinfo/pagedlist",{method:"POST",data:c()({},s)})},BatchUpdate:function(s){return(0,v.request)("/api/finalsinfo/batchupdate",{method:"POST",data:s})},BindLine:function(d){function s(g){return d.apply(this,arguments)}return s.toString=function(){return d.toString()},s}(function(d){return(0,v.request)("/api/finalsinfo/bindline",{method:"POST",data:d})}),RecipeList:function(s){return(0,v.request)(" api/finalsinfo/list",{method:"POST",data:{deviceId:s}})},Saveconfigstatus:function(d){function s(g){return d.apply(this,arguments)}return s.toString=function(){return d.toString()},s}(function(d){return(0,v.request)(" /api/finalsinfo/saveconfigstatus",{method:"POST",data:d})})}},48223:function(Ce,A,i){var M=i(97857),c=i.n(M),v=i(56002);A.Z={Add:function(s){return(0,v.request)("/api/materialsinfo/add",{method:"POST",data:c()({},s)})},Del:function(s){return(0,v.request)("/api/materialsinfo/del",{method:"POST",data:c()({},s)})},Update:function(s){return(0,v.request)("/api/materialsinfo/update",{method:"POST",data:c()({},s)})},List:function(){return(0,v.request)("/api/materialsinfo/list",{method:"GET"})},selectlist:function(){return(0,v.request)("/api/materialsinfo/selectlist",{method:"GET"})},PagedList:function(s){return(0,v.request)("/api/materialsinfo/pagedlist",{method:"POST",data:c()({},s)})}}},93132:function(Ce,A,i){var M=i(97857),c=i.n(M),v=i(56002);A.Z={Add:function(s){return(0,v.request)("/api/productline/add",{method:"POST",data:c()({},s)})},Del:function(s){return(0,v.request)("/api/productline/del",{method:"POST",data:c()({},s)})},Update:function(s){return(0,v.request)("/api/productline/update",{method:"POST",data:c()({},s)})},Detail:function(s){return(0,v.request)("/api/productline/detail?id=".concat(s),{method:"GET"})},List:function(){return(0,v.request)("/api/productline/list",{method:"POST"})},selectlist:function(){return(0,v.request)("/api/productline/selectlist",{method:"GET"})},PagedList:function(s){return(0,v.request)("/api/productline/pagedlist",{method:"POST",data:c()({},s)})},Batchdevice:function(s){return(0,v.request)("/api/productline/addbatchdevice",{method:"POST",data:c()({},s)})},devicelist:function(s){return(0,v.request)("/api/productline/devicelist",{method:"POST",data:c()({},s)})}}},93561:function(Ce,A,i){var M=i(97857),c=i.n(M),v=i(56002);A.Z={Add:function(s){return(0,v.request)("/api/productlinesteps/add",{method:"POST",data:c()({},s)})},Del:function(s){return(0,v.request)("/api/productlinesteps/del",{method:"POST",data:c()({},s)})},Update:function(s){return(0,v.request)("/api/productlinesteps/update",{method:"POST",data:c()({},s)})},Detail:function(s){return(0,v.request)("/api/productlinesteps/detail?id=".concat(s),{method:"GET"})},List:function(s){return(0,v.request)("/api/productlinesteps/list",{method:"POST",data:c()({},s)})},PagedList:function(s){return(0,v.request)("/api/productlinesteps/pagedlist",{method:"POST",data:c()({},s)})},BatchUpdateStep:function(s){return(0,v.request)("/api/productlinesteps/batchupdate",{method:"POST",data:s})},Devicelist:function(s){return(0,v.request)("/api/productline/devicelist",{method:"POST",data:c()({},s)})}}},60033:function(Ce,A,i){i.r(A),i.d(A,{default:function(){return _n}});var M=i(15009),c=i.n(M),v=i(99289),d=i.n(v),s=i(5574),g=i.n(s),He=i(83145),Qe=i(97321),Yt=i(62763),Ht=i(93410),Qt=i(4942),en=i(97685),et=i(91),tt=i(74165),tn=i(15861),E=i(1413),nn=i(87462),f=i(67294),an=i(42110),rn=i(32867),un=function(h,$){return f.createElement(rn.Z,(0,nn.Z)({},h,{ref:$,icon:an.Z}))},sn=f.forwardRef(un),on=sn,ln=i(97462),dn=i(952),cn=i(89451),nt=i(48171),fn=i(53914),at=i(22270),mn=i(23491),T=i(14726),b=i(8232),vn=i(21770),Ke=i(88306),it=i(8880),e=i(85893),pn=["onTableChange","maxLength","formItemProps","recordCreatorProps","rowKey","controlled","defaultValue","onChange","editableFormRef"],hn=["record","position","creatorButtonText","newRecordType","parentKey","style"],rt=f.createContext(void 0);function ut(n){var h=n.children,$=n.record,N=n.position,oe=n.newRecordType,k=n.parentKey,Y=(0,f.useContext)(rt);return f.cloneElement(h,(0,E.Z)((0,E.Z)({},h.props),{},{onClick:function(){var le=(0,tn.Z)((0,tt.Z)().mark(function ge(U){var Se,de,H,w;return(0,tt.Z)().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,(Se=(de=h.props).onClick)===null||Se===void 0?void 0:Se.call(de,U);case 2:if(w=O.sent,w!==!1){O.next=5;break}return O.abrupt("return");case 5:Y==null||(H=Y.current)===null||H===void 0||H.addEditRecord($,{position:N,newRecordType:oe,parentKey:k});case 6:case"end":return O.stop()}},ge)}));function W(ge){return le.apply(this,arguments)}return W}()}))}function st(n){var h,$,N=(0,cn.YB)(),oe=n.onTableChange,k=n.maxLength,Y=n.formItemProps,le=n.recordCreatorProps,W=n.rowKey,ge=n.controlled,U=n.defaultValue,Se=n.onChange,de=n.editableFormRef,H=(0,et.Z)(n,pn),w=(0,f.useRef)(void 0),ce=(0,f.useRef)(),O=(0,f.useRef)();(0,f.useImperativeHandle)(H.actionRef,function(){return ce.current},[ce.current]);var $e=(0,vn.Z)(function(){return n.value||U||[]},{value:n.value,onChange:n.onChange}),ye=(0,en.Z)($e,2),Z=ye[0],Pe=ye[1],Q=f.useMemo(function(){return typeof W=="function"?W:function(S,I){return S[W]||I}},[W]),je=(0,nt.J)(function(S){if(typeof S=="number"&&!n.name){if(S>=Z.length)return S;var I=Z&&Z[S];return Q==null?void 0:Q(I,S)}if((typeof S=="string"||S>=Z.length)&&n.name){var P=Z.findIndex(function(x,C){var D;return(Q==null||(D=Q(x,C))===null||D===void 0?void 0:D.toString())===(S==null?void 0:S.toString())});if(P!==-1)return P}return S});(0,f.useImperativeHandle)(de,function(){var S=function(x){var C,D;if(x==null)throw new Error("rowIndex is required");var B=je(x),V=[n.name,(C=B==null?void 0:B.toString())!==null&&C!==void 0?C:""].flat(1).filter(Boolean);return(D=O.current)===null||D===void 0?void 0:D.getFieldValue(V)},I=function(){var x,C=[n.name].flat(1).filter(Boolean);if(Array.isArray(C)&&C.length===0){var D,B=(D=O.current)===null||D===void 0?void 0:D.getFieldsValue();return Array.isArray(B)?B:Object.keys(B).map(function(V){return B[V]})}return(x=O.current)===null||x===void 0?void 0:x.getFieldValue(C)};return(0,E.Z)((0,E.Z)({},O.current),{},{getRowData:S,getRowsData:I,setRowData:function(x,C){var D,B;if(x==null)throw new Error("rowIndex is required");var V=je(x),z=[n.name,(D=V==null?void 0:V.toString())!==null&&D!==void 0?D:""].flat(1).filter(Boolean),Ge=Object.assign({},(0,E.Z)((0,E.Z)({},S(x)),C||{})),Ue=(0,it.Z)({},z,Ge);return(B=O.current)===null||B===void 0||B.setFieldsValue(Ue),!0}})},[je,n.name,O.current]),(0,f.useEffect)(function(){n.controlled&&(Z||[]).forEach(function(S,I){var P;(P=O.current)===null||P===void 0||P.setFieldsValue((0,Qt.Z)({},"".concat(Q(S,I)),S))},{})},[(0,fn.ZP)(Z),n.controlled]),(0,f.useEffect)(function(){if(n.name){var S;O.current=n==null||(S=n.editable)===null||S===void 0?void 0:S.form}},[(h=n.editable)===null||h===void 0?void 0:h.form,n.name]);var ee=le||{},ke=ee.record,Fe=ee.position,Me=ee.creatorButtonText,_=ee.newRecordType,De=ee.parentKey,We=ee.style,ze=(0,et.Z)(ee,hn),ae=Fe==="top",fe=(0,f.useMemo)(function(){return typeof k=="number"&&k<=(Z==null?void 0:Z.length)?!1:le!==!1&&(0,e.jsx)(ut,{record:(0,at.h)(ke,Z==null?void 0:Z.length,Z)||{},position:Fe,parentKey:(0,at.h)(De,Z==null?void 0:Z.length,Z),newRecordType:_,children:(0,e.jsx)(T.ZP,(0,E.Z)((0,E.Z)({type:"dashed",style:(0,E.Z)({display:"block",margin:"10px 0",width:"100%"},We),icon:(0,e.jsx)(on,{})},ze),{},{children:Me||N.getMessage("editableTable.action.add","\u6DFB\u52A0\u4E00\u884C\u6570\u636E")}))})},[le,k,Z==null?void 0:Z.length]),Ne=(0,f.useMemo)(function(){return fe?ae?{components:{header:{wrapper:function(I){var P,x=I.className,C=I.children;return(0,e.jsxs)("thead",{className:x,children:[C,(0,e.jsxs)("tr",{style:{position:"relative"},children:[(0,e.jsx)("td",{colSpan:0,style:{visibility:"hidden"},children:fe}),(0,e.jsx)("td",{style:{position:"absolute",left:0,width:"100%"},colSpan:(P=H.columns)===null||P===void 0?void 0:P.length,children:fe})]})]})}}}}:{tableViewRender:function(I,P){var x,C;return(0,e.jsxs)(e.Fragment,{children:[(x=(C=n.tableViewRender)===null||C===void 0?void 0:C.call(n,I,P))!==null&&x!==void 0?x:P,fe]})}}:{}},[ae,fe]),Ee=(0,E.Z)({},n.editable),ie=(0,nt.J)(function(S,I){var P,x,C;if((P=n.editable)===null||P===void 0||(x=P.onValuesChange)===null||x===void 0||x.call(P,S,I),(C=n.onValuesChange)===null||C===void 0||C.call(n,I,S),n.controlled){var D;n==null||(D=n.onChange)===null||D===void 0||D.call(n,I)}});return(n!=null&&n.onValuesChange||($=n.editable)!==null&&$!==void 0&&$.onValuesChange||n.controlled&&n!==null&&n!==void 0&&n.onChange)&&(Ee.onValuesChange=ie),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(rt.Provider,{value:ce,children:(0,e.jsx)(He.Z,(0,E.Z)((0,E.Z)((0,E.Z)({search:!1,options:!1,pagination:!1,rowKey:W,revalidateOnFocus:!1},H),Ne),{},{tableLayout:"fixed",actionRef:ce,onChange:oe,editable:(0,E.Z)((0,E.Z)({},Ee),{},{formProps:(0,E.Z)({formRef:O},Ee.formProps)}),dataSource:Z,onDataSourceChange:function(I){if(Pe(I),n.name&&Fe==="top"){var P,x=(0,it.Z)({},[n.name].flat(1).filter(Boolean),I);(P=O.current)===null||P===void 0||P.setFieldsValue(x)}}}))}),n.name?(0,e.jsx)(ln.Z,{name:[n.name],children:function(I){var P,x;if(!w.current)return w.current=Z,null;var C=(0,Ke.Z)(I,[n.name].flat(1)),D=C==null?void 0:C.find(function(B,V){var z;return!(0,mn.A)(B,(z=w.current)===null||z===void 0?void 0:z[V])});return w.current=Z,D&&(n==null||(P=n.editable)===null||P===void 0||(x=P.onValuesChange)===null||x===void 0||x.call(P,D,C)),null}}):null]})}function ot(n){var h=dn.ZP.useFormInstance();return n.name?(0,e.jsx)(b.Z.Item,(0,E.Z)((0,E.Z)({style:{maxWidth:"100%"}},n==null?void 0:n.formItemProps),{},{name:n.name,shouldUpdate:function(N,oe){var k=[n.name].flat(1);try{return JSON.stringify((0,Ke.Z)(N,k))!==JSON.stringify((0,Ke.Z)(oe,k))}catch(Y){return!0}},children:(0,e.jsx)(st,(0,E.Z)((0,E.Z)({tableLayout:"fixed",scroll:{x:"max-content"}},n),{},{editable:(0,E.Z)((0,E.Z)({},n.editable),{},{form:h})}))})):(0,e.jsx)(st,(0,E.Z)({tableLayout:"fixed",scroll:{x:"max-content"}},n))}ot.RecordCreator=ut;var gn=ot,Sn=i(8256),lt=i(34994),Ae=i(86738),F=i(45360),_e=i(4393),dt=i(96074),ct=i(40411),he=i(42075),Pn=i(86250),ft=i(32983),ue=i(85576),q=i(34041),X=i(49978),Re=i(66309),mt=i(74330),ne=i(55492),jn=i(97857),K=i.n(jn),L=i(56002),Je={Add:function(h){return(0,L.request)("/api/finalmaterial/add",{method:"POST",data:K()({},h)})},Del:function(h){return(0,L.request)("/api/finalmaterial/del",{method:"POST",data:K()({},h)})},Update:function(h){return(0,L.request)("/api/finalmaterial/update",{method:"POST",data:K()({},h)})},Detail:function(h){return(0,L.request)("/api/finalmaterial/detail?id=".concat(h),{method:"GET"})},List:function(h){return(0,L.request)("/api/finalmaterial/list",{method:"POST",data:K()({},h)})},PagedList:function(h){return(0,L.request)("/api/finalmaterial/pagedlist",{method:"POST",data:K()({},h)})},BatchAdd:function(h){return(0,L.request)("/api/finalmaterial/batchadd",{method:"POST",data:h})}},vt=i(93132),pt=i(93561),se={Add:function(h){return(0,L.request)("/api/finalcraftsteps/add",{method:"POST",data:K()({},h)})},Del:function(h){return(0,L.request)("/api/finalcraftsteps/del",{method:"POST",data:K()({},h)})},Update:function(h){return(0,L.request)("/api/finalcraftsteps/update",{method:"POST",data:K()({},h)})},Detail:function(h){return(0,L.request)("/api/finalcraftsteps/detail?id=".concat(h),{method:"GET"})},List:function(h){return(0,L.request)("/api/finalcraftsteps/list",{method:"POST",data:K()({},h)})},PagedList:function(h){return(0,L.request)("/api/finalcraftsteps/pagedlist",{method:"POST",data:K()({},h)})},BatchUpdate:function(h){return(0,L.request)("/api/finalcraftsteps/batchupdate",{method:"POST",data:h})},Copyfinalcraftsteps:function(h){return(0,L.request)("/api/finalcraftsteps/copyfinalcraftsteps",{method:"POST",data:h})}},Zn=i(57632),ht=i(16940),xn=i(48223),gt=i(26346),J={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"},Cn=function(){var h=b.Z.useForm(),$=g()(h,1),N=$[0],oe=b.Z.useForm(),k=g()(oe,1),Y=k[0],le=(0,f.useState)(!1),W=g()(le,2),ge=W[0],U=W[1],Se=(0,f.useState)(!1),de=g()(Se,2),H=de[0],w=de[1],ce=(0,f.useRef)(),O=(0,f.useRef)(),$e=(0,f.useState)([]),ye=g()($e,2),Z=ye[0],Pe=ye[1],Q=(0,f.useState)([]),je=g()(Q,2),ee=je[0],ke=je[1],Fe=(0,f.useState)(),Me=g()(Fe,2),_=Me[0],De=Me[1],We=b.Z.useForm(),ze=g()(We,1),ae=ze[0],fe=(0,f.useState)(!1),Ne=g()(fe,2),Ee=Ne[0],ie=Ne[1],S=(0,f.useRef)(),I=(0,f.useState)(),P=g()(I,2),x=P[0],C=P[1],D=(0,f.useState)(),B=g()(D,2),V=B[0],z=B[1],Ge=(0,f.useState)(),Ue=g()(Ge,2),yn=Ue[0],we=Ue[1],Fn=(0,f.useState)(),St=g()(Fn,2),Dn=St[0],Ie=St[1],En=(0,f.useState)([]),Pt=g()(En,2),In=Pt[0],On=Pt[1],Tn=(0,f.useState)([]),jt=g()(Tn,2),bn=jt[0],Bn=jt[1],Ln=(0,f.useState)(),Zt=g()(Ln,2),re=Zt[0],xt=Zt[1],An=(0,f.useState)(),Ct=g()(An,2),G=Ct[0],Rn=Ct[1],Mn=(0,f.useState)(),_t=g()(Mn,2),Oe=_t[0],Nn=_t[1],Un=(0,f.useState)([]),yt=g()(Un,2),qe=yt[0],Ft=yt[1],wn=(0,f.useState)(),Dt=g()(wn,2),Et=Dt[0],It=Dt[1],Vn=(0,f.useState)(),Ot=g()(Vn,2),Tt=Ot[0],Kn=Ot[1],Jn=(0,f.useState)([]),bt=g()(Jn,2),pa=bt[0],ha=bt[1],$n=(0,f.useState)(0),Bt=g()($n,2),Lt=Bt[0],ga=Bt[1],kn=(0,f.useState)(!1),At=g()(kn,2),Wn=At[0],Xe=At[1],zn=(0,f.useState)([]),Rt=g()(zn,2),Ye=Rt[0],Gn=Rt[1],qn=(0,f.useState)(!1),Mt=g()(qn,2),Xn=Mt[0],Nt=Mt[1],Yn=(0,f.useState)(!1),Ut=g()(Yn,2),Hn=Ut[0],Te=Ut[1],Qn=(0,f.useState)([]),wt=g()(Qn,2),ea=wt[0],me=wt[1],Ze=(0,f.useRef)(),ta=(0,f.useState)("\u6B65\u9AA4\u5217\u8868"),Vt=g()(ta,2),na=Vt[0],aa=Vt[1],ia=(0,f.useState)(),Kt=g()(ia,2),ra=Kt[0],Jt=Kt[1],ua=(0,f.useState)([]),$t=g()(ua,2),kt=$t[0],Wt=$t[1],sa=b.Z.useForm(),oa=g()(sa,1),be=oa[0],la=(0,f.useState)(),zt=g()(la,2),Be=zt[0],da=zt[1],Sa=b.Z.useWatch("processId",ae),ca=[{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 r=d()(c()().mark(function t(){var a,l;return c()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,vt.Z.selectlist();case 2:return a=u.sent,l=a.data,l.map(function(m){return m.label=m.value,m.value=m.key}),u.abrupt("return",l);case 6:case"end":return u.stop()}},t)}));function o(){return r.apply(this,arguments)}return o}()},{title:"\u57FA\u7840\u64CD\u4F5C",valueType:"option",fixed:"right",key:"option",render:function(o,t){return[(0,e.jsx)(T.ZP,{type:"primary",size:"small",onClick:d()(c()().mark(function a(){var l;return c()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:U(!0),l={finalId:t.id},De(t),Je.List(l).then(function(m){m.statusCode===200&&(Pe(m.data),z(!0)),U(!1)}).catch(function(){z(!1),U(!1)});case 4:case"end":return u.stop()}},a)})),children:"\u914D\u65B9\u8BBE\u7F6E"},"peifang"),(0,e.jsx)(T.ZP,{type:"primary",size:"small",onClick:d()(c()().mark(function a(){var l;return c()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:ie(!0),C("\u6210\u54C1\u7F16\u8F91"),l=JSON.parse(JSON.stringify(t)),l.state=l.state==="0",ae.setFieldsValue(l);case 5:case"end":return u.stop()}},a)})),children:"\u7F16\u8F91"},"edit"),(0,e.jsx)(Ae.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){var l={id:t.id};ne.Z.Del(l).then(function(p){if(p.statusCode===200){var u;F.ZP.success(p.statusCode===200?"\u5220\u9664\u6210\u529F":p.message),(u=S.current)===null||u===void 0||u.reload()}})},onCancel:function(){F.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,e.jsx)(T.ZP,{type:"primary",danger:!0,size:"small",children:"\u5220\u9664"})},"del")]}},{title:"\u8BBE\u8BA1\u64CD\u4F5C",valueType:"option",fixed:"right",key:"option",render:function(o,t){var a;return[(0,e.jsx)(T.ZP,{type:"primary",size:"small",onClick:d()(c()().mark(function l(){var p;return c()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:De(t),we(!0),p=JSON.parse(JSON.stringify(t)),Y.setFieldsValue(p);case 4:case"end":return m.stop()}},l)})),children:"\u7ED1\u5B9A\u4EA7\u7EBF"},"chanxian"),(0,e.jsx)(T.ZP,{disabled:((a=t.lineId)===null||a===void 0?void 0:a.length)==0,type:"primary",size:"small",onClick:d()(c()().mark(function l(){var p;return c()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:Ie(!0),De(t),It(0),ne.Z.LineList(t.id).then(function(j){j.statusCode===200&&(Bn(j.data),xt(j.data[0]),qt(j.data[0].key,t==null?void 0:t.id))}),p=JSON.parse(JSON.stringify(t)),Y.setFieldsValue(p),Je.List({finalId:t.id}).then(function(j){j.statusCode===200&&(j.data.map(function(y){return y.value=y.id,y.label=y.materialName}),console.log(j.data),da(j.data))});case 7:case"end":return m.stop()}},l)})),children:"\u8BBE\u7F6E\u5DE5\u827A"},"chanxian")]}}],fa=function(){var r=d()(c()().mark(function o(t){var a,l,p,u;return c()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(console.log("values",t),!t.id){j.next=8;break}return j.next=4,ne.Z.Update(t);case 4:a=j.sent,a.statusCode===200?(F.ZP.success("\u4FEE\u6539\u6210\u529F"),(l=S.current)===null||l===void 0||l.reload(),ie(!1)):F.ZP.error(JSON.stringify(a.errors)||"\u4FEE\u6539\u5931\u8D25"),j.next=12;break;case 8:return j.next=10,ne.Z.Add(t);case 10:p=j.sent,p.statusCode===200?(F.ZP.success("\u6DFB\u52A0\u6210\u529F"),(u=S.current)===null||u===void 0||u.reload(),ie(!1)):F.ZP.error(JSON.stringify(p.errors)||"\u6DFB\u52A0\u5931\u8D25");case 12:case"end":return j.stop()}},o)}));return function(t){return r.apply(this,arguments)}}();(0,f.useEffect)(function(){vt.Z.selectlist().then(function(r){r.statusCode===200&&On(r.data)})},[]);var ma=(0,f.useState)([]),Gt=g()(ma,2),Pa=Gt[0],ja=Gt[1],qt=function(o,t){pt.Z.List({lineId:o,finalId:t}).then(function(a){a.statusCode===200&&Ft(a.data)})},va=(0,f.useState)([]),Xt=g()(va,2),Za=Xt[0],xa=Xt[1];return(0,e.jsxs)(e.Fragment,{children:[Dn?(0,e.jsxs)(_e.Z,{size:"default",title:"\u5F53\u524D\u914D\u7F6E\u6210\u54C1\u5DE5\u827A: "+(_==null?void 0:_.name),styles:{header:{textAlign:"center",margin:"auto",fontSize:"22px"}},extra:re&&qe.length>0?(0,e.jsxs)(Ae.Z,{title:"\u786E\u5B9A\u8981\u4FDD\u5B58\u5F53\u524D\u914D\u7F6E\uFF1F",onConfirm:function(o){ne.Z.Saveconfigstatus({LineId:re.key,finalId:_.id}).then(function(t){t.statusCode===200?(F.ZP.success("\u4FDD\u5B58\u6210\u529F!"),setTimeout(function(){Ie(!1)},1e3)):F.ZP.error(t.errors||t.message)})},onCancel:function(){F.ZP.info("\u672A\u4FDD\u5B58\u914D\u7F6E"),Ie(!1)},children:[" ",(0,e.jsx)(T.ZP,{style:{position:"absolute",top:"20px",right:"20px"},icon:(0,e.jsx)(gt.Z,{}),type:"primary",size:"small",children:"\u8FD4\u56DE"})]}):(0,e.jsx)(T.ZP,{onClick:function(){Ie(!1)},style:{position:"absolute",top:"20px",right:"20px"},icon:(0,e.jsx)(gt.Z,{}),type:"primary",size:"small",children:"\u8FD4\u56DE"}),children:[(0,e.jsx)(dt.Z,{}),(0,e.jsx)(_e.Z,{title:"\u9009\u62E9\u4EA7\u7EBF",children:(0,e.jsx)("div",{className:J.tag,children:bn.map(function(r,o){return(0,e.jsx)(ct.Z.Ribbon,{text:r.status=="0"?"\u672A\u914D\u7F6E":"\u5DF2\u914D\u7F6E",color:r.status=="0"?"":"pink",children:(0,e.jsxs)("div",{onClick:function(){console.log(r),xt(r),It(o),Kn(-1),pt.Z.List({lineId:r.key,finalId:_.id}).then(function(a){a.statusCode===200&&Ft(a.data)})},className:"".concat(J.tag_item," ").concat(o===Et?J.tag_item_activeItem:""),children:[(0,e.jsx)(he.Z,{size:"small",children:(0,e.jsx)("div",{children:r.value})}),(0,e.jsx)("div",{className:o===Et?J.tag_item_active:""})]},o)})})})}),qe.length>0?(0,e.jsx)(_e.Z,{title:"\u4EA7\u7EBF\u5DE5\u5E8F\u8DEF\u7EBF",extra:(0,e.jsx)(he.Z,{direction:"horizontal",children:(0,e.jsx)(Ae.Z,{title:"\u786E\u5B9A\u8981\u4FDD\u5B58\u914D\u7F6E?\u4FDD\u5B58\u6210\u529F\u540E\u5C06\u8FD4\u56DE\u6210\u54C1\u5217\u8868\u3002",onConfirm:function(){ne.Z.Saveconfigstatus({LineId:re.key,finalId:_.id}).then(function(o){o.statusCode===200?(F.ZP.success("\u4FDD\u5B58\u6210\u529F!"),setTimeout(function(){Ie(!1)},1e3)):F.ZP.error(o.errors||o.message)})},children:(0,e.jsx)(T.ZP,{size:"small",type:"primary",danger:!0,children:"\u4FDD\u5B58\u914D\u7F6E"})},"save")}),children:(0,e.jsx)(Qe.Z.Group,{onChange:function(){},children:(0,e.jsx)("div",{className:J.gongyi_tag,children:(0,e.jsx)(Pn.Z,{wrap:!0,gap:"small",children:qe.map(function(r,o){return(0,e.jsxs)("div",{className:J.gongyi_tag_box,children:[(0,e.jsxs)("div",{className:"".concat(J.gongyi_tag_item," ").concat(o===Tt?J.gongyi_tag_item_activeItem:""),children:[(0,e.jsx)(he.Z,{size:"middle",children:(0,e.jsxs)("div",{color:"#2db7f5",style:{fontSize:"22px"},children:[" 0",o+1,"-",r.processName]})}),(0,e.jsx)("div",{className:o===Tt?J.gongyi_tag_item_active:""})]}),(0,e.jsx)(_e.Z,{title:"\u6240\u5C5E\u8BBE\u5907",size:"small",bordered:!1,style:{height:"200px",overflowY:"auto",overflowX:"hidden"},className:J.gongyi_tag_device,children:r.devicesInfo.length>0?(0,e.jsx)(he.Z,{title:"\u8BBE\u5907",direction:"vertical",children:r.devicesInfo.map(function(t,a){return(0,e.jsx)(ct.Z.Ribbon,{text:t.status=="0"?"\u672A\u8BBE\u7F6E":"\u5DF2\u8BBE\u7F6E",color:t.status=="0"?"":"pink",children:(0,e.jsx)(Qe.Z,{onClick:function(p){Rn(r),Nn(t.code),aa(r.processName+"-"+t.name+"["+t.code+"]"),console.log("currentproductionline",re),w(!0);var u={lineId:re.key,deviceId:t.code,finalId:_.id,productLineStepsId:r.id};Jt(u)},size:"small",title:t.name,value:t.id})})})}):(0,e.jsx)(ft.Z,{description:"\u672A\u7ED1\u5B9A\u8BBE\u5907"})}),(0,e.jsx)(dt.Z,{})]},o)})})})})}):(0,e.jsx)(ft.Z,{description:"\u672A\u914D\u7F6E\u5DE5\u5E8F\u8DEF\u7EBF"})]}):(0,e.jsx)(He.Z,{columns:ca,actionRef:S,cardBordered:!0,bordered:!0,scroll:{x:!0},rowClassName:function(o,t,a){return t%2===0?"":"even-row-background"},request:d()(c()().mark(function r(){var o,t,a,l=arguments;return c()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=l.length>0&&l[0]!==void 0?l[0]:{},t={pageIndex:o.current||1,pageSize:o.pageSize||10,name:o.name||"",code:o.code||""},u.next=4,ne.Z.PagedList(t);case 4:if(a=u.sent,a.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:a.data.items,success:!0,total:a.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},r)})),rowKey:"id",pagination:{pageSize:10,showSizeChanger:!1},dateFormatter:"string",headerTitle:"\u6210\u54C1\u5217\u8868",toolBarRender:function(){return[(0,e.jsx)(T.ZP,{type:"primary",onClick:function(){ae.resetFields(),ie(!0),C("\u65B0\u589E\u6210\u54C1")},children:"\u65B0\u589E\u6210\u54C1"},"button")]}},"myTable"),(0,e.jsx)(ue.Z,{maskClosable:!1,open:H,width:1e3,onCancel:function(){w(!1),qt(re.key,_.id)},onOk:function(){return w(!1)},footer:!1,children:(0,e.jsx)(Yt.Z,{tableStyle:{overflowY:"auto",overflowX:"hidden",maxHeight:"500px"},toolBarRender:function(){return[(0,e.jsx)(T.ZP,{type:"primary",disabled:Lt<0,onClick:function(){N.resetFields(),Te(!0),me([]),U(!0);var t={deviceProductId:_==null?void 0:_.deviceProductId};ht.Z.List(t).then(function(a){a.succeeded&&(Wt(a.data),setTimeout(function(){var l=a.data.find(function(m){return m.id===""});if(l!=null&&l.params){var p=JSON.parse(l==null?void 0:l.params);console.log(p);var u=[];p.map(function(m){var j={title:m.paramName,dataIndex:m.paramCode,width:"md",renderFormItem:function(xe,R,Ve){return m.paramType===1?(0,e.jsx)(q.Z,{mode:"multiple",options:Be}):(0,e.jsx)(X.Z,{addonAfter:m.paramUnit})},colProps:{xs:24,md:12}};u.push(j)}),console.log(u),me(u)}U(!1)},200))})},children:"\u6DFB\u52A0\u5DE5\u827A\u53C2\u6570"}),(0,e.jsx)(T.ZP,{type:"primary",danger:!0,disabled:Lt<0,onClick:function(){console.log("sss",G==null?void 0:G.devicesInfo);var t=JSON.stringify(G==null?void 0:G.devicesInfo),a=JSON.parse(t),l=a.filter(function(p){return p.code!=Oe});Gn(l),Xe(!0)},children:"\u4F7F\u7528\u540C\u7C7B\u578B\u8BBE\u5907\u914D\u7F6E"})]},actionRef:Ze,headerTitle:na,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(o,t,a){return(0,e.jsx)("span",{className:"customRender",children:"".concat(a+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(o,t,a,l,p){var u=JSON.parse(t==null?void 0:t.deviceFunParams);if(t!=null&&t.deviceStepParms){var m=JSON.parse(t==null?void 0:t.deviceStepParms),j=[];return m&&(u==null||u.map(function(y,xe){Object.keys(m).forEach(function(R,Ve){if(y.paramCode==R)if(y.paramType==1){var ve,pe="";(ve=m[R])===null||ve===void 0||ve.map(function(te){pe==""?pe=Be.find(function(Le){return Le.value==te}).label:pe=pe+","+Be.find(function(Le){return Le.value==te}).label}),j.push({name:y.paramName+":"+pe})}else j.push({name:y.paramName+":"+m[R]+y.paramUnit})})})),(0,e.jsx)(he.Z,{size:"small",direction:"vertical",align:"start",children:j.map(function(y){return(0,e.jsx)(Re.Z,{children:y.name})})})}}},{title:"\u64CD\u4F5C",align:"center",valueType:"option",fixed:"right",key:"option",render:function(o,t,a,l){return[(0,e.jsxs)(he.Z,{size:"middle",children:[(0,e.jsx)(T.ZP,{type:"primary",ghost:!0,onClick:d()(c()().mark(function p(){var u,m;return c()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:Te(!0),me([]),U(!0),u=JSON.parse(JSON.stringify(t)),N.setFieldsValue(u),console.log("recor1d",t.deviceProductFunctionId),m={deviceProductId:_==null?void 0:_.deviceProductId},ht.Z.List(m).then(function(xe){xe.succeeded&&(Wt(xe.data),setTimeout(function(){var R=xe.data.find(function(te){return te.id===t.deviceProductFunctionId});if(R!=null&&R.params){var Ve=JSON.parse(R==null?void 0:R.params);console.log(Ve);var ve=[];Ve.map(function(te){var Le={title:te.paramName,dataIndex:te.paramCode,width:"md",renderFormItem:function(_a,ya,Fa){return te.paramType===1?(0,e.jsx)(q.Z,{mode:"multiple",options:Be}):(0,e.jsx)(X.Z,{addonAfter:te.paramUnit})},colProps:{xs:24,md:12}};ve.push(Le)}),console.log(ve),me(ve)}if(be&&t.params){var pe=JSON.parse(t.params);be.setFieldsValue(pe)}U(!1)},200))});case 8:case"end":return y.stop()}},p)})),children:"\u914D\u7F6E\u8BBE\u5907\u53C2\u6570"}),(0,e.jsx)(Ae.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){var u={id:t.id,step:0,craftId:"",deviceProductId:""};se.Del(u).then(function(m){m.statusCode===200&&(F.ZP.success(m.statusCode===200?"\u5220\u9664\u6210\u529F":m.message),l==null||l.reload())})},onCancel:function(){F.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,e.jsx)(T.ZP,{type:"primary",danger:!0,ghost:!0,children:"\u5220\u9664"})},(0,Zn.Z)())]})]}}],rowKey:"step",search:!1,pagination:!1,params:ra,request:d()(c()().mark(function r(){var o,t,a,l=arguments;return c()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(o=l.length>0&&l[0]!==void 0?l[0]:{},o.deviceId){u.next=3;break}return u.abrupt("return",{data:[],success:!0});case 3:return t={lineId:o.lineId,finalId:o.finalId,deviceId:o.deviceId,productLineStepsId:o.productLineStepsId},u.next=6,se.List(t);case 6:if(a=u.sent,a.statusCode!==200){u.next=11;break}return u.abrupt("return",{data:a.data,success:!0,total:a.data});case 11:return u.abrupt("return",{data:[],success:!1});case 12:case"end":return u.stop()}},r)})),dragSortKey:"step",onDragSortEnd:function(o,t,a){console.log("newDataSource",a),a.map(function(l,p){l.step=p+1}),console.log("\u6392\u5E8F\u540E\u7684\u6570\u636E",a),se.BatchUpdate(a).then(function(l){if(l.data){var p;(p=Ze.current)===null||p===void 0||p.reload(),F.ZP.success("\u4FEE\u6539\u5217\u8868\u6392\u5E8F\u6210\u529F")}})}})}),(0,e.jsx)(ue.Z,{maskClosable:!1,width:800,title:(0,e.jsx)(Re.Z,{color:"#cd201f",children:x}),open:Ee,onCancel:function(){ie(!1)},footer:[(0,e.jsx)(T.ZP,{onClick:function(){ie(!1)},children:"\u8FD4\u56DE"},"back"),(0,e.jsx)(T.ZP,{form:"finalForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,e.jsxs)(b.Z,{form:ae,name:"basic",id:"finalForm",onFinish:fa,autoComplete:"off",children:[(0,e.jsx)(b.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,e.jsx)(X.Z,{})}),(0,e.jsx)(b.Z.Item,{label:"\u6210\u54C1\u7F16\u7801",name:"code",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,e.jsx)(X.Z,{})}),(0,e.jsx)(b.Z.Item,{name:"name",label:"\u6210\u54C1\u540D\u79F0",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}],children:(0,e.jsx)(X.Z,{})})]})},"01"),(0,e.jsx)(ue.Z,{maskClosable:!1,width:1200,title:"\u914D\u7F6E\u7269\u6599",open:V,destroyOnClose:!0,onCancel:function(){z(!1),Pe([])},onOk:function(){var o=JSON.parse(JSON.stringify(Z));o.map(function(t){t.finalId=_.id}),console.log("list",o),Je.BatchAdd(o).then(function(t){t.statusCode===200?(F.ZP.success("\u4FDD\u5B58\u6210\u529F!"),z(!1)):F.ZP.error("\u4FDD\u5B58\u5931\u8D25!")})},children:(0,e.jsx)(mt.Z,{spinning:ge,children:(0,e.jsx)(Ht.Z,{children:(0,e.jsx)("div",{style:{maxWidth:1200,margin:"auto"},children:(0,e.jsx)(gn,{rowKey:"id",controlled:!0,editableFormRef:ce,actionRef:O,columns:[{title:"\u7269\u6599\u540D\u79F0",dataIndex:"materialId",valueType:"select",ellipsis:!0,request:function(){var r=d()(c()().mark(function t(){var a,l;return c()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,xn.Z.List();case 2:return a=u.sent,l=[],a.statusCode===200&&(ke(a.data),a.data.map(function(m){return l.push({label:"".concat(m.name,"[").concat(m.unit,"]"),value:m.id})})),u.abrupt("return",l);case 6:case"end":return u.stop()}},t)}));function o(){return r.apply(this,arguments)}return o}(),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(o,t){return[(0,e.jsx)(T.ZP,{type:"primary",ghost:!0,onClick:function(){var l;console.log(t),(l=O.current)===null||l===void 0||l.startEditable(t.id)},children:"\u7F16\u8F91\u539F\u6599"},"edit")]}}],value:Z,recordCreatorProps:{record:function(){return{id:Date.now().toString(),materialId:"",finalId:"",weight:"",mode:""}}},editable:{form:N,type:"single",onValuesChange:function(o,t){console.log(ee),t?Pe(t):(Z.push(o),Pe(Z)),console.log("materiallist",Z)},actionRender:function(o,t,a){return[a.delete,a.save,a.cancel]}}})})})})},"02"),(0,e.jsx)(ue.Z,{maskClosable:!1,width:500,title:"\u7ED1\u5B9A\u4EA7\u7EBF",open:yn,destroyOnClose:!0,onCancel:function(){we(!1)},footer:[(0,e.jsx)(T.ZP,{onClick:function(){we(!1)},children:"\u8FD4\u56DE"},"back"),(0,e.jsx)(T.ZP,{form:"bindlineForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,e.jsx)(b.Z,{id:"bindlineForm",form:Y,onFinish:function(o){ne.Z.BindLine({finalId:_.id,LineId:o.lineId}).then(function(t){if(t.statusCode===200){var a;F.ZP.info("\u64CD\u4F5C\u6210\u529F!"),we(!1),(a=S.current)===null||a===void 0||a.reload()}else F.ZP.error("\u64CD\u4F5C\u5931\u8D25!")})},children:(0,e.jsx)(b.Z.Item,{label:"\u8BF7\u9009\u62E9\u4EA7\u7EBF",name:"lineId",children:(0,e.jsx)(q.Z,{placeholder:"\u8BF7\u9009\u62E9\u4EA7\u7EBF",mode:"multiple",children:In.map(function(r){return(0,e.jsx)(q.Z.Option,{value:r.key,children:(0,e.jsx)("span",{children:r.value})},r.key)})})})})},"03"),(0,e.jsx)(ue.Z,{maskClosable:!1,destroyOnClose:!0,width:800,title:(0,e.jsx)(Re.Z,{color:"#cd201f",children:" \u5DE5\u827A\u6B65\u9AA4\u8BBE\u5907\u53C2\u6570\u4FE1\u606F"}),open:Hn,onCancel:function(){Te(!1),be.resetFields(),me([])},footer:!1,children:(0,e.jsxs)(mt.Z,{spinning:ge,children:[(0,e.jsxs)(b.Z,{form:N,name:"basic1",id:"myForm1111",labelCol:{span:4},wrapperCol:{span:12},autoComplete:"off",children:[(0,e.jsx)(b.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,e.jsx)(X.Z,{})}),(0,e.jsx)(b.Z.Item,{label:"\u8BBE\u5907\u529F\u80FD\u4FE1\u606F",name:"deviceProductFunctionId",rules:[{required:!0,message:"\u6B64\u9879\u5FC5\u586B\uFF01"}],children:(0,e.jsx)(q.Z,{placeholder:"\u8BF7\u9009\u62E9\u529F\u80FD",onChange:function(o,t){var a=kt.find(function(u){return u.id===o});if(a!=null&&a.params){var l=JSON.parse(a==null?void 0:a.params);console.log(l);var p=[];l.map(function(u){var m={title:u.paramName,dataIndex:u.paramCode,width:"md",renderFormItem:function(y,xe,R){return u.paramType===1?(0,e.jsx)(q.Z,{mode:"multiple",options:Be}):(0,e.jsx)(X.Z,{placeholder:"\u8BF7\u8F93\u5165",addonAfter:u.paramUnit})},colProps:{xs:24,md:12}};p.push(m)}),me(p)}else me([])},children:kt.map(function(r){return(0,e.jsx)(q.Z.Option,{value:r.id,children:(0,e.jsx)("span",{children:r.name})},r.id)})})}),(0,e.jsx)(b.Z.Item,{label:"\u5907\u6CE8",name:"description",children:(0,e.jsx)(X.Z,{})})]}),(0,e.jsx)(_e.Z,{children:(0,e.jsx)(Sn.Z,{trigger:(0,e.jsx)("a",{children:"\u70B9\u51FB\u6211"}),rowProps:{gutter:[16,16]},colProps:{span:12},grid:!0,onFinish:function(){var r=d()(c()().mark(function o(t){var a,l,p;return c()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(a=N.getFieldsValue(),a.deviceProductFunctionId){m.next=4;break}return F.ZP.error("\u8BF7\u9009\u62E9\u8BBE\u5907\u4EA7\u54C1\u529F\u80FD"),m.abrupt("return");case 4:a.id?(l={id:a.id,deviceProductFunctionId:a.deviceProductFunctionId,params:JSON.stringify(t),description:a.description,deviceId:""},se.Update(l).then(function(j){if(j.data){var y;(y=Ze.current)===null||y===void 0||y.reload(),F.ZP.success("\u4FEE\u6539\u6210\u529F\uFF01"),Te(!1)}})):(p={productLineStepsId:G.id,description:a.description,deviceId:Oe,finalId:_.id,deviceProductFunctionId:a.deviceProductFunctionId,params:JSON.stringify(t)},se.Add(p).then(function(j){if(j.statusCode===200){var y;(y=Ze.current)===null||y===void 0||y.reload(),F.ZP.info("\u6DFB\u52A0\u6210\u529F"),Te(!1)}else F.ZP.error(j.errors)}));case 5:case"end":return m.stop()}},o)}));return function(o){return r.apply(this,arguments)}}(),columns:ea,form:be})})]})}),(0,e.jsx)(ue.Z,{maskClosable:!1,destroyOnClose:!0,width:800,open:Xn,onCancel:function(){Nt(!1)},footer:!1,title:(0,e.jsx)(Re.Z,{color:"#cd201f",children:" \u6DFB\u52A0\u6B65\u9AA4 "}),children:(0,e.jsx)(lt.A,{form:ae,onFinish:function(){var r=d()(c()().mark(function o(t){var a;return c()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:a={productLineStepsId:G.id,description:t.description,deviceId:Oe,finalId:_.id,deviceProductFunctionId:"",params:""},console.log("11111111",a),se.Add(a).then(function(u){if(u.statusCode===200){var m;F.ZP.info("\u6DFB\u52A0\u6210\u529F"),Nt(!1),(m=Ze.current)===null||m===void 0||m.reload()}else F.ZP.error(u.errors)});case 3:case"end":return p.stop()}},o)}));return function(o){return r.apply(this,arguments)}}(),children:(0,e.jsx)(b.Z.Item,{label:"\u6B65\u9AA4\u5907\u6CE8",name:"description",children:(0,e.jsx)(X.Z,{})})})}),(0,e.jsx)(ue.Z,{maskClosable:!1,destroyOnClose:!0,width:800,open:Wn,onCancel:function(){Xe(!1)},footer:!1,children:(0,e.jsx)(lt.A,{onFinish:function(o){se.Copyfinalcraftsteps({finalId:_==null?void 0:_.id,lineId:re.key,copyDeviceId:o.deviceId,productLineStepsId:G.id,toDeviceId:Oe}).then(function(t){t.statusCode===200&&(F.ZP.success("\u540C\u6B65\u6210\u529F!"),Xe(!1),setTimeout(function(){var a,l={lineId:re.key,deviceId:Oe,finalId:_==null?void 0:_.id,productLineStepsId:G.id};Jt(l),(a=Ze.current)===null||a===void 0||a.reload()},2e3))})},children:(0,e.jsx)(b.Z.Item,{label:"\u8BBE\u5907",name:"deviceId",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,e.jsx)(q.Z,{onChange:function(o){},placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",style:{width:375},children:Ye==null?void 0:Ye.map(function(r){return(0,e.jsx)(q.Z.Option,{value:r.code,children:(0,e.jsx)("span",{children:r.name+"["+r.code+"]"})},r.code)})})})})})]})},_n=Cn}}]);