包含后厨 团餐 门店分支
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

2 wiersze
12 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7985],{26072:function(re,W,a){"use strict";a.r(W);var N=a(20228),f=a(11382),T=a(57338),b=a(83107),w=a(11849),j=a(57663),I=a(71577),x=a(43185),K=a(93349),U=a(62350),z=a(24565),h=a(2824),c=a(39428),L=a(34792),p=a(48086),g=a(3182),G=a(49101),A=a(84391),E=a(67294),R=a(28790),k=a(85224),C=a(16894),V=a(12826),D=a(48971),M=a(82539),s=a(85893),ne=null,O=function(){var l=(0,g.Z)((0,c.Z)().mark(function e(i){var v;return(0,c.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return v=p.default.loading("\u6B63\u5728\u914D\u7F6E"),u.prev=1,u.next=4,(0,M.e3)({id:i.id,code:i.code,name:i.name,price:i.price,imgUrl:i.imgUrl,remark:i.remark,status:i.status,goodsTypeId:i.goodsTypeId}).then(function(P){P.data?p.default.success("\u914D\u7F6E\u6210\u529F"):p.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")});case 4:return u.abrupt("return",!0);case 7:return u.prev=7,u.t0=u.catch(1),v(),u.abrupt("return",!1);case 11:case"end":return u.stop()}},e,null,[[1,7]])}));return function(i){return l.apply(this,arguments)}}(),t=function(){var l=(0,g.Z)((0,c.Z)().mark(function e(i){var v;return(0,c.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(v=p.default.loading("\u6B63\u5728\u5220\u9664"),i){u.next=3;break}return u.abrupt("return",!0);case 3:return u.prev=3,u.next=6,(0,M.yR)(i.map(function(P){return P.id})).then(function(P){v(),P.data?p.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"):p.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")});case 6:return u.abrupt("return",!0);case 9:return u.prev=9,u.t0=u.catch(3),v(),p.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),u.abrupt("return",!1);case 14:case"end":return u.stop()}},e,null,[[3,9]])}));return function(i){return l.apply(this,arguments)}}(),o=function(){var e=(0,E.useState)([]),i=(0,h.Z)(e,2),v=i[0],F=i[1],u=(0,E.useState)(!1),P=(0,h.Z)(u,2),Ee=P[0],ve=P[1],se=(0,E.useState)(!1),J=(0,h.Z)(se,2),ue=J[0],oe=J[1],B=(0,E.useRef)(),le=(0,E.useState)(),H=(0,h.Z)(le,2),y=H[0],ie=H[1],de=(0,E.useState)([]),Q=(0,h.Z)(de,2),Z=Q[0],X=Q[1],_e=(0,E.useState)(),q=(0,h.Z)(_e,2),ce=q[0],pe=q[1],me=(0,E.useState)(!1),ee=(0,h.Z)(me,2),fe=ee[0],$=ee[1];(0,E.useEffect)(function(){he()},[]);function he(){(0,M.FM)().then(function(m){pe(m.data)})}var te=[{title:"\u4E3B\u952E",dataIndex:"id",hideInTable:!0,hideInSearch:!0},{title:"\u56FE\u7247\u5730\u5740",dataIndex:"imgUrl",hideInTable:!0,hideInSearch:!0},{title:"\u7F16\u7801",dataIndex:"code",valueType:"textarea"},{title:"\u540D\u79F0",dataIndex:"name",valueType:"textarea"},{title:"\u57FA\u7840\u4EF7\u683C",dataIndex:"price",hideInForm:!0,renderText:function(n){return"".concat(n,"\xA5")},hideInSearch:!0},{title:"\u5546\u54C1\u7C7B\u578B",dataIndex:"goodsTypeName",valueType:"treeSelect",fieldProps:{showSearch:!0,allowClear:!0,options:ce}},{title:"\u5546\u54C1\u7C7B\u578B",dataIndex:"goodsTypeId",hideInForm:!0,hideInTable:!0,valueEnum:v},{title:"\u72B6\u6001",dataIndex:"status",hideInForm:!0,valueEnum:{0:{text:"\u6B63\u5E38",status:"Processing"},1:{text:"\u505C\u7528",status:"Error"},2:{text:"\u5220\u9664",status:"Error"}}},{title:"\u5907\u6CE8",dataIndex:"remark",ellipsis:!0,tip:"\u6807\u9898\u8FC7\u957F\u4F1A\u81EA\u52A8\u6536\u7F29"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:350,render:function(n,r){return[(0,s.jsx)("a",{type:"primary",onClick:function(){D.m8.push({pathname:"/database/goods/goodsInfo",query:{isAdd:!1,values:r,tabStatus:"basis"}})},children:"\u66F4\u65B0"},"primary"),(0,s.jsx)("a",{type:"primary",onClick:function(){D.m8.push({pathname:"/database/goods/goodsInfo",query:{isAdd:!1,values:r,tabStatus:"goodsbom"}})},children:"\u5546\u54C1\u914D\u65B9\u8BBE\u7F6E"},"primary"),(0,s.jsx)("a",{type:"primary",onClick:function(){D.m8.push({pathname:"/database/goods/goodsInfo",query:{isAdd:!1,values:r,tabStatus:"goodstechnologymaken"}})},children:"\u5546\u54C1\u5DE5\u827A\u8BBE\u7F6E"},"primary"),r.status===0&&(0,s.jsx)("a",{onClick:function(){r.status="1",O(r),B.current.reload()},children:"\u505C\u7528"},"link"),(r.status===1||r.status===2)&&(0,s.jsx)("a",{onClick:function(){r.status="0",O(r),B.current.reload()},children:"\u542F\u7528"},"warn"),(0,s.jsx)(z.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){(0,M.yR)(r.id).then(function(_){_.succeeded?(p.default.success("\u5220\u9664\u6210\u529F"),B.current.reload()):p.default.error(_.errors)})},onCancel:function(){},children:(0,s.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}],ge={beforeUpload:function(n){return $(!0),n.type!=="application/vnd.ms-excel"&&n.type!=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"&&p.default.error("".concat(n.name," \u4E0D\u662F exelce \u6587\u4EF6")),n.type=="application/vnd.ms-excel"||n.type=="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"?!0:K.Z.LIST_IGNORE},name:"file",action:"/saasbase/api/goodes/ExportGood",headers:{Authorization:"Bearer "+localStorage.getItem("token")},onChange:function(n){n.file.status!=="uploading"&&console.log(n.file,n.fileList),n.file.status==="done"?($(!1),p.default.success("".concat(n.file.name," file uploaded successfully"))):n.file.status==="error"&&($(!1),p.default.error("".concat(n.file.name,":").concat(n.file.response," ")))}};return(0,s.jsx)(R.ZP,{host:!0,header:{title:"",breadcrumb:{}},children:(0,s.jsxs)(f.Z,{spinning:fe,tip:"\u4E0A\u4F20\u4E2D...",children:[(0,s.jsx)(C.ZP,{headerTitle:"",actionRef:B,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,s.jsxs)(I.Z,{type:"primary",onClick:function(){D.m8.push({pathname:"/database/goods/goodsInfo",query:{isAdd:!0,values:null,tabStatus:"basis"}})},children:[(0,s.jsx)(G.Z,{})," \u65B0\u5EFA"]},"primary"),(0,s.jsxs)(I.Z,{onClick:(0,g.Z)((0,c.Z)().mark(function n(){var r;return(0,c.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:r=document.createElement("a"),r.href="https://hbl-test-1305371387.cos.ap-chengdu.myqcloud.com//Franchisee/goods/133463060115739076.xlsx",r.click();case 3:case"end":return _.stop()}},n)})),children:[(0,s.jsx)(A.Z,{})," \u4E0B\u8F7D\u5546\u54C1\u5BFC\u5165\u6A21\u677F"]},"primary"),(0,s.jsx)(K.Z,(0,w.Z)((0,w.Z)({},ge),{},{showUploadList:!1,children:(0,s.jsx)(I.Z,{icon:(0,s.jsx)(A.Z,{}),children:"\u5BFC\u5165\u5546\u54C1"})}))]},request:function(){var m=(0,g.Z)((0,c.Z)().mark(function n(r){var d,_;return(0,c.Z)().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return d=[],r.goodsTypeId!=null&&(r.goodsTypeId=v[r.goodsTypeId].goodsTypeId),_=0,S.next=5,(0,M.lO)(r).then(function(ae){d=ae.data.data,console.log(d),d.forEach(function(Y){Y.defaultMate!=null&&(Y.defaultMate=Y.defaultMate.split(","))}),console.log(d),_=ae.data.total});case 5:return S.abrupt("return",{data:d,success:!0,total:_});case 6:case"end":return S.stop()}},n)}));return function(n){return m.apply(this,arguments)}}(),columns:te,rowSelection:{onChange:function(n,r){X(r)}}}),(Z==null?void 0:Z.length)>0&&(0,s.jsx)(k.Z,{extra:(0,s.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,s.jsx)("a",{style:{fontWeight:600},children:Z.length})," ","\u9879 \xA0\xA0"]}),children:(0,s.jsx)(I.Z,{onClick:(0,g.Z)((0,c.Z)().mark(function m(){var n,r;return(0,c.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,t(Z);case 2:X([]),(n=B.current)===null||n===void 0||(r=n.reloadAndRest)===null||r===void 0||r.call(n);case 4:case"end":return _.stop()}},m)})),children:"\u5220\u9664"})}),(0,s.jsx)(b.Z,{width:600,visible:ue,onClose:function(){ie(void 0),oe(!1)},closable:!1,children:(y==null?void 0:y.name)&&(0,s.jsx)(V.ZP,{column:2,title:y==null?void 0:y.name,request:(0,g.Z)((0,c.Z)().mark(function m(){return(0,c.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",{data:y||{}});case 1:case"end":return r.stop()}},m)})),params:{id:y==null?void 0:y.name},columns:te})})]})})};W.default=o},82539:function(re,W,a){"use strict";a.d(W,{lO:function(){return w},Rq:function(){return c},e3:function(){return p},yR:function(){return G},FM:function(){return k}});var N=a(11849),f=a(39428),T=a(3182),b=a(48971);function w(t){return j.apply(this,arguments)}function j(){return j=(0,T.Z)((0,f.Z)().mark(function t(o){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,b.WY)("/saasbase/api/goods/page",{method:"Post",data:o}));case 1:case"end":return e.stop()}},t)})),j.apply(this,arguments)}function I(t){return x.apply(this,arguments)}function x(){return x=_asyncToGenerator(_regeneratorRuntime().mark(function t(o){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/saasbase/api/bom/getpage",{method:"Post",data:o}));case 1:case"end":return e.stop()}},t)})),x.apply(this,arguments)}function K(t){return U.apply(this,arguments)}function U(){return U=_asyncToGenerator(_regeneratorRuntime().mark(function t(o){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/saasbase/api/GoodsBom/AddBom",{method:"Post",data:o}));case 1:case"end":return e.stop()}},t)})),U.apply(this,arguments)}function z(t){return h.apply(this,arguments)}function h(){return h=_asyncToGenerator(_regeneratorRuntime().mark(function t(o){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/saasbase/api/GoodsBom/getBomInfo",{method:"Post",data:o}));case 1:case"end":return e.stop()}},t)})),h.apply(this,arguments)}function c(t){return L.apply(this,arguments)}function L(){return L=(0,T.Z)((0,f.Z)().mark(function t(o){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,b.WY)("/saasbase/api/goods/add",{method:"POST",data:o}));case 1:case"end":return e.stop()}},t)})),L.apply(this,arguments)}function p(t){return g.apply(this,arguments)}function g(){return g=(0,T.Z)((0,f.Z)().mark(function t(o){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("\u5546\u54C1\u6570\u636E\u4FEE\u6539",o),e.abrupt("return",(0,b.WY)("/saasbase/api/goods/update",{method:"Post",data:o}));case 2:case"end":return e.stop()}},t)})),g.apply(this,arguments)}function G(t){return A.apply(this,arguments)}function A(){return A=(0,T.Z)((0,f.Z)().mark(function t(o){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,b.WY)("/saasbase/api/goods/delete?id="+o,{method:"Get"}));case 1:case"end":return e.stop()}},t)})),A.apply(this,arguments)}function E(t){return R.apply(this,arguments)}function R(){return R=_asyncToGenerator(_regeneratorRuntime().mark(function t(o){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/saasbase/api/goods-type/goods-types",{method:"POST",data:o}));case 1:case"end":return e.stop()}},t)})),R.apply(this,arguments)}function k(t){return C.apply(this,arguments)}function C(){return C=(0,T.Z)((0,f.Z)().mark(function t(o){return(0,f.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,b.WY)("\u200B/saasbase/api\u200B/goodstype/tree",{method:"GET",data:(0,N.Z)({},o)}));case 1:case"end":return e.stop()}},t)})),C.apply(this,arguments)}function V(t){return D.apply(this,arguments)}function D(){return D=_asyncToGenerator(_regeneratorRuntime().mark(function t(o){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/saasbase/api/goodstaste/getlist"));case 1:case"end":return e.stop()}},t)})),D.apply(this,arguments)}function M(t){return s.apply(this,arguments)}function s(){return s=_asyncToGenerator(_regeneratorRuntime().mark(function t(o){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/saasbase//api/goods/exportgood",{method:"POST",data:o}));case 1:case"end":return e.stop()}},t)})),s.apply(this,arguments)}function ne(){return O.apply(this,arguments)}function O(){return O=_asyncToGenerator(_regeneratorRuntime().mark(function t(){return _regeneratorRuntime().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",request("/saasbase/api/goods/goodstemplateexport",{method:"post",responseType:"blob"}));case 1:case"end":return l.stop()}},t)})),O.apply(this,arguments)}}}]);