FormPanel.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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. },{
  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. name : "detailGridField",
  94. xtype : "detailGridField",
  95. storeModel:'saas.model.document.ProductDTO',
  96. // deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/',
  97. deleteDetailUrl:'/api/storage/prodinout/deleteDetail/',
  98. detnoColumn: 'pd_pdno',
  99. columns : [
  100. {
  101. text : "id",
  102. dataIndex : "id",
  103. xtype : "numbercolumn",
  104. hidden:true
  105. },{
  106. text : "物料id",
  107. dataIndex : "pd_prodid",
  108. xtype : "numbercolumn",
  109. hidden:true
  110. },
  111. {
  112. text : "物料编号",
  113. width : 200.0,
  114. dataIndex : "pd_prodcode",
  115. xtype : "",
  116. items : null,
  117. editor : {
  118. displayField : "display",
  119. editable : true,
  120. format : "",
  121. hideTrigger : false,
  122. maxLength : 100.0,
  123. minValue : null,
  124. positiveNum : false,
  125. queryMode : "local",
  126. store : null,
  127. valueField : "value",
  128. xtype : "dbfindtrigger"
  129. }
  130. },
  131. {
  132. text : "名称",
  133. dataIndex : "pr_detail",
  134. ignore:true,
  135. renderer: function (v, m, r) {
  136. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  137. }
  138. },
  139. {
  140. text : "规格",
  141. dataIndex : "pr_spec",
  142. ignore:true,
  143. renderer: function (v, m, r) {
  144. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  145. }
  146. },
  147. {
  148. text : "数量",
  149. dataIndex : "pd_inqty",
  150. editor : {
  151. xtype : "numberfield"
  152. },
  153. width : 120.0,
  154. xtype : "numbercolumn",
  155. format:'0',
  156. items : null,
  157. summaryType: 'sum'
  158. }, {
  159. text : "已转数",
  160. dataIndex : "pd_yqty",
  161. editor : {
  162. xtype : "numberfield"
  163. },
  164. width : 120.0,
  165. xtype : "numbercolumn",
  166. format:'0',
  167. items : null,
  168. summaryType: 'sum'
  169. },{
  170. text : "仓库id",
  171. dataIndex : "pd_whid",
  172. xtype : "numbercolumn",
  173. hidden:true
  174. },
  175. {
  176. text : "仓库编号",
  177. dataIndex : "pd_whcode",
  178. hidden:true
  179. },
  180. {
  181. text : "仓库",
  182. dataIndex : "pd_whname",
  183. width : 120.0,
  184. items : null,
  185. editor : {
  186. displayField : "display",
  187. editable : true,
  188. format : "",
  189. hideTrigger : false,
  190. maxLength : 100.0,
  191. minValue : null,
  192. positiveNum : false,
  193. queryMode : "local",
  194. store : null,
  195. valueField : "value",
  196. xtype : "dbfindtrigger"
  197. }
  198. },
  199. {
  200. text : "单价",
  201. dataIndex : "pd_orderprice",
  202. width : 120.0,
  203. xtype : "numbercolumn",
  204. items : null
  205. },
  206. {
  207. text : "含税金额",
  208. dataIndex : "pd_total",
  209. width : 120.0,
  210. xtype : "numbercolumn"
  211. }, {
  212. text : "税率",
  213. dataIndex : "pd_taxrate",
  214. width : 120.0,
  215. xtype : "numbercolumn",
  216. items : null
  217. },
  218. {
  219. text : "未税金额",
  220. dataIndex : "pd_nettotal",
  221. xtype : "numbercolumn"
  222. }
  223. ]
  224. }, {
  225. format : "Y-m-d",
  226. xtype : "datefield",
  227. name : "createTime",
  228. bind : "{createTime}",
  229. fieldLabel : "创建时间",
  230. allowBlank : true,
  231. columnWidth : 0.25
  232. }, {
  233. xtype : "datefield",
  234. name : "updateTime",
  235. bind : "{updateTime}",
  236. fieldLabel : "更新时间",
  237. allowBlank : true,
  238. columnWidth : 0.25
  239. }, {
  240. xtype : "textfield",
  241. readOnly : true,
  242. editable : false,
  243. name : "pi_status",
  244. bind : "{pi_status}",
  245. fieldLabel : "单据状态",
  246. allowBlank : true,
  247. columnWidth : 0.25
  248. }, {
  249. xtype : "hidden",
  250. readOnly : true,
  251. editable : false,
  252. name : "pi_statuscode",
  253. bind : "{pi_statuscode}",
  254. fieldLabel : "单据状态码",
  255. allowBlank : true,
  256. columnWidth : 0.0
  257. }]
  258. });