FormPanel.js 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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. _auditmanField: 'pi_auditman',
  15. _auditdateField:'pi_auditdate',
  16. _relationColumn: 'pd_piid',
  17. _readUrl: '/api/storage/prodinout/read',
  18. _saveUrl: '/api/storage/prodinout/save',
  19. _auditUrl: '/api/storage/prodinout/audit',
  20. _unAuditUrl: '/api/storage/prodinout/unAudit',
  21. _deleteUrl: '/api/storage/prodinout/delete',
  22. initId: 0,
  23. toolBtns: [],
  24. defaultItems: [{
  25. xtype: 'hidden',
  26. name: 'id',
  27. fieldLabel: 'id',
  28. allowBlank: true,
  29. columnWidth: 0
  30. }, {
  31. xtype: "hidden",
  32. name: "pi_class",
  33. fieldLabel: "单据类型",
  34. readOnly: true,
  35. allowBlank: true,
  36. columnWidth: 0.25
  37. }, {
  38. xtype: "hidden",
  39. name: "pi_custid",
  40. fieldLabel: "客户ID",
  41. allowBlank: true,
  42. columnWidth: 0.0
  43. }, {
  44. xtype: 'hidden',
  45. name: 'pi_custcode',
  46. fieldLabel: '客户编号'
  47. }, {
  48. xtype: 'customerDbfindTrigger',
  49. name: 'pi_custname',
  50. allowBlank : true,
  51. fieldLabel: '客户名称'
  52. }, {
  53. xtype: "datefield",
  54. name: "pi_date",
  55. fieldLabel: "单据日期",
  56. allowBlank: false,
  57. columnWidth: 0.25,
  58. defaultValue: new Date()
  59. }, {
  60. xtype: "numberfield",
  61. name: "pi_costtotal",
  62. fieldLabel: "金额(元)",
  63. allowBlank: true,
  64. readOnly: true,
  65. columnWidth: 0.25,
  66. thousandSeparator: ','
  67. }, {
  68. name: "detailGridField",
  69. xtype: "detailGridField",
  70. storeModel:'saas.model.stock.OtherOut',
  71. deleteDetailUrl: '/api/storage/prodinout/deleteDetail',
  72. detnoColumn: 'pd_pdno',
  73. columns: [{
  74. text: "id",
  75. dataIndex: "id",
  76. xtype: "numbercolumn",
  77. hidden: true
  78. }, {
  79. text: "物料id",
  80. dataIndex: "pd_prodid",
  81. xtype: "numbercolumn",
  82. hidden: true
  83. }, {
  84. text: "物料编号",
  85. width: 150.0,
  86. dataIndex: "pd_prodcode",
  87. xtype: "",
  88. items: null,
  89. allowBlank : false,
  90. editor: {
  91. displayField: "display",
  92. editable: true,
  93. format: "",
  94. hideTrigger: false,
  95. maxLength: 100.0,
  96. minValue: null,
  97. positiveNum: false,
  98. queryMode: "local",
  99. store: null,
  100. valueField: "value",
  101. xtype: "productMultiDbfindTrigger"
  102. }
  103. }, {
  104. text: 'model映射需要',
  105. dataIndex: 'productDTO',
  106. hidden: true,
  107. }, {
  108. text : "品牌",
  109. width : 100.0,
  110. dataIndex : "pr_brand",
  111. ignore:true,
  112. renderer: function (v, m, r) {
  113. if(!v){
  114. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  115. }
  116. return v;
  117. }
  118. }, {
  119. text : "物料名称",
  120. width : 150.0,
  121. dataIndex : "pr_detail",
  122. ignore:true,
  123. renderer: function (v, m, r) {
  124. if(!v){
  125. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  126. }
  127. return v;
  128. }
  129. }, {
  130. text : "型号",
  131. width : 200.0,
  132. dataIndex : "pr_orispeccode",
  133. ignore:true,
  134. renderer: function (v, m, r) {
  135. if(!v){
  136. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  137. }
  138. return v;
  139. }
  140. }, {
  141. text : "规格",
  142. width : 200,
  143. dataIndex : "pr_spec",
  144. ignore:true,
  145. renderer: function (v, m, r) {
  146. if(!v){
  147. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  148. }
  149. return v;
  150. }
  151. }, {
  152. text: "仓库id",
  153. dataIndex: "pd_whid",
  154. xtype: "numbercolumn",
  155. hidden: true
  156. }, {
  157. text: "仓库编号",
  158. dataIndex: "pd_whcode",
  159. hidden: true
  160. }, {
  161. text: "仓库",
  162. dataIndex: "pd_whname",
  163. width: 80.0,
  164. allowBlank : false,
  165. editor: {
  166. displayField: "display",
  167. editable: true,
  168. format: "",
  169. hideTrigger: false,
  170. maxLength: 100.0,
  171. minValue: null,
  172. positiveNum: false,
  173. queryMode: "local",
  174. store: null,
  175. valueField: "value",
  176. xtype: "warehouseDbfindTrigger"
  177. }
  178. }, {
  179. text: "数量",
  180. xtype: 'numbercolumn',
  181. dataIndex: "pd_outqty",
  182. allowBlank : false,
  183. width: 110.0,
  184. editor : {
  185. xtype : "numberfield",
  186. decimalPrecision: 3,
  187. minValue:0
  188. },
  189. renderer : function(v) {
  190. return saas.util.BaseUtil.numberFormat(v, 3, false);
  191. },
  192. summaryType: 'sum',
  193. summaryRenderer: function(v) {
  194. return saas.util.BaseUtil.numberFormat(v, 3, false);
  195. }
  196. },{
  197. text : "单位",
  198. width : 65.0,
  199. dataIndex : "pr_unit",
  200. ignore:true,
  201. renderer: function (v, m, r) {
  202. if(!v){
  203. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  204. }
  205. return v;
  206. }
  207. },{
  208. text: "单价(元)",
  209. xtype: 'numbercolumn',
  210. dataIndex: "pd_price",
  211. width : 120.0,
  212. editor : {
  213. xtype : "numberfield",
  214. decimalPrecision: 4,
  215. minValue:0
  216. },
  217. renderer : function(v) {
  218. return saas.util.BaseUtil.numberFormat(v, 4, true);
  219. }
  220. }, {
  221. text: "金额(元)",
  222. xtype: 'numbercolumn',
  223. dataIndex: "pd_total",
  224. width: 120.0,
  225. renderer : function(v) {
  226. return saas.util.BaseUtil.numberFormat(v, 2, true);
  227. },
  228. summaryType: 'sum',
  229. summaryRenderer: function(v) {
  230. return saas.util.BaseUtil.numberFormat(v, 2, true);
  231. }
  232. }, {
  233. text : "备注",
  234. dataIndex : "pd_remark",
  235. width : 250,
  236. items : null,
  237. editor : {
  238. xtype : "textfield"
  239. }
  240. }
  241. ]
  242. },{
  243. xtype : "textfield",
  244. name : "pi_remark",
  245. fieldLabel : "备注",
  246. columnWidth : 1
  247. },{
  248. xtype : "hidden",
  249. name : "creatorId",
  250. fieldLabel : "录入人ID",
  251. readOnly:true
  252. },
  253. {
  254. xtype : "textfield",
  255. name : "creatorName",
  256. fieldLabel : "录入人",
  257. readOnly:true
  258. }, {
  259. xtype : "datefield",
  260. name : "createTime",
  261. fieldLabel : "录入日期",
  262. readOnly:true,
  263. defaultValue: new Date()
  264. },{
  265. xtype : "hidden",
  266. name : "updaterId",
  267. fieldLabel : "更新人ID",
  268. readOnly:true
  269. },{
  270. xtype : "hidden",
  271. name : "updaterName",
  272. fieldLabel : "更新人",
  273. readOnly:true
  274. }, {
  275. xtype : "hidden",
  276. name : "updateTime",
  277. fieldLabel : "更新日期",
  278. readOnly:true,
  279. defaultValue: new Date()
  280. }, {
  281. xtype : "textfield",
  282. name : "pi_auditman",
  283. fieldLabel : "审核人",
  284. readOnly:true
  285. }, {
  286. xtype : "datefield",
  287. name : "pi_auditdate",
  288. fieldLabel : "审核日期",
  289. readOnly:true
  290. }]
  291. });