FormPanel.js 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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. },{
  68. xtype : "textfield",
  69. name : "pi_total",
  70. bind : "{pi_total}",
  71. fieldLabel : "总额",
  72. allowBlank : true,
  73. readOnly: true,
  74. columnWidth : 0.25
  75. }, {
  76. xtype : "hidden",
  77. name : "pi_puid",
  78. bind : "{pi_puid}",
  79. fieldLabel : "采购单id",
  80. allowBlank : true,
  81. columnWidth : 0.25
  82. },{
  83. xtype : "textfield",
  84. name : "pi_pucode",
  85. bind : "{pi_pucode}",
  86. fieldLabel : "采购单号",
  87. allowBlank : true,
  88. columnWidth : 0.25
  89. }, {
  90. name : "detailGridField",
  91. xtype : "detailGridField",
  92. storeModel:'saas.model.purchase.ProdIODetail',
  93. // deleteDetailUrl:'http://localhost:8800/prodinout/deleteDetail/',
  94. deleteDetailUrl:'api/purchase/prodinout/deleteDetail/',
  95. detnoColumn: 'pd_pdno',
  96. columns : [
  97. {
  98. text : "id",
  99. dataIndex : "id",
  100. xtype : "numbercolumn",
  101. hidden:true
  102. },{
  103. text : "物料id",
  104. dataIndex : "pd_prodid",
  105. xtype : "numbercolumn",
  106. hidden:true
  107. },
  108. {
  109. text : "物料编号",
  110. width : 200.0,
  111. dataIndex : "pd_prodcode",
  112. xtype : "",
  113. items : null,
  114. editor : {
  115. displayField : "display",
  116. editable : true,
  117. format : "",
  118. hideTrigger : false,
  119. maxLength : 100.0,
  120. minValue : null,
  121. positiveNum : false,
  122. queryMode : "local",
  123. store : null,
  124. valueField : "value",
  125. xtype : "multidbfindtrigger"
  126. }
  127. },
  128. {
  129. text : "名称",
  130. dataIndex : "pr_detail",
  131. ignore:true,
  132. renderer: function (v, m, r) {
  133. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  134. }
  135. },
  136. {
  137. text : "规格",
  138. dataIndex : "pr_spec",
  139. ignore:true,
  140. renderer: function (v, m, r) {
  141. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  142. }
  143. },
  144. {
  145. text : "数量",
  146. dataIndex : "pd_outqty",
  147. editor : {
  148. xtype : "numberfield"
  149. },
  150. width : 120.0,
  151. xtype : "numbercolumn",
  152. format:'0',
  153. items : null,
  154. summaryType: 'sum'
  155. }, {
  156. text : "已转数",
  157. dataIndex : "pd_yqty",
  158. width : 120.0,
  159. xtype : "numbercolumn",
  160. format:'0',
  161. items : null,
  162. summaryType: 'sum'
  163. },{
  164. text : "仓库id",
  165. dataIndex : "pd_whid",
  166. xtype : "numbercolumn",
  167. hidden:true
  168. },
  169. {
  170. text : "仓库编号",
  171. dataIndex : "pd_whcode",
  172. hidden:true
  173. },
  174. {
  175. text : "仓库",
  176. dataIndex : "pd_whname",
  177. width : 120.0,
  178. items : null,
  179. editor : {
  180. displayField : "display",
  181. editable : true,
  182. format : "",
  183. hideTrigger : false,
  184. maxLength : 100.0,
  185. minValue : null,
  186. positiveNum : false,
  187. queryMode : "local",
  188. store : null,
  189. valueField : "value",
  190. xtype : "dbfindtrigger"
  191. }
  192. },
  193. {
  194. text : "单价",
  195. editor : {
  196. xtype : "numberfield"
  197. },
  198. dataIndex : "pd_orderprice",
  199. width : 120.0,
  200. xtype : "numbercolumn"
  201. },
  202. {
  203. text : "含税金额",
  204. dataIndex : "pd_total",
  205. width : 120.0,
  206. xtype : "numbercolumn"
  207. }, {
  208. text : "税率",
  209. dataIndex : "pd_taxrate",
  210. editor : {
  211. xtype : "numberfield"
  212. },
  213. width : 120.0,
  214. xtype : "numbercolumn"
  215. },
  216. {
  217. text : "未税金额",
  218. dataIndex : "pd_nettotal",
  219. xtype : "numbercolumn"
  220. },
  221. {
  222. text : "采购单明细id",
  223. dataIndex : "pd_orderid",
  224. width : 120.0,
  225. hidden:true
  226. },
  227. {
  228. text : "采购单号",
  229. dataIndex : "pd_ordercode",
  230. width : 120.0
  231. },{
  232. text : "采购序号",
  233. dataIndex : "pd_orderdetno",
  234. xtype : "numbercolumn",
  235. flex:1
  236. }
  237. ]
  238. }, {
  239. xtype : "datefield",
  240. name : "createTime",
  241. bind : "{createTime}",
  242. fieldLabel : "创建时间",
  243. allowBlank : true,
  244. columnWidth : 0.25
  245. }, {
  246. xtype : "datefield",
  247. name : "updateTime",
  248. bind : "{updateTime}",
  249. fieldLabel : "更新时间",
  250. allowBlank : true,
  251. columnWidth : 0.25
  252. }, {
  253. xtype : "textfield",
  254. readOnly : true,
  255. editable : false,
  256. name : "pi_status",
  257. bind : "{pi_status}",
  258. fieldLabel : "单据状态",
  259. allowBlank : true,
  260. columnWidth : 0.25
  261. }, {
  262. xtype : "hidden",
  263. readOnly : true,
  264. editable : false,
  265. name : "pi_statuscode",
  266. bind : "{pi_statuscode}",
  267. fieldLabel : "单据状态码",
  268. allowBlank : true,
  269. columnWidth : 0.0
  270. }]
  271. });