QueryPanel.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'purchase-purchaseout-querypanel',
  4. controller: 'purchase-purchaseout-querypanel',
  5. viewModel: 'purchase-purchaseout-querypanel',
  6. viewName: 'purchase-purchaseout-querypanel',
  7. initComponent: function () {
  8. Ext.apply(this, {
  9. queryFormItems: [{
  10. xtype: 'textfield',
  11. name: 'pi_inoutno',
  12. emptyText: '请输入单号或供应商名称',
  13. getCondition: function (value) {
  14. return ' (pi_inoutno like\'%' + value + '%\' or pi_vendcode like \'%' + value + '%\' or pi_vendname like \'%' + value + '%\') ';
  15. }
  16. }, {
  17. margin: '0 0 0 20',
  18. xtype: 'productDbfindTrigger',
  19. name: 'pr_detail',
  20. emptyText: '输入物料编号或名称',
  21. showDetail: true
  22. }, {
  23. xtype: 'condatefield',
  24. name: 'pi_date',
  25. fieldLabel: '日期',
  26. columnWidth: 0.5,
  27. operation: 'between'
  28. }, {
  29. xtype: 'combobox',
  30. name: 'pi_statuscode',
  31. fieldLabel: '单据状态',
  32. allowBlank: true,
  33. emptyText: '全部',
  34. editable: false,
  35. queryMode: 'local',
  36. displayField: 'pi_status',
  37. valueField: 'pi_statuscode',
  38. store: Ext.create('Ext.data.ArrayStore', {
  39. fields: ['pi_statuscode', 'pi_status'],
  40. data: [
  41. ["ALL", "全部"],
  42. ["AUDITED", "已审核"],
  43. ["UNAUDITED", "未审核"]
  44. ]
  45. }),
  46. getCondition: function (value) {
  47. if (value == 'ALL') {
  48. return '1=1';
  49. } else {
  50. return 'pi_statuscode=\'' + value + '\'';
  51. }
  52. }
  53. }, {
  54. xtype: 'multicombo',
  55. name: 'pi_prstatuscode',
  56. fieldLabel: '付款状态',
  57. emptyText: '全部',
  58. datas: [
  59. ["PAYNONE", "未付款"],
  60. ["PAYPART", "部分付款"],
  61. ["PAYALL", "已付款"]
  62. ]
  63. }, {
  64. xtype: 'warehouseDbfindTrigger',
  65. name: 'pd_whname',
  66. fieldLabel: '仓库',
  67. emptyText: '请输入仓库编号或名称',
  68. showDetail: true,
  69. getCondition: function (value) {
  70. if (!value) {
  71. return '1=1';
  72. } else {
  73. return 'prodiodetail.pd_whname like\'%' + value + '%\'';
  74. }
  75. }
  76. }, {
  77. xtype: 'textfield',
  78. name: 'pi_iocode',
  79. fieldLabel: '关联验收单号',
  80. emptyText: '请输入采购验收单号',
  81. }, {
  82. xtype: 'accountDbfindTrigger',
  83. name: 'creatorName',
  84. fieldLabel: '录入人',
  85. emptyText: '请输入账户名称或姓名',
  86. getCondition: function (value) {
  87. if (!value) {
  88. return '1=1';
  89. } else {
  90. return 'prodinout.creatorName like\'%' + value + '%\'';
  91. }
  92. }
  93. }, {
  94. xtype: 'accountDbfindTrigger',
  95. name: 'pi_auditman',
  96. fieldLabel: '审核人',
  97. emptyText: '请输入账户名称或姓名'
  98. }],
  99. queryGridConfig: {
  100. idField: 'id',
  101. codeField: 'pi_inoutno',
  102. addTitle: '采购验退单',
  103. addXtype: 'purchase-purchaseout-formpanel',
  104. defaultCondition: ' pi_class = \'采购验退单\'',
  105. baseVastUrl: '/api/purchase/prodinout/',
  106. caller: 'PurchaseOut',
  107. baseColumn: [{
  108. text: 'id',
  109. dataIndex: 'id',
  110. hidden: true,
  111. xtype: 'numbercolumn'
  112. }, {
  113. text: '验退单号',
  114. dataIndex: 'pi_inoutno',
  115. width: 150
  116. }, {
  117. text: '单据类型',
  118. dataIndex: 'pi_class',
  119. hidden: true
  120. }, {
  121. text: '单据日期',
  122. dataIndex: 'pi_date',
  123. xtype: 'datecolumn',
  124. width: 110
  125. }, {
  126. text: '供应商名称',
  127. dataIndex: 'pi_vendname',
  128. width: 200
  129. }, {
  130. text: '金额(元)',
  131. xtype: 'numbercolumn',
  132. dataIndex: 'pi_nettotal',
  133. width: 110,
  134. renderer: function(v, m, r) {
  135. return saas.util.BaseUtil.numberFormat(v, 2, true);
  136. },
  137. }, {
  138. text: '价税合计(元)',
  139. xtype: 'numbercolumn',
  140. dataIndex: 'pi_total',
  141. width: 110,
  142. renderer: function(v, m, r) {
  143. return saas.util.BaseUtil.numberFormat(v, 2, true);
  144. },
  145. }, {
  146. text: '币别',
  147. dataIndex: 'pi_currency',
  148. align: 'center',
  149. width: 65
  150. }, {
  151. text: '审核状态',
  152. align: 'center',
  153. dataIndex: 'pi_status',
  154. width: 80
  155. }, {
  156. text: '付款状态',
  157. align: 'center',
  158. dataIndex: 'pi_prstatus',
  159. width: 80
  160. }, {
  161. text: '关联验收单号',
  162. dataIndex: 'pi_iocode',
  163. width: 150
  164. }, {
  165. text: '备注',
  166. dataIndex: 'pi_remark',
  167. width: 250
  168. }],
  169. relativeColumn: [{
  170. text: 'id',
  171. dataIndex: 'pu_id',
  172. xtype: 'numbercolumn',
  173. hidden: true
  174. }, {
  175. text: '验退单号',
  176. dataIndex: 'pi_inoutno',
  177. width: 150
  178. }, {
  179. text: '单据日期',
  180. dataIndex: 'pi_date',
  181. xtype: 'datecolumn',
  182. width: 110
  183. }, {
  184. text: '供应商名称',
  185. dataIndex: 'pi_vendname',
  186. width: 200
  187. }, {
  188. text: '审核状态',
  189. align: 'center',
  190. dataIndex: 'pi_status',
  191. width: 80
  192. }, {
  193. text: '物料编号',
  194. dataIndex: 'pd_prodcode',
  195. width: 150
  196. }, {
  197. text: '品牌',
  198. dataIndex: 'pr_brand',
  199. width: 100
  200. }, {
  201. text: '物料名称',
  202. dataIndex: 'pr_detail',
  203. width: 150
  204. }, {
  205. text: '型号',
  206. dataIndex: 'pr_orispeccode',
  207. width: 200
  208. }, {
  209. text: '规格',
  210. dataIndex: 'pr_spec',
  211. width: 200
  212. }, {
  213. text: '仓库',
  214. dataIndex: 'pd_whname',
  215. width: 120
  216. }, {
  217. text: '数量',
  218. dataIndex: 'pd_outqty',
  219. xtype: 'numbercolumn',
  220. width: 110,
  221. renderer: function(v, m, r) {
  222. return saas.util.BaseUtil.numberFormat(v, 3, false);
  223. },
  224. }, {
  225. text: '单位',
  226. dataIndex: 'pr_unit',
  227. width: 65
  228. }, {
  229. text: '单价(元)',
  230. dataIndex: 'pd_netprice',
  231. xtype: 'numbercolumn',
  232. renderer: function(v, m, r) {
  233. return saas.util.BaseUtil.numberFormat(v, 4, true);
  234. },
  235. width: 110
  236. }, {
  237. text: '含税单价(元)',
  238. dataIndex: 'pd_netprice',
  239. xtype: 'numbercolumn',
  240. renderer: function(v, m, r) {
  241. return saas.util.BaseUtil.numberFormat(v, 4, true);
  242. },
  243. width: 110
  244. }, {
  245. text: '金额(元)',
  246. dataIndex: 'pd_nettotal',
  247. xtype: 'numbercolumn',
  248. width: 110,
  249. renderer: function(v, m, r) {
  250. return saas.util.BaseUtil.numberFormat(v, 2, true);
  251. },
  252. }, {
  253. text: '税额(元)',
  254. dataIndex: 'pd_taxamount',
  255. xtype: 'numbercolumn',
  256. width: 110,
  257. renderer: function (v, g, r) {
  258. return saas.util.BaseUtil.numberFormat(v, 2, true);
  259. }
  260. }, {
  261. text: '价税合计(元)',
  262. dataIndex: 'pd_ordertotal',
  263. xtype: 'numbercolumn',
  264. width: 110,
  265. renderer: function(v, m, r) {
  266. return saas.util.BaseUtil.numberFormat(v, 2, true);
  267. },
  268. }, {
  269. text: '币别',
  270. dataIndex: 'pi_currency',
  271. align: 'center',
  272. width: 65
  273. }, {
  274. text: "汇率",
  275. dataIndex: "pi_rate",
  276. xtype: 'numbercolumn',
  277. width: 80,
  278. renderer: function(v, m, r) {
  279. return saas.util.BaseUtil.numberFormat(v, 6, false);
  280. }
  281. }, {
  282. text: '关联验收单号',
  283. dataIndex: 'pi_iocode',
  284. width: 150
  285. }, {
  286. text: '备注',
  287. dataIndex: 'pd_remark',
  288. width: 250
  289. }]
  290. }
  291. });
  292. this.callParent(arguments);
  293. },
  294. });