FormPanel.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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. _detnoColumn: 'pd_pdno',
  14. _relationColumn: 'pd_piid',
  15. _readUrl:'http://192.168.253.228:8800/prodinout/read/',
  16. _saveUrl:'http://192.168.253.228:8800/prodinout/save',
  17. _auditUrl:'http://192.168.253.228:8800/prodinout/audit',
  18. _deleteUrl:'http://192.168.253.228:8800/prodinout/delete/',
  19. _deleteDetailUrl:'http://192.168.253.228:8800/prodinout/deleteItem/',
  20. _baseVastUrl:'http://192.168.253.228:8800/prodinout/',
  21. _turnOutUrl:'http://localhost:8800/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 : "textfield",
  59. name : "pi_vendcode",
  60. bind : "{pi_vendcode}",
  61. fieldLabel : "供应商编号",
  62. hidden:true,
  63. allowBlank : true,
  64. columnWidth : 0,
  65. }, {
  66. xtype : "dbfindtrigger",
  67. name : "pi_vendname",
  68. bind : "{pi_vendname}",
  69. fieldLabel : "供应商名称",
  70. allowBlank : true,
  71. columnWidth : 0.25
  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.purchase.prodIODetail',
  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. });