QueryPanel.js 8.1 KB

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