FormPanel.js 8.4 KB

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