FormPanel.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. Ext.define('saas.view.stock.otherOut.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'stock-otherout-formpanel',
  4. controller: 'stock-otherout-formpanel',
  5. viewModel: 'stock-otherout-formpanel',
  6. viewName: 'stock-otherout-formpanel',
  7. caller: 'OtherOut',
  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. xtype: "textfield",
  85. name: "pi_total",
  86. bind: "{pi_total}",
  87. fieldLabel: "总额",
  88. allowBlank: true,
  89. readOnly: true,
  90. columnWidth: 0.25
  91. }, {
  92. name: "detailGridField",
  93. xtype: "detailGridField",
  94. storeModel: 'saas.model.document.ProductDTO',
  95. // _deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/',
  96. deleteDetailUrl: '/api/storage/prodinout/deleteDetail/',
  97. detnoColumn: 'pd_pdno',
  98. columns: [{
  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: "已转数",
  158. dataIndex: "pd_yqty",
  159. editor: {
  160. xtype: "numberfield"
  161. },
  162. width: 120.0,
  163. xtype: "numbercolumn",
  164. format: '0',
  165. items: null,
  166. summaryType: 'sum'
  167. }, {
  168. text: "仓库id",
  169. dataIndex: "pd_whid",
  170. xtype: "numbercolumn",
  171. hidden: true
  172. },
  173. {
  174. text: "仓库编号",
  175. dataIndex: "pd_whcode",
  176. hidden: true
  177. },
  178. {
  179. text: "仓库",
  180. dataIndex: "pd_whname",
  181. width: 120.0,
  182. items: null,
  183. editor: {
  184. displayField: "display",
  185. editable: true,
  186. format: "",
  187. hideTrigger: false,
  188. maxLength: 100.0,
  189. minValue: null,
  190. positiveNum: false,
  191. queryMode: "local",
  192. store: null,
  193. valueField: "value",
  194. xtype: "dbfindtrigger"
  195. }
  196. },
  197. {
  198. text: "单价",
  199. dataIndex: "pd_orderprice",
  200. width: 120.0,
  201. xtype: "numbercolumn",
  202. items: null
  203. },
  204. {
  205. text: "含税金额",
  206. dataIndex: "pd_total",
  207. width: 120.0,
  208. xtype: "numbercolumn"
  209. }, {
  210. text: "税率",
  211. dataIndex: "pd_taxrate",
  212. width: 120.0,
  213. xtype: "numbercolumn",
  214. items: null
  215. },
  216. {
  217. text: "未税金额",
  218. dataIndex: "pd_nettotal",
  219. xtype: "numbercolumn"
  220. }
  221. ]
  222. }, {
  223. format: "Y-m-d",
  224. xtype: "datefield",
  225. name: "createTime",
  226. bind: "{createTime}",
  227. fieldLabel: "创建时间",
  228. allowBlank: true,
  229. columnWidth: 0.25
  230. }, {
  231. xtype: "datefield",
  232. name: "updateTime",
  233. bind: "{updateTime}",
  234. fieldLabel: "更新时间",
  235. allowBlank: true,
  236. columnWidth: 0.25
  237. }, {
  238. xtype: "textfield",
  239. readOnly: true,
  240. editable: false,
  241. name: "pi_status",
  242. bind: "{pi_status}",
  243. fieldLabel: "单据状态",
  244. allowBlank: true,
  245. columnWidth: 0.25
  246. }, {
  247. xtype: "hidden",
  248. readOnly: true,
  249. editable: false,
  250. name: "pi_statuscode",
  251. bind: "{pi_statuscode}",
  252. fieldLabel: "单据状态码",
  253. allowBlank: true,
  254. columnWidth: 0.0
  255. }]
  256. });