QueryPanel_1.js 8.1 KB

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