
--插入[选择采购订单明细]界面格式
if(select count(1) from System_ModuleFormat where module='Dialog_PurchaseOrders_Details' and field='pos_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'pos_id' as field,
	'订单子表ID' as field_name,'订单子表ID' as title,
	60 as width,1 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'po_id' as field,
	'订单主表ID' as field_name,'订单主表ID' as title,
	60 as width,2 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'order_number' as field,
	'订单号' as field_name,'订单号' as title,
	100 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'new_date' as field,
	'订单日期' as field_name,'订单日期' as title,
	75 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	80 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	100 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	80 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	100 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	50 as width,161 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	50 as width,162 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	100 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	100 as width,180 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'acc_in_quantity' as field,
	'累入数量' as field_name,'累入数量' as title,
	60 as width,211 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'wait_in_quantity' as field,
	'待入数量' as field_name,'待入数量' as title,
	60 as width,211 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'arrive_date' as field,
	'预到货日期' as field_name,'预到货日期' as title,
	75 as width,350 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_remark' as field,
	'产品备注' as field_name,'产品备注' as title,
	80 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'pt_name' as field,
	'采购类型' as field_name,'采购类型' as title,
	80 as width,370 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'dep_name' as field,
	'采购部门' as field_name,'采购部门' as title,
	80 as width,380 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	80 as width,410 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	80 as width,420 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	80 as width,430 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_sdefine1' as field,
	'子表字符自定义项1' as field_name,'子表字符自定义项1' as title,
	80 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_sdefine2' as field,
	'子表字符自定义项2' as field_name,'子表字符自定义项2' as title,
	80 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_sdefine3' as field,
	'子表字符自定义项3' as field_name,'子表字符自定义项3' as title,
	80 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_sdefine4' as field,
	'子表字符自定义项4' as field_name,'子表字符自定义项4' as title,
	80 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_sdefine5' as field,
	'子表字符自定义项5' as field_name,'子表字符自定义项5' as title,
	80 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_ndefine1' as field,
	'子表数值自定义项1' as field_name,'子表数值自定义项1' as title,
	80 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_ndefine2' as field,
	'子表数值自定义项2' as field_name,'子表数值自定义项2' as title,
	80 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_ndefine3' as field,
	'子表数值自定义项3' as field_name,'子表数值自定义项3' as title,
	80 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_ndefine4' as field,
	'子表数值自定义项4' as field_name,'子表数值自定义项4' as title,
	80 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseOrders_Details' as module,'d_ndefine5' as field,
	'子表数值自定义项5' as field_name,'子表数值自定义项5' as title,
	80 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO


--delete System_ModuleFormat where module='Dialog_PurchaseIns_Select'
--插入[选择采购入库单弹窗选择]界面格式
if(select count(1) from System_ModuleFormat where module='Dialog_PurchaseIns_Select' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'ios_id' as field,
	'入库单子表ID' as field_name,'入库单子表ID' as title,
	60 as width,1 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'io_id' as field,
	'入库单主表ID' as field_name,'入库单主表ID' as title,
	60 as width,2 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'io_order_number' as field,
	'采购入库单号' as field_name,'采购入库单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'new_date' as field,
	'入库日期' as field_name,'入库日期' as title,
	75 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	100 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	80 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'quantity' as field,
	'入库数量' as field_name,'入库数量' as title,
	60 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'dz_quantity' as field,
	'已对账数量' as field_name,'已对账数量' as title,
	60 as width,211 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Dialog_PurchaseIns_Select' as module,'wait_dz_quantity' as field,
	'待对账数量' as field_name,'待对账数量' as title,
	60 as width,211 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'num' as field,
	'入库件数' as field_name,'入库件数' as title,
	60 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'po_order_number' as field,
	'采购订单号' as field_name,'采购订单号' as title,
	100 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	80 as width,260 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	100 as width,270 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	50 as width,280 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	50 as width,290 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	100 as width,300 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	100 as width,310 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_remark' as field,
	'产品备注' as field_name,'产品备注' as title,
	80 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'pt_name' as field,
	'采购类型' as field_name,'采购类型' as title,
	80 as width,370 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'dep_name' as field,
	'采购部门' as field_name,'采购部门' as title,
	80 as width,380 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	80 as width,400 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	80 as width,410 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	80 as width,420 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	80 as width,430 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_sdefine1' as field,
	'子表字符自定义项1' as field_name,'子表字符自定义项1' as title,
	80 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_sdefine2' as field,
	'子表字符自定义项2' as field_name,'子表字符自定义项2' as title,
	80 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_sdefine3' as field,
	'子表字符自定义项3' as field_name,'子表字符自定义项3' as title,
	80 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_sdefine4' as field,
	'子表字符自定义项4' as field_name,'子表字符自定义项4' as title,
	80 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_sdefine5' as field,
	'子表字符自定义项5' as field_name,'子表字符自定义项5' as title,
	80 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_ndefine1' as field,
	'子表数值自定义项1' as field_name,'子表数值自定义项1' as title,
	80 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_ndefine2' as field,
	'子表数值自定义项2' as field_name,'子表数值自定义项2' as title,
	80 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_ndefine3' as field,
	'子表数值自定义项3' as field_name,'子表数值自定义项3' as title,
	80 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_ndefine4' as field,
	'子表数值自定义项4' as field_name,'子表数值自定义项4' as title,
	80 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'d_ndefine5' as field,
	'子表数值自定义项5' as field_name,'子表数值自定义项5' as title,
	80 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'sdefine1' as field,
	'主表字符自定义项1' as field_name,'主表字符自定义项1' as title,
	80 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'sdefine2' as field,
	'主表字符自定义项2' as field_name,'主表字符自定义项2' as title,
	80 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'sdefine3' as field,
	'主表字符自定义项3' as field_name,'主表字符自定义项3' as title,
	80 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'sdefine4' as field,
	'主表字符自定义项4' as field_name,'主表字符自定义项4' as title,
	80 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'sdefine5' as field,
	'主表字符自定义项5' as field_name,'主表字符自定义项5' as title,
	80 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'ndefine1' as field,
	'主表数值自定义项1' as field_name,'主表数值自定义项1' as title,
	80 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'ndefine2' as field,
	'主表数值自定义项2' as field_name,'主表数值自定义项2' as title,
	80 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'ndefine3' as field,
	'主表数值自定义项3' as field_name,'主表数值自定义项3' as title,
	80 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'ndefine4' as field,
	'主表数值自定义项4' as field_name,'主表数值自定义项4' as title,
	80 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Dialog_PurchaseIns_Select' as module,'ndefine5' as field,
	'主表数值自定义项5' as field_name,'主表数值自定义项5' as title,
	80 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
end
/**/GO
