QueryPanel.js 8.1 KB

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