25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
3.0 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7271,7975,1322],{55619:function(L,I,t){"use strict";t.r(I),t.d(I,{default:function(){return M}});var f=t(39428),S=t(3182),y=t(2824),o=t(67294),Y=t(30381),R=t.n(Y),E=t(78009),Z=t(16894),d=t(48971),p={activityRecordList:function(a){return(0,d.WY)("/kitchen/api/activity-participation-record/activity-record",{method:"POST",data:a})},addActivityRecord:function(a){return(0,d.WY)("/kitchen/api/goods",{method:"POST",data:a})},updateActivityRecord:function(a){return(0,d.WY)("/kitchen/api/goods",{method:"POST",data:a})},removeActivityRecord:function(a){return(0,d.WY)("/kitchen/api/goods",{method:"DELETE",data:a})},removeSingleActivityRecord:function(a){return(0,d.WY)("/kitchen/api/franchisee/".concat(a),{method:"DELETE"})},GetActivityInfo:function(){return(0,d.WY)("/kitchen/api/select/activity",{method:"get"})}},s=t(85893),D=function(){var a=(0,o.useState)(!1),A=(0,y.Z)(a,2),G=A[0],B=A[1],C=(0,o.useState)(!1),g=(0,y.Z)(C,2),O=g[0],P=g[1],W=(0,o.useRef)(),j=(0,o.useState)(),T=(0,y.Z)(j,2),x=T[0],F=T[1];(0,o.useEffect)(function(){var v=function(){var n=(0,S.Z)((0,f.Z)().mark(function e(r){var c,h,i;return(0,f.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,p.GetActivityInfo();case 2:c=l.sent,h=[];for(i in c.data)h.push({activity_Id:i.toString(),text:c.data[i.toString()]});F(h);case 6:case"end":return l.stop()}},e)}));return function(r){return n.apply(this,arguments)}}();v()},[]);var k=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(n,e){return(0,s.jsx)("a",{onClick:function(){setCurrentRow(e),P(!0)},children:n})}},{title:"\u5BA2\u6237\u540D\u79F0",dataIndex:"customerName",valueType:"textarea"},{title:"\u5BA2\u6237\u7535\u8BDD",dataIndex:"telePhone",valueType:"textarea"},{title:"\u6D3B\u52A8\u540D\u79F0",dataIndex:"activity_Id",hideInForm:!0,hideInTable:!0,valueType:"select",valueEnum:x},{title:"\u6D3B\u52A8\u540D\u79F0",dataIndex:"activityName",hideInForm:!0,hideInSearch:!0},{title:"\u6D3B\u52A8\u65F6\u95F4\u8303\u56F4",hideInSearch:!0,width:300,render:function(n,e,r){return(0,s.jsx)("span",{children:(0,s.jsxs)("div",{children:[R()(e.activityStartTime).format("YYYY-MM-DD"),"\u81F3",R()(e.activityEndTime).format("YYYY-MM-DD")]})})}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"date"}];return(0,s.jsx)(E.ZP,{children:(0,s.jsx)(Z.ZP,{headerTitle:"\u6D3B\u52A8\u53C2\u4E0E\u8BB0\u5F55\u4FE1\u606F",actionRef:W,rowKey:"id",search:{labelWidth:120},columns:k,request:function(){var v=(0,S.Z)((0,f.Z)().mark(function n(e){var r,c;return(0,f.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=[],c=0,e.activity_Id!=null&&(e.activity_Id=x[e.activity_Id].activity_Id),i.next=5,p.activityRecordList(e).then(function(m){r=m.data.data,c=m.data.total});case 5:return i.abrupt("return",{data:r,success:!0,total:c});case 6:case"end":return i.stop()}},n)}));return function(n){return v.apply(this,arguments)}}()})})},M=D}}]);