Greasy Fork

2.20-模板排版

模板排版

当前为 2024-07-31 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/502255/1419810/220-%E6%A8%A1%E6%9D%BF%E6%8E%92%E7%89%88.js

function 模板排版(src){
	console.log('新的模板排版界面')
	var local_同客户名样品个数样品名提示=localStorage.getItem('同客户名样品个数样品名提示');
	var 原html=html
	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个数据
			原html.find('#pager_center').eq(0).find("option[value='10']").eq(0).val('150')
			if(local_同客户名样品个数样品名提示=='true'){
				模板确定按钮	=原html.find('#w').find('#AB').eq(0)
				//点击模板确定按钮 会弹出 设置模板板号 弹框
				模板确定按钮.click(function(){
					同客户名样品个数样品名进行提示(html)
				})
			}
		}
	}
	
	//同客户名样品个数样品名进行提示
	function 同客户名样品个数样品名进行提示(html){
		console.log(11)
	}
}