FormPanel.js 7.6 KB

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