FormPanel.js 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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:'ProdInOut!Sale',
  8. //字段属性
  9. _title:'销售出货单',
  10. _idField: 'id',
  11. _codeField: 'pi_inoutno',
  12. _statusField: 'pi_status',
  13. _statusCodeField: 'pi_statuscode',
  14. _relationColumn: 'pd_piid',
  15. _relationColumn: 'pd_piid',
  16. _readUrl:basePath+'sale/prodinout/read/',
  17. _saveUrl:basePath+'sale/prodinout/save',
  18. _auditUrl:basePath+'sale/prodinout/audit',
  19. _deleteUrl:basePath+'sale/prodinout/delete/',
  20. _deleteDetailUrl:basePath+'sale/prodinout/deleteItem/',
  21. _turnInUrl:basePath+'sale/prodinout/turnProdin/',
  22. _turnOutUrl:basePath+'sale/prodinout/turnProdOut/',
  23. initId:0,
  24. toolBtns: [],
  25. defaultItems: [{
  26. xtype: 'hidden',
  27. name: 'id',
  28. bind: '{id}',
  29. fieldLabel: 'id',
  30. allowBlank: true,
  31. columnWidth: 0
  32. }, {
  33. xtype : "textfield",
  34. name : "pi_inoutno",
  35. bind : "{pi_inoutno}",
  36. fieldLabel : "单据编号",
  37. allowBlank : true,
  38. columnWidth : 0.25
  39. },{
  40. xtype : "textfield",
  41. name : "pi_class",
  42. bind : "{pi_class}",
  43. fieldLabel : "单据类型",
  44. readOnly:true,
  45. allowBlank : true,
  46. columnWidth : 0.25
  47. }, {
  48. xtype : "hidden",
  49. name : "pi_custid",
  50. bind : "{pi_custid}",
  51. fieldLabel : "客户ID",
  52. allowBlank : true,
  53. columnWidth : 0.0
  54. }, {
  55. xtype : "textfield",
  56. name : "pi_custcode",
  57. bind : "{pi_custcode}",
  58. fieldLabel : "客户编号",
  59. hidden:true,
  60. allowBlank : true,
  61. columnWidth : 0,
  62. }, {
  63. xtype : "dbfindtrigger",
  64. name : "pi_custname",
  65. bind : "{pi_custname}",
  66. fieldLabel : "客户名称",
  67. allowBlank : true,
  68. columnWidth : 0.25
  69. },{
  70. xtype : "datefield",
  71. name : "pi_date",
  72. bind : "{pi_date}",
  73. fieldLabel : "单据日期",
  74. allowBlank : false,
  75. columnWidth : 0.25
  76. },{
  77. xtype : "textfield",
  78. name : "pi_total",
  79. bind : "{pi_total}",
  80. fieldLabel : "总额",
  81. allowBlank : true,
  82. readOnly: true,
  83. columnWidth : 0.25
  84. }, {
  85. xtype : "textfield",
  86. name : "pi_said",
  87. bind : "{pi_said}",
  88. fieldLabel : "销售单id",
  89. allowBlank : true,
  90. columnWidth : 0.25
  91. },{
  92. xtype : "textfield",
  93. name : "pi_sacode",
  94. bind : "{pi_sacode}",
  95. fieldLabel : "销售单号",
  96. allowBlank : true,
  97. columnWidth : 0.25
  98. }, {
  99. xtype : "hidden",
  100. name : "pi_inid",
  101. bind : "{pi_inid}",
  102. fieldLabel : "出入库单id",
  103. allowBlank : true,
  104. columnWidth : 0.25
  105. },{
  106. name : "detailGridField",
  107. xtype : "detailGridField",
  108. _detnoColumn: 'pd_pdno',
  109. columns : [
  110. {
  111. text : "序号",
  112. dataIndex : "pd_pdno",
  113. width : 100,
  114. xtype : "numbercolumn",
  115. align : 'center',
  116. format:'0',
  117. summaryType: 'count',
  118. summaryRenderer: function(value, summaryData, dataIndex) {
  119. return Ext.String.format('合计: {0}条', value);
  120. },
  121. }, {
  122. text : "id",
  123. dataIndex : "id",
  124. xtype : "numbercolumn"
  125. },
  126. {
  127. text : "物料编号",
  128. width : 200.0,
  129. dataIndex : "pd_prodcode",
  130. xtype : "",
  131. items : null,
  132. editor : {
  133. displayField : "display",
  134. editable : true,
  135. format : "",
  136. hideTrigger : false,
  137. maxLength : 100.0,
  138. minValue : null,
  139. positiveNum : false,
  140. queryMode : "local",
  141. store : null,
  142. valueField : "value",
  143. xtype : "dbfindtrigger"
  144. }
  145. },
  146. {
  147. text : "名称",
  148. dataIndex : "pr_detail",
  149. ignore:true
  150. },
  151. {
  152. text : "规格",
  153. dataIndex : "pr_spec",
  154. ignore:true
  155. },
  156. {
  157. text : "出货数量",
  158. dataIndex : "pd_outqty",
  159. editor : {
  160. xtype : "numberfield"
  161. },
  162. width : 120.0,
  163. xtype : "numbercolumn",
  164. format:'0',
  165. items : null,
  166. summaryType: 'sum'
  167. },
  168. {
  169. text : "仓库",
  170. dataIndex : "pd_whname",
  171. width : 120.0,
  172. items : null,
  173. editor : {
  174. displayField : "display",
  175. editable : true,
  176. format : "",
  177. hideTrigger : false,
  178. maxLength : 100.0,
  179. minValue : null,
  180. positiveNum : false,
  181. queryMode : "local",
  182. store : null,
  183. valueField : "value",
  184. xtype : "dbfindtrigger"
  185. }
  186. },
  187. {
  188. text : "单价",
  189. dataIndex : "pd_sendprice",
  190. width : 120.0,
  191. xtype : "numbercolumn",
  192. items : null
  193. },
  194. {
  195. text : "含税金额",
  196. dataIndex : "pd_total",
  197. width : 120.0,
  198. xtype : "numbercolumn"
  199. }, {
  200. text : "税率",
  201. dataIndex : "pd_taxrate",
  202. width : 120.0,
  203. xtype : "numbercolumn",
  204. items : null
  205. },
  206. {
  207. text : "未税金额",
  208. dataIndex : "pd_nettotal",
  209. xtype : "numbercolumn"
  210. },
  211. {
  212. text : "销售单号",
  213. dataIndex : "pd_ordercode",
  214. width : 120.0
  215. },{
  216. text : "销售序号",
  217. dataIndex : "pd_orderdetno",
  218. xtype : "numbercolumn",
  219. flex:1
  220. }, {
  221. text : "出入库明细id",
  222. dataIndex : "pd_ioid",
  223. width : 120.0,
  224. hidden:true
  225. }
  226. ]
  227. }, {
  228. format : "Y-m-d",
  229. xtype : "datefield",
  230. name : "createTime",
  231. bind : "{createTime}",
  232. fieldLabel : "创建时间",
  233. allowBlank : true,
  234. columnWidth : 0.25
  235. }, {
  236. xtype : "datefield",
  237. name : "updateTime",
  238. bind : "{updateTime}",
  239. fieldLabel : "更新时间",
  240. allowBlank : true,
  241. columnWidth : 0.25
  242. }, {
  243. xtype : "textfield",
  244. readOnly : true,
  245. editable : false,
  246. name : "pi_status",
  247. bind : "{pi_status}",
  248. fieldLabel : "单据状态",
  249. allowBlank : true,
  250. columnWidth : 0.25
  251. }, {
  252. xtype : "hidden",
  253. readOnly : true,
  254. editable : false,
  255. name : "pi_statuscode",
  256. bind : "{pi_statuscode}",
  257. fieldLabel : "单据状态码",
  258. allowBlank : true,
  259. columnWidth : 0.0
  260. }]
  261. });