QueryPanel_5.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. Ext.define('make.view.make.makeBase.QueryPanel_5', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'make-makebase-querypanel-5',
  4. controller: 'make-makebase-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: false, // 显示导入按钮
  13. exportEnable: true, // 显示导出按钮
  14. closeEnable: false, // 显示关闭按钮
  15. deleteEnable: false, // 显示删除按钮
  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. queryFormItems: [ {
  30. xtype: 'condatefield',
  31. name: 'make.createTime',
  32. fieldLabel: '日期',
  33. columnWidth: 0.5,
  34. operation: 'between',
  35. value: '7'
  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. text: '结案',
  186. xtype: 'button',
  187. handler: 'onEnd',
  188. }],
  189. baseColumn: [{
  190. text: 'id',
  191. dataIndex: 'ma_id',
  192. hidden: true,
  193. xtype: 'numbercolumn'
  194. }, {
  195. text: '制造单号',
  196. dataIndex: 'ma_code',
  197. width: 150
  198. }, {
  199. text: '单据日期',
  200. dataIndex: 'createTime',
  201. xtype: 'datecolumn',
  202. width: 110
  203. }, {
  204. text: '销售单号',
  205. dataIndex: 'ma_salecode',
  206. width: 150
  207. }, {
  208. text: '客户名称',
  209. dataIndex: 'ma_custname',
  210. width: 150
  211. }, {
  212. text: '交货日期',
  213. align: 'center',
  214. dataIndex: 'ma_delivery',
  215. width: 110,
  216. xtype:'datecolumn'
  217. },{
  218. text: '产品编号',
  219. dataIndex: 'ma_prodcode',
  220. width: 150
  221. },{
  222. text: '产品名称',
  223. dataIndex: 'ma_prdetail',
  224. width: 150
  225. },{
  226. text: '产品型号',
  227. dataIndex: 'ma_prorispeccode',
  228. width: 150,
  229. renderer : saas.util.RenderUtil['renderer_makeprod']
  230. },{
  231. text: '单位',
  232. align: 'center',
  233. dataIndex: 'ma_prunit',
  234. width: 80
  235. },{
  236. text: '数量',
  237. align: 'center',
  238. dataIndex: 'ma_qty',
  239. xtype: 'numbercolumn',
  240. width: 110,
  241. renderer : function(v, m, r) {
  242. return saas.util.BaseUtil.numberFormat(v, 6, true);
  243. },
  244. },{
  245. text: '已完工数',
  246. align: 'center',
  247. dataIndex: 'ma_madeqty',
  248. xtype: 'numbercolumn',
  249. width: 110,
  250. renderer : function(v, m, r) {
  251. return saas.util.BaseUtil.numberFormat(v, 6, true);
  252. },
  253. },{
  254. text: '已领齐套数',
  255. align: 'center',
  256. dataIndex: 'ma_setqty',
  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_canmadeqty',
  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. dataIndex: 'ma_kind',
  274. width: 100,
  275. },{
  276. text: '工作中心',
  277. dataIndex: 'ma_wcname',
  278. width: 100,
  279. },{
  280. text: '审核状态',
  281. dataIndex: 'ma_status',
  282. align: 'center',
  283. width: 100,
  284. },{
  285. text: '领料状态',
  286. dataIndex: 'ma_getstatus',
  287. align: 'center',
  288. width: 100,
  289. },{
  290. text: '完工状态',
  291. dataIndex: 'ma_finishstatus',
  292. align: 'center',
  293. width: 100,
  294. },{
  295. text: '制单人',
  296. dataIndex: 'creatorName',
  297. align: 'center',
  298. width: 100,
  299. },{
  300. text: '计划开工日期',
  301. dataIndex: 'ma_planbegindate',
  302. width: 130,
  303. xtype:'datecolumn'
  304. },{
  305. text: '计划完工日期',
  306. dataIndex: 'ma_planenddate',
  307. width: 130,
  308. xtype:'datecolumn'
  309. },{
  310. text: '实际开工日期',
  311. dataIndex: 'ma_actbegindate',
  312. width: 130,
  313. xtype:'datecolumn'
  314. },{
  315. text: '实际完工日期',
  316. dataIndex: 'ma_actenddate',
  317. width: 130,
  318. xtype:'datecolumn'
  319. },{
  320. text: '结案日期',
  321. dataIndex: 'ma_enddate',
  322. width: 130,
  323. xtype:'datecolumn'
  324. },{
  325. text: '备注',
  326. dataIndex: 'ma_remark',
  327. width: 100
  328. }],
  329. relativeColumn: []
  330. }
  331. });
  332. this.callParent(arguments);
  333. },
  334. });