FormPanel.js 8.6 KB

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