Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

2 рядки
17 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3703,1322],{14206:function(Oe,J,u){"use strict";u.r(J),u.d(J,{default:function(){return Qe}});var R=u(57663),F=u(71577),Se=u(62350),x=u(75443),Z=u(2824),v=u(11849),X=u(34792),A=u(48086),m=u(3182),je=u(94043),i=u.n(je),_=u(49101),S=u(67294),ie=u(78009),G=u(16894),Te=u(71194),N=u(50146),we=u(49111),V=u(19650),y=u(77883),j=u(85482),B=u(93224),c=u(62999),M=u(54680),He=u(43358),$=u(34041),ze=u(9715),w=u(86835),Je=u(47673),Q=u(4107),Le=u(59465),U=u(48971);function Fe(d,s){return se.apply(this,arguments)}function se(){return se=(0,m.Z)(i().mark(function d(s,C){return i().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,U.WY)("/kitchen/api/receivingNote/getPage",{method:"POST",data:s}));case 1:case"end":return a.stop()}},d)})),se.apply(this,arguments)}function Xe(d,s){return le.apply(this,arguments)}function le(){return le=_asyncToGenerator(_regeneratorRuntime.mark(function d(s,C){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)})),le.apply(this,arguments)}function ke(d,s){return oe.apply(this,arguments)}function oe(){return oe=(0,m.Z)(i().mark(function d(s,C){return i().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,U.WY)("/kitchen/api/receivingNote/getEntryPage?id=".concat(s),{method:"POST"}));case 1:case"end":return a.stop()}},d)})),oe.apply(this,arguments)}function Ae(d,s){return ce.apply(this,arguments)}function ce(){return ce=(0,m.Z)(i().mark(function d(s,C){return i().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,U.WY)("/kitchen/api/receivingNote/approved",{method:"POST",params:s}));case 1:case"end":return a.stop()}},d)})),ce.apply(this,arguments)}function Be(d,s){return de.apply(this,arguments)}function de(){return de=(0,m.Z)(i().mark(function d(s,C){return i().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,U.WY)("/kitchen/api/receivingNote/add",{method:"POST",data: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,m.Z)(i().mark(function d(s,C){return i().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,U.WY)("/kitchen/api/product-type/type-list",{method:"GET",params:(0,v.Z)({},s)}));case 1:case"end":return a.stop()}},d)})),pe.apply(this,arguments)}function Ue(d,s){return he.apply(this,arguments)}function he(){return he=(0,m.Z)(i().mark(function d(s,C){return i().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,U.WY)("/kitchen/api/unit/uint-list",{method:"GET",params:(0,v.Z)({},s)}));case 1:case"end":return a.stop()}},d)})),he.apply(this,arguments)}function We(d){return fe.apply(this,arguments)}function fe(){return fe=(0,m.Z)(i().mark(function d(s){return i().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",(0,U.WY)("/kitchen/api/Product/GetPage",{method:"POST",data:s}));case 1:case"end":return f.stop()}},d)})),fe.apply(this,arguments)}function Ke(d){return ve.apply(this,arguments)}function ve(){return ve=(0,m.Z)(i().mark(function d(s){return i().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",(0,U.WY)("/kitchen/api/PurchaseOrder/delivery-entry-list/".concat(s),{method:"get"}));case 1:case"end":return f.stop()}},d)})),ve.apply(this,arguments)}var e=u(85893),Re=Q.Z.Search,Me=function(s){var C=w.Z.useForm(),f=(0,Z.Z)(C,1),a=f[0],b=$.Z.Option,H=$.Z.OptGroup,Ce=(0,S.useState)([]),q=(0,Z.Z)(Ce,2),W=q[0],me=q[1],ee=(0,S.useState)([]),z=(0,Z.Z)(ee,2),Y=z[0],ye=z[1],te=(0,S.useState)([]),re=(0,Z.Z)(te,2),Pe=re[0],be=re[1],ne=(0,S.useState)([]),ae=(0,Z.Z)(ne,2),Ee=ae[0],xe=ae[1];(0,S.useEffect)(function(){var T=function(){var L=(0,m.Z)(i().mark(function I(D){var O,k;return i().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,We({current:1,pageSize:1e7});case 2:O=l.sent.data,O.data&&(k=[],O.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})}),ye(k),me(k));case 4:case"end":return l.stop()}},I)}));return function(D){return L.apply(this,arguments)}}();T()},[]);var ge={labelCol:{},wrapperCol:{}},De=function(L){},Ze=function(){var T=(0,m.Z)(i().mark(function L(I){var D,O,k,g,l,t;return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return D=[],n.next=3,Ke(I);case 3:if(O=n.sent,O.data){for(k=[],D=O.data.deliveryEntryList,g=function(r){var p,K,P,E;t=W.find(function(Ie){if(Ie.key==D[r].barcode)return Ie}),k[r]=(0,v.Z)((0,v.Z)({},k[r]),{},{code:D[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:(P=t)===null||P===void 0?void 0:P.proportion,productId:(E=t)===null||E===void 0?void 0:E.productId,packQty:D[r].deliveryQty,stockQty:D[r].qty})},l=0;l<D.length;l++)g(l);a.setFieldsValue({sub:k})}else A.default.error(I+"\u4E0D\u5728\u6B64\u91C7\u8D2D\u5355");case 5:case"end":return n.stop()}},L)}));return function(I){return T.apply(this,arguments)}}();function ue(T){var L=[]}return(0,e.jsx)(N.Z,{title:s.values.id?"\u7F16\u8F91\u4F1A\u5458\u4FE1\u606F":"\u65B0\u5EFA\u4F1A\u5458\u4FE1\u606F",width:1270,maskClosable:!1,visible:s.createModalVisible,footer:null,onCancel:function(){s.onCancel()},destroyOnClose:!0,children:(0,e.jsxs)(w.Z,{form:a,labelCol:{span:3},preserve:!1,initialValues:s.values,onFinish:s.onFinish,children:[(0,e.jsx)(w.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(Q.Z,{})}),(0,e.jsx)(w.Z.Item,{name:"deliveryShelfNo",label:"\u6536\u8D27\u5355\u53F7",children:(0,e.jsx)(Re,{placeholder:"\u8BF7\u8F93\u5165\u6536\u8D27\u5355\u53F7",onSearch:Ze,enterButton:!0})}),(0,e.jsx)(w.Z.Item,{name:"orgId",label:"\u91C7\u8D2D\u673A\u6784",rules:[{required:!0}],children:(0,e.jsx)(M.Z,{style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:s.OrgData,placeholder:"\u6536\u8D27\u673A\u6784",treeDefaultExpandAll:!0})}),(0,e.jsx)(w.Z.Item,{name:"remark",label:"\u5907\u6CE8",rules:[{max:300}],children:(0,e.jsx)(Q.Z,{placeholder:""})}),(0,e.jsx)(w.Z.Item,{name:"sub",children:(0,e.jsx)(w.Z.List,{name:"sub",children:function(L,I){var D=I.add,O=I.remove;return(0,e.jsxs)(e.Fragment,{children:[L.map(function(k){var g=k.key,l=k.name,t=k.fieldKey,o=(0,B.Z)(k,["key","name","fieldKey"]);return(0,e.jsxs)(V.Z,{align:"baseline",children:[(0,e.jsx)(w.Z.Item,(0,v.Z)((0,v.Z)({},o),{},{name:[l,"productId"],fieldKey:[t,"productId"],hidden:!0,children:(0,e.jsx)(Q.Z,{})})),(0,e.jsx)(w.Z.Item,(0,v.Z)((0,v.Z)({style:{width:"250px"}},o),{},{name:[l,"code"],fieldKey:[t,"code"],label:"\u6761\u7801",rules:[{required:!0}],children:(0,e.jsx)($.Z,{showSearch:!0,placeholder:"\u8BF7\u9009\u62E9\u7269\u6599\u6761\u7801",optionFilterProp:"children",onSearch:ue,onPopupScroll:ue,onChange:function(h){var r=W.find(function(K){if(K.key==h)return K}),p=a.getFieldsValue().sub;a.setFieldsValue({sub:[]}),p[g]=(0,v.Z)((0,v.Z)({},p[g]),{},{stockUint:r==null?void 0:r.stockUint,packUnit:r==null?void 0:r.packUnit,proportion:r==null?void 0:r.proportion,productId:r==null?void 0:r.productId,code:r==null?void 0:r.code}),a.setFieldsValue({sub:p})},children:W.map(function(n,h){return(0,e.jsxs)($.Z.Option,{index:h,value:n.key,children:[(0,e.jsx)("span",{style:{float:"left"},children:n.key}),(0,e.jsx)("span",{style:{float:"right",color:"#8492a6"},children:n.name})]},n.key)})})})),(0,e.jsx)(w.Z.Item,(0,v.Z)((0,v.Z)({},o),{},{name:[l,"stockUint"],fieldKey:[t,"stockUint"],label:"\u5E93\u5B58\u5355\u4F4D",style:{width:"200px"},rules:[{required:!0}],children:(0,e.jsx)($.Z,{children:s.uintList.map(function(n,h){return(0,e.jsx)($.Z.Option,{index:h,value:n.value,children:n.label},n.value)})})})),(0,e.jsx)(w.Z.Item,(0,v.Z)((0,v.Z)({},o),{},{name:[l,"packUnit"],fieldKey:[t,"packUnit"],label:"\u5305\u88C5\u5355\u4F4D",style:{width:"200px"},rules:[{required:!0}],children:(0,e.jsx)($.Z,{children:s.uintList.map(function(n,h){return(0,e.jsx)($.Z.Option,{index:h,value:n.value,children:n.label},n.value)})})})),(0,e.jsx)(w.Z.Item,(0,v.Z)((0,v.Z)({},o),{},{name:[l,"proportion"],fieldKey:[t,"proportion"],style:{width:"200px"},label:"\u6362\u7B97\u6BD4\u4F8B",rules:[{required:!0}],children:(0,e.jsx)(Q.Z,{})})),(0,e.jsx)(w.Z.Item,(0,v.Z)((0,v.Z)({},o),{},{name:[l,"packQty"],fieldKey:[t,"packQty"],style:{width:"150px"},label:"\u91C7\u8D2D\u6570\u91CF",children:(0,e.jsx)(j.Z,{})})),(0,e.jsx)(w.Z.Item,(0,v.Z)((0,v.Z)({},o),{},{name:[l,"stockQty"],style:{width:"150px"},fieldKey:[t,"stockQty"],label:"\u6570\u91CF",children:(0,e.jsx)(j.Z,{})})),(0,e.jsx)(Le.Z,{onClick:function(){return O(l)}})]},g)}),(0,e.jsx)(w.Z.Item,{children:(0,e.jsx)(F.Z,{type:"dashed",onClick:function(){return D()},block:!0,icon:(0,e.jsx)(_.Z,{}),children:"\u6DFB\u52A0"})})]})}})}),(0,e.jsx)(w.Z.Item,{children:(0,e.jsx)(F.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})})]})})},Ye=Me,Ge=u(3408),Ne=function(){var d=(0,m.Z)(i().mark(function s(C){var f;return i().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return f=A.default.loading("\u6B63\u5728\u6DFB\u52A0"),b.prev=1,b.next=4,Be((0,v.Z)({},C)).then(function(H){if(!H.succeeded)return!1});case 4:return f(),A.default.success("\u6DFB\u52A0\u6210\u529F"),b.abrupt("return",!0);case 9:return b.prev=9,b.t0=b.catch(1),f(),A.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),b.abrupt("return",!1);case 14:case"end":return b.stop()}},s,null,[[1,9]])}));return function(C){return d.apply(this,arguments)}}(),Ve=function(){var s=(0,S.useState)(!1),C=(0,Z.Z)(s,2),f=C[0],a=C[1],b=(0,S.useState)(!1),H=(0,Z.Z)(b,2),Ce=H[0],q=H[1],W=(0,S.useRef)(),me=(0,S.useState)(),ee=(0,Z.Z)(me,2),z=ee[0],Y=ee[1],ye=(0,S.useState)(),te=(0,Z.Z)(ye,2),re=te[0],Pe=te[1],be=(0,S.useState)(),ne=(0,Z.Z)(be,2),ae=ne[0],Ee=ne[1],xe=(0,S.useState)([]),ge=(0,Z.Z)(xe,2),De=ge[0],Ze=ge[1],ue=(0,S.useState)([]),T=(0,Z.Z)(ue,2),L=T[0],I=T[1];(0,S.useEffect)(function(){var g=function(){var o=(0,m.Z)(i().mark(function n(h){var r,p;return i().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,Ue();case 2:r=P.sent,p=[],r.data.length>0&&r.data.forEach(function(E){p.push({stockuint:E.id,text:E.name,value:E.id,label:E.name})}),Pe(p);case 6:case"end":return P.stop()}},n)}));return function(h){return o.apply(this,arguments)}}(),l=function(){var o=(0,m.Z)(i().mark(function n(h){var r,p;return i().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,$e();case 2:r=P.sent,p=[],r.data.length>0&&r.data.forEach(function(E){p.push({typeid:E.id,text:E.name,value:E.id,label:E.name})}),Ee(p);case 6:case"end":return P.stop()}},n)}));return function(h){return o.apply(this,arguments)}}();function t(){(0,Ge.FM)().then(function(o){Ze(o.data);var n={};h(o.data);function h(r){for(var p in r)n[r[p].value]={text:r[p].title},r[p].children&&h(r[p].children)}I(n)})}t(),g(),l()},[]);var D=function(){var g=(0,m.Z)(i().mark(function l(t){var o,n;return i().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,ke(t);case 2:o=r.sent;debugger;n=z,n.sub=o.data,Y(n);case 7:case"end":return r.stop()}},l)}));return function(t){return g.apply(this,arguments)}}(),O=function(){var g=(0,m.Z)(i().mark(function l(t){return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:case"end":return n.stop()}},l)}));return function(t){return g.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(){Y(t),q(!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,m.Z)(i().mark(function o(){var n,h;return i().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,ke(t.id);case 2:h=p.sent,h.data.data.length>0&&(t.sub=h.data.data),Y(t),t==null||(n=t.startEditable)===null||n===void 0||n.call(t,t.id),a(!0);case 7:case"end":return p.stop()}},o)})),children:"\u4FEE\u6539"},"config"),t.isApprove===0&&(0,e.jsx)("a",{type:"primary",onClick:function(){A.default.loading("\u6B63\u5728\u5BA1\u6838\uFF01");try{Ae({Id:t.id}),A.default.success("\u5BA1\u6838\u5B8C\u6210\uFF01")}catch(n){console.log(n),A.default.error("\u6B63\u5728\u5BA1\u6838\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}W.current.reload()},children:"\u5BA1\u6838"},"config"),t.isApprove===0&&(0,e.jsx)(x.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){O(t.id)},onCancel:function(){},children:(0,e.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,e.jsxs)(ie.ZP,{children:[(0,e.jsx)(G.ZP,{headerTitle:"\u6536\u8D27\u5355",actionRef:W,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,e.jsxs)(F.Z,{type:"primary",onClick:function(){Y({}),a(!0)},children:[(0,e.jsx)(_.Z,{})," \u65B0\u589E"]},"create")]},request:function(){var g=(0,m.Z)(i().mark(function l(t){var o,n;return i().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return o=[],n=0,r.next=4,Fe(t).then(function(p){o=p.data.data,n=p.data.total});case 4:return r.abrupt("return",{data:o,success:!0,total:n});case 5:case"end":return r.stop()}},l)}));return function(l){return g.apply(this,arguments)}}(),columns:k}),(0,e.jsx)(Ye,{onFinish:function(){var g=(0,m.Z)(i().mark(function l(t){var o;return i().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return o=!1,h.next=3,Ne(t);case 3:o=h.sent,o&&(a(!1),W.current&&W.current.reload());case 5:case"end":return h.stop()}},l)}));return function(l){return g.apply(this,arguments)}}(),onCancel:function(){Y(void 0),a(!1)},createModalVisible:f,values:z||{},typeList:ae,uintList:re,OrgData:De})]})},Qe=Ve},3408:function(Oe,J,u){"use strict";u.d(J,{lM:function(){return v},IH:function(){return A},mm:function(){return _},eP:function(){return ie},FM:function(){return we}});var R=u(11849),F=u(3182),Se=u(94043),x=u.n(Se),Z=u(48971);function v(y,j){return X.apply(this,arguments)}function X(){return X=(0,F.Z)(x().mark(function y(j,B){return x().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.abrupt("return",(0,Z.WY)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,R.Z)({},j)}));case 1:case"end":return M.stop()}},y)})),X.apply(this,arguments)}function A(y){return m.apply(this,arguments)}function m(){return m=(0,F.Z)(x().mark(function y(j){return x().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",(0,Z.WY)("/kitchen/api/sysOrg/add",{method:"POST",data:(0,R.Z)({},j)}));case 1:case"end":return c.stop()}},y)})),m.apply(this,arguments)}function je(y){return i.apply(this,arguments)}function i(){return i=_asyncToGenerator(_regeneratorRuntime.mark(function y(j){return _regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",request("\u200B/kitchen/api\u200B/sysOrg\u200B/list",{method:"POST",data:_objectSpread({},j)}));case 1:case"end":return c.stop()}},y)})),i.apply(this,arguments)}function _(y){return S.apply(this,arguments)}function S(){return S=(0,F.Z)(x().mark(function y(j){return x().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",(0,Z.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/delete",{method:"POST",data:(0,R.Z)({},j)}));case 1:case"end":return c.stop()}},y)})),S.apply(this,arguments)}function ie(y){return G.apply(this,arguments)}function G(){return G=(0,F.Z)(x().mark(function y(j){return x().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",(0,Z.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/edit",{method:"POST",data:(0,R.Z)({},j)}));case 1:case"end":return c.stop()}},y)})),G.apply(this,arguments)}function Te(y){return N.apply(this,arguments)}function N(){return N=_asyncToGenerator(_regeneratorRuntime.mark(function y(j){return _regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",request("/kitchen\u200B/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},j)}));case 1:case"end":return c.stop()}},y)})),N.apply(this,arguments)}function we(y){return V.apply(this,arguments)}function V(){return V=(0,F.Z)(x().mark(function y(j){return x().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",(0,Z.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,R.Z)({},j)}));case 1:case"end":return c.stop()}},y)})),V.apply(this,arguments)}}}]);