選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

2 行
17 KiB

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