{"id":1431,"date":"2024-06-05T19:16:58","date_gmt":"2024-06-05T11:16:58","guid":{"rendered":"http:\/\/www.jh1999.cn\/?p=1431"},"modified":"2024-06-05T19:26:07","modified_gmt":"2024-06-05T11:26:07","slug":"%e7%ad%89%e5%be%85%e4%bb%bb%e5%8a%a1%e5%ae%8c%e6%88%90%e5%90%8e%e5%85%b3%e9%97%ad","status":"publish","type":"post","link":"http:\/\/www.jh1999.cn\/?p=1431","title":{"rendered":"\u7b49\u5f85\u4efb\u52a1\u5b8c\u6210\u540e\u5173\u95ed"},"content":{"rendered":"<div class=\"gb-container gb-container-6337a678\">\n\n<p class=\"wp-block-paragraph\">\u5f53\u6211\u4eec\u7684\u7a0b\u5e8f\u9700\u8981\u501f\u52a9windows\u7684\u6392\u7a0b\u5668\u5b9a\u65f6\u8c03\u7528\u6267\u884c\u65f6\uff0c\u6267\u884c\u5b8c\u4efb\u52a1\u540e\u5e94\u8be5\u80fd\u591f\u81ea\u52a8\u5173\u95ed\u3002\u4f8b\u5982\uff1a\u5b9a\u671f\u53d1\u9001\u62a5\u8868\u90ae\u4ef6\uff0cERP\u7cfb\u7edf\u5347\u7ea7\u7b49\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u73b0\u4e0a\u8ff0\u529f\u80fd\uff0c\u5206\u4e09\u6b65\u8d70\uff1a\u4e00\u3001FormCreate\u4e2d\u4eceini\u6587\u4ef6\u4e2d\u53d6\u53d8\u91cf\uff0c\u51c6\u5907\u6570\u636e\u3002\u4e8c\u3001FormShow\u4e2d\u5199 if (\u6267\u884c\u7ed3\u679c) then Close\u3002\u4e09\u3001\u6267\u884c\u7ed3\u679c result:=false; \u6267\u884c\u2026\u2026 result:=true;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>procedure Tfmuperp.FormCreate(Sender: TObject);\nvar\n  sIniFile:String;\n  myIni:TIniFile;\n  sUpdFile:String;\nbegin\n  \/\/\u53d6\u5f97\u5347\u7ea7\u53c2\u6570\n  sToPath:=ExtractFilePath(Application.ExeName);\n  sIniFile:=sToPath+'dbconn.ini';\n  myIni:=TIniFile.create(sIniFile);\n  sUpdFile:=myIni.ReadString('CONFIG','update','');\n  sFromPath:=ExtractFilePath(sUpdFile);\n  FreeAndNil(myIni);\nend;\n\nfunction Tfmuperp.updComplete;\nvar\n  hErp:Hwnd;\n  sfosCopy:TShFileOpStruct;\nbegin\n  Result:=false;\n  \/\/\u5173\u95edERP\n  hErp:=FindWindow(nil,'jhERPsystem');\n  if hErp&lt;>0 then Sendmessage(hErp,wm_close,0,0);\n  sleep(2000);\n  \/\/COPY ERP\n  FillChar(sfosCopy,SizeOf(TshFileOpStruct),#0);\n  sfosCopy.Wnd:=Handle;\n  sfosCopy.wFunc:=FO_Copy;\n  sfosCopy.pFrom:=pChar(sFromPath+'*.xls'+#0+#0);\n  sfosCopy.pTo:=pChar(sToPath);\n  sfosCopy.fFlags:=FOF_SILENT or FOF_NOCONFIRMATION;\n  ShFileOperation(sfosCopy);\n\n  if hErp&lt;>0 then Sendmessage(hErp,wm_close,0,0);\n  sfosCopy.pFrom:=pChar(sFromPath+'jhERP.exe'+#0+#0);\n  ShFileOperation(sfosCopy);\n\n  sfosCopy.pFrom:=pChar(sFromPath+'report\\*.*'+#0+#0);\n  sfosCopy.pTo:=pChar(sToPath+'report\\');\n  ShFileOperation(sfosCopy);\n\n  Result:=true;\nend;\n\nprocedure Tfmuperp.FormActivate(Sender: TObject);\nbegin\n  Animate1.Active:=true;\n  if (length(sFromPath)&lt;5) then\n  begin\n    showmessage('Update is Failed, Please check the dbconn.ini->UpdFile');\n    close;\n  end else\n  begin\n    if updComplete then close;\n  end;\nend;\u76f8\u5173\u4ee3\u7801\u5982\u4e0b\uff1a<\/code><\/pre>\n\n<div class=\"gb-shapes\"><div class=\"gb-shape gb-shape-1\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 1200 130.3\" preserveAspectRatio=\"none\"><path d=\"M0 107.9l40-22.2c40-21.9 120-66.9 200-62.2 80 4.4 160 57.8 240 53.3C560 72 640 10.4 720 1.2S880 37 960 59c80 22.3 160 22.3 200 22.3h40v49H0v-22.4z\"\/><\/svg><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>\u5f53\u6211\u4eec\u7684\u7a0b\u5e8f\u9700\u8981\u501f\u52a9windows\u7684\u6392\u7a0b\u5668\u5b9a\u65f6\u8c03\u7528\u6267\u884c\u65f6\uff0c\u6267\u884c\u5b8c\u4efb\u52a1\u540e\u5e94\u8be5\u80fd\u591f\u81ea\u52a8\u5173\u95ed\u3002\u4f8b\u5982\uff1a\u5b9a\u671f\u53d1\u9001\u62a5\u8868\u90ae\u4ef6 &#8230; <a title=\"\u7b49\u5f85\u4efb\u52a1\u5b8c\u6210\u540e\u5173\u95ed\" class=\"read-more\" href=\"http:\/\/www.jh1999.cn\/?p=1431\" aria-label=\"Read more about \u7b49\u5f85\u4efb\u52a1\u5b8c\u6210\u540e\u5173\u95ed\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1431","post","type-post","status-publish","format-standard","hentry","category-kfbj"],"_links":{"self":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts\/1431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1431"}],"version-history":[{"count":2,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts\/1431\/revisions"}],"predecessor-version":[{"id":1434,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts\/1431\/revisions\/1434"}],"wp:attachment":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1431"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}