QueryPanel_1.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. Ext.define('make.view.make.makeIn.QueryPanel_1', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'make-makein-querypanel-1',
  4. controller: 'make-makein-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-makein-querypanel-1',
  24. caller: 'MakeIn',
  25. //importUploadPath: '/api/purchse/makein/saveToFormal',
  26. initComponent: function () {
  27. var me = this;
  28. Ext.apply(me, {
  29. queryFormItems: [ {
  30. xtype: 'condatefield',
  31. name: 'pi_date',
  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. "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: 'MakeIn',
  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_total',
  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. text: '审核日期',
  192. align: 'center',
  193. dataIndex: 'pi_auditdate',
  194. xtype: 'datecolumn',
  195. width: 110
  196. }, {
  197. hidden:true,
  198. text: '币种',
  199. dataIndex: 'pi_currency',
  200. align: 'center',
  201. width: 65
  202. }, {
  203. text: '备注',
  204. dataIndex: 'pi_remark',
  205. width: 250
  206. }],
  207. relativeColumn: [{
  208. text: 'id',
  209. dataIndex: 'pd_id',
  210. xtype: 'numbercolumn',
  211. hidden: true
  212. }, {
  213. text: '完工单号',
  214. dataIndex: 'pi_inoutno',
  215. width: 150
  216. }, {
  217. text: '单据日期',
  218. dataIndex: 'pi_date',
  219. xtype: 'datecolumn',
  220. width: 110
  221. }, {
  222. text: '审核状态',
  223. align: 'center',
  224. dataIndex: 'pi_status',
  225. width: 80
  226. }, {
  227. text: '物料编号',
  228. dataIndex: 'pr_code',
  229. width: 150,
  230. }, {
  231. text: '厂家/品牌',
  232. dataIndex: 'pr_brand',
  233. width: 100
  234. }, {
  235. text: '物料名称',
  236. dataIndex: 'pr_detail',
  237. width: 150
  238. }, {
  239. text: '型号',
  240. dataIndex: 'pr_orispeccode',
  241. width: 200,
  242. renderer: saas.util.RenderUtil['renderer_prod']
  243. }, {
  244. text: '规格',
  245. dataIndex: 'pr_spec',
  246. width: 200
  247. }, {
  248. text: '仓库',
  249. dataIndex: 'pd_whname',
  250. width: 120
  251. }, {
  252. text: '完工数量',
  253. dataIndex: 'pd_inqty',
  254. xtype: 'numbercolumn',
  255. width: 110,
  256. renderer: function(v, m, r) {
  257. return saas.util.BaseUtil.numberFormat(v, 6, true);
  258. }
  259. }, {
  260. text: '单位',
  261. dataIndex: 'pr_unit',
  262. width: 65
  263. }, {
  264. text: '单价(元)',
  265. dataIndex: 'pd_orderprice',
  266. xtype: 'numbercolumn',
  267. renderer: function(v, m, r) {
  268. return saas.util.BaseUtil.numberFormat(v, 8, true);
  269. },
  270. width: 110
  271. }, {
  272. text: '金额(元)',
  273. hidden:true,
  274. dataIndex: 'pd_ordertotal',
  275. xtype: 'numbercolumn',
  276. width: 110,
  277. renderer: function(v, m, r) {
  278. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  279. },
  280. }, {
  281. text: '备注',
  282. dataIndex: 'pd_remark',
  283. width: 250
  284. }]
  285. }
  286. });
  287. this.callParent(arguments);
  288. },
  289. });