QueryPanel_1.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. Ext.define('make.view.make.makePick.QueryPanel_1', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'make-makepick-querypanel-1',
  4. controller: 'make-makepick-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-makepick-querypanel-1',
  24. caller: 'MakePick',
  25. //importUploadPath: '/api/purchse/makepick/saveToFormal',
  26. initComponent: function () {
  27. var me = this;
  28. Ext.apply(me, {
  29. queryFormItems: [ {
  30. xtype: 'condatefield',
  31. name: 'pi_date',
  32. fieldLabel: '日期',
  33. value:7,
  34. columnWidth: 0.5,
  35. operation: 'between',
  36. },{
  37. xtype: 'multiqueryField',
  38. columnWidth: 0.4,
  39. name: 'multi_query',
  40. querys: {
  41. "BillCode": {"field": "pi_inoutno" ,"desc": "领料单号"},
  42. "MakeCode": {"field": "prodiodetail.pd_ordercode" ,"desc": "制造单号"},
  43. "Prod": {"field": "pr_code", "dbfinds": [{//物料
  44. from: 'pr_code',
  45. to: 'pr_code'
  46. },{
  47. from: 'pr_detail',
  48. to: 'pr_detail'
  49. }]},
  50. "Emp":{"field": "prodinout.creatorName", "dbfinds": [{
  51. from: 'em_name',
  52. to: 'prodinout.creatorName'
  53. }]},
  54. },
  55. setShowDetail: function(v){
  56. this.showDetail = (v == 'Prod' ||v=='MakeCode');
  57. },
  58. }],
  59. moreQueryFormItems: [{
  60. xtype: 'condatefield',
  61. name: 'pi_date',
  62. fieldLabel: '单据日期',
  63. value:1,
  64. columnWidth: 1
  65. }, {
  66. xtype: 'departDbfindTrigger',
  67. name: 'pi_departmentname',
  68. fieldLabel: '部门'
  69. },{
  70. xtype: 'warehouseDbfindTrigger',
  71. name: 'prodiodetail.pd_whname',
  72. showDetail: true,
  73. fieldLabel: '仓库'
  74. },{
  75. xtype: 'productDbfindTrigger',
  76. name: 'Prodiodetail.pd_prodcode',
  77. showDetail: true,
  78. fieldLabel: '物料编号'
  79. },{
  80. xtype: 'textfield',
  81. name: 'pr_detail',
  82. fieldLabel: '产品名称',
  83. readOnly: true,
  84. }, {
  85. xtype: 'textfield',
  86. name: 'pr_orispeccode',
  87. fieldLabel: '产品型号',
  88. readOnly: true,
  89. }, {
  90. xtype: "remotecombo",
  91. name: "pr_brand",
  92. fieldLabel: "厂家/品牌",
  93. storeUrl: '/api/document/productbrand/getCombo',
  94. editable: false,
  95. hiddenBtn:true
  96. },{
  97. xtype: 'combobox',
  98. name: 'pi_statuscode',
  99. fieldLabel: '审核状态',
  100. queryMode: 'local',
  101. displayField: 'pi_status',
  102. valueField: 'pi_statuscode',
  103. emptyText :'全部',
  104. editable:false,
  105. store: Ext.create('Ext.data.ArrayStore', {
  106. fields: ['pi_statuscode', 'pi_status'],
  107. data: [
  108. ["ALL", "全部"],
  109. ["AUDITED", "已审核"],
  110. ["UNAUDITED", "未审核"]
  111. ]
  112. }),
  113. getCondition: function(value) {
  114. if(value == 'ALL') {
  115. return '1=1';
  116. }else {
  117. return 'pi_statuscode=\'' + value + '\'';
  118. }
  119. }
  120. }, {
  121. xtype: 'employeeDbfindTrigger',
  122. name: 'creatorName',
  123. fieldLabel: '录入人',
  124. emptyText:'请输入账户名称或姓名',
  125. getCondition: function(value) {
  126. if(!value) {
  127. return '1=1';
  128. }else {
  129. return 'prodinout.creatorName like\'%' + value + '%\'';
  130. }
  131. }
  132. },{
  133. xtype: 'employeeDbfindTrigger',
  134. name: 'pi_auditman',
  135. fieldLabel: '审核人',
  136. emptyText:'请输入账户名称或姓名',
  137. }],
  138. queryGridConfig: {
  139. idField: 'id',
  140. codeField: 'pi_inoutno',
  141. mainIdField:'_id',
  142. detailIdField:'pd_id',
  143. addTitle: me.addTitle,
  144. addXtype: me.addXtype,
  145. defaultCondition: me.defaultCondition,
  146. baseVastUrl: me.baseVastUrl,
  147. caller: 'MakePick',
  148. baseColumn: [{
  149. text: 'id',
  150. dataIndex: 'id',
  151. hidden: true,
  152. xtype: 'numbercolumn'
  153. }, {
  154. text: '领料单号',
  155. dataIndex: 'pi_inoutno',
  156. width: 150
  157. }, {
  158. text: '单据类型',
  159. dataIndex: 'pi_class',
  160. hidden: true
  161. }, {
  162. text: '单据日期',
  163. dataIndex: 'pi_date',
  164. xtype: 'datecolumn',
  165. width: 110
  166. }, {
  167. text: '审核状态',
  168. align: 'center',
  169. dataIndex: 'pi_status',
  170. width: 80
  171. }, {
  172. text: '金额(元)',
  173. hidden:true,
  174. xtype: 'numbercolumn',
  175. dataIndex: 'pi_costtotal',
  176. width: 110,
  177. renderer: function(v, m, r) {
  178. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  179. }
  180. }, {
  181. text: '录入人',
  182. align: 'center',
  183. dataIndex: 'creatorName',
  184. width: 100
  185. }, {
  186. text: '审核人',
  187. align: 'center',
  188. dataIndex: 'pi_auditman',
  189. width: 100
  190. }, {
  191. hidden:true,
  192. text: '币种',
  193. dataIndex: 'pi_currency',
  194. align: 'center',
  195. width: 65
  196. }, {
  197. text: '备注',
  198. dataIndex: 'pi_remark',
  199. width: 250
  200. }],
  201. relativeColumn: [{
  202. text: 'id',
  203. dataIndex: 'pd_id',
  204. xtype: 'numbercolumn',
  205. hidden: true
  206. }, {
  207. text: '领料单号',
  208. dataIndex: 'pi_inoutno',
  209. width: 150
  210. }, {
  211. text: '单据日期',
  212. dataIndex: 'pi_date',
  213. xtype: 'datecolumn',
  214. width: 110
  215. }, {
  216. text: '审核状态',
  217. align: 'center',
  218. dataIndex: 'pi_status',
  219. width: 80
  220. }, {
  221. text: '制造单号',
  222. dataIndex: 'pd_ordercode',
  223. width: 150
  224. }, {
  225. text: '工单序号',
  226. dataIndex: 'pd_orderdetno',
  227. align: 'center',
  228. width: 80
  229. }, {
  230. text: '物料编号',
  231. dataIndex: 'pr_code',
  232. width: 150,
  233. }, {
  234. text: '厂家/品牌',
  235. dataIndex: 'pr_brand',
  236. width: 100
  237. }, {
  238. text: '物料名称',
  239. dataIndex: 'pr_detail',
  240. width: 150
  241. }, {
  242. text: '型号',
  243. dataIndex: 'pr_orispeccode',
  244. width: 200,
  245. renderer: saas.util.RenderUtil['renderer_prod']
  246. }, {
  247. text: '规格',
  248. dataIndex: 'pr_spec',
  249. width: 200
  250. }, {
  251. text: '仓库',
  252. dataIndex: 'pd_whname',
  253. width: 120
  254. }, {
  255. text: '数量',
  256. dataIndex: 'pd_outqty',
  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. dataIndex: 'pr_unit',
  265. width: 65
  266. }, {
  267. text: '成本单价(元)',
  268. dataIndex: 'pd_price',
  269. xtype: 'numbercolumn',
  270. renderer: function(v, m, r) {
  271. return saas.util.BaseUtil.numberFormat(v, 8, true);
  272. },
  273. width: 110
  274. }, {
  275. text: '金额(元)',
  276. hidden:true,
  277. dataIndex: 'pd_total',
  278. xtype: 'numbercolumn',
  279. width: 110,
  280. renderer: function(v, m, r) {
  281. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  282. },
  283. }, {
  284. text: '备注',
  285. dataIndex: 'pd_remark',
  286. width: 250
  287. }]
  288. }
  289. });
  290. this.callParent(arguments);
  291. },
  292. });