--特殊权限配置
----销售报价单
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE WHERE FID = '22K54EX1HJVR')
INSERT INTO T_PERM_OPERATIONRULE(FID,FOPERATIONKEY,FRULE,FENABLED,FOPERATIONTYPE,FISPRESET,FBIZAPPID,FDESCRIPTION,FISPUBLIC,FENTITYTYPEID,FNAME) VALUES ('22K54EX1HJVR','view','{"filterRow":[{"id":"22K6AJBVNCEZ","leftBracket":"","compareType":"1296334365252389888","fieldName":"operatorgroup.number","rightBracket":"","logic":"0","value":[{"id":"22K6AJBVNBRP","value":""}],"baseDataIds":[]}],"forList":false}','1','view','1','/JJVQ13HQZAJ',' ','0','sm_quotationbill','销售报价单列表销售组过滤');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULEOBJ WHERE FID = '22K59+32LWXQ')
INSERT INTO T_PERM_OPERATIONRULEOBJ(FID,FOPERATIONRULEID,FBIZAPPID,FSEQ,FOBJENABLED,FENTITYTYPEID) VALUES ('22K59+32LWXQ','22K54EX1HJVR','/JJVQ13HQZAJ',0,'1','sm_quotationbill');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22K56ZCS6VTL')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22K54EX1HJVR','22K56ZCS6VTL','zh_TW',' ','銷售報價單列表銷售組過濾');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22K56ZCS6VTM')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22K54EX1HJVR','22K56ZCS6VTM','zh_CN',' ','销售报价单列表销售组过滤');

----销售订单
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE WHERE FID = '22K65NN4URRM')
INSERT INTO T_PERM_OPERATIONRULE(FID,FOPERATIONKEY,FRULE,FENABLED,FOPERATIONTYPE,FISPRESET,FBIZAPPID,FDESCRIPTION,FISPUBLIC,FENTITYTYPEID,FNAME) VALUES ('22K65NN4URRM','view','{"filterRow":[{"id":"22K67608WOV8","leftBracket":"","compareType":"1296334365252389888","fieldName":"operatorgroup.number","rightBracket":"","logic":"0","value":[{"id":"22K67608WPIH","value":""}],"baseDataIds":[]}],"forList":false}','1','view','1','/JJVQ13HQZAJ',' ','0','sm_salorder','销售订单列表销售组过滤');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULEOBJ WHERE FID = '22MJFW8Q8M55')
INSERT INTO T_PERM_OPERATIONRULEOBJ(FID,FOPERATIONRULEID,FBIZAPPID,FSEQ,FOBJENABLED,FENTITYTYPEID) VALUES ('22MJFW8Q8M55','22K65NN4URRM','/JJVQ13HQZAJ',0,'1','sm_salorder');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22K6761+X/DB')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22K65NN4URRM','22K6761+X/DB','zh_TW',' ','銷售訂單列表銷售組過濾');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22K6761+X/DC')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22K65NN4URRM','22K6761+X/DC','zh_CN',' ','销售订单列表销售组过滤');

----变更单
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE WHERE FID = '22MG0F34L=DE')
INSERT INTO T_PERM_OPERATIONRULE(FID,FOPERATIONKEY,FRULE,FENABLED,FOPERATIONTYPE,FISPRESET,FBIZAPPID,FDESCRIPTION,FISPUBLIC,FENTITYTYPEID,FNAME) VALUES ('22MG0F34L=DE','view','{"filterRow":[{"id":"22MG2KGVDB+J","leftBracket":"","compareType":"1296334365252389888","fieldName":"operatorgroup.number","rightBracket":"","logic":"0","value":[{"id":"22MG2KGVDBNT","value":""}],"baseDataIds":[]}],"forList":false}','1','view','1','/JJVQ13HQZAJ',' ','0','sm_xsalorder','变更单列表销售组过滤');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULEOBJ WHERE FID = '22MJNVEVNIHW')
INSERT INTO T_PERM_OPERATIONRULEOBJ(FID,FOPERATIONRULEID,FBIZAPPID,FSEQ,FOBJENABLED,FENTITYTYPEID) VALUES ('22MJNVEVNIHW','22MG0F34L=DE','/JJVQ13HQZAJ',0,'1','sm_xsalorder');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22MG2KHLDNIN')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22MG0F34L=DE','22MG2KHLDNIN','zh_TW',' ','變更單列表銷售組過濾');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22MG2KHLDNIO')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22MG0F34L=DE','22MG2KHLDNIO','zh_CN',' ','变更单列表销售组过滤');

----新变更单
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE WHERE FID = '22MG3AN0CLT3')
INSERT INTO T_PERM_OPERATIONRULE(FID,FOPERATIONKEY,FRULE,FENABLED,FOPERATIONTYPE,FISPRESET,FBIZAPPID,FDESCRIPTION,FISPUBLIC,FENTITYTYPEID,FNAME) VALUES ('22MG3AN0CLT3','view','{"filterRow":[{"id":"22MG50B6UII0","leftBracket":"","compareType":"1296334365252389888","fieldName":"operatorgroup.number","rightBracket":"","logic":"0","value":[{"id":"22MG50B6UJ6=","value":""}],"baseDataIds":[]}],"forList":false}','1','view','1','/JJVQ13HQZAJ',' ','0','sm_xssalorder','新变更单列表销售组过滤');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULEOBJ WHERE FID = '22MJO6R7NU8R')
INSERT INTO T_PERM_OPERATIONRULEOBJ(FID,FOPERATIONRULEID,FBIZAPPID,FSEQ,FOBJENABLED,FENTITYTYPEID) VALUES ('22MJO6R7NU8R','22MG3AN0CLT3','/JJVQ13HQZAJ',0,'1','sm_xssalorder');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22MG50BV7EVM')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22MG3AN0CLT3','22MG50BV7EVM','zh_TW',' ','新變更單列表銷售組過濾');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22MG50BV7EVN')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22MG3AN0CLT3','22MG50BV7EVN','zh_CN',' ','新变更单列表销售组过滤');

----发货通知单
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE WHERE FID = '2/F2CXLCSQML')
INSERT INTO T_PERM_OPERATIONRULE(FID,FOPERATIONKEY,FRULE,FENABLED,FOPERATIONTYPE,FISPRESET,FBIZAPPID,FDESCRIPTION,FISPUBLIC,FENTITYTYPEID,FNAME) VALUES ('2/F2CXLCSQML','view','{"filterRow":[{"id":"22MGB4R1MZYM","leftBracket":"","compareType":"1296334365252389888","fieldName":"operatorgroup.number","rightBracket":"","logic":"0","value":[{"id":"22MGB4R1MZ9C","value":""}],"baseDataIds":[]}],"forList":false}','1','view','1','/JJVQ13HQZAJ',' ','0','sm_delivernotice','发货通知单列表销售组过滤');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULEOBJ WHERE FID = '2/F4OX7W7SS3')
INSERT INTO T_PERM_OPERATIONRULEOBJ(FID,FOPERATIONRULEID,FBIZAPPID,FSEQ,FOBJENABLED,FENTITYTYPEID) VALUES ('2/F4OX7W7SS3','2/F2CXLCSQML','/JJVQ13HQZAJ',0,'1','sm_delivernotice');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '2/F4NYS107DE')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('2/F2CXLCSQML','2/F4NYS107DE','zh_TW',' ','發貨通知單列表銷售組過濾');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '2/F4NYS107DF')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('2/F2CXLCSQML','2/F4NYS107DF','zh_CN',' ','发货通知单列表销售组过滤');

----退货申请单
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE WHERE FID = '217NRUY773CP')
INSERT INTO T_PERM_OPERATIONRULE(FID,FOPERATIONKEY,FRULE,FENABLED,FOPERATIONTYPE,FISPRESET,FBIZAPPID,FDESCRIPTION,FISPUBLIC,FENTITYTYPEID,FNAME) VALUES ('217NRUY773CP','view','{"filterRow":[{"id":"22K6=+VTCLO5","leftBracket":"","compareType":"1296334365252389888","fieldName":"operatorgroup.number","rightBracket":"","logic":"0","value":[{"id":"22K6=+VTCL+X","value":""}],"baseDataIds":[]}],"forList":false}','1','view','1','/JJVQ13HQZAJ',' ','0','sm_returnapply','退货申请单列表销售组过滤');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULEOBJ WHERE FID = '229OBJLR1QWG')
INSERT INTO T_PERM_OPERATIONRULEOBJ(FID,FOPERATIONRULEID,FBIZAPPID,FSEQ,FOBJENABLED,FENTITYTYPEID) VALUES ('229OBJLR1QWG','217NRUY773CP','/JJVQ13HQZAJ',0,'1','sm_returnapply');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '217O50B1P6K0')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('217NRUY773CP','217O50B1P6K0','zh_TW',' ','退貨申請單列表銷售組過濾');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '217O50B1P6K1')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('217NRUY773CP','217O50B1P6K1','zh_CN',' ','退货申请单列表销售组过滤');

----委托代销清单
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE WHERE FID = '22MGCHF/5ML+')
INSERT INTO T_PERM_OPERATIONRULE(FID,FOPERATIONKEY,FRULE,FENABLED,FOPERATIONTYPE,FISPRESET,FBIZAPPID,FDESCRIPTION,FISPUBLIC,FENTITYTYPEID,FNAME) VALUES ('22MGCHF/5ML+','view','{"filterRow":[{"id":"22MGEIH8LB3W","leftBracket":"","compareType":"1296334365252389888","fieldName":"operatorgroup.number","rightBracket":"","logic":"0","value":[{"id":"22MGEIH8LBT4","value":""}],"baseDataIds":[]}],"forList":false}','1','view','1','/JJVQ13HQZAJ',' ','0','sm_salesagency','委托代销清单列表销售组过滤');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULEOBJ WHERE FID = '22MJOJ3F6DHC')
INSERT INTO T_PERM_OPERATIONRULEOBJ(FID,FOPERATIONRULEID,FBIZAPPID,FSEQ,FOBJENABLED,FENTITYTYPEID) VALUES ('22MJOJ3F6DHC','22MGCHF/5ML+','/JJVQ13HQZAJ',0,'1','sm_salesagency');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22MGEII+LNO+')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22MGCHF/5ML+','22MGEII+LNO+','zh_TW',' ','委托代銷清單列表銷售組過濾');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22MGEII+LNO/')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22MGCHF/5ML+','22MGEII+LNO/','zh_CN',' ','委托代销清单列表销售组过滤');

----委托代销应用下委托代销清单
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE WHERE FID = '22WY+2Z/JETP')
INSERT INTO T_PERM_OPERATIONRULE(FID,FOPERATIONKEY,FRULE,FENABLED,FOPERATIONTYPE,FISPRESET,FBIZAPPID,FDESCRIPTION,FISPUBLIC,FENTITYTYPEID,FNAME) VALUES ('22WY+2Z/JETP','view','{"filterRow":[{"id":"22WY/SUV0ELT","leftBracket":"","compareType":"1296334365252389888","fieldName":"operatorgroup.number","rightBracket":"","logic":"0","value":[{"id":"22WY/SUYNVGK","value":""}],"baseDataIds":[]}],"forList":false}','1','view','1','1CED=QIY8ZSK',' ','0','sm_salesagency','委托代销清单销售组过滤');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULEOBJ WHERE FID = '22WY03ZDFV5L')
INSERT INTO T_PERM_OPERATIONRULEOBJ(FID,FOPERATIONRULEID,FBIZAPPID,FSEQ,FOBJENABLED,FENTITYTYPEID) VALUES ('22WY03ZDFV5L','22WY+2Z/JETP','1CED=QIY8ZSK',0,'1','sm_salesagency');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22WY/X9W2335')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22WY+2Z/JETP','22WY/X9W2335','zh_TW',' ','委托代銷清單銷售組過濾');
IF NOT EXISTS (SELECT 1 FROM T_PERM_OPERATIONRULE_L WHERE FPKID = '22WY/X9W2336')
INSERT INTO T_PERM_OPERATIONRULE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('22WY+2Z/JETP','22WY/X9W2336','zh_CN',' ','委托代销清单销售组过滤');
