123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- Ext.define('make.view.make.bom.bomEcndetailWin', {
- extend: 'Ext.window.Window',
- xtype: 'make-bom-bomecndetailwin',
- cls: 'x-window-dbfind',
- initId: null,
- scrollable: true,
- initComponent: function () {
- var me = this;
- Ext.apply(me, {
- items: [{
- xtype: 'grid',
- cls: 'core-base-gridpanel',
- scrollable: true,
- plugins: [{
- ptype: 'gridexporter',
- }, {
- ptype: 'menuclipboard'
- }],
- tbar: ['->', {
- xtype: 'button',
- text: '导出',
- handler: function () {
- var grid = this.ownerCt.ownerCt;
- var cfg = {
- type: 'xlsx',
- title: 'BOM变更记录',
- fileName: 'BOM变更记录' + Ext.Date.format(new Date(), 'Y-m-d_H-i-s') + '.xlsx'
- };
- grid.setLoading(true);
- grid.saveDocumentAs(cfg);
- Ext.defer(function () {
- grid.setLoading(false);
- }, 2000);
- }
- }],
- columns: [{
- text: 'id',
- dataIndex: 'id',
- hidden: true,
- xtype: 'numbercolumn'
- }, {
- text: '操作人员',
- dataIndex: 'creatorName',
- align: 'center',
- width: 120
- }, {
- text: '操作时间',
- dataIndex: 'createTime',
- align: 'center',
- xtype: 'datecolumn',
- width: 150,
- renderer: function (v, m, r) {
- return Ext.Date.format(new Date(v), 'Y-m-d H:i:s');
- }
- }, {
- text: '操作类型',
- dataIndex: 'ed_type',
- align: 'center',
- width: 100
- }, {
- text: '行号',
- dataIndex: 'ed_bddetno',
- align: 'center',
- width: 60
- }, {
- text: '修改内容',
- dataIndex: 'ed_history',
- flex: 1,
- }],
- store: Ext.create('Ext.data.Store', {
- field: ['id', 'creatorName', 'ed_type', 'ed_bddetno', 'reched_soncodeeck'],
- autoLoad: true,
- data: [],
- })
- }]
- })
- me.setData(me.initId);
- me.callParent();
- },
- setData: function (initId) {
- var me = this;
- saas.util.BaseUtil.request({
- url: '/api/make/ecndetail/listByEd_boid',
- method: 'GET',
- params: {
- ed_boid: initId
- }
- })
- .then(function (localJson) {
- var data = localJson.data;
- var grid = me.down('[xtype="grid"]');
- grid.store.loadData(data);
- })
- .catch(function (e) {
- saas.util.BaseUtil.showErrorToast('查询失败: ' + e.message);
- });
- }
- });
|