QueryPanel.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. Ext.define('saas.view.stock.otherOut.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-otherout-querypanel',
  4. controller: 'stock-otherout-querypanel',
  5. viewModel: 'stock-otherout-querypanel',
  6. viewName: 'stock-otherout-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'id',
  10. fieldLabel: 'ID',
  11. allowBlank: true,
  12. columnWidth: 0
  13. }, {
  14. xtype: 'textfield',
  15. name: 'pi_inoutno',
  16. fieldLabel: '单据编号',
  17. allowBlank: true,
  18. columnWidth: 0.25
  19. }, {
  20. xtype: 'condatefield',
  21. name: 'pi_date',
  22. fieldLabel: '单据日期',
  23. allowBlank: true,
  24. columnWidth: 0.5
  25. }, {
  26. xtype: 'textfield',
  27. name: 'pi_custcode',
  28. fieldLabel: '客户编号',
  29. allowBlank: true,
  30. hidden:true,
  31. columnWidth: 0.25
  32. }, {
  33. xtype: 'customerDbfindTrigger',
  34. name: 'pi_custname',
  35. fieldLabel: '客户名称',
  36. emptyText:'输入客户编号或名称',
  37. allowBlank: true,
  38. columnWidth: 0.25
  39. }, {
  40. xtype: 'textfield',
  41. name: 'pd_prodcode',
  42. fieldLabel: '物料编号',
  43. hidden: true,
  44. showDetail: true
  45. }, {
  46. xtype: 'productDbfindTrigger',
  47. name: 'pr_detail',
  48. fieldLabel: '物料名称',
  49. emptyText:'输入物料编号或名称',
  50. showDetail: true
  51. }, {
  52. xtype: 'combobox',
  53. name: 'pi_statuscode',
  54. fieldLabel: '审核状态',
  55. allowBlank: true,
  56. editable:false,
  57. columnWidth: 0.25,
  58. queryMode: 'local',
  59. emptyText :'全部',
  60. editable:false,
  61. displayField: 'pi_status',
  62. valueField: 'pi_statuscode',
  63. store: Ext.create('Ext.data.ArrayStore', {
  64. fields: ['pi_statuscode', 'pi_status'],
  65. data: [
  66. ["ALL", "全部"],
  67. ["AUDITED", "已审核"],
  68. ["UNAUDITED", "未审核"]
  69. ]
  70. }),
  71. getCondition: function(value) {
  72. if(value == 'ALL') {
  73. return '1=1';
  74. }else {
  75. return 'pi_statuscode=\'' + value + '\'';
  76. }
  77. }
  78. }],
  79. queryGridConfig: {
  80. idField:'id',
  81. codeField:'pi_inoutno',
  82. addTitle:'其它出库单',
  83. addXtype:'stock-otherout-formpanel',
  84. defaultCondition:' pi_class = \'其它出库单\'',
  85. baseVastUrl:'/api/storage/prodinout/',
  86. // baseVastUrl:"http://localhost:9000/prodinout/",
  87. baseColumn: [{
  88. text: 'id',
  89. dataIndex: 'id',
  90. hidden:true,
  91. xtype: 'numbercolumn'
  92. }, {
  93. text: '单据编号',
  94. dataIndex: 'pi_inoutno',
  95. width: 200
  96. },{
  97. text: '单据类型',
  98. dataIndex: 'pi_class',
  99. width: 120
  100. },{
  101. text: '单据日期',
  102. dataIndex: 'pi_date',
  103. xtype:'datecolumn',
  104. width: 200
  105. },{
  106. text: '审核状态',
  107. dataIndex: 'pi_status',
  108. width: 120
  109. },{
  110. text: '客户名称',
  111. dataIndex: 'pi_custname',
  112. width: 120
  113. },{
  114. text: '制单人',
  115. dataIndex: 'creatorName',
  116. width: 120
  117. },{
  118. text: '审核人',
  119. dataIndex: 'pi_auditman',
  120. width: 120
  121. },{
  122. text: '备注',
  123. dataIndex: 'pi_remark',
  124. width: 200
  125. }],
  126. relativeColumn: [{
  127. text: 'id',
  128. dataIndex: 'pu_id',
  129. xtype: 'numbercolumn',
  130. hidden:true
  131. }, {
  132. text: '单据编号',
  133. dataIndex: 'pi_inoutno',
  134. width: 200
  135. }, {
  136. text: '单据类型',
  137. dataIndex: 'pd_piclass',
  138. width: 200
  139. },{
  140. text: '单据日期',
  141. dataIndex: 'pi_date',
  142. xtype:'datecolumn',
  143. width: 200
  144. },{
  145. text: '审核状态',
  146. dataIndex: 'pi_status',
  147. width: 120
  148. },{
  149. text: '客户编号',
  150. dataIndex: 'pi_custcode',
  151. width: 120
  152. },{
  153. text: '客户名称',
  154. dataIndex: 'pi_custname',
  155. width: 120
  156. },{
  157. text: '物料编号',
  158. dataIndex: 'pd_prodcode',
  159. width: 120
  160. },{
  161. text: '物料名称',
  162. dataIndex: 'pr_detail',
  163. width: 120
  164. },{
  165. text: '物料规格',
  166. dataIndex: 'pr_spec',
  167. width: 120
  168. },{
  169. text: '单位',
  170. dataIndex: 'pr_unit',
  171. width: 120
  172. },{
  173. text: '数量',
  174. dataIndex: 'pd_inqty',
  175. xtype:'numbercolumn',
  176. width: 120
  177. },{
  178. text: '仓库',
  179. dataIndex: 'pd_whname',
  180. width: 120
  181. },{
  182. text: '单价',
  183. dataIndex: 'pd_orderprice',
  184. xtype:'numbercolumn',
  185. renderer : function(v) {
  186. var arr = (v + '.').split('.');
  187. var xr = (new Array(arr[1].length)).fill('0');
  188. var format = '0,000.' + xr.join();
  189. return Ext.util.Format.number(v, format);
  190. },
  191. width: 120
  192. },{
  193. text: '税率',
  194. dataIndex: 'pd_taxrate',
  195. xtype:'numbercolumn',
  196. width: 120,
  197. renderer : function(v) {
  198. return Ext.util.Format.number(v, '0');
  199. },
  200. },{
  201. text: '金额',
  202. dataIndex: 'pd_total',
  203. xtype:'numbercolumn',
  204. renderer : function(v) {
  205. var arr = (v + '.').split('.');
  206. var xr = (new Array(arr[1].length)).fill('0');
  207. var format = '0,000.' + xr.join();
  208. return Ext.util.Format.number(v, format);
  209. },
  210. width: 120
  211. },{
  212. text: '相关单号',
  213. dataIndex: 'pd_ordercode',
  214. xtype:'numbercolumn',
  215. width: 120
  216. }]
  217. }
  218. });