(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3703,1322],{14206:function(De,X,u){"use strict";u.r(X),u.d(X,{default:function(){return He}});var x=u(57663),A=u(71577),M=u(62350),B=u(24565),b=u(2824),i=u(39428),m=u(11849),_=u(34792),U=u(48086),y=u(3182),q=u(49101),g=u(67294),se=u(78009),N=u(16894),Te=u(71194),V=u(50146),Se=u(49111),Q=u(19650),ke=u(77883),Y=u(85986),f=u(93224),w=u(62999),$=u(54680),o=u(43358),E=u(34041),ze=u(9715),S=u(55843),Je=u(47673),H=u(4107),Fe=u(59465),W=u(48971);function Le(d,s){return le.apply(this,arguments)}function le(){return le=(0,y.Z)((0,i.Z)().mark(function d(s,j){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,W.WY)("/kitchen/api/receivingNote/getPage",{method:"POST",data:s}));case 1:case"end":return a.stop()}},d)})),le.apply(this,arguments)}function Xe(d,s){return oe.apply(this,arguments)}function oe(){return oe=_asyncToGenerator(_regeneratorRuntime().mark(function d(s,j){return _regeneratorRuntime().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:debugger;return a.abrupt("return",request("/kitchen/api/receivingNote/getEntryPage",{method:"POST",params:s}));case 2:case"end":return a.stop()}},d)})),oe.apply(this,arguments)}function je(d,s){return ce.apply(this,arguments)}function ce(){return ce=(0,y.Z)((0,i.Z)().mark(function d(s,j){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,W.WY)("/kitchen/api/receivingNote/getEntryPage?id=".concat(s),{method:"POST"}));case 1:case"end":return a.stop()}},d)})),ce.apply(this,arguments)}function Ae(d,s){return de.apply(this,arguments)}function de(){return de=(0,y.Z)((0,i.Z)().mark(function d(s,j){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,W.WY)("/kitchen/api/receivingNote/approved",{method:"POST",params:s}));case 1:case"end":return a.stop()}},d)})),de.apply(this,arguments)}function $e(d,s){return pe.apply(this,arguments)}function pe(){return pe=(0,y.Z)((0,i.Z)().mark(function d(s,j){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,W.WY)("/kitchen/api/receivingNote/add",{method:"POST",data:s}));case 1:case"end":return a.stop()}},d)})),pe.apply(this,arguments)}function Be(d,s){return he.apply(this,arguments)}function he(){return he=(0,y.Z)((0,i.Z)().mark(function d(s,j){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,W.WY)("/kitchen/api/product-type/type-list",{method:"GET",params:(0,m.Z)({},s)}));case 1:case"end":return a.stop()}},d)})),he.apply(this,arguments)}function Ue(d,s){return fe.apply(this,arguments)}function fe(){return fe=(0,y.Z)((0,i.Z)().mark(function d(s,j){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,W.WY)("/kitchen/api/unit/uint-list",{method:"GET",params:(0,m.Z)({},s)}));case 1:case"end":return a.stop()}},d)})),fe.apply(this,arguments)}function We(d){return ve.apply(this,arguments)}function ve(){return ve=(0,y.Z)((0,i.Z)().mark(function d(s){return(0,i.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.abrupt("return",(0,W.WY)("/kitchen/api/Product/GetPage",{method:"POST",data:s}));case 1:case"end":return v.stop()}},d)})),ve.apply(this,arguments)}function Re(d){return me.apply(this,arguments)}function me(){return me=(0,y.Z)((0,i.Z)().mark(function d(s){return(0,i.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.abrupt("return",(0,W.WY)("/kitchen/api/PurchaseOrder/delivery-entry-list/".concat(s),{method:"get"}));case 1:case"end":return v.stop()}},d)})),me.apply(this,arguments)}var e=u(85893),Ke=["key","name","fieldKey"],Me=H.Z.Search,Ye=function(s){var j=S.Z.useForm(),v=(0,b.Z)(j,1),a=v[0],I=E.Z.Option,z=E.Z.OptGroup,Ce=(0,g.useState)([]),ee=(0,b.Z)(Ce,2),R=ee[0],ye=ee[1],te=(0,g.useState)([]),J=(0,b.Z)(te,2),G=J[0],Ze=J[1],re=(0,g.useState)([]),ne=(0,b.Z)(re,2),be=ne[0],xe=ne[1],ae=(0,g.useState)([]),ue=(0,b.Z)(ae,2),Ee=ue[0],Ie=ue[1];(0,g.useEffect)(function(){var F=function(){var L=(0,y.Z)((0,i.Z)().mark(function D(P){var T,k;return(0,i.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,We({current:1,pageSize:1e7});case 2:T=l.sent.data,T.data&&(k=[],T.data.forEach(function(t){k.push({key:t.code,name:t.name,id:t.id,packUnit:t.packUnit,stockUint:t.stockUint,proportion:t.proportion,code:t.code,productId:t.id})}),Ze(k),ye(k));case 4:case"end":return l.stop()}},D)}));return function(P){return L.apply(this,arguments)}}();F()},[]);var ge={labelCol:{},wrapperCol:{}},Oe=function(L){},we=function(){var F=(0,y.Z)((0,i.Z)().mark(function L(D){var P,T,k,Z,l,t;return(0,i.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return P=[],n.next=3,Re(D);case 3:if(T=n.sent,T.data){for(k=[],P=T.data.deliveryEntryList,Z=function(r){var p,K,C,O;t=R.find(function(Pe){if(Pe.key==P[r].barcode)return Pe}),k[r]=(0,m.Z)((0,m.Z)({},k[r]),{},{code:P[r].barcode,stockUint:(p=t)===null||p===void 0?void 0:p.stockUint,packUnit:(K=t)===null||K===void 0?void 0:K.packUnit,proportion:(C=t)===null||C===void 0?void 0:C.proportion,productId:(O=t)===null||O===void 0?void 0:O.productId,packQty:P[r].deliveryQty,stockQty:P[r].qty})},l=0;l
0&&r.data.forEach(function(O){p.push({stockuint:O.id,text:O.name,value:O.id,label:O.name})}),be(p);case 6:case"end":return C.stop()}},n)}));return function(h){return c.apply(this,arguments)}}(),l=function(){var c=(0,y.Z)((0,i.Z)().mark(function n(h){var r,p;return(0,i.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,Be();case 2:r=C.sent,p=[],r.data.length>0&&r.data.forEach(function(O){p.push({typeid:O.id,text:O.name,value:O.id,label:O.name})}),Ee(p);case 6:case"end":return C.stop()}},n)}));return function(h){return c.apply(this,arguments)}}();function t(){(0,Ne.FM)().then(function(c){we(c.data);var n={};h(c.data);function h(r){for(var p in r)n[r[p].value]={text:r[p].title},r[p].children&&h(r[p].children)}D(n)})}t(),Z(),l()},[]);var P=function(){var Z=(0,y.Z)((0,i.Z)().mark(function l(t){var c,n;return(0,i.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,je(t);case 2:c=r.sent;debugger;n=J,n.sub=c.data,G(n);case 7:case"end":return r.stop()}},l)}));return function(t){return Z.apply(this,arguments)}}(),T=function(){var Z=(0,y.Z)((0,i.Z)().mark(function l(t){return(0,i.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:case"end":return n.stop()}},l)}));return function(t){return Z.apply(this,arguments)}}(),k=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(l,t){return(0,e.jsx)("a",{onClick:function(){G(t),ee(!0)},children:l})}},{title:"\u5355\u636E\u53F7",dataIndex:"sheetId",hideInForm:!0},{title:"\u6536\u8D27\u673A\u6784",dataIndex:"orgId",valueEnum:L},{title:"\u5236\u5355\u4EBA",dataIndex:"createByName"},{title:"\u5BA1\u6838\u4EBA",dataIndex:"approveByName"},{title:"\u5236\u5355\u65E5\u671F",sorter:!0,dataIndex:"operDate",valueType:"date"},{title:"\u5BA1\u6838\u65E5\u671F",sorter:!0,dataIndex:"approveAt",valueType:"date"},{title:"\u5907\u6CE8",dataIndex:"remark"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(l,t){return[t.isApprove===0&&(0,e.jsx)("a",{type:"primary",onClick:(0,y.Z)((0,i.Z)().mark(function c(){var n,h;return(0,i.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,je(t.id);case 2:h=p.sent,h.data.data.length>0&&(t.sub=h.data.data),G(t),t==null||(n=t.startEditable)===null||n===void 0||n.call(t,t.id),a(!0);case 7:case"end":return p.stop()}},c)})),children:"\u4FEE\u6539"},"config"),t.isApprove===0&&(0,e.jsx)("a",{type:"primary",onClick:function(){U.default.loading("\u6B63\u5728\u5BA1\u6838\uFF01");try{Ae({Id:t.id}),U.default.success("\u5BA1\u6838\u5B8C\u6210\uFF01")}catch(n){console.log(n),U.default.error("\u6B63\u5728\u5BA1\u6838\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}R.current.reload()},children:"\u5BA1\u6838"},"config"),t.isApprove===0&&(0,e.jsx)(B.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){T(t.id)},onCancel:function(){},children:(0,e.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,e.jsxs)(se.ZP,{children:[(0,e.jsx)(N.ZP,{headerTitle:"\u6536\u8D27\u5355",actionRef:R,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,e.jsxs)(A.Z,{type:"primary",onClick:function(){G({}),a(!0)},children:[(0,e.jsx)(q.Z,{})," \u65B0\u589E"]},"create")]},request:function(){var Z=(0,y.Z)((0,i.Z)().mark(function l(t){var c,n;return(0,i.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return c=[],n=0,r.next=4,Le(t).then(function(p){c=p.data.data,n=p.data.total});case 4:return r.abrupt("return",{data:c,success:!0,total:n});case 5:case"end":return r.stop()}},l)}));return function(l){return Z.apply(this,arguments)}}(),columns:k}),(0,e.jsx)(Ge,{onFinish:function(){var Z=(0,y.Z)((0,i.Z)().mark(function l(t){var c;return(0,i.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=!1,h.next=3,Ve(t);case 3:c=h.sent,c&&(a(!1),R.current&&R.current.reload());case 5:case"end":return h.stop()}},l)}));return function(l){return Z.apply(this,arguments)}}(),onCancel:function(){G(void 0),a(!1)},createModalVisible:v,values:J||{},typeList:ue,uintList:ne,OrgData:Oe})]})},He=Qe},3408:function(De,X,u){"use strict";u.d(X,{lM:function(){return b},IH:function(){return m},mm:function(){return q},eP:function(){return se},FM:function(){return Se},h_:function(){return ke}});var x=u(39428),A=u(11849),M=u(3182),B=u(48971);function b(f,w){return i.apply(this,arguments)}function i(){return i=(0,M.Z)((0,x.Z)().mark(function f(w,$){return(0,x.Z)().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.abrupt("return",(0,B.WY)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,A.Z)({},w)}));case 1:case"end":return E.stop()}},f)})),i.apply(this,arguments)}function m(f){return _.apply(this,arguments)}function _(){return _=(0,M.Z)((0,x.Z)().mark(function f(w){return(0,x.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,B.WY)("/kitchen/api/sysOrg/add",{method:"POST",data:(0,A.Z)({},w)}));case 1:case"end":return o.stop()}},f)})),_.apply(this,arguments)}function U(f){return y.apply(this,arguments)}function y(){return y=_asyncToGenerator(_regeneratorRuntime().mark(function f(w){return _regeneratorRuntime().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",request("\u200B/kitchen/api\u200B/sysOrg\u200B/list",{method:"POST",data:_objectSpread({},w)}));case 1:case"end":return o.stop()}},f)})),y.apply(this,arguments)}function q(f){return g.apply(this,arguments)}function g(){return g=(0,M.Z)((0,x.Z)().mark(function f(w){return(0,x.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,B.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/delete",{method:"POST",data:(0,A.Z)({},w)}));case 1:case"end":return o.stop()}},f)})),g.apply(this,arguments)}function se(f){return N.apply(this,arguments)}function N(){return N=(0,M.Z)((0,x.Z)().mark(function f(w){return(0,x.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,B.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/edit",{method:"POST",data:(0,A.Z)({},w)}));case 1:case"end":return o.stop()}},f)})),N.apply(this,arguments)}function Te(f){return V.apply(this,arguments)}function V(){return V=_asyncToGenerator(_regeneratorRuntime().mark(function f(w){return _regeneratorRuntime().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",request("/kitchen\u200B/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},w)}));case 1:case"end":return o.stop()}},f)})),V.apply(this,arguments)}function Se(f){return Q.apply(this,arguments)}function Q(){return Q=(0,M.Z)((0,x.Z)().mark(function f(w){return(0,x.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,B.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,A.Z)({},w)}));case 1:case"end":return o.stop()}},f)})),Q.apply(this,arguments)}function ke(f){return Y.apply(this,arguments)}function Y(){return Y=(0,M.Z)((0,x.Z)().mark(function f(w){return(0,x.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,B.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/AddAuthCode?orgid="+w,{method:"Get"}));case 1:case"end":return o.stop()}},f)})),Y.apply(this,arguments)}}}]);