包含后厨 团餐 门店分支
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

2 行
15 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9976],{29425:function(Ce,te,r){"use strict";r.r(te),r.d(te,{default:function(){return Te}});var De=r(57338),le=r(83107),Re=r(57663),re=r(71577),Ue=r(62350),N=r(24565),i=r(39428),g=r(3182),Oe=r(34792),f=r(48086),Pe=r(9715),c=r(55843),S=r(2824),ie=r(49101),j=r(67294),de=r(28790),oe=r(85224),ce=r(16894),me=r(12826),$e=r(71194),fe=r(50146),ae=r(11849),Ye=r(77883),he=r(21888),we=r(43185),T=r(93349),Be=r(47673),U=r(4107),Le=r(14965),ve=r(34895),Ge=r(43358),F=r(34041),pe=r(84391),C=r(48971),Me=r(65754),e=r(85893),xe=function(a){var x=F.Z.Option,u=F.Z.OptGroup,q=(0,j.useState)(),w=(0,S.Z)(q,2),V=w[0],O=w[1],_=(0,j.useState)(),B=(0,S.Z)(_,2),ne=B[0],ee=B[1],y=ve.Z.RangePicker,ue=U.Z.TextArea,P=[];a.values&&(P.push(a.values.startTime),P.push(a.values.endTime)),a.values.planDate=P;function Z(l){O(l)}function I(l){var t=(0,C.WY)("/kitchen/api/Upload/DeleteFile?fileUrl=".concat(l),{method:"post"})}var D=[];a.values.imageUrl&&(D=a.values.imageUrl);var H={beforeUpload:function(t){var v=a.form.getFieldValue("storeId");if(typeof v=="undefined")return f.default.error("\u8BF7\u9009\u62E9\u5E97\u94FA!"),T.Z.LIST_IGNORE;var A=a.form.getFieldValue("type");if(A==0){var R=t.type==="image/jpeg"||t.type==="image/png"||t.type==="image/jpg";if(!R)return f.default.error("\u8BF7\u4E0A\u4F20\u56FE\u7247\u683C\u5F0F\u6587\u4EF6!"),T.Z.LIST_IGNORE;var L=t.size/1024/1024<4;return L?!0:(f.default.error("\u56FE\u7247\u4E0D\u80FD\u5927\u4E8E4MB!"),T.Z.LIST_IGNORE)}else if(A==1){var $=t.type==="video/mp4"||t.type==="video/rmvb"||t.type==="video/avi"||t.type==="video/m4v";if(!$)return f.default.error("\u8BF7\u4E0A\u4F20\u89C6\u9891\u683C\u5F0F\u6587\u4EF6!"),T.Z.LIST_IGNORE;var G=t.size/1024/1024<100;return G?!0:(f.default.error("\u89C6\u9891\u4E0D\u80FD\u5927\u4E8E100MB!"),T.Z.LIST_IGNORE)}else return f.default.error("\u8BF7\u9009\u62E9\u5E7F\u544A\u7C7B\u578B!"),T.Z.LIST_IGNORE},name:"file",action:"/storemanage/api/Upload/FormImg?storeId=".concat(typeof V=="undefined"?a.values.storeId:V),headers:{authorization:"authorization-text"},showUploadList:{showPreviewIcon:!1},listType:"picture-card",multiple:!0,maxCount:10,onChange:function(t){t.file.status!=="uploading"&&console.log(t.file,t.fileList),t.file.status==="done"?t.file.response.isSuccess?(t.file.response.msg==="mv"?a.form.setFieldsValue({videoUrl:t.file.response.data[0]}):(D.push({name:t.file.response.data[0]}),a.form.setFieldsValue({imageUrl:D})),f.default.success("".concat(t.file.name," \u4E0A\u4F20\u6210\u529F"))):f.default.error(t.file.response.msg):t.file.status==="error"&&f.default.error("".concat(t.file.name," \u4E0A\u4F20\u5931\u8D25"))},onRemove:function(t){var v="";typeof t.response=="undefined"?(I(t.name),v=t.name):(I(t.response.data[0]),v=t.response.data[0]);for(var A=0,R=Object.entries(D);A<R.length;A++){var L=R[A],$=(0,S.Z)(L,2),G=$[0],W=$[1];W.name==v&&delete D[G]}},onPreview:function(t){},defaultFileList:a.values.imageUrl?a.values.imageUrl:null};return(0,e.jsx)(fe.Z,{title:a.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:700,visible:a.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},onCancel:function(){a.onCancel()},destroyOnClose:!0,maskClosable:!1,onOk:function(){a.form.submit()},children:(0,e.jsxs)(c.Z,{form:a.form,layout:"Horizontal",preserve:!1,initialValues:a.values,onFinish:a.onFinish,children:[(0,e.jsx)(c.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(U.Z,{})}),(0,e.jsx)(c.Z.Item,{name:"storeId",label:"\u9009\u62E9\u5E97\u94FA",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5E97\u94FA"}],children:(0,e.jsx)(F.Z,{disabled:!!a.values.id,onChange:Z,children:a.storeArray.map(function(l,t){return(0,e.jsx)(F.Z.Option,{index:t,value:l.id,children:l.text},l.id)})})}),(0,e.jsx)(c.Z.Item,{name:"title",label:"\u5E7F\u544A\u6807\u9898",rules:[{required:!0,max:20,whitespace:!0}],children:(0,e.jsx)(U.Z,{placeholder:"\u5E7F\u544A\u6807\u9898"})}),(0,e.jsx)(c.Z.Item,{name:"planDate",label:"\u9009\u62E9\u65F6\u95F4",children:(0,e.jsx)(y,{showTime:!0,format:"YYYY-MM-DD HH:mm:ss"})}),(0,e.jsx)(c.Z.Item,{name:"type",label:"\u5E7F\u544A\u7C7B\u578B",rules:[{required:!0,message:"\u8BF7\u5E7F\u544A\u7C7B\u578B"}],children:(0,e.jsx)(F.Z,{children:(0,e.jsxs)(u,{children:[(0,e.jsx)(F.Z.Option,{value:0,children:"\u56FE\u7247"}),(0,e.jsx)(F.Z.Option,{value:1,children:"\u89C6\u9891"})]})})}),(0,e.jsx)(c.Z.Item,{noStyle:!0,shouldUpdate:function(t,v){return t.type!==v.type},children:function(t){var v=t.getFieldValue;return v("type")=="1"?(0,e.jsx)(c.Z.Item,{hidden:!0}):(0,e.jsx)(c.Z.Item,{style:{height:32},children:(0,e.jsx)(c.Z.Item,{label:"\u8F6E\u64AD\u95F4\u9694",name:"step",rules:[{required:!0}],children:(0,e.jsx)(he.Z,{min:1,max:10,style:{width:250}})})})}}),(0,e.jsx)(c.Z.Item,{name:"uploadType",label:"\u4E0A\u4F20\u65B9\u5F0F",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u65B9\u5F0F"}],children:(0,e.jsx)(F.Z,{children:(0,e.jsxs)(u,{children:[(0,e.jsx)(F.Z.Option,{value:0,children:"\u81EA\u5B9A\u4E49\u4E0A\u4F20"}),(0,e.jsx)(F.Z.Option,{value:1,children:"\u7F51\u7EDC\u8DEF\u5F84"})]})})}),(0,e.jsx)(c.Z.Item,{noStyle:!0,shouldUpdate:function(t,v){return t.uploadType!==v.uploadType},children:function(t){var v=t.getFieldValue;return v("uploadType")=="1"?(0,e.jsx)(c.Z.Item,{name:"netWorkUrl",label:"\u7F51\u7EDC\u8DEF\u5F84",children:(0,e.jsx)(U.Z,{placeholder:"\u7F51\u7EDC\u8DEF\u5F84"})}):(0,e.jsx)(c.Z.Item,{style:{height:100},children:(0,e.jsx)(T.Z,(0,ae.Z)((0,ae.Z)({},H),{},{children:(0,e.jsx)(re.Z,{icon:(0,e.jsx)(pe.Z,{}),children:"\u4E0A\u4F20"})}))})}}),(0,e.jsx)(c.Z.Item,{children:(0,e.jsx)("span",{style:{color:"#FF0000",marginLeft:70},children:"\u6CE8: \u7F51\u7EDC\u8DEF\u5F84\u4E0A\u4F20\u56FE\u7247\u65F6\uFF0C\u591A\u5F20\u56FE\u7247\u89C4\u5219\u8BF7\u7528 \xA0|\xA0 \u9694\u5F00\u3002 \xA0\xA0 \u5982\uFF1A1.xxxxxx.jpg|2.xxxxxx.jpg"})}),(0,e.jsx)(c.Z.Item,{name:"imageUrl",label:"\u56FE\u7247\u5730\u5740",hidden:!0,children:(0,e.jsx)(U.Z,{placeholder:"\u56FE\u7247\u5730\u5740"})}),(0,e.jsx)(c.Z.Item,{name:"videoUrl",label:"\u89C6\u9891\u5730\u5740",hidden:!0,children:(0,e.jsx)(U.Z,{placeholder:"\u89C6\u9891\u5730\u5740"})})]})})},Ze=xe,ge=r(30381),M=r.n(ge);function ye(){return b.apply(this,arguments)}function b(){return b=(0,g.Z)((0,i.Z)().mark(function d(){return(0,i.Z)().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.abrupt("return",(0,C.WY)("/storemanagement/api/shop/alllist",{method:"GET"}));case 1:case"end":return x.stop()}},d)})),b.apply(this,arguments)}function Fe(d){return z.apply(this,arguments)}function z(){return z=(0,g.Z)((0,i.Z)().mark(function d(a){return(0,i.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,C.WY)("/storemanagement/api/StoreAdvertisement/GetStoreAdvertisementPage",{method:"Post",data:a}));case 1:case"end":return u.stop()}},d)})),z.apply(this,arguments)}function Se(d){return J.apply(this,arguments)}function J(){return J=(0,g.Z)((0,i.Z)().mark(function d(a){return(0,i.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,C.WY)("/storemanagement/api/StoreAdvertisement/AddStoreAdvertisement",{method:"POST",data:a}));case 1:case"end":return u.stop()}},d)})),J.apply(this,arguments)}function je(d){return K.apply(this,arguments)}function K(){return K=(0,g.Z)((0,i.Z)().mark(function d(a){return(0,i.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,C.WY)("/storemanagement/api/StoreAdvertisement/UpdateStoreAdvertisement",{method:"PUT",data:a}));case 1:case"end":return u.stop()}},d)})),K.apply(this,arguments)}function Ae(d){return Q.apply(this,arguments)}function Q(){return Q=(0,g.Z)((0,i.Z)().mark(function d(a){return(0,i.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,C.WY)("/storemanagement/api/StoreAdvertisement/DelStoreAdvertisement",{method:"DELETE",data:a}));case 1:case"end":return u.stop()}},d)})),Q.apply(this,arguments)}function Ie(d){return X.apply(this,arguments)}function X(){return X=(0,g.Z)((0,i.Z)().mark(function d(a){return(0,i.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,C.WY)("/storemanagement/api/StoreAdvertisement/UpdateStoreAdvertisementStatus",{method:"POST",data:a}));case 1:case"end":return u.stop()}},d)})),X.apply(this,arguments)}function Ve(d){return k.apply(this,arguments)}function k(){return k=_asyncToGenerator(_regeneratorRuntime().mark(function d(a){return _regeneratorRuntime().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",request("/storemanagement/api/StoreAdvertisement/QueryStoreAdvertisementURL",{method:"POST",data:a}));case 1:case"end":return u.stop()}},d)})),k.apply(this,arguments)}var Ee=function(){var a=c.Z.useForm(),x=(0,S.Z)(a,1),u=x[0],q=(0,j.useState)(!1),w=(0,S.Z)(q,2),V=w[0],O=w[1],_=(0,j.useState)(!1),B=(0,S.Z)(_,2),ne=B[0],ee=B[1],y=(0,j.useRef)(),ue=(0,j.useState)(),P=(0,S.Z)(ue,2),Z=P[0],I=P[1],D=(0,j.useState)([]),H=(0,S.Z)(D,2),l=H[0],t=H[1],v=(0,j.useState)([]),A=(0,S.Z)(v,2),R=A[0],L=A[1];(0,j.useEffect)(function(){var o=ye().then(function(s){var n,h=[];(n=s.data)===null||n===void 0||n.forEach(function(p){h.push({id:p.id,text:p.name,value:p.id,label:p.name})}),L(h)})},[]);function $(o){try{return Se(JSON.stringify(o)),f.default.success("\u6DFB\u52A0\u6210\u529F"),y.current.reload(),!0}catch(s){return f.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}function G(o){try{return je(JSON.stringify(o)).then(function(s){s.data?(f.default.success("\u4FEE\u6539\u6210\u529F"),y.current.reload()):f.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}),!0}catch(s){return f.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}function W(o){try{return Ae(o).then(function(s){s.data?f.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"):f.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}),y.current.reload(),!0}catch(s){f.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}}var se=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(s,n){return(0,e.jsx)("a",{onClick:function(){I(n),ee(!0)},children:s})}},{title:"\u5E97\u94FA",dataIndex:"storeId",valueType:"select",fieldProps:{options:R}},{title:"\u5E7F\u544A\u7C7B\u578B",dataIndex:"type",valueEnum:{0:{text:"\u56FE\u7247"},1:{text:"\u89C6\u9891"}},hideInSearch:!0},{title:"\u4E0A\u4F20\u65B9\u5F0F",dataIndex:"uploadType",valueEnum:{0:{text:"\u81EA\u5B9A\u4E49\u4E0A\u4F20"},1:{text:"\u7F51\u7EDC\u8DEF\u5F84"}},hideInSearch:!0},{title:"\u5E7F\u544A\u6807\u9898",dataIndex:"title",valueType:"textarea"},{title:"\u8F6E\u64AD\u95F4\u9694\uFF08\u79D2\uFF09",dataIndex:"step",valueType:"textarea",hideInSearch:!0},{title:"\u5F00\u59CB\u65F6\u95F4",hideInSearch:!0,dataIndex:"startTime",valueType:"dateTime"},{title:"\u7ED3\u675F\u65F6\u95F4",hideInSearch:!0,dataIndex:"endTime",valueType:"dateTime"},{title:"\u72B6\u6001",dataIndex:"status",hideInForm:!0,hideInSearch:!0,valueEnum:{0:{text:"\u6B63\u5E38",status:"Processing"},1:{text:"\u505C\u7528",status:"Success"}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"textarea",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:150,render:function(s,n){return[(0,e.jsx)("a",{onClick:function(){u.resetFields(),I(function(){return n.startTime!=null&&(n.startTime=M()(n.startTime),n.endTime=M()(n.endTime)),n}),O(!0)},children:"\u66F4\u65B0"},"config"),(0,e.jsx)(N.Z,{title:"\u786E\u5B9A\u4FEE\u6539\u72B6\u6001\u5417\uFF1F",onConfirm:(0,g.Z)((0,i.Z)().mark(function h(){return(0,i.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:n.status=n.status==0?1:0,Ie({id:n.id,status:n.status}).then(function(E){E.data&&y.current.reload()});case 2:case"end":return m.stop()}},h)})),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,e.jsxs)("a",{href:"#",children:[" ",n.status==0?"\u505C\u7528":"\u542F\u7528"]})},"delete"),(0,e.jsx)(N.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",onConfirm:(0,g.Z)((0,i.Z)().mark(function h(){var p,m;return(0,i.Z)().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:W([n.id]),(p=y.current)===null||p===void 0||(m=p.reloadAndRest)===null||m===void 0||m.call(p);case 2:case"end":return Y.stop()}},h)})),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,e.jsx)("a",{href:"#",children:"\u5220\u9664"})},"delete")]}}];return(0,e.jsxs)(de.ZP,{header:{title:"",breadcrumb:{}},children:[(0,e.jsx)(ce.ZP,{pagination:{pageSize:10},scroll:{x:1300},headerTitle:"\u5E7F\u544A\u5217\u8868",actionRef:y,rowKey:"id",search:{labelWidth:120},columns:se,toolBarRender:function(){return[(0,e.jsxs)(re.Z,{type:"primary",onClick:function(){u.setFieldsValue({}),I({}),O(!0)},children:[(0,e.jsx)(ie.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var o=(0,g.Z)((0,i.Z)().mark(function s(n){var h,p;return(0,i.Z)().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return h=[],p=0,E.next=4,Fe(n).then(function(Y){h=Y.data.data,p=Y.data.total});case 4:return E.abrupt("return",{data:h,success:!0,total:p});case 5:case"end":return E.stop()}},s)}));return function(s){return o.apply(this,arguments)}}()}),(l==null?void 0:l.length)>0&&(0,e.jsx)(oe.Z,{extra:(0,e.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,e.jsx)("a",{style:{fontWeight:600},children:l.length})," ","\u9879 \xA0\xA0"]}),children:(0,e.jsx)(N.Z,{type:"primary",title:"\u786E\u8BA4\u662F\u5426\u5220\u9664\u9009\u4E2D\u9879\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var s,n;W(l),t([]),(s=y.current)===null||s===void 0||(n=s.reloadAndRest)===null||n===void 0||n.call(s)},onCancel:function(){},children:(0,e.jsx)("a",{href:"#",children:"\u6279\u91CF\u5220\u9664"})},"primary")}),(0,e.jsx)(Ze,{form:u,storeArray:R,onFinish:function(){var o=(0,g.Z)((0,i.Z)().mark(function s(n){var h;return(0,i.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(h=!1,n.startTime=M()(n.planDate[0]).format("YYYY-MM-DD HH:mm:ss"),n.endTime=M()(n.planDate[1]).format("YYYY-MM-DD HH:mm:ss"),!n.id){m.next=9;break}return m.next=6,G(n);case 6:h=m.sent,m.next=12;break;case 9:return m.next=11,$(n);case 11:h=m.sent;case 12:h&&(O(!1),y.current&&y.current.reload());case 13:case"end":return m.stop()}},s)}));return function(s){return o.apply(this,arguments)}}(),onCancel:function(){I(void 0),O(!1)},createModalVisible:V,values:Z||{}}),(0,e.jsx)(le.Z,{width:600,visible:ne,onClose:function(){I(void 0),ee(!1)},closable:!1,children:(Z==null?void 0:Z.name)&&(0,e.jsx)(me.ZP,{column:2,title:Z==null?void 0:Z.name,request:(0,g.Z)((0,i.Z)().mark(function o(){return(0,i.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{data:Z||{}});case 1:case"end":return n.stop()}},o)})),params:{id:Z==null?void 0:Z.name},columns:se})})]})},Te=Ee}}]);