Conf.js.svn-base 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. Ext.define('erp.view.ma.Conf',{
  2. extend: 'Ext.Viewport',
  3. layout: 'border',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. region: 'north',
  10. layout: {
  11. type: 'hbox',
  12. pack: 'center'
  13. },
  14. bodyStyle: 'background: #f1f1f1;',
  15. defaults: {
  16. margin: '3 10 3 0'
  17. },
  18. items: [ {
  19. xtype: 'button',
  20. text: '差异分析',
  21. cls: 'x-btn-blue',
  22. width: 100,
  23. id: 'condition'
  24. }, {
  25. xtype: 'button',
  26. text: '其它配置项',
  27. cls: 'x-btn-blue',
  28. width: 100,
  29. id: 'others'
  30. }, {
  31. xtype: 'button',
  32. text: '关闭',
  33. cls: 'x-btn-blue',
  34. width: 60
  35. }, {
  36. xtype: 'displayfield',
  37. id: 'logger',
  38. margin: '3 2 3 3',
  39. width: 110
  40. }, {
  41. xtype: 'button',
  42. text: '一键同步?',
  43. cls: 'x-btn-blue',
  44. margin: '3 10 3 0',
  45. width: 80,
  46. id: 'sync',
  47. hidden: true
  48. }]
  49. }, {
  50. region: 'center',
  51. scrollable: true,
  52. autoScroll: true,
  53. defaults: {
  54. xtype: 'gridpanel',
  55. width: '100%',
  56. collapsible: true,
  57. columns: [{
  58. text: '配置项',
  59. dataIndex: 'conf',
  60. flex: 1,
  61. renderer: function(val, meta) {
  62. meta.tdCls = Ext.baseCSSPrefix + 'grid-cell-special';
  63. return val;
  64. }
  65. },{
  66. text: '优软标准配置',
  67. dataIndex: 'usoft',
  68. flex: 4
  69. }, {
  70. text: '当前账套配置',
  71. dataIndex: 'current',
  72. flex: 4
  73. }, {
  74. text: '结果',
  75. dataIndex: 'result',
  76. flex: 0.5,
  77. renderer: function(val, meta, record) {
  78. if(Ext.isEmpty(record.get('usoft')) && Ext.isEmpty(record.get('current'))) {
  79. meta.tdCls = '';
  80. } else if((val > 1) || (record.get('usoft') != record.get('current'))){
  81. meta.tdCls = 'error';
  82. val = val == null ? 1 : val;
  83. if(val > 1)
  84. return '<font color=red>' + val + '</font>个差异';
  85. } else {
  86. meta.tdCls = 'checked';
  87. }
  88. return '';
  89. }
  90. }],
  91. columnLines: true,
  92. viewConfig: {
  93. getRowClass: function(record) {
  94. return !Ext.isEmpty(record.get('result')) ? 'custom-alt' : '';
  95. }
  96. }
  97. },
  98. items: [{
  99. title: '导航栏设置',
  100. id: 'navigation',
  101. collapsed: false,
  102. store: new Ext.data.Store({
  103. fields: ['conf', 'usoft', 'current'],
  104. data: [{
  105. conf: '描述'
  106. },{
  107. conf: '链接'
  108. },{
  109. conf: '序号'
  110. },{
  111. conf: '是否叶节点'
  112. },{
  113. conf: '显示模式'
  114. },{
  115. conf: '允许删除'
  116. },{
  117. conf: '是否启用'
  118. },{
  119. conf: '允许扩展逻辑'
  120. },{
  121. conf: 'Caller'
  122. }]
  123. })
  124. }, {
  125. title: 'Form配置',
  126. id: 'form',
  127. store: new Ext.data.Store({
  128. fields: ['conf', 'usoft', 'current'],
  129. data: [{
  130. conf: '详细'
  131. },{
  132. conf: 'Caller'
  133. },{
  134. conf: '表名'
  135. },{
  136. conf: '界面名称'
  137. },{
  138. conf: '主表关键字'
  139. },{
  140. conf: 'Code字段'
  141. },{
  142. conf: '明细表名'
  143. },{
  144. conf: '明细关联字段'
  145. },{
  146. conf: '明细orderby'
  147. },{
  148. conf: '明细序号字段'
  149. },{
  150. conf: 'Buttons(新增)'
  151. },{
  152. conf: 'Buttons(读写)'
  153. },{
  154. conf: '审批流Caller'
  155. },{
  156. conf: '状态字段'
  157. },{
  158. conf: '状态码字段'
  159. },{
  160. conf: '明细状态'
  161. },{
  162. conf: '明细状态码'
  163. },{
  164. conf: '录入人字段'
  165. },{
  166. conf: '提交触发流程'
  167. }]
  168. })
  169. }, {
  170. title: 'Grid配置',
  171. id: 'detailgrid',
  172. store: new Ext.data.Store({
  173. fields: ['conf', 'usoft', 'current'],
  174. data: [{
  175. conf: '详细'
  176. }]
  177. })
  178. }, {
  179. title: 'Form Dbfind配置',
  180. id: 'dbfindsetui',
  181. store: new Ext.data.Store({
  182. fields: ['conf', 'usoft', 'current'],
  183. data: [{
  184. conf: '详细'
  185. }]
  186. })
  187. }, {
  188. title: 'Grid Dbfind配置',
  189. id: 'dbfindset',
  190. store: new Ext.data.Store({
  191. fields: ['conf', 'usoft', 'current'],
  192. data: [{
  193. conf: '详细'
  194. },{
  195. conf: 'Caller'
  196. },{
  197. conf: '表名'
  198. },{
  199. conf: '描述'
  200. },{
  201. conf: '分组SQL'
  202. },{
  203. conf: '排序SQL'
  204. },{
  205. conf: '筛选条件'
  206. }]
  207. })
  208. }, {
  209. title: 'Grid Dbfind对应关系',
  210. id: 'dbfindsetgrid',
  211. store: new Ext.data.Store({
  212. fields: ['conf', 'usoft', 'current'],
  213. data: [{
  214. conf: '详细'
  215. }]
  216. })
  217. }, {
  218. title: '下拉框配置',
  219. id: 'datalistcombo',
  220. store: new Ext.data.Store({
  221. fields: ['conf', 'usoft', 'current'],
  222. data: [{
  223. conf: 'Caller'
  224. },{
  225. conf: '字段'
  226. },{
  227. conf: '显示值'
  228. },{
  229. conf: '实际值'
  230. }]
  231. })
  232. }, {
  233. title: 'DataList配置',
  234. id: 'datalist',
  235. store: new Ext.data.Store({
  236. fields: ['conf', 'usoft', 'current'],
  237. data: [{
  238. conf: '详细'
  239. },{
  240. conf: 'Caller'
  241. },{
  242. conf: '表名'
  243. },{
  244. conf: '跳转页面'
  245. },{
  246. conf: 'SQL条件'
  247. },{
  248. conf: 'groupby语句'
  249. },{
  250. conf: 'orderby语句'
  251. },{
  252. conf: '主键字段'
  253. },{
  254. conf: '录入人字段'
  255. },{
  256. conf: '明细外键'
  257. },{
  258. conf: '关联列表Caller'
  259. }]
  260. })
  261. }, {
  262. title: '关联表结构',
  263. collapsed: false,
  264. id: 'table',
  265. store: new Ext.data.Store({
  266. fields: ['conf', 'usoft', 'current'],
  267. data: [{
  268. conf: '详细'
  269. }]
  270. })
  271. }, {
  272. title: '关联触发器',
  273. collapsed: false,
  274. id: 'trigger',
  275. store: new Ext.data.Store({
  276. fields: ['conf', 'usoft', 'current'],
  277. data: [{
  278. conf: '详细'
  279. }]
  280. })
  281. }, {
  282. title: '关联索引',
  283. collapsed: false,
  284. id: 'index',
  285. store: new Ext.data.Store({
  286. fields: ['conf', 'usoft', 'current'],
  287. data: [{
  288. conf: '详细'
  289. }]
  290. })
  291. }, {
  292. title: '数据字典配置',
  293. collapsed: false,
  294. id: 'datadictionary',
  295. store: new Ext.data.Store({
  296. fields: ['conf', 'usoft', 'current'],
  297. data: [{
  298. conf: '详细'
  299. }]
  300. })
  301. }, {
  302. title: 'Grid按钮配置',
  303. collapsed: false,
  304. id: 'gridbutton',
  305. store: new Ext.data.Store({
  306. fields: ['conf', 'usoft', 'current'],
  307. data: [{
  308. conf: '详细'
  309. }]
  310. })
  311. }, {
  312. title: 'UU字段',
  313. collapsed: false,
  314. id: 'uulistener',
  315. store: new Ext.data.Store({
  316. fields: ['conf', 'usoft', 'current'],
  317. data: [{
  318. conf: '详细'
  319. }]
  320. })
  321. }, {
  322. title: '逻辑配置',
  323. collapsed: false,
  324. id: 'logicsetup',
  325. store: new Ext.data.Store({
  326. fields: ['conf', 'usoft', 'current'],
  327. data: [{
  328. conf: '详细'
  329. }]
  330. })
  331. }]
  332. }]
  333. });
  334. me.callParent(arguments);
  335. }
  336. });