FormPanel.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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. caller:'PurchaseIn',
  7. //字段属性
  8. _title:'采购验收单',
  9. _idField: 'id',
  10. _codeField: 'pi_inoutno',
  11. _statusField: 'pi_status',
  12. _statusCodeField: 'pi_statuscode',
  13. _relationColumn: 'pd_piid',
  14. _readUrl:basePath+'purchase/prodinout/read/',
  15. _saveUrl:basePath+'purchase/prodinout/save',
  16. _auditUrl:basePath+'purchase/prodinout/audit',
  17. _deleteUrl:basePath+'purchase/prodinout/delete/',
  18. _deleteDetailUrl:basePath+'purchase/prodinout/deleteItem/',
  19. _baseVastUrl:basePath+'purchase/prodinout/',
  20. _turnOutUrl:basePath+'purchase/prodinout/turnProdOut/',
  21. initId:0,
  22. toolBtns: [{
  23. xtype: 'button',
  24. text: '转采购验退单',
  25. handler: 'turnOut'
  26. }],
  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_inoutno",
  37. bind : "{pi_inoutno}",
  38. fieldLabel : "验收单号",
  39. allowBlank : true,
  40. columnWidth : 0.25
  41. },{
  42. xtype : "textfield",
  43. name : "pi_class",
  44. bind : "{pi_class}",
  45. fieldLabel : "单据类型",
  46. readOnly:true,
  47. allowBlank : true,
  48. columnWidth : 0.25
  49. }, {
  50. xtype : "hidden",
  51. name : "pi_vendid",
  52. bind : "{pi_vendid}",
  53. fieldLabel : "供应商ID",
  54. allowBlank : true,
  55. columnWidth : 0.0
  56. }, {
  57. xtype : "textfield",
  58. name : "pi_vendcode",
  59. bind : "{pi_vendcode}",
  60. fieldLabel : "供应商编号",
  61. hidden:true,
  62. allowBlank : true,
  63. columnWidth : 0,
  64. }, {
  65. xtype : "dbfindtrigger",
  66. name : "pi_vendname",
  67. bind : "{pi_vendname}",
  68. fieldLabel : "供应商名称",
  69. allowBlank : true,
  70. columnWidth : 0.25
  71. },{
  72. xtype : "datefield",
  73. name : "pi_date",
  74. bind : "{pi_date}",
  75. fieldLabel : "单据日期",
  76. allowBlank : false,
  77. columnWidth : 0.25
  78. },{
  79. xtype : "textfield",
  80. name : "pi_total",
  81. bind : "{pi_total}",
  82. fieldLabel : "总额",
  83. allowBlank : true,
  84. readOnly: true,
  85. columnWidth : 0.25
  86. }, {
  87. xtype : "hidden",
  88. name : "pi_puid",
  89. bind : "{pi_puid}",
  90. fieldLabel : "采购单id",
  91. allowBlank : true,
  92. columnWidth : 0.25
  93. },{
  94. xtype : "textfield",
  95. name : "pi_pucode",
  96. bind : "{pi_pucode}",
  97. fieldLabel : "采购单号",
  98. allowBlank : true,
  99. columnWidth : 0.25
  100. }, {
  101. name : "detailGridField",
  102. xtype : "detailGridField",
  103. storeModel:'saas.model.purchase.prodIODetail',
  104. _detnoColumn: 'pd_pdno',
  105. columns : [
  106. {
  107. text : "序号",
  108. dataIndex : "pd_pdno",
  109. width : 100,
  110. xtype : "numbercolumn",
  111. align : 'center',
  112. format:'0',
  113. summaryType: 'count',
  114. summaryRenderer: function(value, summaryData, dataIndex) {
  115. return Ext.String.format('合计: {0}条', value);
  116. },
  117. }, {
  118. text : "id",
  119. dataIndex : "id",
  120. xtype : "numbercolumn"
  121. },{
  122. text : "物料id",
  123. dataIndex : "pd_prodid",
  124. xtype : "numbercolumn",
  125. hidden:true
  126. },
  127. {
  128. text : "物料编号",
  129. width : 200.0,
  130. dataIndex : "pd_prodcode",
  131. xtype : "",
  132. items : null,
  133. editor : {
  134. displayField : "display",
  135. editable : true,
  136. format : "",
  137. hideTrigger : false,
  138. maxLength : 100.0,
  139. minValue : null,
  140. positiveNum : false,
  141. queryMode : "local",
  142. store : null,
  143. valueField : "value",
  144. xtype : "dbfindtrigger"
  145. }
  146. },
  147. {
  148. text : "名称",
  149. dataIndex : "pr_detail",
  150. ignore:true,
  151. renderer: function (v, m, r) {
  152. return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
  153. }
  154. },
  155. {
  156. text : "规格",
  157. dataIndex : "pr_spec",
  158. ignore:true,
  159. renderer: function (v, m, r) {
  160. return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
  161. }
  162. },
  163. {
  164. text : "数量",
  165. dataIndex : "pd_inqty",
  166. editor : {
  167. xtype : "numberfield"
  168. },
  169. width : 120.0,
  170. xtype : "numbercolumn",
  171. format:'0',
  172. items : null,
  173. summaryType: 'sum'
  174. }, {
  175. text : "已转数",
  176. dataIndex : "pd_yqty",
  177. editor : {
  178. xtype : "numberfield"
  179. },
  180. width : 120.0,
  181. xtype : "numbercolumn",
  182. format:'0',
  183. items : null,
  184. summaryType: 'sum'
  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. });