"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6946],{4320:function(x,p,e){e.r(p);var f=e(25359),l=e.n(f),C=e(57213),E=e.n(C),A=e(49811),D=e.n(A),b=e(54306),R=e.n(b),h=e(93236),I=e(50336),a=e(40882),v=e(61786),d=e(72226),U=e(52586),T=e(23674),B=e(48182),F=e(87533),P=e(90627),_=e(62086),c=P.Z.DeviceStoreController,K=c.deviceStoreCreate,L=c.deviceStoreUpdate,Z=c.deviceStoreItem,$=P.Z.ShopController.shopItems;p.default=function(){var G=(0,T.useParams)(),W=(0,h.useRef)(),M={id:"",name:"",addr:"",power:7,p_price:"",device_num:0,lon:"",lat:"",dian_price:"",fee:"",note:""},y=(0,h.useState)(M),O=R()(y,2),g=O[0],j=O[1],S=function(){var i=D()(l()().mark(function n(r){var o,t;return l()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return j(r),s.next=3,K(E()({},r));case 3:o=s.sent,t=o.success,t&&(j(M),history.back());case 6:case"end":return s.stop()}},n)}));return function(r){return i.apply(this,arguments)}}(),Q=function(){var i=D()(l()().mark(function n(r){var o,t,m;return l()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,L(E()({},r));case 2:o=u.sent,t=o.success,t&&((m=W.current)===null||m===void 0||m.reload());case 5:case"end":return u.stop()}},n)}));return function(r){return i.apply(this,arguments)}}();return(0,_.jsx)(I._z,{header:{title:"\u95E8\u5E97\u6DFB\u52A0"},ghost:!0,children:(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(a.A,{initialValues:g,onFinish:function(n){S(n)},children:[(0,_.jsxs)(a.A.Group,{children:[(0,_.jsx)(v.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"name",label:"\u95E8\u5E97\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165"}),(0,_.jsx)(v.Z,{width:"md",name:"p_price",label:"\u505C\u8F66\u8D39",placeholder:"\u8BF7\u8F93\u5165"})]}),(0,_.jsxs)(a.A.Group,{children:[(0,_.jsx)(d.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],fieldProps:{prefix:"\uFFE5"},label:"\u7535\u8D39/\u5EA6",name:"dian_price"}),(0,_.jsx)(d.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],fieldProps:{prefix:"\uFFE5"},label:"\u670D\u52A1\u8D39/\u5EA6",name:"fee"})]}),(0,_.jsxs)(a.A.Group,{children:[(0,_.jsx)(d.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],fieldProps:{precision:0},label:"\u751F\u6210\u5145\u7535\u6869",name:"device_num",min:0}),(0,_.jsx)(d.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],fieldProps:{precision:0},label:"\u529F\u7387 KM",name:"power",min:1})]}),(0,_.jsx)(U.Z,{name:"note",label:"\u5907\u6CE8",placeholder:"\u5907\u6CE8"}),(0,_.jsx)(a.A.Item,{style:{width:"100%"},rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],width:"md",name:"location",label:"\u5730\u5740",placeholder:"\u8BF7\u8F93\u5165",children:(0,_.jsx)(B.Z,{})})]})})})}}}]);
