Anthony

crm账套 模块化

......@@ -86,8 +86,8 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
});
//行转换
function getSelectedRow(){
var row = this.grid.datagrid('getSelected');
function getSelectedRow(inst){
var row = inst.grid.datagrid('getSelected');
return row?{
actId:row.ACT_ID,
actCode:row.ACT_CODE,
......@@ -109,39 +109,39 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
function addWindow(inst){
//添加账套详情页面
index.showPanel({text:resource.title.detail,url:"./accountSetDetail/accountSetDetailAdd"}, true, function(){
this.grid.datagrid("reload");
inst.grid.datagrid("reload");
});
}
//编辑页面弹出绑定按钮
function editWindow(inst){
var row = getSelectedRow.call(this);
var row = getSelectedRow.call(this,inst);
if(row == null){
$.messager.alert(resource.msg_title, resource.msgEditTip);
}else{
index.showPanel({text:resource.title.detail,url:"./accountSetDetail/accountSetDetailEdit?actId="+row.actId+"&actCode="+row.actCode}, true, function(){
this.grid.datagrid("reload");
inst.grid.datagrid("reload");
});
}
}
//删除
function deleteData(inst){
var accountSet = getSelectedRow.call(this);
var accountSet = getSelectedRow.call(this,inst);
if(accountSet == null){
$.messager.alert(resource.msg_title, resource.msgRemoveTip);
}else{
if(accountSet.actType==resource.accountset.title.sonAccount){
if(accountSet.actType==resource.title.sonAccount){
$.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){
if(r){
accountSet.enable = "";
$.JSON("./accountSet/delete.json", accountSet, function(result){
if(responseUtils(result)){
this.grid.datagrid("reload");
if($.response(result)){
inst.grid.datagrid("reload");
}
});
}
});
}else{
$.messager.alert(resource.msg_title, resource.accountset.title.overActCntdelt);
$.messager.alert(resource.msg_title, resource.title.overActCntdelt);
}
}
}
......
define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, index){
return Class({
resource: resource,
variable: function () { //全局变量
var panel = index.getSelectedPanel();
this.page = panel.children('.crm-accountset-detail').layout({fit: true});
this.north = this.page.layout("panel", "north");
this.center = this.page.layout("panel", "center");
this.grid = $('<div></div>').appendTo(this.center);
this.queryId = 'f1fd6213-c928-4e72-87f2-f8bfe8589b19';
this.tabs=this.center.children("div").tabs({closable : false, fit:true});
this.netDetail = this.page.find(".netDetail");
define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index','lodash'], function (resource, Class, base, indexlayout,_){
},
initialize: function () {//界面布局
initNetDataGrid(this);
},
handler: function(actId, actCode,usId){ //事件绑定
return {
init : function(actId, actCode,usId){
var brandCount = 0; //品牌searchbox渲染次数,第一次渲染的时候,需要刷新
var panel=indexlayout.getSelectedPanel();
var query="f1fd6213-c928-4e72-87f2-f8bfe8589b19";
var layout=panel.children('.crm-accountset-detail').layout({ fit:true });
//声明整个登录账户选项卡容器
var page=panel.children('.crm-accountset-detail');
var north=page.layout("panel","north");
var center=page.layout("panel","center");
var wxgzh = "";
var index = 0;
var div = "<div class='easyui-tabs l-btn-left l-btn-icon-left'></div>";
......@@ -29,41 +21,41 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
//toolPosition:'left',
tools:[{
iconCls:'icon-add',
text: resource.btn.add,
text: base.resource.btn.add,
handler:addNetTab
},{
iconCls:'icon-re',
text: resource.btn.remove,
text: base.resource.btn.remove,
handler:removeNetTab
}]
})
tabs.tabs('update', {
tab: tabs.tabs("getTab",0),
options: {
title: resource.accountset.grid.sites,
title: resource.grid.sites,
content:netDataGrid
}
});
var accsetDetail=north.find(".accountSet");
var accsetDetailform = accsetDetail.find(".accountSetForm");
var netDetail = page.find(".netDetail");
//经营主体和短信通道联动
var netDataGrid = initNetDataGrid();
accsetDetailform.find(".platFormDialog").searchbox({
searcher:searchPlat,
prompt:resource.accountset.select,
prompt:resource.select,
onChange:platFormChange
});
if(0 != actId){
$.post('./accountSetDetail/queryById.json',{"actId":actId},function(result){
if(responseUtils(result)){
if($.response(result)){
accsetDetailform.form("load", result.value);
actCode = result.value.actCode;
if(result.value.actCode=="C001"){
accsetDetailform.find('.accSetType').val(resource.accountset.title.faAct);
accsetDetailform.find('.accSetType').val(resource.title.faAct);
}else{
accsetDetailform.find('.accSetType').val(resource.accountset.title.soAct);
accsetDetailform.find('.accSetType').val(resource.title.soAct);
}
initMsgChannelCombobox();
}
......@@ -81,7 +73,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
}else{
accsetDetailform.find(".actCode").attr("readonly",true);
$.post('./accountSet/querySiteGroup.json',{"actId":actId},function(result){
if(responseUtils(result)){
if($.response(result)){
var siteGroup = result.list;
if(siteGroup.length == 0){
var tab ="";
......@@ -103,9 +95,9 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
}
tab.find(".content").find(".netForm").find(".wxghzName").searchbox({
searcher:searchWxgzh,
prompt:resource.accountset.select
prompt:resource.select
});
readonlyUtils(tab.find(".content").find(".netForm").find(".wxghzName"),function(){
base.readonly(tab.find(".content").find(".netForm").find(".wxghzName"),function(){
tab.find(".content").find(".netForm").find(".wxghz").val("");
tab.find(".content").find(".netForm").find(".gzhType").val("");
});
......@@ -120,26 +112,26 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
}else{
accsetDetailform.find(".actCode").val(actCode);
accsetDetailform.find(".accSetType").val(resource.accountset.title.soAct);
readonlyUtils(netDetail.find(".netForm").find(".wxghzName"),function(){
accsetDetailform.find(".accSetType").val(resource.title.soAct);
base.readonly(netDetail.find(".netForm").find(".wxghzName"),function(){
netDetail.find(".netForm").find(".wxghz").val("");
netDetail.find(".netForm").find(".gzhType").val("");
});
netDetail.find(".netForm").find(".wxghzName").searchbox({
searcher:searchWxgzh,
prompt:resource.accountset.select
prompt:resource.select
});
// initMsgChannelCombobox();
}
function searchWxgzh(){
showCondObject({id:'2582a029-3902-4934-a206-d638f96d4b08',showGrid:true,refresh:true},function(row){
base.showCondObject({id:'2582a029-3902-4934-a206-d638f96d4b08',showGrid:true,refresh:true},function(row){
var tabAll = tabs.tabs("tabs");
for (var i = 0; i < tabAll.length; i++) {
var tab = tabs.tabs("getTab",i);
if(row.GZH_ID == tab.find(".content").find(".netForm").find(".wxghz").val()){
if(row.NICK_NAME == tab.find(".content").find(".netForm").find(".wxghzName").val()) {
return $.messager.alert(resource.msg_title, row.NICK_NAME + resource.accountset.title.plBeSelected);
return $.messager.alert(resource.msg_title, row.NICK_NAME + resource.title.plBeSelected);
}
}
}
......@@ -156,7 +148,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
function addtab(grpId){
index++;
tabs.tabs('add',{
title: resource.accountset.grid.sites+index,
title: resource.grid.sites+index,
closable: false
});
var tabPanel =tabs.tabs('getSelected');
......@@ -167,26 +159,26 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
singleSelect : false,
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
content:addbtml(),
title:resource.accountset.title.suitSite,
authz:getAuthzUtils('accountSet'),
title:resource.title.suitSite,
authz:base.getAuthz('accountSet'),
buttons:[{
code:'edit',
text: resource.btn.add,
text: base.resource.btn.add,
iconCls:'btn-add',
handler: addNet
},{
code:'edit',
text: resource.btn.remove,
text: base.resource.btn.remove,
iconCls:'btn-remove',
handler:removeNet
}]
}),
columns:[[
{field:'ck',checkbox:true },
{field:'SICODE',title:resource.accountset.grid.sicode, width:100, align:"center"},
{field:'SINAME',title:resource.accountset.grid.siname, width:100, align:"center"},
{field:'BENAME',title:resource.accountset.grid.bename, width:100, align:"center"},
{field:'BEBNAME',title:resource.accountset.grid.bebname, width:100, align:"center"}
{field:'SICODE',title:resource.grid.sicode, width:100, align:"center"},
{field:'SINAME',title:resource.grid.siname, width:100, align:"center"},
{field:'BENAME',title:resource.grid.bename, width:100, align:"center"},
{field:'BEBNAME',title:resource.grid.bebname, width:100, align:"center"}
]]
});
addTable.datagrid({url:"./query/f1fd6213-c928-4e72-87f2-f8bfe8589b19.json?8d7bca20-08d8-48e3-94eb-a913e61f55ee="+grpId});
......@@ -194,14 +186,16 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
accsetDetail.rs_toolbar({
content:accsetDetailform,
buttons:[{
text:resource.btn.save,
text:base.resource.btn.save,
iconCls:'btn-add',
handler:saveAccsetDetail
}],
tools:[{
text:resource.btn.refresh,
text:base.resource.btn.refresh,
iconCls:'btn-refresh',
handler:panelRefreshUtils
handler:function() {
indexlayout.getSelectedPanel().panel("refresh");
}
}
]
});
......@@ -213,7 +207,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
}
function searchPlat(){
showCondObject({id:'0089f254-a93b-4f98-b8f7-0312ce06de45',showGrid:true,refresh:true},function(row){
base.showCondObject({id:'0089f254-a93b-4f98-b8f7-0312ce06de45',showGrid:true,refresh:true},function(row){
accsetDetailform.find(".platFormDialog").searchbox('setValue',row.PLNAME);
accsetDetailform.find(".ptfId").val(row.PLID);
if(platformChangeFlag){
......@@ -223,13 +217,13 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
});
}
readonlyUtils(accsetDetailform.find(".platFormDialog"),function(){
base.readonly(accsetDetailform.find(".platFormDialog"),function(){
accsetDetailform.find(".ptfId").val("");
});
accsetDetailform.find(".applyBrandDialog").searchbox({
searcher:searchBrand,
prompt:resource.accountset.noLimit
prompt:resource.noLimit
});
function initMsgChannelCombobox(){
......@@ -239,7 +233,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
type:1
};
$.post('./msgChannel/selectAll/beIdOrPlId.json',param,function(result){
if(responseUtils(result)){
if($.response(result)){
accsetDetailform.find(".msgChannel").combobox("loadData", result.list);
var data =accsetDetailform.find(".msgChannel").combobox('getData');
// accsetDetailform.find(".msgChannel").combobox('select',data[0].id);
......@@ -253,7 +247,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
type:1
};
$.post('./msgChannel/selectAll/beIdOrPlId.json',param,function(result){
if(responseUtils(result)){
if($.response(result)){
accsetDetailform.find(".msgChannel").combobox("loadData", result.list);
var data =accsetDetailform.find(".msgChannel").combobox('getData');
accsetDetailform.find(".msgChannel").combobox('clear');
......@@ -267,7 +261,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
if(brandCount == 1){
var refreshFlag = true;
}
showCondObject({id:"22726b54-5748-4926-82ed-abe076caecfa", showGrid:true, singleSelect:false,condHidden:['b350631c-dc97-4be5-93e5-0d771365a4c7'],refresh:refreshFlag,onBeforeLoad:function(params){
base.showCondObject({id:"22726b54-5748-4926-82ed-abe076caecfa", showGrid:true, singleSelect:false,condHidden:['b350631c-dc97-4be5-93e5-0d771365a4c7'],refresh:refreshFlag,onBeforeLoad:function(params){
return params["b350631c-dc97-4be5-93e5-0d771365a4c7"]= 1;
}}, function(rows){
var brandIdArray = "";
......@@ -287,34 +281,34 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
});
}
readonlyUtils(accsetDetailform.find(".applyBrandDialog"),function(){
base.readonly(accsetDetailform.find(".applyBrandDialog"),function(){
accsetDetailform.find(".brId").val("");
});
function prepareAccount(){
if("" == accsetDetailform.find("input[name='msgChannel']").val() || null == accsetDetailform.find("input[name='msgChannel']").val()){
$.messager.alert(resource.msg_title, resource.accountset.validateMsgChannel,'warning', function(){accsetDetailform.form("validate");});
$.messager.alert(resource.msg_title, resource.validateMsgChannel,'warning', function(){accsetDetailform.form("validate");});
return;
}
if(!accsetDetailform.form("validate")){
return;
}
if("" == accsetDetailform.find("input[name='actCode']").val() || null == accsetDetailform.find("input[name='actCode']").val()){
$.messager.alert(resource.msg_title, resource.accountset.validateCode);
$.messager.alert(resource.msg_title, resource.validateCode);
return;
}
if("" == accsetDetailform.find("input[name='actName']").val() || null == accsetDetailform.find("input[name='actName']").val()){
$.messager.alert(resource.msg_title, resource.accountset.validateName);
$.messager.alert(resource.msg_title, resource.validateName);
return;
}
if("" == accsetDetailform.find("input[name='ptfId']").val() || null == accsetDetailform.find("input[name='ptfId']").val()){
$.messager.alert(resource.msg_title, resource.accountset.validatePlatForm);
$.messager.alert(resource.msg_title, resource.validatePlatForm);
return;
}
if('C001' != accsetDetailform.find("input[name='actCode']").val()){
if("" == accsetDetailform.find("input[name='msgChannel']").val() || null == accsetDetailform.find("input[name='msgChannel']").val()){
$.messager.alert(resource.msg_title, resource.accountset.validateMsgChannel);
$.messager.alert(resource.msg_title, resource.validateMsgChannel);
return;
}
var param={
......@@ -372,11 +366,11 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
if(param == null){
return;
}
$.messager.confirm(resource.msg_title,resource.users.saveTitle, function(r){
$.messager.confirm(resource.msg_title,resource.saveTitle, function(r){
if (r){
$.JSON('./accountSet/add.json', param, function(result){
if(responseUtils(result)){
closeSelectedPanel();
if($.response(result)){
indexlayout.closeSelectedPanel();
}
});
}
......@@ -388,14 +382,14 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
if(param == null){
return;
}
$.messager.confirm(resource.msg_title,resource.users.saveTitle, function(r){
$.messager.confirm(resource.msg_title,resource.saveTitle, function(r){
if (r){
$.JSON('./accountSet/add.json', param, function(result){
if(responseUtils(result)){
if($.response(result)){
var actId = result.value.actId;
var actCode = result.value.actCode;
base.showPanel({text:resource.accountset.title.detail,url:"./accountSetDetail/accountSetDetailEdit?actId="+result.value.actId+"&actCode="+result.value.actCode}, true, function(){
panelRefreshUtils();
indexlayout.showPanel({text:resource.title.detail,url:"./accountSetDetail/accountSetDetailEdit?actId="+result.value.actId+"&actCode="+result.value.actCode}, true, function(){
indexlayout.getSelectedPanel().panel("refresh");
});
}
});
......@@ -405,11 +399,11 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
//网点新建datagrid
function addNet(){
showCondObject({id:"37236df9-2c96-11e6-abf4-3c970e1c88a0", showGrid:true,refresh:true, singleSelect:false,
base.showCondObject({id:"37236df9-2c96-11e6-abf4-3c970e1c88a0", showGrid:true,refresh:true, singleSelect:false,
onBeforeLoad:function(params){
var params;
var brandId = accsetDetailform.find(".brId").val();
if(!isNull(brandId)){
if(!_.isString(brandId)){
params["b8f7769a-2c97-11e6-abf4-3c970e1c88a0"]=","+brandId+",";
}
params["b8f709ba-2c97-11e6-abf4-3c970e1c88a0"]= 1;
......@@ -453,7 +447,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
actDesc : accsetDetailform.find("input[name='actDesc']").val(),
};
$.messager.confirm(resource.msg_title, resource.users.onAddCannot, function(r) {
$.messager.confirm(resource.msg_title, resource.onAddCannot, function(r) {
if (r) {
var siteGroup = [];
var site="";
......@@ -479,7 +473,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
param["siteGroupList"] = siteGroup;
$.JSON('./accountSet/addSiteOnGroup.json', param, function(result) {
if (responseUtils(result)) {
if ($.response(result)) {
var groupId = tab.find("input[name='grpId']").val();
if(tab.find("input[name='grpId']").val()=="0"){
tab.find("input[name='grpId']").val(result.value.siteGroupList[0].grpId);
......@@ -519,7 +513,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
actDesc : accsetDetailform.find("input[name='actDesc']").val(),
};
$.messager.confirm(resource.msg_title, resource.users.onDeleteCannot, function(r) {
$.messager.confirm(resource.msg_title, resource.onDeleteCannot, function(r) {
if (r) {
var rows = datagrid.datagrid('getSelections'); // 获取选中的行数据
// 页面上删除选中的行
......@@ -550,7 +544,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
param["siteGroupList"] = siteGroup;
$.JSON('./accountSet/deleteSiteOnGroup.json', param, function(result) {
if (responseUtils(result)) {
if ($.response(result)) {
// closeSelectedPanel();
var rows = datagrid.datagrid("getData").rows;
if(rows.length==0){
......@@ -576,7 +570,7 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
actDesc : accsetDetailform.find("input[name='actDesc']").val(),
};
$.messager.confirm(resource.msg_title, resource.users.onDeleteGroupCannot, function(r) {
$.messager.confirm(resource.msg_title, resource.onDeleteGroupCannot, function(r) {
if (r) {
var siteGroup = [];
var tab =tabs.tabs('getSelected');
......@@ -589,10 +583,10 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
param["siteGroupList"] = siteGroup;
$.JSON('./accountSet/deleteGroup.json', param, function(result) {
if (responseUtils(result)) {
if ($.response(result)) {
var index = tabs.tabs('getTabIndex', tab);
tabs.tabs('close', index);
panelRefreshUtils();
indexlayout.getSelectedPanel().panel("refresh");
}
});
}
......@@ -619,12 +613,52 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
// return cc;
// }
// 初始化网点组datagrid
function initNetDataGrid(){
return tabs.find(".netwooks").datagrid({
singleSelect : false,
// onLoadSuccess : aaatest,
// onBeforeLoad : bbbtest,
// loadFilter: ccctest,
//url:"./query/e0e0f773-34a1-450c-8868-60433a245eb8.json",
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
content:netDetail,
title:resource.title.suitSite,
authz:base.getAuthz('accountSet'),
buttons:[
{
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function(){
base.showCondObject(query,datagridReload);
}
},
{
code:'edit',
text: base.resource.btn.add,
iconCls:'btn-add',
handler: addNet
},{
code:'edit',
text: base.resource.btn.remove,
iconCls:'btn-remove',
handler:removeNet
}]
}),
columns:[[
{field:'ck',checkbox:true },
{field:'SICODE',title:resource.grid.sicode, width:100, align:"center"},
{field:'SINAME',title:resource.grid.siname, width:100, align:"center"},
{field:'BENAME',title:resource.grid.bename, width:100, align:"center"},
{field:'BEBNAME',title:resource.grid.bebname, width:100, align:"center"}
]]
});
}
//新增一个tab
function addNetTab(){
if(actId == 0){
$.messager.confirm(resource.msg_title, resource.users.mustSubmitAccountBeforeSecondGroup, function(r) {
$.messager.confirm(resource.msg_title, resource.mustSubmitAccountBeforeSecondGroup, function(r) {
if (r) {
saveTabBeforeSecondGroup();
}
......@@ -633,12 +667,12 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
}
var data = tabs.tabs('getSelected').find(".datagrid-f").datagrid("getData");
if(data.rows.length==0){
return $.messager.alert(resource.msg_title,resource.accountset.title.editCurtSite);
return $.messager.alert(resource.msg_title,resource.title.editCurtSite);
}
// var tab = tabs.tabs("getTab",0).find(".datagrid").clone(); //好像没用,先删除
index++;
tabs.tabs('add',{
title: resource.accountset.grid.sites+index,
title: resource.grid.sites+index,
closable: false
});
var currentTabPanel =tabs.tabs('getSelected');
......@@ -649,35 +683,35 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
singleSelect : false,
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
content:addbtml(),
title:resource.accountset.title.suitSite,
authz:getAuthzUtils('accountSet'),
title:resource.title.suitSite,
authz:base.getAuthz('accountSet'),
buttons:[{
code:'edit',
text: resource.btn.add,
text: base.resource.btn.add,
iconCls:'btn-add',
handler: addNet
},{
code:'edit',
text: resource.btn.remove,
text: base.resource.btn.remove,
iconCls:'btn-remove',
handler:removeNet
}]
}),
columns:[[
{field:'ck',checkbox:true },
{field:'SICODE',title:resource.accountset.grid.sicode, width:100, align:"center"},
{field:'SINAME',title:resource.accountset.grid.siname, width:100, align:"center"},
{field:'BENAME',title:resource.accountset.grid.bename, width:100, align:"center"},
{field:'BEBNAME',title:resource.accountset.grid.bebname, width:100, align:"center"}
{field:'SICODE',title:resource.grid.sicode, width:100, align:"center"},
{field:'SINAME',title:resource.grid.siname, width:100, align:"center"},
{field:'BENAME',title:resource.grid.bename, width:100, align:"center"},
{field:'BEBNAME',title:resource.grid.bebname, width:100, align:"center"}
]]
});
readonlyUtils(currentTabPanel.find(".content").find(".netForm").find(".wxghzName"),function(){
base.readonly(currentTabPanel.find(".content").find(".netForm").find(".wxghzName"),function(){
currentTabPanel.find(".content").find(".netForm").find(".wxghz").val("");
currentTabPanel.find(".content").find(".netForm").find(".gzhType").val("");
});
currentTabPanel.find(".content").find(".netForm").find(".wxghzName").searchbox({
searcher:searchWxgzh,
prompt:resource.accountset.select
prompt:resource.select
});
}
......@@ -697,15 +731,15 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
return "";
}
if(gzhType==0){
return resource.accountset.title.longmuseum;
return resource.title.longmuseum;
}else if(gzhType==1){
return resource.accountset.title.historymuseum;
return resource.title.historymuseum;
}else if(gzhType==2){
return resource.accountset.title.serviceNum;
return resource.title.serviceNum;
}else if(gzhType==3){
return resource.accountset.title.serviceNum;
return resource.title.serviceNum;
}else{
return resource.accountset.title.unknown;
return resource.title.unknown;
}
}
......@@ -716,56 +750,14 @@ define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], fun
return html;
}
function tabClose(){
alert("todo zhangweijiang");
}
function datagridReload(params){
if(params){
this.tabs.find(".netwooks").datagrid("reload",params);
}else{
this.tabs.find(".netwooks").datagrid("reload",base.getCondObjectValue(this.queryId));
}
var param =base.getCondObjectValue(query);
tabs.find(".netwooks").datagrid("reload",param);
}
}
})
function initNetDataGrid(inst){
return inst.tabs.find(".netwooks").datagrid({
singleSelect : false,
// onLoadSuccess : aaatest,
// onBeforeLoad : bbbtest,
// loadFilter: ccctest,
//url:"./query/e0e0f773-34a1-450c-8868-60433a245eb8.json",
toolbar:$('<div class="clearfix"></div>').rs_toolbar({
content:inst.netDetail,
title:resource.title.suitSite,
authz:base.getAuthz('accountSet'),
buttons:[
{
text:base.resource.btn.select,
iconCls:"btn-select select-condition",
handler: function() {
base.showCondObject(inst.queryId, function () {
datagridReload.call(inst);
});
}
},{
code:'edit',
text: base.resource.btn.add,
iconCls:'btn-add',
handler: addNet
},{
code:'edit',
text: base.resource.btn.remove,
iconCls:'btn-remove',
handler:removeNet
}]
}),
columns:[[
{field:'ck',checkbox:true },
{field:'SICODE',title:resource.grid.sicode, width:100, align:"center"},
{field:'SINAME',title:resource.grid.siname, width:100, align:"center"},
{field:'BENAME',title:resource.grid.bename, width:100, align:"center"},
{field:'BEBNAME',title:resource.grid.bebname, width:100, align:"center"}
]]
});
}
});
\ No newline at end of file
......
......@@ -13,6 +13,12 @@ define({
deleteRank:'系统默认等级不能删除!',
select:'请选择',
noLimit:'不限',
mustSubmitAccountBeforeSecondGroup:'新增第二个网点组之前,需要保存账套信息,是否保存?',
saveTitle:'确定保存?',
confirmDelete:'你确定要删除这条信息吗?',
onAddCannot:"确认新增当前选择数据?",
onDeleteCannot:"数据删除后无法恢复,确认删除当前选择数据?",
onDeleteGroupCannot:"网点组删除后,其下的网点同时删除,且无法恢复,请确认删除当前网点组?",
title:{
name:'CRM账套',
detail:'CRM账套详情',
......