FormPanel.js 7.9 KB

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