No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

2 líneas
9.5 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7379,1322],{54435:function(Ie,D,r){"use strict";r.r(D),r.d(D,{default:function(){return ae}});var i=r(39428),m=r(3182),Ze=r(57663),B=r(71577),ke=r(34792),S=r(48086),y=r(2824),M=r(90631),p=r(67294),N=r(78009),V=r(16894),Ce=r(71194),je=r(77883),Pe=r(43358),Fe=r(9715),be=r(47673),I=r(85893),we=function(t){return console.log(t.values),console.log(t.orgArray),_jsx(_Modal,{title:"\u4FEE\u6539\u5E93\u5B58",width:600,visible:t.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){t.onCancel()},destroyOnClose:!0,children:_jsxs(_Form,{layout:"vertical",preserve:!1,initialValues:t.values,onFinish:t.onFinish,children:[_jsx(_Form.Item,{name:"id",hidden:!0,children:_jsx(_Input,{})}),_jsx(_Form.Item,{name:"orgId",label:"\u9009\u62E9\u673A\u6784",rules:[{required:!0}],children:_jsx(_Select,{disabled:!!t.values.id,children:t.orgArray.map(function(o,e){return _jsx(_Select.Option,{index:e,value:o.id,children:o.text},o.id)})})}),_jsx(_Form.Item,{name:"productId",label:"\u9009\u62E9\u7269\u6599",rules:[{required:!0}],children:_jsx(_Select,{disabled:!!t.values.id,children:t.productArray.map(function(o,e){return _jsx(_Select.Option,{index:e,value:o.stockUint,children:o.text},o.id)})})}),_jsx(_Form.Item,{name:"stockQty",label:"\u5E93\u5B58\u6570\u91CF",rules:[{required:!0}],children:_jsx(_InputNumber,{step:1,min:0,max:1e3,style:{width:150}})}),_jsx(_Form.Item,{name:"code",label:"\u7269\u6599\u7F16\u7801",rules:[{required:!0,max:64}],children:_jsx(_Input,{placeholder:"\u7269\u6599\u6761\u7801"})}),_jsx(_Form.Item,{children:_jsx(_Button,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},Ee=null,G=r(53667),Q=r.n(G),z=r(11849),g=r(48971);function H(u){return k.apply(this,arguments)}function k(){return k=(0,m.Z)((0,i.Z)().mark(function u(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,g.WY)("/kitchen/api/stock-item-application/stock-page",{method:"Post",data:t}));case 1:case"end":return e.stop()}},u)})),k.apply(this,arguments)}function J(u){return C.apply(this,arguments)}function C(){return C=(0,m.Z)((0,i.Z)().mark(function u(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,g.WY)("/kitchen/api/stock-item-application/stock-inventory-set",{method:"Post",data:t}));case 1:case"end":return e.stop()}},u)})),C.apply(this,arguments)}function K(u){return j.apply(this,arguments)}function j(){return j=(0,m.Z)((0,i.Z)().mark(function u(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,g.WY)("/kitchen/api/stock-item-application/stock-inventory/".concat(t),{method:"Post"}));case 1:case"end":return e.stop()}},u)})),j.apply(this,arguments)}function X(u){return P.apply(this,arguments)}function P(){return P=(0,m.Z)((0,i.Z)().mark(function u(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,g.WY)("/kitchen/api/stock-item-application/stock-item-count",{method:"PUT",data:t}));case 1:case"end":return e.stop()}},u)})),P.apply(this,arguments)}function q(u){return F.apply(this,arguments)}function F(){return F=(0,m.Z)((0,i.Z)().mark(function u(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,g.WY)("/kitchen/api/product/product-list",{method:"Post",data:t}));case 1:case"end":return e.stop()}},u)})),F.apply(this,arguments)}function _(u){return b.apply(this,arguments)}function b(){return b=(0,m.Z)((0,i.Z)().mark(function u(t){return(0,i.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,g.WY)("/kitchen/api\u200B/sysOrg\u200B/page",{method:"GET",data:t}));case 1:case"end":return e.stop()}},u)})),b.apply(this,arguments)}function ee(u,t){return w.apply(this,arguments)}function w(){return w=(0,m.Z)((0,i.Z)().mark(function u(t,o){return(0,i.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.abrupt("return",(0,g.WY)("/kitchen/api/unit/uint-list",{method:"GET",params:(0,z.Z)({},t)}));case 1:case"end":return Z.stop()}},u)})),w.apply(this,arguments)}var te=function(){var t=(0,p.useState)(!1),o=(0,y.Z)(t,2),e=o[0],Z=o[1],re=(0,p.useState)(!1),O=(0,y.Z)(re,2),Te=O[0],ne=O[1],ue=(0,p.useRef)(),ie=(0,p.useState)(),L=(0,y.Z)(ie,2),De=L[0],se=L[1],le=(0,p.useState)([]),R=(0,y.Z)(le,2),E=R[0],oe=R[1],ce=(0,p.useState)(),$=(0,y.Z)(ce,2),Oe=$[0],de=$[1],he=(0,p.useState)([]),A=(0,y.Z)(he,2),Le=A[0],fe=A[1],pe=(0,p.useState)(),U=(0,y.Z)(pe,2),Re=U[0],me=U[1],ve=(0,p.useState)([]),W=(0,y.Z)(ve,2),$e=W[0],ye=W[1],xe=(0,p.useState)(),Y=(0,y.Z)(xe,2),Ae=Y[0],Se=Y[1];(0,p.useEffect)(function(){var h=function(a){var f=q({current:1,pageSize:1e3}).then(function(n){var s={},v=[];n.data.data.forEach(function(x){v.push({text:x.name,id:x.id}),s[x.id]={text:x.name}}),ye(v),me(s)})},l=function(a){var f=_({current:1,pageSize:1e3}).then(function(n){var s={},v=[];n.data.data.forEach(function(x){v.push({text:x.name,id:x.id}),s[x.id]={text:x.name}}),fe(v),de(s)})},c=function(a){var f=ee().then(function(n){var s={};n.data.forEach(function(v){s[v.id]={text:v.name}}),Se(s)})};h(),l(),c()},[]);function Ue(h){try{return X(JSON.stringify(h)).then(function(l){l.data?(S.default.success("\u4FEE\u6539\u6210\u529F"),ue.current.reload()):S.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}),!0}catch(l){return S.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),!1}}function ge(){var h=E.ReqDetailList,l={},c=[];T.map(function(a,f){f>0&&a.title!="\u64CD\u4F5C"&&c.push(a)}),l.fileName="\u5E93\u5B58\u62A5\u8868",l.datas=[{sheetData:E.map(function(a){var f={};return T.forEach(function(n,s){s>0&&a.title!="\u64CD\u4F5C"&&(f[n.dataIndex]=a[n.dataIndex])}),f}),sheetName:"\u5E93\u5B58\u62A5\u8868",sheetFilter:c.map(function(a){return a.dataIndex}),sheetHeader:c.map(function(a){return a.title}),columnWidths:c.map(function(){return 10})}];var d=new(Q())(l);d.saveExcel()}var T=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(l,c){return(0,I.jsx)("a",{onClick:function(){se(c),ne(!0)},children:l})}},{title:"\u5546\u54C1\u5927\u7C7B",hideInSearch:!0,dataIndex:"",editable:!1},{title:"\u5546\u54C1\u5C0F\u7C7B",hideInSearch:!0,dataIndex:"",editable:!1},{title:"\u5546\u54C1\u540D\u79F0",dataIndex:"productName",editable:!1},{title:"\u4F9B\u5E94\u5546",dataIndex:"",valueType:"textarea",hideInSearch:!0,editable:!1},{title:"\u54C1\u724C",hideInSearch:!0,dataIndex:"",editable:!1},{title:"\u5546\u54C1\u89C4\u683C",dataIndex:"specs",valueType:"textarea",hideInSearch:!0,editable:!1},{title:"\u5E93\u5B58\u5355\u4F4D",dataIndex:"uintName",valueType:"textarea",hideInSearch:!0,editable:!1},{title:"\u4E0A\u671F\u5E93\u5B58\u6570\u91CF",dataIndex:"stockQty",valueType:"textarea",hideInSearch:!0,editable:!1},{title:"\u5165\u5E93\u6570\u91CF",dataIndex:"",valueType:"textarea",hideInSearch:!0,editable:!1},{title:"\u51FA\u5E93\u6570\u91CF",dataIndex:"",valueType:"textarea",hideInSearch:!0,editable:!1},{title:"\u76D8\u70B9\u6570\u91CF",dataIndex:"stockQty",valueType:"textarea",hideInSearch:!0,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u62A5\u635F",dataIndex:"damageCount",valueType:"textarea",hideInSearch:!0,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u8C03\u62E8\u51FA\u5E93\u6570\u91CF",dataIndex:"transferIssueCount",valueType:"textarea",hideInSearch:!0,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u8C03\u62E8\u5165\u5E93\u6570\u91CF",dataIndex:"transferReceiptCount",valueType:"textarea",hideInSearch:!0,formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}},{title:"\u64CD\u4F5C",valueType:"option",width:200,render:function(l,c,d,a){return[(0,I.jsx)("a",{style:{color:"#78cdd1"},onClick:function(){var n;(n=a.startEditable)===null||n===void 0||n.call(a,c.id)},children:"\u7F16\u8F91"},"editable")]}}];return(0,I.jsx)(N.ZP,{children:(0,I.jsx)(V.ZP,{rowKey:"id",columns:T,toolBarRender:function(){return[(0,I.jsxs)(B.Z,{type:"primary",onClick:function(){return ge()},children:[(0,I.jsx)(M.Z,{})," \u5BFC\u51FA"]},"primary")]},request:function(){var h=(0,m.Z)((0,i.Z)().mark(function l(c){var d,a;return(0,i.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return d=[],a=0,n.next=4,H(c).then(function(s){d=s.data.data,a=s.data.total,oe(s.data.data)});case 4:return n.abrupt("return",{data:d,success:!0});case 5:case"end":return n.stop()}},l)}));return function(l){return h.apply(this,arguments)}}(),value:E,editable:{type:"multiple",onSave:function(){var h=(0,m.Z)((0,i.Z)().mark(function c(d,a,f){return(0,i.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:J(a).then(function(v){v.data?S.default.success("\u4FEE\u6539\u6210\u529F"):S.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")}),console.log(d,a,f);case 2:case"end":return s.stop()}},c)}));function l(c,d,a){return h.apply(this,arguments)}return l}(),onDelete:function(){var h=(0,m.Z)((0,i.Z)().mark(function c(d,a){return(0,i.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:K(d).then(function(s){s.data?S.default.success("\u5220\u9664\u6210\u529F"):S.default.error("\u5220\u9664\u5931\u8D25\uFF01")}),console.log(d,a);case 2:case"end":return n.stop()}},c)}));function l(c,d){return h.apply(this,arguments)}return l}()},recordCreatorProps:{position:"end",record:function(){return{id:Date.now()}},onClick:function(){S.default.destroy()}}})})},ae=te}}]);