(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6264],{5966:function(ne,V,r){"use strict";var k=r(28991),B=r(81253),G=r(85893),U=r(88300),z=["fieldProps","proFieldProps"],H=["fieldProps","proFieldProps"],l="text",d=function(T){var i=T.fieldProps,X=T.proFieldProps,J=(0,B.Z)(T,z);return(0,G.jsx)(U.Z,(0,k.Z)({valueType:l,fieldProps:i,filedConfig:{valueType:l},proFieldProps:X},J))},Q=function(T){var i=T.fieldProps,X=T.proFieldProps,J=(0,B.Z)(T,H);return(0,G.jsx)(U.Z,(0,k.Z)({valueType:"password",fieldProps:i,proFieldProps:X,filedConfig:{valueType:l}},J))},f=d;f.Password=Q,f.displayName="ProFormComponent",V.Z=f},68253:function(ne){ne.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(ne,V,r){"use strict";r.d(V,{O:function(){return k}});function k(B){B=B||32;for(var G="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",U=G.length,z="012345678",H=z.length,l="",d=0;d0&&p.data.forEach(function(D){m.push({stockuint:D.id,text:D.name,value:D.id,label:D.name})}),be(m);case 6:case"end":return Z.stop()}},c)}));return function(u){return g.apply(this,arguments)}}(),x=function(){var g=(0,F.Z)((0,d.Z)().mark(function c(u){var p,m;return(0,d.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,L.getTypeList();case 2:p=Z.sent,m=[],p.data.length>0&&p.data.forEach(function(D){m.push({typeid:D.id,text:D.name,value:D.id,label:D.name})}),Te(m);case 6:case"end":return Z.stop()}},c)}));return function(u){return g.apply(this,arguments)}}(),j=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(c,u){return(0,t.jsx)("a",{onClick:function(){ie(u),K(!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:De}},{title:"\u5E93\u5B58\u5355\u4F4D",dataIndex:"stockUint",valueType:"select",fieldProps:{options:re}},{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,u){return[(0,t.jsxs)("a",{onClick:function(){n(!0),w(u)},children:[" ","\u66F4\u65B0"]}),(0,t.jsxs)("a",{onClick:function(){var m={id:u.id,status:u.status==0?1:0};L.updateStatus(m).then(function(h){h.succeeded?(f.default.success("\u64CD\u4F5C\u6210\u529F"),M.current.reload()):f.default.error(e.error)})},children:[" ",u.status==0?"\u7981\u7528":"\u542F\u7528"]},"primary"),(0,t.jsx)(H.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){L.removeProduct([u.id]).then(function(m){m.succeeded?(f.default.success("\u5220\u9664\u6210\u529F"),M.current.reload()):f.default.error(e.error)})},onCancel:function(){},children:(0,t.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,t.jsxs)(X.ZP,{ost:!0,header:{title:"",breadcrumb:{}},children:[(0,t.jsx)(Me.ZP,{headerTitle:"\u7269\u6599\u5217\u8868",actionRef:M,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,t.jsxs)(U.Z,{type:"primary",onClick:function(){var u={code:(0,qe.O)(4)};w(u),n(!0)},children:[(0,t.jsx)(T.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var g=(0,F.Z)((0,d.Z)().mark(function c(u){var p,m;return(0,d.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return p=[],m=0,Z.next=4,L.getpage(u).then(function(D){p=D.data.data,m=D.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 g.apply(this,arguments)}}(),columns:j,rowSelection:{onChange:function(c,u){pe(u)}}}),(Y==null?void 0:Y.length)>0&&(0,t.jsx)(J.Z,{extra:(0,t.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,t.jsx)("a",{style:{fontWeight:600},children:Y.length})," ","\u9879 \xA0\xA0"]}),children:(0,t.jsx)(U.Z,{type:"primary",onClick:(0,F.Z)((0,d.Z)().mark(function g(){var c,u;return(0,d.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,tt(Y);case 2:pe([]),(c=M.current)===null||c===void 0||(u=c.reloadAndRest)===null||u===void 0||u.call(c);case 4:case"end":return m.stop()}},g)})),children:"\u6279\u91CF\u5220\u9664"})}),(0,t.jsx)(Je,{dicData:Fe,uintListData:re,typeListData:De,initUintList:v,initTypeList:x,onFinish:function(){var g=(0,F.Z)((0,d.Z)().mark(function c(u){var p;return(0,d.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(p=!1,console.log("value",u),w({}),!u.id){h.next=9;break}return h.next=6,et(u);case 6:p=h.sent,h.next=12;break;case 9:return h.next=11,_e(u);case 11:p=h.sent;case 12:p&&(n(!1),M.current&&M.current.reload()),M.current.reload();case 14:case"end":return h.stop()}},c)}));return function(c){return g.apply(this,arguments)}}(),onCancel:function(){n(!1),w({})},modalVisible:C,values:O||{}}),(0,t.jsx)(B.Z,{width:600,visible:N,onClose:function(){ie(void 0),K(!1)},closable:!1,children:(b==null?void 0:b.name)&&(0,t.jsx)(Oe.ZP,{column:2,title:b==null?void 0:b.name,request:(0,F.Z)((0,d.Z)().mark(function g(){return(0,d.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",{data:b||{}});case 1:case"end":return u.stop()}},g)})),params:{id:b==null?void 0:b.name},columns:j})})]})},rt=at}}]);