FormPanel.js 8.6 KB

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