Greasy Fork

2.20-模板排版

模板排版

目前为 2024-07-31 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.cloud/scripts/502255/1419815/220-%E6%A8%A1%E6%9D%BF%E6%8E%92%E7%89%88.js

function 模板排版(src){
	console.log('新的模板排版界面')
	var local_同客户名样品个数样品名提示=localStorage.getItem('同客户名样品个数样品名提示');
	var html=$('iframe[src="'+src+'"]')//页面
	html=html.contents().find('body').eq(0)
	var toolbar=html.find('.toolbar').eq(0)  // 找到了toolbar工具栏
	var table=html.find('.ui-jqgrid-btable').eq(0)  // 找到了样品的table
	
	//添加toolbar工具栏按钮
	添加toolbar按钮(html)
	//添加toolbar工具栏按钮
	function 添加toolbar按钮(html){
		if (toolbar.find('.weiyiyici').length==0){
			//添加标记
			toolbar.addClass('weiyiyici')
			//改成每页100个数据
			$('#pager_center').eq(0).find("option[value='10']").eq(0).val('150')
			if(local_同客户名样品个数样品名提示=='true'){
				//点击添加板号
				添加板号=toolbar.find('#a_seq_plate').eq(0)
				添加板号.click(function(){
					模板确定按钮	=$('#w').find('#AB').eq(0)
					console.log(模板确定按钮)
					//点击模板确定按钮 会弹出 设置模板板号 弹框
					模板确定按钮.click(function(){
						同客户名样品个数样品名进行提示(html)
					})
				})
			}
		}
	}
	
	//同客户名样品个数样品名进行提示
	function 同客户名样品个数样品名进行提示(html){
		console.log(11)
	}
}