QueryPanel.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. Ext.define('make.view.make.makeBase.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'make-makebase-querypanel',
  4. controller: 'make-makebase-querypanel',
  5. viewModel: {
  6. extend: 'saas.view.core.query.QueryPanelModel',
  7. data: {
  8. form: {}, // 查询字段记录
  9. addEnable: false, // 显示新增按钮
  10. auditEnable: true, // 显示审核按钮
  11. printEnable: false, // 显示打印按钮
  12. importEnable: false, // 显示导入按钮
  13. exportEnable: true, // 显示导出按钮
  14. closeEnable: false, // 显示关闭按钮
  15. deleteEnable: true, // 显示删除按钮
  16. deleteDisable:false, //删除按钮是否可使用
  17. openAudit:false,//单独显示审核按钮
  18. openUnAudit:false,//单独显示反审核按钮
  19. openEnable:false, //显示开启 针对已取消列表
  20. configurable: true, // 允许列设置
  21. }
  22. },
  23. viewName: 'make-makebase-querypanel',
  24. caller: 'MakeBase',
  25. //importUploadPath: '/api/purchse/makereturn/saveToFormal',
  26. initComponent: function () {
  27. var me = this ;
  28. Ext.apply(this, {
  29. importUploadPath:me.importUploadPath,
  30. queryFormItems: [{
  31. xtype: 'condatefield',
  32. name: 'make.createTime',
  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": "ma_prodcode", "dbfinds": [{//物料
  42. from: 'pr_code',
  43. to: 'ma_prodcode'
  44. },{
  45. from: 'pr_detail',
  46. to: 'pr_detail'
  47. }]},
  48. "MakeCode": {"field": "ma_code" ,"desc": "制造单号"},
  49. "BillCode": {"field": "ma_salecode" ,"desc": "订单号"},
  50. "Cust": {"field": "ma_custname", "dbfinds": [{
  51. from: 'cu_name',
  52. to: 'ma_custname'
  53. }]},
  54. "Emp":{"field": "make.creatorName", "dbfinds": [{
  55. from: 'em_name',
  56. to: 'make.creatorName'
  57. }]},
  58. },
  59. setShowDetail: function(v){
  60. this.showDetail = false;
  61. }
  62. }],
  63. moreQueryFormItems: [{
  64. xtype: 'saledetailDbfindTrigger',
  65. name: 'ma_salecode',
  66. fieldLabel: '订单编号'
  67. },{
  68. xtype: "customerDbfindTrigger",
  69. name: "ma_custname",
  70. fieldLabel: "客户名称",
  71. },{
  72. xtype: 'condatefield',
  73. name: 'ma_delivery',
  74. fieldLabel: '交货日期',
  75. value:7,
  76. columnWidth: 1
  77. },{
  78. xtype: 'productDbfindTrigger',
  79. name: 'ma_prodcode',
  80. fieldLabel: '物料编号'
  81. },{
  82. xtype: 'textfield',
  83. name: 'pr_detail',
  84. fieldLabel: '产品名称',
  85. readOnly: true,
  86. }, {
  87. xtype: 'textfield',
  88. name: 'pr_orispeccode',
  89. fieldLabel: '产品型号',
  90. readOnly: true,
  91. }, {
  92. xtype: "remotecombo",
  93. name: "pr_brand",
  94. fieldLabel: "厂家/品牌",
  95. storeUrl: '/api/document/productbrand/getCombo',
  96. editable: false,
  97. hiddenBtn:true
  98. },{
  99. xtype: "remotecombo",
  100. name: "ma_kind",
  101. fieldLabel: "制造类型",
  102. storeUrl:'/api/make/kind/list/make',
  103. valueField:'mk_name',
  104. displayField: 'mk_name',
  105. editable: false,
  106. hiddenBtn:true
  107. },{
  108. xtype: 'remotecombo',
  109. name: "ma_wcname",
  110. fieldLabel: "工作中心",
  111. storeUrl: '/api/document/workcenter/getCombo',
  112. editable: false,
  113. hiddenBtn:true
  114. },{
  115. xtype: 'combobox',
  116. name: 'ma_statuscode',
  117. fieldLabel: '审核状态',
  118. queryMode: 'local',
  119. displayField: 'ma_status',
  120. valueField: 'ma_statuscode',
  121. emptyText :'全部',
  122. editable:false,
  123. store: Ext.create('Ext.data.ArrayStore', {
  124. fields: ['ma_statuscode', 'ma_status'],
  125. data: [
  126. ["ALL", "全部"],
  127. ["AUDITED", "已审核"],
  128. ["UNAUDITED", "未审核"]
  129. ]
  130. }),
  131. getCondition: function(value) {
  132. if(value == 'ALL') {
  133. return '1=1';
  134. }else {
  135. return 'ma_statuscode=\'' + value + '\'';
  136. }
  137. }
  138. }, {
  139. xtype: 'employeeDbfindTrigger',
  140. name: 'creatorName',
  141. fieldLabel: '录入人',
  142. emptyText:'请输入账户名称或姓名',
  143. getCondition: function(value) {
  144. if(!value) {
  145. return '1=1';
  146. }else {
  147. return 'make.creatorName like\'%' + value + '%\'';
  148. }
  149. }
  150. },{
  151. xtype: 'condatefield',
  152. name: 'ma_planbegindate',
  153. fieldLabel: '计划开工日期',
  154. value:7,
  155. columnWidth: 1
  156. },{
  157. xtype: 'condatefield',
  158. name: 'ma_planenddate',
  159. fieldLabel: '计划完工日期',
  160. value:7,
  161. columnWidth: 1
  162. },{
  163. xtype: 'condatefield',
  164. name: 'make.createTime',
  165. fieldLabel: '录入日期',
  166. value:7,
  167. columnWidth: 1
  168. }, {
  169. xtype: 'employeeDbfindTrigger',
  170. name: 'ma_auditman',
  171. fieldLabel: '审核人',
  172. emptyText:'请输入账户名称或姓名',
  173. }],
  174. queryGridConfig: {
  175. idField: 'ma_id',
  176. codeField: 'ma_code',
  177. mainIdField:'ma_id',
  178. detailIdField:'mm_id',
  179. addTitle: '制造单',
  180. addXtype: 'make-makebase-formpanel',
  181. baseVastUrl: '/api/make/make/',
  182. caller: 'MakeBase',
  183. defaultCondition:me.defaultCondition,
  184. toolBtns: [{
  185. xtype: 'button',
  186. text: '智能工单',
  187. cls: 'x-formpanel-btn-blue',
  188. handler: 'intelligentMake'
  189. },{
  190. text: '结案',
  191. xtype: 'button',
  192. handler: 'onEnd',
  193. menu: {
  194. cls:'x-query-menu',
  195. anchor: '100%',
  196. items: [{
  197. text:'反结案',
  198. handler:'onResEnd'
  199. }],
  200. listeners: {
  201. 'mouseleave':function(enu){
  202. this.hide();
  203. }
  204. }
  205. }
  206. }],
  207. baseColumn: [{
  208. text: 'id',
  209. dataIndex: 'ma_id',
  210. hidden: true,
  211. xtype: 'numbercolumn'
  212. }, {
  213. text: '制造单号',
  214. dataIndex: 'ma_code',
  215. width: 150
  216. }, {
  217. text: '单据日期',
  218. dataIndex: 'createTime',
  219. xtype: 'datecolumn',
  220. width: 110
  221. }, {
  222. text: '销售单号',
  223. dataIndex: 'ma_salecode',
  224. width: 150
  225. }, {
  226. text: '客户名称',
  227. dataIndex: 'ma_custname',
  228. width: 150
  229. }, {
  230. text: '交货日期',
  231. align: 'center',
  232. dataIndex: 'ma_delivery',
  233. width: 110,
  234. xtype:'datecolumn'
  235. },{
  236. text: '产品编号',
  237. dataIndex: 'ma_prodcode',
  238. width: 150
  239. },{
  240. text: '产品名称',
  241. dataIndex: 'ma_prdetail',
  242. width: 150
  243. },{
  244. text: '产品型号',
  245. dataIndex: 'ma_prorispeccode',
  246. width: 150,
  247. renderer : saas.util.RenderUtil['renderer_makeprod']
  248. },{
  249. text: '单位',
  250. align: 'center',
  251. dataIndex: 'ma_prunit',
  252. width: 80
  253. },{
  254. text: '数量',
  255. align: 'center',
  256. dataIndex: 'ma_qty',
  257. xtype: 'numbercolumn',
  258. width: 110,
  259. renderer : function(v, m, r) {
  260. return saas.util.BaseUtil.numberFormat(v, 6, true);
  261. },
  262. },{
  263. text: '已完工数',
  264. align: 'center',
  265. dataIndex: 'ma_madeqty',
  266. xtype: 'numbercolumn',
  267. width: 110,
  268. renderer : function(v, m, r) {
  269. return saas.util.BaseUtil.numberFormat(v, 6, true);
  270. },
  271. },{
  272. text: '已转完工数',
  273. align: 'center',
  274. dataIndex: 'ma_turnmadeqty',
  275. xtype: 'numbercolumn',
  276. width: 110,
  277. renderer : function(v, m, r) {
  278. return saas.util.BaseUtil.numberFormat(v, 6, true);
  279. },
  280. },{
  281. text: '已领齐套数',
  282. align: 'center',
  283. dataIndex: 'ma_setqty',
  284. xtype: 'numbercolumn',
  285. width: 110,
  286. renderer : function(v, m, r) {
  287. return saas.util.BaseUtil.numberFormat(v, 6, true);
  288. },
  289. },{
  290. text: '可完工数',
  291. align: 'center',
  292. dataIndex: 'ma_canmadeqty',
  293. xtype: 'numbercolumn',
  294. width: 110,
  295. renderer : function(v, m, r) {
  296. return saas.util.BaseUtil.numberFormat(v, 6, true);
  297. },
  298. },{
  299. text: '制造类型',
  300. dataIndex: 'ma_kind',
  301. width: 100,
  302. },{
  303. text: '工作中心',
  304. dataIndex: 'ma_wcname',
  305. width: 100,
  306. },{
  307. text: '审核状态',
  308. dataIndex: 'ma_status',
  309. align: 'center',
  310. width: 100,
  311. },{
  312. text: '领料状态',
  313. dataIndex: 'ma_getstatus',
  314. align: 'center',
  315. width: 100,
  316. },{
  317. text: '完工状态',
  318. dataIndex: 'ma_finishstatus',
  319. align: 'center',
  320. width: 100,
  321. },{
  322. text: '制单人',
  323. dataIndex: 'creatorName',
  324. align: 'center',
  325. width: 100,
  326. },{
  327. text: '计划开工日期',
  328. dataIndex: 'ma_planbegindate',
  329. width: 130,
  330. xtype:'datecolumn'
  331. },{
  332. text: '计划完工日期',
  333. dataIndex: 'ma_planenddate',
  334. width: 130,
  335. xtype:'datecolumn'
  336. },{
  337. text: '实际开工日期',
  338. dataIndex: 'ma_actbegindate',
  339. width: 130,
  340. xtype:'datecolumn'
  341. },{
  342. text: '实际完工日期',
  343. dataIndex: 'ma_actenddate',
  344. width: 130,
  345. xtype:'datecolumn'
  346. },{
  347. text: '结案日期',
  348. dataIndex: 'ma_enddate',
  349. width: 130,
  350. xtype:'datecolumn'
  351. },{
  352. text: '备注',
  353. dataIndex: 'ma_remark',
  354. width: 100
  355. }],
  356. relativeColumn: []
  357. }
  358. });
  359. this.callParent(arguments);
  360. },
  361. });