FormPanel.js 8.4 KB

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