QueryPanel.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. Ext.define('saas.view.sale.saleIn.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'sale-salein-querypanel',
  4. controller: 'sale-salein-querypanel',
  5. viewModel: 'sale-salein-querypanel',
  6. viewName: 'sale-salein-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_custcode like \'%' + value + '%\' or pi_custname like \'%' + value + '%\' ) ';
  15. }
  16. }, {
  17. margin: '0 0 0 20',
  18. xtype: 'productDbfindTrigger',
  19. name: 'pr_detail',
  20. showDetail: true,
  21. emptyText: '输入物料编号、名称或型号'
  22. }, {
  23. xtype: 'condatefield',
  24. name: 'pi_date',
  25. fieldLabel: '日期',
  26. allowBlank: true,
  27. columnWidth: 0.5
  28. }, {
  29. xtype: 'combobox',
  30. name: 'pi_statuscode',
  31. fieldLabel: '单据状态',
  32. queryMode: 'local',
  33. emptyText: '全部',
  34. editable: false,
  35. displayField: 'pi_status',
  36. valueField: 'pi_statuscode',
  37. store: Ext.create('Ext.data.ArrayStore', {
  38. fields: ['pi_statuscode', 'pi_status'],
  39. data: [
  40. ["ALL", "全部"],
  41. ["AUDITED", "已审核"],
  42. ["UNAUDITED", "未审核"]
  43. ]
  44. }),
  45. getCondition: function (value) {
  46. if (value == 'ALL') {
  47. return '1=1';
  48. } else {
  49. return 'pi_statuscode=\'' + value + '\'';
  50. }
  51. }
  52. }, {
  53. xtype: 'multicombo',
  54. name: 'pi_prstatuscode',
  55. fieldLabel: '收款状态',
  56. emptyText: '全部',
  57. datas: [
  58. ["RECNONE", "未收款"],
  59. ["RECPART", "部分收款"],
  60. ["RECALL", "已收款"]
  61. ]
  62. }, {
  63. xtype: 'warehouseDbfindTrigger',
  64. name: 'pd_whname',
  65. fieldLabel: '仓库',
  66. emptyText: '输入仓库编号或名称',
  67. showDetail: true
  68. }, {
  69. xtype: 'textfield',
  70. name: 'pi_iocode',
  71. fieldLabel: '关联出货单号',
  72. emptyText: '输入关联出货单号',
  73. }, {
  74. xtype: 'accountDbfindTrigger',
  75. name: 'creatorName',
  76. fieldLabel: '录入人',
  77. emptyText: '请输入账户名称或姓名',
  78. getCondition: function (value) {
  79. if (!value) {
  80. return '1=1';
  81. } else {
  82. return 'prodinout.creatorName like\'%' + value + '%\'';
  83. }
  84. }
  85. }, {
  86. xtype: 'accountDbfindTrigger',
  87. name: 'pi_auditman',
  88. fieldLabel: '审核人',
  89. emptyText: '请输入账户名称或姓名',
  90. }],
  91. moreQueryFormItems: [],
  92. queryGridConfig: {
  93. idField: 'id',
  94. codeField: 'pi_inoutno',
  95. addTitle: '销售退货单',
  96. addXtype: 'sale-salein-formpanel',
  97. defaultCondition: ' pi_class = \'销售退货单\'',
  98. baseVastUrl: '/api/sale/prodinout/',
  99. caller: 'SaleIn',
  100. baseColumn: [{
  101. text: 'id',
  102. dataIndex: 'id',
  103. hidden: true,
  104. xtype: 'numbercolumn'
  105. }, {
  106. text: '退货单号',
  107. dataIndex: 'pi_inoutno',
  108. width: 150
  109. }, {
  110. text: '单据日期',
  111. dataIndex: 'pi_date',
  112. xtype: 'datecolumn',
  113. width: 110
  114. }, {
  115. text: '客户名称',
  116. dataIndex: 'pi_custname',
  117. width: 200
  118. }, {
  119. text: '金额(元)',
  120. dataIndex: 'pi_nettotal',
  121. xtype: 'numbercolumn',
  122. width: 110,
  123. renderer: function(v, m, r) {
  124. return saas.util.BaseUtil.numberFormat(v, 2, true);
  125. }
  126. }, {
  127. text: '价税合计(元)',
  128. dataIndex: 'pi_total',
  129. xtype: 'numbercolumn',
  130. width: 110,
  131. renderer: function(v, m, r) {
  132. return saas.util.BaseUtil.numberFormat(v, 2, true);
  133. }
  134. }, {
  135. text: '币别',
  136. align: 'center',
  137. dataIndex: "pi_currency",
  138. defaultValue: 'RMB',
  139. width: 80
  140. }, {
  141. text: '审核状态',
  142. align: 'center',
  143. dataIndex: 'pi_status',
  144. width: 80
  145. }, {
  146. text: '收款状态',
  147. align: 'center',
  148. dataIndex: 'pi_prstatus',
  149. width: 80
  150. }, {
  151. text: '关联出货单号',
  152. dataIndex: 'pi_iocode',
  153. width: 150
  154. }, {
  155. text: '备注',
  156. dataIndex: 'pi_remark',
  157. width: 250
  158. }],
  159. relativeColumn: [{
  160. text: 'id',
  161. dataIndex: 'id',
  162. hidden: true,
  163. xtype: 'numbercolumn'
  164. }, {
  165. text: '退货单号',
  166. dataIndex: 'pi_inoutno',
  167. width: 150
  168. }, {
  169. text: '单据日期',
  170. dataIndex: 'pi_date',
  171. xtype: 'datecolumn',
  172. width: 110
  173. }, {
  174. text: '客户名称',
  175. dataIndex: 'pi_custname',
  176. width: 200
  177. }, {
  178. text: '币别',
  179. align: 'center',
  180. dataIndex: "pi_currency",
  181. defaultValue: 'RMB',
  182. width: 80
  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: 120
  212. }, {
  213. text: '数量',
  214. dataIndex: 'pd_inqty',
  215. xtype: 'numbercolumn',
  216. width: 110,
  217. renderer: function(v, m, r) {
  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. width: 110,
  229. renderer: function(v, m, r) {
  230. return saas.util.BaseUtil.numberFormat(v, 4, true);
  231. }
  232. }, {
  233. text: '含税单价(元)',
  234. dataIndex: 'pd_sendprice',
  235. xtype: 'numbercolumn',
  236. width: 110,
  237. renderer: function(v, m, r) {
  238. return saas.util.BaseUtil.numberFormat(v, 4, true);
  239. }
  240. }, {
  241. text: '金额(元)',
  242. dataIndex: 'pd_nettotal',
  243. xtype: 'numbercolumn',
  244. width: 110,
  245. renderer: function(v, m, r) {
  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, m, r) {
  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. });
  275. this.callParent(arguments);
  276. },
  277. });