QueryPanel.js 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. Ext.define('saas.view.stock.otherIn.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-otherin-querypanel',
  4. controller: 'stock-otherin-querypanel',
  5. viewModel: 'stock-otherin-querypanel',
  6. viewName: 'stock-otherin-querypanel',
  7. initComponent: function () {
  8. Ext.apply(this, {
  9. queryFormItems: [{
  10. xtype: 'textfield',
  11. name: 'pi_inoutno',
  12. emptyText: '请输入单号',
  13. getCondition: function (value) {
  14. if (value == 'ALL') {
  15. return '1=1';
  16. } else {
  17. return ' (pi_inoutno like\'%' + value + '%\') ';
  18. }
  19. }
  20. }, {
  21. xtype: 'productDbfindTrigger',
  22. name: 'pr_detail',
  23. emptyText: '输入物料编号或名称',
  24. margin: '0 0 0 20',
  25. showDetail: true
  26. }, {
  27. xtype: 'condatefield',
  28. name: 'pi_date',
  29. fieldLabel: '日期',
  30. columnWidth: 0.5,
  31. operation: 'between'
  32. }, {
  33. xtype: 'vendorDbfindTrigger',
  34. name: 'pi_vendcode',
  35. fieldLabel: '供应商',
  36. emptyText: '输入供应商编号或名称'
  37. }, {
  38. xtype: 'combobox',
  39. name: 'pi_statuscode',
  40. fieldLabel: '单据状态',
  41. allowBlank: true,
  42. emptyText: '全部',
  43. editable: false,
  44. queryMode: 'local',
  45. displayField: 'pi_status',
  46. valueField: 'pi_statuscode',
  47. store: Ext.create('Ext.data.ArrayStore', {
  48. fields: ['pi_statuscode', 'pi_status'],
  49. data: [
  50. ["ALL", "全部"],
  51. ["AUDITED", "已审核"],
  52. ["UNAUDITED", "未审核"]
  53. ]
  54. }),
  55. getCondition: function (value) {
  56. if (value == 'ALL') {
  57. return '1=1';
  58. } else {
  59. return 'pi_statuscode=\'' + value + '\'';
  60. }
  61. }
  62. }, {
  63. xtype: 'warehouseDbfindTrigger',
  64. name: 'pd_whname',
  65. fieldLabel: '仓库',
  66. showDetail: true,
  67. emptyText: '请输入仓库编号或名称'
  68. }, {
  69. xtype: 'accountDbfindTrigger',
  70. name: 'creatorName',
  71. fieldLabel: '录入人',
  72. emptyText: '请输入账户名称或姓名',
  73. getCondition: function (value) {
  74. if (!value) {
  75. return '1=1';
  76. } else {
  77. return 'prodinout.creatorName like \'%' + value + '%\'';
  78. }
  79. }
  80. }, {
  81. xtype: 'accountDbfindTrigger',
  82. name: 'pi_auditman',
  83. fieldLabel: '审核人',
  84. emptyText: '请输入账户名称或姓名'
  85. }],
  86. queryGridConfig: {
  87. idField: 'id',
  88. codeField: 'pi_inoutno',
  89. addTitle: '其它入库单',
  90. addXtype: 'stock-otherin-formpanel',
  91. defaultCondition: ' pi_class = \'其它入库单\'',
  92. baseVastUrl: '/api/storage/prodinout/',
  93. caller: 'OtherIn',
  94. baseColumn: [{
  95. text: 'id',
  96. dataIndex: 'id',
  97. hidden: true,
  98. xtype: 'numbercolumn'
  99. }, {
  100. text: '入库单号',
  101. dataIndex: 'pi_inoutno',
  102. width: 150
  103. }, {
  104. text: '单据日期',
  105. dataIndex: 'pi_date',
  106. xtype: 'datecolumn',
  107. width: 110
  108. }, {
  109. text: '金额(元)',
  110. xtype: 'numbercolumn',
  111. dataIndex: 'pi_costtotal',
  112. width: 110,
  113. renderer: function(v, m, r) {
  114. return saas.util.BaseUtil.numberFormat(v, 2, true);
  115. },
  116. }, {
  117. text: '审核状态',
  118. align: 'center',
  119. dataIndex: 'pi_status',
  120. width: 80
  121. }, {
  122. text: '供应商名称',
  123. dataIndex: 'pi_vendname',
  124. width: 200
  125. }, {
  126. text: '备注',
  127. dataIndex: 'pi_remark',
  128. width: 250
  129. }],
  130. relativeColumn: [{
  131. text: 'id',
  132. dataIndex: 'pi_id',
  133. xtype: 'numbercolumn',
  134. hidden: true
  135. }, {
  136. text: '入库单号',
  137. dataIndex: 'pi_inoutno',
  138. width: 150
  139. }, {
  140. text: '单据日期',
  141. dataIndex: 'pi_date',
  142. xtype: 'datecolumn',
  143. width: 110
  144. }, {
  145. text: '供应商名称',
  146. dataIndex: 'pi_vendname',
  147. width: 200
  148. }, {
  149. text: '审核状态',
  150. align: 'center',
  151. dataIndex: 'pi_status',
  152. width: 80
  153. }, {
  154. text: '物料编号',
  155. dataIndex: 'pd_prodcode',
  156. width: 150
  157. }, {
  158. text: '品牌',
  159. dataIndex: 'pr_brand',
  160. width: 100
  161. }, {
  162. text: '物料名称',
  163. dataIndex: 'pr_detail',
  164. width: 150
  165. }, {
  166. text: '型号',
  167. dataIndex: 'pr_orispeccode',
  168. width: 200
  169. }, {
  170. text: '规格',
  171. dataIndex: 'pr_spec',
  172. width: 200
  173. }, {
  174. text: '仓库',
  175. dataIndex: 'pd_whname',
  176. width: 120
  177. }, {
  178. text: '数量',
  179. dataIndex: 'pd_inqty',
  180. xtype: 'numbercolumn',
  181. width: 110,
  182. renderer: function(v, m, r) {
  183. return saas.util.BaseUtil.numberFormat(v, 3, false);
  184. },
  185. }, {
  186. text: '单位',
  187. dataIndex: 'pr_unit',
  188. width: 65
  189. }, {
  190. text: '单价(元)',
  191. dataIndex: 'pd_price',
  192. xtype: 'numbercolumn',
  193. width: 110,
  194. renderer: function(v, m, r) {
  195. return saas.util.BaseUtil.numberFormat(v, 4, true);
  196. }
  197. }, {
  198. text: '金额(元)',
  199. dataIndex: 'pd_total',
  200. xtype: 'numbercolumn',
  201. width: 110,
  202. renderer: function(v, m, r) {
  203. return saas.util.BaseUtil.numberFormat(v, 2, true);
  204. }
  205. }, {
  206. text: '备注',
  207. dataIndex: 'pd_remark',
  208. width: 250
  209. }]
  210. }
  211. });
  212. this.callParent(arguments);
  213. },
  214. });