QueryPanel_4.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. Ext.define('make.view.make.makeBase.QueryPanel_4', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'make-makebase-querypanel-4',
  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. },{
  36. xtype: 'multiqueryField',
  37. columnWidth: 0.4,
  38. name: 'multi_query',
  39. querys: {
  40. "Prod": {"field": "ma_prodcode", "dbfinds": [{//物料
  41. from: 'pr_code',
  42. to: 'ma_prodcode'
  43. },{
  44. from: 'pr_detail',
  45. to: 'pr_detail'
  46. }]},
  47. "MakeCode": {"field": "ma_code" ,"desc": "制造单号"},
  48. "BillCode": {"field": "ma_salecode" ,"desc": "订单号"},
  49. "Cust": {"field": "ma_custname", "dbfinds": [{
  50. from: 'cu_name',
  51. to: 'ma_custname'
  52. }]},
  53. "Emp":{"field": "make.creatorName", "dbfinds": [{
  54. from: 'em_name',
  55. to: 'make.creatorName'
  56. }]},
  57. },
  58. setShowDetail: function(v){
  59. this.showDetail = false;
  60. }
  61. }],
  62. moreQueryFormItems: [{
  63. xtype: 'saledetailDbfindTrigger',
  64. name: 'ma_salecode',
  65. fieldLabel: '订单编号'
  66. },{
  67. xtype: "customerDbfindTrigger",
  68. name: "ma_custname",
  69. fieldLabel: "客户名称",
  70. },{
  71. xtype: 'condatefield',
  72. name: 'ma_delivery',
  73. fieldLabel: '交货日期',
  74. value:7,
  75. columnWidth: 1
  76. },{
  77. xtype: 'productDbfindTrigger',
  78. name: 'ma_prodcode',
  79. fieldLabel: '物料编号'
  80. },{
  81. xtype: 'textfield',
  82. name: 'pr_detail',
  83. fieldLabel: '产品名称',
  84. readOnly: true,
  85. }, {
  86. xtype: 'textfield',
  87. name: 'pr_orispeccode',
  88. fieldLabel: '产品型号',
  89. readOnly: true,
  90. }, {
  91. xtype: "remotecombo",
  92. name: "pr_brand",
  93. fieldLabel: "厂家/品牌",
  94. storeUrl: '/api/document/productbrand/getCombo',
  95. editable: false,
  96. hiddenBtn:true
  97. },{
  98. xtype: "remotecombo",
  99. name: "ma_kind",
  100. fieldLabel: "制造类型",
  101. storeUrl:'/api/make/kind/list/make',
  102. valueField:'mk_name',
  103. displayField: 'mk_name',
  104. editable: false,
  105. hiddenBtn:true
  106. },{
  107. xtype: 'remotecombo',
  108. name: "ma_wcname",
  109. fieldLabel: "工作中心",
  110. storeUrl: '/api/document/workcenter/getCombo',
  111. editable: false,
  112. hiddenBtn:true
  113. },{
  114. xtype: 'combobox',
  115. name: 'ma_statuscode',
  116. fieldLabel: '审核状态',
  117. queryMode: 'local',
  118. displayField: 'ma_status',
  119. valueField: 'ma_statuscode',
  120. emptyText :'全部',
  121. editable:false,
  122. store: Ext.create('Ext.data.ArrayStore', {
  123. fields: ['ma_statuscode', 'ma_status'],
  124. data: [
  125. ["ALL", "全部"],
  126. ["AUDITED", "已审核"],
  127. ["UNAUDITED", "未审核"]
  128. ]
  129. }),
  130. getCondition: function(value) {
  131. if(value == 'ALL') {
  132. return '1=1';
  133. }else {
  134. return 'ma_statuscode=\'' + value + '\'';
  135. }
  136. }
  137. }, {
  138. xtype: 'employeeDbfindTrigger',
  139. name: 'creatorName',
  140. fieldLabel: '录入人',
  141. emptyText:'请输入账户名称或姓名',
  142. getCondition: function(value) {
  143. if(!value) {
  144. return '1=1';
  145. }else {
  146. return 'make.creatorName like\'%' + value + '%\'';
  147. }
  148. }
  149. },{
  150. xtype: 'condatefield',
  151. name: 'ma_planbegindate',
  152. fieldLabel: '计划开工日期',
  153. value:7,
  154. columnWidth: 1
  155. },{
  156. xtype: 'condatefield',
  157. name: 'ma_planenddate',
  158. fieldLabel: '计划完工日期',
  159. value:7,
  160. columnWidth: 1
  161. },{
  162. xtype: 'condatefield',
  163. name: 'make.createTime',
  164. fieldLabel: '录入日期',
  165. value:7,
  166. columnWidth: 1
  167. }, {
  168. xtype: 'employeeDbfindTrigger',
  169. name: 'ma_auditman',
  170. fieldLabel: '审核人',
  171. emptyText:'请输入账户名称或姓名',
  172. }],
  173. queryGridConfig: {
  174. idField: 'ma_id',
  175. codeField: 'ma_code',
  176. mainIdField:'ma_id',
  177. detailIdField:'mm_id',
  178. addTitle: '制造单',
  179. addXtype: 'make-makebase-formpanel',
  180. baseVastUrl: '/api/make/make/',
  181. caller: 'MakeBase',
  182. defaultCondition:me.defaultCondition,
  183. toolBtns: [{
  184. text: '反结案',
  185. xtype: 'button',
  186. handler: 'onResEnd',
  187. }],
  188. baseColumn: [{
  189. text: 'id',
  190. dataIndex: 'ma_id',
  191. hidden: true,
  192. xtype: 'numbercolumn'
  193. }, {
  194. text: '制造单号',
  195. dataIndex: 'ma_code',
  196. width: 150
  197. }, {
  198. text: '单据日期',
  199. dataIndex: 'createTime',
  200. xtype: 'datecolumn',
  201. width: 110
  202. }, {
  203. text: '销售单号',
  204. dataIndex: 'ma_salecode',
  205. width: 150
  206. }, {
  207. text: '客户名称',
  208. dataIndex: 'ma_custname',
  209. width: 150
  210. }, {
  211. text: '交货日期',
  212. align: 'center',
  213. dataIndex: 'ma_delivery',
  214. width: 110,
  215. xtype:'datecolumn'
  216. },{
  217. text: '产品编号',
  218. dataIndex: 'ma_prodcode',
  219. width: 150
  220. },{
  221. text: '产品名称',
  222. dataIndex: 'ma_prdetail',
  223. width: 150
  224. },{
  225. text: '产品型号',
  226. dataIndex: 'ma_prorispeccode',
  227. width: 150,
  228. renderer : saas.util.RenderUtil['renderer_makeprod']
  229. },{
  230. text: '单位',
  231. align: 'center',
  232. dataIndex: 'ma_prunit',
  233. width: 80
  234. },{
  235. text: '数量',
  236. align: 'center',
  237. dataIndex: 'ma_qty',
  238. xtype: 'numbercolumn',
  239. width: 110,
  240. renderer : function(v, m, r) {
  241. return saas.util.BaseUtil.numberFormat(v, 6, true);
  242. },
  243. },{
  244. text: '已完工数',
  245. align: 'center',
  246. dataIndex: 'ma_madeqty',
  247. xtype: 'numbercolumn',
  248. width: 110,
  249. renderer : function(v, m, r) {
  250. return saas.util.BaseUtil.numberFormat(v, 6, true);
  251. },
  252. },{
  253. text: '已领齐套数',
  254. align: 'center',
  255. dataIndex: 'ma_setqty',
  256. xtype: 'numbercolumn',
  257. width: 110,
  258. renderer : function(v, m, r) {
  259. return saas.util.BaseUtil.numberFormat(v, 6, true);
  260. },
  261. },{
  262. text: '可完工数',
  263. align: 'center',
  264. dataIndex: 'ma_canmadeqty',
  265. xtype: 'numbercolumn',
  266. width: 110,
  267. renderer : function(v, m, r) {
  268. return saas.util.BaseUtil.numberFormat(v, 6, true);
  269. },
  270. },{
  271. text: '制造类型',
  272. dataIndex: 'ma_kind',
  273. width: 100,
  274. },{
  275. text: '工作中心',
  276. dataIndex: 'ma_wcname',
  277. width: 100,
  278. },{
  279. text: '审核状态',
  280. dataIndex: 'ma_status',
  281. align: 'center',
  282. width: 100,
  283. },{
  284. text: '领料状态',
  285. dataIndex: 'ma_getstatus',
  286. align: 'center',
  287. width: 100,
  288. },{
  289. text: '完工状态',
  290. dataIndex: 'ma_finishstatus',
  291. align: 'center',
  292. width: 100,
  293. },{
  294. text: '制单人',
  295. dataIndex: 'creatorName',
  296. align: 'center',
  297. width: 100,
  298. },{
  299. text: '计划开工日期',
  300. dataIndex: 'ma_planbegindate',
  301. width: 130,
  302. xtype:'datecolumn'
  303. },{
  304. text: '计划完工日期',
  305. dataIndex: 'ma_planenddate',
  306. width: 130,
  307. xtype:'datecolumn'
  308. },{
  309. text: '实际开工日期',
  310. dataIndex: 'ma_actbegindate',
  311. width: 130,
  312. xtype:'datecolumn'
  313. },{
  314. text: '实际完工日期',
  315. dataIndex: 'ma_actenddate',
  316. width: 130,
  317. xtype:'datecolumn'
  318. },{
  319. text: '结案日期',
  320. dataIndex: 'ma_enddate',
  321. width: 130,
  322. xtype:'datecolumn'
  323. },{
  324. text: '备注',
  325. dataIndex: 'ma_remark',
  326. width: 100
  327. }],
  328. relativeColumn: []
  329. }
  330. });
  331. this.callParent(arguments);
  332. },
  333. });