You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
15 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6053],{64760:function(me,$,e){"use strict";var x=e(71194),m=e(50146),E=e(62350),n=e(75443),i=e(3182),D=e(2824),G=e(47673),L=e(4107),q=e(94043),P=e.n(q),k=e(67294),z=e(16894),R=e(78009),t=e(79146),b=e(85893),U=function(y){var A=(0,k.useRef)(),r=L.Z.TextArea,ne=(0,k.useState)(!1),V=(0,D.Z)(ne,2),ve=V[0],N=V[1],ee="",g=(0,k.useState)(),re=(0,D.Z)(g,2),H=re[0],ue=re[1],se=function(){var T=(0,i.Z)(P().mark(function u(h){return P().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(y.couponRecord.showType!=1){s.next=5;break}return s.next=3,(0,t.m$)(JSON.stringify({Id:H.id,Status:H.status==1?0:1,Remark:ee})).then(function(S){N(!1),A.current.reload()});case 3:s.next=7;break;case 5:return s.next=7,(0,t.A8)(JSON.stringify({Id:H.id,Status:H.status==1?0:1,Remark:ee})).then(function(S){N(!1),A.current.reload()});case 7:case"end":return s.stop()}},u)}));return function(h){return T.apply(this,arguments)}}(),oe=function(){N(!1)},le=function(u){ee=u.target.value},ie=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u9002\u7528\u8303\u56F4",dataIndex:"supplier",hideInSearch:!0,valueType:"textarea"},{title:"\u72B6\u6001",key:"status",dataIndex:"status",valueEnum:{1:{text:"\u7981\u7528",status:"Warning"},0:{text:"\u542F\u7528",status:"Success"}}},{title:"\u5907\u6CE8",dataIndex:"remark",hideInSearch:!0,valueType:"textarea"},{title:"\u53D1\u653E\u65F6\u95F4",key:"sendTime",hideInSearch:!0,dataIndex:"sendTime"},{title:"\u64CD\u4F5C",dateIndex:"option",valueType:"option",render:function(u,h){return(0,b.jsx)(n.Z,{type:"primary",title:"\u786E\u8BA4\u542F\u7528\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,i.Z)(P().mark(function I(){return P().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:r.value=h.remark,ue(h),N(!0);case 3:case"end":return S.stop()}},I)})),onCancel:function(){},children:(0,b.jsx)("a",{href:"#",children:h.status==0?"\u7981\u7528":"\u542F\u7528"})},"primary")}}];return(0,b.jsxs)(m.Z,{footer:null,destroyOnClose:!0,visible:y.shows,width:1100,onCancel:function(){y.onCancel()},children:[(0,b.jsx)(R.ZP,{headerTitle:"",header:{title:"\u53D1\u653E\u8BB0\u5F55",breadcrumb:{}},children:(0,b.jsx)(z.ZP,{actionRef:A,rowKey:"id",options:!1,search:{labelWidth:120},pagination:{pageSize:5},columns:ie,request:function(){var T=(0,i.Z)(P().mark(function u(h){var I,s;return P().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(I=[],s=0,h.couponId=y.couponRecord.couponId,h.batchNo=y.couponRecord.batchNo,y.couponRecord.showType!=1){f.next=9;break}return f.next=7,(0,t.m2)(h).then(function(C){I=C.data.data,s=C.data.total});case 7:f.next=11;break;case 9:return f.next=11,(0,t.tP)(h).then(function(C){I=C.data.data,s=C.data.total});case 11:return f.abrupt("return",{data:I,success:!0,total:s});case 12:case"end":return f.stop()}},u)}));return function(u){return T.apply(this,arguments)}}()})}),(0,b.jsx)(m.Z,{title:"\u5907\u6CE8",visible:ve,onOk:se,onCancel:oe,children:(0,b.jsx)(r,{onChange:function(u){return le(u)},rows:4})})]})};$.Z=U},55099:function(me,$,e){"use strict";e.r($),e.d($,{default:function(){return ie}});var x=e(3182),m=e(2824),E=e(94043),n=e.n(E),i=e(67294),D=e(78009),G=e(16894),L=e(64760),q=e(71194),P=e(50146),k=e(30381),z=e.n(k),R=e(79146),t=e(85893),b=function(u){var h=(0,i.useRef)(),I=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u5BA2\u6237\u7535\u8BDD",dataIndex:"phone",valueType:"textarea"},{title:"\u5BA2\u6237Id",dataIndex:"customerId",valueType:"textarea",search:!1},{title:"\u8BA2\u5355\u53F7",dataIndex:"orderId",valueType:"textarea"},{title:"\u4F7F\u7528\u5E97\u94FA",dataIndex:"storeName",valueType:"textarea",search:!1},{title:"\u9886\u53D6\u65B9\u5F0F",key:"receiveType",dataIndex:"receiveType",valueEnum:{1:{text:"\u5C0F\u7A0B\u5E8F\u9886\u53D6"},2:{text:"\u7EBF\u4E0B\u95E8\u5E97\u626B\u7801"},3:{text:"\u81EA\u52A8\u4E0B\u53D1"},4:{text:"\u597D\u53CB\u5206\u4EAB\u9886\u53D6"},5:{text:"\u6307\u5B9A\u53D1\u653E"},6:{text:"\u53C2\u52A0\u6D3B\u52A8"}}},{title:"\u72B6\u6001",key:"state",dataIndex:"state",valueEnum:{1:{text:"\u672A\u4F7F\u7528",status:"Warning"},2:{text:"\u5DF2\u4F7F\u7528",status:"Success"},3:{text:"\u5360\u7528\u4E2D",status:"Processing"},4:{text:"\u5931\u6548",status:"Default"}}},{title:"\u9886\u53D6\u65F6\u95F4",dataIndex:"createAt",valueType:"date"},{title:"\u6709\u6548\u65F6\u95F4",hideInSearch:!0,width:200,render:function(S,f,C){return(0,t.jsxs)("span",{children:[(0,t.jsx)("div",{children:z()(f.validStartTime).format("YYYY-MM-DD")}),(0,t.jsx)("div",{children:z()(f.validEndTime).format("YYYY-MM-DD")})]})}},{title:"\u6838\u9500\u65F6\u95F4",dataIndex:"writeOffTime",valueType:"date"}];return(0,t.jsx)(P.Z,{footer:null,destroyOnClose:!0,visible:u.shows,width:1300,onCancel:function(){u.onCancel()},children:(0,t.jsx)(D.ZP,{header:{title:"\u9886\u53D6\u8BE6\u60C5",breadcrumb:{}},children:(0,t.jsx)(G.ZP,{actionRef:h,rowKey:"id",options:!1,search:{labelWidth:120},pagination:{pageSize:5},columns:I,request:function(){var s=(0,x.Z)(n().mark(function S(f){var C,j;return n().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return C=[],j=0,f.batchNo=u.couponRecord.batchNo,B.next=5,(0,R.GA)(f).then(function(W){C=W.data.data,j=W.data.total});case 5:return B.abrupt("return",{data:C,success:!0,total:j});case 6:case"end":return B.stop()}},S)}));return function(S){return s.apply(this,arguments)}}()})})})},U=b,c=e(58996),y=e(77933),A=e(11849),r=e(57663),ne=e(71577),V=e(86582),ve=e(43185),N=e(93009),ee=e(34792),g=e(48086),re=e(47673),H=e(4107),ue=e(84391),se=function(u){var h,I=(0,i.useRef)(),s="sendCoupon",S=H.Z.Search,f=(0,i.useState)([]),C=(0,m.Z)(f,2),j=C[0],O=C[1],B=(0,i.useState)([]),W=(0,m.Z)(B,2),te=W[0],J=W[1],ce=(0,i.useState)(!0),X=(0,m.Z)(ce,2),de=X[0],he=X[1],fe=(0,i.useState)(),K=(0,m.Z)(fe,2),M=K[0],p=K[1],F=(0,i.useState)([]),Z=(0,m.Z)(F,2),ye=Z[0],w=Z[1],ae=(0,i.useState)([]),Ce=(0,m.Z)(ae,2),Be=Ce[0],Me=Ce[1],xe=(0,i.useState)([]),_e=(0,m.Z)(xe,2),Ie=_e[0],Pe=_e[1],Ee=(0,i.useState)(!1),Se=(0,m.Z)(Ee,2),be=Se[0],ge=Se[1];(0,i.useEffect)(function(){var v=function(){var a=(0,x.Z)(n().mark(function o(d){return n().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,(0,R.fC)({CurrentPage:1,PageSize:7}).then(function(pe){var Q=[];pe.data.forEach(function(Y){Q.push({key:Y.memberId,title:Y.phone,description:d,disabled:!1,tag:Y.memberId})}),J(Q),O(Q)});case 2:case"end":return _.stop()}},o)}));return function(d){return a.apply(this,arguments)}}();v()},[]);var Te=[{title:"\u4E3B\u952E",dataIndex:"phone",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u624B\u673A\u53F7",dataIndex:"phone",search:!1,valueType:"textarea",width:110},{title:"\u5BA2\u6237ID",dataIndex:"memberId",search:!1,valueType:"textarea",width:250},{title:"\u539F\u56E0",dataIndex:"msg",search:!1,valueType:"textarea",width:250}],De={beforeUpload:function(a){return a.type!=="application/vnd.ms-excel"&&a.type!=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"&&g.default.error("".concat(a.name," \u4E0D\u662F exelce \u6587\u4EF6")),a.type=="application/vnd.ms-excel"||a.type=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"?!0:N.Z.LIST_IGNORE},name:"file",maxCount:1,multiple:!1,action:"/kitchen/api/member/uploadcustomer/".concat((h=u.values)===null||h===void 0?void 0:h.couponId),headers:{authorization:"authorization-text"},onChange:function(a){if(a.file.status==="done"){g.default.success("".concat(a.file.name," \u4E0A\u4F20\u6210\u529F")),a.file.response.available,Pe(a.file.response.notAvailable);var o=te.filter(function(d){var l=a.file.response.available.filter(function(_){if(_.memberId==d.key)return _});if(l.length>0)return d}).map(function(d){return d.key});p(o),ge(!0)}else a.file.status==="error"&&g.default.error("".concat(a.file.name," \u4E0A\u4F20\u5931\u8D25."))}},We=function(a){var o=(0,V.Z)(a.fileList);o=o.slice(-2),o=o.map(function(d){return d.response&&(d.url=d.response.url),d}),fileListDataState({fileList:o})},Ae=function(a,o,d){p(a)},Oe=function(a,o){w([].concat((0,V.Z)(a),(0,V.Z)(o)))},Ze=function(a,o){},Re=function(){var v=(0,x.Z)(n().mark(function a(o,d){return n().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(o!="right"){_.next=2;break}return _.abrupt("return");case 2:return _.next=4,(0,R.fC)({CurrentPage:1,PageSize:7,phone:d}).then(function(pe){var Q=[];pe.data.forEach(function(Y){Q.push({key:Y.memberId,title:Y.phone,description:d,disabled:!1,tag:Y.memberId})}),J(Q)});case 4:case"end":return _.stop()}},a)}));return function(o,d){return v.apply(this,arguments)}}(),je=function(){var v=(0,x.Z)(n().mark(function a(o){return n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(!(M==null||M.length<=0)){l.next=3;break}return g.default.error("\u8BF7\u9009\u62E9\u4F1A\u5458"),l.abrupt("return");case 3:if(!(M.length>o.lastNum)){l.next=6;break}return g.default.error("\u4F18\u60E0\u5238\u6570\u91CF\u4E0D\u591F"),l.abrupt("return");case 6:return g.default.loading("\u6B63\u5728\u53D1\u9001...",s),l.prev=7,l.next=10,(0,R.aO)({memberId:M,couponId:o.couponId,couponRangeId:o.couponRangeId}).then(function(_){g.default.destroy(s),_.data?(g.default.success("\u53D1\u9001\u6210\u529F"),p([]),w([])):g.default.error("\u53D1\u9001\u5931\u8D25")});case 10:return l.abrupt("return",!0);case 13:return l.prev=13,l.t0=l.catch(7),g.default.destroy(s),g.default.error("\u53D1\u9001\u8BF7\u91CD\u8BD5\uFF01"),l.abrupt("return",!1);case 18:case"end":return l.stop()}},a,null,[[7,13]])}));return function(o){return v.apply(this,arguments)}}();return(0,t.jsxs)(P.Z,{destroyOnClose:!0,visible:u.shows,width:700,onCancel:function(){J(j),u.onCancel()},onOk:function(){je(u.values),u.actionRef.current.reload()},children:[(0,t.jsxs)(D.ZP,{header:{title:"\u6307\u5B9A\u53D1\u653E",breadcrumb:{}},children:[(0,t.jsx)("div",{style:{height:"68px"},children:(0,t.jsx)("span",{children:(0,t.jsx)(N.Z,(0,A.Z)((0,A.Z)({},De),{},{nostyle:!0,children:(0,t.jsx)(ne.Z,{icon:(0,t.jsx)(ue.Z,{}),children:"\u4E0A\u4F20\u6587\u4EF6"})}))})}),(0,t.jsx)(y.Z,{oneWay:de,showSearch:!0,showSelectAll:!0,onSearch:Re,dataSource:te,titles:["\u672A\u9009\u62E9","\u5DF2\u9009\u4E2D"],targetKeys:M,selectedKeys:ye,onChange:Ae,onSelectChange:Oe,onScroll:Ze,render:function(a){return a.title},pagination:{pageSize:8},listStyle:{width:500,height:400}})]}),(0,t.jsx)(P.Z,{footer:null,title:"\u65E0\u6548\u4F1A\u5458",visible:be,width:600,onCancel:function(){ge(!1)},children:(0,t.jsx)(G.ZP,{headerTitle:"\u65E0\u6548\u4F1A\u5458",actionRef:I,rowKey:"phone",columns:Te,toolBarRender:!1,search:!1,scroll:{y:450},pagination:!1,request:function(){var v=(0,x.Z)(n().mark(function a(o){return n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",{data:Ie,success:!0,total:Ie.length});case 1:case"end":return l.stop()}},a)}));return function(a){return v.apply(this,arguments)}}()})})]})},oe=se,le=function(){var u=(0,i.useRef)(),h=(0,i.useState)(!1),I=(0,m.Z)(h,2),s=I[0],S=I[1],f=(0,i.useState)(),C=(0,m.Z)(f,2),j=C[0],O=C[1],B=(0,i.useState)(!1),W=(0,m.Z)(B,2),te=W[0],J=W[1],ce=(0,i.useState)(!1),X=(0,m.Z)(ce,2),de=X[0],he=X[1],fe=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u6279\u6B21\u53F7",dataIndex:"batchNo",valueType:"textarea"},{title:"\u4F18\u60E0\u5377",dataIndex:"couponTitle",valueType:"textarea"},{title:"\u53D1\u653E\u6570\u91CF",dataIndex:"sendNum",search:!1,valueType:"textarea"},{title:"\u9886\u53D6\u6570\u91CF",dataIndex:"totalNum",search:!1,valueType:"digit"},{title:"\u5269\u4F59\u6570\u91CF",dataIndex:"lastNum",search:!1,valueType:"digit"},{title:"\u53D1\u653E\u65F6\u95F4",dataIndex:"createAt",valueType:"date"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(M,p){var F=[(0,t.jsx)("a",{type:"primary",onClick:function(){S(!0),O({batchNo:p.batchNo,couponId:p.couponId,showType:1})},children:"\u9002\u7528\u8303\u56F4"},"primary1"),(0,t.jsx)("a",{type:"primary",onClick:function(){S(!0),O({batchNo:p.batchNo,couponId:p.couponId,showType:2})},children:"\u9002\u7528\u5546\u54C1"},"primary2"),(0,t.jsx)("a",{type:"primary",onClick:function(){he(!0),O({batchNo:p.batchNo})},children:"\u9886\u53D6\u8BE6\u60C5"},"primary3"),(0,t.jsx)("a",{type:"primary",disabled:p.validStatus!=1||p.lastNum==0,style:{pointerEvents:p.validStatus!=1||p.lastNum==0?"none":"auto"},onClick:function(){J(!0),O({couponRangeId:p.id,couponId:p.couponId,lastNum:p.lastNum})},children:"\u53D1\u653E"},"primary")];return F}}];return(0,t.jsxs)(D.ZP,{children:[(0,t.jsx)(G.ZP,{headerTitle:"\u4F18\u60E0\u5377",actionRef:u,rowKey:"id",search:{labelWidth:120},columns:fe,request:function(){var K=(0,x.Z)(n().mark(function M(p){var F,Z;return n().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return F=[],Z=0,w.next=4,(0,R.hz)(p).then(function(ae){F=ae.data.data,Z=ae.data.total});case 4:return w.abrupt("return",{data:F,success:!0,total:Z});case 5:case"end":return w.stop()}},M)}));return function(M){return K.apply(this,arguments)}}()}),(0,t.jsx)(L.Z,{shows:s,onCancel:function(){S(!1),O(void 0)},couponRecord:j}),(0,t.jsx)(U,{shows:de,onCancel:function(){he(!1),O(void 0)},couponRecord:j}),(0,t.jsx)(oe,{shows:te,values:j,actionRef:u,onCancel:function(){J(!1),O(void 0)}})]})},ie=le},79146:function(me,$,e){"use strict";e.d($,{hz:function(){return i},GA:function(){return G},m$:function(){return q},m2:function(){return P},tP:function(){return k},A8:function(){return z},aO:function(){return R},fC:function(){return b}});var x=e(3182),m=e(94043),E=e.n(m),n=e(48971);function i(c){return D.apply(this,arguments)}function D(){return D=(0,x.Z)(E().mark(function c(y){return E().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,n.WY)("/kitchen/api/coupon/couponrecordpage",{method:"POST",data:y}));case 1:case"end":return r.stop()}},c)})),D.apply(this,arguments)}function G(c){return L.apply(this,arguments)}function L(){return L=(0,x.Z)(E().mark(function c(y){return E().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,n.WY)("/kitchen/api/coupon/customerpage",{method:"POST",data:y}));case 1:case"end":return r.stop()}},c)})),L.apply(this,arguments)}function q(c){return(0,n.WY)("/kitchen/api/coupon/recallcoupon",{method:"post",data:c})}function P(c){return(0,n.WY)("/kitchen/api/coupon/couponrecordbyid",{method:"post",data:c})}function k(c){return(0,n.WY)("/kitchen/api/coupon/couponrecordgoods",{method:"post",data:c})}function z(c){return(0,n.WY)("/kitchen/api/coupon/recallcoupongoods",{method:"post",data:c})}function R(c){return t.apply(this,arguments)}function t(){return t=(0,x.Z)(E().mark(function c(y){return E().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,n.WY)("/kitchen/api/coupon/receivecouponbyinput",{method:"PUT",data:y}));case 1:case"end":return r.stop()}},c)})),t.apply(this,arguments)}function b(c){return U.apply(this,arguments)}function U(){return U=(0,x.Z)(E().mark(function c(y){return E().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,n.WY)("/kitchen\u200B/api\u200B/select\u200B/customerinfo\u200B",{method:"Post",data:y}));case 1:case"end":return r.stop()}},c)})),U.apply(this,arguments)}}}]);