FormPanel.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'purchase-purchaseout-formpanel',
  4. controller: 'purchase-purchaseout-formpanel',
  5. viewModel: 'purchase-purchaseout-formpanel',
  6. viewName: 'purchase-purchaseout-formpanel',
  7. caller:'PurchaseOut',
  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/purchase/prodinout/read/',
  16. _saveUrl:'/api/purchase/prodinout/save',
  17. _auditUrl:'/api/purchase/prodinout/audit',
  18. _unAuditUrl:'/api/purchase/prodinout/unAudit/',
  19. _deleteUrl:'/api/purchase/prodinout/delete/',
  20. // _relationColumn: 'pd_piid',
  21. // _readUrl:'http://localhost:8800/prodinout/read/',
  22. // _saveUrl:'http://localhost:8800/prodinout/save',
  23. // _auditUrl:'http://localhost:8800/prodinout/audit',
  24. // _deleteUrl:'http://localhost:8800/prodinout/delete/',
  25. initId:0,
  26. toolBtns: [],
  27. defaultItems: [{
  28. xtype: 'hidden',
  29. name: 'id',
  30. bind: '{id}',
  31. fieldLabel: 'id',
  32. allowBlank: true,
  33. columnWidth: 0
  34. },{
  35. xtype : "textfield",
  36. name : "pi_class",
  37. bind : "{pi_class}",
  38. fieldLabel : "单据类型",
  39. readOnly:true,
  40. allowBlank : true,
  41. columnWidth : 0.25
  42. }, {
  43. xtype : "hidden",
  44. name : "pi_vendid",
  45. bind : "{pi_vendid}",
  46. fieldLabel : "供应商ID",
  47. allowBlank : true,
  48. hidden:true,
  49. columnWidth : 0.0
  50. },{
  51. xtype: 'hidden',
  52. name: 'pi_vendcode',
  53. bind: '{pi_vendcode}',
  54. fieldLabel: '供应商编号'
  55. }, {
  56. xtype: 'dbfindtrigger',
  57. name: 'pi_vendname',
  58. bind: '{pi_vendname}',
  59. fieldLabel: '供应商名称'
  60. },{
  61. xtype : "datefield",
  62. name : "pi_date",
  63. bind : "{pi_date}",
  64. fieldLabel : "单据日期",
  65. allowBlank : false,
  66. columnWidth : 0.25,
  67. defaultValue: new Date()
  68. },{
  69. xtype : "textfield",
  70. name : "pi_total",
  71. bind : "{pi_total}",
  72. fieldLabel : "总额",
  73. allowBlank : true,
  74. readOnly: true,
  75. columnWidth : 0.25
  76. }, {
  77. xtype : "hidden",
  78. name : "pi_puid",
  79. bind : "{pi_puid}",
  80. fieldLabel : "采购单id",
  81. allowBlank : true,
  82. columnWidth : 0.25
  83. },{
  84. xtype : "textfield",
  85. name : "pi_pucode",
  86. bind : "{pi_pucode}",
  87. fieldLabel : "采购单号",
  88. allowBlank : true,
  89. columnWidth : 0.25
  90. }, {
  91. name : "detailGridField",
  92. xtype : "detailGridField",
  93. storeModel:'saas.model.purchase.ProdIODetail',
  94. // deleteDetailUrl:'http://localhost:8800/prodinout/deleteDetail/',
  95. deleteDetailUrl:'api/purchase/prodinout/deleteDetail/',
  96. detnoColumn: 'pd_pdno',
  97. columns : [
  98. {
  99. text : "id",
  100. dataIndex : "id",
  101. xtype : "numbercolumn",
  102. hidden:true
  103. },{
  104. text : "物料id",
  105. dataIndex : "pd_prodid",
  106. xtype : "numbercolumn",
  107. hidden:true
  108. },
  109. {
  110. text : "物料编号",
  111. width : 200.0,
  112. dataIndex : "pd_prodcode",
  113. xtype : "",
  114. items : null,
  115. editor : {
  116. displayField : "display",
  117. editable : true,
  118. format : "",
  119. hideTrigger : false,
  120. maxLength : 100.0,
  121. minValue : null,
  122. positiveNum : false,
  123. queryMode : "local",
  124. store : null,
  125. valueField : "value",
  126. xtype : "multidbfindtrigger"
  127. }
  128. },
  129. {
  130. text : "名称",
  131. dataIndex : "pr_detail",
  132. ignore:true,
  133. renderer: function (v, m, r) {
  134. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  135. }
  136. },
  137. {
  138. text : "规格",
  139. dataIndex : "pr_spec",
  140. ignore:true,
  141. renderer: function (v, m, r) {
  142. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  143. }
  144. },
  145. {
  146. text : "数量",
  147. dataIndex : "pd_outqty",
  148. editor : {
  149. xtype : "numberfield"
  150. },
  151. width : 120.0,
  152. xtype : "numbercolumn",
  153. format:'0',
  154. items : null,
  155. summaryType: 'sum'
  156. }, {
  157. text : "已转数",
  158. dataIndex : "pd_yqty",
  159. width : 120.0,
  160. xtype : "numbercolumn",
  161. format:'0',
  162. items : null,
  163. summaryType: 'sum'
  164. },{
  165. text : "仓库id",
  166. dataIndex : "pd_whid",
  167. xtype : "numbercolumn",
  168. hidden:true
  169. },
  170. {
  171. text : "仓库编号",
  172. dataIndex : "pd_whcode",
  173. hidden:true
  174. },
  175. {
  176. text : "仓库",
  177. dataIndex : "pd_whname",
  178. width : 120.0,
  179. items : null,
  180. editor : {
  181. displayField : "display",
  182. editable : true,
  183. format : "",
  184. hideTrigger : false,
  185. maxLength : 100.0,
  186. minValue : null,
  187. positiveNum : false,
  188. queryMode : "local",
  189. store : null,
  190. valueField : "value",
  191. xtype : "dbfindtrigger"
  192. }
  193. },
  194. {
  195. text : "单价",
  196. editor : {
  197. xtype : "numberfield"
  198. },
  199. dataIndex : "pd_orderprice",
  200. width : 120.0,
  201. xtype : "numbercolumn"
  202. },
  203. {
  204. text : "含税金额",
  205. dataIndex : "pd_total",
  206. width : 120.0,
  207. xtype : "numbercolumn",
  208. summaryType: 'sum'
  209. }, {
  210. text : "税率",
  211. dataIndex : "pd_taxrate",
  212. editor : {
  213. xtype : "numberfield"
  214. },
  215. width : 120.0,
  216. xtype : "numbercolumn"
  217. },
  218. {
  219. text : "未税金额",
  220. dataIndex : "pd_nettotal",
  221. xtype : "numbercolumn",
  222. summaryType: 'sum'
  223. },
  224. {
  225. text : "采购单明细id",
  226. dataIndex : "pd_orderid",
  227. width : 120.0,
  228. hidden:true
  229. },
  230. {
  231. text : "采购单号",
  232. dataIndex : "pd_ordercode",
  233. width : 120.0
  234. },{
  235. text : "采购序号",
  236. dataIndex : "pd_orderdetno",
  237. xtype : "numbercolumn",
  238. flex:1,
  239. format: '0000',
  240. renderer: function(v) {
  241. return v ? v : null;
  242. }
  243. }
  244. ]
  245. }, {
  246. xtype : "datefield",
  247. name : "createTime",
  248. bind : "{createTime}",
  249. fieldLabel : "创建时间",
  250. allowBlank : true,
  251. columnWidth : 0.25
  252. }, {
  253. xtype : "datefield",
  254. name : "updateTime",
  255. bind : "{updateTime}",
  256. fieldLabel : "更新时间",
  257. allowBlank : true,
  258. columnWidth : 0.25
  259. }, {
  260. xtype : "textfield",
  261. readOnly : true,
  262. editable : false,
  263. name : "pi_status",
  264. bind : "{pi_status}",
  265. fieldLabel : "单据状态",
  266. allowBlank : true,
  267. columnWidth : 0.25
  268. }, {
  269. xtype : "hidden",
  270. readOnly : true,
  271. editable : false,
  272. name : "pi_statuscode",
  273. bind : "{pi_statuscode}",
  274. fieldLabel : "单据状态码",
  275. allowBlank : true,
  276. columnWidth : 0.0
  277. }]
  278. });