FormPanel.js 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. Ext.define('saas.view.sale.sale.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'sale-sale-formpanel',
  4. controller: 'sale-sale-formcontroller',
  5. viewModel: 'sale-sale-formmodel',
  6. caller:'Sale',
  7. //字段属性
  8. _title:'销售订单',
  9. _idField: 'id',
  10. _codeField: 'sa_code',
  11. _statusField: 'sa_status',
  12. _statusCodeField: 'sa_statuscode',
  13. _detnoColumn: 'sd_detno',
  14. _relationColumn: 'sd_puid',
  15. _readUrl:'',
  16. _saveUrl:'',
  17. _auditUrl:'',
  18. _deleteUrl:'',
  19. _deleteDetailUrl:'',
  20. _turnInUrl:'',
  21. _turnOutUrl:'',
  22. initId:0,
  23. toolBtns: [{
  24. xtype: 'button',
  25. text: '转出货单',
  26. handler: 'turnIn'
  27. }],
  28. defaultItems: [{
  29. xtype: 'hidden',
  30. name: 'id',
  31. bind: '{id}',
  32. fieldLabel: 'id',
  33. allowBlank: true,
  34. columnWidth: 0
  35. }, {
  36. xtype : "textfield",
  37. name : "sa_code",
  38. bind : "{sa_code}",
  39. fieldLabel : "销售单号",
  40. allowBlank : true,
  41. columnWidth : 0.25
  42. }, {
  43. xtype : "hidden",
  44. name : "sa_cudid",
  45. bind : "{sa_cudid}",
  46. fieldLabel : "客户ID",
  47. allowBlank : true,
  48. columnWidth : 0.0
  49. }, {
  50. xtype : "textfield",
  51. name : "sa_cucode",
  52. bind : "{sa_cucode}",
  53. fieldLabel : "客户编号",
  54. hidden:true,
  55. allowBlank : true,
  56. columnWidth : 0,
  57. }, {
  58. xtype : "dbfindtrigger",
  59. name : "sa_cuname",
  60. bind : "{sa_cuname}",
  61. fieldLabel : "客户名称",
  62. allowBlank : true,
  63. columnWidth : 0.25
  64. },{
  65. xtype : "datefield",
  66. name : "sa_recorddate",
  67. bind : "{sa_recorddate}",
  68. fieldLabel : "订单日期",
  69. allowBlank : false,
  70. columnWidth : 0.25
  71. }, {
  72. xtype : "textfield",
  73. name : "sa_recorder",
  74. bind : "{sa_recorder}",
  75. fieldLabel : "录入人",
  76. allowBlank : true,
  77. readOnly:true,
  78. columnWidth : 0.0
  79. }, {
  80. xtype : "textfield",
  81. name : "sa_toplace",
  82. bind : "{sa_toplace}",
  83. fieldLabel : "交货地址",
  84. allowBlank : true,
  85. columnWidth : 0.25
  86. }, {
  87. xtype : "textfield",
  88. name : "sa_total",
  89. bind : "{sa_total}",
  90. fieldLabel : "单据金额",
  91. allowBlank : true,
  92. columnWidth : 0.25
  93. }, {
  94. xtype : "textfield",
  95. name : "sa_remark",
  96. bind : "{sa_remark}",
  97. fieldLabel : "备注",
  98. allowBlank : true,
  99. columnWidth : 1
  100. },{
  101. xtype : "textfield",
  102. name : "sa_sendstatus",
  103. bind : "{sa_sendstatus}",
  104. fieldLabel : "出货状态",
  105. allowBlank : true,
  106. readOnly:true,
  107. columnWidth : 0
  108. }, {
  109. name : "detailGridField",
  110. xtype : "detailGridField",
  111. columns : [
  112. {
  113. text : "序号",
  114. dataIndex : "sd_detno",
  115. width : 100,
  116. xtype : "numbercolumn",
  117. align : 'center',
  118. format:'0',
  119. summaryType: 'count',
  120. summaryRenderer: function(value, summaryData, dataIndex) {
  121. return Ext.String.format('合计: {0}条', value);
  122. },
  123. }, {
  124. text : "id",
  125. dataIndex : "id",
  126. xtype : "numbercolumn"
  127. },
  128. {
  129. text : "物料编号",
  130. width : 200.0,
  131. dataIndex : "sd_prodcode",
  132. xtype : "",
  133. items : null,
  134. editor : {
  135. displayField : "display",
  136. editable : true,
  137. format : "",
  138. hideTrigger : false,
  139. maxLength : 100.0,
  140. minValue : null,
  141. positiveNum : false,
  142. queryMode : "local",
  143. store : null,
  144. valueField : "value",
  145. xtype : "dbfindtrigger"
  146. }
  147. },
  148. {
  149. text : "名称",
  150. dataIndex : "pr_detail",
  151. ignore:true
  152. },
  153. {
  154. text : "规格",
  155. dataIndex : "pr_spec",
  156. ignore:true
  157. },
  158. {
  159. text : "数量",
  160. dataIndex : "sd_qty",
  161. editor : {
  162. xtype : "numberfield"
  163. },
  164. width : 120.0,
  165. xtype : "numbercolumn",
  166. format:'0',
  167. items : null,
  168. summaryType: 'sum'
  169. },
  170. {
  171. text : "单价",
  172. editor : {
  173. xtype : "numberfield"
  174. },
  175. format:'0,000.00',
  176. dataIndex : "sd_price",
  177. width : 120.0,
  178. xtype : "numbercolumn",
  179. items : null,
  180. summaryType: 'sum'
  181. },
  182. {
  183. text : "税率",
  184. editor : {
  185. xtype : "numberfield"
  186. },
  187. dataIndex : "sd_taxrate",
  188. width : 120.0,
  189. xtype : "numbercolumn",
  190. items : null
  191. },
  192. {
  193. text : "含税金额",
  194. dataIndex : "sd_total",
  195. width : 120.0,
  196. xtype : "numbercolumn"
  197. },
  198. {
  199. text : "未税金额",
  200. dataIndex : "sd_nettotal",
  201. xtype : "numbercolumn"
  202. },{
  203. text : "交货日期",
  204. dataIndex : "sd_delivery",
  205. flex : 1.0,
  206. xtype:'datecolumn',
  207. format : "Y-m-d H:i:s",
  208. editor : {
  209. xtype : "datefield",
  210. editable : true,
  211. format : "Y-m-d H:i:s",
  212. hideTrigger : false
  213. }
  214. },
  215. {
  216. text : "已转数",
  217. dataIndex : "sd_yqty",
  218. editor : {
  219. xtype : "numberfield"
  220. },
  221. width : 120.0,
  222. xtype : "numbercolumn",
  223. format:'0',
  224. items : null,
  225. summaryType: 'sum'
  226. },
  227. ]
  228. }, {
  229. format : "Y-m-d",
  230. xtype : "datefield",
  231. name : "createTime",
  232. bind : "{createTime}",
  233. fieldLabel : "创建时间",
  234. allowBlank : true,
  235. columnWidth : 0.25
  236. }, {
  237. xtype : "datefield",
  238. name : "updateTime",
  239. bind : "{updateTime}",
  240. fieldLabel : "更新时间",
  241. allowBlank : true,
  242. columnWidth : 0.25
  243. }, {
  244. xtype : "textfield",
  245. readOnly : true,
  246. editable : false,
  247. name : "sa_status",
  248. bind : "{sa_status}",
  249. fieldLabel : "单据状态",
  250. allowBlank : true,
  251. columnWidth : 0.25
  252. }, {
  253. xtype : "hidden",
  254. readOnly : true,
  255. editable : false,
  256. name : "sa_statuscode",
  257. bind : "{sa_statuscode}",
  258. fieldLabel : "单据状态码",
  259. allowBlank : true,
  260. columnWidth : 0.0
  261. }]
  262. });