QueryPanel_2.js 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. Ext.define('make.view.make.bom.QueryPanel_2', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'make-bom-querypanel-2',
  4. controller: 'make-bom-querypanel',
  5. viewModel: {
  6. extend: 'saas.view.core.query.QueryPanelModel',
  7. data: {
  8. form: {}, // 查询字段记录
  9. addEnable: false, // 显示新增按钮
  10. auditEnable: false, // 显示审核按钮
  11. printEnable: false, // 显示打印按钮
  12. importEnable: true, // 显示导入按钮
  13. exportEnable: true, // 显示导出按钮
  14. closeEnable: false, // 显示关闭按钮
  15. deleteEnable: false, // 显示删除按钮
  16. deleteDisable:false, //删除按钮是否可使用
  17. openAudit:false,//单独显示审核按钮
  18. openUnAudit:true,//单独显示反审核按钮
  19. openEnable:false, //显示开启 针对已取消列表
  20. configurable: true, // 允许列设置
  21. }
  22. },
  23. viewName: 'make-bom-querypanel',
  24. caller: 'Bom',
  25. importUploadPath: '/api/make/bom/saveToFormal',
  26. initComponent: function () {
  27. var me = this;
  28. Ext.apply(this, {
  29. queryFormItems: [ {
  30. xtype: 'condatefield',
  31. name: 'Bom.createTime',
  32. //name: 'pi_date',
  33. fieldLabel: '日期',
  34. columnWidth: 0.5,
  35. operation: 'between',
  36. },{
  37. xtype: 'multiqueryField',
  38. columnWidth: 0.4,
  39. name: 'multi_query',
  40. querys: {
  41. "Prod": {"field": "bo_mothercode", "dbfinds": [{//物料
  42. from: 'pr_code',
  43. to: 'bo_mothercode'
  44. },{
  45. from: 'pr_detail',
  46. to: 'pr_detail'
  47. }]},
  48. //工作中心
  49. "BillCode": {"field": "bo_wcname" ,"desc": "工作中心"},
  50. "Emp":{"field": "BOM.creatorName", "dbfinds": [{
  51. from: 'em_name',
  52. to: 'BOM.creatorName'
  53. }]},
  54. }
  55. }],
  56. moreQueryFormItems: [{
  57. xtype: 'condatefield',
  58. name: 'bom.createTime',
  59. fieldLabel: '单据日期',
  60. value:1,
  61. columnWidth: 1
  62. }, {
  63. xtype: 'productDbfindTrigger',
  64. name: 'bo_mothercode',
  65. fieldLabel: '物料编号'
  66. },{
  67. xtype: 'textfield',
  68. name: 'pr_detail',
  69. fieldLabel: '产品名称',
  70. readOnly: true,
  71. }, {
  72. xtype: 'textfield',
  73. name: 'pr_orispeccode',
  74. fieldLabel: '产品型号',
  75. readOnly: true,
  76. }, {
  77. xtype: "remotecombo",
  78. name: "pr_brand",
  79. fieldLabel: "厂家/品牌",
  80. storeUrl: '/api/document/productbrand/getCombo',
  81. editable: false,
  82. hiddenBtn:true
  83. },{
  84. xtype: 'remotecombo',
  85. name: "bo_wcname",
  86. fieldLabel: "工作中心",
  87. storeUrl: '/api/document/workcenter/getCombo',
  88. editable: false,
  89. hiddenBtn:true
  90. },{
  91. xtype: 'combobox',
  92. name: 'bo_statuscode',
  93. fieldLabel: '审核状态',
  94. queryMode: 'local',
  95. displayField: 'bo_status',
  96. valueField: 'bo_statuscode',
  97. emptyText :'全部',
  98. editable:false,
  99. store: Ext.create('Ext.data.ArrayStore', {
  100. fields: ['bo_statuscode', 'bo_status'],
  101. data: [
  102. ["ALL", "全部"],
  103. ["AUDITED", "已审核"],
  104. ["UNAUDITED", "未审核"]
  105. ]
  106. }),
  107. getCondition: function(value) {
  108. if(value == 'ALL') {
  109. return '1=1';
  110. }else {
  111. return 'bo_statuscode=\'' + value + '\'';
  112. }
  113. }
  114. }, {
  115. xtype: 'employeeDbfindTrigger',
  116. name: 'creatorName',
  117. fieldLabel: '录入人',
  118. emptyText:'请输入账户名称或姓名',
  119. getCondition: function(value) {
  120. if(!value) {
  121. return '1=1';
  122. }else {
  123. return 'bom.creatorName like\'%' + value + '%\'';
  124. }
  125. }
  126. },{
  127. xtype: 'employeeDbfindTrigger',
  128. name: 'bo_auditman',
  129. fieldLabel: '审核人',
  130. emptyText:'请输入账户名称或姓名',
  131. }],
  132. queryGridConfig: {
  133. idField: 'id',
  134. codeField: 'bo_code',
  135. mainIdField:'_id',
  136. detailIdField:'bd_boid',
  137. addTitle: 'BOM',
  138. addXtype: 'make-bom-formpanel',
  139. defaultCondition: me.defaultCondition,
  140. //baseVastUrl: '/api/make/bom/',
  141. baseVastUrl: me.baseVastUrl,
  142. caller: 'Bom',
  143. baseColumn: [{
  144. text: 'id',
  145. dataIndex: 'id',
  146. hidden: true,
  147. xtype: 'numbercolumn'
  148. }, {
  149. text: '单据编号',
  150. dataIndex: 'bo_code',
  151. width: 150
  152. }, {
  153. text: '产品编号',
  154. dataIndex: 'bo_mothercode',
  155. width: 150
  156. }, {
  157. text: '产品名称',
  158. dataIndex: 'bo_mothername',
  159. width: 150
  160. },{
  161. text: '产品型号',
  162. dataIndex: 'pr_orispeccode',
  163. width: 150,
  164. renderer: saas.util.RenderUtil['renderer_prod']
  165. }, {
  166. text: '单位',
  167. dataIndex: 'pr_unit',
  168. width: 150
  169. }, {
  170. text: '工作中心',
  171. dataIndex: 'bo_wcname',
  172. width: 110
  173. },{
  174. text: '状态',
  175. dataIndex: 'bo_status',
  176. width: 110
  177. },{
  178. text: '制单人',
  179. dataIndex: 'creatorName',
  180. width: 100,
  181. }],
  182. relativeColumn: [{
  183. text: 'id',
  184. dataIndex: 'id',
  185. hidden: true,
  186. xtype: 'numbercolumn'
  187. }, {
  188. text: '单据编号',
  189. dataIndex: 'bo_code',
  190. width: 150
  191. }, {
  192. text: '产品编号',
  193. dataIndex: 'bo_mothercode',
  194. width: 150
  195. }, {
  196. text: '产品名称',
  197. dataIndex: 'bo_mothername',
  198. width: 150
  199. },{
  200. text: '产品型号',
  201. dataIndex: 'pr_orispeccode',
  202. width: 150
  203. }, {
  204. text: '单位',
  205. dataIndex: 'pr_unit',
  206. width: 150
  207. }, {
  208. text: '工作中心',
  209. dataIndex: 'bo_wcname',
  210. width: 110
  211. },{
  212. text: '状态',
  213. dataIndex: 'bo_status',
  214. width: 110
  215. },{
  216. text: '制单人',
  217. dataIndex: 'creatorName',
  218. width: 100,
  219. }]
  220. }
  221. });
  222. this.callParent(arguments);
  223. },
  224. });