SMLQP10500_핵의학장비QC관리.xfdl 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLQP10500" position="absolute 0 0 1199 785" titletext="New Form" oninit="SMLQP10500_oninit" onload="SMLQP10500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="장비QC 관리" class="tit_1" position="absolute 0 0 214 23"/>
  8. <Button id="button2" taborder="1" text="출력" class="btn6" visible="false" position="absolute 0 24 56 46"/>
  9. <Button id="button5" taborder="2" text="저장" class="btn4" position="absolute 1069 24 1125 46" anchor="top right" onclick="button5_onclick"/>
  10. <Button id="button10" taborder="3" text="초기화" class="btn4" position="absolute 1127 24 1195 46" anchor="top right" onclick="button10_onclick"/>
  11. <Shape id="line32" linetype="horizontal" class="line_6" position="absolute 0 45 1194 51" anchor="left top right"/>
  12. <Static id="caption31" text="장비QC 그래프" class="tit_2" position="absolute 0 378 125 400"/>
  13. <Shape id="line8" linetype="horizontal" class="line_10" position="absolute 0 394 1194 400" anchor="left top right"/>
  14. <Shape id="line9" linetype="horizontal" class="line_3" position="absolute 0 771 1194 777" anchor="left right bottom"/>
  15. <Div id="group4" taborder="5" class="div_SA" position="absolute 0 49 1195 84" anchor="left top right">
  16. <Layouts>
  17. <Layout>
  18. <Calendar id="todd" taborder="1" autoselect="true" autoskip="true" class="input_search" position="absolute 215 9 305 28" dateformat="yyyy-MM-dd"/>
  19. <Static id="caption2" text="조회구분 :" class="search_name" position="absolute 500 10 594 27"/>
  20. <Static id="caption21" text="장비명 :" class="search_name" position="absolute 315 10 409 27"/>
  21. <Combo id="combo1" taborder="2" innerdataset="@ds_init_lb9997" codecolumn="nm" datacolumn="cd" class="combo_search" position="absolute 390 9 480 28" onitemchanged="group4_combo1_onitemchanged"/>
  22. <Static id="caption15" text="~" class="search_no_b" position="absolute 200 10 215 27"/>
  23. <Static id="caption17" text="측정일 :" class="search_name" position="absolute 15 10 109 27"/>
  24. <Calendar id="fromdd" taborder="3" autoselect="true" autoskip="true" class="input_search" position="absolute 105 8 195 27" dateformat="yyyy-MM-dd" value="null"/>
  25. <Button id="button1" taborder="4" text="조회" class="btn1" position="absolute 1119 9 1175 31" anchor="top right" onclick="group4_button1_onclick"/>
  26. <Shape id="line2" linetype="vertical" class="line_4" position="absolute 1106 9 1112 31" anchor="top right"/>
  27. <Combo id="combo2" taborder="5" innerdataset="@ds_init_lb9998" codecolumn="nm" datacolumn="cd" position="absolute 595 8 725 27" onitemchanged="group4_combo2_onitemchanged"/>
  28. </Layout>
  29. </Layouts>
  30. </Div>
  31. <Tab id="switch1" taborder="6" tabindex="0" class="tab_Normal" position="absolute 0 399 1195 771" anchor="all">
  32. <Tabpages>
  33. <Tabpage id="case1">
  34. <Layouts>
  35. <Layout>
  36. <ActiveX id="object1" position="absolute 1 0 1185 352" progid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" useautobitmapcache="1" taborder="0" anchor="all"/>
  37. </Layout>
  38. </Layouts>
  39. </Tabpage>
  40. <Tabpage id="case2">
  41. <Layouts>
  42. <Layout>
  43. <ActiveX id="object2" position="absolute 0 0 1184 352" progid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" useautobitmapcache="1" taborder="0" anchor="all" OnClick="switch1_case2_object2_OnClick"/>
  44. </Layout>
  45. </Layouts>
  46. </Tabpage>
  47. </Tabpages>
  48. </Tab>
  49. <Button id="btn_grprnt" taborder="8" text="출력" class="btn6" position="absolute 1070 375 1120 394" anchor="top right" onclick="btn_grprnt_onclick"/>
  50. <Button id="button11" taborder="9" text="그래프저장" class="btn5" position="absolute 1121 375 1196 394" anchor="top right" onclick="button11_onclick"/>
  51. <Button id="button7" taborder="10" text="그래프초기화" class="btn2" position="absolute 975 375 1069 394" anchor="top right" onclick="button7_onclick"/>
  52. <Button id="btn_grp" taborder="11" text="그래프" class="btn2" position="absolute 921 375 974 394" anchor="top right" onclick="btn_grp_onclick"/>
  53. <Button id="button6" taborder="13" text="엑셀" class="btn7" position="absolute 1146 87 1196 106" anchor="top right" onclick="button6_onclick"/>
  54. <Radio id="radio2" taborder="14" columncount="3" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" visible="false" position="absolute 237 87 352 107" onitemchanged="radio2_onitemchanged">
  55. <Dataset id="innerdataset">
  56. <ColumnInfo>
  57. <Column id="codecolumn"/>
  58. <Column id="datacolumn"/>
  59. </ColumnInfo>
  60. <Rows>
  61. <Row>
  62. <Col id="codecolumn">3</Col>
  63. <Col id="datacolumn">PEA</Col>
  64. </Row>
  65. <Row>
  66. <Col id="codecolumn">4</Col>
  67. <Col id="datacolumn">RES</Col>
  68. </Row>
  69. </Rows>
  70. </Dataset>
  71. </Radio>
  72. <Radio id="radio1" taborder="15" columncount="3" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" visible="false" position="absolute 130 87 245 107" onitemchanged="radio1_onitemchanged">
  73. <Dataset id="innerdataset">
  74. <ColumnInfo>
  75. <Column id="codecolumn"/>
  76. <Column id="datacolumn"/>
  77. </ColumnInfo>
  78. <Rows>
  79. <Row>
  80. <Col id="codecolumn">1</Col>
  81. <Col id="datacolumn">CRF</Col>
  82. </Row>
  83. <Row>
  84. <Col id="codecolumn">2</Col>
  85. <Col id="datacolumn">RES</Col>
  86. </Row>
  87. </Rows>
  88. </Dataset>
  89. </Radio>
  90. <Static id="caption13" text="장비QC 상세정보" class="tit_2" position="absolute 0 89 125 110"/>
  91. <Grid id="datagrid2" taborder="16" binddataset="ds_main_getEqmtQcList" useinputpanel="false" position="absolute 0 107 1195 365" anchor="left top right" oncellclick="datagrid2_oncellclick" onkeydown="datagrid2_onkeydown" cellsizingtype="col">
  92. <Formats>
  93. <Format id="default">
  94. <Columns>
  95. <Column size="25"/>
  96. <Column size="20"/>
  97. <Column size="100"/>
  98. <Column size="90"/>
  99. <Column size="60"/>
  100. <Column size="60"/>
  101. <Column size="60"/>
  102. <Column size="60"/>
  103. <Column size="60"/>
  104. <Column size="60"/>
  105. <Column size="60"/>
  106. <Column size="60"/>
  107. <Column size="60"/>
  108. <Column size="60"/>
  109. <Column size="60"/>
  110. <Column size="60"/>
  111. <Column size="60"/>
  112. <Column size="60"/>
  113. <Column size="60"/>
  114. <Column size="70"/>
  115. <Column size="70"/>
  116. <Column size="50"/>
  117. <Column size="50"/>
  118. <Column size="150"/>
  119. <Column size="100"/>
  120. <Column size="100"/>
  121. <Column size="65"/>
  122. <Column size="60"/>
  123. <Column size="50"/>
  124. </Columns>
  125. <Rows>
  126. <Row size="24" band="head"/>
  127. <Row size="24"/>
  128. </Rows>
  129. <Band id="head">
  130. <Cell/>
  131. <Cell col="1"/>
  132. <Cell col="2" text="측 정 일"/>
  133. <Cell col="3" text="측정량"/>
  134. <Cell col="4" text="D1"/>
  135. <Cell col="5" text="D2"/>
  136. <Cell col="6" text="D3"/>
  137. <Cell col="7" text="D4"/>
  138. <Cell col="8" text="D5"/>
  139. <Cell col="9" text="D6"/>
  140. <Cell col="10" text="D7"/>
  141. <Cell col="11" text="D8"/>
  142. <Cell col="12" text="D9"/>
  143. <Cell col="13" text="D10"/>
  144. <Cell col="14" text="D11"/>
  145. <Cell col="15" text="D12"/>
  146. <Cell col="16" text="D13"/>
  147. <Cell col="17" text="D14"/>
  148. <Cell col="18" text="D15"/>
  149. <Cell col="19" text="avg"/>
  150. <Cell col="20" text="avg2"/>
  151. <Cell col="21" text="low"/>
  152. <Cell col="22" text="high"/>
  153. <Cell col="23" text="HIGH"/>
  154. <Cell col="24" text="표준편차"/>
  155. <Cell col="25" text="변동계수"/>
  156. <Cell col="26" text="eqmtcd"/>
  157. <Cell col="27" text="gbn"/>
  158. <Cell col="28" text="seq"/>
  159. </Band>
  160. <Band id="body">
  161. <Cell celltype="head"/>
  162. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:chk" expr="expr:chk == 'Y' ? 1 : 0"/>
  163. <Cell col="2" displaytype="date" edittype="date" text="bind:mdd" calendardisplaynulltype="nulltext"/>
  164. <Cell col="3" displaytype="text" edittype="text" text="bind:mquan"/>
  165. <Cell col="4" displaytype="text" edittype="text" text="bind:d1"/>
  166. <Cell col="5" displaytype="text" edittype="text" text="bind:d2"/>
  167. <Cell col="6" displaytype="text" edittype="text" text="bind:d3"/>
  168. <Cell col="7" displaytype="text" edittype="text" text="bind:d4"/>
  169. <Cell col="8" displaytype="text" edittype="text" text="bind:d5"/>
  170. <Cell col="9" displaytype="text" edittype="text" text="bind:d6"/>
  171. <Cell col="10" displaytype="text" edittype="text" text="bind:d7"/>
  172. <Cell col="11" displaytype="text" edittype="text" text="bind:d8"/>
  173. <Cell col="12" displaytype="text" edittype="text" text="bind:d9"/>
  174. <Cell col="13" displaytype="text" edittype="text" text="bind:d10"/>
  175. <Cell col="14" displaytype="text" edittype="text" text="bind:d11"/>
  176. <Cell col="15" displaytype="text" edittype="text" text="bind:d12"/>
  177. <Cell col="16" displaytype="text" edittype="text" text="bind:d13"/>
  178. <Cell col="17" displaytype="text" edittype="text" text="bind:d14"/>
  179. <Cell col="18" displaytype="text" edittype="text" text="bind:d15"/>
  180. <Cell col="19" text="bind:avg"/>
  181. <Cell col="20" text="bind:avg2"/>
  182. <Cell col="21" text="bind:low"/>
  183. <Cell col="22" text="bind:high"/>
  184. <Cell col="23" displaytype="text" edittype="text" text="bind:hv"/>
  185. <Cell col="24" text="bind:sd"/>
  186. <Cell col="25" text="bind:cv"/>
  187. <Cell col="26" text="bind:eqmtcd"/>
  188. <Cell col="27" text="bind:gbn"/>
  189. <Cell col="28" text="bind:seq"/>
  190. </Band>
  191. </Format>
  192. </Formats>
  193. </Grid>
  194. <Button id="button3" taborder="17" text="행추가" class="btn2" position="absolute 1036 87 1089 106" anchor="top right" onclick="button3_onclick"/>
  195. <Button id="button4" taborder="18" text="행삭제" class="btn2" position="absolute 1091 87 1144 106" anchor="top right" onclick="button4_onclick"/>
  196. </Layout>
  197. </Layouts>
  198. <Objects>
  199. <Dataset id="ds_hidden_ref" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  200. <ColumnInfo>
  201. <Column id="fromdd" type="STRING" size="256"/>
  202. <Column id="todd" type="STRING" size="256"/>
  203. <Column id="eqmtcd" type="STRING" size="256"/>
  204. <Column id="code" type="STRING" size="256"/>
  205. <Column id="gbn" type="STRING" size="256"/>
  206. <Column id="cal" type="STRING" size="256"/>
  207. <Column id="cr" type="STRING" size="256"/>
  208. </ColumnInfo>
  209. <Rows>
  210. <Row>
  211. <Col id="fromdd"/>
  212. <Col id="todd"/>
  213. <Col id="eqmtcd">N01</Col>
  214. <Col id="code">1</Col>
  215. <Col id="gbn">1</Col>
  216. <Col id="cal"/>
  217. <Col id="cr"/>
  218. </Row>
  219. </Rows>
  220. </Dataset>
  221. <Dataset id="ds_main_getEqmtQcList" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_getEqmtQcList_oncolumnchanged">
  222. <ColumnInfo>
  223. <Column id="MEASUERMENTDD" type="STRING" size="256"/>
  224. </ColumnInfo>
  225. </Dataset>
  226. <Dataset id="ds_init_lb9997" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  227. <ColumnInfo>
  228. <Column id="cd" type="STRING" size="256"/>
  229. <Column id="nm" type="STRING" size="256"/>
  230. </ColumnInfo>
  231. </Dataset>
  232. <Dataset id="ds_init_lb9998" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  233. <ColumnInfo>
  234. <Column id="cd" type="STRING" size="256"/>
  235. <Column id="nm" type="STRING" size="256"/>
  236. </ColumnInfo>
  237. </Dataset>
  238. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  239. <ColumnInfo>
  240. <Column id="codeflag" type="STRING" size="256"/>
  241. <Column id="data" type="STRING" size="256"/>
  242. <Column id="basecdid" type="STRING" size="256"/>
  243. </ColumnInfo>
  244. <Rows>
  245. <Row>
  246. <Col id="codeflag"/>
  247. <Col id="data"/>
  248. </Row>
  249. </Rows>
  250. </Dataset>
  251. </Objects>
  252. <Bind>
  253. <BindItem id="item0" compid="group4.fromdd" propid="value" datasetid="ds_hidden_ref" columnid="fromdd"/>
  254. <BindItem id="item1" compid="group4.todd" propid="value" datasetid="ds_hidden_ref" columnid="todd"/>
  255. <BindItem id="item2" compid="group4.combo1" propid="value" datasetid="ds_hidden_ref" columnid="eqmtcd"/>
  256. <BindItem id="item3" compid="group4.combo2" propid="value" datasetid="ds_hidden_ref" columnid="code"/>
  257. <BindItem id="item4" compid="radio1" propid="value" datasetid="ds_hidden_ref" columnid="cr"/>
  258. <BindItem id="item5" compid="radio2" propid="value" datasetid="ds_hidden_ref" columnid="cr"/>
  259. </Bind>
  260. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  261. * System Name :
  262. * Job Name :
  263. * Creator :
  264. * Make Date : 2015-05-01
  265. * Description :
  266. *---------------------------------------------------------------------------------------
  267. * Modify Date Modifier Modify Description
  268. *---------------------------------------------------------------------------------------
  269. * 2015-05-01 Live Converter TF->XP
  270. *
  271. *---------------------------------------------------------------------------------------
  272. ****************************************************************************************/
  273. include "com_commonxp::comm_main.xjs";
  274. include "lis_commonxp::LLZ001.xjs";
  275. function SMLQP10500_oninit(obj:Form, e:InitEventInfo)
  276. {
  277. frmf_initForm(obj);
  278. }
  279. function SMLQP10500_onload(obj:Form, e:LoadEventInfo)
  280. {
  281. grdf_initGrid(datagrid2);
  282. fSetInit();
  283. }
  284. function fSetInit()
  285. {
  286. ds_send.setColumn(0, "codeflag", "9997|9998");
  287. ds_send.setColumn(0, "basecdid", "N01");
  288. var oParam = {};
  289. oParam.id = "TRLZZ00101";
  290. oParam.service = "diagtestapplib.DiagTestBaseInfoMngt";
  291. oParam.method = "reqGetInitCodeInfo";
  292. oParam.inds = "cond=ds_send";
  293. oParam.outds = "ds_init_lb9997=9997 ds_init_lb9998=9998";
  294. oParam.async = false;
  295. //oParam.callback = "cf_TRLZZ00101";
  296. tranf_submit(oParam);
  297. var toDay = utlf_getCurrentDate();
  298. ds_hidden_ref.setColumn(0, "fromdd", toDay);
  299. ds_hidden_ref.setColumn(0, "todd", toDay);
  300. fRegrid();
  301. }
  302. function fRegrid()
  303. {
  304. if(ds_hidden_ref.getColumn(0, "eqmtcd") == "N01")
  305. {
  306. if(ds_hidden_ref.getColumn(0, "code") == "1")
  307. {
  308. ds_hidden_ref.setColumn(0, "gbn", "1");
  309. }
  310. else if(ds_hidden_ref.getColumn(0, "code") == "2")
  311. {
  312. ds_hidden_ref.setColumn(0, "gbn", "2");
  313. radio1.visible = true;
  314. }
  315. else if(ds_hidden_ref.getColumn(0, "code") == "3")
  316. {
  317. ds_hidden_ref.setColumn(0, "gbn", "3");
  318. }
  319. }
  320. else if(ds_hidden_ref.getColumn(0, "eqmtcd") == "N02")
  321. {
  322. if(ds_hidden_ref.getColumn(0, "code") == "1")
  323. {
  324. ds_hidden_ref.setColumn(0, "gbn", "1");
  325. }
  326. else if(ds_hidden_ref.getColumn(0, "code") == "2")
  327. {
  328. ds_hidden_ref.setColumn(0, "gbn", "0");
  329. radio1.visible = true;
  330. }
  331. else if(ds_hidden_ref.getColumn(0, "code") == "3")
  332. {
  333. ds_hidden_ref.setColumn(0, "gbn", "3");
  334. }
  335. }
  336. else if(ds_hidden_ref.getColumn(0, "eqmtcd") == "N03")
  337. {
  338. if(ds_hidden_ref.getColumn(0, "code") == "1")
  339. {
  340. ds_hidden_ref.setColumn(0, "gbn", "4");
  341. }
  342. else if(ds_hidden_ref.getColumn(0, "code") == "2")
  343. {
  344. ds_hidden_ref.setColumn(0, "gbn", "5");
  345. radio1.visible = true;
  346. }
  347. else
  348. {
  349. ds_hidden_ref.setColumn(0, "gbn", "6");
  350. }
  351. }
  352. else
  353. {
  354. if(ds_hidden_ref.getColumn(0, "code") == "1")
  355. {
  356. ds_hidden_ref.setColumn(0, "gbn", "7");
  357. }
  358. else
  359. {
  360. ds_hidden_ref.setColumn(0, "gbn", "8");
  361. }
  362. }
  363. fReHeader();
  364. }
  365. function fReHeader()
  366. {
  367. var gbn = ds_hidden_ref.getColumn(0, "gbn");
  368. var newCap = "";
  369. if (gbn == "1")
  370. {
  371. for(var i = 1; i <= 28; i++)
  372. {
  373. datagrid2.setFormatColProperty(i, "size", 60);
  374. }
  375. datagrid2.setFormatColProperty(14, "size", 0);
  376. datagrid2.setFormatColProperty(15, "size", 0);
  377. datagrid2.setFormatColProperty(16, "size", 0);
  378. datagrid2.setFormatColProperty(17, "size", 0);
  379. datagrid2.setFormatColProperty(18, "size", 0);
  380. datagrid2.setFormatColProperty(19, "size", 0);
  381. datagrid2.setFormatColProperty(20, "size", 0);
  382. datagrid2.setFormatColProperty(21, "size", 0);
  383. datagrid2.setFormatColProperty(22, "size", 0);
  384. datagrid2.setFormatColProperty(23, "size", 0);
  385. datagrid2.setFormatColProperty(24, "size", 0);
  386. datagrid2.setFormatColProperty(25, "size", 0);
  387. datagrid2.setFormatColProperty(26, "size", 0);
  388. datagrid2.setFormatColProperty(27, "size", 0);
  389. datagrid2.setFormatColProperty(28, "size", 0);
  390. }
  391. if (gbn == "0" || gbn == "2")
  392. {
  393. for(var i = 1; i <= 28; i++)
  394. {
  395. datagrid2.setFormatColProperty(i, "size", 60);
  396. }
  397. datagrid2.setFormatColProperty(14, "size", 0);
  398. datagrid2.setFormatColProperty(15, "size", 0);
  399. datagrid2.setFormatColProperty(16, "size", 0);
  400. datagrid2.setFormatColProperty(17, "size", 0);
  401. datagrid2.setFormatColProperty(18, "size", 0);
  402. datagrid2.setFormatColProperty(19, "size", 0);
  403. datagrid2.setFormatColProperty(20, "size", 0);
  404. datagrid2.setFormatColProperty(21, "size", 0);
  405. datagrid2.setFormatColProperty(22, "size", 0);
  406. datagrid2.setFormatColProperty(23, "size", 0);
  407. datagrid2.setFormatColProperty(24, "size", 0);
  408. datagrid2.setFormatColProperty(25, "size", 0);
  409. datagrid2.setFormatColProperty(26, "size", 0);
  410. datagrid2.setFormatColProperty(27, "size", 0);
  411. datagrid2.setFormatColProperty(28, "size", 0);
  412. }
  413. if (gbn == "3")
  414. {
  415. for(var i = 1; i <= 28; i++)
  416. {
  417. datagrid2.setFormatColProperty(i, "size", 60);
  418. }
  419. datagrid2.setFormatColProperty(14, "size", 0);
  420. datagrid2.setFormatColProperty(15, "size", 0);
  421. datagrid2.setFormatColProperty(16, "size", 0);
  422. datagrid2.setFormatColProperty(17, "size", 0);
  423. datagrid2.setFormatColProperty(18, "size", 0);
  424. datagrid2.setFormatColProperty(19, "size", 0);
  425. datagrid2.setFormatColProperty(20, "size", 0);
  426. datagrid2.setFormatColProperty(21, "size", 0);
  427. datagrid2.setFormatColProperty(22, "size", 0);
  428. datagrid2.setFormatColProperty(23, "size", 0);
  429. datagrid2.setFormatColProperty(24, "size", 0);
  430. datagrid2.setFormatColProperty(25, "size", 0);
  431. datagrid2.setFormatColProperty(26, "size", 0);
  432. datagrid2.setFormatColProperty(27, "size", 0);
  433. datagrid2.setFormatColProperty(28, "size", 0);
  434. }
  435. if (gbn == "4")
  436. {
  437. for(var i = 1; i <= 28; i++)
  438. {
  439. datagrid2.setFormatColProperty(i, "size", 60);
  440. }
  441. datagrid2.setFormatColProperty(3, "size", 0);
  442. datagrid2.setFormatColProperty(19, "size", 0);
  443. datagrid2.setFormatColProperty(20, "size", 0);
  444. datagrid2.setFormatColProperty(21, "size", 0);
  445. datagrid2.setFormatColProperty(22, "size", 0);
  446. datagrid2.setFormatColProperty(23, "size", 0);
  447. datagrid2.setFormatColProperty(24, "size", 0);
  448. datagrid2.setFormatColProperty(25, "size", 0);
  449. datagrid2.setFormatColProperty(26, "size", 0);
  450. datagrid2.setFormatColProperty(27, "size", 0);
  451. datagrid2.setFormatColProperty(28, "size", 0);
  452. }
  453. if (gbn == "5")
  454. {
  455. for(var i = 1; i <= 28; i++)
  456. {
  457. datagrid2.setFormatColProperty(i, "size", 60);
  458. }
  459. datagrid2.setFormatColProperty(14, "size", 0);
  460. datagrid2.setFormatColProperty(15, "size", 0);
  461. datagrid2.setFormatColProperty(16, "size", 0);
  462. datagrid2.setFormatColProperty(17, "size", 0);
  463. datagrid2.setFormatColProperty(18, "size", 0);
  464. datagrid2.setFormatColProperty(19, "size", 0);
  465. datagrid2.setFormatColProperty(20, "size", 0);
  466. datagrid2.setFormatColProperty(21, "size", 0);
  467. datagrid2.setFormatColProperty(22, "size", 0);
  468. datagrid2.setFormatColProperty(23, "size", 0);
  469. datagrid2.setFormatColProperty(24, "size", 0);
  470. datagrid2.setFormatColProperty(25, "size", 0);
  471. datagrid2.setFormatColProperty(26, "size", 0);
  472. datagrid2.setFormatColProperty(27, "size", 0);
  473. datagrid2.setFormatColProperty(28, "size", 0);
  474. }
  475. if (gbn == "6")
  476. {
  477. for(var i = 1; i <= 28; i++)
  478. {
  479. datagrid2.setFormatColProperty(i, "size", 60);
  480. }
  481. datagrid2.setFormatColProperty(3, "size", 0);
  482. datagrid2.setFormatColProperty(19, "size", 0);
  483. datagrid2.setFormatColProperty(20, "size", 0);
  484. datagrid2.setFormatColProperty(21, "size", 0);
  485. datagrid2.setFormatColProperty(22, "size", 0);
  486. datagrid2.setFormatColProperty(23, "size", 0);
  487. datagrid2.setFormatColProperty(24, "size", 0);
  488. datagrid2.setFormatColProperty(25, "size", 0);
  489. datagrid2.setFormatColProperty(26, "size", 0);
  490. datagrid2.setFormatColProperty(27, "size", 0);
  491. datagrid2.setFormatColProperty(28, "size", 0);
  492. }
  493. if (gbn == "7")
  494. {
  495. for(var i = 1; i <= 28; i++)
  496. {
  497. datagrid2.setFormatColProperty(i, "size", 60);
  498. }
  499. datagrid2.setFormatColProperty(12, "size", 0);
  500. datagrid2.setFormatColProperty(13, "size", 0);
  501. datagrid2.setFormatColProperty(14, "size", 0);
  502. datagrid2.setFormatColProperty(15, "size", 0);
  503. datagrid2.setFormatColProperty(16, "size", 0);
  504. datagrid2.setFormatColProperty(17, "size", 0);
  505. datagrid2.setFormatColProperty(18, "size", 0);
  506. datagrid2.setFormatColProperty(19, "size", 0);
  507. datagrid2.setFormatColProperty(20, "size", 0);
  508. datagrid2.setFormatColProperty(21, "size", 0);
  509. datagrid2.setFormatColProperty(22, "size", 0);
  510. datagrid2.setFormatColProperty(23, "size", 0);
  511. datagrid2.setFormatColProperty(24, "size", 0);
  512. datagrid2.setFormatColProperty(25, "size", 0);
  513. datagrid2.setFormatColProperty(26, "size", 0);
  514. datagrid2.setFormatColProperty(27, "size", 0);
  515. datagrid2.setFormatColProperty(28, "size", 0);
  516. }
  517. }
  518. function group4_combo1_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  519. {
  520. radio1.visible = false;
  521. radio2.visible = false;
  522. inff_clearTChart(switch1.case2.object2);
  523. fSetEqmtCd();
  524. }
  525. function fSetEqmtCd()
  526. {
  527. var eqmtcd = group4.combo1.value;
  528. ds_send.setColumn(0, "basecdid", eqmtcd);
  529. ds_send.setColumn(0, "codeflag", "9998|");
  530. ds_hidden_ref.setColumn(0, "code", "1");
  531. var oParam = {};
  532. oParam.id = "TRLZZ00101";
  533. oParam.service = "diagtestapplib.DiagTestBaseInfoMngt";
  534. oParam.method = "reqGetInitCodeInfo";
  535. oParam.inds = "cond=ds_send";
  536. oParam.outds = "ds_init_lb9998=9998";
  537. oParam.async = false;
  538. //oParam.callback = "cf_TRLZZ00101";
  539. tranf_submit(oParam);
  540. fRegrid();
  541. }
  542. function group4_combo2_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  543. {
  544. radio1.visible = false;
  545. radio2.visible = false;
  546. inff_clearTChart(switch1.case2.object2);
  547. fRegrid();
  548. }
  549. function group4_button1_onclick(obj:Button, e:ClickEventInfo)
  550. {
  551. fExeEqmtList();
  552. }
  553. function fExeEqmtList()
  554. {
  555. ds_main_getEqmtQcList.clearData();
  556. var oParam = {};
  557. oParam.id = "TRLQP00801";
  558. oParam.service = "grademngtacptrsltmngtapp.QCRsltMngt";
  559. oParam.method = "getEqmtQcList";
  560. oParam.inds = "cond=ds_hidden_ref";
  561. oParam.outds = "ds_main_getEqmtQcList=getEqmtQcList";
  562. oParam.async = false;
  563. //oParam.callback = "cf_TRLQP00801";
  564. tranf_submit(oParam);
  565. fLHcheck();
  566. }
  567. function fLHcheck()
  568. {
  569. if(ds_hidden_ref.getColumn(0, "gbn") == "1")
  570. {
  571. for(var i = 0; i < ds_main_getEqmtQcList.rowcount; i++)
  572. {
  573. var low = 0;
  574. var high = 100;
  575. for(j = 4; j < 14; j++)
  576. {
  577. if(ds_main_getEqmtQcList.getColumn(i, j) > high)
  578. {
  579. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  580. {
  581. //datagrid2.cellStyle("background-color", i , j) = "#FFB6C1";
  582. }
  583. }
  584. if(ds_main_getEqmtQcList.getColumn(i, j) < low)
  585. {
  586. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  587. {
  588. //datagrid2.cellStyle("background-color", i , j) = "#5ABEF5";
  589. }
  590. }
  591. }
  592. }
  593. }
  594. else if(ds_hidden_ref.getColumn(0, "gbn") == "4")
  595. {
  596. for(var i = 0; i < ds_main_getEqmtQcList.rowcount; i++)
  597. {
  598. var low = 0;
  599. var high = 100;
  600. for(var j = 6; j < 19; j= j+3)
  601. {
  602. if(ds_main_getEqmtQcList.getColumn(i, j) > high)
  603. {
  604. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  605. {
  606. //datagrid2.cellStyle("background-color", i , j) = "#FFB6C1";
  607. }
  608. }
  609. if(ds_main_getEqmtQcList.getColumn(i, j) < low)
  610. {
  611. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  612. {
  613. //datagrid2.cellStyle("background-color", i , j) = "#5ABEF5";
  614. }
  615. }
  616. }
  617. }
  618. }
  619. else if(ds_hidden_ref.getColumn(0, "gbn") == "3")
  620. {
  621. for(var i = 0 ; i < ds_main_getEqmtQcList.rowcount; i++)
  622. {
  623. var low = 75;
  624. var high = 85;
  625. for(j = 4; j < 14; j++)
  626. {
  627. if(ds_main_getEqmtQcList.getColumn(i, j) > high)
  628. {
  629. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  630. {
  631. //datagrid2.cellStyle("background-color", i , j) = "#FFB6C1";
  632. }
  633. }
  634. if(ds_main_getEqmtQcList.getColumn(i, j) < low)
  635. {
  636. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  637. {
  638. //datagrid2.cellStyle("background-color", i , j) = "#5ABEF5";
  639. }
  640. }
  641. }
  642. }
  643. }
  644. else if(ds_hidden_ref.getColumn(0, "gbn") == "2")
  645. {
  646. for(var i = 0; i < ds_main_getEqmtQcList.rowcount; i++)
  647. {
  648. if(ds_main_getEqmtQcList.getColumn(i, "mquan") == "CRF")
  649. {
  650. var low = 0.95;
  651. var high = 1.05;
  652. for(j = 4; j < 14; j++)
  653. {
  654. if(ds_main_getEqmtQcList.getColumn(i, j) > high)
  655. {
  656. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  657. {
  658. //datagrid2.cellStyle("background-color", i , j) = "#FFB6C1";
  659. }
  660. }
  661. if(ds_main_getEqmtQcList.getColumn(i, j) < low)
  662. {
  663. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  664. {
  665. //datagrid2.cellStyle("background-color", i , j) = "#5ABEF5";
  666. }
  667. }
  668. }
  669. }
  670. else
  671. {
  672. var low = 20;
  673. var high = 34;
  674. for(var j = 4; j < 14; j++)
  675. {
  676. if(ds_main_getEqmtQcList.getColumn(i, j) > high)
  677. {
  678. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  679. {
  680. //datagrid2.cellStyle("background-color", i , j) = "#FFB6C1";
  681. }
  682. }
  683. if(ds_main_getEqmtQcList.getColumn(i, j) < low)
  684. {
  685. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  686. {
  687. //datagrid2.cellStyle("background-color", i , j) = "#5ABEF5";
  688. }
  689. }
  690. }
  691. }
  692. }
  693. }
  694. else if(ds_hidden_ref.getColumn(0, "gbn")== "5" || ds_hidden_ref.getColumn(0, "gbn") == "7" || ds_hidden_ref.getColumn(0, "gbn")== "8")
  695. {
  696. var low = 0;
  697. var high = 5;
  698. for(var i = 0; ds_main_getEqmtQcList.rowcount; i++)
  699. {
  700. if(ds_main_getEqmtQcList.getColumn(i, "cv") > high)
  701. {
  702. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, "cv")))
  703. {
  704. //datagrid2.cellStyle("background-color", i , 25) = "#FFB6C1";
  705. }
  706. if(ds_main_getEqmtQcList.getColumn(i, j) < low)
  707. {
  708. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, "cv")))
  709. {
  710. //datagrid2.cellStyle("background-color", i , j) = "#5ABEF5";
  711. }
  712. }
  713. }
  714. }
  715. }
  716. else if(ds_hidden_ref.getColumn(0, "gbn") == "0")
  717. {
  718. for(var i = 0; ds_main_getEqmtQcList.rowcount; i++)
  719. {
  720. if(ds_main_getEqmtQcList.getColumn(i, "mquan") == "Peak Deviation")
  721. {
  722. var low = -5;
  723. var high = 5;
  724. for(j = 4; j < 14; j++)
  725. {
  726. if(ds_main_getEqmtQcList.getColumn(i, j) > high)
  727. {
  728. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  729. {
  730. //datagrid2.cellStyle("background-color", i , j) = "#FFB6C1";
  731. }
  732. }
  733. if(ds_main_getEqmtQcList.getColumn(i, j) < low)
  734. {
  735. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  736. {
  737. //datagrid2.cellStyle("background-color", i , j) = "#5ABEF5";
  738. }
  739. }
  740. }
  741. }
  742. else
  743. {
  744. var low = 20;
  745. var high = 30;
  746. for(j = 4; j < 14; j++)
  747. {
  748. if(ds_main_getEqmtQcList.getColumn(i, j) > high)
  749. {
  750. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  751. {
  752. //datagrid2.cellStyle("background-color", i , j) = "#FFB6C1";
  753. }
  754. }
  755. if(ds_main_getEqmtQcList.getColumn(i, j) < low)
  756. {
  757. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  758. {
  759. //datagrid2.cellStyle("background-color", i , j) = "#5ABEF5";
  760. }
  761. }
  762. }
  763. }
  764. }
  765. }
  766. else
  767. {
  768. for(vari = 0; i < ds_main_getEqmtQcList.rowcount; i++)
  769. {
  770. var low = parseFloat(ds_main_getEqmtQcList.getColumn(i, "low"));
  771. var high = parseFloat(ds_main_getEqmtQcList.getColumn(i, "high"));
  772. for(j = 5; j < 14; j = j+2)
  773. {
  774. if(ds_main_getEqmtQcList.getColumn(i, j) > high)
  775. {
  776. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  777. {
  778. //datagrid2.cellStyle("background-color", i , j) = "#FFB6C1";
  779. }
  780. }
  781. if(ds_main_getEqmtQcList.getColumn(i, j) < low)
  782. {
  783. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(i, j)))
  784. {
  785. //datagrid2.cellStyle("background-color", i , j) = "#5ABEF5";
  786. }
  787. }
  788. }
  789. }
  790. }
  791. }
  792. function radio1_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  793. {
  794. if(ds_hidden_ref.getColumn(0, "gbn")== "2")
  795. {
  796. for(var i = 0; i < ds_main_getEqmtQcList.rowcount; i++)
  797. {
  798. ds_main_getEqmtQcList.setColumn(i, "chk", "N");
  799. if(ds_main_getEqmtQcList.getColumn(i, "mquan") == "CRF")
  800. {
  801. if(ds_hidden_ref.getColumn(0, "cr") == "1")
  802. {
  803. ds_main_getEqmtQcList.setColumn(i, "chk", "Y");
  804. }
  805. }
  806. else
  807. {
  808. if(ds_hidden_ref.getColumn(0, "cr") == "2")
  809. {
  810. ds_main_getEqmtQcList.setColumn(i, "chk", "Y");
  811. }
  812. }
  813. }
  814. }
  815. }
  816. function radio2_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  817. {
  818. if(ds_hidden_ref.getColumn(0, "gbn") == "0")
  819. {
  820. for(var i = 0; i < ds_main_getEqmtQcList.rowcount; i++)
  821. {
  822. ds_main_getEqmtQcList.setColumn(i, "chk", "N");
  823. if(ds_main_getEqmtQcList.getColumn(i, "mquan") == "Peak Deviation")
  824. {
  825. if(ds_hidden_ref.getColumn(0, "cr") == "3")
  826. {
  827. ds_main_getEqmtQcList.setColumn(i, "chk", "Y");
  828. }
  829. }
  830. else
  831. {
  832. if(ds_hidden_ref.getColumn(0, "cr") == "4")
  833. {
  834. ds_main_getEqmtQcList.setColumn(i, "chk", "Y");
  835. }
  836. }
  837. }
  838. }
  839. }
  840. function button3_onclick(obj:Button, e:ClickEventInfo)
  841. {
  842. fInsRowAdd();
  843. }
  844. function button4_onclick(obj:Button, e:ClickEventInfo)
  845. {
  846. fInsRowdel();
  847. }
  848. function button6_onclick(obj:Button, e:ClickEventInfo)
  849. {
  850. grdf_exportExcel(datagrid2, "", "", false, "", "", false);
  851. }
  852. function fInsRowAdd()
  853. {
  854. var gbn = ds_hidden_ref.getColumn(0, "gbn");
  855. if (gbn == "1")
  856. {
  857. var row = ds_main_getEqmtQcList.addRow();
  858. var tDay = utlf_getCurrentDate();
  859. ds_main_getEqmtQcList.setColumn(row, "mquan", "cpm");
  860. ds_main_getEqmtQcList.setColumn(row, "chk", "N");
  861. ds_main_getEqmtQcList.setColumn(row, "mdd", tDay);
  862. ds_main_getEqmtQcList.setColumn(row, "eqmtcd", ds_hidden_ref.getColumn(0, "eqmtcd"));
  863. ds_main_getEqmtQcList.setColumn(row, "gbn", ds_hidden_ref.getColumn(0, "gbn"));
  864. }
  865. else if (gbn == "3")
  866. {
  867. var row = ds_main_getEqmtQcList.addRow();
  868. ds_main_getEqmtQcList.setColumn(row, "mquan", "%EFF");
  869. var tDay = utlf_getCurrentDate();
  870. ds_main_getEqmtQcList.setColumn(row, "chk", "N");
  871. ds_main_getEqmtQcList.setColumn(row, "mdd", tDay);
  872. ds_main_getEqmtQcList.setColumn(row, "eqmtcd", ds_hidden_ref.getColumn(0, "eqmtcd"));
  873. ds_main_getEqmtQcList.setColumn(row, "gbn", ds_hidden_ref.getColumn(0, "gbn"));
  874. }
  875. else if (gbn == "5" || gbn == "7" || gbn == "8")
  876. {
  877. var row = ds_main_getEqmtQcList.addRow();
  878. var tDay = utlf_getCurrentDate();
  879. ds_main_getEqmtQcList.setColumn(row, "mquan", "cpm");
  880. ds_main_getEqmtQcList.setColumn(row, "chk", "N");
  881. ds_main_getEqmtQcList.setColumn(row, "mdd", tDay);
  882. ds_main_getEqmtQcList.setColumn(row, "eqmtcd", ds_hidden_ref.getColumn(0, "eqmtcd"));
  883. ds_main_getEqmtQcList.setColumn(row, "gbn", ds_hidden_ref.getColumn(0, "gbn"));
  884. }
  885. else if (gbn == "4" || gbn == "6")
  886. {
  887. var row = ds_main_getEqmtQcList.addRow();
  888. var tDay = utlf_getCurrentDate();
  889. ds_main_getEqmtQcList.setColumn(row, "mquan", "cpm");
  890. ds_main_getEqmtQcList.setColumn(row, "chk", "N");
  891. ds_main_getEqmtQcList.setColumn(row, "mdd", tDay);
  892. ds_main_getEqmtQcList.setColumn(row, "eqmtcd", ds_hidden_ref.getColumn(0, "eqmtcd"));
  893. ds_main_getEqmtQcList.setColumn(row, "gbn", ds_hidden_ref.getColumn(0, "gbn"));
  894. }
  895. else if (gbn == "2")
  896. {
  897. var row = ds_main_getEqmtQcList.addRow();
  898. var tDay = utlf_getCurrentDate();
  899. ds_main_getEqmtQcList.setColumn(row, "eqmtcd", ds_hidden_ref.getColumn(0, "eqmtcd"));
  900. ds_main_getEqmtQcList.setColumn(row, "gbn", ds_hidden_ref.getColumn(0, "gbn"));
  901. ds_main_getEqmtQcList.setColumn(row, "chk", "N");
  902. ds_main_getEqmtQcList.setColumn(row, "mquan", "CRF");
  903. var tDay = utlf_getCurrentDate();
  904. ds_main_getEqmtQcList.setColumn(row, "mdd", tDay);
  905. row = ds_main_getEqmtQcList.addRow();
  906. ds_main_getEqmtQcList.setColumn(row, "eqmtcd", ds_hidden_ref.getColumn(0, "eqmtcd"));
  907. ds_main_getEqmtQcList.setColumn(row, "gbn", ds_hidden_ref.getColumn(0, "gbn"));
  908. ds_main_getEqmtQcList.setColumn(row, "chk", "N");
  909. ds_main_getEqmtQcList.setColumn(row, "mquan", "Resolution");
  910. var tDay = utlf_getCurrentDate();
  911. ds_main_getEqmtQcList.setColumn(row, "mdd", tDay);
  912. }
  913. else if (gbn == "0")
  914. {
  915. var row = ds_main_getEqmtQcList.addRow();
  916. ds_main_getEqmtQcList.setColumn(row, "eqmtcd", ds_hidden_ref.getColumn(0, "eqmtcd"));
  917. ds_main_getEqmtQcList.setColumn(row, "gbn", ds_hidden_ref.getColumn(0, "gbn"));
  918. ds_main_getEqmtQcList.setColumn(row, "chk", "N");
  919. ds_main_getEqmtQcList.setColumn(row, "mquan", "Peak Deviation");
  920. var tDay = utlf_getCurrentDate();
  921. ds_main_getEqmtQcList.setColumn(row, "mdd", tDay);
  922. var row = ds_main_getEqmtQcList.addRow();
  923. ds_main_getEqmtQcList.setColumn(row, "eqmtcd", ds_hidden_ref.getColumn(0, "eqmtcd"));
  924. ds_main_getEqmtQcList.setColumn(row, "gbn", ds_hidden_ref.getColumn(0, "gbn"));
  925. ds_main_getEqmtQcList.setColumn(row, "chk", "N");
  926. ds_main_getEqmtQcList.setColumn(row, "mquan", "Resolution");
  927. var tDay = utlf_getCurrentDate();
  928. ds_main_getEqmtQcList.setColumn(row, "mdd", tDay);
  929. }
  930. }
  931. function fInsRowdel()
  932. {
  933. if(sysf_messageBox("", "Q001")==6)
  934. {
  935. var row = ds_main_getEqmtQcList.rowposition;
  936. ds_main_getEqmtQcList.updatecontrol = false;
  937. ds_main_getEqmtQcList.setRowType(row, "d");
  938. ds_main_getEqmtQcList.updatecontrol = true;
  939. }
  940. else
  941. {
  942. return;
  943. }
  944. }
  945. function ds_main_getEqmtQcList_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  946. {
  947. if(e.columnid == "chk")
  948. {
  949. obj.setColumn(e.row, "chk", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
  950. }
  951. if(e.col >= 4)
  952. {
  953. fSetRef();
  954. }
  955. }
  956. function fSetRef()
  957. {
  958. var gbn = ds_hidden_ref.getColumn(0, "gbn");
  959. var inptcnt = 0; // 결과값 col 수
  960. var inptsum = 0; // 결과값 sum
  961. var inptsd = 0; //결과값표준편차
  962. var ext = Math.pow(10, 2);
  963. if(gbn == "4")
  964. {
  965. var d1 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d1"));
  966. var d2 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d2"));
  967. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d1")) && !utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d2")))
  968. {
  969. var d3 = (d1 + d2) / 2;
  970. d3 = Math.round(d3 * ext) / ext;;
  971. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "d3", d3);
  972. }
  973. var d4 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d4"));
  974. var d5 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d5"));
  975. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d4")) && !utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d5")))
  976. {
  977. var d6 = (d4 + d5) / 2;
  978. d6 = Math.round(d6 * ext) / ext;
  979. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "d6", d6);
  980. }
  981. var d7 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d7"));
  982. var d8 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d8"));
  983. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d7")) && !utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d8")))
  984. {
  985. var d9 = (d7 + d8) / 2;
  986. d9 = Math.round(d9 * ext) / ext;;
  987. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "d9", d9);
  988. }
  989. var d10 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d10"));
  990. var d11 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d11"));
  991. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d10")) && !utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d11")))
  992. {
  993. var d12 = (d10 + d11) / 2;
  994. d12 = Math.round(d12 * ext) / ext;
  995. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "d12", d12);
  996. }
  997. var d13 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d13"));
  998. var d14 = parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d14"));
  999. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d13")) && !utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d14")))
  1000. {
  1001. var d15 = (d13 + d14) / 2;
  1002. d15 = Math.round(d15 * ext) / ext;
  1003. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "d15", d15);
  1004. }
  1005. }
  1006. if(gbn == "5" || gbn == "7" || gbn == "8")
  1007. {
  1008. var cal = 0;
  1009. var inptsd2 = 0;
  1010. var inptsd3 = 0;
  1011. if(gbn = "5")
  1012. { // 평균
  1013. for(var i = 1; i < 11; i++)
  1014. {
  1015. cal = ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d"+i);
  1016. if(!utlf_isNull(cal))
  1017. {
  1018. inptcnt = inptcnt + 1; // 결과값 들어있는 칸 수
  1019. inptsum += parseFloat(cal); // 결과값 sum
  1020. avg = inptsum/inptcnt;
  1021. }
  1022. }
  1023. }
  1024. else
  1025. {
  1026. for(var i = 1; i < 9; i++)
  1027. {
  1028. cal = ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d"+i);
  1029. if(!utlf_isNull(cal))
  1030. {
  1031. inptcnt = inptcnt + 1; // 결과값 들어있는 칸 수
  1032. inptsum += parseFloat(cal); // 결과값 sum
  1033. avg = inptsum/inptcnt;
  1034. }
  1035. }
  1036. }
  1037. if(gbn = "5")
  1038. {
  1039. for(var i=1; i < 11; i++)
  1040. {
  1041. cal = ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d"+i);
  1042. if(!utlf_isNull(cal))
  1043. {
  1044. inptsd = parseFloat(cal)- parseFloat(avg);
  1045. inptsd2 = inptsd * inptsd;
  1046. inptsd3 += inptsd2;
  1047. }
  1048. }
  1049. }
  1050. else
  1051. {
  1052. for(var i=1; i < 9; i++)
  1053. {
  1054. cal = ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d"+i);
  1055. if(!utlf_isNull(cal))
  1056. {
  1057. inptsd = parseFloat(cal)- parseFloat(avg);
  1058. inptsd2 = inptsd * inptsd;
  1059. inptsd3 += inptsd2;
  1060. }
  1061. }
  1062. }
  1063. avg2 = Math.round(avg * ext) / ext;
  1064. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "avg", avg2)
  1065. ssd = inptsd3 / inptcnt;
  1066. sd = Math.sqrt(ssd);
  1067. sd = Math.round(sd * ext) / ext;
  1068. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "sd", sd);
  1069. var cv = sd / avg * 100;
  1070. cv = Math.round(cv * ext) / ext;
  1071. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "cv", cv);
  1072. }
  1073. if(gbn == "6")
  1074. {
  1075. for(var i=1; i < 11; i = i+2)
  1076. {
  1077. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d"+i)))
  1078. {
  1079. inptcnt = inptcnt + 1; // 결과값 들어있는 칸 수
  1080. inptsum += parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d"+i));
  1081. }
  1082. }
  1083. if(inptcnt > 0)
  1084. {
  1085. var avg = inptsum / inptcnt ; // 평균
  1086. avg = Math.round(avg * ext) / ext;
  1087. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "avg", avg);
  1088. }
  1089. var inptsum2 = 0;
  1090. var inptcnt2 = 0;
  1091. for(var i=2; i < 11; i = i+2)
  1092. {
  1093. if(!utlf_isNull(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition)))
  1094. {
  1095. inptcnt2 = inptcnt2 + 1; // 결과값 들어있는 칸 수
  1096. inptsum2 += parseFloat(ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "d"+i));
  1097. }
  1098. }
  1099. if(inptcnt2 > 0)
  1100. {
  1101. var avg2 = inptsum2 / inptcnt2 ; // 평균
  1102. var high = avg2 + (avg2 * 0.25);
  1103. var low = avg2 - (avg2 * 0.25);
  1104. avg2 = Math.round(avg2 * ext) / ext;;
  1105. high = Math.round(high * ext) / ext;;
  1106. low = Math.round(low * ext) / ext;;
  1107. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "avg2", avg2);
  1108. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "low", low);
  1109. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "high", high);
  1110. }
  1111. }
  1112. }
  1113. function datagrid2_oncellclick(obj:Grid, e:GridClickEventInfo)
  1114. {
  1115. if(ds_hidden_ref.getColumn(0, "gbn") == "2" || ds_hidden_ref.getColumn(0, "gbn") == "0")
  1116. {
  1117. if(e.col == 1)
  1118. {
  1119. var chk1, chk2;
  1120. if(e.row == 1)
  1121. {
  1122. chk1 = ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "chk");
  1123. chk2 = ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition+1, "chk");
  1124. }
  1125. else
  1126. {
  1127. chk1 = ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition, "chk");
  1128. chk2 = ds_main_getEqmtQcList.getColumn(ds_main_getEqmtQcList.rowposition-1, "chk");
  1129. }
  1130. if(chk1 == "Y")
  1131. {
  1132. if(chk1 == chk2)
  1133. {
  1134. alert("다른 항목은 선택할수 없습니다.");
  1135. ds_main_getEqmtQcList.setColumn(ds_main_getEqmtQcList.rowposition, "chk", "N");
  1136. }
  1137. }
  1138. }
  1139. }
  1140. }
  1141. function datagrid2_onkeydown(obj:Grid, e:KeyEventInfo)
  1142. {
  1143. if(e.keycode == 13)
  1144. {
  1145. if(obj.currentcol >= 3)
  1146. {
  1147. fGrdKeyEvent(e.row, obj.currentcol);
  1148. }
  1149. }
  1150. }
  1151. function fGrdKeyEvent(row, col)
  1152. {
  1153. if(ds_hidden_ref.getColumn(0, "gbn")== "6")
  1154. {
  1155. if(col=="13")
  1156. {
  1157. col += 10;
  1158. }
  1159. else
  1160. {
  1161. col = col + 1
  1162. if(col=="24")
  1163. {
  1164. col = 4;
  1165. row += 1;
  1166. }
  1167. }
  1168. }
  1169. else if(ds_hidden_ref.getColumn(0, "gbn")== "4")
  1170. {
  1171. if(col=="5" || col=="8" || col=="11" || col=="14" || col=="17")
  1172. {
  1173. col = col + 2 ;
  1174. if(col=="19")
  1175. {
  1176. col = 4;
  1177. row += 1;
  1178. }
  1179. }
  1180. else
  1181. {
  1182. col = col + 1 ;
  1183. }
  1184. }
  1185. else if(ds_hidden_ref.getColumn(0, "gbn")== "2")
  1186. {
  1187. if(col=="13")
  1188. {
  1189. col -= 9;
  1190. row += 1;
  1191. }
  1192. else
  1193. {
  1194. col = col + 1 ;
  1195. }
  1196. }
  1197. else if(ds_hidden_ref.getColumn(0, "gbn")== "7" || ds_hidden_ref.getColumn(0, "gbn")== "8")
  1198. {
  1199. col = col + 1 ;
  1200. if(col=="12")
  1201. {
  1202. col = 3;
  1203. row += 1;
  1204. }
  1205. }
  1206. else if(ds_hidden_ref.getColumn(0, "gbn")== "5")
  1207. {
  1208. col = col + 1 ;
  1209. if(col=="14")
  1210. {
  1211. col = 3;
  1212. row += 1;
  1213. }
  1214. }
  1215. else
  1216. {
  1217. col = col + 1 ;
  1218. if(col=="14")
  1219. {
  1220. col = 4;
  1221. row += 1;
  1222. }
  1223. }
  1224. }
  1225. function btn_grp_onclick(obj:Button, e:ClickEventInfo)
  1226. {
  1227. var rows = ds_main_getEqmtQcList.rowcount;
  1228. var cnt = 0;
  1229. var gbn = ds_hidden_ref.getColumn(0, "gbn");
  1230. if(rows == 0)
  1231. {
  1232. alert("데이터가 없습니다.")
  1233. return;
  1234. }
  1235. for(var i = 0; i < rows; i++)
  1236. {
  1237. if(ds_main_getEqmtQcList.getColumn(i, "chk") == "Y")
  1238. {
  1239. cnt = cnt + 1; // 결과값 들어있는 칸 수
  1240. }
  1241. }
  1242. if(cnt < 1)
  1243. {
  1244. alert("그래프를 작성할 항목을 선택하세요");
  1245. return;
  1246. }
  1247. else
  1248. {
  1249. switch1.tabindex = 1;
  1250. object2.Tools.Clear();
  1251. object2.Axis.RemoveAllCustom();
  1252. object2.Axis.Left.StartPosition = 0;
  1253. inff_clearTChart(switch1.case2.object2); //챠트 초기화
  1254. fInitChart(cnt, gbn);
  1255. }
  1256. }
  1257. function fInitChart(cnt, gbn)
  1258. {
  1259. var cnt = cnt;
  1260. var gbn = gbn;
  1261. var sCol = 4;
  1262. var eCols = 18;
  1263. if(cnt == 0)
  1264. {
  1265. alert("그래프를 작성할 항목을 선택하세요");
  1266. return;
  1267. }
  1268. else if(cnt ==1)
  1269. {
  1270. var vEnd = 0;
  1271. var chkrow = datagrid2.findRow("Y", 1, 1);
  1272. for(i = sCol; i <= eCols; i++)
  1273. {
  1274. var x = datagrid2.valueMatrix(chkrow, i);
  1275. if(!utlf_isNull(x))
  1276. {
  1277. vEnd += 1;
  1278. }
  1279. }
  1280. var v1SDH = vAvg + vSD;
  1281. var v2SDH = vAvg + vSD*2;
  1282. var v3SDH = vAvg + vSD*3;
  1283. var v4SDH = vAvg + vSD*4;
  1284. var v1SDL = vAvg - vSD;
  1285. var v2SDL = vAvg - vSD*2;
  1286. var v3SDL = vAvg - vSD*3;
  1287. var v4SDL = vAvg - vSD*4;
  1288. }
  1289. else
  1290. {
  1291. var vEnd;
  1292. }
  1293. var Obj_Chart = object2;
  1294. var vStart = 0; //시리즈 번호
  1295. Obj_Chart.Aspect.View3D = 0; // 2d 로 표현하기
  1296. Obj_Chart.Zoom.Enable = false; // zoom 사용하지 않기
  1297. Obj_Chart.Scroll.Enable = 2;
  1298. Obj_Chart.Environment.MouseWheelScroll = false;
  1299. Obj_Chart.Legend.Visible = false; // 그래프 참조 박스 띄우지 않기
  1300. Obj_Chart.Panel.Gradient.Visible = true; // 페널에 그라디언트 적용
  1301. Obj_Chart.Panel.Gradient.StartColor = 0xffffff;
  1302. Obj_Chart.Panel.Gradient.EndColor=0xffffff;
  1303. Obj_Chart.Legend.Visible = true; //범례표시 여부
  1304. Obj_Chart.Legend.Alignment = 3; // Legend 위치 설정 :: 0 = left | 1 = right | 2 = top| 3 = bottom
  1305. Obj_Chart.Legend.CheckBoxes = false; //범례 체크박스
  1306. Obj_Chart.RemoveAllSeries();
  1307. Obj_Chart.Axis.RemoveAllCustom();
  1308. //margin 값 정하기
  1309. Obj_Chart.Panel.MarginTop = 4;
  1310. Obj_Chart.Panel.MarginLeft = 2;
  1311. Obj_Chart.Panel.MarginRight = 4;
  1312. Obj_Chart.Panel.MarginBottom = 2;
  1313. Obj_Chart.Header.Visible = false;
  1314. Obj_Chart.Axis.Left.Labels.Style = 2;
  1315. Obj_Chart.Axis.Right.Labels.Style = 1;
  1316. Obj_Chart.Axis.Bottom.Labels.Style = 4; // 0:auto or value, 1:No, 2 :민 맥스, 3: marks style, 4:text
  1317. if(gbn == "5" || gbn == "7" || gbn == "8")
  1318. {
  1319. Obj_Chart.Axis.Bottom.Labels.Angle = 90;
  1320. }
  1321. else
  1322. {
  1323. Obj_Chart.Axis.Bottom.Labels.Angle = 0;
  1324. }
  1325. Obj_Chart.Axis.Bottom.Labels.Size = 95; //하단 라벨의 사이즈 조치사항 추가하면서 자동으로 늘어나서 추가함
  1326. if (gbn == "1" || gbn == "4")
  1327. {
  1328. Obj_Chart.Axis.Left.Title.Caption = "( cpm )";
  1329. }
  1330. else if (gbn == "3")
  1331. {
  1332. Obj_Chart.Axis.Left.Title.Caption = "( %EFF )";
  1333. }
  1334. else
  1335. {
  1336. Obj_Chart.Axis.Left.Title.Caption = "";
  1337. }
  1338. Obj_Chart.Axis.Left.Automatic = true;
  1339. //날짜그래프
  1340. Obj_Chart.AddSeries(0); //asLine
  1341. Obj_Chart.Series(0).asLine.LinePen.Width = 1; //펜 두께
  1342. Obj_Chart.Series(0).asLine.Pointer.Visible = false; //값에 대한 포인터
  1343. Obj_Chart.Series(0).ShowInLegend = false;
  1344. var find, row, tmp;
  1345. var findRows = "";
  1346. var CRFYN = "";
  1347. var PeakYN = "";
  1348. for(var r = 0; r < ds_main_getEqmtQcList.rowcount; r++)
  1349. {
  1350. if(ds_main_getEqmtQcList.getColumn(r, "chk") == "Y")
  1351. {
  1352. findRows = findRows + r + "▦";
  1353. if(ds_main_getEqmtQcList.getColumn(r, "mquan") == "CRF")
  1354. {
  1355. CRFYN = "Y";
  1356. }
  1357. else
  1358. {
  1359. CRFYN = "N";
  1360. }
  1361. if(ds_main_getEqmtQcList.getColumn(r, "mquan") == "Resolution")
  1362. {
  1363. PeakYN = "N";
  1364. }
  1365. else
  1366. {
  1367. PeakYN = "Y";
  1368. }
  1369. }
  1370. }
  1371. row = findRows.substr(0, findRows.length-1).split("▦"); //체크된 항목의 row▦row...
  1372. if(row.length == 1)
  1373. {
  1374. if(gbn == "1")
  1375. {
  1376. var vAvg = 50;
  1377. var vSD = 25;
  1378. vLow = 0;
  1379. vHigh = 100;
  1380. }
  1381. else if(gbn == "0")
  1382. {
  1383. if(PeakYN == "Y")
  1384. {
  1385. var vAvg = 0;
  1386. var vSD = 10;
  1387. vLow = -5;
  1388. vHigh = 5;
  1389. }
  1390. else if(PeakYN == "N")
  1391. {
  1392. var vAvg = 25;
  1393. var vSD = 10;
  1394. vLow = 20;
  1395. vHigh = 30;
  1396. }
  1397. }
  1398. else if(gbn == "2")
  1399. {
  1400. if(CRFYN == "Y")
  1401. {
  1402. var vAvg = 1;
  1403. var vSD = 0.2;
  1404. vLow = 0.95;
  1405. vHigh = 1.05;
  1406. }
  1407. else if(CRFYN == "N")
  1408. {
  1409. var vAvg = 27;
  1410. var vSD = 10;
  1411. vLow = 20;
  1412. vHigh = 34;
  1413. }
  1414. }
  1415. else if(gbn == "3")
  1416. {
  1417. var vAvg = 80;
  1418. var vSD = 20;
  1419. vLow = 75;
  1420. vHigh = 85;
  1421. }
  1422. else if(gbn == "4")
  1423. {
  1424. var vAvg = 50;
  1425. var vSD = 25;
  1426. vLow = 0;
  1427. vHigh = 100;
  1428. }
  1429. else if(gbn == "6")
  1430. {
  1431. var vAvg = 130;
  1432. var vSD = 20;
  1433. vLow = 110;
  1434. vHigh = 150;
  1435. }
  1436. else
  1437. {
  1438. var vAvg = 2.5;
  1439. var vSD = 10;
  1440. vLow = 0;
  1441. vHigh = 5;
  1442. }
  1443. fMakeLineLH(vAvg, vHigh, vLow, vStart, vEnd, gbn);
  1444. }
  1445. else
  1446. {
  1447. if(gbn == "1")
  1448. {
  1449. var vAvg = 50;
  1450. var vSD = 20;
  1451. vLow = 0;
  1452. vHigh = 100;
  1453. }
  1454. else if(gbn == "0")
  1455. {
  1456. if(PeakYN == "Y")
  1457. {
  1458. var vAvg = 0;
  1459. var vSD = 2;
  1460. vLow = -5;
  1461. vHigh = 5;
  1462. }
  1463. else if(PeakYN == "N")
  1464. {
  1465. var vAvg = 25;
  1466. var vSD = 10;
  1467. vLow = 20;
  1468. vHigh = 30;
  1469. }
  1470. }
  1471. else if(gbn == "2")
  1472. {
  1473. if(CRFYN == "Y")
  1474. {
  1475. var vAvg = 1;
  1476. var vSD = 0.2;
  1477. vLow = 0.95;
  1478. vHigh = 1.05;
  1479. }
  1480. else if(CRFYN == "N")
  1481. {
  1482. var vAvg = 27;
  1483. var vSD = 10;
  1484. vLow = 20;
  1485. vHigh = 34;
  1486. }
  1487. }
  1488. else if(gbn == "3")
  1489. {
  1490. var vAvg = 80;
  1491. var vSD = 20;
  1492. vLow = 75;
  1493. vHigh = 85;
  1494. }
  1495. else if(gbn == "4")
  1496. {
  1497. var vAvg = 50;
  1498. var vSD = 20;
  1499. vLow = 0;
  1500. vHigh = 100;
  1501. }
  1502. else if(gbn == "6")
  1503. {
  1504. var vAvg = 130;
  1505. var vSD = 20;
  1506. vLow = 110;
  1507. vHigh = 150;
  1508. }
  1509. else
  1510. {
  1511. var vAvg = 2.5;
  1512. var vSD = 10;
  1513. vLow = 0;
  1514. vHigh = 5;
  1515. }
  1516. for(i = 0; i < row.length; i++)
  1517. {
  1518. tmp = 0;
  1519. vEnd = 0; //각 검사항목의 라인 끝점
  1520. for(j = sCol; j <= eCols; j++)
  1521. { //4번째 컬럼부터 column0~ 시작
  1522. x = datagrid2.valueMatrix(row[i], j);
  1523. if(x != "")
  1524. {
  1525. vEnd += 1; //결과 값이 있다면 1씩 더해
  1526. if(tmp == 0)
  1527. {
  1528. vStart = j - sCol; //라인의 시작점
  1529. }
  1530. tmp++;
  1531. }
  1532. }
  1533. fMakeLineLH(vAvg, vHigh, vLow, vStart, vEnd, gbn);
  1534. }
  1535. }
  1536. fMakeChartOrgRslt(row, gbn, vAvg, vSD, sCol, eCols, vStart, vEnd, vHigh, vLow);
  1537. }
  1538. function button7_onclick(obj:Button, e:ClickEventInfo)
  1539. {
  1540. inff_clearTChart(switch1.case2.object2);
  1541. }
  1542. function btn_grprnt_onclick(obj:Button, e:ClickEventInfo)
  1543. {
  1544. Obj_Chart = switch1.case2.object2;
  1545. Obj_Chart.Printer.MarginLeft = 5 //여백
  1546. Obj_Chart.Printer.MarginBottom = 25
  1547. Obj_Chart.Printer.MarginRight = 5
  1548. Obj_Chart.Printer.MarginTop = 25
  1549. Obj_Chart.Printer.ShowPreview();
  1550. }
  1551. function button11_onclick(obj:Button, e:ClickEventInfo)
  1552. {
  1553. var Obj_Chart;
  1554. Obj_Chart = switch1.case2.object2;
  1555. Obj_Chart.Export.SaveChartDialog();
  1556. }
  1557. function switch1_case2_object2_OnClick(obj:ActiveX)
  1558. {
  1559. switch1.case2.object2.Tools.Clear()
  1560. switch1.case2.object2.Tools.Add(10)
  1561. switch1.case2.object2.Tools.Items(0).asAnnotation.Text = switch1.case2.object2.Series(SeriesIndex).PointLabel(ValueIndex)
  1562. }
  1563. function button5_onclick(obj:Button, e:ClickEventInfo)
  1564. {
  1565. fSetList();
  1566. }
  1567. function fSetList()
  1568. {
  1569. if(sysf_messageBox("", "Q002")==6)
  1570. {
  1571. if(grdf_getGridUpdateData(datagrid2).rowcount == 0)
  1572. {
  1573. alert("저장할 자료가 존재하지 않습니다.");
  1574. return;
  1575. }
  1576. fcheckNull();
  1577. var row = ds_main_getEqmtQcList.rowposition;
  1578. for(var i = 0; i < ds_main_getEqmtQcList.rowcount; i++)
  1579. {
  1580. ds_main_getEqmtQcList.setColumn(i, "MEASUERMENTDD", ds_main_getEqmtQcList.getColumn(i, "mdd"));
  1581. }
  1582. var oParam = {};
  1583. oParam.id = "TXLQJ00302";
  1584. oParam.service = "grademngtacptrsltmngtapp.QCRsltMngt";
  1585. oParam.method = "reqQcsave";
  1586. oParam.inds = "cond=ds_main_getEqmtQcList:U";
  1587. oParam.async = false;
  1588. //oParam.callback = "cf_TXLQJ00302";
  1589. tranf_submit(oParam);
  1590. fExeEqmtList();
  1591. }
  1592. }
  1593. function fcheckNull()
  1594. {
  1595. for(var row = 0; row < ds_main_getEqmtQcList.rowcount; row++)
  1596. {
  1597. for(i=1; i < 16; i++)
  1598. {
  1599. if(utlf_isNull(ds_main_getEqmtQcList.getColumn(row, "d"+i)))
  1600. {
  1601. ds_main_getEqmtQcList.setColumn(row, "d"+i, "-");
  1602. }
  1603. if(utlf_isNull(ds_main_getEqmtQcList.getColumn(row, "mquan")))
  1604. {
  1605. ds_main_getEqmtQcList.setColumn(row, "mquan", "-");
  1606. }
  1607. if(utlf_isNull(ds_main_getEqmtQcList.getColumn(row, "avg")))
  1608. {
  1609. ds_main_getEqmtQcList.setColumn(row, "avg", "-");
  1610. }
  1611. if(utlf_isNull(ds_main_getEqmtQcList.getColumn(row, "avg2")))
  1612. {
  1613. ds_main_getEqmtQcList.setColumn(row, "avg2", "-");
  1614. }
  1615. if(utlf_isNull(ds_main_getEqmtQcList.getColumn(row, "low")))
  1616. {
  1617. ds_main_getEqmtQcList.setColumn(row, "low", "-");
  1618. }
  1619. if(utlf_isNull(ds_main_getEqmtQcList.getColumn(row, "high")))
  1620. {
  1621. ds_main_getEqmtQcList.setColumn(row, "high", "-");
  1622. }
  1623. if(utlf_isNull(ds_main_getEqmtQcList.getColumn(row, "hv")))
  1624. {
  1625. ds_main_getEqmtQcList.setColumn(row, "hv", "-");
  1626. }
  1627. if(utlf_isNull(ds_main_getEqmtQcList.getColumn(row, "sd")))
  1628. {
  1629. ds_main_getEqmtQcList.setColumn(row, "sd", "-");
  1630. }
  1631. if(utlf_isNull(ds_main_getEqmtQcList.getColumn(row, "cv")))
  1632. {
  1633. ds_main_getEqmtQcList.setColumn(row, "cv", "-");
  1634. }
  1635. }
  1636. }
  1637. }
  1638. function button10_onclick(obj:Button, e:ClickEventInfo)
  1639. {
  1640. this.reload();
  1641. }
  1642. ]]></Script>
  1643. </Form>
  1644. </FDL>