(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6264],{64317:function(H,U,t){"use strict";var Z=t(28991),x=t(81253),w=t(85893),D=t(22270),b=t(67294),B=t(66758),o=t(31649),d=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],K=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],f=b.forwardRef(function(l,Q){var X=l.fieldProps,se=l.children,J=l.params,ue=l.proFieldProps,$=l.mode,ie=l.valueEnum,V=l.request,oe=l.showSearch,G=l.options,le=(0,x.Z)(l,d),N=(0,b.useContext)(B.Z);return(0,w.jsx)(o.Z,(0,Z.Z)((0,Z.Z)({valueEnum:(0,D.h)(ie),request:V,params:J,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,Z.Z)({options:G,mode:$,showSearch:oe,getPopupContainer:N.getPopupContainer},X),ref:Q,proFieldProps:ue},le),{},{children:se}))}),S=b.forwardRef(function(l,Q){var X=l.fieldProps,se=l.children,J=l.params,ue=l.proFieldProps,$=l.mode,ie=l.valueEnum,V=l.request,oe=l.options,G=(0,x.Z)(l,K),le=(0,Z.Z)({options:oe,mode:$||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},X),N=(0,b.useContext)(B.Z);return(0,w.jsx)(o.Z,(0,Z.Z)((0,Z.Z)({valueEnum:(0,D.h)(ie),request:V,params:J,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,Z.Z)({getPopupContainer:N.getPopupContainer},le),ref:Q,proFieldProps:ue},G),{},{children:se}))}),C=f,u=S,M=C;M.SearchSelect=u,M.displayName="ProFormComponent",U.Z=M},5966:function(H,U,t){"use strict";var Z=t(28991),x=t(81253),w=t(85893),D=t(31649),b=["fieldProps","proFieldProps"],B=["fieldProps","proFieldProps"],o="text",d=function(C){var u=C.fieldProps,M=C.proFieldProps,l=(0,x.Z)(C,b);return(0,w.jsx)(D.Z,(0,Z.Z)({valueType:o,fieldProps:u,filedConfig:{valueType:o},proFieldProps:M},l))},K=function(C){var u=C.fieldProps,M=C.proFieldProps,l=(0,x.Z)(C,B);return(0,w.jsx)(D.Z,(0,Z.Z)({valueType:"password",fieldProps:u,proFieldProps:M,filedConfig:{valueType:o}},l))},f=d;f.Password=K,f.displayName="ProFormComponent",U.Z=f},68253:function(H){H.exports={card:"card___2Ik6n",anttabs:"anttabs___33d_r",errorIcon:"errorIcon___2zMXo",anticon:"anticon___3_5SY",errorPopover:"errorPopover___3FRQH",errorListItem:"errorListItem___-b-3Y",errorField:"errorField___3GCmP",editable:"editable___33Tfk"}},83341:function(H,U,t){"use strict";t.d(U,{O:function(){return Z}});function Z(x){x=x||32;for(var w="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",D=w.length,b="012345678",B=b.length,o="",d=0;d0&&h.data.forEach(function(j){v.push({stockuint:j.id,text:j.name,value:j.id,label:j.name})}),ge(v);case 6:case"end":return y.stop()}},c)}));return function(s){return i.apply(this,arguments)}}(),P=function(){var i=(0,S.Z)((0,d.Z)().mark(function c(s){var h,v;return(0,d.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,R.getTypeList();case 2:h=y.sent,v=[],h.data.length>0&&h.data.forEach(function(j){v.push({typeid:j.id,text:j.name,value:j.id,label:j.name})}),Be(v);case 6:case"end":return y.stop()}},c)}));return function(s){return i.apply(this,arguments)}}(),W=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(c,s){return(0,r.jsx)("a",{onClick:function(){me(s),Fe(!0)},children:c})}},{title:"\u7269\u6599\u540D\u79F0",dataIndex:"name",ellipsis:!0,formItemProps:{rules:[{required:!0,message:"\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u7269\u6599\u7F16\u7801",dataIndex:"code",ellipsis:!0},{title:"\u7269\u6599\u7C7B\u522B",dataIndex:"typeID",valueType:"select",hideInSearch:!0,fieldProps:{options:ye}},{title:"\u7269\u6599\u5355\u4F4D",dataIndex:"stockUint",valueType:"select",fieldProps:{options:z}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"date",hideInForm:!0,hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:350,render:function(c,s){return[(0,r.jsxs)("a",{onClick:function(){n(!0),q(s)},children:[" ","\u66F4\u65B0"]}),(0,r.jsx)(B.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){R.removeProduct([s.id]).then(function(v){v.succeeded?(f.default.success("\u5220\u9664\u6210\u529F"),O.current.reloadAndRest()):f.default.error(e.error)})},onCancel:function(){},children:(0,r.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,r.jsxs)(M.ZP,{ost:!0,header:{title:"",breadcrumb:{}},children:[(0,r.jsx)(Q.ZP,{headerTitle:"\u7269\u6599\u5217\u8868",actionRef:O,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,r.jsxs)(D.Z,{type:"primary",onClick:function(){var s={code:(0,Ve.O)(4)};q(s),n(!0)},children:[(0,r.jsx)(C.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var i=(0,S.Z)((0,d.Z)().mark(function c(s){var h,v;return(0,d.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return h=[],v=0,y.next=4,R.getpage(s).then(function(j){h=j.data.data,v=j.data.total});case 4:return y.abrupt("return",{data:h,success:!0,total:v});case 5:case"end":return y.stop()}},c)}));return function(c){return i.apply(this,arguments)}}(),columns:W,rowSelection:{onChange:function(c,s){re(s)}}}),(A==null?void 0:A.length)>0&&(0,r.jsx)(l.Z,{extra:(0,r.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,r.jsx)("a",{style:{fontWeight:600},children:A.length})," ","\u9879 \xA0\xA0"]}),children:(0,r.jsx)(D.Z,{type:"primary",onClick:(0,S.Z)((0,d.Z)().mark(function i(){var c,s;return(0,d.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,ze(A);case 2:re([]),(c=O.current)===null||c===void 0||(s=c.reloadAndRest)===null||s===void 0||s.call(c);case 4:case"end":return v.stop()}},i)})),children:"\u6279\u91CF\u5220\u9664"})}),(0,r.jsx)($e,{dicData:Te,uintListData:z,typeListData:ye,initUintList:F,initTypeList:P,onFinish:function(){var i=(0,S.Z)((0,d.Z)().mark(function c(s){var h;return(0,d.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(h=!1,console.log("value",s),q({}),!s.id){g.next=9;break}return g.next=6,Ne(s);case 6:h=g.sent,g.next=12;break;case 9:return g.next=11,Ge(s);case 11:h=g.sent;case 12:h&&(n(!1),O.current&&O.current.reloadAndRest()),O.current.reloadAndRest();case 14:case"end":return g.stop()}},c)}));return function(c){return i.apply(this,arguments)}}(),onCancel:function(){n(!1),q({})},modalVisible:Y,values:he||{}}),(0,r.jsx)(x.Z,{width:600,visible:ve,onClose:function(){me(void 0),Fe(!1)},closable:!1,children:(I==null?void 0:I.name)&&(0,r.jsx)(X.ZP,{column:2,title:I==null?void 0:I.name,request:(0,S.Z)((0,d.Z)().mark(function i(){return(0,d.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",{data:I||{}});case 1:case"end":return s.stop()}},i)})),params:{id:I==null?void 0:I.name},columns:W})})]})},Qe=He}}]);