QueryPanel.js 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. Ext.define('saas.view.sale.saleout.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'sale-saleout-querypanel',
  4. controller: 'sale-saleout-querypanel',
  5. viewModel: 'sale-saleout-querypanel',
  6. viewName: 'sale-saleout-querypanel',
  7. queryFormItems: [{
  8. xtype: 'textfield',
  9. name: 'pi_inoutno',
  10. emptyText:'请输入单号或客户',
  11. getCondition: function(value) {
  12. return ' (pi_inoutno like\'%' + value + '%\' or pi_custcode like \'%'+value+'%\' or pi_custname like \'%'+value+'%\' ) ';
  13. }
  14. },{
  15. margin:'0 0 0 20',
  16. xtype: 'productDbfindTrigger',
  17. name: 'pr_detail',
  18. showDetail: true,
  19. emptyText:'输入物料编号或名称',
  20. }, {
  21. xtype: 'condatefield',
  22. name: 'pi_date',
  23. fieldLabel: '日期',
  24. allowBlank: true,
  25. columnWidth: 0.5
  26. },{
  27. xtype: 'combobox',
  28. name: 'pi_statuscode',
  29. fieldLabel: '单据状态',
  30. queryMode: 'local',
  31. emptyText :'全部',
  32. editable:false,
  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. ["RECNONE", "未收款"],
  57. ["RECPART", "部分收款"],
  58. ["RECALL", "已收款"]
  59. ]
  60. }, {
  61. xtype: 'warehouseDbfindTrigger',
  62. name: 'pd_whname',
  63. emptyText:'请输入仓库编号或名称',
  64. fieldLabel: '仓库',
  65. showDetail: true
  66. }, {
  67. xtype: 'textfield',
  68. name: 'pi_sacode',
  69. fieldLabel: '关联销售单号',
  70. emptyText: '输入单号',
  71. }, {
  72. xtype: 'accountDbfindTrigger',
  73. name: 'creatorName',
  74. fieldLabel: '录入人',
  75. emptyText: '请输入账户名称或姓名',
  76. getCondition: function(value) {
  77. if(!value) {
  78. return '1=1';
  79. }else {
  80. return 'prodinout.creatorName like\'%' + value + '%\'';
  81. }
  82. }
  83. }, {
  84. xtype: 'accountDbfindTrigger',
  85. name: 'pi_auditman',
  86. fieldLabel: '审核人',
  87. emptyText: '请输入账户名称或姓名',
  88. }],
  89. moreQueryFormItems: [],
  90. queryGridConfig: {
  91. idField:'id',
  92. codeField:'pi_inoutno',
  93. addTitle:'出货单',
  94. addXtype:'sale-saleout-formpanel',
  95. defaultCondition:' pi_class = \'出货单\'',
  96. baseVastUrl: '/api/sale/prodinout/',
  97. caller:'SaleOut',
  98. baseColumn: [{
  99. text: 'id',
  100. dataIndex: 'id',
  101. hidden:true,
  102. xtype: 'numbercolumn'
  103. }, {
  104. text: '出货单号',
  105. dataIndex: 'pi_inoutno',
  106. width: 150
  107. }, {
  108. text: '单据日期',
  109. dataIndex: 'pi_date',
  110. xtype:'datecolumn',
  111. width: 110
  112. },{
  113. text: '客户名称',
  114. dataIndex: 'pi_custname',
  115. width: 200
  116. }, {
  117. text: '金额(元)',
  118. dataIndex: 'pi_nettotal',
  119. xtype:'numbercolumn',
  120. width: 110,
  121. renderer : function(v) {
  122. return saas.util.BaseUtil.numberFormat(v, 2, true);
  123. },
  124. }, {
  125. text: '价税合计(元)',
  126. dataIndex: 'pi_total',
  127. xtype:'numbercolumn',
  128. width: 110,
  129. renderer : function(v) {
  130. return saas.util.BaseUtil.numberFormat(v, 2, true);
  131. }
  132. },{
  133. text: '币别',
  134. align: 'center',
  135. dataIndex: "pi_currency",
  136. defaultValue: 'RMB',
  137. width:80,
  138. }, {
  139. text: '审核状态',
  140. align: 'center',
  141. dataIndex: 'pi_status',
  142. width: 80
  143. },{
  144. text: '收款状态',
  145. align: 'center',
  146. dataIndex: 'pi_prstatus',
  147. width: 80
  148. }, {
  149. text: '关联销售单',
  150. dataIndex: 'pi_sacode',
  151. width: 150
  152. }, {
  153. text: '备注',
  154. dataIndex: 'pi_remark',
  155. width: 250
  156. }],
  157. relativeColumn: [{
  158. text: 'id',
  159. dataIndex: 'id',
  160. hidden:true,
  161. xtype: 'numbercolumn'
  162. }, {
  163. text: '出货单号',
  164. dataIndex: 'pi_inoutno',
  165. width: 150
  166. }, {
  167. text: '单据日期',
  168. dataIndex: 'pi_date',
  169. xtype:'datecolumn',
  170. width: 110
  171. },{
  172. text: '客户名称',
  173. dataIndex: 'pi_custname',
  174. width: 200
  175. },{
  176. text: '币别',
  177. align: 'center',
  178. dataIndex: "pi_currency",
  179. defaultValue: 'RMB',
  180. width:80
  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: 150
  206. },{
  207. text: '仓库',
  208. dataIndex: 'pd_whname',
  209. width: 80
  210. }, {
  211. text: '数量',
  212. dataIndex: 'pd_outqty',
  213. xtype:'numbercolumn',
  214. width: 110,
  215. renderer : function(v) {
  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) {
  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) {
  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) {
  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) {
  260. return saas.util.BaseUtil.numberFormat(v, 2, true);
  261. }
  262. }, {
  263. text: '关联销售单号',
  264. dataIndex: 'pd_ordercode',
  265. width: 150
  266. }, {
  267. text: '备注',
  268. dataIndex: 'pd_remark',
  269. width: 250
  270. }]
  271. }
  272. });