包含后厨 团餐 门店分支
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(H,U,t){"use strict";var Z=t(28991),x=t(81253),w=t(85893),D=t(22270),b=t(67294),B=t(66758),o=t(31649),d=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],K=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],f=b.forwardRef(function(l,Q){var X=l.fieldProps,se=l.children,J=l.params,ue=l.proFieldProps,$=l.mode,ie=l.valueEnum,V=l.request,oe=l.showSearch,G=l.options,le=(0,x.Z)(l,d),N=(0,b.useContext)(B.Z);return(0,w.jsx)(o.Z,(0,Z.Z)((0,Z.Z)({valueEnum:(0,D.h)(ie),request:V,params:J,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,Z.Z)({options:G,mode:$,showSearch:oe,getPopupContainer:N.getPopupContainer},X),ref:Q,proFieldProps:ue},le),{},{children:se}))}),S=b.forwardRef(function(l,Q){var X=l.fieldProps,se=l.children,J=l.params,ue=l.proFieldProps,$=l.mode,ie=l.valueEnum,V=l.request,oe=l.options,G=(0,x.Z)(l,K),le=(0,Z.Z)({options:oe,mode:$||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},X),N=(0,b.useContext)(B.Z);return(0,w.jsx)(o.Z,(0,Z.Z)((0,Z.Z)({valueEnum:(0,D.h)(ie),request:V,params:J,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,Z.Z)({getPopupContainer:N.getPopupContainer},le),ref:Q,proFieldProps:ue},G),{},{children:se}))}),C=f,u=S,M=C;M.SearchSelect=u,M.displayName="ProFormComponent",U.Z=M},5966:function(H,U,t){"use strict";var Z=t(28991),x=t(81253),w=t(85893),D=t(31649),b=["fieldProps","proFieldProps"],B=["fieldProps","proFieldProps"],o="text",d=function(C){var u=C.fieldProps,M=C.proFieldProps,l=(0,x.Z)(C,b);return(0,w.jsx)(D.Z,(0,Z.Z)({valueType:o,fieldProps:u,filedConfig:{valueType:o},proFieldProps:M},l))},K=function(C){var u=C.fieldProps,M=C.proFieldProps,l=(0,x.Z)(C,B);return(0,w.jsx)(D.Z,(0,Z.Z)({valueType:"password",fieldProps:u,proFieldProps:M,filedConfig:{valueType:o}},l))},f=d;f.Password=K,f.displayName="ProFormComponent",U.Z=f},68253:function(H){H.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(H,U,t){"use strict";t.d(U,{O:function(){return Z}});function Z(x){x=x||32;for(var w="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",D=w.length,b="012345678",B=b.length,o="",d=0;d<x;d++)o+=w.charAt(Math.floor(Math.random()*D));for(var K=0;K<x;K++)o+=b.charAt(Math.floor(Math.random()*B));return o.toUpperCase()}},48102:function(H,U,t){"use strict";t.r(U),t.d(U,{default:function(){return Qe}});var Z=t(57338),x=t(83107),w=t(57663),D=t(71577),b=t(62350),B=t(24565),o=t(2824),d=t(39428),K=t(34792),f=t(48086),S=t(3182),C=t(49101),u=t(67294),M=t(28790),l=t(85224),Q=t(16894),X=t(12826),se=t(71194),J=t(50146),ue=t(49111),$=t(19650),ie=t(47673),V=t(4107),oe=t(48736),G=t(27049),le=t(13062),N=t(71230),Xe=t(89032),de=t(15746),Ke=t(952),Se=t(5966),Me=t(64317),Je=t(68253),k=t(11849),T=t(48971),E=t(96690),R={getTypeList:function(a,p){return(0,T.WY)((0,E.w)()+"/api/batching/getbatchingtypelist",{method:"GET",params:(0,k.Z)({},a)})},GetDicList:function(a){return(0,T.WY)((0,E.w)()+"/api/dictdata/getdiclist?typeCode="+a,{method:"Get"})},getUintList:function(a,p){return(0,T.WY)((0,E.w)()+"/api/batching/getbatchinguintList",{method:"GET",params:(0,k.Z)({},a)})},addbatchinguint:function(a,p){return(0,T.WY)((0,E.w)()+"/api/batching/addbatchinguint",{method:"POST",data:(0,k.Z)({},a)})},addbatchingtype:function(a,p){return(0,T.WY)((0,E.w)()+"/api/batching/addbatchingtype",{method:"POST",data:(0,k.Z)({},a)})},add:function(a,p){return(0,T.WY)((0,E.w)()+"/api/batching/add",{method:"POST",data:(0,k.Z)({},a)})},update:function(a,p){return(0,T.WY)((0,E.w)()+"/api/batching/update",{method:"Post",data:a})},removeProduct:function(a){return(0,T.WY)((0,E.w)()+"/api/batching/delete",{method:"Post",data:a})},getpage:function(a,p){return(0,T.WY)((0,E.w)()+"/api/batching/getpage",{method:"Post",data:a})},getproductdetailed:function(a,p){return(0,T.WY)((0,E.w)()+"/api/product-code-server/product-list",{method:"Post",data:a})},updateStatus:function(a){return(0,T.WY)((0,E.w)()+"/api/batching/updatebatchingstatus",{method:"Post",data:a})},BatchList:function(a){return(0,T.WY)((0,E.w)()+"/api/product/product-code/".concat(a),{method:"get"})}},r=t(85893),ce={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"},Ae=[],Ye=function(a){var p,Y=a.modalVisible,n=a.onCancel,L=(0,u.useRef)(),pe=(0,u.useState)(function(){return Ae.map(function(F){return F.id})}),he=(0,o.Z)(pe,2),q=he[0],Ce=he[1],fe=(0,u.useState)(),ve=(0,o.Z)(fe,2),Fe=ve[0],O=ve[1],xe=(0,u.useState)(function(){return Ae}),_=(0,o.Z)(xe,2),I=_[0],me=_[1],De=(0,u.useState)([]),ee=(0,o.Z)(De,2),Te=ee[0],Ee=ee[1],je=(0,u.useState)([]),te=(0,o.Z)(je,2),Ue=te[0],Le=te[1],Ie=(0,u.useState)(""),ae=(0,o.Z)(Ie,2),A=ae[0],re=ae[1],be=(0,u.useState)(""),ne=(0,o.Z)(be,2),z=ne[0],ge=ne[1],Re=(0,u.useRef)(null),Pe=(0,u.useRef)(null),ye=function(){a.values.membersList!=null&&(Ce(a.values.membersList.map(function(P){return P.id})),me(a.values.membersList))};(0,u.useEffect)(function(){ye(),console.log("props.uintListData",a.uintListData),Ee(a.typeListData),Le(a.uintListData)},[Y,a.typeListData,a.uintListData]);var Be=[{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:a.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}],we=function(P){re(P.target.value)},Ze=function(P){ge(P.target.value)},Oe=function(P){if(P.preventDefault(),A.length==0)f.default.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var W={name:A};R.addbatchingtype(W).then(function(i){i.succeeded?(f.default.success("\u6DFB\u52A0\u6210\u529F"),a.initTypeList(),re("")):f.default.error(i.errors)})}},We=function(P){if(P.preventDefault(),z.length==0)f.default.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var W={name:z};R.addbatchinguint(W).then(function(i){i.succeeded?(a.initUintList(),ge(""),f.default.success("\u6DFB\u52A0\u6210\u529F")):f.default.error(i.errors)})}};return(0,r.jsx)(J.Z,{destroyOnClose:!0,title:a.values.id?"\u7F16\u8F91\u7269\u6599":"\u65B0\u5EFA\u7269\u6599",width:1e3,visible:Y,onCancel:function(){return n()},footer:null,maskClosable:!1,children:(0,r.jsxs)(Ke.ZP,{layout:"horizontal",hideRequiredMark:!0,formRef:L,initialValues:a.values,onFinish:a.onFinish,children:[(0,r.jsxs)(N.Z,{gutter:16,children:[(0,r.jsx)(de.Z,{lg:12,md:12,sm:24,children:(0,r.jsx)(Se.Z,{label:ce.code,disabled:(p=a.values)===null||p===void 0?void 0:p.code,name:"code",rules:[{required:!0,max:50}],placeholder:"\u8BF7\u8F93\u5165\u539F\u6599\u7F16\u7801",onChange:function(P){O(P.target.value)}})}),(0,r.jsxs)(de.Z,{lg:12,md:12,sm:24,children:[(0,r.jsx)(Se.Z,{name:"id",hidden:!0}),(0,r.jsx)(Se.Z,{label:ce.name,name:"name",rules:[{required:!0,max:50}],placeholder:"\u8BF7\u8F93\u5165\u539F\u6599\u540D\u79F0"})]})]}),(0,r.jsxs)(N.Z,{gutter:16,children:[(0,r.jsx)(de.Z,{lg:12,md:12,sm:24,children:(0,r.jsx)(Me.Z,{label:ce.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(P){return(0,r.jsxs)(r.Fragment,{children:[P,(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:Re,value:A,onChange:we,onKeyDown:function(i){return i.stopPropagation()}}),(0,r.jsx)(D.Z,{type:"text",icon:(0,r.jsx)(C.Z,{}),onClick:Oe,children:"\u6DFB\u52A0"})]})]})}},options:Te})}),(0,r.jsx)(de.Z,{lg:12,md:12,sm:24,children:(0,r.jsx)(Me.Z,{label:ce.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(P){return(0,r.jsxs)(r.Fragment,{children:[P,(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:Pe,value:z,onChange:Ze,onKeyDown:function(i){return i.stopPropagation()}}),(0,r.jsx)(D.Z,{type:"text",icon:(0,r.jsx)(C.Z,{}),onClick:We,children:"\u6DFB\u52A0"})]})]})}},options:Ue})})]})]})})},$e=Ye,Ve=t(83341),Ge=function(){var m=(0,S.Z)((0,d.Z)().mark(function a(p){return(0,d.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,R.add(p).then(function(L){L.data?f.default.success("\u6DFB\u52A0\u6210\u529F"):f.default.error(e.error)});case 3:return n.abrupt("return",!0);case 6:return n.prev=6,n.t0=n.catch(0),f.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),n.abrupt("return",!1);case 10:case"end":return n.stop()}},a,null,[[0,6]])}));return function(p){return m.apply(this,arguments)}}(),Ne=function(){var m=(0,S.Z)((0,d.Z)().mark(function a(p){return(0,d.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,R.update(p).then(function(L){L.data?f.default.success("\u4FEE\u6539\u6210\u529F"):f.default.error(e.error)});case 3:return n.abrupt("return",!0);case 6:return n.prev=6,n.t0=n.catch(0),f.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),n.abrupt("return",!1);case 10:case"end":return n.stop()}},a,null,[[0,6]])}));return function(p){return m.apply(this,arguments)}}(),ze=function(){var m=(0,S.Z)((0,d.Z)().mark(function a(p){return(0,d.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(p){n.next=2;break}return n.abrupt("return",!0);case 2:return n.prev=2,n.next=5,R.removeProduct(p.map(function(L){return L.id})).then(function(L){if(L.data)return f.default.success("\u5220\u9664\u6210\u529F"),!0;f.default.error(e.error)});case 5:return n.abrupt("return",!0);case 8:return n.prev=8,n.t0=n.catch(2),f.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),n.abrupt("return",!1);case 12:case"end":return n.stop()}},a,null,[[2,8]])}));return function(p){return m.apply(this,arguments)}}(),He=function(){var a=(0,u.useState)(),p=(0,o.Z)(a,2),Y=p[0],n=p[1],L=(0,u.useState)({}),pe=(0,o.Z)(L,2),he=pe[0],q=pe[1],Ce=(0,u.useState)(),fe=(0,o.Z)(Ce,2),ve=fe[0],Fe=fe[1],O=(0,u.useRef)(),xe=(0,u.useState)(),_=(0,o.Z)(xe,2),I=_[0],me=_[1],De=(0,u.useState)([]),ee=(0,o.Z)(De,2),Te=ee[0],Ee=ee[1],je=(0,u.useState)([]),te=(0,o.Z)(je,2),Ue=te[0],Le=te[1],Ie=(0,u.useState)(),ae=(0,o.Z)(Ie,2),A=ae[0],re=ae[1],be=(0,u.useState)(),ne=(0,o.Z)(be,2),z=ne[0],ge=ne[1],Re=(0,u.useState)(),Pe=(0,o.Z)(Re,2),ye=Pe[0],Be=Pe[1],we=(0,u.useState)(""),Ze=(0,o.Z)(we,2),Oe=Ze[0],We=Ze[1];(0,u.useEffect)(function(){F(),P();function i(){R.GetDicList("BatchingType").then(function(c){var s=c.data,h={};if(c.succeeded){var v=[];s.forEach(function(g){h[g.code]={text:g.remark},v.push({batchingType:g.code,text:g.remark,value:g.code,label:g.remark})}),Le(h),Ee(v)}})}i()},[]);var F=function(){var i=(0,S.Z)((0,d.Z)().mark(function c(s){var h,v;return(0,d.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,R.getUintList();case 2:h=y.sent,v=[],h.data.length>0&&h.data.forEach(function(j){v.push({stockuint:j.id,text:j.name,value:j.id,label:j.name})}),ge(v);case 6:case"end":return y.stop()}},c)}));return function(s){return i.apply(this,arguments)}}(),P=function(){var i=(0,S.Z)((0,d.Z)().mark(function c(s){var h,v;return(0,d.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,R.getTypeList();case 2:h=y.sent,v=[],h.data.length>0&&h.data.forEach(function(j){v.push({typeid:j.id,text:j.name,value:j.id,label:j.name})}),Be(v);case 6:case"end":return y.stop()}},c)}));return function(s){return i.apply(this,arguments)}}(),W=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(c,s){return(0,r.jsx)("a",{onClick:function(){me(s),Fe(!0)},children:c})}},{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:ye}},{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(c,s){return[(0,r.jsxs)("a",{onClick:function(){n(!0),q(s)},children:[" ","\u66F4\u65B0"]}),(0,r.jsx)(B.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){R.removeProduct([s.id]).then(function(v){v.succeeded?(f.default.success("\u5220\u9664\u6210\u529F"),O.current.reloadAndRest()):f.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)(Q.ZP,{headerTitle:"\u7269\u6599\u5217\u8868",actionRef:O,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,r.jsxs)(D.Z,{type:"primary",onClick:function(){var s={code:(0,Ve.O)(4)};q(s),n(!0)},children:[(0,r.jsx)(C.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var i=(0,S.Z)((0,d.Z)().mark(function c(s){var h,v;return(0,d.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return h=[],v=0,y.next=4,R.getpage(s).then(function(j){h=j.data.data,v=j.data.total});case 4:return y.abrupt("return",{data:h,success:!0,total:v});case 5:case"end":return y.stop()}},c)}));return function(c){return i.apply(this,arguments)}}(),columns:W,rowSelection:{onChange:function(c,s){re(s)}}}),(A==null?void 0:A.length)>0&&(0,r.jsx)(l.Z,{extra:(0,r.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,r.jsx)("a",{style:{fontWeight:600},children:A.length})," ","\u9879 \xA0\xA0"]}),children:(0,r.jsx)(D.Z,{type:"primary",onClick:(0,S.Z)((0,d.Z)().mark(function i(){var c,s;return(0,d.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,ze(A);case 2:re([]),(c=O.current)===null||c===void 0||(s=c.reloadAndRest)===null||s===void 0||s.call(c);case 4:case"end":return v.stop()}},i)})),children:"\u6279\u91CF\u5220\u9664"})}),(0,r.jsx)($e,{dicData:Te,uintListData:z,typeListData:ye,initUintList:F,initTypeList:P,onFinish:function(){var i=(0,S.Z)((0,d.Z)().mark(function c(s){var h;return(0,d.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(h=!1,console.log("value",s),q({}),!s.id){g.next=9;break}return g.next=6,Ne(s);case 6:h=g.sent,g.next=12;break;case 9:return g.next=11,Ge(s);case 11:h=g.sent;case 12:h&&(n(!1),O.current&&O.current.reloadAndRest()),O.current.reloadAndRest();case 14:case"end":return g.stop()}},c)}));return function(c){return i.apply(this,arguments)}}(),onCancel:function(){n(!1),q({})},modalVisible:Y,values:he||{}}),(0,r.jsx)(x.Z,{width:600,visible:ve,onClose:function(){me(void 0),Fe(!1)},closable:!1,children:(I==null?void 0:I.name)&&(0,r.jsx)(X.ZP,{column:2,title:I==null?void 0:I.name,request:(0,S.Z)((0,d.Z)().mark(function i(){return(0,d.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",{data:I||{}});case 1:case"end":return s.stop()}},i)})),params:{id:I==null?void 0:I.name},columns:W})})]})},Qe=He}}]);