QueryPanel_4.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. Ext.define('make.view.osmake.osMake.QueryPanel_4', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'osmake-osmake-querypanel-4',
  4. controller: 'osmake-osmake-querypanel',
  5. viewModel: {
  6. extend: 'saas.view.core.query.QueryPanelModel',
  7. data: {
  8. form: {}, // 查询字段记录
  9. addEnable: false, // 显示新增按钮
  10. auditEnable: true, // 显示审核按钮
  11. printEnable: false, // 显示打印按钮
  12. importEnable: false, // 显示导入按钮
  13. exportEnable: true, // 显示导出按钮
  14. closeEnable: false, // 显示关闭按钮
  15. deleteEnable: true, // 显示删除按钮
  16. deleteDisable:false, //删除按钮是否可使用
  17. openAudit:false,//单独显示审核按钮
  18. openUnAudit:false,//单独显示反审核按钮
  19. openEnable:false, //显示开启 针对已取消列表
  20. configurable: true, // 允许列设置
  21. }
  22. },
  23. viewName: 'osmake-osmake-querypanel',
  24. caller: 'OsMake',
  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_custcode" ,"desc": "客户"},
  50. "Vend": {"field": "ma_vendcode" ,"desc": "供应商"},
  51. "Emp":{"field": "make.creatorName", "dbfinds": [{
  52. from: 'em_name',
  53. to: 'make.creatorName'
  54. }]},
  55. },
  56. setShowDetail: function(v){
  57. this.showDetail = false;
  58. }
  59. }],
  60. moreQueryFormItems: [{
  61. xtype: 'saledetailDbfindTrigger',
  62. name: 'ma_salecode',
  63. fieldLabel: '订单编号'
  64. }, {
  65. xtype: 'customerDbfindTrigger',
  66. name: 'ma_custname',
  67. fieldLabel: '客户名称'
  68. }, {
  69. xtype: 'condatefield',
  70. name: 'ma_delivery',
  71. fieldLabel: '交货日期',
  72. columnWidth: 1
  73. }, {
  74. xtype: 'productMDbfindTrigger',
  75. name: 'ma_prodcode',
  76. fieldLabel: '物料编号'
  77. }, {
  78. xtype: 'textfield',
  79. name: 'pr_detail',
  80. fieldLabel: '产品名称',
  81. readOnly: true,
  82. }, {
  83. xtype: 'textfield',
  84. name: 'pr_orispeccode',
  85. fieldLabel: '产品型号',
  86. readOnly: true,
  87. }, {
  88. editable: false,
  89. xtype: "remotecombo",
  90. storeUrl: '/api/document/productbrand/getCombo',
  91. name: "pr_brand",
  92. fieldLabel: "厂家/品牌",
  93. hiddenBtn: true,
  94. }, {
  95. xtype: 'vendorDbfindTrigger',
  96. name: 'ma_vendname',
  97. fieldLabel: '外协厂商'
  98. }, {
  99. xtype: 'combobox',
  100. name: 'ma_currency',
  101. fieldLabel: '币别',
  102. queryMode: 'local',
  103. displayField: 'ma_currency',
  104. valueField: 'ma_currency',
  105. emptyText: '',
  106. editable: false,
  107. store: Ext.create('Ext.data.ArrayStore', {
  108. fields: ['ma_currency'],
  109. data: [
  110. ["RMB", "RMB"],
  111. ["USD", "USD"],
  112. ["HKD", "HKD"]
  113. ]
  114. }),
  115. getCondition: function (value) {
  116. if (!value) {
  117. return '1=1';
  118. } else {
  119. return 'ma_currency=\'' + value + '\'';
  120. }
  121. }
  122. }, {
  123. xtype: "remotecombo",
  124. name: "ma_kind",
  125. fieldLabel: "外协类型",
  126. storeUrl: '/api/make/kind/list/osmake',
  127. valueField: 'mk_name',
  128. displayField: 'mk_name',
  129. hiddenBtn: true,
  130. }, {
  131. xtype: 'combobox',
  132. name: 'ma_statuscode',
  133. fieldLabel: '审核状态',
  134. queryMode: 'local',
  135. displayField: 'ma_status',
  136. valueField: 'ma_statuscode',
  137. emptyText: '全部',
  138. editable: false,
  139. store: Ext.create('Ext.data.ArrayStore', {
  140. fields: ['ma_statuscode', 'ma_status'],
  141. data: [
  142. ["ALL", "全部"],
  143. ["AUDITED", "已审核"],
  144. ["UNAUDITED", "未审核"]
  145. ]
  146. }),
  147. getCondition: function (value) {
  148. if (value == 'ALL') {
  149. return '1=1';
  150. } else {
  151. return 'ma_statuscode=\'' + value + '\'';
  152. }
  153. }
  154. }, {
  155. xtype: 'employeeDbfindTrigger',
  156. name: 'ma_auditman',
  157. fieldLabel: '审核人',
  158. emptyText: '请输入账户名称或姓名',
  159. }, {
  160. xtype: 'employeeDbfindTrigger',
  161. name: 'creatorName',
  162. fieldLabel: '录入人',
  163. emptyText: '请输入账户名称或姓名',
  164. getCondition: function (value) {
  165. if (!value) {
  166. return '1=1';
  167. } else {
  168. return 'make.creatorName like\'%' + value + '%\'';
  169. }
  170. }
  171. }, {
  172. xtype: 'condatefield',
  173. name: 'ma_planbegindate',
  174. fieldLabel: '计划开工日期',
  175. columnWidth: 1
  176. }, {
  177. xtype: 'condatefield',
  178. name: 'ma_planenddate',
  179. fieldLabel: '计划完工日期',
  180. columnWidth: 1
  181. }, {
  182. xtype: 'condatefield',
  183. name: 'make.createTime',
  184. fieldLabel: '单据日期',
  185. columnWidth: 1
  186. }, {
  187. xtype: 'employeeDbfindTrigger',
  188. name: 'ma_auditman',
  189. fieldLabel: '审核人',
  190. emptyText: '请输入账户名称或姓名',
  191. }],
  192. queryGridConfig: {
  193. idField: 'ma_id',
  194. codeField: 'ma_code',
  195. mainIdField:'ma_id',
  196. detailIdField:'mm_id',
  197. addTitle: '外协单',
  198. addXtype: 'osmake-osmake-formpanel',
  199. baseVastUrl: '/api/make/make/',
  200. defaultCondition:me.defaultCondition,
  201. caller: 'OsMake',
  202. toolBtns: [{
  203. text: '反结案',
  204. xtype: 'button',
  205. handler: 'onResEnd',
  206. }],
  207. baseColumn: [{
  208. text: 'id',
  209. dataIndex: 'ma_id',
  210. hidden: true,
  211. xtype: 'numbercolumn'
  212. }, {
  213. text: '外协单号',
  214. dataIndex: 'ma_code',
  215. width: 150
  216. }, {
  217. text: '单据日期',
  218. dataIndex: 'createTime',
  219. xtype: 'datecolumn',
  220. width: 110
  221. }, {
  222. text: '销售单号',
  223. dataIndex: 'ma_salecode',
  224. width: 150
  225. }, {
  226. text: '客户名称',
  227. dataIndex: 'ma_custname',
  228. width: 150
  229. }, {
  230. text: '交货日期',
  231. align: 'center',
  232. dataIndex: 'ma_delivery',
  233. width: 110,
  234. xtype:'datecolumn'
  235. },{
  236. text: '外协厂商',
  237. dataIndex: 'ma_vendname',
  238. width: 150
  239. },{
  240. text: '产品编号',
  241. dataIndex: 'ma_prodcode',
  242. width: 150
  243. },{
  244. text: '产品名称',
  245. dataIndex: 'ma_prdetail',
  246. width: 150
  247. },{
  248. text: '产品型号',
  249. dataIndex: 'ma_prorispeccode',
  250. width: 150,
  251. renderer : saas.util.RenderUtil['renderer_makeprod']
  252. },{
  253. text: '单位',
  254. align: 'center',
  255. dataIndex: 'ma_prunit',
  256. width: 80
  257. },{
  258. text: '数量',
  259. align: 'center',
  260. dataIndex: 'ma_qty',
  261. xtype: 'numbercolumn',
  262. width: 110,
  263. renderer : function(v, m, r) {
  264. return saas.util.BaseUtil.numberFormat(v, 6, true);
  265. },
  266. },{
  267. text: '已完工数',
  268. align: 'center',
  269. dataIndex: 'ma_madeqty',
  270. xtype: 'numbercolumn',
  271. width: 110,
  272. renderer : function(v, m, r) {
  273. return saas.util.BaseUtil.numberFormat(v, 6, true);
  274. },
  275. },{
  276. text: '已领齐套数',
  277. align: 'center',
  278. dataIndex: 'ma_setqty',
  279. xtype: 'numbercolumn',
  280. width: 110,
  281. renderer : function(v, m, r) {
  282. return saas.util.BaseUtil.numberFormat(v, 6, true);
  283. },
  284. },{
  285. text: '可完工数',
  286. align: 'center',
  287. dataIndex: 'ma_canmadeqty',
  288. xtype: 'numbercolumn',
  289. width: 110,
  290. renderer : function(v, m, r) {
  291. return saas.util.BaseUtil.numberFormat(v, 6, true);
  292. },
  293. },{
  294. text: '币种',
  295. dataIndex: 'ma_currency',
  296. align: 'center',
  297. width: 80,
  298. },{
  299. text: '价税合计(元)',
  300. xtype: 'numbercolumn',
  301. dataIndex: "ma_total",
  302. width: 110,
  303. renderer: function(v, m, r) {
  304. return saas.util.BaseUtil.numberFixFormat(v, 2, true);
  305. },
  306. },{
  307. text: '外协类型',
  308. dataIndex: 'ma_kind',
  309. width: 100,
  310. },{
  311. text: '审核状态',
  312. dataIndex: 'ma_status',
  313. align: 'center',
  314. width: 100,
  315. },{
  316. text: '领料状态',
  317. dataIndex: 'ma_getstatus',
  318. align: 'center',
  319. width: 100,
  320. },{
  321. text: '完工状态',
  322. dataIndex: 'ma_finishstatus',
  323. align: 'center',
  324. width: 100,
  325. },{
  326. text: '制单人',
  327. dataIndex: 'creatorName',
  328. align: 'center',
  329. width: 100,
  330. },{
  331. text: '计划开工日期',
  332. dataIndex: 'ma_planbegindate',
  333. width: 130,
  334. xtype:'datecolumn'
  335. },{
  336. text: '计划完工日期',
  337. dataIndex: 'ma_planenddate',
  338. width: 130,
  339. xtype:'datecolumn'
  340. },{
  341. text: '实际开工日期',
  342. dataIndex: 'ma_actbegindate',
  343. width: 130,
  344. xtype:'datecolumn'
  345. },{
  346. text: '实际完工日期',
  347. dataIndex: 'ma_actenddate',
  348. width: 130,
  349. xtype:'datecolumn'
  350. },{
  351. text: '结案日期',
  352. dataIndex: 'ma_enddate',
  353. width: 130,
  354. xtype:'datecolumn'
  355. },{
  356. text: '备注',
  357. dataIndex: 'ma_remark',
  358. width: 100
  359. }],
  360. relativeColumn: []
  361. }
  362. });
  363. this.callParent(arguments);
  364. },
  365. });