QueryPanel_1.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. Ext.define('make.view.make.makeScrap.QueryPanel_1', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'make-makescrap-querypanel-1',
  4. controller: 'make-makescrap-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: true, // 显示删除按钮
  16. deleteDisable:false, //删除按钮是否可使用
  17. openAudit:true,//单独显示审核按钮
  18. openUnAudit:false,//单独显示反审核按钮
  19. openEnable:false, //显示开启 针对已取消列表
  20. configurable: true, // 允许列设置
  21. }
  22. },
  23. viewName: 'make-makescrap-querypanel-1',
  24. caller: 'MakeScrap',
  25. //importUploadPath: '/api/purchse/makescrap/saveToFormal',
  26. initComponent: function () {
  27. var me = this;
  28. Ext.apply(me, {
  29. queryFormItems: [ {
  30. xtype: 'condatefield',
  31. name: 'makeScrap.createTime',
  32. fieldLabel: '日期',
  33. columnWidth: 0.5,
  34. value: '7',
  35. operation: 'between',
  36. },{
  37. xtype: 'multiqueryField',
  38. columnWidth: 0.4,
  39. name: 'multi_query',
  40. querys: {
  41. "Vend": {"field": "ms_vendname","desc":"供应商", "dbfinds": [{
  42. from: 've_name',
  43. to: 'ms_vendname'
  44. }]},
  45. "BillCode": {"field": "ms_code" ,"desc": "报废单号"},
  46. "MakeCode": {"field": "md_macode" ,"desc": "制造单号"},
  47. "Prod": {"field": "pr_code", "dbfinds": [{//物料
  48. from: 'pr_code',
  49. to: 'pr_code'
  50. },{
  51. from: 'pr_detail',
  52. to: 'pr_detail'
  53. }]},
  54. "Emp":{"field": "makescrap.creatorName", "dbfinds": [{
  55. from: 'em_name',
  56. to: 'makescrap.creatorName'
  57. }]},
  58. },
  59. setShowDetail: function(v){
  60. this.showDetail = (v == 'Prod' ||v=='MakeCode');
  61. }
  62. }],
  63. moreQueryFormItems: [{
  64. xtype: 'condatefield',
  65. name: 'makescrap.createTime',
  66. fieldLabel: '单据日期',
  67. value:1,
  68. columnWidth: 1
  69. }, {
  70. xtype: 'departDbfindTrigger',
  71. name: 'ms_departmentname',
  72. fieldLabel: '部门'
  73. },{
  74. xtype: 'productDbfindTrigger',
  75. name: 'Makescrapdetail.md_prodcode',
  76. showDetail: true,
  77. fieldLabel: '物料编号'
  78. },{
  79. xtype: 'textfield',
  80. name: 'pr_detail',
  81. fieldLabel: '产品名称',
  82. readOnly: true,
  83. }, {
  84. xtype: 'textfield',
  85. name: 'pr_orispeccode',
  86. fieldLabel: '产品型号',
  87. readOnly: true,
  88. }, {
  89. xtype: "remotecombo",
  90. name: "pr_brand",
  91. fieldLabel: "厂家/品牌",
  92. storeUrl: '/api/document/productbrand/getCombo',
  93. editable: false,
  94. hiddenBtn:true
  95. },{
  96. xtype: 'combobox',
  97. name: 'ms_statuscode',
  98. fieldLabel: '审核状态',
  99. queryMode: 'local',
  100. displayField: 'ms_status',
  101. valueField: 'ms_statuscode',
  102. emptyText :'全部',
  103. editable:false,
  104. store: Ext.create('Ext.data.ArrayStore', {
  105. fields: ['ms_statuscode', 'ms_status'],
  106. data: [
  107. ["ALL", "全部"],
  108. ["AUDITED", "已审核"],
  109. ["UNAUDITED", "未审核"]
  110. ]
  111. }),
  112. getCondition: function(value) {
  113. if(value == 'ALL') {
  114. return '1=1';
  115. }else {
  116. return 'ms_statuscode=\'' + value + '\'';
  117. }
  118. }
  119. }, {
  120. xtype: 'employeeDbfindTrigger',
  121. name: 'creatorName',
  122. fieldLabel: '录入人',
  123. emptyText:'请输入账户名称或姓名',
  124. getCondition: function(value) {
  125. if(!value) {
  126. return '1=1';
  127. }else {
  128. return 'makescrap.creatorName like\'%' + value + '%\'';
  129. }
  130. }
  131. },{
  132. xtype: 'employeeDbfindTrigger',
  133. name: 'ms_auditman',
  134. fieldLabel: '审核人',
  135. emptyText:'请输入账户名称或姓名',
  136. }],
  137. queryGridConfig: {
  138. idField: 'id',
  139. codeField: 'ms_code',
  140. mainIdField:'_id',
  141. detailIdField:'sd_id',
  142. addTitle: me.addTitle,
  143. addXtype: me.addXtype,
  144. defaultCondition: me.defaultCondition,
  145. baseVastUrl: me.baseVastUrl,
  146. caller: 'MakeScrap',
  147. baseColumn: [{
  148. text: 'id',
  149. dataIndex: 'id',
  150. hidden: true,
  151. xtype: 'numbercolumn'
  152. }, {
  153. text: '报废单号',
  154. dataIndex: 'ms_code',
  155. width: 150
  156. }, {
  157. text: '单据类型',
  158. dataIndex: 'ms_class',
  159. hidden: true
  160. }, {
  161. text: '单据日期',
  162. dataIndex: 'createTime',
  163. xtype: 'datecolumn',
  164. width: 110
  165. }, {
  166. text: '审核状态',
  167. align: 'center',
  168. dataIndex: 'ms_status',
  169. width: 80
  170. }, {
  171. text: '金额(元)',
  172. hidden:true,
  173. xtype: 'numbercolumn',
  174. dataIndex: 'ms_amount',
  175. width: 110,
  176. renderer: function(v, m, r) {
  177. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  178. }
  179. }, {
  180. text: '录入人',
  181. align: 'center',
  182. dataIndex: 'creatorName',
  183. width: 100
  184. }, {
  185. text: '审核人',
  186. align: 'center',
  187. dataIndex: 'ms_auditman',
  188. width: 100
  189. }, {
  190. text: '审核日期',
  191. align: 'center',
  192. dataIndex: 'ms_auditdate',
  193. xtype: 'datecolumn',
  194. width: 100
  195. }, {
  196. text: '备注',
  197. dataIndex: 'ms_remark',
  198. width: 250
  199. }],
  200. relativeColumn: [{
  201. text: 'id',
  202. dataIndex: 'ms_id',
  203. xtype: 'numbercolumn',
  204. hidden: true
  205. }, {
  206. text: '报废单号',
  207. dataIndex: 'ms_code',
  208. width: 150
  209. }, {
  210. text: '单据日期',
  211. dataIndex: 'createTime',
  212. xtype: 'datecolumn',
  213. width: 110
  214. }, {
  215. text: '审核状态',
  216. align: 'center',
  217. dataIndex: 'ms_status',
  218. width: 80
  219. }, {
  220. text: '制造单号',
  221. dataIndex: 'md_macode',
  222. width: 150,
  223. }, {
  224. text: '工单序号',
  225. dataIndex: 'md_mmdetno',
  226. align: 'center',
  227. width: 80
  228. },{
  229. text: '物料编号',
  230. dataIndex: 'pr_code',
  231. width: 150,
  232. }, {
  233. text: '厂家/品牌',
  234. dataIndex: 'pr_brand',
  235. width: 100
  236. }, {
  237. text: '物料名称',
  238. dataIndex: 'pr_detail',
  239. width: 150
  240. }, {
  241. text: '型号',
  242. dataIndex: 'pr_orispeccode',
  243. width: 200,
  244. renderer: saas.util.RenderUtil['renderer_prod']
  245. }, {
  246. text: '规格',
  247. dataIndex: 'pr_spec',
  248. width: 250
  249. }, {
  250. text: '报废数量',
  251. dataIndex: 'md_qty',
  252. xtype: 'numbercolumn',
  253. width: 110,
  254. renderer: function(v, m, r) {
  255. return saas.util.BaseUtil.numberFormat(v, 6, true);
  256. }
  257. }, {
  258. text: '单位',
  259. dataIndex: 'pr_unit',
  260. width: 65
  261. }, {
  262. text: '报废原因',
  263. dataIndex: 'md_reason',
  264. width: 200
  265. }, {
  266. text: '成本单价(元)',
  267. dataIndex: 'md_price',
  268. xtype: 'numbercolumn',
  269. renderer: function(v, m, r) {
  270. return saas.util.BaseUtil.numberFormat(v, 8, true);
  271. },
  272. width: 110
  273. }, {
  274. text: '金额(元)',
  275. hidden:true,
  276. dataIndex: 'md_total',
  277. xtype: 'numbercolumn',
  278. width: 110,
  279. renderer: function(v, m, r) {
  280. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  281. },
  282. }, {
  283. text: '备注',
  284. dataIndex: 'md_remark',
  285. width: 250
  286. }]
  287. }
  288. });
  289. this.callParent(arguments);
  290. },
  291. });