QueryPanel.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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: 'B2B上传状态',
  166. dataIndex: 'b2bStatus',
  167. textAlign: 'center',
  168. width:120,
  169. hidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
  170. initHidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
  171. renderer: function(v) {
  172. return v ? v : '待上传'
  173. }
  174. }, {
  175. text: '备注',
  176. dataIndex: 'pi_remark',
  177. width: 250
  178. }],
  179. relativeColumn: [{
  180. text: 'id',
  181. dataIndex: 'pu_id',
  182. xtype: 'numbercolumn',
  183. hidden: true
  184. }, {
  185. text: '验退单号',
  186. dataIndex: 'pi_inoutno',
  187. width: 150
  188. }, {
  189. text: '单据日期',
  190. dataIndex: 'pi_date',
  191. xtype: 'datecolumn',
  192. width: 110
  193. }, {
  194. text: '供应商名称',
  195. dataIndex: 'pi_vendname',
  196. width: 200
  197. }, {
  198. text: '审核状态',
  199. align: 'center',
  200. dataIndex: 'pi_status',
  201. width: 80
  202. }, {
  203. text: '物料编号',
  204. dataIndex: 'pd_prodcode',
  205. width: 150
  206. }, {
  207. text: '品牌',
  208. dataIndex: 'pr_brand',
  209. width: 100
  210. }, {
  211. text: '物料名称',
  212. dataIndex: 'pr_detail',
  213. width: 150
  214. }, {
  215. text: '型号',
  216. dataIndex: 'pr_orispeccode',
  217. width: 200
  218. }, {
  219. text: '规格',
  220. dataIndex: 'pr_spec',
  221. width: 200
  222. }, {
  223. text: '仓库',
  224. dataIndex: 'pd_whname',
  225. width: 120
  226. }, {
  227. text: '数量',
  228. dataIndex: 'pd_outqty',
  229. xtype: 'numbercolumn',
  230. width: 110,
  231. renderer: function(v, m, r) {
  232. return saas.util.BaseUtil.numberFormat(v, 3, false);
  233. },
  234. }, {
  235. text: '单位',
  236. dataIndex: 'pr_unit',
  237. width: 65
  238. }, {
  239. text: '单价(元)',
  240. dataIndex: 'pd_netprice',
  241. xtype: 'numbercolumn',
  242. renderer: function(v, m, r) {
  243. return saas.util.BaseUtil.numberFormat(v, 4, true);
  244. },
  245. width: 110
  246. }, {
  247. text: '含税单价(元)',
  248. dataIndex: 'pd_netprice',
  249. xtype: 'numbercolumn',
  250. renderer: function(v, m, r) {
  251. return saas.util.BaseUtil.numberFormat(v, 4, true);
  252. },
  253. width: 110
  254. }, {
  255. text: '金额(元)',
  256. dataIndex: 'pd_nettotal',
  257. xtype: 'numbercolumn',
  258. width: 110,
  259. renderer: function(v, m, r) {
  260. return saas.util.BaseUtil.numberFormat(v, 2, true);
  261. },
  262. }, {
  263. text: '税率(%)',
  264. dataIndex: 'pd_taxrate',
  265. xtype: 'numbercolumn',
  266. width: 80,
  267. renderer : function(v, m, r) {
  268. return saas.util.BaseUtil.numberFormat(v, 0, true);
  269. }
  270. }, {
  271. text: '税额(元)',
  272. dataIndex: 'pd_taxamount',
  273. xtype: 'numbercolumn',
  274. width: 110,
  275. renderer: function (v, g, r) {
  276. return saas.util.BaseUtil.numberFormat(v, 2, true);
  277. }
  278. }, {
  279. text: '价税合计(元)',
  280. dataIndex: 'pd_ordertotal',
  281. xtype: 'numbercolumn',
  282. width: 110,
  283. renderer: function(v, m, r) {
  284. return saas.util.BaseUtil.numberFormat(v, 2, true);
  285. },
  286. }, {
  287. text: '币别',
  288. dataIndex: 'pi_currency',
  289. align: 'center',
  290. width: 65
  291. }, {
  292. text: "汇率",
  293. dataIndex: "pi_rate",
  294. xtype: 'numbercolumn',
  295. width: 80,
  296. renderer: function(v, m, r) {
  297. return saas.util.BaseUtil.numberFormat(v, 6, false);
  298. }
  299. }, {
  300. text: '关联验收单号',
  301. dataIndex: 'pi_iocode',
  302. width: 150
  303. },{
  304. text: "对账状态",
  305. dataIndex: "apcheckStatus",
  306. width: 100.0
  307. },{
  308. text: 'B2B上传状态',
  309. dataIndex: 'b2bStatus',
  310. textAlign: 'center',
  311. width:120,
  312. hidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
  313. initHidden: !Ext.getCmp('mainView').getViewModel().get('enableB2B'),
  314. renderer: function(v) {
  315. return v ? v : '待上传'
  316. }
  317. }, {
  318. text: '备注',
  319. dataIndex: 'pd_remark',
  320. width: 250
  321. }]
  322. }
  323. });
  324. this.callParent(arguments);
  325. },
  326. });