QueryPanel.js 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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: 200
  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. align: 'center',
  147. width: 65
  148. }, {
  149. text: '审核状态',
  150. align: 'center',
  151. dataIndex: 'pi_status',
  152. width: 80
  153. }, {
  154. text: '付款状态',
  155. align: 'center',
  156. dataIndex: 'pi_prstatus',
  157. width: 80
  158. }, {
  159. text: '关联验收单号',
  160. dataIndex: 'pi_iocode',
  161. width: 150
  162. }, {
  163. text: '备注',
  164. dataIndex: 'pi_remark',
  165. width: 250
  166. }],
  167. relativeColumn: [{
  168. text: 'id',
  169. dataIndex: 'pu_id',
  170. xtype: 'numbercolumn',
  171. hidden: true
  172. }, {
  173. text: '验退单号',
  174. dataIndex: 'pi_inoutno',
  175. width: 150
  176. }, {
  177. text: '单据日期',
  178. dataIndex: 'pi_date',
  179. xtype: 'datecolumn',
  180. width: 110
  181. }, {
  182. text: '供应商名称',
  183. dataIndex: 'pi_vendname',
  184. width: 200
  185. }, {
  186. text: '审核状态',
  187. align: 'center',
  188. dataIndex: 'pi_status',
  189. width: 80
  190. }, {
  191. text: '物料编号',
  192. dataIndex: 'pd_prodcode',
  193. width: 150
  194. }, {
  195. text: '品牌',
  196. dataIndex: 'pr_brand',
  197. width: 100
  198. }, {
  199. text: '物料名称',
  200. dataIndex: 'pr_detail',
  201. width: 150
  202. }, {
  203. text: '型号',
  204. dataIndex: 'pr_orispeccode',
  205. width: 200
  206. }, {
  207. text: '规格',
  208. dataIndex: 'pr_spec',
  209. width: 200
  210. }, {
  211. text: '仓库',
  212. dataIndex: 'pd_whname',
  213. width: 80
  214. }, {
  215. text: '数量',
  216. dataIndex: 'pd_outqty',
  217. xtype: 'numbercolumn',
  218. width: 110,
  219. renderer: function (v) {
  220. return saas.util.BaseUtil.numberFormat(v, 3, false);
  221. },
  222. }, {
  223. text: '单位',
  224. dataIndex: 'pr_unit',
  225. width: 65
  226. }, {
  227. text: '单价(元)',
  228. dataIndex: 'pd_netprice',
  229. xtype: 'numbercolumn',
  230. renderer: function (v) {
  231. return saas.util.BaseUtil.numberFormat(v, 4, true);
  232. },
  233. width: 110
  234. }, {
  235. text: '含税单价(元)',
  236. dataIndex: 'pd_netprice',
  237. xtype: 'numbercolumn',
  238. renderer: function (v) {
  239. return saas.util.BaseUtil.numberFormat(v, 4, true);
  240. },
  241. width: 110
  242. }, {
  243. text: '金额(元)',
  244. dataIndex: 'pd_nettotal',
  245. xtype: 'numbercolumn',
  246. width: 110,
  247. renderer: function (v) {
  248. return saas.util.BaseUtil.numberFormat(v, 2, true);
  249. },
  250. }, {
  251. text: '税额(元)',
  252. dataIndex: 'pd_taxamount',
  253. xtype: 'numbercolumn',
  254. width: 110,
  255. renderer: function (v, g, r) {
  256. return saas.util.BaseUtil.numberFormat(v, 2, true);
  257. }
  258. }, {
  259. text: '价税合计(元)',
  260. dataIndex: 'pd_ordertotal',
  261. xtype: 'numbercolumn',
  262. width: 110,
  263. renderer: function (v) {
  264. return saas.util.BaseUtil.numberFormat(v, 2, true);
  265. },
  266. }, {
  267. text: '关联验收单号',
  268. dataIndex: 'pi_iocode',
  269. width: 150
  270. }, {
  271. text: '备注',
  272. dataIndex: 'pd_remark',
  273. width: 250
  274. }]
  275. }
  276. });