{"id":195,"date":"2019-05-06T11:20:11","date_gmt":"2019-05-06T03:20:11","guid":{"rendered":"http:\/\/www.hefeiyu.com\/?p=195"},"modified":"2019-05-06T11:36:05","modified_gmt":"2019-05-06T03:36:05","slug":"4gl-combox%e5%8a%a8%e6%80%81%e7%bb%91%e5%ae%9a%e5%86%85%e5%ae%b9","status":"publish","type":"post","link":"https:\/\/www.hefeiyu.com\/?p=195","title":{"rendered":"4GL COMBOX\u52a8\u6001\u7ed1\u5b9a\u5185\u5bb9"},"content":{"rendered":"<div id=\"content_views\" class=\"htmledit_views\">\n<p><span style=\"font-size: 18px; color: #006600;\"><strong>\u4e00\u822c\u7684COMBOX\u6211\u4eec\u4e00\u822c\u7684\u662f\u76f4\u63a5\u5728per\u91cc\u9762\u5199item\u5c5e\u6027\uff0c\u5982\u4e0b\u4ee3\u7801\uff1a<\/strong><\/span><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\"> COMBOBOX    tc_qcjj08  = FORMONLY.tc_qcjj08,COMMENTS ='Enter 0 1 2 4 8 12  ',\r\n                       ITEMS=((\"0\",\"\u6bcf\u6279\/\u6b21\"),(\"1\",\"1H\/\u6b21\"),\r\n                              (\"2\",\"2H\/\u6b21\"),(\"4\",\"4H\/\u6b21\"),\r\n                              (\"6\",\"6H\/\u6b21\"),(\"8\",\"8H\/\u6b21\"),(\"12\",\"12H\/\u6b21\"),\r\n                              (\"24\",\"24H\/\u6b21\")); <\/code><\/pre>\n<p><strong><span style=\"font-size: 18px; color: #006600;\">\u4e00\u76f4\u5f88\u60f3\u8bd5\u4e0b\u52a8\u6001\u7ed1\u5b9aitem\u503c\uff0c\u4eca\u5929\u6b63\u597d\u5199\u7a0b\u5e8f\u7528\u5230COMBOX,\u7ed3\u679c\u5c31\u8bd5\u4e86\u4e0b\uff0c<\/span><\/strong><\/p>\n<p><strong><span style=\"font-size: 18px; color: #006600;\">\u4e0d\u662f\u5f88\u96be\uff0c\u4e3b\u8981\u662f4gl\u4ee3\u7801\u5b9e\u73b0\u3002<\/span><span style=\"font-size: 18px; color: #006600;\">\u8be6\u7ec6\u5b9e\u73b0\u5982\u4e0b\u3002<\/span><\/strong><\/p>\n<p><strong><span style=\"font-size: 18px; color: #006600;\">per\u753b\u9762\u5b9a\u4e49\u4e00\u4e2aCOMBOX\u7684\u7ec4\u4ef6<\/span><\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">COMBOBOX tc_qcjj01 = FORMONLY.tc_qcjj01 TYPE VARCHAR,NOT NULL,REQUIRED;<\/code><\/pre>\n<p><strong>\u7136\u540e\u57284gl\u4ee3\u7801\u4e2d\u5199\u4e00\u4e2a\u5355\u72ec\u7684\u51fd\u6570\u6765\u5904\u7406COMBOX\u4e2d\u7684item\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">##################################################\r\n# Description   : \u64b7\u53d6\u5f69\u5986\u5206\u7fa4\u7801\u586b\u5145COMBOX\r\n# Date &amp; Author : 2012\/09\/26 by FMX\r\n##################################################\r\nFUNCTION tc_qcjj01_cmd()\r\n   DEFINE   li_gbi_count   SMALLINT\r\n   DEFINE   lc_ima06       LIKE ima_file.ima06\r\n   DEFINE   lc_imz02       LIKE imz_file.imz02\r\n   DEFINE   lsb_item       base.StringBuffer\r\n   DEFINE   lsb_item2      base.StringBuffer\r\n \r\n   LET lsb_item  = base.StringBuffer.create()\r\n   LET lsb_item2 = base.StringBuffer.create()\r\n   DECLARE l_cmdCurs2 CURSOR FOR\r\n                      SELECT DISTINCT ima06,imz02 \r\n                      FROM ima_file,imz_file \r\n                      WHERE ima06=imz01 AND imz02 LIKE '%\u5f69\u5986%'\r\n                      ORDER BY 1\r\n   FOREACH l_cmdCurs2 INTO lc_ima06,lc_imz02\r\n      CALL lsb_item.append(lc_ima06 CLIPPED || \",\")\r\n      CALL lsb_item2.append(lc_ima06 CLIPPED || \" (\" || lc_imz02 CLIPPED || \"),\")\r\n   END FOREACH\r\n \r\n   CALL cl_set_combo_items(\"tc_qcjj01\",lsb_item.toString(), lsb_item2.toString())\r\nEND FUNCTION<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 18px; color: #3333ff;\"><strong>cl_set_combo_items()\u51fd\u6570\u662f\u6807\u51c6\u7684\u7cfb\u7edf\u5171\u4eab\u51fd\u6570\uff0c\u5728\u8fd9\u91cc\u4e5f\u628a\u4ee3\u7801\u8d34\u51fa\u6765\uff1a\u00a0<\/strong><\/span><code class=\"language-html hljs xml\"><\/code><\/p>\n<div class=\"hljs-button {2}\" data-title=\"\u590d\u5236\">\n<pre class=\"pure-highlightjs\"><code class=\"null\">##################################################\r\n# Description   : \u64b7\u53d6\u5f69\u5986\u5206\u7fa4\u7801\u586b\u5145COMBOX\r\n# Date &amp; Author : 2012\/09\/26 by FMX\r\n##################################################\r\nFUNCTION tc_qcjj01_cmd()\r\n   DEFINE   li_gbi_count   SMALLINT\r\n   DEFINE   lc_ima06       LIKE ima_file.ima06\r\n   DEFINE   lc_imz02       LIKE imz_file.imz02\r\n   DEFINE   lsb_item       base.StringBuffer\r\n   DEFINE   lsb_item2      base.StringBuffer\r\n \r\n   LET lsb_item  = base.StringBuffer.create()\r\n   LET lsb_item2 = base.StringBuffer.create()\r\n   DECLARE l_cmdCurs2 CURSOR FOR\r\n                      SELECT DISTINCT ima06,imz02 \r\n                      FROM ima_file,imz_file \r\n                      WHERE ima06=imz01 AND imz02 LIKE '%\u5f69\u5986%'\r\n                      ORDER BY 1\r\n   FOREACH l_cmdCurs2 INTO lc_ima06,lc_imz02\r\n      CALL lsb_item.append(lc_ima06 CLIPPED || \",\")\r\n      CALL lsb_item2.append(lc_ima06 CLIPPED || \" (\" || lc_imz02 CLIPPED || \"),\")\r\n   END FOREACH\r\n \r\n   CALL cl_set_combo_items(\"tc_qcjj01\",lsb_item.toString(), lsb_item2.toString())\r\nEND FUNCTION<\/code><\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<p><span style=\"font-size: 18px; color: #006600;\"><strong>\u6b64\u51fd\u6570\u5199\u597d\u540e\uff0c\u5728MAIN\u51fd\u6570\u4e2d\u76f4\u63a5\u8c03\u7528\u5373\u53ef\u3002\u8fd0\u884c\u6548\u679c\u5982\u4e0b\u56fe\uff1a<\/strong><\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/05\/1348729154_4706.jpg\" alt=\"\" \/><\/p>\n<p><span style=\"font-size: 18px; color: #006600;\"><strong>\u6709\u5174\u8da3\u7684\u53ef\u4ee5\u8bd5\u8bd5<br \/>\n<\/strong><\/span><\/p>\n<\/div>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.hefeiyu.com\">\u8d6b\u975e\u57df<\/a> &raquo; <a href=\"https:\/\/www.hefeiyu.com\/?p=195\">4GL COMBOX\u52a8\u6001\u7ed1\u5b9a\u5185\u5bb9<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u4e00\u822c\u7684COMBOX\u6211\u4eec\u4e00\u822c\u7684\u662f\u76f4\u63a5\u5728per\u91cc\u9762\u5199item\u5c5e\u6027\uff0c\u5982\u4e0b\u4ee3\u7801\uff1a COMBOBOX tc_qcjj08 = FORMONLY.tc_qcjj08,COMMENTS =&#8217;Enter 0 1 2 4 8 12 &#8216;, ITEMS=((&#8220;0&#8221;,&#8221;\u6bcf\u6279 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[60,92],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-4gl","tag-4gl","tag-combox"],"_links":{"self":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=195"}],"version-history":[{"count":1,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/195\/revisions\/197"}],"wp:attachment":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}