FormPanel.js 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'stock-appropriationinout-formpanel',
  4. controller: 'stock-appropriationinout-formpanel',
  5. viewModel: 'stock-appropriationinout-formpanel',
  6. viewName: 'stock-appropriationinout-formpanel',
  7. caller:'AppropriationInOut',
  8. //字段属性
  9. _title:'调拨单',
  10. _idField: 'id',
  11. _codeField: 'pi_inoutno',
  12. _statusField: 'pi_status',
  13. _statusCodeField: 'pi_statuscode',
  14. _relationColumn: 'pd_piid',
  15. _readUrl:'/api/storage/prodinout/read/',
  16. _saveUrl:'/api/storage/prodinout/save',
  17. _auditUrl:'/api/storage/prodinout/audit',
  18. _unAuditUrl: '/api/storage/prodinout/unAudit/',
  19. _deleteUrl:'/api/storage/prodinout/delete/',
  20. // _relationColumn: 'pd_piid',
  21. // _readUrl:'http://localhost:9000/prodinout/read/',
  22. // _saveUrl:'http://localhost:9000/prodinout/save',
  23. // _auditUrl:'http://localhost:9000/prodinout/audit',
  24. // _deleteUrl:'http://localhost:9000/prodinout/delete/',
  25. initId:0,
  26. toolBtns: [],
  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_class",
  37. bind : "{pi_class}",
  38. fieldLabel : "单据类型",
  39. readOnly:true,
  40. allowBlank : true,
  41. columnWidth : 0.25
  42. }, {
  43. xtype : "hidden",
  44. name : "pi_vendid",
  45. bind : "{pi_vendid}",
  46. fieldLabel : "供应商ID",
  47. allowBlank : true,
  48. columnWidth : 0.0
  49. },{
  50. xtype: 'hidden',
  51. name: 'pi_vendcode',
  52. bind: '{pi_vendcode}',
  53. fieldLabel: '供应商编号'
  54. }, {
  55. xtype: 'dbfindtrigger',
  56. name: 'pi_vendname',
  57. bind: '{pi_vendname}',
  58. fieldLabel: '供应商名称'
  59. },{
  60. xtype : "hidden",
  61. name : "pi_custid",
  62. bind : "{pi_custid}",
  63. fieldLabel : "客户ID",
  64. allowBlank : true,
  65. columnWidth : 0.0
  66. },{
  67. xtype: 'hidden',
  68. name: 'pi_custcode',
  69. bind: '{pi_custcode}',
  70. fieldLabel: '客户编号'
  71. }, {
  72. xtype: 'dbfindtrigger',
  73. name: 'pi_custname',
  74. bind: '{pi_custname}',
  75. fieldLabel: '客户名称'
  76. },{
  77. xtype : "datefield",
  78. name : "pi_date",
  79. bind : "{pi_date}",
  80. fieldLabel : "单据日期",
  81. allowBlank : false,
  82. columnWidth : 0.25
  83. },{
  84. xtype : "textfield",
  85. name : "pi_total",
  86. bind : "{pi_total}",
  87. fieldLabel : "总额",
  88. allowBlank : true,
  89. readOnly: true,
  90. columnWidth : 0.25
  91. }, {
  92. name : "detailGridField",
  93. xtype : "detailGridField",
  94. storeModel:'saas.model.purchase.ProdIODetail',
  95. // deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/',
  96. deleteDetailUrl:'/api/storage/prodinout/deleteDetail/',
  97. detnoColumn: 'pd_pdno',
  98. columns : [
  99. {
  100. text : "id",
  101. dataIndex : "id",
  102. xtype : "numbercolumn",
  103. hidden:true
  104. },{
  105. text : "物料id",
  106. dataIndex : "pd_prodid",
  107. xtype : "numbercolumn",
  108. hidden:true
  109. },
  110. {
  111. text : "物料编号",
  112. width : 200.0,
  113. dataIndex : "pd_prodcode",
  114. xtype : "",
  115. items : null,
  116. editor : {
  117. displayField : "display",
  118. editable : true,
  119. format : "",
  120. hideTrigger : false,
  121. maxLength : 100.0,
  122. minValue : null,
  123. positiveNum : false,
  124. queryMode : "local",
  125. store : null,
  126. valueField : "value",
  127. xtype : "multidbfindtrigger"
  128. }
  129. },
  130. {
  131. text : "名称",
  132. dataIndex : "pr_detail",
  133. ignore:true,
  134. renderer: function (v, m, r) {
  135. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  136. }
  137. },
  138. {
  139. text : "规格",
  140. dataIndex : "pr_spec",
  141. ignore:true,
  142. renderer: function (v, m, r) {
  143. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  144. }
  145. },
  146. {
  147. text : "数量",
  148. dataIndex : "pd_inqty",
  149. editor : {
  150. xtype : "numberfield"
  151. },
  152. width : 120.0,
  153. xtype : "numbercolumn",
  154. format:'0',
  155. items : null,
  156. summaryType: 'sum'
  157. },{
  158. text : "拨出仓库id",
  159. dataIndex : "pd_whid",
  160. xtype : "numbercolumn",
  161. hidden:true
  162. },
  163. {
  164. text : "拨出仓库编号",
  165. dataIndex : "pd_whcode",
  166. hidden:true
  167. },
  168. {
  169. text : "拨出仓库",
  170. dataIndex : "pd_whname",
  171. width : 120.0,
  172. items : null,
  173. editor : {
  174. displayField : "display",
  175. editable : true,
  176. format : "",
  177. hideTrigger : false,
  178. maxLength : 100.0,
  179. minValue : null,
  180. positiveNum : false,
  181. queryMode : "local",
  182. store : null,
  183. valueField : "value",
  184. xtype : "dbfindtrigger"
  185. }
  186. },{
  187. text : "拨入仓库id",
  188. dataIndex : "pd_inwhid",
  189. xtype : "numbercolumn",
  190. hidden:true
  191. },
  192. {
  193. text : "拨入仓库编号",
  194. dataIndex : "pd_inwhcode",
  195. hidden:true
  196. },
  197. {
  198. text : "拨入仓库",
  199. dataIndex : "pd_inwhname",
  200. width : 120.0,
  201. items : null,
  202. editor : {
  203. displayField : "display",
  204. editable : true,
  205. format : "",
  206. hideTrigger : false,
  207. maxLength : 100.0,
  208. minValue : null,
  209. positiveNum : false,
  210. queryMode : "local",
  211. store : null,
  212. valueField : "value",
  213. xtype : "dbfindtrigger"
  214. }
  215. },
  216. {
  217. text : "单价",
  218. dataIndex : "pd_orderprice",
  219. editor : {
  220. xtype : "numberfield"
  221. },
  222. width : 120.0,
  223. xtype : "numbercolumn",
  224. items : null
  225. },
  226. {
  227. text : "含税金额",
  228. dataIndex : "pd_total",
  229. width : 120.0,
  230. xtype : "numbercolumn"
  231. }, {
  232. text : "税率",
  233. dataIndex : "pd_taxrate",
  234. editor : {
  235. xtype : "numberfield"
  236. },
  237. width : 120.0,
  238. xtype : "numbercolumn",
  239. items : null
  240. },
  241. {
  242. text : "未税金额",
  243. dataIndex : "pd_nettotal",
  244. xtype : "numbercolumn"
  245. }
  246. ]
  247. }, {
  248. format : "Y-m-d",
  249. xtype : "datefield",
  250. name : "createTime",
  251. bind : "{createTime}",
  252. fieldLabel : "创建时间",
  253. allowBlank : true,
  254. columnWidth : 0.25
  255. }, {
  256. xtype : "datefield",
  257. name : "updateTime",
  258. bind : "{updateTime}",
  259. fieldLabel : "更新时间",
  260. allowBlank : true,
  261. columnWidth : 0.25
  262. }, {
  263. xtype : "textfield",
  264. readOnly : true,
  265. editable : false,
  266. name : "pi_status",
  267. bind : "{pi_status}",
  268. fieldLabel : "单据状态",
  269. allowBlank : true,
  270. columnWidth : 0.25
  271. }, {
  272. xtype : "hidden",
  273. readOnly : true,
  274. editable : false,
  275. name : "pi_statuscode",
  276. bind : "{pi_statuscode}",
  277. fieldLabel : "单据状态码",
  278. allowBlank : true,
  279. columnWidth : 0.0
  280. }]
  281. });