FormPanel.js 8.4 KB

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