包含后厨 团餐 门店分支
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
16 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6264],{64317:function(k,O,t){"use strict";var P=t(28991),D=t(81253),B=t(85893),b=t(22270),R=t(67294),Z=t(66758),E=t(31649),p=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],h=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],g=R.forwardRef(function(l,H){var ne=l.fieldProps,Q=l.children,ue=l.params,$=l.proFieldProps,se=l.mode,V=l.valueEnum,ie=l.request,G=l.showSearch,oe=l.options,A=(0,D.Z)(l,p),le=(0,R.useContext)(Z.Z);return(0,B.jsx)(E.Z,(0,P.Z)((0,P.Z)({valueEnum:(0,b.h)(V),request:ie,params:ue,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,P.Z)({options:oe,mode:se,showSearch:G,getPopupContainer:le.getPopupContainer},ne),ref:H,proFieldProps:$},A),{},{children:Q}))}),f=R.forwardRef(function(l,H){var ne=l.fieldProps,Q=l.children,ue=l.params,$=l.proFieldProps,se=l.mode,V=l.valueEnum,ie=l.request,G=l.options,oe=(0,D.Z)(l,h),A=(0,P.Z)({options:G,mode:se||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},ne),le=(0,R.useContext)(Z.Z);return(0,B.jsx)(E.Z,(0,P.Z)((0,P.Z)({valueEnum:(0,b.h)(V),request:ie,params:ue,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,P.Z)({getPopupContainer:le.getPopupContainer},A),ref:H,proFieldProps:$},oe),{},{children:Q}))}),S=g,i=f,M=S;M.SearchSelect=i,M.displayName="ProFormComponent",O.Z=M},5966:function(k,O,t){"use strict";var P=t(28991),D=t(81253),B=t(85893),b=t(31649),R=["fieldProps","proFieldProps"],Z=["fieldProps","proFieldProps"],E="text",p=function(S){var i=S.fieldProps,M=S.proFieldProps,l=(0,D.Z)(S,R);return(0,B.jsx)(b.Z,(0,P.Z)({valueType:E,fieldProps:i,filedConfig:{valueType:E},proFieldProps:M},l))},h=function(S){var i=S.fieldProps,M=S.proFieldProps,l=(0,D.Z)(S,Z);return(0,B.jsx)(b.Z,(0,P.Z)({valueType:"password",fieldProps:i,proFieldProps:M,filedConfig:{valueType:E}},l))},g=p;g.Password=h,g.displayName="ProFormComponent",O.Z=g},68253:function(k){k.exports={card:"card___2Ik6n",anttabs:"anttabs___33d_r",errorIcon:"errorIcon___2zMXo",anticon:"anticon___3_5SY",errorPopover:"errorPopover___3FRQH",errorListItem:"errorListItem___-b-3Y",errorField:"errorField___3GCmP",editable:"editable___33Tfk"}},83341:function(k,O,t){"use strict";t.d(O,{O:function(){return P}});function P(D){D=D||32;for(var B="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",b=B.length,R="012345678",Z=R.length,E="",p=0;p<D;p++)E+=B.charAt(Math.floor(Math.random()*b));for(var h=0;h<D;h++)E+=R.charAt(Math.floor(Math.random()*Z));return E.toUpperCase()}},48102:function(k,O,t){"use strict";t.r(O),t.d(O,{default:function(){return ke}});var P=t(57338),D=t(273),B=t(62350),b=t(24565),R=t(57663),Z=t(71577),E=t(34792),p=t(48086),h=t(39428),g=t(3182),f=t(2824),S=t(49101),i=t(67294),M=t(28790),l=t(16894),H=t(12826),ne=t(71194),Q=t(50146),ue=t(49111),$=t(19650),se=t(47673),V=t(4107),ie=t(48736),G=t(27049),oe=t(13062),A=t(71230),le=t(89032),N=t(15746),$e=t(952),Se=t(5966),Me=t(64317),Je=t(68253),X=t(11849),F=t(48971),T=t(96690),w={getTypeList:function(n,y){return(0,F.WY)((0,T.w)()+"/api/batching/getbatchingtypelist",{method:"GET",params:(0,X.Z)({},n)})},GetDicList:function(n){return(0,F.WY)((0,T.w)()+"/api/dictdata/getdiclist?typeCode="+n,{method:"Get"})},getUintList:function(n,y){return(0,F.WY)((0,T.w)()+"/api/batching/getbatchinguintList",{method:"GET",params:(0,X.Z)({},n)})},addbatchinguint:function(n,y){return(0,F.WY)((0,T.w)()+"/api/batching/addbatchinguint",{method:"POST",data:(0,X.Z)({},n)})},addbatchingtype:function(n,y){return(0,F.WY)((0,T.w)()+"/api/batching/addbatchingtype",{method:"POST",data:(0,X.Z)({},n)})},add:function(n,y){return(0,F.WY)((0,T.w)()+"/api/batching/add",{method:"POST",data:(0,X.Z)({},n)})},update:function(n,y){return(0,F.WY)((0,T.w)()+"/api/batching/update",{method:"Post",data:n})},removeProduct:function(n){return(0,F.WY)((0,T.w)()+"/api/batching/delete",{method:"Post",data:n})},getpage:function(n,y){return(0,F.WY)((0,T.w)()+"/api/batching/getpage",{method:"Post",data:n})},getproductdetailed:function(n,y){return(0,F.WY)((0,T.w)()+"/api/product-code-server/product-list",{method:"Post",data:n})},updateStatus:function(n){return(0,F.WY)((0,T.w)()+"/api/batching/updatebatchingstatus",{method:"Post",data:n})},BatchList:function(n){return(0,F.WY)((0,T.w)()+"/api/product/product-code/".concat(n),{method:"get"})}},r=t(85893),de={name:"\u7269\u6599\u540D\u79F0",stockUint:"\u7269\u6599\u5355\u4F4D",specs:"\u7269\u6599\u89C4\u683C",code:"\u7269\u6599\u7F16\u7801",aittribute:"\u7269\u6599\u5C5E\u6027",typeID:"\u7269\u6599\u5206\u7C7B",status:"\u7269\u6599\u72B6\u6001",price:"\u6210\u672C\u4EF7",netrecovery:"\u51C0\u6599\u7387(%)",OutstockUint:"\u51FA\u5E93\u5355\u4F4D",proportion:"\u6362\u7B97\u6BD4\u4F8B(%)",foreignKeyRe:"\u5173\u8054\u5916\u952E"},Ue=[],Ve=function(n){var y,ce=n.modalVisible,K=n.onCancel,Ce=(0,i.useRef)(),pe=(0,i.useState)(function(){return Ue.map(function(x){return x.id})}),he=(0,f.Z)(pe,2),J=he[0],xe=he[1],fe=(0,i.useState)(),ve=(0,f.Z)(fe,2),De=ve[0],U=ve[1],Fe=(0,i.useState)(function(){return Ue}),q=(0,f.Z)(Fe,2),L=q[0],me=q[1],Te=(0,i.useState)([]),_=(0,f.Z)(Te,2),je=_[0],Ee=_[1],Le=(0,i.useState)([]),ee=(0,f.Z)(Le,2),Oe=ee[0],Ie=ee[1],be=(0,i.useState)(""),te=(0,f.Z)(be,2),W=te[0],ae=te[1],Re=(0,i.useState)(""),re=(0,f.Z)(Re,2),z=re[0],ge=re[1],we=(0,i.useRef)(null),ye=(0,i.useRef)(null),Pe=function(){n.values.membersList!=null&&(xe(n.values.membersList.map(function(v){return v.id})),me(n.values.membersList))};(0,i.useEffect)(function(){Pe(),console.log("props.uintListData",n.uintListData),Ee(n.typeListData),Ie(n.uintListData)},[ce,n.typeListData,n.uintListData]);var We=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0},{title:"\u6761\u7801",dataIndex:"code",width:"30%",formItemProps:{rules:[{required:!0,whitespace:!0,message:"\u7269\u6599\u7F16\u7801"},{max:8,whitespace:!0,message:"\u6700\u957F\u4E3A 8 \u4F4D"},{min:4,whitespace:!0,message:"\u6700\u5C0F\u4E3A 4 \u4F4D"}]}},{title:"\u5305\u88C5\u5355\u4F4D",key:"packUnit",dataIndex:"packUnit",valueType:"select",fieldProps:{options:n.uintListData},formItemProps:{rules:[{required:!0,whitespace:!0,message:"\u5305\u88C5\u5355\u4F4D"}]}},{title:"\u6BD4\u4F8B",dataIndex:"proportion",valueType:"digit",formItemProps:{rules:[{required:!0,whitespace:!0,message:"\u6362\u7B97\u6BD4\u4F8B"}]}},{title:"\u64CD\u4F5C",valueType:"option",width:250}],Be=function(v){ae(v.target.value)},Ze=function(v){ge(v.target.value)},Ae=function(v){if(v.preventDefault(),W.length==0)p.default.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var Y={name:W};w.addbatchingtype(Y).then(function(I){I.succeeded?(p.default.success("\u6DFB\u52A0\u6210\u529F"),n.initTypeList(),ae("")):p.default.error(I.errors)})}},Ke=function(v){if(v.preventDefault(),z.length==0)p.default.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var Y={name:z};w.addbatchinguint(Y).then(function(I){I.succeeded?(n.initUintList(),ge(""),p.default.success("\u6DFB\u52A0\u6210\u529F")):p.default.error(I.errors)})}};return(0,r.jsx)(Q.Z,{destroyOnClose:!0,title:n.values.id?"\u7F16\u8F91\u7269\u6599":"\u65B0\u5EFA\u7269\u6599",width:1e3,visible:ce,onCancel:function(){return K()},footer:null,maskClosable:!1,children:(0,r.jsxs)($e.ZP,{layout:"horizontal",hideRequiredMark:!0,formRef:Ce,initialValues:n.values,onFinish:n.onFinish,submitter:!1,children:[(0,r.jsxs)(A.Z,{gutter:16,children:[(0,r.jsx)(N.Z,{lg:12,md:12,sm:24,children:(0,r.jsx)(Se.Z,{label:de.code,disabled:(y=n.values)===null||y===void 0?void 0:y.code,name:"code",rules:[{required:!0,max:50}],placeholder:"\u8BF7\u8F93\u5165\u539F\u6599\u7F16\u7801",onChange:function(v){U(v.target.value)}})}),(0,r.jsxs)(N.Z,{lg:12,md:12,sm:24,children:[(0,r.jsx)(Se.Z,{name:"id",hidden:!0}),(0,r.jsx)(Se.Z,{label:de.name,name:"name",rules:[{required:!0,max:50}],placeholder:"\u8BF7\u8F93\u5165\u539F\u6599\u540D\u79F0"})]})]}),(0,r.jsxs)(A.Z,{gutter:16,children:[(0,r.jsx)(N.Z,{lg:12,md:12,sm:24,children:(0,r.jsx)(Me.Z,{label:de.typeID,name:"typeID",style:{width:"100%"},showSearch:!0,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7269\u6599\u5206\u7C7B"}],placeholder:"\u8BF7\u9009\u62E9\u7269\u6599\u5206\u7C7B",fieldProps:{dropdownRender:function(v){return(0,r.jsxs)(r.Fragment,{children:[v,(0,r.jsx)(G.Z,{style:{margin:"8px 0"}}),(0,r.jsxs)($.Z,{style:{padding:"0 8px 4px"},children:[(0,r.jsx)(V.Z,{placeholder:"\u8BF7\u8F93\u5165\u7269\u6599\u5206\u7C7B",ref:we,value:W,onChange:Be,onKeyDown:function(I){return I.stopPropagation()}}),(0,r.jsx)(Z.Z,{type:"text",icon:(0,r.jsx)(S.Z,{}),onClick:Ae,children:"\u6DFB\u52A0"})]})]})}},options:je})}),(0,r.jsx)(N.Z,{lg:12,md:12,sm:24,children:(0,r.jsx)(Me.Z,{label:de.stockUint,name:"stockUint",showSearch:!0,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5355\u4F4D"}],style:{width:"100%"},placeholder:"\u8BF7\u9009\u62E9\u7269\u6599\u5355\u4F4D",fieldProps:{dropdownRender:function(v){return(0,r.jsxs)(r.Fragment,{children:[v,(0,r.jsx)(G.Z,{style:{margin:"8px 0"}}),(0,r.jsxs)($.Z,{style:{padding:"0 8px 4px"},children:[(0,r.jsx)(V.Z,{placeholder:"\u8BF7\u8F93\u5165\u7269\u6599\u5355\u4F4D",ref:ye,value:z,onChange:Ze,onKeyDown:function(I){return I.stopPropagation()}}),(0,r.jsx)(Z.Z,{type:"text",icon:(0,r.jsx)(S.Z,{}),onClick:Ke,children:"\u6DFB\u52A0"})]})]})}},options:Oe})})]}),(0,r.jsxs)(A.Z,{gutter:4,children:[(0,r.jsx)(N.Z,{span:12}),(0,r.jsxs)(N.Z,{span:12,children:[(0,r.jsx)(Z.Z,{htmlType:"button",style:{float:"right",left:10},onClick:K,children:"\u53D6\u6D88"}),(0,r.jsx)(Z.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})]})})},Ge=Ve,Ne=t(83341),ze=function(){var n=(0,i.useState)(),y=(0,f.Z)(n,2),ce=y[0],K=y[1],Ce=(0,i.useState)({}),pe=(0,f.Z)(Ce,2),he=pe[0],J=pe[1],xe=(0,i.useState)(),fe=(0,f.Z)(xe,2),ve=fe[0],De=fe[1],U=(0,i.useRef)(),Fe=(0,i.useState)(),q=(0,f.Z)(Fe,2),L=q[0],me=q[1],Te=(0,i.useState)([]),_=(0,f.Z)(Te,2),je=_[0],Ee=_[1],Le=(0,i.useState)([]),ee=(0,f.Z)(Le,2),Oe=ee[0],Ie=ee[1],be=(0,i.useState)(),te=(0,f.Z)(be,2),W=te[0],ae=te[1],Re=(0,i.useState)(),re=(0,f.Z)(Re,2),z=re[0],ge=re[1],we=(0,i.useState)(),ye=(0,f.Z)(we,2),Pe=ye[0],We=ye[1],Be=(0,i.useState)(""),Ze=(0,f.Z)(Be,2),Ae=Ze[0],Ke=Ze[1];(0,i.useEffect)(function(){x(),v();function c(){w.GetDicList("BatchingType").then(function(s){var u=s.data,d={};if(s.succeeded){var a=[];u.forEach(function(o){d[o.code]={text:o.remark},a.push({batchingType:o.code,text:o.remark,value:o.code,label:o.remark})}),Ie(d),Ee(a)}})}c()},[]);var x=function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){var d,a;return(0,h.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,w.getUintList();case 2:d=m.sent,a=[],d.data.length>0&&d.data.forEach(function(j){a.push({stockuint:j.id,text:j.name,value:j.id,label:j.name})}),ge(a);case 6:case"end":return m.stop()}},s)}));return function(u){return c.apply(this,arguments)}}(),v=function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){var d,a;return(0,h.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,w.getTypeList();case 2:d=m.sent,a=[],d.data.length>0&&d.data.forEach(function(j){a.push({typeid:j.id,text:j.name,value:j.id,label:j.name})}),We(a);case 6:case"end":return m.stop()}},s)}));return function(u){return c.apply(this,arguments)}}(),Y=function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,w.add(u).then(function(o){o.data?p.default.success("\u6DFB\u52A0\u6210\u529F"):p.default.error(e.error)});case 3:return a.abrupt("return",!0);case 6:return a.prev=6,a.t0=a.catch(0),p.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),a.abrupt("return",!1);case 10:case"end":return a.stop()}},s,null,[[0,6]])}));return function(u){return c.apply(this,arguments)}}(),I=function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,w.update(u).then(function(o){o.data?p.default.success("\u4FEE\u6539\u6210\u529F"):p.default.error(e.error)});case 3:return a.abrupt("return",!0);case 6:return a.prev=6,a.t0=a.catch(0),p.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),a.abrupt("return",!1);case 10:case"end":return a.stop()}},s,null,[[0,6]])}));return function(u){return c.apply(this,arguments)}}(),He=function(){return(W==null?void 0:W.length)>0&&(0,r.jsx)(b.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417?",onConfirm:Qe,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,r.jsx)(Z.Z,{type:"primary",children:"\u6279\u91CF\u5220\u9664"})})},Qe=function(){var s,u;Xe(W),ae([]),(s=U.current)===null||s===void 0||(u=s.reloadAndRest)===null||u===void 0||u.call(s)},Xe=function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(u){a.next=2;break}return a.abrupt("return",!0);case 2:return a.next=4,w.removeProduct(u.map(function(o){return o.id})).then(function(o){o.data?(p.default.success("\u5220\u9664\u6210\u529F"),U.current.reload()):p.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")});case 4:return a.abrupt("return",!0);case 5:case"end":return a.stop()}},s)}));return function(u){return c.apply(this,arguments)}}(),Ye=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(s,u){return(0,r.jsx)("a",{onClick:function(){me(u),De(!0)},children:s})}},{title:"\u7269\u6599\u540D\u79F0",dataIndex:"name",ellipsis:!0,formItemProps:{rules:[{required:!0,message:"\u540D\u79F0\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u7269\u6599\u7F16\u7801",dataIndex:"code",ellipsis:!0},{title:"\u7269\u6599\u7C7B\u522B",dataIndex:"typeID",valueType:"select",hideInSearch:!0,fieldProps:{options:Pe}},{title:"\u7269\u6599\u5355\u4F4D",dataIndex:"stockUint",valueType:"select",fieldProps:{options:z}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"date",hideInForm:!0,hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:350,render:function(s,u){return[(0,r.jsxs)("a",{onClick:function(){K(!0),J(u)},children:[" ","\u66F4\u65B0"]}),(0,r.jsx)(b.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){w.removeProduct([u.id]).then(function(a){a.succeeded?(p.default.success("\u5220\u9664\u6210\u529F"),U.current.reload()):p.default.error(e.error)})},onCancel:function(){},children:(0,r.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,r.jsxs)(M.ZP,{ost:!0,header:{title:"",breadcrumb:{}},children:[(0,r.jsx)(l.ZP,{headerTitle:"\u7269\u6599\u5217\u8868",actionRef:U,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,r.jsxs)(Z.Z,{type:"primary",onClick:function(){var u={code:(0,Ne.O)(4)};J(u),K(!0)},children:[(0,r.jsx)(S.Z,{})," \u65B0\u5EFA"]},"primary"),(0,r.jsx)(He,{})]},request:function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){var d,a;return(0,h.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return d=[],a=0,m.next=4,w.getpage(u).then(function(j){d=j.data.data,a=j.data.total});case 4:return m.abrupt("return",{data:d,success:!0,total:a});case 5:case"end":return m.stop()}},s)}));return function(s){return c.apply(this,arguments)}}(),columns:Ye,rowSelection:{onChange:function(s,u){ae(u)}}}),(0,r.jsx)(Ge,{dicData:je,uintListData:z,typeListData:Pe,initUintList:x,initTypeList:v,onFinish:function(){var c=(0,g.Z)((0,h.Z)().mark(function s(u){var d;return(0,h.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(d=!1,console.log("value",u),J({}),!u.id){o.next=9;break}return o.next=6,I(u);case 6:d=o.sent,o.next=12;break;case 9:return o.next=11,Y(u);case 11:d=o.sent;case 12:d&&(K(!1),U.current&&U.current.reload()),U.current.reload();case 14:case"end":return o.stop()}},s)}));return function(s){return c.apply(this,arguments)}}(),onCancel:function(){K(!1),J({})},modalVisible:ce,values:he||{}}),(0,r.jsx)(D.Z,{width:600,visible:ve,onClose:function(){me(void 0),De(!1)},closable:!1,children:(L==null?void 0:L.name)&&(0,r.jsx)(H.ZP,{column:2,title:L==null?void 0:L.name,request:(0,g.Z)((0,h.Z)().mark(function c(){return(0,h.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",{data:L||{}});case 1:case"end":return u.stop()}},c)})),params:{id:L==null?void 0:L.name},columns:Ye})})]})},ke=ze}}]);