FormPanel.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. Ext.define('saas.view.sale.saleout.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'sale-saleout-formpanel',
  4. controller: 'sale-saleout-formpanel',
  5. viewModel: 'sale-saleout-formpanel',
  6. viewName: 'sale-saleout-formpanel',
  7. caller:'SaleOut',
  8. //字段属性
  9. _title:'出货单',
  10. _idField: 'id',
  11. _codeField: 'pi_inoutno',
  12. _statusField: 'pi_status',
  13. _statusCodeField: 'pi_statuscode',
  14. _relationColumn: 'pd_piid',
  15. _readUrl:'/api/sale/prodinout/read/',
  16. _saveUrl:'/api/sale/prodinout/save/',
  17. _auditUrl:'/api/sale/prodinout/audit/',
  18. _unAuditUrl:'/api/sale/prodinout/unAudit/',
  19. _deleteUrl:'/api/sale/prodinout/delete/',
  20. _turnInUrl:'/api/sale/prodinout/turnProdIn/',
  21. initId:0,
  22. toolBtns: [{
  23. xtype: 'button',
  24. text: '转销售验退',
  25. handler: 'turnProdIn',
  26. bind: {
  27. hidden: '{pi_statuscode!="AUDITED"}'
  28. }
  29. }],
  30. defaultItems: [{
  31. xtype: 'hidden',
  32. name: 'id',
  33. fieldLabel: 'id'
  34. }, {
  35. xtype : "textfield",
  36. name : "pi_class",
  37. fieldLabel : "单据类型",
  38. readOnly:true,
  39. allowBlank : false,
  40. defaultValue:'出货单'
  41. }, {
  42. xtype : "hidden",
  43. name : "pi_custid",
  44. fieldLabel : "客户ID"
  45. }, {
  46. xtype : "hidden",
  47. name : "pi_custcode",
  48. fieldLabel : "客户编号"
  49. }, {
  50. xtype : "dbfindtrigger",
  51. name : "pi_custname",
  52. fieldLabel : "客户名称",
  53. allowBlank:false,
  54. }, {
  55. xtype : "textfield",
  56. name : "pi_address",
  57. fieldLabel : "交货地址",
  58. columnWidth : 0.5
  59. }, {
  60. name : "detailGridField",
  61. xtype : "detailGridField",
  62. detnoColumn: 'pd_pdno',
  63. storeModel:'saas.model.sale.ProdIODetail',
  64. deleteDetailUrl:'/api/sale/prodinout/deleteDetail/',
  65. columns : [
  66. {
  67. text : "id",
  68. dataIndex : "id",
  69. xtype : "numbercolumn",
  70. width:0
  71. }, {
  72. text : "物料id",
  73. dataIndex : "pd_prodid",
  74. width : 0
  75. }, {
  76. text : "物料编号",
  77. width : 200.0,
  78. dataIndex : "pd_prodcode",
  79. xtype : "",
  80. items : null,
  81. allowBlank:false,
  82. editor : {
  83. displayField : "display",
  84. editable : true,
  85. format : "",
  86. hideTrigger : false,
  87. maxLength : 100.0,
  88. minValue : null,
  89. positiveNum : false,
  90. queryMode : "local",
  91. store : null,
  92. valueField : "value",
  93. xtype : "multidbfindtrigger"
  94. }
  95. }, {
  96. text : "名称",
  97. dataIndex : "pr_detail",
  98. ignore:true,
  99. width : 150.0,
  100. renderer: function (v, m, r) {
  101. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  102. }
  103. }, {
  104. text : "规格",
  105. dataIndex : "pr_spec",
  106. ignore:true,
  107. width : 150.0,
  108. renderer: function (v, m, r) {
  109. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  110. }
  111. }, {
  112. text : "出货数量",
  113. dataIndex : "pd_outqty",
  114. editor : {
  115. xtype : "numberfield"
  116. },
  117. width : 120.0,
  118. xtype : "numbercolumn",
  119. format:'0,000.00',
  120. items : null,
  121. summaryType: 'sum',
  122. allowBlank:false,
  123. }, {
  124. text : "仓库ID",
  125. dataIndex : "pd_whid",
  126. width : 0
  127. }, {
  128. text : "仓库",
  129. dataIndex : "pd_whcode",
  130. width :0
  131. }, {
  132. text : "仓库",
  133. dataIndex : "pd_whname",
  134. width : 120.0,
  135. items : null,
  136. allowBlank:false,
  137. editor : {
  138. displayField : "display",
  139. editable : true,
  140. format : "",
  141. hideTrigger : false,
  142. maxLength : 100.0,
  143. minValue : null,
  144. positiveNum : false,
  145. queryMode : "local",
  146. store : null,
  147. valueField : "value",
  148. xtype : "dbfindtrigger"
  149. }
  150. },
  151. {
  152. text : "单价",
  153. dataIndex : "pd_sendprice",
  154. editor : {
  155. xtype : "numberfield"
  156. },
  157. width : 120.0,
  158. xtype : "numbercolumn",
  159. items : null
  160. },
  161. {
  162. text : "含税金额",
  163. dataIndex : "pd_total",
  164. width : 120.0,
  165. xtype : "numbercolumn",
  166. editor : {
  167. xtype : "numberfield"
  168. },
  169. summaryType: 'sum'
  170. }, {
  171. text : "税率",
  172. dataIndex : "pd_taxrate",
  173. width : 120.0,
  174. xtype : "numbercolumn",
  175. editor : {
  176. xtype : "numberfield"
  177. },
  178. items : null
  179. },
  180. {
  181. text : "未税金额",
  182. dataIndex : "pd_nettotal",
  183. xtype : "numbercolumn"
  184. },
  185. {
  186. text : "销售单号",
  187. dataIndex : "pd_ordercode",
  188. width : 120.0
  189. },{
  190. text : "销售序号",
  191. dataIndex : "pd_orderdetno",
  192. xtype : "numbercolumn",
  193. width : 120.0
  194. }
  195. ]
  196. }, {
  197. xtype : "textfield",
  198. name : "pi_total",
  199. fieldLabel : "总额",
  200. readOnly: true
  201. }, {
  202. xtype : "textfield",
  203. name : "pi_recordman",
  204. fieldLabel : "录入人",
  205. readOnly:true
  206. }, {
  207. xtype : "datefield",
  208. name : "pi_recorddate",
  209. fieldLabel : "录入日期",
  210. readOnly:true
  211. }, {
  212. xtype : "textfield",
  213. name : "pi_auditman",
  214. fieldLabel : "审核人",
  215. readOnly:true
  216. }, {
  217. xtype : "datefield",
  218. name : "pi_auditdate",
  219. fieldLabel : "审核日期",
  220. readOnly:true
  221. }]
  222. });