{"id":2204,"date":"2024-10-21T17:18:43","date_gmt":"2024-10-21T09:18:43","guid":{"rendered":"http:\/\/www.jh1999.cn\/?p=2204"},"modified":"2024-11-16T11:51:23","modified_gmt":"2024-11-16T03:51:23","slug":"ax%e5%b8%a6%e5%8f%82%e6%95%b0%e8%b0%83%e7%94%a8form","status":"publish","type":"post","link":"http:\/\/www.jh1999.cn\/?p=2204","title":{"rendered":"AX\u5e26\u53c2\u6570\u8c03\u7528FORM"},"content":{"rendered":"<div class=\"gb-container gb-container-3310355e\">\n\n<p class=\"has-medium-font-size wp-block-paragraph\">\u4e00\u3001\u4e0d\u540c\u83dc\u5355\u5e26\u53c2\u6570\u8c03\u7528\u540c\u4e00\u4e2aFORM\uff0c\u5b9e\u73b0\u4e0d\u540c\u5185\u5bb9\u7684\u754c\u9762\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u754c\u9762\u91cc\u521b\u5efa\u4e24\u4e2a\u83dc\u5355\uff0cEnumTypeParameter\u90fd\u9009\u3010InventTransType\u3011\uff0cObject\u90fd\u6307\u5411\u540c\u4e00\u4e2aForm\u3010InventQuarantineOrder\u3011\u3002<\/li>\n\n\n\n<li>\u83dc\u5355A\u7684EnumParameter\u9009\u62e9\u3010Purch\u3011\uff0c\u83dc\u5355B\u7684EnumParameter\u9009\u62e9\u3010Production\u3011\u3002<\/li>\n\n\n\n<li>\u4e5f\u53ef\u4ee5\u4e24\u4e2a\u83dc\u5355\u5206\u522b\u6307\u5b9a\u4e0d\u540c\u7684\u3010Parameters\u3011\u53c2\u6570\u6765\u4ee3\u66ff\u3010EnumTypeParameter\u3011+\u3010EnumParameter\u3011\u7ec4\u5408\u503c\uff0c\u628a\u8fd9\u4e2a\u53c2\u6570\u4f20\u7ed9Form\u6765\u5b9e\u73b0\u3002<\/li>\n\n\n\n<li>\u88ab\u8c03\u7528\u7684Form\uff0c\u53ef\u4ee5\u5728form.init()\u4e2d\u53d6\u53c2\u6570\uff0c\u4e5f\u53ef\u4ee5\u5728DataSource.init()\u4e2d\u53d6\u53c2\u6570\u3002\u4e0b\u9762\u7684\u4ee3\u7801\u5199\u5728DataSource.init()\u4e2d\u53d6\u5f97\u53c2\u6570\uff0c\u6839\u636e\u4e0d\u540c\u7684\u53c2\u6570\u503c\u8fc7\u6ee4\u6570\u636e\uff0c\u540c\u65f6\u5e76\u6539\u53d8\u5b50\u8868DataSource\u7684LinkType\u503c\u3002<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>void init()\n{\n    QueryBuildRange _qbrType;\n    ;\n\n    super();\n    this.query().dataSourceTable(tablenum(InventQuarantineOrder)).addSortField(fieldnum(InventQuarantineOrder,QuarantineId));\n    _qbrType = this.query().dataSourceTable(TableNum(InventQuarantineOrder)).addRange(FieldNum(InventQuarantineOrder,TransType));\n\n    if (element.args().parmEnumType())\n    {\n        if (element.args().parmEnum() == InventTransType::Purch)\n        {\n            _qbrType.value(ENum2Str(InventTransType::Purch));\n            VendPackingSlipJour_ds.linkType(3);\n        }\n        else\n        {\n            _qbrType.value(Enum2Str(InventTransType::Production));\n            VendPackingSlipJour_ds.linkType(1);\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e8c\u3001Button\u63a7\u4ef6\u643a\u5e26\u53c2\u6570\u8c03\u7528Form\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4e3b\u754c\u9762\u521b\u5efa\u4e00\u4e2aButton\u63a7\u4ef6\uff0c\u5728\u5176.Clicked()\u4e2d\u5199\u8c03\u7528\u4ee3\u7801\u3002<\/li>\n\n\n\n<li>\u88ab\u8c03\u754c\u9762\u7684.init()\u4e2d\u53d6\u53c2\u6570\u5e76\u6839\u636e\u53c2\u6570\u503c\u663e\u793a\u6570\u636e\u3002<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u4e3b\u754c\u9762\u547c\u53eb\u6309\u94ae\u7684Clicked()\u4ee3\u7801\nvoid clicked()\n{\n    args        _args;\n    FormRun     _formRun;\n    str         _sParam;\n    ;\n    super();\n    _args   = new Args(formstr(SPL_WoItemAudit));\n    _sParam = SPL_cmTable.ProdPoolId + ',SPL_cmTable';\n    _args.parm(_sParam);\n    _formRun= classFactory.formRunClass(_args);\n    _formRun.init();\n    _formRun.run();\n    _formRun.detach();\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u88ab\u8c03\u754c\u9762\u7684init()\u4ee3\u7801\npublic void init()\n{\n    str         m_param,m_prodPoolId,m_SO;\n    int         _postion,_length;\n    ;\n    super();\n    if(element.args().parm())\n    {\n        m_param     = element.args().parm();\n        _length     = strlen(m_param);\n        _postion    = strFind(m_param,',',1,_length);\n        m_prodPoolId= subStr(m_param,1,_postion-1);\n        m_SO        = subStr(m_param,_postion+1,_length-_postion);\n        if(m_SO == 'SPL_cmTable')\n        {\n            SPL_NotIntersected.value(NoYes::Yes);\n            txt_prodPoolId.text(m_prodPoolId);\n            txt_SalesId.text('');\n        }\n        else\n        {\n            SPL_NotIntersected.value(NoYes::No);\n            txt_prodPoolId.text(m_prodPoolId);\n            txt_SalesId.text(m_SO);\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e09\u3001Button\u63a7\u4ef6\u643a\u5e26Record\u4f5c\u53c2\u6570\u8c03\u7528Form\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u4e3b\u8868\u547c\u53eb\u6309\u94ae\u7684Clicked()\u4ee3\u7801\nvoid clicked()\n{\n    args        _args;\n    FormRun     _formRun;\n    HelpTable   _helpTable;\n    ;\n    super();\n    select firstonly _helpTable where _helpTable.FormName == element.name();\n    if(_helpTable)\n    {\n        _args   = new Args(formstr(HelpView));\n        _args.record(_helpTable);\n        _formRun= classFactory.formRunClass(_args);\n        _formRun.init();\n        _formRun.run();\n        _formRun.detach();\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u88ab\u8c03\u7528Form.init()\u7684\u4ee3\u7801\npublic void init()\n{\n    HelpTable   _helpTable;\n    ;\n    super();\n    if(element.args().record())\n    {\n        _helpTable = element.args().record();\n        seFormName.text(_helpTable.FormName);\n        seFormDesc.text(_helpTable.FormDesc);\n        seHelp.text(_helpTable.FormHelp);\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u56db\u3001\u5728\u88ab\u8c03\u754c\u9762\u4e2d\u547c\u53eb\u4e3b\u754c\u9762\u4e2d\u7684\u67d0\u4e2a\u65b9\u6cd5\u6267\u884c\u3002\u4e0b\u9762\u4ee3\u7801\u8868\u793a\uff1a\u88ab\u8c03\u754c\u9762\u5b8c\u6210\u5de5\u4f5c\u540e\uff0c\u8ba9\u4e3b\u754c\u9762\u4e2d\u7684 SPL_Dorefresh\u7684\u65b9\u6cd5\u6267\u884c\u4e00\u6b21\uff0c\u4ee5\u5237\u65b0\u4e3b\u754c\u9762\u7684\u6570\u636e\u6e90\uff0c\u7136\u540e\u81ea\u6211\u5173\u95ed\u88ab\u8c03\u754c\u9762\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    super();\n    element.args().caller().SPL_Dorefresh();\n    element.close();<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e94\u3001\u5728\u88ab\u8c03\u754c\u4e2d\u5f15\u7528\u4e3b\u754c\u9762\u91cc\u7684\u51fd\u6570\u3002\u4e0b\u9762\u88ab\u8c03Form.init()\u4e2d\u7684\u4ee3\u7801\u8868\u793a\uff1a\u5982\u679c\u4e3b\u53eb\u754c\u9762\u662f\u201cSPL_QueryForProdBom\u201d\uff0c\u5219\u88ab\u8c03\u754c\u9762\u7684 ItemId \u53d8\u91cf\u7528\u4e3b\u754c\u9762\u4e2d\u7684\u51fd\u6570getItemID() \u53d6\u503c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    if( element.Args().caller().name() == formStr(SPL_QueryForProdBom)  )\n        itemid = element.args().caller().getItemID();\n<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"500\" src=\"http:\/\/www.jh1999.cn\/wp-content\/uploads\/2024\/10\/\u626f\u756b.gif\" alt=\"\" class=\"wp-image-2296\" style=\"width:412px;height:auto\"\/><\/figure>\n<\/div>\n<div class=\"gb-shapes\"><div class=\"gb-shape gb-shape-1\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 1200 350\" preserveAspectRatio=\"none\"><path d=\"M1200 336.7V350H0V0s22.4 276.4 1200 336.7z\"\/><\/svg><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u4e0d\u540c\u83dc\u5355\u5e26\u53c2\u6570\u8c03\u7528\u540c\u4e00\u4e2aFORM\uff0c\u5b9e\u73b0\u4e0d\u540c\u5185\u5bb9\u7684\u754c\u9762\u3002 \u4e8c\u3001Button\u63a7\u4ef6\u643a\u5e26\u53c2\u6570\u8c03\u7528Form\u3002 \u4e09\u3001B &#8230; <a title=\"AX\u5e26\u53c2\u6570\u8c03\u7528FORM\" class=\"read-more\" href=\"http:\/\/www.jh1999.cn\/?p=2204\" aria-label=\"Read more about AX\u5e26\u53c2\u6570\u8c03\u7528FORM\">\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-2204","post","type-post","status-publish","format-standard","hentry","category-kfbj"],"_links":{"self":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts\/2204","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=2204"}],"version-history":[{"count":19,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts\/2204\/revisions"}],"predecessor-version":[{"id":2297,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=\/wp\/v2\/posts\/2204\/revisions\/2297"}],"wp:attachment":[{"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2204"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jh1999.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}