FormPanel.js 7.9 KB

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