FormPanel.js 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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. defaultValue: new Date()
  84. }
  85. // ,{
  86. // xtype : "textfield",
  87. // name : "pi_total",
  88. // bind : "{pi_total}",
  89. // fieldLabel : "总额",
  90. // allowBlank : true,
  91. // readOnly: true,
  92. // columnWidth : 0.25
  93. // }
  94. ,
  95. {
  96. name : "detailGridField",
  97. xtype : "detailGridField",
  98. storeModel:'saas.model.purchase.ProdIODetail',
  99. // deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/',
  100. deleteDetailUrl:'/api/storage/prodinout/deleteDetail/',
  101. detnoColumn: 'pd_pdno',
  102. columns : [
  103. {
  104. text : "id",
  105. dataIndex : "id",
  106. xtype : "numbercolumn",
  107. hidden:true
  108. },{
  109. text : "物料id",
  110. dataIndex : "pd_prodid",
  111. xtype : "numbercolumn",
  112. hidden:true
  113. },
  114. {
  115. text : "物料编号",
  116. width : 200.0,
  117. dataIndex : "pd_prodcode",
  118. xtype : "",
  119. items : null,
  120. editor : {
  121. displayField : "display",
  122. editable : true,
  123. format : "",
  124. hideTrigger : false,
  125. maxLength : 100.0,
  126. minValue : null,
  127. positiveNum : false,
  128. queryMode : "local",
  129. store : null,
  130. valueField : "value",
  131. xtype : "multidbfindtrigger"
  132. }
  133. },{
  134. text: 'model映射需要',
  135. dataIndex: 'productDTO',
  136. hidden: true,
  137. },
  138. {
  139. text : "名称",
  140. dataIndex : "pr_detail",
  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 : "pr_spec",
  149. ignore:true,
  150. renderer: function (v, m, r) {
  151. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  152. }
  153. },
  154. {
  155. text : "数量",
  156. dataIndex : "pd_inqty",
  157. width : 120.0,
  158. editor : {
  159. xtype : "numberfield",
  160. decimalPrecision: 8,
  161. minValue:0
  162. },
  163. renderer : function(v) {
  164. var arr = (v + '.').split('.');
  165. var xr = (new Array(arr[1].length)).fill('0');
  166. var format = '0.' + xr.join();
  167. return Ext.util.Format.number(v, format);
  168. },
  169. summaryType: 'sum',
  170. summaryRenderer: function(v) {
  171. var arr = (v + '.').split('.');
  172. var xr = (new Array(arr[1].length)).fill('0');
  173. var format = '0.' + xr.join();
  174. return Ext.util.Format.number(v, format);
  175. }
  176. },{
  177. text : "拨出仓库id",
  178. dataIndex : "pd_whid",
  179. xtype : "numbercolumn",
  180. hidden:true
  181. },
  182. {
  183. text : "拨出仓库编号",
  184. dataIndex : "pd_whcode",
  185. hidden:true
  186. },
  187. {
  188. text : "拨出仓库",
  189. dataIndex : "pd_whname",
  190. width : 120.0,
  191. items : null,
  192. editor : {
  193. displayField : "display",
  194. editable : true,
  195. format : "",
  196. hideTrigger : false,
  197. maxLength : 100.0,
  198. minValue : null,
  199. positiveNum : false,
  200. queryMode : "local",
  201. store : null,
  202. valueField : "value",
  203. xtype : "dbfindtrigger"
  204. }
  205. },{
  206. text : "拨入仓库id",
  207. dataIndex : "pd_inwhid",
  208. xtype : "numbercolumn",
  209. hidden:true
  210. },
  211. {
  212. text : "拨入仓库编号",
  213. dataIndex : "pd_inwhcode",
  214. hidden:true
  215. },
  216. {
  217. text : "拨入仓库",
  218. dataIndex : "pd_inwhname",
  219. width : 120.0,
  220. items : null,
  221. editor : {
  222. displayField : "display",
  223. editable : true,
  224. format : "",
  225. hideTrigger : false,
  226. maxLength : 100.0,
  227. minValue : null,
  228. positiveNum : false,
  229. queryMode : "local",
  230. store : null,
  231. valueField : "value",
  232. xtype : "dbfindtrigger"
  233. }
  234. }
  235. // ,
  236. // {
  237. // text : "单价",
  238. // dataIndex : "pd_orderprice",
  239. // editor : {
  240. // xtype : "numberfield"
  241. // },
  242. // width : 120.0,
  243. // xtype : "numbercolumn",
  244. // items : null
  245. // },
  246. // {
  247. // text : "含税金额",
  248. // dataIndex : "pd_total",
  249. // width : 120.0,
  250. // xtype : "numbercolumn"
  251. // }, {
  252. // text : "税率",
  253. // dataIndex : "pd_taxrate",
  254. // editor : {
  255. // xtype : "numberfield"
  256. // },
  257. // width : 120.0,
  258. // xtype : "numbercolumn",
  259. // items : null
  260. // },
  261. // {
  262. // text : "未税金额",
  263. // dataIndex : "pd_nettotal",
  264. // xtype : "numbercolumn"
  265. // }
  266. ]
  267. }, {
  268. xtype : "datefield",
  269. name : "createTime",
  270. bind : "{createTime}",
  271. fieldLabel : "录入日期",
  272. allowBlank : true,
  273. columnWidth : 0.25
  274. }, {
  275. xtype : "datefield",
  276. name : "updateTime",
  277. bind : "{updateTime}",
  278. fieldLabel : "更新日期",
  279. allowBlank : true,
  280. columnWidth : 0.25
  281. }, {
  282. xtype : "textfield",
  283. readOnly : true,
  284. editable : false,
  285. name : "pi_status",
  286. bind : "{pi_status}",
  287. fieldLabel : "单据状态",
  288. allowBlank : true,
  289. columnWidth : 0.25
  290. }, {
  291. xtype : "hidden",
  292. readOnly : true,
  293. editable : false,
  294. name : "pi_statuscode",
  295. bind : "{pi_statuscode}",
  296. fieldLabel : "单据状态码",
  297. allowBlank : true,
  298. columnWidth : 0.0
  299. }]
  300. });