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

  1. "use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[472],{99694:function(Pe,$,t){t.r($),t.d($,{default:function(){return he}});var W=t(15009),f=t.n(W),X=t(99289),P=t.n(X),Y=t(5574),b=t.n(Y),h=t(67294),g=t(8232),G=t(86738),d=t(45360),E=t(14726),U=t(85576),T=t(49978),p=t(34041),C=t(3579),q=t(51042),ee=t(91),B=t(1413),ne=t(56874),te=t(87462),re=t(29245),se=t(32867),ae=function(i,y){return h.createElement(se.Z,(0,te.Z)({},i,{ref:y,icon:re.Z}))},le=h.forwardRef(ae),ue=le,V=t(86413),z=t(28459),L=t(85418),ie=t(93967),M=t.n(ie),e=t(85893),oe=["key","name"],de=function(i){var y=i.children,x=i.menus,c=i.onSelect,D=i.className,I=i.style,O=(0,h.useContext)(z.ZP.ConfigContext),Z=O.getPrefixCls,_=Z("pro-table-dropdown"),A=(0,V.Q)({onClick:function(j){return c&&c(j.key)},items:x==null?void 0:x.map(function(F){return{label:F.name,key:F.key}})});return(0,e.jsx)(L.Z,(0,B.Z)((0,B.Z)({},A),{},{className:M()(_,D),children:(0,e.jsxs)(E.ZP,{style:I,children:[y," ",(0,e.jsx)(ne.Z,{})]})}))},Q=function(i){var y=i.className,x=i.style,c=i.onSelect,D=i.menus,I=D===void 0?[]:D,O=i.children,Z=(0,h.useContext)(z.ZP.ConfigContext),_=Z.getPrefixCls,A=_("pro-table-dropdown"),F=(0,V.Q)({onClick:function(R){c==null||c(R.key)},items:I.map(function(j){var R=j.key,N=j.name,S=(0,ee.Z)(j,oe);return(0,B.Z)((0,B.Z)({key:R},S),{},{title:S.title,label:N})})});return(0,e.jsx)(L.Z,(0,B.Z)((0,B.Z)({},F),{},{className:M()(A,y),children:(0,e.jsx)("a",{style:x,children:O||(0,e.jsx)(ue,{})})}))};Q.Button=de;var ce=Q,me=t(83145),fe={tab_navbar_card:"tab_navbar_card___TM3Di",tab_navbar_active:"tab_navbar_active___PLvNu",tab_navbar_item:"tab_navbar_item___FaQZn",log_head_card:"log_head_card___e4OFg",log_head_card_text:"log_head_card_text____MQ82",log_card_data:"log_card_data___Uhh4q",log_data_pos:"log_data_pos___M3M6A",log_data_number:"log_data_number___Fh2Z2",log_data_text:"log_data_text___ApoMe",log_list_title:"log_list_title___l0YtY",log_detail_row:"log_detail_row___B6WKE",log_detail_item:"log_detail_item___JgTlO",log_detail_half:"log_detail_half___bh7yF",log_detail_item_last:"log_detail_item_last___w0ouH",log_detail_title:"log_detail_title____90Pu",log_detail_content:"log_detail_content___nhonA",tab_navbar_btn:"tab_navbar_btn___yQEXt",person_list:"person_list___ZO8Fs",person_list_item:"person_list_item___HkHZR",person_list_btn:"person_list_btn___ZGGz9",item_content:"item_content___btVdX"},ve=function(){var i=(0,h.useState)(!1),y=b()(i,2),x=y[0],c=y[1],D=(0,h.useState)(!1),I=b()(D,2),O=I[0],Z=I[1],_=(0,h.useState)({status:1,roleId:"",gender:1,id:"",sort:1,name:"",isAccount:!1}),A=b()(_,2),F=A[0],j=A[1],R=g.Z.useForm(),N=b()(R,1),S=N[0],ge=g.Z.useForm(),pe=b()(ge,1),v=pe[0],k=(0,h.useRef)(),xe=(0,h.useState)([]),H=b()(xe,2),J=H[0],Ze=H[1],je=[{title:"\u59D3\u540D",dataIndex:"name",key:"name"},{title:"\u767B\u5F55\u8D26\u53F7",dataIndex:"account",key:"account",hideInSearch:!0},{title:"\u6027\u522B",dataIndex:"gender",key:"gender",valueType:"select",hideInSearch:!1,valueEnum:{0:{text:"\u7537"},1:{text:"\u5973"}},render:function(l,n){return(0,e.jsx)(e.Fragment,{children:n.gender===0?(0,e.jsx)("div",{style:{color:"green"},children:"\u7537"}):(0,e.jsx)("div",{style:{color:"green"},children:"\u5973"})})}},{title:"\u89D2\u8272",search:!1,hideInSearch:!0,dataIndex:"roleId",key:"roleId",render:function(l,n){return(0,e.jsx)(e.Fragment,{children:function(){var a=J.find(function(r){return r.id===n.roleId});return a?(0,e.jsx)("div",{children:a.name}):(0,e.jsx)("div",{children:"\u672A\u77E5\u89D2\u8272"})}()})}},{title:"\u72B6\u6001",dataIndex:"status",key:"status",valueType:"select",hideInSearch:!1,valueEnum:{0:{text:"\u5728\u804C"},1:{text:"\u51FA\u5DEE"},2:{text:"\u79BB\u804C"}},render:function(l,n){return(0,e.jsx)(e.Fragment,{children:n.status===0?(0,e.jsx)("div",{style:{color:"green"},children:"\u5728\u804C"}):n.status===1?(0,e.jsx)("div",{style:{color:"Orange"},children:"\u51FA\u5DEE"}):(0,e.jsx)("div",{style:{color:"red"},children:"\u79BB\u804C"})})}},{title:"\u64CD\u4F5C",search:!1,key:"action",fixed:"right",valueType:"option",render:function(l,n){return[(0,e.jsx)(G.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:P()(f()().mark(function a(){var r,u;return f()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,C.BG.RemoveUser(n.id);case 2:r=o.sent,r.data===!0?(d.ZP.success("\u5220\u9664\u6210\u529F!"),(u=k.current)===null||u===void 0||u.reload()):d.ZP.error(r.msg||"\u5220\u9664\u5931\u8D25");case 4:case"end":return o.stop()}},a)})),onCancel:function(){d.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,e.jsx)("a",{children:"\u5220\u9664\u5458\u5DE5"})},"del"),(0,e.jsx)(G.Z,{title:"\u786E\u5B9A\u8981\u91CD\u7F6E\u5BC6\u7801\u5417\uFF1F",onConfirm:P()(f()().mark(function a(){var r;return f()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,C.BG.RestoreAccount(n.id);case 2:r=m.sent,r.data===!0?d.ZP.success("\u6210\u529F!"):d.ZP.error(r.msg||"\u91CD\u7F6E\u5931\u8D25");case 4:case"end":return m.stop()}},a)})),onCancel:function(){d.ZP.info("\u5DF2\u53D6\u6D88")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,e.jsx)("a",{children:"\u91CD\u7F6E\u5BC6\u7801"})},"reset"),(0,e.jsx)(ce,{onSelect:function(r){switch(r){case"edit":c(!0),j(n);var u=JSON.parse(JSON.stringify(n));S.setFieldsValue(u);break;case"shezhi":Z(!0),v.setFieldValue("tB_Employee_Id",n.id),v.setFieldValue("account",n.account);break;default:break}},menus:[{key:"edit",name:"\u7F16\u8F91"},{key:"shezhi",name:"\u8BBE\u7F6E\u767B\u5F55\u8D26\u53F7"}]},"actionGroup")]}}],ye=function(){j({status:1,roleId:"",gender:1,id:"",sort:1,name:""}),S.resetFields(),c(!0)},K=function(){var s=P()(f()().mark(function l(){var n;return f()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,C.ar.GetRoleList();case 2:n=r.sent,n.statusCode===200?Ze(n.data):d.ZP.error(n.msg||"\u83B7\u53D6\u89D2\u8272\u5217\u8868\u5931\u8D25");case 4:case"end":return r.stop()}},l)}));return function(){return s.apply(this,arguments)}}();(0,h.useEffect)(function(){x&&K()},[x]);var Ce=function(){var s=P()(f()().mark(function l(n){var a,r,u;return f()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!n.id){o.next=7;break}return o.next=3,C.BG.ModifyUser(n);case 3:r=o.sent,r.data===!0?(d.ZP.success("\u66F4\u65B0\u7528\u6237\u4FE1\u606F\u6210\u529F!"),c(!1)):d.ZP.error(r.msg||"\u66F4\u65B0\u7528\u6237\u4FE1\u606F\u5931\u8D25"),o.next=11;break;case 7:return o.next=9,C.BG.CreateUser(n);case 9:u=o.sent,u.statusCode===200?(d.ZP.success("\u521B\u5EFA\u6210\u529F!"),c(!1)):d.ZP.error(u.msg||"\u521B\u5EFA\u5931\u8D25");case 11:(a=k.current)===null||a===void 0||a.reload();case 12:case"end":return o.stop()}},l)}));return function(n){return s.apply(this,arguments)}}(),Fe=function(){var s=P()(f()().mark(function l(n){var a,r;return f()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,C.BG.BindAccount(n);case 2:a=m.sent,a.data===!0?(d.ZP.success("\u7ED1\u5B9A\u6210\u529F!"),k==null||(r=k.current)===null||r===void 0||r.reload(),Z(!1)):d.ZP.error(a.msg||"\u7ED1\u5B9A\u5931\u8D25");case 4:case"end":return m.stop()}},l)}));return function(n){return s.apply(this,arguments)}}();return(0,h.useEffect)(function(){K()},[]),(0,e.jsxs)("div",{className:fe.log_container,children:[(0,e.jsx)(me.Z,{columns:je,actionRef:k,cardBordered:!0,bordered:!0,scroll:{x:!0},rowClassName:function(l,n,a){return n%2===0?"":"even-row-background"},request:P()(f()().mark(function s(){var l,n,a=arguments;return f()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return l=a.length>0&&a[0]!==void 0?a[0]:{},u.next=3,C.BG.GetUserPagedList({name:l.name,status:l.status,pageIndex:l.current||1,pageSize:l.pageSize||10,gender:l.gender});case 3:if(n=u.sent,n.statusCode!==200){u.next=8;break}return u.abrupt("return",{data:n.data.items,success:!0,total:n.data.total});case 8:return d.ZP.error("\u83B7\u53D6\u7528\u6237\u5217\u8868\u51FA\u9519"),u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},s)})),rowKey:"id",pagination:{pageSize:10,showSizeChanger:!1},dateFormatter:"string",headerTitle:"\u4EBA\u5458\u5217\u8868",toolBarRender:function(){return[(0,e.jsx)(E.ZP,{icon:(0,e.jsx)(q.Z,{}),type:"primary",onClick:function(){return ye()},children:"\u6DFB\u52A0"},"button")]}}),(0,e.jsx)(U.Z,{maskClosable:!1,width:500,title:F.id===""?"\u65B0\u589E\u4EBA\u5458":"\u7F16\u8F91\u4EBA\u5458",open:x,onOk:function(l){c(!1)},onCancel:function(){return c(!1)},footer:[(0,e.jsx)(E.ZP,{onClick:function(){c(!1)},children:"\u8FD4\u56DE"},"back"),(0,e.jsx)(E.ZP,{form:"userForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,e.jsxs)(g.Z,{form:S,name:"basic",id:"userForm",onFinish:Ce,children:[(0,e.jsx)(g.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,e.jsx)(T.Z,{})}),(0,e.jsx)(g.Z.Item,{label:"\u59D3\u540D",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5458\u5DE5\u540D\u79F0\uFF01"}],children:(0,e.jsx)(T.Z,{})}),(0,e.jsx)(g.Z.Item,{label:"\u6027\u522B",name:"gender",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B\uFF01"}],children:(0,e.jsxs)(p.Z,{style:{width:"100%"},children:[(0,e.jsx)(p.Z.Option,{value:0,children:"\u7537"}),(0,e.jsx)(p.Z.Option,{value:1,children:"\u5973"})]})}),(0,e.jsx)(g.Z.Item,{label:"\u89D2\u8272",name:"roleId",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u89D2\u8272\uFF01"}],children:(0,e.jsx)(p.Z,{style:{width:"100%"},children:J.map(function(s){return(0,e.jsx)(p.Z.Option,{value:s.id,children:s.name},s.id)})})}),(0,e.jsx)(g.Z.Item,{label:"\u72B6\u6001",name:"status",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u72B6\u6001\uFF01"}],children:(0,e.jsxs)(p.Z,{style:{width:"100%"},children:[(0,e.jsx)(p.Z.Option,{value:0,children:"\u5728\u804C"}),(0,e.jsx)(p.Z.Option,{value:1,children:"\u51FA\u5DEE"}),(0,e.jsx)(p.Z.Option,{value:2,children:"\u79BB\u804C"})]})})]})}),(0,e.jsx)(U.Z,{maskClosable:!1,width:500,title:"\u7528\u6237\u8D26\u6237",open:O,onOk:function(){v==null||v.resetFields(),Z(!1)},onCancel:function(){v==null||v.resetFields(),Z(!1)},footer:[(0,e.jsx)(E.ZP,{onClick:function(){v==null||v.resetFields(),Z(!1)},children:"\u8FD4\u56DE"},"back"),(0,e.jsx)(E.ZP,{form:"setupUserForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,e.jsxs)(g.Z,{form:v,name:"basic",id:"setupUserForm",onFinish:Fe,children:[(0,e.jsx)(g.Z.Item,{label:"\u5458\u5DE5Id",name:"tB_Employee_Id",hidden:!0,children:(0,e.jsx)(T.Z,{})}),(0,e.jsx)(g.Z.Item,{label:"\u8D26\u6237\u540D",name:"account",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u6237\uFF01"}],children:(0,e.jsx)(T.Z,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u5B9A\u4E49\u8D26\u53F7\u540D"})})]})})]})},he=ve}}]);