|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9478],{92762:function(T){T.exports={expend_total_count:"expend_total_count___6jxTX"}},45006:function(T,A,t){"use strict";t.r(A),t.d(A,{default:function(){return ne}});var Me=t(71194),k=t(50146),Pe=t(66456),q=t(10363),Ge=t(94233),_=t(51890),f=t(39428),Ne=t(34792),Z=t(48086),I=t(3182),i=t(2824),n=t(67294),ee=t(92762),M=t.n(ee),te=t(28790),ae=t(89366),P=t(16894),C=t(48971),p=t(96690),x={GetMemberAccountPageList:function(d){return(0,C.WY)((0,p.zr)()+"/api/MemberInfoService/GetMemberAccountPageList",{method:"POST",data:d})},GetMemberAccountCardConsRecord:function(d){return(0,C.WY)((0,p.zr)()+"/api/StoredValueCard/GetMemberAccountAmountPage",{method:"POST",data:d})},GetMemberPageQuery:function(d){return(0,C.WY)((0,p.zr)()+"\u200B/api/StoredValueCard/GetMemberPageQuery",{method:"post",data:d})},CreateMemberInfo:function(d){return(0,C.WY)((0,p.zr)()+"/api/StoredValueCard/AddMember",{method:"post",data:d})},GetMemberTagAndInfo:function(d,b){return(0,C.WY)((0,p.zr)()+"/api/StoredValueCard/GetMemberTagAndInfo?memberInfoId=".concat(d,"&PlatformType=").concat(b),{method:"get"})},GetPlatformMemberList:function(d){return(0,C.WY)((0,p.zr)()+"/api/StoredValueCard/GetPlatformMemberList?memberId=".concat(d),{method:"get"})}},l=t(85893),re=function(){var d=(0,n.useRef)(),b=(0,n.useState)(!1),G=(0,i.Z)(b,2),ue=G[0],y=G[1],se=(0,n.useState)({functionName:"",record:{},type:0}),N=(0,i.Z)(se,2),h=N[0],j=N[1],oe=(0,n.useState)(1),z=(0,i.Z)(oe,2),je=z[0],de=z[1],ce=(0,n.useState)(10),D=(0,i.Z)(ce,2),ie=D[0],ze=D[1],le=(0,n.useState)(0),F=(0,i.Z)(le,2),De=F[0],me=F[1],fe=(0,n.useState)(),B=(0,i.Z)(fe,2),Ce=B[0],O=B[1],pe=(0,n.useState)(1),E=(0,i.Z)(pe,2),g=E[0],L=E[1],Se=(0,n.useState)(10),W=(0,i.Z)(Se,2),R=W[0],he=W[1],ve=(0,n.useState)(0),Y=(0,i.Z)(ve,2),ge=Y[0],V=Y[1],xe=(0,n.useState)(0),J=(0,i.Z)(xe,2),Ie=J[0],Q=J[1],be=(0,n.useState)(0),U=(0,i.Z)(be,2),ye=U[0],$=U[1],Re=(0,n.useState)(),K=(0,i.Z)(Re,2),v=K[0],H=K[1],X=function(){var u=(0,I.Z)((0,f.Z)().mark(function a(e,s){var r,o;return(0,f.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return r={current:g,pageSize:R,memberInfoId:e.memberInfoId,memberCardId:"",type:s},v&&(r.startTime=v[0],r.endTime=v[1]),m.next=4,x.GetMemberAccountCardConsRecord(r);case 4:o=m.sent,j({functionName:"onFetchAccountConsRecord",record:JSON.parse(JSON.stringify(e)),type:s}),o.statusCode===200?(O(o.data.data),V(o.data.total),y(!0)):Z.default.error(o.errors);case 7:case"end":return m.stop()}},a)}));return function(e,s){return u.apply(this,arguments)}}(),w=function(){var u=(0,I.Z)((0,f.Z)().mark(function a(e,s){var r,o;return(0,f.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return r={current:g,pageSize:R,memberInfoId:e.memberInfoId,memberCardId:e.id,type:s},v&&(r.startTime=v[0],r.endTime=v[1]),m.next=4,x.GetMemberAccountCardConsRecord(r);case 4:o=m.sent,j({functionName:"onFetchCardConsRecord",record:JSON.parse(JSON.stringify(e)),type:s}),o.statusCode===200?(O(o.data.data),V(o.data.total),y(!0)):Z.default.error(o.errors);case 7:case"end":return m.stop()}},a)}));return function(e,s){return u.apply(this,arguments)}}(),Te=[{title:"\u8D77\u6B62\u65F6\u95F4",dataIndex:"dateRange",hideInTable:!0,valueType:"dateRange",hideInSearch:!0},{title:"\u5934\u50CF",dataIndex:"headImgUrl",ellipsis:!0,width:100,hideInSearch:!0,align:"center",render:function(a,e){return(0,l.jsx)(_.C,{size:64,shape:"square",icon:(0,l.jsx)(ae.Z,{}),src:e.headImgUrl})}},{title:"\u59D3\u540D",dataIndex:"name",ellipsis:!0},{title:"\u5361\u53F7",dataIndex:"memberCardNum",ellipsis:!0},{title:"\u8054\u7CFB\u65B9\u5F0F",dataIndex:"memberPhone",ellipsis:!0,hideInSearch:!0},{title:"\u4F59\u989D",dataIndex:"money",hideInSearch:!0},{title:"\u64CD\u4F5C",valueType:"option",key:"option",render:function(a,e){return[(0,l.jsx)("a",{onClick:function(){return X(e,-1)},children:"\u8D26\u6237\u6D88\u8D39\u8BB0\u5F55"})]}}],Ae=function(a){var e=[{title:"\u5361\u53F7",dataIndex:"cardNum",key:"cardNum"},{title:"\u72B6\u6001",dataIndex:"state",valueType:"select",valueEnum:{0:{text:"\u7981\u7528",status:"Error"},1:{text:"\u6B63\u5E38",status:"Success"},2:{text:"\u6302\u5931",status:"Error"},3:{text:"\u4F5C\u5E9F",status:"Error"}}},{title:"\u7C7B\u578B",dataIndex:"type",valueType:"select",valueEnum:{1:{text:"\u4EBA\u8138",status:"Success"},2:{text:"\u5B9E\u4F53\u5361",status:"Success"},3:{text:"\u6307\u7EB9",status:"Success"}}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",render:function(r,o){return[(0,l.jsx)("a",{onClick:function(){return w(o,-1)},children:"\u4F1A\u5458\u5361\u6D88\u8D39\u8BB0\u5F55"})]}}];return(0,l.jsx)(P.ZP,{toolBarRender:!1,search:!1,rowKey:"id",columns:e,dataSource:a.cards,pagination:!1})},Ze=[{title:"\u65F6\u95F4",dataIndex:"createAt",width:200},{title:"\u7C7B\u578B",dataIndex:"type",ellipsis:!0,render:function(a,e){return(0,l.jsx)("div",{children:e.type=="-1"?"\u6D88\u8D39":"\u5145\u503C"})}}];return(0,n.useEffect)(function(){g!==1&&(h.functionName==="onFetchAccountConsRecord"?X(h.record,h.type):h.functionName==="onFetchCardConsRecord"&&w(h.record,h.type))},[g]),(0,l.jsx)(te.ZP,{header:{title:"",breadcrumb:{}},children:(0,l.jsxs)("div",{className:M().member_card_container,children:[(0,l.jsx)(P.ZP,{title:function(){return(0,l.jsxs)("div",{className:M().expend_total_count,children:["\u6D88\u8D39\u6B21\u6570",Ie,"\uFF0C\u6D88\u8D39\u4EBA\u6570",ye]})},columns:Te,actionRef:d,expandable:{expandedRowRender:function(a){return Ae(a)}},request:function(){var u=(0,I.Z)((0,f.Z)().mark(function a(e){var s,r;return(0,f.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(e.memberCardNum&&(e.cardNum=e.memberCardNum),!e.dateRange){c.next=9;break}return H(e.dateRange),c.next=5,x.GetMemberAccountRecordTotal({startTime:e.dateRange[0],endTime:e.dateRange[1]});case 5:s=c.sent,s.statusCode===200&&(Q(s.data.expendTotalCount),$(s.data.personTotalcCount)),c.next=12;break;case 9:H(null),Q(0),$(0);case 12:return delete e.dateRange,delete e.memberCardNum,c.next=16,x.GetMemberAccountPageList(e);case 16:return r=c.sent,me(r.data.data),c.abrupt("return",{data:r.data.data,success:!0,total:r.data.total});case 19:case"end":return c.stop()}},a)}));return function(a){return u.apply(this,arguments)}}(),cardBordered:!0,editable:{type:"multiple"},rowKey:"id",options:{setting:{listsHeight:400}},pagination:{pageSize:ie,onChange:function(a){return de(a)}},dateFormatter:"string",headerTitle:"\u50A8\u503C\u5361\u8D26\u6237\u7BA1\u7406"}),(0,l.jsx)(k.Z,{width:800,title:"\u6D88\u8D39\u8BB0\u5F55",visible:ue,footer:!1,onCancel:function(){y(!1),L(1)},children:(0,l.jsx)(q.Z,{columns:Ze,dataSource:Ce,pagination:{current:g,pageSize:R,total:ge,onChange:function(a,e){L(a),he(e)}}})})]})})},ne=re}}]);
|