QueryPanel.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. Ext.define('saas.view.stock.make.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-make-querypanel',
  4. controller: 'stock-make-querypanel',
  5. viewModel: 'stock-make-querypanel',
  6. viewName: 'stock-make-querypanel',
  7. initComponent: function () {
  8. Ext.apply(this, {
  9. queryFormItems: [{
  10. xtype: 'textfield',
  11. name: 'ma_code',
  12. emptyText: '请输入单号',
  13. }, {
  14. xtype: 'bomDbfindTrigger',
  15. name: 'ma_proddetail',
  16. emptyText: '请输入产品编号、名称或型号',
  17. margin: '0 0 0 20'
  18. }, {
  19. xtype: 'condatefield',
  20. name: 'createTime',
  21. fieldLabel: '日期',
  22. columnWidth: 0.5,
  23. operation: 'between'
  24. }, {
  25. xtype: 'combobox',
  26. name: 'ma_type',
  27. fieldLabel: '类型',
  28. allowBlank: true,
  29. editable: false,
  30. columnWidth: 0.25,
  31. emptyText: '全部',
  32. queryMode: 'local',
  33. displayField: 'name',
  34. valueField: 'value',
  35. store: Ext.create('Ext.data.ArrayStore', {
  36. fields: ['name', 'value'],
  37. data: [
  38. ["全部", "ALL"],
  39. ["组装", "组装"],
  40. ["拆件", "拆件"]
  41. ]
  42. }),
  43. getCondition: function (value) {
  44. if (value == 'ALL') {
  45. return '1=1';
  46. } else {
  47. return 'ma_type=\'' + value + '\'';
  48. }
  49. }
  50. }, {
  51. xtype: 'combobox',
  52. name: 'ma_statuscode',
  53. fieldLabel: '单据状态',
  54. queryMode: 'local',
  55. displayField: 'ma_status',
  56. valueField: 'ma_statuscode',
  57. emptyText: '全部',
  58. editable: false,
  59. store: Ext.create('Ext.data.ArrayStore', {
  60. fields: ['ma_statuscode', 'ma_status'],
  61. data: [
  62. ["ALL", "全部"],
  63. ["AUDITED", "已审核"],
  64. ["UNAUDITED", "未审核"]
  65. ]
  66. }),
  67. getCondition: function (value) {
  68. if (value == 'ALL') {
  69. return '1=1';
  70. } else {
  71. return 'ma_statuscode=\'' + value + '\'';
  72. }
  73. }
  74. }, {
  75. xtype: 'accountDbfindTrigger',
  76. name: 'creatorName',
  77. fieldLabel: '录入人',
  78. emptyText: '请输入账户名称或姓名',
  79. getCondition: function (value) {
  80. if (!value) {
  81. return '1=1';
  82. } else {
  83. return 'make.creatorName like\'%' + value + '%\'';
  84. }
  85. }
  86. }, {
  87. xtype: 'accountDbfindTrigger',
  88. name: 'ma_auditman',
  89. fieldLabel: '审核人',
  90. emptyText: '请输入账户名称或姓名'
  91. }],
  92. moreQueryFormItems: [],
  93. queryGridConfig: {
  94. idField: 'id',
  95. codeField: 'ma_code',
  96. addTitle: '制造单',
  97. addXtype: 'stock-make-formpanel',
  98. defaultCondition: '',
  99. baseVastUrl: '/api/storage/make/',
  100. caller: 'Make',
  101. baseColumn: [{
  102. text: 'id',
  103. dataIndex: 'id',
  104. hidden: true,
  105. xtype: 'numbercolumn'
  106. }, {
  107. text: '制造单号',
  108. dataIndex: 'ma_code',
  109. width: 150
  110. }, {
  111. text: '类型',
  112. dataIndex: 'ma_type',
  113. width: 100
  114. }, {
  115. text: '产品编号',
  116. dataIndex: 'ma_prodcode',
  117. width: 150
  118. }, {
  119. text: '版本号',
  120. dataIndex: 'ma_version',
  121. width: 80
  122. }, {
  123. text: '产品名称',
  124. dataIndex: 'ma_proddetail',
  125. width: 150
  126. }, {
  127. text: '产品型号',
  128. dataIndex: 'ma_prodorispec',
  129. width: 200
  130. }, {
  131. text: '产品规格',
  132. dataIndex: 'ma_prodspec',
  133. width: 200
  134. }, {
  135. text: '数量',
  136. dataIndex: 'ma_qty',
  137. xtype: 'numbercolumn',
  138. width: 110,
  139. renderer: function(v, m, r) {
  140. return saas.util.BaseUtil.numberFormat(v, 3, false);
  141. },
  142. }, {
  143. text: '单位',
  144. dataIndex: 'ma_produnit',
  145. width: 80,
  146. }, {
  147. text: '审核状态',
  148. align: 'center',
  149. dataIndex: 'ma_status',
  150. width: 80,
  151. }, {
  152. text: '单位成本',
  153. dataIndex: 'ma_total',
  154. xtype: 'numbercolumn',
  155. hidden: true,
  156. }],
  157. relativeColumn: []
  158. }
  159. });
  160. this.callParent(arguments);
  161. },
  162. });