QueryPanel.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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. dataIndex: "pi_currency",
  137. align:'center',
  138. width: 65
  139. }, {
  140. text: '审核状态',
  141. align: 'center',
  142. dataIndex: 'pi_status',
  143. width: 80
  144. }, {
  145. text: '收款状态',
  146. align: 'center',
  147. dataIndex: 'pi_prstatus',
  148. width: 80
  149. }, {
  150. text: '关联出货单号',
  151. dataIndex: 'pi_iocode',
  152. width: 150
  153. }, {
  154. text: '备注',
  155. dataIndex: 'pi_remark',
  156. width: 250
  157. }],
  158. relativeColumn: [{
  159. text: 'id',
  160. dataIndex: 'id',
  161. hidden: true,
  162. xtype: 'numbercolumn'
  163. }, {
  164. text: '退货单号',
  165. dataIndex: 'pi_inoutno',
  166. width: 150
  167. }, {
  168. text: '单据日期',
  169. dataIndex: 'pi_date',
  170. xtype: 'datecolumn',
  171. width: 110
  172. }, {
  173. text: '客户名称',
  174. dataIndex: 'pi_custname',
  175. width: 200
  176. }, {
  177. text: '币别',
  178. dataIndex: "pi_currency",
  179. align:'center',
  180. width: 65
  181. }, {
  182. text: '审核状态',
  183. align: 'center',
  184. dataIndex: 'pi_status',
  185. width: 80
  186. }, {
  187. text: '物料编号',
  188. dataIndex: 'pd_prodcode',
  189. width: 150
  190. }, {
  191. text: '品牌',
  192. dataIndex: 'pr_brand',
  193. width: 100
  194. }, {
  195. text: '物料名称',
  196. dataIndex: 'pr_detail',
  197. width: 150
  198. }, {
  199. text: '型号',
  200. dataIndex: 'pr_orispeccode',
  201. width: 200
  202. }, {
  203. text: '规格',
  204. dataIndex: 'pr_spec',
  205. width: 200
  206. }, {
  207. text: '仓库',
  208. dataIndex: 'pd_whname',
  209. width: 120
  210. }, {
  211. text: '数量',
  212. dataIndex: 'pd_inqty',
  213. xtype: 'numbercolumn',
  214. width: 110,
  215. renderer: function(v, m, r) {
  216. return saas.util.BaseUtil.numberFormat(v, 3, false);
  217. }
  218. }, {
  219. text: '单位',
  220. dataIndex: 'pr_unit',
  221. width: 65
  222. }, {
  223. text: '单价(元)',
  224. dataIndex: 'pd_netprice',
  225. xtype: 'numbercolumn',
  226. width: 110,
  227. renderer: function(v, m, r) {
  228. return saas.util.BaseUtil.numberFormat(v, 4, true);
  229. }
  230. }, {
  231. text: '含税单价(元)',
  232. dataIndex: 'pd_sendprice',
  233. xtype: 'numbercolumn',
  234. width: 110,
  235. renderer: function(v, m, r) {
  236. return saas.util.BaseUtil.numberFormat(v, 4, true);
  237. }
  238. }, {
  239. text: '金额(元)',
  240. dataIndex: 'pd_nettotal',
  241. xtype: 'numbercolumn',
  242. width: 110,
  243. renderer: function(v, m, r) {
  244. return saas.util.BaseUtil.numberFormat(v, 2, true);
  245. }
  246. }, {
  247. text: '税额(元)',
  248. dataIndex: 'pd_taxamount',
  249. xtype: 'numbercolumn',
  250. width: 110,
  251. renderer: function (v, g, r) {
  252. return saas.util.BaseUtil.numberFormat(v, 2, true);
  253. }
  254. }, {
  255. text: '价税合计(元)',
  256. dataIndex: 'pd_ordertotal',
  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: 'pi_currency',
  265. align:'center',
  266. width: 65
  267. }, {
  268. text: '汇率',
  269. dataIndex: 'pi_rate',
  270. xtype: 'numbercolumn',
  271. width: 80,
  272. renderer: function(v, m, r) {
  273. return saas.util.BaseUtil.numberFormat(v, 6, false);
  274. }
  275. }, {
  276. text: '关联出货单号',
  277. dataIndex: 'pi_iocode',
  278. width: 150
  279. }, {
  280. text: '备注',
  281. dataIndex: 'pd_remark',
  282. width: 250
  283. }]
  284. }
  285. });
  286. this.callParent(arguments);
  287. },
  288. });