shootMeter.TryInfo.Batch.js 1.21 KB
webpackJsonp([159],[
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	'use strict';
	var $ = __webpack_require__(1);
	var common = __webpack_require__(2);

	function batchExport(el, type) {
	    var loadModal = null;
	    return {
	        params: {
	            type: type,
	            __type: "batch-import"
	        },
	        onStart: function (params) {
	            console.log("params", params);
	            loadModal = common.dialog.load();
	        },
	        onComplete: function (response) {
	            console.log("response", response);
	            if (loadModal) {
	                loadModal.close();
	            }
	            if (response.code == 200 && response.data.failFileReason.length == 0) {
	                common.util.__tip(response.message, 'success');
	                return;
	            }
	            if (response.data && response.data.failFileReason.length) {
	                $("#message").html(response.data.failFileReason.join('/n'));
	                return false;
	            }
	            common.util.__tip(response.message, 'warning');

	        }
	    }
	}

	common.edit.ajaxfileupload('#productModelTry', batchExport('#productModelTry', 'productModelTry'));




/***/ }
]);