Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

2 wiersze
17 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6980,1322],{2634:function(Ge,V,r){"use strict";r.r(V),r.d(V,{default:function(){return We}});var S={};r.r(S),r.d(S,{L3:function(){return ve},oM:function(){return me},gG:function(){return pe},dw:function(){return ye},uY:function(){return Ze},VB:function(){return he},FM:function(){return te}});var P=r(57663),A=r(71577),v=r(2824),i=r(39428),R=r(34792),j=r(48086),y=r(3182),oe=r(49101),m=r(67294),J=r(78009),F=r(85224),Q=r(16894),M=r(71194),fe=r(50146),W=r(77883),z=r(85986),K=r(62999),X=r(54680),Y=r(9715),a=r(55843),T=r(47673),x=r(4107),u=r(43358),D=r(34041),G=r(48971);function pe(c){return q.apply(this,arguments)}function q(){return q=(0,y.Z)((0,i.Z)().mark(function c(n){return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,G.WY)("/kitchen/api/TestDevices/GetDeviceInfoPage",{method:"POST",data:n}));case 1:case"end":return t.stop()}},c)})),q.apply(this,arguments)}function he(c){return _.apply(this,arguments)}function _(){return _=(0,y.Z)((0,i.Z)().mark(function c(n){return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,G.WY)("/kitchen/api/dict-data/dic-list/".concat(n),{method:"Get"}));case 1:case"end":return t.stop()}},c)})),_.apply(this,arguments)}function ve(c){return ee.apply(this,arguments)}function ee(){return ee=(0,y.Z)((0,i.Z)().mark(function c(n){return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,G.WY)("/kitchen/api/TestDevices/AddDeviceInfo",{method:"POST",data:n}));case 1:case"end":return t.stop()}},c)})),ee.apply(this,arguments)}function te(c){return ne.apply(this,arguments)}function ne(){return ne=(0,y.Z)((0,i.Z)().mark(function c(n){return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,G.WY)("/kitchen/api/TestDevices/UpdateDevice",{method:"POST",data:n}));case 1:case"end":return t.stop()}},c)})),ne.apply(this,arguments)}function me(c){return re.apply(this,arguments)}function re(){return re=(0,y.Z)((0,i.Z)().mark(function c(n){return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,G.WY)("\u200B\u200B/kitchen/api/TestDevices/DelDeviceInfo",{method:"POST",data:n}));case 1:case"end":return t.stop()}},c)})),re.apply(this,arguments)}function ye(c){return ae.apply(this,arguments)}function ae(){return ae=(0,y.Z)((0,i.Z)().mark(function c(n){return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,G.WY)("\u200B/kitchen/api/Device/GetDeviceType",{method:"GET"}));case 1:case"end":return t.stop()}},c)})),ae.apply(this,arguments)}function Ze(){return ue.apply(this,arguments)}function ue(){return ue=(0,y.Z)((0,i.Z)().mark(function c(){return(0,i.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",(0,G.WY)("\u200B/kitchen/api/Device/GetDeviceVersions",{method:"post"}));case 1:case"end":return p.stop()}},c)})),ue.apply(this,arguments)}function lt(c,n){return se.apply(this,arguments)}function se(){return se=_asyncToGenerator(_regeneratorRuntime().mark(function c(n,p){return _regeneratorRuntime().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",request("/kitchen/api/Device/GetDeviceGoods",{method:"POST",data:_objectSpread({},n)}));case 1:case"end":return l.stop()}},c)})),se.apply(this,arguments)}var e=r(85893),Pe=function(n){var p=D.Z.Option,t=D.Z.OptGroup,l=(0,m.useState)([]),Z=(0,v.Z)(l,2),k=Z[0],L=Z[1];(0,m.useEffect)(function(){console.log(n.values),Object.keys(n.values).length>0&&(0,S.GetDeviceVesion)(n.values.deviceTypeKey).then(function(g){L(g.data)})},[n.values]);var ie=function(I){(0,S.GetDeviceVesion)(I).then(function(b){L(b.data)})};return(0,e.jsx)(fe.Z,{title:n.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:n.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){n.onCancel()},destroyOnClose:!0,children:(0,e.jsxs)(a.Z,{layout:"Horizontal",labelCol:{span:4},preserve:!1,initialValues:n.values,onFinish:n.onFinish,children:[(0,e.jsx)(a.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(x.Z,{})}),(0,e.jsx)(a.Z.Item,{label:"\u8BBE\u5907\u540D\u79F0",name:"deviceName",rules:[{required:!0,max:50}],children:(0,e.jsx)(x.Z,{})}),(0,e.jsx)(a.Z.Item,{label:"\u8BBE\u5907\u7C7B\u578B",name:"deviceTypeKey",rules:[{required:!0}],children:(0,e.jsx)(D.Z,{onChange:ie,children:n.dicData.map(function(g,I){return(0,e.jsx)(D.Z.Option,{index:I,value:g.code,children:g.value},g.code)})})}),(0,e.jsx)(a.Z.Item,{label:"\u8BBE\u5907\u7248\u672C",name:"deviceVersionKey",rules:[{required:!0}],children:(0,e.jsx)(D.Z,{children:k.map(function(g,I){return(0,e.jsx)(D.Z.Option,{index:I,value:g.id,children:g.vesion},g.id)})})}),(0,e.jsx)(a.Z.Item,{name:"orgId",label:"\u5F52\u5C5E\u95E8\u5E97",rules:[{required:!0}],children:(0,e.jsx)(X.Z,{style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:n.OrgData,placeholder:"\u5F52\u5C5E\u95E8\u5E97",treeDefaultExpandAll:!0})}),(0,e.jsx)(a.Z.Item,{label:"\u8BBE\u5907\u5206\u7C7B",name:"deviceTypeId",rules:[{required:!0}],children:(0,e.jsx)(D.Z,{children:n.storeType.map(function(g,I){return(0,e.jsx)(D.Z.Option,{index:I,value:g.id,children:g.text},g.id)})})}),(0,e.jsx)(a.Z.Item,{noStyle:!0,shouldUpdate:function(I,b){return I.deviceTypeKey!==b.deviceTypeKey},children:function(I){var b,le=I.getFieldValue;return le("deviceTypeKey")==="TMC"?(0,e.jsx)(a.Z.Item,{name:"deviceVersion",label:"\u8BBE\u5907\u7248\u672C",initialValue:"WorryFreeEdition",children:(0,e.jsx)(D.Z,{children:(b=n.deviceVersions)===null||b===void 0?void 0:b.map(function(B,U){return(0,e.jsx)(D.Z.Option,{index:U,value:B.code,children:B.name},B.code)})})}):null}}),(0,e.jsx)(a.Z.Item,{label:"\u8BBE\u5907\u5750\u6807",name:"deviceLoc",children:(0,e.jsx)(x.Z,{placeholder:"104.070734,30.575041"})}),(0,e.jsx)(a.Z.Item,{label:"\u72B6\u6001",name:"status",rules:[{required:!0}],children:(0,e.jsx)(D.Z,{placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",children:(0,e.jsxs)(t,{children:[(0,e.jsx)(D.Z.Option,{value:0,children:"\u6B63\u5E38"}),(0,e.jsx)(D.Z.Option,{value:1,children:"\u505C\u7528"})]})})}),(0,e.jsx)(a.Z.Item,{label:"\u8BBE\u5907\u901A\u9053\u6570\u91CF",name:"materialQuantity",children:(0,e.jsx)(z.Z,{})}),(0,e.jsx)(a.Z.Item,{label:"\u8BBE\u5907\u8BE6\u7EC6\u5730\u5740",name:"deviceAddr",children:(0,e.jsx)(x.Z,{placeholder:"\u6210\u90FD\u5E02\u6B66\u4FAF\u533A\u6842\u6EAA\u8857\u9053\u73AF\u7403\u4E2D\u5FC3N5-9111C"})}),(0,e.jsx)(a.Z.Item,{children:(0,e.jsx)(A.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},Fe=Pe,Be=r(3408),ct=r(96486),$e=function(){var c=(0,y.Z)((0,i.Z)().mark(function n(p){return(0,i.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,l.next=3,ve(JSON.stringify(p)).then(function(Z){return Z.data?(j.default.success("\u6DFB\u52A0\u6210\u529F"),!0):(j.default.success("\u6DFB\u52A0\u6210\u529F"),!1)});case 3:l.next=9;break;case 5:return l.prev=5,l.t0=l.catch(0),j.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),l.abrupt("return",!1);case 9:case"end":return l.stop()}},n,null,[[0,5]])}));return function(p){return c.apply(this,arguments)}}(),Ve=function(){var c=(0,y.Z)((0,i.Z)().mark(function n(p){return(0,i.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,l.next=3,te(JSON.stringify(p)).then(function(Z){return j.default.destroy(key),Z.data?(j.default.success("\u4FEE\u6539\u6210\u529F"),!0):(j.default.success("\u4FEE\u6539\u5931\u8D25"),!1)});case 3:l.next=9;break;case 5:return l.prev=5,l.t0=l.catch(0),j.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),l.abrupt("return",!1);case 9:case"end":return l.stop()}},n,null,[[0,5]])}));return function(p){return c.apply(this,arguments)}}(),Re=function(){var c=(0,y.Z)((0,i.Z)().mark(function n(p){var t;return(0,i.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.prev=0,j.default.loading("\u6B63\u5728\u5220\u9664"),t=[],p.forEach(function(k){t.push(k.id)}),Z.next=6,me(t).then(function(k){return k.data?(j.default.success("\u5220\u9664\u6210\u529F"),!0):(j.default.success("\u5220\u9664\u5931\u8D25"),!1)});case 6:Z.next=12;break;case 8:return Z.prev=8,Z.t0=Z.catch(0),j.default.error("\u5220\u9664\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),Z.abrupt("return",!1);case 12:case"end":return Z.stop()}},n,null,[[0,8]])}));return function(p){return c.apply(this,arguments)}}(),Me=function(){var n=(0,m.useState)(),p=(0,v.Z)(n,2),t=p[0],l=p[1],Z=(0,m.useState)([]),k=(0,v.Z)(Z,2),L=k[0],ie=k[1],g=(0,m.useState)([]),I=(0,v.Z)(g,2),b=I[0],le=I[1],B=(0,m.useState)([]),U=(0,v.Z)(B,2),Ke=U[0],Ye=U[1],Le=(0,m.useState)([]),ge=(0,v.Z)(Le,2),Ue=ge[0],Ne=ge[1],He=(0,m.useState)([]),De=(0,v.Z)(He,2),Je=De[0],Qe=De[1],ze=(0,m.useState)([]),Se=(0,v.Z)(ze,2),dt=Se[0],ot=Se[1],Xe=(0,m.useState)([]),je=(0,v.Z)(Xe,2),qe=je[0],_e=je[1],et=(0,m.useState)(),Te=(0,v.Z)(et,2),we=Te[0],Oe=Te[1],tt=(0,m.useState)(!1),Ce=(0,v.Z)(tt,2),Ie=Ce[0],xe=Ce[1];(0,m.useEffect)(function(){var O=function(){ye().then(function(h){var d={},w=[];h.data.forEach(function(s){w.push({text:s.name,id:s.id}),d[s.id]={text:s.name}}),ie(w),l(d)})};function C(){(0,Be.FM)().then(function(f){h(f.data);function h(s){for(var E in s)s[E].type==2||s[E].type==3?s[E].disabled=!1:s[E].disabled=!0,s[E].children&&h(s[E].children)}le(f.data);var d={};w(f.data);function w(s){for(var E in s)d[s[E].disabled]=!0,d[s[E].value]={text:s[E].title},s[E].children&&w(s[E].children)}Ye(d)})}C(),O();function o(){he("DeviceClientType").then(function(f){var h=f.data,d={};if(f.succeeded){var w=[];h.forEach(function(s){d[s.code]={text:s.code},w.push({code:s.code,value:s.code})}),Ne(d),Qe(w)}})}o(),nt()},[]);var nt=function(){var O=(0,y.Z)((0,i.Z)().mark(function C(){var o;return(0,i.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,Ze();case 2:o=h.sent,o.statusCode==200?_e(o.data):j.default.error("\u83B7\u53D6\u8BBE\u5907\u7248\u672C\u5931\u8D25");case 4:case"end":return h.stop()}},C)}));return function(){return O.apply(this,arguments)}}(),rt=(0,m.useState)(!1),Ee=(0,v.Z)(rt,2),at=Ee[0],N=Ee[1],H=(0,m.useRef)(),ut=(0,m.useState)(),Ae=(0,v.Z)(ut,2),ce=Ae[0],de=Ae[1],st=(0,m.useState)([]),be=(0,v.Z)(st,2),$=be[0],ke=be[1],it=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u8BBE\u5907\u540D\u79F0",dataIndex:"deviceName",valueType:"textarea"},{title:"\u8BBE\u5907\u7C7B\u578B",dataIndex:"deviceTypeKey",valueEnum:Ue,hideInSearch:!0},{title:"\u8BBE\u5907\u7248\u672C",dataIndex:"deviceVersionName",search:!1},{title:"\u5F52\u5C5E\u95E8\u5E97",dataIndex:"orgId",search:!1,valueEnum:Ke},{title:"\u8BBE\u5907\u5206\u7C7B",dataIndex:"deviceTypeId",valueEnum:t},{title:"\u72B6\u6001",dataIndex:"status",valueEnum:{0:{text:"\u6B63\u5E38",status:"Processing"},1:{text:"\u505C\u7528",status:"Success"}},hideInSearch:!0},{title:"\u8BBE\u5907\u901A\u9053\u6570\u91CF",dataIndex:"materialQuantity",valueType:"textarea",search:!1},{title:"\u8BBE\u5907\u552F\u4E00key",dataIndex:"autoKey",search:!1},{title:"\u5F52\u5C5E\u95E8\u5E97\u552F\u4E00key",dataIndex:"orgKey",search:!1},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:400,render:function(C,o){return[(0,e.jsx)("a",{onClick:function(){N(!0),de(o)},children:"\u66F4\u65B0"},"update"),(0,e.jsx)("a",{onClick:(0,y.Z)((0,i.Z)().mark(function f(){return(0,i.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return H.current.reload(),o.status=o.status?0:1,alert(o),d.next=5,te(o).then(function(w){w.succeeded?j.default.success("\u914D\u7F6E\u6210\u529F"):j.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")});case 5:case"end":return d.stop()}},f)})),children:o.status==0?"\u505C\u7528":"\u6B63\u5E38"},"status"),(0,e.jsx)("a",{onClick:(0,y.Z)((0,i.Z)().mark(function f(){var h,d;return(0,i.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,TechnologyTemplateExport(o.id);case 2:if(h=s.sent,h!=""){s.next=6;break}return j.default.error("\u5F53\u524D\u6A21\u677F\u4E0D\u5B58\u5728\uFF01"),s.abrupt("return");case 6:d=document.createElement("a"),d.href=h,d.click();case 9:case"end":return s.stop()}},f)})),children:"\u5BFC\u51FA\u5DE5\u827A\u6A21\u7248"},"add")]}}];return(0,e.jsxs)(J.ZP,{children:[(0,e.jsx)(Q.ZP,{headerTitle:"\u8BBE\u5907\u4FE1\u606F",actionRef:H,rowKey:"id",search:{labelWidth:120},scroll:{x:2e3},toolBarRender:function(){return[(0,e.jsxs)(A.Z,{type:"primary",onClick:function(){N(!0)},children:[(0,e.jsx)(oe.Z,{})," \u65B0\u5EFA"]},"primary"),(0,e.jsx)(A.Z,{onClick:(0,y.Z)((0,i.Z)().mark(function C(){var o,f;return(0,i.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,Re($);case 2:ke([]),(o=H.current)===null||o===void 0||(f=o.reloadAndRest)===null||f===void 0||f.call(o);case 4:case"end":return d.stop()}},C)})),children:"\u5220\u9664"})]},request:function(){var O=(0,y.Z)((0,i.Z)().mark(function C(o){var f,h;return(0,i.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return f=[],h=0,w.next=4,pe(o).then(function(s){f=s.data.data,h=s.data.total});case 4:return w.abrupt("return",{data:f,success:!0,total:h});case 5:case"end":return w.stop()}},C)}));return function(C){return O.apply(this,arguments)}}(),columns:it,rowSelection:{onChange:function(C,o){ke(o)}}}),($==null?void 0:$.length)>0&&(0,e.jsx)(F.Z,{extra:(0,e.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,e.jsx)("a",{style:{fontWeight:600},children:$.length})," ","\u9879 \xA0\xA0"]})}),(0,e.jsx)(Fe,{storeType:L,OrgData:b,dicData:Je,onFinish:function(){var O=(0,y.Z)((0,i.Z)().mark(function C(o){var f;return(0,i.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:f=!1,o.id?f=Ve(o):f=$e(o),f&&(N(!1),de(void 0),H.current.reload());case 3:case"end":return d.stop()}},C)}));return function(C){return O.apply(this,arguments)}}(),onCancel:function(){N(!1),de(void 0)},createModalVisible:at,deviceVersions:qe,values:ce||{}}),we&&(0,e.jsx)(DeviceFood,{open:we,device:ce,onOk:function(){return Oe(!1)},onCancel:function(){return Oe(!1)}}),Ie&&(0,e.jsx)(StockMaterial,{open:Ie,device:ce,onOk:function(){return xe(!1)},onCancel:function(){return xe(!1)}})]})},We=Me},3408:function(Ge,V,r){"use strict";r.d(V,{lM:function(){return i},IH:function(){return j},mm:function(){return J},eP:function(){return Q},FM:function(){return z},h_:function(){return X}});var S=r(39428),P=r(11849),A=r(3182),v=r(48971);function i(a,T){return R.apply(this,arguments)}function R(){return R=(0,A.Z)((0,S.Z)().mark(function a(T,x){return(0,S.Z)().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.abrupt("return",(0,v.WY)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,P.Z)({},T)}));case 1:case"end":return D.stop()}},a)})),R.apply(this,arguments)}function j(a){return y.apply(this,arguments)}function y(){return y=(0,A.Z)((0,S.Z)().mark(function a(T){return(0,S.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,v.WY)("/kitchen/api/sysOrg/add",{method:"POST",data:(0,P.Z)({},T)}));case 1:case"end":return u.stop()}},a)})),y.apply(this,arguments)}function oe(a){return m.apply(this,arguments)}function m(){return m=_asyncToGenerator(_regeneratorRuntime().mark(function a(T){return _regeneratorRuntime().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",request("\u200B/kitchen/api\u200B/sysOrg\u200B/list",{method:"POST",data:_objectSpread({},T)}));case 1:case"end":return u.stop()}},a)})),m.apply(this,arguments)}function J(a){return F.apply(this,arguments)}function F(){return F=(0,A.Z)((0,S.Z)().mark(function a(T){return(0,S.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,v.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/delete",{method:"POST",data:(0,P.Z)({},T)}));case 1:case"end":return u.stop()}},a)})),F.apply(this,arguments)}function Q(a){return M.apply(this,arguments)}function M(){return M=(0,A.Z)((0,S.Z)().mark(function a(T){return(0,S.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,v.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/edit",{method:"POST",data:(0,P.Z)({},T)}));case 1:case"end":return u.stop()}},a)})),M.apply(this,arguments)}function fe(a){return W.apply(this,arguments)}function W(){return W=_asyncToGenerator(_regeneratorRuntime().mark(function a(T){return _regeneratorRuntime().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",request("/kitchen\u200B/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},T)}));case 1:case"end":return u.stop()}},a)})),W.apply(this,arguments)}function z(a){return K.apply(this,arguments)}function K(){return K=(0,A.Z)((0,S.Z)().mark(function a(T){return(0,S.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,v.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,P.Z)({},T)}));case 1:case"end":return u.stop()}},a)})),K.apply(this,arguments)}function X(a){return Y.apply(this,arguments)}function Y(){return Y=(0,A.Z)((0,S.Z)().mark(function a(T){return(0,S.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,v.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/AddAuthCode?orgid="+T,{method:"Get"}));case 1:case"end":return u.stop()}},a)})),Y.apply(this,arguments)}}}]);