FormPanel.js 7.8 KB

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