FormPanel.js 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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. // ,{
  85. // xtype : "textfield",
  86. // name : "pi_total",
  87. // bind : "{pi_total}",
  88. // fieldLabel : "总额",
  89. // allowBlank : true,
  90. // readOnly: true,
  91. // columnWidth : 0.25
  92. // }
  93. ,
  94. {
  95. name : "detailGridField",
  96. xtype : "detailGridField",
  97. storeModel:'saas.model.purchase.ProdIODetail',
  98. // deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/',
  99. deleteDetailUrl:'/api/storage/prodinout/deleteDetail/',
  100. detnoColumn: 'pd_pdno',
  101. columns : [
  102. {
  103. text : "id",
  104. dataIndex : "id",
  105. xtype : "numbercolumn",
  106. hidden:true
  107. },{
  108. text : "物料id",
  109. dataIndex : "pd_prodid",
  110. xtype : "numbercolumn",
  111. hidden:true
  112. },
  113. {
  114. text : "物料编号",
  115. width : 200.0,
  116. dataIndex : "pd_prodcode",
  117. xtype : "",
  118. items : null,
  119. editor : {
  120. displayField : "display",
  121. editable : true,
  122. format : "",
  123. hideTrigger : false,
  124. maxLength : 100.0,
  125. minValue : null,
  126. positiveNum : false,
  127. queryMode : "local",
  128. store : null,
  129. valueField : "value",
  130. xtype : "multidbfindtrigger"
  131. }
  132. },
  133. {
  134. text : "名称",
  135. dataIndex : "pr_detail",
  136. ignore:true,
  137. renderer: function (v, m, r) {
  138. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  139. }
  140. },
  141. {
  142. text : "规格",
  143. dataIndex : "pr_spec",
  144. ignore:true,
  145. renderer: function (v, m, r) {
  146. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  147. }
  148. },
  149. {
  150. text : "数量",
  151. dataIndex : "pd_inqty",
  152. editor : {
  153. xtype : "numberfield"
  154. },
  155. width : 120.0,
  156. xtype : "numbercolumn",
  157. format:'0',
  158. items : null,
  159. summaryType: 'sum'
  160. },{
  161. text : "拨出仓库id",
  162. dataIndex : "pd_whid",
  163. xtype : "numbercolumn",
  164. hidden:true
  165. },
  166. {
  167. text : "拨出仓库编号",
  168. dataIndex : "pd_whcode",
  169. hidden:true
  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. text : "拨入仓库id",
  191. dataIndex : "pd_inwhid",
  192. xtype : "numbercolumn",
  193. hidden:true
  194. },
  195. {
  196. text : "拨入仓库编号",
  197. dataIndex : "pd_inwhcode",
  198. hidden:true
  199. },
  200. {
  201. text : "拨入仓库",
  202. dataIndex : "pd_inwhname",
  203. width : 120.0,
  204. items : null,
  205. editor : {
  206. displayField : "display",
  207. editable : true,
  208. format : "",
  209. hideTrigger : false,
  210. maxLength : 100.0,
  211. minValue : null,
  212. positiveNum : false,
  213. queryMode : "local",
  214. store : null,
  215. valueField : "value",
  216. xtype : "dbfindtrigger"
  217. }
  218. }
  219. // ,
  220. // {
  221. // text : "单价",
  222. // dataIndex : "pd_orderprice",
  223. // editor : {
  224. // xtype : "numberfield"
  225. // },
  226. // width : 120.0,
  227. // xtype : "numbercolumn",
  228. // items : null
  229. // },
  230. // {
  231. // text : "含税金额",
  232. // dataIndex : "pd_total",
  233. // width : 120.0,
  234. // xtype : "numbercolumn"
  235. // }, {
  236. // text : "税率",
  237. // dataIndex : "pd_taxrate",
  238. // editor : {
  239. // xtype : "numberfield"
  240. // },
  241. // width : 120.0,
  242. // xtype : "numbercolumn",
  243. // items : null
  244. // },
  245. // {
  246. // text : "未税金额",
  247. // dataIndex : "pd_nettotal",
  248. // xtype : "numbercolumn"
  249. // }
  250. ]
  251. }, {
  252. format : "Y-m-d",
  253. xtype : "datefield",
  254. name : "createTime",
  255. bind : "{createTime}",
  256. fieldLabel : "创建时间",
  257. allowBlank : true,
  258. columnWidth : 0.25
  259. }, {
  260. xtype : "datefield",
  261. name : "updateTime",
  262. bind : "{updateTime}",
  263. fieldLabel : "更新时间",
  264. allowBlank : true,
  265. columnWidth : 0.25
  266. }, {
  267. xtype : "textfield",
  268. readOnly : true,
  269. editable : false,
  270. name : "pi_status",
  271. bind : "{pi_status}",
  272. fieldLabel : "单据状态",
  273. allowBlank : true,
  274. columnWidth : 0.25
  275. }, {
  276. xtype : "hidden",
  277. readOnly : true,
  278. editable : false,
  279. name : "pi_statuscode",
  280. bind : "{pi_statuscode}",
  281. fieldLabel : "单据状态码",
  282. allowBlank : true,
  283. columnWidth : 0.0
  284. }]
  285. });