(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[264],{64317:function(X,A,a){"use strict";var x=a(28991),j=a(81253),w=a(85893),D=a(22270),U=a(67294),K=a(66758),i=a(50643),o=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],V=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],h=U.forwardRef(function(l,J){var q=l.fieldProps,ie=l.children,_=l.params,oe=l.proFieldProps,z=l.mode,le=l.valueEnum,k=l.request,de=l.showSearch,H=l.options,ce=(0,j.Z)(l,o),G=(0,U.useContext)(K.Z);return(0,w.jsx)(i.Z,(0,x.Z)((0,x.Z)({valueEnum:(0,D.h)(le),request:k,params:_,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,x.Z)({options:H,mode:z,showSearch:de,getPopupContainer:G.getPopupContainer},q),ref:J,proFieldProps:oe},ce),{},{children:ie}))}),y=U.forwardRef(function(l,J){var q=l.fieldProps,ie=l.children,_=l.params,oe=l.proFieldProps,z=l.mode,le=l.valueEnum,k=l.request,de=l.options,H=(0,j.Z)(l,V),ce=(0,x.Z)({options:de,mode:z||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},q),G=(0,U.useContext)(K.Z);return(0,w.jsx)(i.Z,(0,x.Z)((0,x.Z)({valueEnum:(0,D.h)(le),request:k,params:_,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,x.Z)({getPopupContainer:G.getPopupContainer},ce),ref:J,proFieldProps:oe},H),{},{children:ie}))}),F=h,u=y,O=F;O.SearchSelect=u,O.displayName="ProFormComponent",A.Z=O},5966:function(X,A,a){"use strict";var x=a(28991),j=a(81253),w=a(85893),D=a(50643),U=["fieldProps","proFieldProps"],K=["fieldProps","proFieldProps"],i="text",o=function(F){var u=F.fieldProps,O=F.proFieldProps,l=(0,j.Z)(F,U);return(0,w.jsx)(D.Z,(0,x.Z)({valueType:i,fieldProps:u,filedConfig:{valueType:i},proFieldProps:O},l))},V=function(F){var u=F.fieldProps,O=F.proFieldProps,l=(0,j.Z)(F,K);return(0,w.jsx)(D.Z,(0,x.Z)({valueType:"password",fieldProps:u,proFieldProps:O,filedConfig:{valueType:i}},l))},h=o;h.Password=V,h.displayName="ProFormComponent",A.Z=h},68253:function(X){X.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(X,A,a){"use strict";a.d(A,{O:function(){return x}});function x(j){j=j||32;for(var w="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",D=w.length,U="012345678",K=U.length,i="",o=0;o0&&p.data.forEach(function(L){m.push({stockuint:L.id,text:L.name,value:L.id,label:L.name})}),Le(m);case 6:case"end":return Z.stop()}},c)}));return function(s){return P.apply(this,arguments)}}(),b=function(){var P=(0,y.Z)((0,o.Z)().mark(function c(s){var p,m;return(0,o.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,B.getTypeList();case 2:p=Z.sent,m=[],p.data.length>0&&p.data.forEach(function(L){m.push({typeid:L.id,text:L.name,value:L.id,label:L.name})}),Me(m);case 6:case"end":return Z.stop()}},c)}));return function(s){return P.apply(this,arguments)}}(),I=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(c,s){return(0,t.jsx)("a",{onClick:function(){ve(s),he(!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:"\u5173\u8054\u5916\u952E",dataIndex:"foreignKeyRe"},{title:"\u7269\u6599\u89C4\u683C",dataIndex:"specs"},{title:"\u6210\u672C\u4EF7",dataIndex:"price"},{title:"\u51C0\u6599\u7387(%)",dataIndex:"netrecovery"},{title:"\u7269\u6599\u5C5E\u6027",dataIndex:"aittribute",valueEnum:{0:{text:"\u6210\u54C1"},1:{text:"\u534A\u6210\u54C1"},2:{text:"\u6613\u8017\u54C1"}}},{title:"\u7269\u6599\u7C7B\u522B",dataIndex:"typeID",valueType:"select",fieldProps:{options:Be}},{title:"\u5E93\u5B58\u5355\u4F4D",dataIndex:"stockUint",valueType:"select",fieldProps:{options:ue}},{title:"\u72B6\u6001",dataIndex:"status",hideInForm:!0,valueEnum:{0:{text:"\u6B63\u5E38",status:"Processing"},1:{text:"\u505C\u7528",status:"Success"}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"date",hideInForm:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:350,render:function(c,s){return[(0,t.jsxs)("a",{onClick:function(){n(!0),Q(s)},children:[" ","\u66F4\u65B0"]}),(0,t.jsxs)("a",{onClick:function(){var m={id:s.id,status:s.status==0?1:0};B.updateStatus(m).then(function(f){f.succeeded?(h.default.success("\u64CD\u4F5C\u6210\u529F"),W.current.reload()):h.default.error(e.error)})},children:[" ",s.status==0?"\u7981\u7528":"\u542F\u7528"]},"primary"),(0,t.jsx)(K.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){B.removeProduct([s.id]).then(function(m){m.succeeded?(h.default.success("\u5220\u9664\u6210\u529F"),W.current.reload()):h.default.error(e.error)})},onCancel:function(){},children:(0,t.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,t.jsxs)(O.ZP,{ost:!0,header:{title:"",breadcrumb:{}},children:[(0,t.jsx)(J.ZP,{headerTitle:"\u7269\u6599\u5217\u8868",actionRef:W,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,t.jsxs)(D.Z,{type:"primary",onClick:function(){var s={code:(0,He.O)(4)};Q(s),n(!0)},children:[(0,t.jsx)(F.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var P=(0,y.Z)((0,o.Z)().mark(function c(s){var p,m;return(0,o.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return p=[],m=0,Z.next=4,B.getpage(s).then(function(L){p=L.data.data,m=L.data.total});case 4:return Z.abrupt("return",{data:p,success:!0,total:m});case 5:case"end":return Z.stop()}},c)}));return function(c){return P.apply(this,arguments)}}(),columns:I,rowSelection:{onChange:function(c,s){xe(s)}}}),($==null?void 0:$.length)>0&&(0,t.jsx)(l.Z,{extra:(0,t.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,t.jsx)("a",{style:{fontWeight:600},children:$.length})," ","\u9879 \xA0\xA0"]}),children:(0,t.jsx)(D.Z,{type:"primary",onClick:(0,y.Z)((0,o.Z)().mark(function P(){var c,s;return(0,o.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,Je($);case 2:xe([]),(c=W.current)===null||c===void 0||(s=c.reloadAndRest)===null||s===void 0||s.call(c);case 4:case"end":return m.stop()}},P)})),children:"\u6279\u91CF\u5220\u9664"})}),(0,t.jsx)(ke,{dicData:Ee,uintListData:ue,typeListData:Be,initUintList:g,initTypeList:b,onFinish:function(){var P=(0,y.Z)((0,o.Z)().mark(function c(s){var p;return(0,o.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(p=!1,console.log("value",s),Q({}),!s.id){f.next=9;break}return f.next=6,Xe(s);case 6:p=f.sent,f.next=12;break;case 9:return f.next=11,Qe(s);case 11:p=f.sent;case 12:p&&(n(!1),W.current&&W.current.reload()),W.current.reload();case 14:case"end":return f.stop()}},c)}));return function(c){return P.apply(this,arguments)}}(),onCancel:function(){n(!1),Q({})},modalVisible:Y,values:me||{}}),(0,t.jsx)(j.Z,{width:600,visible:We,onClose:function(){ve(void 0),he(!1)},closable:!1,children:(T==null?void 0:T.name)&&(0,t.jsx)(q.ZP,{column:2,title:T==null?void 0:T.name,request:(0,y.Z)((0,o.Z)().mark(function P(){return(0,o.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",{data:T||{}});case 1:case"end":return s.stop()}},P)})),params:{id:T==null?void 0:T.name},columns:I})})]})},_e=qe}}]);