(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6264],{64317:function(k,O,t){"use strict";var P=t(28991),D=t(81253),B=t(85893),b=t(22270),R=t(67294),Z=t(66758),E=t(31649),p=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],h=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],g=R.forwardRef(function(l,H){var ne=l.fieldProps,Q=l.children,ue=l.params,$=l.proFieldProps,se=l.mode,V=l.valueEnum,ie=l.request,G=l.showSearch,oe=l.options,A=(0,D.Z)(l,p),le=(0,R.useContext)(Z.Z);return(0,B.jsx)(E.Z,(0,P.Z)((0,P.Z)({valueEnum:(0,b.h)(V),request:ie,params:ue,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,P.Z)({options:oe,mode:se,showSearch:G,getPopupContainer:le.getPopupContainer},ne),ref:H,proFieldProps:$},A),{},{children:Q}))}),f=R.forwardRef(function(l,H){var ne=l.fieldProps,Q=l.children,ue=l.params,$=l.proFieldProps,se=l.mode,V=l.valueEnum,ie=l.request,G=l.options,oe=(0,D.Z)(l,h),A=(0,P.Z)({options:G,mode:se||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},ne),le=(0,R.useContext)(Z.Z);return(0,B.jsx)(E.Z,(0,P.Z)((0,P.Z)({valueEnum:(0,b.h)(V),request:ie,params:ue,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,P.Z)({getPopupContainer:le.getPopupContainer},A),ref:H,proFieldProps:$},oe),{},{children:Q}))}),S=g,i=f,M=S;M.SearchSelect=i,M.displayName="ProFormComponent",O.Z=M},5966:function(k,O,t){"use strict";var P=t(28991),D=t(81253),B=t(85893),b=t(31649),R=["fieldProps","proFieldProps"],Z=["fieldProps","proFieldProps"],E="text",p=function(S){var i=S.fieldProps,M=S.proFieldProps,l=(0,D.Z)(S,R);return(0,B.jsx)(b.Z,(0,P.Z)({valueType:E,fieldProps:i,filedConfig:{valueType:E},proFieldProps:M},l))},h=function(S){var i=S.fieldProps,M=S.proFieldProps,l=(0,D.Z)(S,Z);return(0,B.jsx)(b.Z,(0,P.Z)({valueType:"password",fieldProps:i,proFieldProps:M,filedConfig:{valueType:E}},l))},g=p;g.Password=h,g.displayName="ProFormComponent",O.Z=g},68253:function(k){k.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(k,O,t){"use strict";t.d(O,{O:function(){return P}});function P(D){D=D||32;for(var B="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",b=B.length,R="012345678",Z=R.length,E="",p=0;p0&&d.data.forEach(function(j){a.push({stockuint:j.id,text:j.name,value:j.id,label:j.name})}),ge(a);case 6:case"end":return m.stop()}},s)}));return function(u){return c.apply(this,arguments)}}(),v=function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){var d,a;return(0,h.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,w.getTypeList();case 2:d=m.sent,a=[],d.data.length>0&&d.data.forEach(function(j){a.push({typeid:j.id,text:j.name,value:j.id,label:j.name})}),We(a);case 6:case"end":return m.stop()}},s)}));return function(u){return c.apply(this,arguments)}}(),Y=function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,w.add(u).then(function(o){o.data?p.default.success("\u6DFB\u52A0\u6210\u529F"):p.default.error(e.error)});case 3:return a.abrupt("return",!0);case 6:return a.prev=6,a.t0=a.catch(0),p.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),a.abrupt("return",!1);case 10:case"end":return a.stop()}},s,null,[[0,6]])}));return function(u){return c.apply(this,arguments)}}(),I=function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,w.update(u).then(function(o){o.data?p.default.success("\u4FEE\u6539\u6210\u529F"):p.default.error(e.error)});case 3:return a.abrupt("return",!0);case 6:return a.prev=6,a.t0=a.catch(0),p.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),a.abrupt("return",!1);case 10:case"end":return a.stop()}},s,null,[[0,6]])}));return function(u){return c.apply(this,arguments)}}(),He=function(){return(W==null?void 0:W.length)>0&&(0,r.jsx)(b.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417?",onConfirm:Qe,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,r.jsx)(Z.Z,{type:"primary",children:"\u6279\u91CF\u5220\u9664"})})},Qe=function(){var s,u;Xe(W),ae([]),(s=U.current)===null||s===void 0||(u=s.reloadAndRest)===null||u===void 0||u.call(s)},Xe=function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(u){a.next=2;break}return a.abrupt("return",!0);case 2:return a.next=4,w.removeProduct(u.map(function(o){return o.id})).then(function(o){o.data?(p.default.success("\u5220\u9664\u6210\u529F"),U.current.reload()):p.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")});case 4:return a.abrupt("return",!0);case 5:case"end":return a.stop()}},s)}));return function(u){return c.apply(this,arguments)}}(),Ye=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(s,u){return(0,r.jsx)("a",{onClick:function(){me(u),De(!0)},children:s})}},{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:Pe}},{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(s,u){return[(0,r.jsxs)("a",{onClick:function(){K(!0),J(u)},children:[" ","\u66F4\u65B0"]}),(0,r.jsx)(b.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){w.removeProduct([u.id]).then(function(a){a.succeeded?(p.default.success("\u5220\u9664\u6210\u529F"),U.current.reload()):p.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)(l.ZP,{headerTitle:"\u7269\u6599\u5217\u8868",actionRef:U,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,r.jsxs)(Z.Z,{type:"primary",onClick:function(){var u={code:(0,Ne.O)(4)};J(u),K(!0)},children:[(0,r.jsx)(S.Z,{})," \u65B0\u5EFA"]},"primary"),(0,r.jsx)(He,{})]},request:function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){var d,a;return(0,h.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return d=[],a=0,m.next=4,w.getpage(u).then(function(j){d=j.data.data,a=j.data.total});case 4:return m.abrupt("return",{data:d,success:!0,total:a});case 5:case"end":return m.stop()}},s)}));return function(s){return c.apply(this,arguments)}}(),columns:Ye,rowSelection:{onChange:function(s,u){ae(u)}}}),(0,r.jsx)(Ge,{dicData:je,uintListData:z,typeListData:Pe,initUintList:x,initTypeList:v,onFinish:function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){var d;return(0,h.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(d=!1,console.log("value",u),J({}),!u.id){o.next=9;break}return o.next=6,I(u);case 6:d=o.sent,o.next=12;break;case 9:return o.next=11,Y(u);case 11:d=o.sent;case 12:d&&(K(!1),U.current&&U.current.reload()),U.current.reload();case 14:case"end":return o.stop()}},s)}));return function(s){return c.apply(this,arguments)}}(),onCancel:function(){K(!1),J({})},modalVisible:ce,values:he||{}}),(0,r.jsx)(D.Z,{width:600,visible:ve,onClose:function(){me(void 0),De(!1)},closable:!1,children:(L==null?void 0:L.name)&&(0,r.jsx)(H.ZP,{column:2,title:L==null?void 0:L.name,request:(0,g.Z)((0,h.Z)().mark(function c(){return(0,h.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",{data:L||{}});case 1:case"end":return u.stop()}},c)})),params:{id:L==null?void 0:L.name},columns:Ye})})]})},ke=ze}}]);