All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.modules.sys.dictionary.ctrl.zidian.item.remove.js Maven / Gradle / Ivy

There is a newer version: 5.0.2101
Show newest version
define(function(require) {
	var Page = require('core/page');
	
	// 删除字典明细
	var DictionaryItemRemove = Page.extend(function() {
		var vm = this;

		// @override
		this.submit = function(table, row) {
			// 列表
			if (this.parent.type == 'L') {
				this.removeListItem(table, row);
			}
			else {
				this.removeTreeItem(table);
			}

			
		};

		// 删除列表明细
		this.removeListItem = function (table, row) {
			var index = table.datagrid('getRowIndex', row);
			table.datagrid('deleteRow', index);
		}

		// 删除树明细
		this.removeTreeItem = function (table) {
			var row = table.treegrid('getSelected');

			if (row) {
				table.treegrid('remove', row._id);
			}
			
		}
	});
	
	return DictionaryItemRemove;
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy