widana

Untitled

Mar 13th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.46 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
  4. xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui"
  5. xmlns:j="http://jleaf.org/faces" xmlns:jl="http://java.sun.com/jsf/composite/jlcomponents"
  6. xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:autonum="http://java.sun.com/jsf/composite/autonum">
  7.  
  8. <ui:composition template="/WEB-INF/layouts/base.xhtml">
  9. <ui:define name="headPart">
  10. <j:lang id="lang" prefix="org.jleaf.erp.sls.web" />
  11. <title>#{piece['pos']}</title>
  12. <j:authorize task="reportSalesSummary">
  13. <script>
  14. $(document).ready(function() {
  15. doSelectOu();
  16. });
  17. </script>
  18. </j:authorize>
  19. <link href="${request.contextPath}/jleaf.resource/org/jleaf/erp/fin/web/resources/css/style.css" type="text/css"
  20. rel="stylesheet" />
  21. <title>#{piece['pos']}</title>
  22. </ui:define>
  23.  
  24. <ui:define name="contentPart">
  25.  
  26. <input type="hidden" value="#{pointOfSalesController}" />
  27.  
  28. <div class="page_title">
  29. <span>#{piece['pos']}</span>
  30. </div>
  31.  
  32. <p:panel>
  33. <p:remoteCommand name="doSelectOu"
  34. process=":rootform:comboOu"
  35. actionListener="#{createDkbExternalController.onOuChanged}"
  36. update="@this,:rootform:comboEvent:comboEvent " />
  37. <j:authorize task="reportSalesSummary" forbidden="true">
  38. <p:messages id="messages" />
  39. <h:panelGrid id="panelSearch">
  40. <h:panelGrid columns="3">
  41. <h:outputText value="#{piece['ouBuOrBranch']}" />
  42. <h:outputText value="#{piece['eventCodeName']}" />
  43. <h:outputText value="#{piece['docNo']}" />
  44. <jl:comboBox id="comboOu" value="#{filterBean.data['ou']}"
  45. taskName="system" comboName="authorizedOUMainBuOrBranch" args=",,Y"
  46. itemLabel="#{item['code']} / #{item['name']}"
  47. ajax="true"
  48. update=":rootform:comboEvent:comboEvent"
  49. listener="#{createSalesOrderController.ouChanged}" />
  50. <jl:autoComplete id="comboEvent"
  51. task="system"
  52. value="#{filterBean.data['event']}"
  53. comboName="getAuthorizedEventListByOu"
  54. args="#{filterBean.data['ou']['id']},,"
  55. itemLabel="#{empty item ?'' : item.code.concat(' - ').concat(item.name)}"
  56. label="code,name" styleClass="md" />
  57. <p:inputText value="#{filterBean.data['docNo']}" styleClass="md" />
  58.  
  59. </h:panelGrid>
  60.  
  61. <h:panelGrid columns="4">
  62. <h:outputText value="#{piece['productCodeNameCorrection']}" />
  63. <h:outputText value="#{piece['productCodeNameOriginal']}" />
  64. <h:outputText value="#{piece['productCodeInvalid']}" />
  65. <h:outputText value="#{piece['flgCorrection']}" />
  66.  
  67. <p:inputText value="#{filterBean.data['productCodeNameCorrection']}" styleClass="md" />
  68. <p:inputText value="#{filterBean.data['productCodeNameOriginal']}" styleClass="md" />
  69. <p:selectOneButton id="productInvalid" value="#{filterBean.data['productInvalid']}">
  70. <f:selectItem itemLabel="#{piece['all']}" itemValue="" />
  71. <f:selectItem itemLabel="#{piece['invalidProductCode']}" itemValue="Y" />
  72. <f:selectItem itemLabel="#{piece['validProductCode']}" itemValue="N" />
  73. </p:selectOneButton>
  74. <p:selectOneButton id="flgCorrection" value="#{filterBean.data['flgCorrection']}">
  75. <f:selectItem itemLabel="#{piece['all']}" itemValue="" />
  76. <f:selectItem itemLabel="#{piece['yes']}" itemValue="Y" />
  77. <f:selectItem itemLabel="#{piece['no']}" itemValue="N" />
  78. </p:selectOneButton>
  79. </h:panelGrid>
  80.  
  81. <p:commandButton id="btnSearch"
  82. icon="ui-icon ui-icon-search"
  83. actionListener="#{pointOfSalesController.doSearch()}"
  84. value="#{piece['search']}" update="grid messages" process="panelSearch,@this" />
  85. <p:defaultCommand target="btnSearch" />
  86.  
  87. </h:panelGrid>
  88.  
  89. </j:authorize>
  90.  
  91. <p:dataTable id="grid"
  92. value="#{pointOfSalesController.salesPosItemList}" var="item"
  93. paginator="true" rows="25" lazy="true"
  94. paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
  95. rowsPerPageTemplate="25,50,100"
  96. rowKey="#{item['id']}">
  97.  
  98. <p:column headerText="#{piece['action']}">
  99. <p:commandLink value="#{piece['edit']}"
  100. actionListener="#{pointOfSalesController.prepareCorrectionItem(item)}"
  101. update=":formEditCorrection"
  102. oncomplete="editCorrection.show()" />
  103.  
  104. <p:spacer width="2" />
  105.  
  106. <p:commandLink value="#{piece['remove']}"/>
  107. </p:column>
  108.  
  109. <p:column headerText="#{piece['event']}">
  110. <h:outputText value="#{item['eventCode']} - #{item['eventName']}" />
  111. </p:column>
  112.  
  113. <p:column headerText="#{piece['docNo']}">
  114. <h:outputText value="#{item['docNo']}" />
  115. </p:column>
  116.  
  117. <p:column headerText="#{piece['docDate']}">
  118. <h:outputText value="#{item['docDate']}" converter="#{dateConverter}" />
  119. </p:column>
  120.  
  121. <p:column headerText="#{piece['product']}">
  122. <h:outputText value="#{item['productCodeCorrection']}-#{item['productNameCorrection']}" />
  123. </p:column>
  124.  
  125. <p:column headerText="#{piece['qtyOriginal']}">
  126. <h:outputText value="#{item['qtyOriginal']}-#{item['uomCode']}" />
  127. </p:column>
  128.  
  129. <p:column headerText="#{piece['qtyCorrection']}">
  130. <h:outputText value="#{item['qtyCorrection']}-#{item['uomCode']}" />
  131. </p:column>
  132.  
  133. <p:column headerText="#{piece['priceUnitOriginal']}">
  134. <h:outputText value="#{item['pricePerUnitOriginal']}" converter="#{numericConverter}" />
  135. </p:column>
  136.  
  137. <p:column headerText="#{piece['priceUnitCorrection']}">
  138. <h:outputText value="#{item['pricePerUnitCorrection']}" converter="#{numericConverter}" />
  139. </p:column>
  140.  
  141. <p:column headerText="#{piece['discOriginal']}">
  142. <h:outputText value="#{item['potOriginal']}" converter="#{numericConverter}" />
  143. </p:column>
  144.  
  145. <p:column headerText="#{piece['discCorrection']}">
  146. <h:outputText value="#{item['potCorrection']}" converter="#{numericConverter}" />
  147. </p:column>
  148.  
  149. <p:column headerText="#{piece['subTotalOriginal']}">
  150. <h:outputText value="#{item['subTotalOriginal']}" converter="#{numericConverter}" />
  151. </p:column>
  152.  
  153. <p:column headerText="#{piece['subTotalCorrection']}">
  154. <h:outputText value="#{item['subTotalCorrection']}" converter="#{numericConverter}" />
  155. </p:column>
  156.  
  157. <p:column headerText="#{piece['flgCorrection']}">
  158. <h:outputText value="#{item['flgCorrection'] == 'Y' ? 'Yes' : 'No'}" />
  159. </p:column>
  160.  
  161. </p:dataTable>
  162.  
  163. </p:panel>
  164. </ui:define>
  165.  
  166. <ui:define name="outsidePart">
  167. <h:form id="formEditCorrection">
  168. <p:dialog widgetVar="editCorrection" header="#{piece['editCorrection']}" height="420" width="590"
  169. severity="alert">
  170. <p:messages id="messages" autoUpdate="true" />
  171. <h:panelGrid id="panelCorrection">
  172. <h:panelGrid columns="2">
  173. <h:outputText value="#{piece['eventCode']}" />
  174. <h:outputText value="#{piece['eventName']}" />
  175.  
  176. <p:inputText value="#{pointOfSalesController.itemCorrection['eventCode']}" disabled="true" styleClass="md" />
  177. <p:inputText value="#{pointOfSalesController.itemCorrection['eventName']}" disabled="true" styleClass="md" />
  178. </h:panelGrid>
  179. <h:panelGrid columns="2">
  180. <h:outputText value="#{piece['docNo']}" />
  181. <h:outputText value="#{piece['docDate']}" />
  182.  
  183. <p:inputText value="#{pointOfSalesController.itemCorrection['docNo']}" disabled="true" styleClass="md" />
  184. <p:inputText value="#{pointOfSalesController.itemCorrection['docDate']}" converter="#{dateConverter}" disabled="true" styleClass="md" />
  185. </h:panelGrid>
  186. <h:panelGrid columns="2">
  187. <h:outputText value="#{piece['productCodeOriginal']}" />
  188. <h:outputText value="#{piece['productNameOriginal']}" />
  189.  
  190. <p:inputText value="#{pointOfSalesController.itemCorrection['productCode']}" disabled="true" styleClass="md" />
  191. <p:inputText value="#{pointOfSalesController.itemCorrection['productName']}" disabled="true" styleClass="md" />
  192. </h:panelGrid>
  193. <h:panelGrid columns="3">
  194. <h:outputText value="#{piece['productCodeCorrection']}" />
  195. <h:outputText value="#{piece['productNameCorrection']}" />
  196. <h:outputText/>
  197.  
  198. <p:inputText id="productCodeCorrection" value="#{pointOfSalesController.itemCorrection['productCodeCorrection']}" disabled="true" styleClass="md" />
  199. <p:inputText id="productNameCorrection" value="#{pointOfSalesController.itemCorrection['productNameCorrection']}" disabled="true" styleClass="md" />
  200. <p:commandLink onclick="lookup.show()">
  201. <h:graphicImage library="images" name="common/view.png" />
  202. </p:commandLink>
  203. </h:panelGrid>
  204. <h:panelGrid columns="2">
  205. <h:outputText value="#{piece['qtyOriginal']}" />
  206. <h:outputText value="#{piece['qtyCorrection']}" />
  207.  
  208. <p:inputText value="#{pointOfSalesController.itemCorrection['qtyOriginal']}" disabled="true" styleClass="md" />
  209. <p:inputText value="#{pointOfSalesController.itemCorrection['qtyCorrection']}" styleClass="md" />
  210. </h:panelGrid>
  211. <h:panelGrid columns="2">
  212. <h:outputText value="#{piece['priceUnitOriginal']}" />
  213. <h:outputText value="#{piece['priceUnitCorrection']}" />
  214.  
  215. <p:inputText value="#{pointOfSalesController.itemCorrection['pricePerUnitOriginal']}" converter="#{numericConverter}" disabled="true" styleClass="md" />
  216. <p:inputText value="#{pointOfSalesController.itemCorrection['pricePerUnitCorrection']}" converter="#{numericConverter}" styleClass="md" />
  217. </h:panelGrid>
  218. <h:panelGrid columns="2">
  219. <h:outputText value="#{piece['discOriginal']}" />
  220. <h:outputText value="#{piece['discCorrection']}" />
  221.  
  222. <p:inputText value="#{pointOfSalesController.itemCorrection['potOriginal']}" converter="#{numericConverter}" disabled="true" styleClass="md" />
  223. <p:inputText value="#{pointOfSalesController.itemCorrection['potCorrection']}" converter="#{numericConverter}" styleClass="md" />
  224. </h:panelGrid>
  225. </h:panelGrid>
  226.  
  227. <p:commandButton value="#{piece['save']}"
  228. actionListener="#{pointOfSalesController.doCorrectionItem()}"
  229. update="panelCorrection :rootform:grid"
  230. oncomplete="console.log(args),args.success == false ? editCorrection.show() : editCorrection.hide()" icon="ui-icon-disk" />
  231. <p:commandButton value="#{piece['close']}" type="button"
  232. onclick="editCorrection.hide()"
  233. icon="ui-icon-circle-close" />
  234. </p:dialog>
  235. </h:form>
  236.  
  237. <p:dialog widgetVar="lookup" id="lookup_product" modal="true"
  238. header="Lookup Product" width="800" height="500">
  239. <p:messages id="messages" autoUpdate="true" />
  240. <h:form>
  241. <p:panel>
  242.  
  243. <h:panelGrid columns="2">
  244. <h:outputText value="#{piece['categoryProduct']}" />
  245. <p:selectOneMenu id="ctgrProductCmb"
  246. value="#{lookupInfoProductNonAssembly.ctgrProductId}">
  247. <p:ajax
  248. listener="#{lookupInfoProductNonAssembly.loadSubCtgrProductListByCtgrProduct()}"
  249. update="subCtgrProductCmb" />
  250. <f:selectItem itemValue="-99" itemLabel="#{piece['all']}" />
  251. <f:selectItems
  252. value="#{lookupInfoProductNonAssembly.ctgrProductList}"
  253. var="ctgrProductItem"
  254. itemLabel="#{ctgrProductItem['code'].concat(' - ').concat(ctgrProductItem['name'])}"
  255. itemValue="#{ctgrProductItem['id']}" />
  256. </p:selectOneMenu>
  257.  
  258. <h:outputText value="#{piece['subCategoryProduct']}" />
  259. <p:selectOneMenu id="subCtgrProductCmb" styleClass="md"
  260. value="#{lookupInfoProductNonAssembly.subCtgrProductId}">
  261. <f:selectItem itemValue="-99" itemLabel="#{piece['all']}" />
  262. <f:selectItems
  263. value="#{lookupInfoProductNonAssembly.subCtgrProductList}"
  264. var="subCtgrProductItem"
  265. itemLabel="#{subCtgrProductItem['code'].concat(' - ').concat(subCtgrProductItem['name'])}"
  266. itemValue="#{subCtgrProductItem['id']}" />
  267. </p:selectOneMenu>
  268.  
  269. <h:outputText value="#{piece['brand']}" />
  270. <p:selectOneMenu id="brandCmb"
  271. value="#{lookupInfoProductNonAssembly.brandId}">
  272. <f:selectItem itemValue="-99" itemLabel="#{piece['all']}" />
  273. <f:selectItems value="#{lookupInfoProductNonAssembly.brandList}"
  274. var="brandItem"
  275. itemLabel="#{brandItem['code']} - #{brandItem['name']}"
  276. itemValue="#{brandItem['id']}" />
  277. </p:selectOneMenu>
  278.  
  279. <h:outputText value="#{piece['productCode']}" />
  280. <p:inputText id="productCodeTxt"
  281. value="#{lookupInfoProductNonAssembly.productCode}" />
  282.  
  283. <h:outputText value="#{piece['productName']}" />
  284. <p:inputText id="productNameTxt"
  285. value="#{lookupInfoProductNonAssembly.productName}" />
  286.  
  287. <h:outputText />
  288. <p:commandButton id="searchButton" value="#{piece['search']}"
  289. actionListener="#{lookupInfoProductNonAssembly.doSearch()}"
  290. update="lookupGrid" />
  291. </h:panelGrid>
  292. </p:panel>
  293. <p:defaultCommand target="searchButton" />
  294. <p:dataTable id="lookupGrid" paginator="true"
  295. value="#{lookupInfoProductNonAssembly.model}" lazy="true"
  296. var="lookupItem" rows="20" rowsPerPageTemplate="10,25,50,100,150,200"
  297. paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" >
  298.  
  299. <p:column>
  300. <p:commandLink value="Select"
  301. actionListener="#{pointOfSalesController.selectLookupItem(lookupItem)}"
  302. update=":formEditCorrection:productCodeCorrection :formEditCorrection:productNameCorrection"
  303. oncomplete="lookup.hide()"/>
  304. </p:column>
  305.  
  306. <p:column headerText="#{piece['productCode']}"
  307. sortBy="#{lookupItem.code}">
  308. <h:outputText value="#{lookupItem['code']}" />
  309. </p:column>
  310.  
  311. <p:column headerText="#{piece['productName']}"
  312. sortBy="#{lookupItem.name}">
  313. <h:outputText value="#{lookupItem['name']}" />
  314. </p:column>
  315.  
  316. <p:column headerText="#{piece['categoryProduct']}">
  317. <h:outputText value="#{lookupItem['ctgrProductName']}" />
  318. </p:column>
  319.  
  320. <p:column headerText="#{piece['subCategoryProduct']}">
  321. <h:outputText value="#{lookupItem['subCtgrProductName']}" />
  322. </p:column>
  323. </p:dataTable>
  324. </h:form>
  325. </p:dialog>
  326.  
  327. </ui:define>
  328.  
  329.  
  330. </ui:composition>
  331. </html>
Advertisement
Add Comment
Please, Sign In to add comment